Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-dj-strategy
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 35ec70b7
authored
Jan 23, 2026
by
杨卫
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:效果分析自测
1 parent
bad5ec52
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
10 deletions
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/TaskStrategyIssueResponse.java
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/StrategyDetailService.java
rpc-dj-strategy/src/main/resources/META-INF/orm/StrategyInfoMapper.xml
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/TaskStrategyIssueResponse.java
View file @
35ec70b
package
cn
.
com
.
glsx
.
dj
.
strategy
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
...
...
@@ -81,5 +82,6 @@ public class TaskStrategyIssueResponse implements Serializable {
example
=
"1"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
readTime
;
}
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/StrategyDetailService.java
View file @
35ec70b
...
...
@@ -2,8 +2,9 @@ package cn.com.glsx.dj.strategy.service;
import
cn.com.glsx.dj.peanalysis.dto.analysis.StrategyOrderStatisticsDTO
;
import
cn.com.glsx.dj.peanalysis.dto.analysis.StrategyOrderStatisticsRespDTO
;
import
cn.com.glsx.dj.peanalysis.enums.BusinessTypeEnum
;
import
cn.com.glsx.dj.peanalysis.remote.BiAnalyseBackgroundRemote
;
import
cn.com.glsx.dj.s
trategy.converter.StrategyInfoConverter
;
import
cn.com.glsx.dj.s
martcarlife.enums.SceneTypeEnum
;
import
cn.com.glsx.dj.strategy.dto.*
;
import
cn.com.glsx.dj.strategy.enums.DjOrderTypeEnum
;
import
cn.com.glsx.dj.strategy.enums.StrategyErrorEnum
;
...
...
@@ -23,9 +24,11 @@ import cn.com.glsx.merchants.model.response.MerchantStaffResponse;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
cn.com.glsx.scrm.equity.enums.DeleteFlagEnum
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DatePattern
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.map.MapUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.google.common.collect.Lists
;
...
...
@@ -56,7 +59,6 @@ public class StrategyDetailService {
private
final
StrategyInfoMapper
strategyInfoMapper
;
private
final
ExecutorService
strategyExecutorService
;
private
final
MerchantStaffRemote
merchantStaffRemote
;
private
final
StrategyInfoConverter
strategyInfoConverter
;
private
final
StrategyStaffRelMapper
strategyStaffRelMapper
;
private
final
BiAnalyseBackgroundRemote
biAnalyseBackgroundRemote
;
private
final
StrategyStaffMessageMapper
strategyStaffMessageMapper
;
...
...
@@ -104,7 +106,13 @@ public class StrategyDetailService {
.
andEqualTo
(
"strategyId"
,
request
.
getStrategyId
())
.
andEqualTo
(
"deletedFlag"
,
DeleteFlagEnum
.
N
.
getValue
());
List
<
StrategyStaffRel
>
strategyStaffRelList
=
strategyStaffRelMapper
.
selectByExample
(
strategyStaffRelExample
);
result
.
setExecutePersons
(
BeanUtil
.
copyToList
(
strategyStaffRelList
,
OperatorResponse
.
class
));
result
.
setExecutePersons
(
BeanUtil
.
copyToList
(
strategyStaffRelList
,
OperatorResponse
.
class
,
CopyOptions
.
create
().
setFieldMapping
(
MapUtil
.<
String
,
String
>
builder
()
.
put
(
"userUuid"
,
"uuid"
)
.
put
(
"userName"
,
"username"
).
build
())));
break
;
case
FINAL_INVENTORY:
case
POWERFUL_PROMOTION:
...
...
@@ -158,12 +166,15 @@ public class StrategyDetailService {
throw
new
RpcServiceException
(
StrategyErrorEnum
.
STRATEGY_TYPE_NOT_SUPPORTED
);
}
SceneTypeEnum
sceneTypeEnum
=
Lists
.
newArrayList
(
BusinessTypeEnum
.
BUSINESS_TYPE_1
.
getCode
(),
BusinessTypeEnum
.
BUSINESS_TYPE_3
.
getCode
()).
contains
(
ObjectUtil
.
toString
(
strategyInfo
.
getBiz
()))
?
SceneTypeEnum
.
SCENE1_0
:
SceneTypeEnum
.
SCENE1_1
;
return
StrategyOrderStatisticsDTO
.
builder
()
.
startTime
(
strategyInfo
.
getStartDate
())
.
endTime
(
strategyInfo
.
getEndDate
())
.
merchantNo
(
strategyInfo
.
getMerchantId
())
.
businessType
(
ObjectUtil
.
toString
(
strategyInfo
.
getBiz
()))
.
scene
(
ObjectUtil
.
toString
(
sceneTypeEnum
.
getValue
()))
.
djOrderTypes
(
djOrderTypes
)
.
build
();
}
...
...
rpc-dj-strategy/src/main/resources/META-INF/orm/StrategyInfoMapper.xml
View file @
35ec70b
...
...
@@ -76,7 +76,7 @@
count(distinct merchant_id) merchantCount
from dj_car_life_strategy_info
where deleted_flag = 'N'
<if
test=
"b
iz
!= null"
>
<if
test=
"b
usinessType
!= null"
>
AND biz = #{businessType}
</if>
<if
test=
"startDate != null and endDate != null and startDate != '' and endDate != ''"
>
...
...
@@ -94,8 +94,8 @@
<if
test=
"businessType != null and businessType != ''"
>
AND biz = #{businessType}
</if>
<if
test=
"startDate != null and endDate != null
and startDate != '' and endDate != ''
"
>
AND
DATE_FORMAT(created_date, '%Y%m%d')
between #{startDate} and #{endDate}
<if
test=
"startDate != null and endDate != null"
>
AND
created_date
between #{startDate} and #{endDate}
</if>
<if
test=
"uuid != null and uuid != ''"
>
and created_uuid = #{uuid}
...
...
@@ -114,8 +114,8 @@
<if
test=
"businessType != null and businessType != ''"
>
AND biz = #{businessType}
</if>
<if
test=
"startDate != null and endDate != null
and startDate != '' and endDate != ''
"
>
AND
DATE_FORMAT(created_date, '%Y%m%d')
between #{startDate} and #{endDate}
<if
test=
"startDate != null and endDate != null"
>
AND
created_date
between #{startDate} and #{endDate}
</if>
group by created_uuid order by strategyCount desc
</select>
...
...
@@ -149,8 +149,8 @@
#{merchantNo}
</foreach>
</if>
<if
test=
"startDate != null and endDate != null
and startDate != '' and endDate != ''
"
>
AND
DATE_FORMAT(created_date, '%Y%m%d')
between #{startDate} and #{endDate}
<if
test=
"startDate != null and endDate != null"
>
AND
created_date
between #{startDate} and #{endDate}
</if>
group by merchant_id order by strategyCount desc
</select>
...
...
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