Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-staff
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 314a8d33
authored
Jan 23, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提成方案:联调修复bug
1 parent
35638434
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
79 additions
and
82 deletions
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceApproveConfigDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigApprovePageDTO.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceConfigApproveService.java
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceConfigApproveMapper.xml
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceConfigApproveOperationRecordMapper.xml
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceConfigMapper.xml
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceApproveConfigDTO.java
View file @
314a8d3
...
...
@@ -7,5 +7,6 @@ import lombok.experimental.SuperBuilder;
@Data
@ToString
@SuperBuilder
@NoArgsConstructor
public
class
PerformanceApproveConfigDTO
extends
PerformanceApproveConfig
{
}
\ No newline at end of file
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigApprovePageDTO.java
View file @
314a8d3
...
...
@@ -2,13 +2,16 @@ package cn.com.glsx.dj.staff.dto.performance;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.
Data
;
import
lombok.
*
;
import
java.io.Serializable
;
import
java.util.Date
;
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
PerformanceConfigApprovePageDTO
implements
Serializable
{
private
Integer
merchantId
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
notes
=
"主键ID"
)
...
...
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceConfigApproveService.java
View file @
314a8d3
...
...
@@ -55,13 +55,20 @@ public class PerformanceConfigApproveService {
}
public
PerformanceConfigApproveDetailDTO
getPerformanceConfigApproveDetail
(
PerformanceConfigApproveDTO
dto
)
{
PerformanceConfigApproveDetailDTO
performanceConfigApproveDetail
=
performanceConfigApproveMapper
.
getPerformanceConfigApproveDetail
(
dto
);
if
(
performanceConfigApproveDetail
==
null
)
{
PerformanceConfigApproveDetailDTO
result
=
performanceConfigApproveMapper
.
getPerformanceConfigApproveDetail
(
dto
);
if
(
result
==
null
)
{
return
null
;
}
List
<
PerformanceConfigMerchantBrandRefDTO
>
performanceConfigMerchantBrandRefDTOS
=
performanceConfigMerchantBrandRefService
.
listByConfigId
(
performanceConfigApproveDetail
.
getPerformanceConfigId
());
performanceConfigApproveDetail
.
setMerchantBrandRefList
(
performanceConfigMerchantBrandRefDTOS
);
return
performanceConfigApproveDetail
;
// 获取门店品牌
List
<
PerformanceConfigMerchantBrandRefDTO
>
performanceConfigMerchantBrandRefDTOS
=
performanceConfigMerchantBrandRefService
.
listByConfigId
(
result
.
getPerformanceConfigId
());
result
.
setMerchantBrandRefList
(
performanceConfigMerchantBrandRefDTOS
);
// 获取审批记录
List
<
PerformanceConfigApproveOperationRecordDTO
>
recordDTOList
=
performanceConfigApproveOperationRecordService
.
listByPerformanceConfigApproveId
(
dto
.
getId
());
result
.
setApproveOperationRecordList
(
recordDTOList
);
// 获取审批人配置
List
<
PerformanceApproveConfigDTO
>
performanceApproveConfigDTOS
=
performanceApproveConfigService
.
listAll
();
result
.
setApproveConfigList
(
performanceApproveConfigDTOS
);
return
result
;
}
public
PerformanceConfigApprovePermissionDTO
getPerformanceConfigApproveDetailAndPermission
(
PerformanceConfigApproveDTO
dto
)
{
...
...
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceConfigApproveMapper.xml
View file @
314a8d3
...
...
@@ -20,75 +20,60 @@
<resultMap
id=
"DTOResultMap"
type=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
extends=
"BaseResultMap"
>
</resultMap>
<!-- 分页DTO结果映射:联表后完整匹配所有字段 -->
<resultMap
id=
"PageDTOResultMap"
type=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePageDTO"
>
<id
column=
"a_id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"c_scheme_name"
property=
"schemeName"
jdbcType=
"VARCHAR"
/>
<result
column=
"c_business_type"
property=
"businessType"
jdbcType=
"TINYINT"
/>
<result
column=
"c_effective_month"
property=
"effectiveMonth"
jdbcType=
"VARCHAR"
/>
<result
column=
"c_status"
property=
"status"
jdbcType=
"TINYINT"
/>
<result
column=
"a_merchant_names"
property=
"merchantNames"
jdbcType=
"VARCHAR"
/>
<result
column=
"a_brands_names"
property=
"brandsNames"
jdbcType=
"VARCHAR"
/>
<result
column=
"a_created_date"
property=
"submitDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"a_updated_date"
property=
"approveDate"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"ApproveDetailResultMap"
type=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDetailDTO"
>
<id
column=
"a_id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"a_performance_config_id"
property=
"performanceConfigId"
jdbcType=
"INTEGER"
/>
<!-- 新增的方案ID -->
<result
column=
"c_scheme_name"
property=
"schemeName"
jdbcType=
"VARCHAR"
/>
<result
column=
"c_scheme_type"
property=
"schemeType"
jdbcType=
"TINYINT"
/>
<result
column=
"c_effective_month"
property=
"effectiveMonth"
jdbcType=
"VARCHAR"
/>
</resultMap>
<resultMap
id=
"ApprovePermissionResultMap"
type=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePermissionDTO"
>
<id
column=
"a_id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"a_performance_config_id"
property=
"performanceConfigId"
jdbcType=
"INTEGER"
/>
<result
column=
"a_approve_remark"
property=
"approveRemark"
jdbcType=
"VARCHAR"
/>
<result
column=
"a_approve_attachments"
property=
"approveAttachments"
jdbcType=
"VARCHAR"
/>
<result
column=
"a_attachment_imgs"
property=
"attachmentImgs"
jdbcType=
"VARCHAR"
/>
<result
column=
"a_submit_username"
property=
"submitUsername"
jdbcType=
"VARCHAR"
/>
<result
column=
"a_approve_status"
property=
"approveStatus"
jdbcType=
"TINYINT"
/>
<result
column=
"a_merchant_names"
property=
"merchantNames"
jdbcType=
"VARCHAR"
/>
<result
column=
"a_brands_names"
property=
"brandsNames"
jdbcType=
"VARCHAR"
/>
<!-- 权限字段:1=查阅人/2=审批人/0=无权限 -->
<result
column=
"approve_permission"
property=
"approvePermission"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, performance_config_id, approve_remark, approve_attachments, attachment_imgs, submit_username,
approve_status, merchant_names, brands_names, created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
<!-- 联表查询:审批主表 + 提成方案配置表 -->
<select
id=
"listPerformanceConfig"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePageDTO"
resultMap=
"PageDTOResultMap"
>
<select
id=
"listPerformanceConfig"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePageDTO"
resultType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePageDTO"
>
SELECT
a.id AS
a_
id,
c.scheme_name AS
c_scheme_n
ame,
c.business_type AS
c_business_t
ype,
c.effective_month AS
c_effective_m
onth,
c.status AS
c_
status,
a.merchant_names AS
a_merchant_n
ames,
a.brands_names AS
a_brands_n
ames,
a.created_date AS
a_created_d
ate,
a.updated_date AS
a_updated_d
ate
a.id AS id,
c.scheme_name AS
schemeN
ame,
c.business_type AS
businessT
ype,
c.effective_month AS
effectiveM
onth,
c.status AS status,
a.merchant_names AS
merchantN
ames,
a.brands_names AS
brandsN
ames,
a.created_date AS
createdD
ate,
a.updated_date AS
updatedD
ate
FROM
dj_car_life_performance_config_approve a
LEFT JOIN dj_car_life_performance_config c
ON a.performance_config_id = c.id
AND c.deleted_flag = 'N'
LEFT JOIN dj_car_life_performance_config_merchant_brand_ref ref
ON c.id = ref.performance_config_id
AND ref.deleted_flag = 'N'
WHERE
a.deleted_flag = 'N'
<if
test=
"status != null"
>
AND c.status = #{status}
</if>
<if
test=
"businessType != null"
>
AND c.business_type = #{businessType}
</if>
<if
test=
"merchantId != null"
>
AND ref.merchant_id = #{merchantId}
</if>
GROUP BY
a.id, c.scheme_name, c.business_type, c.effective_month, c.status,
a.merchant_names, a.brands_names, a.created_date, a.updated_date
ORDER BY
a.created_date DESC
</select>
<select
id=
"getPerformanceConfigApproveDetail"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
resultMap=
"ApproveDetailResultMap"
>
<select
id=
"getPerformanceConfigApproveDetail"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
resultType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDetailDTO"
>
SELECT
a.id AS a_id,
a.performance_config_id AS a_performance_config_id,
c.scheme_name AS c_scheme_name,
c.scheme_type AS c_scheme_type,
c.effective_month AS c_effective_month
a.id AS id,
a.performance_config_id AS performanceConfigId,
c.scheme_name AS schemeName,
c.scheme_type AS schemeType,
c.effective_month AS effectiveMonth,
a.approve_remark AS approveRemark,
a.attachment_imgs AS attachment_imgs
FROM
dj_car_life_performance_config_approve a
LEFT JOIN dj_car_life_performance_config c
...
...
@@ -96,39 +81,41 @@
AND c.deleted_flag = 'N'
WHERE
a.deleted_flag = 'N'
<if
test=
"id != null"
>
AND a.id = #{id}
</if>
LIMIT 1
<if
test=
"id != null"
>
AND a.id = #{id}
</if>
LIMIT 1
</select>
<select
id=
"getPerformanceConfigApproveDetailAndPermission"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
result
Map=
"ApprovePermissionResultMap
"
>
result
Type=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePermissionDTO
"
>
SELECT
a.id AS a
_i
d,
a.performance_config_id AS
a_performance_config_i
d,
a.approve_remark AS a
_approve_r
emark,
a.approve_attachments AS a
_approve_a
ttachments,
a.attachment_imgs AS a
_attachment_i
mgs,
a.submit_username AS
a_submit_u
sername,
a.approve_status AS a
_approve_s
tatus,
a.merchant_names AS
a_merchant_n
ames,
a.brands_names AS
a_brands_n
ames,
a.id AS a
pproveI
d,
a.performance_config_id AS
performanceConfigI
d,
a.approve_remark AS a
pproveR
emark,
a.approve_attachments AS a
pproveA
ttachments,
a.attachment_imgs AS a
ttachmentI
mgs,
a.submit_username AS
submitU
sername,
a.approve_status AS a
pproveS
tatus,
a.merchant_names AS
merchantN
ames,
a.brands_names AS
brandsN
ames,
CASE
WHEN ac.approver_type IS NOT NULL THEN CAST(ac.approver_type AS CHAR)
ELSE '0'
END AS approve
_p
ermission
ELSE '0'
END AS approve
P
ermission
FROM
dj_car_life_performance_config_approve a
LEFT JOIN dj_car_life_performance_approve_config ac
ON a.performance_config_id = ac.performance_config_id
AND ac.approver_mobile = #{mobile}
AND ac.deleted_flag = 'N'
LEFT JOIN dj_car_life_performance_approve_config ac
ON a.performance_config_id = ac.performance_config_id
AND ac.approver_mobile = #{mobile}
AND ac.deleted_flag = 'N'
WHERE
a.deleted_flag = 'N'
AND a.id = #{id}
a.deleted_flag = 'N'
AND a.id = #{id}
LIMIT 1
</select>
<insert
id=
"insertOne"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
useGeneratedKeys=
"true"
...
...
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceConfigApproveOperationRecordMapper.xml
View file @
314a8d3
...
...
@@ -26,7 +26,7 @@
<sql
id=
"Base_Column_List"
>
id, performance_config_approve_id,
approve_
status, approver_type, push_status, approve_time, approve_opinion, approver_name,
id, performance_config_approve_id, status, approver_type, push_status, approve_time, approve_opinion, approver_name,
approver_mobile, created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
...
...
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceConfigMapper.xml
View file @
314a8d3
...
...
@@ -73,7 +73,6 @@
<select
id=
"listPerformanceConfig"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO"
resultType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO"
>
SELECT
c.id,
c.scheme_type,
c.scheme_name AS schemeName,
c.business_type AS businessType,
c.status,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment