Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
S
stockPriceTack
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘长帅
stockPriceTack
Commits
68a3eb22
Commit
68a3eb22
authored
Jun 04, 2024
by
lilei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
波段王mapper
parent
4a3286de
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
2350 additions
and
0 deletions
+2350
-0
KingCodeInquiryMapper.xml
...n/resources/mybatis/mapper/king/KingCodeInquiryMapper.xml
+232
-0
KingCustomerInquiryMapper.xml
...sources/mybatis/mapper/king/KingCustomerInquiryMapper.xml
+607
-0
KingIntelligentSendMapper.xml
...sources/mybatis/mapper/king/KingIntelligentSendMapper.xml
+173
-0
KingMessageLoggerMapper.xml
...resources/mybatis/mapper/king/KingMessageLoggerMapper.xml
+30
-0
KingPositionTradeInfoRecordMapper.xml
...mybatis/mapper/king/KingPositionTradeInfoRecordMapper.xml
+113
-0
KingProductConfigRuleMapper.xml
...urces/mybatis/mapper/king/KingProductConfigRuleMapper.xml
+297
-0
KingProductConfigRuleRelMapper.xml
...es/mybatis/mapper/king/KingProductConfigRuleRelMapper.xml
+329
-0
KingStockInputLogMapper.xml
...resources/mybatis/mapper/king/KingStockInputLogMapper.xml
+78
-0
KingStockPositionMapper.xml
...resources/mybatis/mapper/king/KingStockPositionMapper.xml
+491
-0
No files found.
src/main/resources/mybatis/mapper/king/KingCodeInquiryMapper.xml
0 → 100644
View file @
68a3eb22
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.zfxftech.telmarket.mapper.business.king.KingCodeInquiryMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.zfxftech.telmarket.common.pojo.dao.king.KingCodeInquiry"
>
<result
column=
"name"
property=
"name"
jdbcType=
"VARCHAR"
/>
<result
column=
"real_market_id"
property=
"realMarketId"
jdbcType=
"VARCHAR"
/>
<result
column=
"simulated_market_id"
property=
"simulatedMarketId"
jdbcType=
"VARCHAR"
/>
<result
column=
"accountType"
property=
"accountType"
jdbcType=
"VARCHAR"
/>
<result
column=
"product_name"
property=
"productName"
jdbcType=
"VARCHAR"
/>
<result
column=
"product_type"
property=
"productType"
jdbcType=
"BIGINT"
/>
<result
column=
"code"
property=
"code"
jdbcType=
"VARCHAR"
/>
<result
column=
"stockName"
property=
"stockName"
jdbcType=
"VARCHAR"
/>
<result
column=
"cost"
property=
"cost"
jdbcType=
"DECIMAL"
/>
<result
column=
"created_time"
property=
"createdTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"recent_closing_price"
property=
"recentClosingPrice"
jdbcType=
"DECIMAL"
/>
<result
column=
"riseDownRange"
property=
"riseDownRange"
jdbcType=
"DECIMAL"
/>
<result
column=
"profitLossRatio"
property=
"profitLossRatio"
jdbcType=
"DECIMAL"
/>
<result
column=
"days"
property=
"days"
jdbcType=
"VARCHAR"
/>
<result
column=
"industry"
property=
"industry"
jdbcType=
"VARCHAR"
/>
<result
column=
"ydayRiseDownRange"
property=
"ydayRiseDownRange"
jdbcType=
"DECIMAL"
/>
</resultMap>
<select
id=
"getCodeInquiryList"
resultMap=
"BaseResultMap"
parameterType=
"java.util.Map"
>
select
f.*
from (select umb.name ,
"simulated" as accountType,
apr.simulated_market_id,
apr.real_market_id,
apr.product_name,
apr.product_type,
sp.`code`,
sp.name as stockName,
sp.cost,
sp.rise_down_range as riseDownRange,
sp.profit_loss_ratio as profitLossRatio,
sp.created_time,
sc.recent_closing_price,
sc.industry,
sp.yday_rise_down_range as ydayRiseDownRange,
DATEDIFF(now(),sp.created_time) as days
from king_stock_position sp
INNER JOIN king_account_product_relation apr on sp.market_id = apr.simulated_market_id
INNER JOIN us_member_base umb ON sp.customer_id = umb.id
INNER JOIN stocks_code sc ON sp.`code` = sc.symbol
INNER JOIN king_product p ON p.`id` = sp.product_id
<where>
<if
test=
"companyId != null"
>
AND umb.company_id = #{companyId}
</if>
<if
test=
"userId != null"
>
AND p.analyst = #{userId}
</if>
<if
test=
"stockCode != null"
>
AND (sp.code = #{stockCode} OR sp.name = #{stockCode})
</if>
<if
test=
"productId != null"
>
AND apr.product_id = #{productId}
</if>
<if
test=
"productType != null"
>
AND apr.product_type = #{productType}
</if>
<if
test=
"industry != null"
>
AND sc.industry = #{industry}
</if>
<if
test=
"profitLossUp != null"
>
AND profitLoss
<![CDATA[<=]]>
#{profitLossUp}
</if>
<if
test=
"profitLossLow != null"
>
AND profitLoss
<![CDATA[>=]]>
#{profitLossLow}
</if>
<if
test=
"dayIncreaseUp != null"
>
AND dayIncrease
<![CDATA[<=]]>
#{dayIncreaseUp}
</if>
<if
test=
"dayIncreaseLow != null"
>
AND dayIncrease
<![CDATA[>=]]>
#{dayIncreaseLow}
</if>
<if
test=
"bugTimeLow != null"
>
AND sp.created_time
<![CDATA[>=]]>
#{bugTimeLow}
</if>
<if
test=
"bugTimeUp != null"
>
AND sp.created_time
<![CDATA[<=]]>
#{bugTimeUp}
</if>
AND sp.is_deleted = 0
</where>
UNION
select umb.name ,
"real" as accountType,
apr.simulated_market_id,
apr.real_market_id,
apr.product_name,
apr.product_type,
sp.`code`,
sp.name,
sp.cost,
sp.rise_down_range as riseDownRange,
sp.profit_loss_ratio as profitLossRatio,
sp.created_time,
sc.recent_closing_price,
sc.industry,
sp.yday_rise_down_range as ydayRiseDownRange,
DATEDIFF(now(),sp.created_time) as days
from king_stock_position sp
INNER JOIN king_account_product_relation apr on sp.market_id = apr.real_market_id
INNER JOIN us_member_base umb ON sp.customer_id = umb.id
INNER JOIN stocks_code sc ON sp.`code` = sc.symbol
INNER JOIN king_product p ON p.`id` = sp.product_id
<where>
<if
test=
"companyId != null"
>
AND umb.company_id = #{companyId}
</if>
<if
test=
"userId != null"
>
AND p.analyst = #{userId}
</if>
<if
test=
"stockCode != null"
>
AND (sp.code = #{stockCode} OR sp.name = #{stockCode})
</if>
<if
test=
"productId != null"
>
AND apr.product_id = #{productId}
</if>
<if
test=
"productType != null"
>
AND apr.product_type = #{productType}
</if>
<if
test=
"industry != null"
>
AND sc.industry = #{industry}
</if>
<if
test=
"profitLossUp != null"
>
AND profitLoss
<![CDATA[<=]]>
#{profitLossUp}
</if>
<if
test=
"profitLossLow != null"
>
AND profitLoss
<![CDATA[>=]]>
#{profitLossLow}
</if>
<if
test=
"dayIncreaseUp != null"
>
AND dayIncrease
<![CDATA[<=]]>
#{dayIncreaseUp}
</if>
<if
test=
"dayIncreaseLow != null"
>
AND dayIncrease
<![CDATA[>=]]>
#{dayIncreaseLow}
</if>
<if
test=
"buyStartTime != null"
>
AND sp.created_time
<![CDATA[>=]]>
#{bugTimeLow}
</if>
<if
test=
"buyEndTime != null"
>
AND sp.created_time
<![CDATA[<=]]>
#{bugTimeUp}
</if>
AND sp.is_deleted = 0
</where>
) f
<where>
<if
test=
"accountType != null"
>
AND f.accountType = #{accountType}
</if>
</where>
<if
test=
"orderBy != null "
>
ORDER BY ${orderBy[0]} ${orderBy[1]}
<!-- <foreach item="item" index="index" collection="orderBy" open=" " separator="," close=" ">-->
<!-- ${item}-->
<!-- </foreach>-->
</if>
</select>
<select
id=
"getCodeInquirySimulatedList"
resultMap=
"BaseResultMap"
parameterType=
"java.util.Map"
>
select
f.*
from (select umb.name ,
"simulated" as accountType,
apr.simulated_market_id,
apr.real_market_id,
apr.product_name,
apr.product_type,
sp.`code`,
sp.name as stockName,
sp.cost,
sp.rise_down_range as riseDownRange,
sp.profit_loss_ratio as profitLossRatio,
sp.created_time,
sc.recent_closing_price,
DATEDIFF(now(),sp.created_time) as days
from stock_position sp
INNER JOIN account_product_relation apr on sp.market_id = apr.simulated_market_id
INNER JOIN us_member_base umb ON sp.customer_id = umb.id
INNER JOIN stocks_code sc ON sp.`code` = sc.symbol
INNER JOIN product p ON p.`id` = sp.product_id
<where>
<if
test=
"companyId != null"
>
AND umb.company_id = #{companyId}
</if>
<if
test=
"userId != null"
>
AND p.analyst = #{userId}
</if>
<if
test=
"stockCode != null"
>
AND (sp.code = #{stockCode} OR sp.name = #{stockCode})
</if>
<if
test=
"productId != null"
>
AND apr.product_id = #{productId}
</if>
<if
test=
"productType != null"
>
AND apr.product_type = #{productType}
</if>
<if
test=
"profitLossUp != null"
>
AND profitLoss
<![CDATA[<=]]>
#{profitLossUp}
</if>
<if
test=
"profitLossLow != null"
>
AND profitLoss
<![CDATA[>=]]>
#{profitLossLow}
</if>
<if
test=
"dayIncreaseUp != null"
>
AND dayIncrease
<![CDATA[<=]]>
#{dayIncreaseUp}
</if>
<if
test=
"dayIncreaseLow != null"
>
AND dayIncrease
<![CDATA[>=]]>
#{dayIncreaseLow}
</if>
<if
test=
"bugTimeLow != null"
>
AND sp.created_time
<![CDATA[>=]]>
#{bugTimeLow}
</if>
<if
test=
"bugTimeUp != null"
>
AND sp.created_time
<![CDATA[<=]]>
#{bugTimeUp}
</if>
AND sp.is_deleted = 0
</where>
) f
<where>
<if
test=
"accountType != null"
>
AND f.accountType = #{accountType}
</if>
</where>
<if
test=
"orderBy != null "
>
ORDER BY ${orderBy[0]} ${orderBy[1]}
</if>
</select>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapper/king/KingCustomerInquiryMapper.xml
0 → 100644
View file @
68a3eb22
This diff is collapsed.
Click to expand it.
src/main/resources/mybatis/mapper/king/KingIntelligentSendMapper.xml
0 → 100644
View file @
68a3eb22
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.zfxftech.telmarket.mapper.business.king.KingIntelligentSendMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.zfxftech.telmarket.common.pojo.dao.king.KingPushRule"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"customer_id"
property=
"customerId"
jdbcType=
"INTEGER"
/>
<result
column=
"stock_pool_id"
property=
"stockPoolId"
jdbcType=
"INTEGER"
/>
<result
column=
"push_name"
property=
"pushName"
jdbcType=
"VARCHAR"
/>
<result
column=
"product_type"
property=
"productType"
jdbcType=
"VARCHAR"
/>
<result
column=
"product_id"
property=
"productId"
jdbcType=
"VARCHAR"
/>
<result
column=
"product_name"
property=
"productName"
jdbcType=
"VARCHAR"
/>
<result
column=
"buy_time_up"
property=
"buyTimeUp"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"buy_time_low"
property=
"buyTimeLow"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"pos_time_up"
property=
"posTimeUp"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"pos_time_low"
property=
"posTimeLow"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"simulate_market_fund_up"
property=
"simulateMarketFundUp"
jdbcType=
"VARCHAR"
/>
<result
column=
"simulate_market_fund_low"
property=
"simulateMarketFundLow"
jdbcType=
"VARCHAR"
/>
<result
column=
"simulate_market_up"
property=
"simulateMarketUp"
jdbcType=
"INTEGER"
/>
<result
column=
"simulate_market_low"
property=
"simulateMarketLow"
jdbcType=
"INTEGER"
/>
<result
column=
"max_num"
property=
"maxNum"
jdbcType=
"INTEGER"
/>
<result
column=
"day_num"
property=
"dayNum"
jdbcType=
"INTEGER"
/>
<result
column=
"push_proportion"
property=
"pushProportion"
jdbcType=
"VARCHAR"
/>
<result
column=
"is_deleted"
property=
"isDeleted"
jdbcType=
"VARCHAR"
/>
<result
column=
"is_daybuy"
property=
"isDaybuy"
jdbcType=
"VARCHAR"
/>
<result
column=
"status"
property=
"status"
jdbcType=
"VARCHAR"
/>
<result
column=
"created_by"
property=
"createdBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"modify_by"
property=
"modifyBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"created_time"
property=
"createdTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"modify_time"
property=
"modifyTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"send_time"
property=
"sendTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"position_count_up"
property=
"positionCountUp"
jdbcType=
"INTEGER"
/>
<result
column=
"position_count_low"
property=
"positionCountLow"
jdbcType=
"INTEGER"
/>
</resultMap>
<resultMap
id=
"sendResultMap"
type=
"com.zfxftech.telmarket.common.pojo.dao.king.KingIntelligentSendNum"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"customer_id"
property=
"customerId"
jdbcType=
"VARCHAR"
/>
<result
column=
"umbName"
property=
"customerName"
jdbcType=
"VARCHAR"
/>
<result
column=
"product_id"
property=
"productId"
jdbcType=
"VARCHAR"
/>
<result
column=
"product_name"
property=
"productName"
jdbcType=
"VARCHAR"
/>
<result
column=
"product_type"
property=
"productType"
jdbcType=
"VARCHAR"
/>
<result
column=
"simulated_funding"
property=
"simulatedFunding"
jdbcType=
"DECIMAL"
/>
<result
column=
"real_funding"
property=
"realFunding"
jdbcType=
"DECIMAL"
/>
<result
column=
"simulated_market_id"
property=
"simulatedMarketId"
jdbcType=
"BIGINT"
/>
<result
column=
"real_market_id"
property=
"realMarketId"
jdbcType=
"BIGINT"
/>
<result
column=
"union_id"
property=
"unionId"
jdbcType=
"VARCHAR"
/>
<result
column=
"investment_style"
property=
"investmentStyle"
jdbcType=
"VARCHAR"
/>
<result
column=
"account_limit"
property=
"accountLimit"
jdbcType=
"VARCHAR"
/>
<result
column=
"modify_time"
property=
"modifyTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"initial_funding"
property=
"initialFunding"
jdbcType=
"VARCHAR"
/>
<collection
property=
"list"
ofType=
"com.zfxftech.telmarket.common.pojo.dao.StockPosition"
>
<result
column=
"spId"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"code"
property=
"code"
jdbcType=
"VARCHAR"
/>
<result
column=
"count"
property=
"count"
jdbcType=
"INTEGER"
/>
<result
column=
"cost"
property=
"cost"
jdbcType=
"VARCHAR"
/>
<result
column=
"is_deleted"
property=
"isDeleted"
jdbcType=
"BOOLEAN"
/>
<result
column=
"market_id"
property=
"marketId"
jdbcType=
"BIGINT"
/>
</collection>
</resultMap>
<sql
id=
"columns"
>
pr.id,customer_id,stock_pool_id,push_name,product_type,product_id,product_name,buy_time_up,
position_count_low,position_count_up,buy_time_low,pos_time_up,pos_time_low,pos_time_up,pos_time_low,simulate_market_fund_up,
simulate_market_fund_low,real_market_up,real_market_low,simulate_market_up,simulate_market_low,
max_num,day_num,push_proportion,is_deleted,is_daybuy,pr.status,created_by,created_time,send_time
</sql>
<select
id=
"queryIntelligentSendList"
resultMap=
"BaseResultMap"
parameterType=
"java.util.Map"
>
select
<include
refid=
"columns"
/>
from king_push_rule AS pr inner join us_admin ua on pr.customer_id = ua.id
<where>
<if
test=
"pushName != null and pushName != ''"
>
AND pr.push_name like concat('%',#{pushName},'%')
</if>
<if
test=
"status != null and status != ''"
>
AND pr.status = #{status}
</if>
<if
test=
"createAtStartTime != null"
>
AND pr.created_time
<![CDATA[>=]]>
#{createAtStartTime}
</if>
<if
test=
"createAtEndTime != null"
>
AND pr.created_time
<![CDATA[<=]]>
#{createAtEndTime}
</if>
<if
test=
"sendAtStartTime != null"
>
AND pr.send_time
<![CDATA[>=]]>
#{sendAtStartTime}
</if>
<if
test=
"sendAtEndTime != null"
>
AND pr.send_time
<![CDATA[<=]]>
#{sendAtEndTime}
</if>
<if
test=
"flag != null and flag != ''"
>
AND pr.stock_pool_id IN
(select stock_pool_id from stock_pool_details as spd
<where>
<if
test=
"stockName != null and stockName != ''"
>
AND spd.stock_name like concat('%',#{stockName},'%')
</if>
<if
test=
"stockCode != null and stockCode != ''"
>
AND spd.stock_code = #{stockCode}
</if>
</where>
)
</if>
<if
test=
"customerId != null"
>
AND pr.customer_id = #{customerId}
</if>
<if
test=
"companyId != null"
>
AND ua.company_id = #{companyId}
</if>
AND pr.is_deleted = '0'
</where>
<if
test=
"orderBy != null "
>
ORDER BY pr.${orderBy}
</if>
-- order by pr.created_time DESC
</select>
<select
id=
"querySendUserNum"
resultMap=
"sendResultMap"
parameterType=
"java.util.Map"
>
SELECT
apr.id,apr.customer_id,apr.product_id,apr.product_type,apr.product_name,apr.real_funding,apr.simulated_funding,
apr.simulated_market_id,apr.real_market_id,sp2.created_time as modify_time,
sp.code,sp.is_deleted,sp.count,sp.cost,sp.id as spId,sp.market_id,
umb.name as umbName, umb.union_id,umb.investment_style,umb.account_limit
,(
select count(1) from king_stock_position as s
where s.market_id=apr.simulated_market_id and s.is_deleted = '0'
) as currPositionNum,
sp2.created_time as buyTime
,apr.initial_funding
from king_account_product_relation as apr
left JOIN king_stock_position as sp
on (apr.product_id = sp.product_id) and (apr.customer_id = sp.customer_id)
left join us_member_base as umb on apr.customer_id = umb.id
left join king_stock_position as sp2 on apr.simulated_market_id = sp2.market_id and sp2.id = (
select max(id)
from king_stock_position
where market_id = apr.simulated_market_id
)
<where>
apr.is_problem = '0'
<if
test=
"buyTimeUp != null"
>
AND apr.created_time
<![CDATA[<=]]>
#{buyTimeUp}
</if>
<if
test=
"buyTimeLow != null"
>
AND apr.created_time
<![CDATA[>=]]>
#{buyTimeLow}
</if>
<if
test=
"posTimeUp != null"
>
AND sp.created_time
<![CDATA[<=]]>
#{posTimeUp}
</if>
<if
test=
"posTimeLow != null"
>
AND sp.created_time
<![CDATA[>=]]>
#{posTimeLow}
</if>
<if
test=
"companyId != null"
>
AND umb.company_id = #{companyId}
</if>
<if
test=
"productList != null"
>
AND apr.product_id in
<foreach
collection=
"productList"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
AND apr.expired_at
<![CDATA[>]]>
now()
-- AND sp.is_deleted = '0'
</where>
order by sp2.created_time asc,currPositionNum asc
</select>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapper/king/KingMessageLoggerMapper.xml
0 → 100644
View file @
68a3eb22
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.zfxftech.telmarket.mapper.business.king.KingMessageLoggerMapper"
>
<insert
id=
"insertListBatch"
parameterType=
"java.util.List"
>
INSERT INTO king_message_log (push_rule_id,
customer_id,
stock_pool_id,
stock_id,
customer_name,
created_by,
modify_by)
VALUE
<foreach
collection=
"messageLoggerList"
index=
"key"
item=
"item"
separator=
","
>
(#{item.pushRuleId},
#{item.customerId},
#{item.stockPoolId},
#{item.stockId},
#{item.customerName},
#{item.createdBy},
null)
</foreach>
</insert>
</mapper>
src/main/resources/mybatis/mapper/king/KingPositionTradeInfoRecordMapper.xml
0 → 100644
View file @
68a3eb22
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.zfxftech.telmarket.mapper.business.king.KingPositionTradeInfoRecordMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.zfxftech.telmarket.common.pojo.dao.king.KingPositionTradeInfoRecord"
>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"code"
property=
"code"
jdbcType=
"VARCHAR"
/>
<result
column=
"operation"
property=
"operation"
jdbcType=
"VARCHAR"
/>
<result
column=
"buyingTime"
property=
"buyingTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"sellingTime"
property=
"sellingTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"cost"
property=
"cost"
jdbcType=
"DECIMAL"
/>
<result
column=
"sellingPrice"
property=
"sellingPrice"
jdbcType=
"DECIMAL"
/>
<result
column=
"productIds"
property=
"productIds"
jdbcType=
"VARCHAR"
/>
<result
column=
"productType"
property=
"productType"
jdbcType=
"VARCHAR"
/>
<result
column=
"status"
property=
"status"
jdbcType=
"VARCHAR"
/>
<result
column=
"holdingDays"
property=
"holdingDays"
jdbcType=
"INTEGER"
/>
<result
column=
"profitRatio"
property=
"profitRatio"
jdbcType=
"DECIMAL"
/>
<result
column=
"companyId"
property=
"companyId"
jdbcType=
"INTEGER"
/>
<result
column=
"entrustWay"
property=
"entrustWay"
jdbcType=
"INTEGER"
/>
<result
column=
"customerIds"
property=
"customerIds"
jdbcType=
"VARCHAR"
/>
<result
column=
"trust_source"
property=
"trustSource"
jdbcType=
"INTEGER"
/>
<result
column=
"trust_source_name"
property=
"trustSourceName"
jdbcType=
"VARCHAR"
/>
<result
column=
"industry"
property=
"industry"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"columns"
>
id
,buying_batch,code,operation,buying_time,selling_time,cost,selling_price,position_id
,product_id,product_type,customer_id,status,holding_days,profitRatio,companyId,trust_source_name,trust_source
</sql>
<select
id=
"pagePositionTradeInfoRecordGroupByBatch"
resultMap=
"BaseResultMap"
parameterType=
"java.util.Map"
>
select
buying_batch,
group_concat(distinct apr.customer_id) as customerIds,
max(code) as code,
max(industry) as industry,
max(operation) as operation,
max(buying_time) as buyingTime,
max(selling_time) as sellingTime,
max(cost) as cost,
max(selling_price) as sellingPrice,
group_concat(distinct apr.product_id) as productIds,
max(ptir.product_type) as productType,
max(ptir.status) as status,
max(holding_days) as holdingDays,
max(profit_ratio) as profitRatio,
max(companyId) as companyId,
max(trust_source_name) as trust_source_name,
count(buying_batch) as customerNum
from king_position_trade_info_record as ptir
left join king_product as p on ptir.product_id=p.id
inner join king_account_product_relation as apr on ptir.product_id=apr.product_id and ptir.customer_id=apr.customer_id
left join us_member_base as c on apr.customer_id=c.id
where 1= 1
and ((ptir.CODE = "601005"
AND(( ptir.buying_time
<
"2022-02-10 00:00:00" ) or (ptir.buying_time
>
"2022-04-17 23:59:59"))) or (
ptir.CODE != "601005"
) )
<if
test=
"productId != null"
>
AND ptir.product_id = #{productId}
</if>
<if
test=
"code != null"
>
AND ptir.code = #{code}
</if>
<if
test=
"companyId != null"
>
AND p.company_id = #{companyId}
AND c.company_id = #{companyId}
</if>
<if
test=
"productType != null and productType != ''"
>
AND ptir.product_type = #{productType}
</if>
<if
test=
"industry != null and industry != ''"
>
AND ptir.industry = #{industry}
</if>
<if
test=
"status != null"
>
AND ptir.status = #{status}
</if>
<if
test=
"buyingTimeUpperLimit != null"
>
AND ptir.buying_time
<![CDATA[<=]]>
#{buyingTimeUpperLimit}
</if>
<if
test=
"buyingTimeLowerLimit != null"
>
AND ptir.buying_time
<![CDATA[>=]]>
#{buyingTimeLowerLimit}
</if>
<if
test=
"sellingTimeUpperLimit != null"
>
AND ptir.selling_time
<![CDATA[<=]]>
#{sellingTimeUpperLimit}
</if>
<if
test=
"sellingTimeLowerLimit != null"
>
AND ptir.selling_time
<![CDATA[>=]]>
#{sellingTimeLowerLimit}
</if>
<if
test=
"profitUpperLimit != null"
>
AND ptir.profit_ratio
<![CDATA[<=]]>
#{profitUpperLimit}
</if>
<if
test=
"profitLowerLimit != null"
>
AND ptir.profit_ratio
<![CDATA[>=]]>
#{profitLowerLimit}
</if>
<if
test=
"analyst != null"
>
AND p.analyst = #{analyst}
</if>
<if
test=
"trustSource != null"
>
AND ptir.trust_source = #{trustSource}
</if>
GROUP BY buying_batch
<if
test=
"filterOneMore != null"
>
HAVING customerNum > 1
</if>
<if
test=
"orderBy != null and orderBy != ''"
>
<![CDATA[ORDER BY ${orderBy}]]>
</if>
</select>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapper/king/KingProductConfigRuleMapper.xml
0 → 100644
View file @
68a3eb22
This diff is collapsed.
Click to expand it.
src/main/resources/mybatis/mapper/king/KingProductConfigRuleRelMapper.xml
0 → 100644
View file @
68a3eb22
This diff is collapsed.
Click to expand it.
src/main/resources/mybatis/mapper/king/KingStockInputLogMapper.xml
0 → 100644
View file @
68a3eb22
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.zfxftech.telmarket.mapper.business.king.KingStockInputLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.zfxftech.telmarket.common.pojo.dao.king.KingStockInputLog"
>
<!--
WARNING - @mbg.generated
-->
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"product_id"
property=
"productId"
jdbcType=
"INTEGER"
/>
<result
column=
"customer_id"
property=
"customerId"
jdbcType=
"INTEGER"
/>
<result
column=
"nick_name"
property=
"nickName"
jdbcType=
"VARCHAR"
/>
<result
column=
"operation"
property=
"operation"
jdbcType=
"INTEGER"
/>
<result
column=
"count"
property=
"count"
jdbcType=
"INTEGER"
/>
<result
column=
"stock_name"
property=
"stockName"
jdbcType=
"VARCHAR"
/>
<result
column=
"modify_time"
property=
"modifyTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"modify_by"
property=
"modifyBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"modify_time"
property=
"modifyTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"created_by"
property=
"createdBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"created_time"
property=
"createdTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"product_name"
property=
"productName"
jdbcType=
"VARCHAR"
/>
<result
column=
"product_type"
property=
"productType"
jdbcType=
"VARCHAR"
/>
<result
column=
"name"
property=
"customerName"
jdbcType=
"VARCHAR"
/>
<result
column=
"nick_name"
property=
"nickName"
jdbcType=
"VARCHAR"
/>
<result
column=
"trust_source_name"
property=
"trustSourceName"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"columns"
>
id,union_id,`name`,investment_style,nick_name,remark,initial_funding,account_limit,company_id,is_deleted,created_by,created_time,modify_by,modify_time
</sql>
<select
id=
"queryStockInputLogs"
resultMap=
"BaseResultMap"
parameterType=
"java.util.Map"
>
SELECT
a.*,
b.product_name,
b.product_type,
c.`name`,
c.nick_name
FROM
king_stock_input_log a
LEFT JOIN king_product b ON a.product_id = b.id
LEFT JOIN us_member_base c ON a.customer_id = c.id
<where>
<if
test=
"companyId != null"
>
AND c.company_id = #{companyId}
</if>
<if
test=
"marketId != null"
>
AND a.market_id = #{marketId}
</if>
<if
test=
"customerId != null and customerId != ''"
>
AND a.customer_id = #{customerId}
</if>
<if
test=
"productId != null"
>
AND a.product_id = #{productId}
</if>
<if
test=
"code != null and code != ''"
>
AND a.code = #{code}
</if>
<if
test=
"operation != null"
>
AND a.operation = #{operation}
</if>
<if
test=
"tradingTimeLowerLimit != null"
>
AND a.trading_time
<![CDATA[>=]]>
FROM_UNIXTIME(#{tradingTimeLowerLimit})
</if>
<if
test=
"tradingTimeUpperLimit != null"
>
AND a.trading_time
<![CDATA[<=]]>
FROM_UNIXTIME(#{tradingTimeUpperLimit})
</if>
<if
test=
"marketType != null"
>
AND a.market_type = #{marketType}
</if>
AND a.is_deleted = '0'
<if
test=
"marketId == null"
>
AND a.created_by != ''
</if>
</where>
<if
test=
"orderBy != null and orderBy != ''"
>
<![CDATA[ORDER BY ${orderBy}]]>
</if>
</select>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapper/king/KingStockPositionMapper.xml
0 → 100644
View file @
68a3eb22
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment