Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AutogeneralShanghai
yd-backend
Commits
713c9cde
Commit
713c9cde
authored
Nov 10, 2020
by
yao.xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改发佣检核状态,增加批次
parent
5e9a47af
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
428 additions
and
37 deletions
+428
-37
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsFortuneServiceImpl.java
+56
-9
yd-api/src/main/java/com/yd/api/agms/vo/fortune/CommissionPayoutStatusUpdateRequestVO.java
+5
-0
yd-api/src/main/java/com/yd/dal/entity/customer/AclCustomerFortune.java
+0
-0
yd-api/src/main/java/com/yd/dal/entity/customer/AclCustomerFortunePayoutBatch.java
+41
-0
yd-api/src/main/java/com/yd/dal/mapper/customer/AclCustomerFortunePayoutBatchMapper.java
+28
-0
yd-api/src/main/java/com/yd/dal/mapper/customer/AclCustomerFortuneWithdrawMapper.java
+1
-1
yd-api/src/main/java/com/yd/dal/service/customer/AclCustomerFortunePayoutBatchDALService.java
+12
-0
yd-api/src/main/java/com/yd/dal/service/customer/AclCustomerFortuneWithdrawDALService.java
+1
-1
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclCustomerFortunePayoutBatchDALServiceImpl.java
+27
-0
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclCustomerFortuneWithdrawDALServiceImpl.java
+2
-2
yd-api/src/main/resources/mapper/customer/AclCustomerFortuneMapper.xml
+40
-17
yd-api/src/main/resources/mapper/customer/AclCustomerFortunePayoutBatchMapper.xml
+206
-0
yd-api/src/main/resources/mapper/customer/AclCustomerFortuneWithdrawMapper.xml
+9
-7
No files found.
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsFortuneServiceImpl.java
View file @
713c9cde
This diff is collapsed.
Click to expand it.
yd-api/src/main/java/com/yd/api/agms/vo/fortune/CommissionPayoutStatusUpdateRequestVO.java
View file @
713c9cde
...
...
@@ -23,4 +23,9 @@ public class CommissionPayoutStatusUpdateRequestVO {
* 登入者id,loginId
*/
private
Long
loginId
;
/**
* 佣金预计发放批次
*/
private
String
payoutBatch
;
}
yd-api/src/main/java/com/yd/dal/entity/customer/AclCustomerFortune.java
View file @
713c9cde
This diff is collapsed.
Click to expand it.
yd-api/src/main/java/com/yd/dal/entity/customer/AclCustomerFortunePayoutBatch.java
0 → 100644
View file @
713c9cde
package
com
.
yd
.
dal
.
entity
.
customer
;
import
java.util.Date
;
import
lombok.Data
;
/**
* 经纪人佣金预计发放批次
*/
@Data
public
class
AclCustomerFortunePayoutBatch
{
/**
* serial id
*/
private
Long
id
;
/**
* 预计发放批次的年月
*/
private
String
payoutYearmonth
;
/**
* 创建时间
*/
private
Date
createdAt
;
/**
* FK ag_acl_user.id
*/
private
Long
createdBy
;
/**
* 修改时间
*/
private
Date
updatedAt
;
/**
* 修改人FK ag_acl_user.id
*/
private
Long
updatedBy
;
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/customer/AclCustomerFortunePayoutBatchMapper.java
0 → 100644
View file @
713c9cde
package
com
.
yd
.
dal
.
mapper
.
customer
;
import
com.yd.dal.entity.customer.AclCustomerFortunePayoutBatch
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
AclCustomerFortunePayoutBatchMapper
{
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
AclCustomerFortunePayoutBatch
record
);
int
insertSelective
(
AclCustomerFortunePayoutBatch
record
);
AclCustomerFortunePayoutBatch
selectByPrimaryKey
(
Long
id
);
int
updateByPrimaryKeySelective
(
AclCustomerFortunePayoutBatch
record
);
int
updateByPrimaryKey
(
AclCustomerFortunePayoutBatch
record
);
int
updateBatch
(
List
<
AclCustomerFortunePayoutBatch
>
list
);
int
updateBatchSelective
(
List
<
AclCustomerFortunePayoutBatch
>
list
);
int
batchInsert
(
@Param
(
"list"
)
List
<
AclCustomerFortunePayoutBatch
>
list
);
AclCustomerFortunePayoutBatch
selectByPayoutYearmonth
(
String
payoutYearmonth
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/customer/AclCustomerFortuneWithdrawMapper.java
View file @
713c9cde
...
...
@@ -26,7 +26,7 @@ public interface AclCustomerFortuneWithdrawMapper {
int
batchInsert
(
@Param
(
"list"
)
List
<
AclCustomerFortuneWithdraw
>
list
);
List
<
Map
<
String
,
Object
>>
findFinalWithdrawNoPayByCustomerIds
(
List
<
Long
>
customerIdList
);
List
<
Map
<
String
,
Object
>>
findFinalWithdrawNoPayByCustomerIds
(
@Param
(
"list"
)
List
<
Long
>
customerIdList
,
@Param
(
"payoutBatchId"
)
Long
payoutBatchId
);
List
<
AclCustomerFortuneWithdraw
>
findByIds
(
List
<
Long
>
withdrawUpdateIds
);
...
...
yd-api/src/main/java/com/yd/dal/service/customer/AclCustomerFortunePayoutBatchDALService.java
0 → 100644
View file @
713c9cde
package
com
.
yd
.
dal
.
service
.
customer
;
import
com.yd.dal.entity.customer.AclCustomerFortunePayoutBatch
;
/**
* @author xxy
*/
public
interface
AclCustomerFortunePayoutBatchDALService
{
AclCustomerFortunePayoutBatch
findByPayoutYearmonth
(
String
payoutYearmonth
);
void
save
(
AclCustomerFortunePayoutBatch
customerFortunePayoutBatch
);
}
yd-api/src/main/java/com/yd/dal/service/customer/AclCustomerFortuneWithdrawDALService.java
View file @
713c9cde
...
...
@@ -17,7 +17,7 @@ public interface AclCustomerFortuneWithdrawDALService {
* @param customerIds 客户id
* @return map customerId withdrawId
*/
Map
<
Long
,
Long
>
findFinalWithdrawNoPayByCustomerIds
(
Set
<
Long
>
customerIds
);
Map
<
Long
,
Long
>
findFinalWithdrawNoPayByCustomerIds
(
Set
<
Long
>
customerIds
,
Long
payoutBatchId
);
/**
* 通过id批量查询
...
...
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclCustomerFortunePayoutBatchDALServiceImpl.java
0 → 100644
View file @
713c9cde
package
com
.
yd
.
dal
.
service
.
customer
.
impl
;
import
com.yd.dal.entity.customer.AclCustomerFortunePayoutBatch
;
import
com.yd.dal.mapper.customer.AclCustomerFortunePayoutBatchMapper
;
import
com.yd.dal.service.customer.AclCustomerFortunePayoutBatchDALService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* @author xxy
*/
@Service
(
"aclCustomerFortunePayoutBatchDALService"
)
public
class
AclCustomerFortunePayoutBatchDALServiceImpl
implements
AclCustomerFortunePayoutBatchDALService
{
@Autowired
private
AclCustomerFortunePayoutBatchMapper
customerFortunePayoutBatchMapper
;
@Override
public
AclCustomerFortunePayoutBatch
findByPayoutYearmonth
(
String
payoutYearmonth
)
{
return
customerFortunePayoutBatchMapper
.
selectByPayoutYearmonth
(
payoutYearmonth
);
}
@Override
public
void
save
(
AclCustomerFortunePayoutBatch
customerFortunePayoutBatch
)
{
customerFortunePayoutBatchMapper
.
insert
(
customerFortunePayoutBatch
);
}
}
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclCustomerFortuneWithdrawDALServiceImpl.java
View file @
713c9cde
...
...
@@ -18,9 +18,9 @@ public class AclCustomerFortuneWithdrawDALServiceImpl implements AclCustomerFort
private
AclCustomerFortuneWithdrawMapper
customerFortuneWithdrawMapper
;
@Override
public
Map
<
Long
,
Long
>
findFinalWithdrawNoPayByCustomerIds
(
Set
<
Long
>
customerIds
)
{
public
Map
<
Long
,
Long
>
findFinalWithdrawNoPayByCustomerIds
(
Set
<
Long
>
customerIds
,
Long
payoutBatchId
)
{
List
<
Long
>
customerIdList
=
new
ArrayList
<>(
customerIds
);
List
<
Map
<
String
,
Object
>>
customerWithdrawList
=
customerFortuneWithdrawMapper
.
findFinalWithdrawNoPayByCustomerIds
(
customerIdList
);
List
<
Map
<
String
,
Object
>>
customerWithdrawList
=
customerFortuneWithdrawMapper
.
findFinalWithdrawNoPayByCustomerIds
(
customerIdList
,
payoutBatchId
);
return
changeCustomerWithdrawMap
(
customerWithdrawList
);
}
...
...
yd-api/src/main/resources/mapper/customer/AclCustomerFortuneMapper.xml
View file @
713c9cde
...
...
@@ -28,6 +28,7 @@
<result
column=
"campaign_id"
jdbcType=
"BIGINT"
property=
"campaignId"
/>
<result
column=
"campaign_name"
jdbcType=
"VARCHAR"
property=
"campaignName"
/>
<result
column=
"withdrawable_date"
jdbcType=
"TIMESTAMP"
property=
"withdrawableDate"
/>
<result
column=
"payout_batch_id"
jdbcType=
"BIGINT"
property=
"payoutBatchId"
/>
<result
column=
"commission_payout_status"
jdbcType=
"VARCHAR"
property=
"commissionPayoutStatus"
/>
<result
column=
"commission_payout_at"
jdbcType=
"TIMESTAMP"
property=
"commissionPayoutAt"
/>
<result
column=
"commission_payout_by"
jdbcType=
"BIGINT"
property=
"commissionPayoutBy"
/>
...
...
@@ -41,7 +42,7 @@
id, share_id, customer_id, order_id, order_date, order_price, commission_rate, commission_amount,
fyc_rate, fyc_amount, grade_commission_rate, share_rate, referral_rate, referral_amount,
month_period, commission_type, drop_option_code, practitioner_level, is_tax, tax_amount,
net_amount, campaign_id, campaign_name, withdrawable_date, commission_payout_status,
net_amount, campaign_id, campaign_name, withdrawable_date,
payout_batch_id,
commission_payout_status,
commission_payout_at, commission_payout_by, withdrawed_id, fortune_payed_id, created_at,
created_by
</sql>
...
...
@@ -66,10 +67,10 @@
referral_amount, month_period, commission_type,
drop_option_code, practitioner_level, is_tax,
tax_amount, net_amount, campaign_id,
campaign_name, withdrawable_date,
commission_payout_status
,
commission_payout_
at, commission_payout_by
,
withdrawed_id, fortune_payed_id, created_at
,
created_by)
campaign_name, withdrawable_date,
payout_batch_id
,
commission_payout_
status, commission_payout_at
,
commission_payout_by, withdrawed_id, fortune_payed_id
,
created_
at, created_
by)
values (#{shareId,jdbcType=BIGINT}, #{customerId,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT},
#{orderDate,jdbcType=TIMESTAMP}, #{orderPrice,jdbcType=DECIMAL}, #{commissionRate,jdbcType=DECIMAL},
#{commissionAmount,jdbcType=DECIMAL}, #{fycRate,jdbcType=DECIMAL}, #{fycAmount,jdbcType=DECIMAL},
...
...
@@ -77,10 +78,10 @@
#{referralAmount,jdbcType=DECIMAL}, #{monthPeriod,jdbcType=VARCHAR}, #{commissionType,jdbcType=VARCHAR},
#{dropOptionCode,jdbcType=VARCHAR}, #{practitionerLevel,jdbcType=VARCHAR}, #{isTax,jdbcType=INTEGER},
#{taxAmount,jdbcType=DECIMAL}, #{netAmount,jdbcType=DECIMAL}, #{campaignId,jdbcType=BIGINT},
#{campaignName,jdbcType=VARCHAR}, #{withdrawableDate,jdbcType=TIMESTAMP}, #{
commissionPayoutStatus,jdbcType=VARCHAR
},
#{commissionPayout
At,jdbcType=TIMESTAMP}, #{commissionPayoutBy,jdbcType=BIGINT
},
#{
withdrawedId,jdbcType=BIGINT}, #{fortunePayedId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP
},
#{createdBy,jdbcType=BIGINT})
#{campaignName,jdbcType=VARCHAR}, #{withdrawableDate,jdbcType=TIMESTAMP}, #{
payoutBatchId,jdbcType=BIGINT
},
#{commissionPayout
Status,jdbcType=VARCHAR}, #{commissionPayoutAt,jdbcType=TIMESTAMP
},
#{
commissionPayoutBy,jdbcType=BIGINT}, #{withdrawedId,jdbcType=BIGINT}, #{fortunePayedId,jdbcType=BIGINT
},
#{created
At,jdbcType=TIMESTAMP}, #{created
By,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclCustomerFortune"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
...
...
@@ -155,6 +156,9 @@
<if
test=
"withdrawableDate != null"
>
withdrawable_date,
</if>
<if
test=
"payoutBatchId != null"
>
payout_batch_id,
</if>
<if
test=
"commissionPayoutStatus != null"
>
commission_payout_status,
</if>
...
...
@@ -247,6 +251,9 @@
<if
test=
"withdrawableDate != null"
>
#{withdrawableDate,jdbcType=TIMESTAMP},
</if>
<if
test=
"payoutBatchId != null"
>
#{payoutBatchId,jdbcType=BIGINT},
</if>
<if
test=
"commissionPayoutStatus != null"
>
#{commissionPayoutStatus,jdbcType=VARCHAR},
</if>
...
...
@@ -343,6 +350,9 @@
<if
test=
"withdrawableDate != null"
>
withdrawable_date = #{withdrawableDate,jdbcType=TIMESTAMP},
</if>
<if
test=
"payoutBatchId != null"
>
payout_batch_id = #{payoutBatchId,jdbcType=BIGINT},
</if>
<if
test=
"commissionPayoutStatus != null"
>
commission_payout_status = #{commissionPayoutStatus,jdbcType=VARCHAR},
</if>
...
...
@@ -393,6 +403,7 @@
campaign_id = #{campaignId,jdbcType=BIGINT},
campaign_name = #{campaignName,jdbcType=VARCHAR},
withdrawable_date = #{withdrawableDate,jdbcType=TIMESTAMP},
payout_batch_id = #{payoutBatchId,jdbcType=BIGINT},
commission_payout_status = #{commissionPayoutStatus,jdbcType=VARCHAR},
commission_payout_at = #{commissionPayoutAt,jdbcType=TIMESTAMP},
commission_payout_by = #{commissionPayoutBy,jdbcType=BIGINT},
...
...
@@ -521,6 +532,11 @@
when id = #{item.id,jdbcType=BIGINT} then #{item.withdrawableDate,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim
prefix=
"payout_batch_id = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.payoutBatchId,jdbcType=BIGINT}
</foreach>
</trim>
<trim
prefix=
"commission_payout_status = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.commissionPayoutStatus,jdbcType=VARCHAR}
...
...
@@ -727,6 +743,13 @@
</if>
</foreach>
</trim>
<trim
prefix=
"payout_batch_id = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.payoutBatchId != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.payoutBatchId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim
prefix=
"commission_payout_status = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.commissionPayoutStatus != null"
>
...
...
@@ -788,7 +811,7 @@
(share_id, customer_id, order_id, order_date, order_price, commission_rate, commission_amount,
fyc_rate, fyc_amount, grade_commission_rate, share_rate, referral_rate, referral_amount,
month_period, commission_type, drop_option_code, practitioner_level, is_tax, tax_amount,
net_amount, campaign_id, campaign_name, withdrawable_date, commission_payout_status,
net_amount, campaign_id, campaign_name, withdrawable_date,
payout_batch_id,
commission_payout_status,
commission_payout_at, commission_payout_by, withdrawed_id, fortune_payed_id, created_at,
created_by)
values
...
...
@@ -802,10 +825,10 @@
#{item.dropOptionCode,jdbcType=VARCHAR}, #{item.practitionerLevel,jdbcType=VARCHAR},
#{item.isTax,jdbcType=INTEGER}, #{item.taxAmount,jdbcType=DECIMAL}, #{item.netAmount,jdbcType=DECIMAL},
#{item.campaignId,jdbcType=BIGINT}, #{item.campaignName,jdbcType=VARCHAR}, #{item.withdrawableDate,jdbcType=TIMESTAMP},
#{item.
commissionPayoutStatus,jdbcType=VARCHAR}, #{item.commissionPayoutAt,jdbcType=TIMESTAMP
},
#{item.commissionPayout
By,jdbcType=BIGINT}, #{item.withdrawedId
,jdbcType=BIGINT},
#{item.
fortunePayedId,jdbcType=BIGINT}, #{item.createdAt,jdbcType=TIMESTAMP}, #{item.createdBy,jdbcType=BIGINT}
)
#{item.
payoutBatchId,jdbcType=BIGINT}, #{item.commissionPayoutStatus,jdbcType=VARCHAR
},
#{item.commissionPayout
At,jdbcType=TIMESTAMP}, #{item.commissionPayoutBy
,jdbcType=BIGINT},
#{item.
withdrawedId,jdbcType=BIGINT}, #{item.fortunePayedId,jdbcType=BIGINT}, #{item.createdAt,jdbcType=TIMESTAMP},
#{item.createdBy,jdbcType=BIGINT}
)
</foreach>
</insert>
...
...
@@ -821,7 +844,7 @@
s.practitioner_level practitionerLevelId
FROM
((ag_acl_practitioner_setting s LEFT JOIN ag_acl_practitioner p ON s.practitioner_id = p.id)
INNER JOIN (select t.* from ag_acl_customer_fortune t where t.drop_option_code =
"S01"
group by t.order_id ) f ON f.customer_id = p.customer_id)
INNER JOIN (select t.* from ag_acl_customer_fortune t where t.drop_option_code =
'S01'
group by t.order_id ) f ON f.customer_id = p.customer_id)
INNER JOIN ag_po_order o ON f.order_id = o.id
WHERE
o.status = 3 and o.order_price
>
0
...
...
@@ -845,7 +868,7 @@
<include
refid=
"Base_Column_List"
/>
from ag_acl_customer_fortune
where id in
<foreach
c
ollection=
"array"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")
"
>
<foreach
c
lose=
")"
collection=
"array"
index=
"index"
item=
"item"
open=
"("
separator=
",
"
>
#{item}
</foreach>
</select>
...
...
@@ -855,7 +878,7 @@
<include
refid=
"Base_Column_List"
/>
from ag_acl_customer_fortune
where withdrawed_id in
<foreach
c
ollection=
"list"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")
"
>
<foreach
c
lose=
")"
collection=
"list"
index=
"index"
item=
"item"
open=
"("
separator=
",
"
>
#{item}
</foreach>
</select>
...
...
yd-api/src/main/resources/mapper/customer/AclCustomerFortunePayoutBatchMapper.xml
0 → 100644
View file @
713c9cde
<?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.yd.dal.mapper.customer.AclCustomerFortunePayoutBatchMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yd.dal.entity.customer.AclCustomerFortunePayoutBatch"
>
<!--@mbg.generated-->
<!--@Table ag_acl_customer_fortune_payout_batch-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"payout_yearmonth"
jdbcType=
"VARCHAR"
property=
"payoutYearmonth"
/>
<result
column=
"created_at"
jdbcType=
"TIMESTAMP"
property=
"createdAt"
/>
<result
column=
"created_by"
jdbcType=
"BIGINT"
property=
"createdBy"
/>
<result
column=
"updated_at"
jdbcType=
"TIMESTAMP"
property=
"updatedAt"
/>
<result
column=
"updated_by"
jdbcType=
"BIGINT"
property=
"updatedBy"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
id, payout_yearmonth, created_at, created_by, updated_at, updated_by
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--@mbg.generated-->
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_customer_fortune_payout_batch
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--@mbg.generated-->
delete from ag_acl_customer_fortune_payout_batch
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclCustomerFortunePayoutBatch"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_acl_customer_fortune_payout_batch (payout_yearmonth, created_at, created_by,
updated_at, updated_by)
values (#{payoutYearmonth,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT},
#{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclCustomerFortunePayoutBatch"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_acl_customer_fortune_payout_batch
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"payoutYearmonth != null"
>
payout_yearmonth,
</if>
<if
test=
"createdAt != null"
>
created_at,
</if>
<if
test=
"createdBy != null"
>
created_by,
</if>
<if
test=
"updatedAt != null"
>
updated_at,
</if>
<if
test=
"updatedBy != null"
>
updated_by,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"payoutYearmonth != null"
>
#{payoutYearmonth,jdbcType=VARCHAR},
</if>
<if
test=
"createdAt != null"
>
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
#{createdBy,jdbcType=BIGINT},
</if>
<if
test=
"updatedAt != null"
>
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatedBy != null"
>
#{updatedBy,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.yd.dal.entity.customer.AclCustomerFortunePayoutBatch"
>
<!--@mbg.generated-->
update ag_acl_customer_fortune_payout_batch
<set>
<if
test=
"payoutYearmonth != null"
>
payout_yearmonth = #{payoutYearmonth,jdbcType=VARCHAR},
</if>
<if
test=
"createdAt != null"
>
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if
test=
"updatedAt != null"
>
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatedBy != null"
>
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.yd.dal.entity.customer.AclCustomerFortunePayoutBatch"
>
<!--@mbg.generated-->
update ag_acl_customer_fortune_payout_batch
set payout_yearmonth = #{payoutYearmonth,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
<!--@mbg.generated-->
update ag_acl_customer_fortune_payout_batch
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"payout_yearmonth = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.payoutYearmonth,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"created_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdAt,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim
prefix=
"created_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdBy,jdbcType=BIGINT}
</foreach>
</trim>
<trim
prefix=
"updated_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedAt,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim
prefix=
"updated_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedBy,jdbcType=BIGINT}
</foreach>
</trim>
</trim>
where id in
<foreach
close=
")"
collection=
"list"
item=
"item"
open=
"("
separator=
", "
>
#{item.id,jdbcType=BIGINT}
</foreach>
</update>
<update
id=
"updateBatchSelective"
parameterType=
"java.util.List"
>
<!--@mbg.generated-->
update ag_acl_customer_fortune_payout_batch
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"payout_yearmonth = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.payoutYearmonth != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.payoutYearmonth,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"created_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.createdAt != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdAt,jdbcType=TIMESTAMP}
</if>
</foreach>
</trim>
<trim
prefix=
"created_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.createdBy != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdBy,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim
prefix=
"updated_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.updatedAt != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedAt,jdbcType=TIMESTAMP}
</if>
</foreach>
</trim>
<trim
prefix=
"updated_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.updatedBy != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedBy,jdbcType=BIGINT}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach
close=
")"
collection=
"list"
item=
"item"
open=
"("
separator=
", "
>
#{item.id,jdbcType=BIGINT}
</foreach>
</update>
<insert
id=
"batchInsert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"map"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_acl_customer_fortune_payout_batch
(payout_yearmonth, created_at, created_by, updated_at, updated_by)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.payoutYearmonth,jdbcType=VARCHAR}, #{item.createdAt,jdbcType=TIMESTAMP},
#{item.createdBy,jdbcType=BIGINT}, #{item.updatedAt,jdbcType=TIMESTAMP}, #{item.updatedBy,jdbcType=BIGINT}
)
</foreach>
</insert>
<select
id=
"selectByPayoutYearmonth"
parameterType=
"string"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_customer_fortune_payout_batch
where payout_yearmonth = #{payoutBatch,jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
yd-api/src/main/resources/mapper/customer/AclCustomerFortuneWithdrawMapper.xml
View file @
713c9cde
...
...
@@ -540,15 +540,17 @@
</insert>
<select
id=
"findFinalWithdrawNoPayByCustomerIds"
parameterType=
"arraylist"
resultType=
"java.util.Map"
>
select customer_id customerId,
group_concat(id order by id) withdrawIds
from ag_acl_customer_fortune_withdraw
where customer_id in
select w.customer_id customerId,
group_concat(distinct w.id order by w.id) withdrawIds
from ag_acl_customer_fortune_withdraw w
left join ag_acl_customer_fortune f on f.withdrawed_id = w.id
where w.customer_id in
<foreach
collection=
"list"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
and is_paid != 1
group by customer_id
and w.is_paid != 1
and f.payout_batch_id = #{payoutBatchId,jdbcType=BIGINT}
group by w.customer_id
</select>
<select
id=
"findByIds"
parameterType=
"list"
resultMap=
"BaseResultMap"
>
...
...
@@ -563,7 +565,7 @@
<select
id=
"findFinalWithdrawPayByCustomerIds"
resultType=
"java.util.Map"
>
select customer_id customerId,
group_concat(id order by id) withdrawIds
group_concat(
distinct
id order by id) withdrawIds
from ag_acl_customer_fortune_withdraw
where customer_id in
<foreach
collection=
"list"
item=
"item"
separator=
","
open=
"("
close=
")"
>
...
...
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