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 4a4b343e
authored
Jun 24, 2026
by
chenxi
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/v5.8.3' into v5.8.3
2 parents
affa1727
752b58f2
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
431 additions
and
90 deletions
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/GoodsRespDTO.java
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/MarketingActivityCarSeriesQueryDTO.java
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/MarketingActivityCarSeriesRespDTO.java
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/MarketingActivityProductRespDTO.java
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/PackageItemRespDTO.java
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/sop/SopActionDTO.java
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/sop/SopConditionReqDTO.java
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/sop/SopConditionVariableDTO.java
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/sop/SopStrategyMetaDTO.java
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/sop/SopStrategyUpdateReqDTO.java
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/model/MarketingActivityProduct.java
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/remote/MarketingActivityRemote.java
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/job/CancelCustomerProductTagJob.java
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/mapper/MarketingActivityCarSeriesMapper.java
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/mapper/MarketingActivityProductMapper.java
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/remote/MarketingActivityRemoteImpl.java
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/CustomerTagProfileService.java
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/CustomerTagProfileSyncService.java
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/InspectionCustomerTagSyncService.java
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/MarketingActivityService.java
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/StrategySopQueryService.java
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/StrategySopService.java
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/TagCategoryService.java
rpc-dj-strategy/src/main/resources/META-INF/orm/MarketingActivityCarSeriesMapper.xml
rpc-dj-strategy/src/main/resources/META-INF/orm/MarketingActivityProductMapper.xml
rpc-dj-strategy/src/main/resources/META-INF/orm/MarketingGoodsQueryMapper.xml
rpc-dj-strategy/src/main/resources/META-INF/orm/MarketingPackageQueryMapper.xml
rpc-dj-strategy/src/main/resources/META-INF/orm/SopStrategyConditionMapper.xml
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/GoodsRespDTO.java
View file @
4a4b343
...
@@ -20,13 +20,21 @@ public class GoodsRespDTO implements Serializable {
...
@@ -20,13 +20,21 @@ public class GoodsRespDTO implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/** 产品ID(对应 upgrade_goods.commodity_code) */
@ApiModelProperty
(
notes
=
"产品ID"
)
private
String
productId
;
/** 上架商品编码 */
/** 上架商品编码 */
@ApiModelProperty
(
notes
=
"上架商品编码"
)
@ApiModelProperty
(
notes
=
"上架商品编码"
)
private
String
goodsCode
;
private
String
goodsCode
;
/** 产品名称 */
/** 产品名称
(来自 upgrade_goods.upgrade_goods_name)
*/
@ApiModelProperty
(
notes
=
"产品名称"
)
@ApiModelProperty
(
notes
=
"产品名称"
)
private
String
goodsName
;
private
String
productName
;
/** 商品别名(来自 merchant_goods_info.goods_alias) */
@ApiModelProperty
(
notes
=
"商品别名"
)
private
String
goodsAlias
;
/** 上架ID */
/** 上架ID */
@ApiModelProperty
(
notes
=
"上架ID"
)
@ApiModelProperty
(
notes
=
"上架ID"
)
...
...
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/MarketingActivityCarSeriesQueryDTO.java
0 → 100644
View file @
4a4b343
package
cn
.
com
.
glsx
.
dj
.
strategy
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* 活动车系查询请求DTO
*
* @author
* @version 1.0
* @since 2026/06/24
*/
@Data
@ApiModel
(
value
=
"活动车系查询请求"
)
public
class
MarketingActivityCarSeriesQueryDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** 活动ID */
@ApiModelProperty
(
notes
=
"活动ID"
,
required
=
true
)
private
Integer
activityId
;
/** 是否查询完整信息(含商品/套餐列表) */
@ApiModelProperty
(
notes
=
"是否查询完整信息(含商品/套餐列表),默认false"
)
private
Boolean
includeDetail
=
false
;
}
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/MarketingActivityCarSeriesRespDTO.java
0 → 100644
View file @
4a4b343
package
cn
.
com
.
glsx
.
dj
.
strategy
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 活动车系响应DTO(含可选的商品/套餐详情列表)
*
* @author
* @version 1.0
* @since 2026/06/24
*/
@Data
@ApiModel
(
value
=
"活动车系响应"
)
public
class
MarketingActivityCarSeriesRespDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** 车系关联ID */
@ApiModelProperty
(
notes
=
"车系关联ID"
)
private
Integer
id
;
/** 活动ID */
@ApiModelProperty
(
notes
=
"活动ID"
)
private
Integer
activityId
;
/** 品牌ID(一级) */
@ApiModelProperty
(
notes
=
"品牌ID(一级)"
)
private
Integer
brandId
;
/** 品牌名称 */
@ApiModelProperty
(
notes
=
"品牌名称"
)
private
String
brandName
;
/** 子品牌ID(二级) */
@ApiModelProperty
(
notes
=
"子品牌ID(二级)"
)
private
Integer
childId
;
/** 子品牌名称 */
@ApiModelProperty
(
notes
=
"子品牌名称"
)
private
String
childName
;
/** 车系ID(三级) */
@ApiModelProperty
(
notes
=
"车系ID(三级)"
)
private
Integer
carSeriesId
;
/** 车系名称 */
@ApiModelProperty
(
notes
=
"车系名称"
)
private
String
carSeriesName
;
/** 商品列表(includeDetail=true 时有值) */
@ApiModelProperty
(
notes
=
"商品列表(仅 includeDetail=true 时返回)"
)
private
List
<
MarketingActivityProductRespDTO
>
goodsList
;
/** 套餐列表(includeDetail=true 时有值) */
@ApiModelProperty
(
notes
=
"套餐列表(仅 includeDetail=true 时返回)"
)
private
List
<
MarketingActivityProductRespDTO
>
packageList
;
}
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/MarketingActivityProductRespDTO.java
View file @
4a4b343
...
@@ -41,6 +41,10 @@ public class MarketingActivityProductRespDTO implements Serializable {
...
@@ -41,6 +41,10 @@ public class MarketingActivityProductRespDTO implements Serializable {
@ApiModelProperty
(
notes
=
"商品类型名称(仅GOODS类型有值)"
)
@ApiModelProperty
(
notes
=
"商品类型名称(仅GOODS类型有值)"
)
private
String
goodsTypeName
;
private
String
goodsTypeName
;
/** 商品名称或套餐名称 */
@ApiModelProperty
(
notes
=
"商品名称或套餐名称"
)
private
String
productName
;
/** 上架商品编码 */
/** 上架商品编码 */
@ApiModelProperty
(
notes
=
"上架商品编码"
)
@ApiModelProperty
(
notes
=
"上架商品编码"
)
private
String
goodsCode
;
private
String
goodsCode
;
...
...
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/PackageItemRespDTO.java
View file @
4a4b343
...
@@ -20,13 +20,25 @@ public class PackageItemRespDTO implements Serializable {
...
@@ -20,13 +20,25 @@ public class PackageItemRespDTO implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/** 产品ID(对应 upgrade_goods.commodity_code) */
@ApiModelProperty
(
notes
=
"产品ID"
)
private
String
productId
;
/** 子商品编码 */
/** 子商品编码 */
@ApiModelProperty
(
notes
=
"子商品编码"
)
@ApiModelProperty
(
notes
=
"子商品编码"
)
private
String
goodsCode
;
private
String
goodsCode
;
/** 子商品名称 */
/** 产品名称(来自 upgrade_goods.upgrade_goods_name) */
@ApiModelProperty
(
notes
=
"子商品名称"
)
@ApiModelProperty
(
notes
=
"产品名称"
)
private
String
goodsName
;
private
String
productName
;
/** 商品别名(来自 merchant_goods_info.goods_alias) */
@ApiModelProperty
(
notes
=
"商品别名"
)
private
String
goodsAlias
;
/** 上架ID */
@ApiModelProperty
(
notes
=
"上架ID"
)
private
String
listingId
;
/** 子商品现售价 */
/** 子商品现售价 */
@ApiModelProperty
(
notes
=
"子商品现售价"
)
@ApiModelProperty
(
notes
=
"子商品现售价"
)
...
...
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/sop/SopActionDTO.java
View file @
4a4b343
...
@@ -2,6 +2,7 @@ package cn.com.glsx.dj.strategy.dto.sop;
...
@@ -2,6 +2,7 @@ package cn.com.glsx.dj.strategy.dto.sop;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
javax.persistence.Column
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.List
;
...
@@ -39,6 +40,9 @@ public class SopActionDTO implements Serializable {
...
@@ -39,6 +40,9 @@ public class SopActionDTO implements Serializable {
@ApiModelProperty
(
notes
=
"素材间隔(像素)(消息类型为4时使用)"
)
@ApiModelProperty
(
notes
=
"素材间隔(像素)(消息类型为4时使用)"
)
private
Integer
intervalPx
;
private
Integer
intervalPx
;
@ApiModelProperty
(
notes
=
"网页描述(消息类型为4时使用)"
)
private
String
pageDesc
;
@ApiModelProperty
(
notes
=
"素材列表"
)
@ApiModelProperty
(
notes
=
"素材列表"
)
private
List
<
SopActionMediaDTO
>
medias
;
private
List
<
SopActionMediaDTO
>
medias
;
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/sop/SopConditionReqDTO.java
View file @
4a4b343
...
@@ -31,7 +31,7 @@ public class SopConditionReqDTO implements Serializable {
...
@@ -31,7 +31,7 @@ public class SopConditionReqDTO implements Serializable {
private
BigDecimal
numberValue
;
private
BigDecimal
numberValue
;
@ApiModelProperty
(
value
=
"日期值"
)
@ApiModelProperty
(
value
=
"日期值"
)
private
Date
dateValue
;
private
String
dateValue
;
@ApiModelProperty
(
value
=
"枚举值(值类型为4时使用,多个值用逗号分隔)"
)
@ApiModelProperty
(
value
=
"枚举值(值类型为4时使用,多个值用逗号分隔)"
)
private
String
enumValue
;
private
String
enumValue
;
...
...
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/sop/SopConditionVariableDTO.java
View file @
4a4b343
...
@@ -43,7 +43,7 @@ public class SopConditionVariableDTO implements Serializable {
...
@@ -43,7 +43,7 @@ public class SopConditionVariableDTO implements Serializable {
private
List
<
SopEnumValueDTO
>
enumValues
;
private
List
<
SopEnumValueDTO
>
enumValues
;
@ApiModelProperty
(
notes
=
"可用操作符列表"
)
@ApiModelProperty
(
notes
=
"可用操作符列表"
)
private
List
<
SopStrategyMetaDTO
.
SopMetaItemDTO
>
operators
;
private
List
<
SopStrategyMetaDTO
.
SopMetaItemDTO
Int
>
operators
;
@ApiModelProperty
(
notes
=
"可选的变量列表"
)
@ApiModelProperty
(
notes
=
"可选的变量列表"
)
private
List
<
SopConditionVariableDTO
>
sopConditionVariableDTOList
;
private
List
<
SopConditionVariableDTO
>
sopConditionVariableDTOList
;
...
...
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/sop/SopStrategyMetaDTO.java
View file @
4a4b343
...
@@ -45,4 +45,23 @@ public class SopStrategyMetaDTO implements Serializable {
...
@@ -45,4 +45,23 @@ public class SopStrategyMetaDTO implements Serializable {
@ApiModelProperty
(
notes
=
"描述"
)
@ApiModelProperty
(
notes
=
"描述"
)
private
String
description
;
private
String
description
;
}
}
/**
* 元数据项DTO
*/
@Data
public
static
class
SopMetaItemDTOInt
implements
Serializable
{
@ApiModelProperty
(
notes
=
"编码"
)
private
Integer
code
;
@ApiModelProperty
(
notes
=
"名称"
)
private
String
name
;
@ApiModelProperty
(
notes
=
"类型"
)
private
Integer
type
;
@ApiModelProperty
(
notes
=
"描述"
)
private
String
description
;
}
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/sop/SopStrategyUpdateReqDTO.java
View file @
4a4b343
...
@@ -13,37 +13,37 @@ public class SopStrategyUpdateReqDTO implements Serializable {
...
@@ -13,37 +13,37 @@ public class SopStrategyUpdateReqDTO implements Serializable {
@ApiModelProperty
(
value
=
"策略ID"
)
@ApiModelProperty
(
value
=
"策略ID"
)
private
Integer
strategyId
;
private
Integer
strategyId
;
@ApiModelProperty
(
value
=
"策略名称"
)
@ApiModelProperty
(
notes
=
"场景大类"
,
required
=
true
)
private
String
strategyName
;
@ApiModelProperty
(
value
=
"业务类型:1-轻改"
)
private
Integer
bizType
;
private
Integer
bizType
;
@ApiModelProperty
(
value
=
"门店范围类型:1-指定门店 2-全部门店"
)
@ApiModelProperty
(
notes
=
"适用门店类型(0不限/1指定门店)"
,
required
=
true
)
private
Integer
storeScopeType
;
private
Integer
storeScopeType
;
@ApiModelProperty
(
value
=
"营销阶段:关联sop_strategy_meta_marketing_stage.stage_code"
)
@ApiModelProperty
(
notes
=
"营销阶段(stage_code)"
,
required
=
true
)
private
String
marketingStage
;
private
String
marketingStage
;
@ApiModelProperty
(
value
=
"触发类型:关联sop_strategy_meta_trigger.trigger_code"
)
@ApiModelProperty
(
notes
=
"触发类型(trigger_code)"
,
required
=
true
)
private
String
triggerType
;
private
String
triggerType
;
@ApiModelProperty
(
value
=
"日期变量类型:关联sop_strategy_meta_date_variable.date_code"
)
@ApiModelProperty
(
notes
=
"客户行为类型"
)
private
Integer
customerBehaviorType
;
@ApiModelProperty
(
notes
=
"日期变量类型(date_code)"
)
private
String
dateVariableType
;
private
String
dateVariableType
;
@ApiModelProperty
(
notes
=
"相对日期类型(0提前/1当前/2推后)"
)
@ApiModelProperty
(
notes
=
"相对日期类型(0提前/1当前/2推后)"
)
private
Integer
relativeDateType
;
private
Integer
relativeDateType
;
@ApiModelProperty
(
value
=
"相对天数(相对日期类型时使用)
"
)
@ApiModelProperty
(
notes
=
"相对天数
"
)
private
Integer
relativeDays
;
private
Integer
relativeDays
;
@ApiModelProperty
(
value
=
"触发小时"
)
@ApiModelProperty
(
notes
=
"触发小时"
)
private
Integer
triggerHour
;
private
Integer
triggerHour
;
@ApiModelProperty
(
value
=
"触发分钟"
)
@ApiModelProperty
(
notes
=
"触发分钟"
)
private
Integer
triggerMinute
;
private
Integer
triggerMinute
;
@ApiModelProperty
(
value
=
"确认类型(0自动执行/1人工确认)"
)
@ApiModelProperty
(
notes
=
"确认类型(0自动执行/1人工确认)"
,
required
=
true
)
private
Integer
actionConfirmType
;
private
Integer
actionConfirmType
;
@ApiModelProperty
(
value
=
"门店ID列表"
)
@ApiModelProperty
(
value
=
"门店ID列表"
)
...
...
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/model/MarketingActivityProduct.java
View file @
4a4b343
...
@@ -76,6 +76,12 @@ public class MarketingActivityProduct implements Serializable {
...
@@ -76,6 +76,12 @@ public class MarketingActivityProduct implements Serializable {
private
String
goodsTypeName
;
private
String
goodsTypeName
;
/**
/**
* 商品名称或套餐名称
*/
@Column
(
name
=
"product_name"
)
private
String
productName
;
/**
* 选项卡名称
* 选项卡名称
*/
*/
@Column
(
name
=
"tab_name"
)
@Column
(
name
=
"tab_name"
)
...
...
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/remote/MarketingActivityRemote.java
View file @
4a4b343
package
cn
.
com
.
glsx
.
dj
.
strategy
.
remote
;
package
cn
.
com
.
glsx
.
dj
.
strategy
.
remote
;
import
cn.com.glsx.dj.strategy.dto.*
;
import
cn.com.glsx.dj.strategy.dto.*
;
import
cn.com.glsx.dj.strategy.model.MarketingActivityCarSeries
;
import
cn.com.glsx.dj.strategy.model.MarketingActivityProduct
;
import
cn.com.glsx.dj.strategy.model.MarketingActivityProduct
;
import
cn.com.glsx.framework.core.annotation.ApiMethod
;
import
cn.com.glsx.framework.core.annotation.ApiMethod
;
import
cn.com.glsx.framework.core.annotation.ApiParam
;
import
cn.com.glsx.framework.core.annotation.ApiParam
;
...
@@ -54,9 +53,9 @@ public interface MarketingActivityRemote {
...
@@ -54,9 +53,9 @@ public interface MarketingActivityRemote {
RpcResponse
<
RpcPagination
<
OperationLogVO
>>
logs
(
RpcPagination
<
MarketingActivityLogPageReqDTO
>
pagination
);
RpcResponse
<
RpcPagination
<
OperationLogVO
>>
logs
(
RpcPagination
<
MarketingActivityLogPageReqDTO
>
pagination
);
@ApiMethod
(
"查询活动关联车系"
)
@ApiMethod
(
"查询活动关联车系"
)
@ApiParam
(
name
=
"
activityId"
,
notes
=
"活动ID"
,
dataType
=
ApiParam
.
DataTypeEnum
.
IN
T
,
required
=
true
)
@ApiParam
(
name
=
"
query"
,
notes
=
"查询条件"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJEC
T
,
required
=
true
)
@ApiResponse
(
"车系列表"
)
@ApiResponse
(
"车系列表
(含可选商品/套餐详情)
"
)
RpcResponse
<
List
<
MarketingActivityCarSeries
>>
carSeries
(
Integer
activityId
);
RpcResponse
<
List
<
MarketingActivityCarSeries
RespDTO
>>
carSeries
(
MarketingActivityCarSeriesQueryDTO
query
);
@ApiMethod
(
"编辑营销活动"
)
@ApiMethod
(
"编辑营销活动"
)
@ApiParam
(
name
=
"request"
,
notes
=
"编辑请求"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiParam
(
name
=
"request"
,
notes
=
"编辑请求"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
...
...
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/job/CancelCustomerProductTagJob.java
View file @
4a4b343
...
@@ -7,9 +7,9 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -7,9 +7,9 @@ import lombok.extern.slf4j.Slf4j;
import
org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf
;
import
org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
/**
/**
* @ClassName CancelCustomerProductTagJob
* @ClassName CancelCustomerProductTagJob
* @Description 取消客户产品标签任务 - 1
5
日退单数据
* @Description 取消客户产品标签任务 - 1
6
日退单数据
* @Author lqWang
* @Author lqWang
* @Date 2026/6/23 10:16
* @Date 2026/6/23 10:16
*/
*/
...
...
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/mapper/MarketingActivityCarSeriesMapper.java
View file @
4a4b343
package
cn
.
com
.
glsx
.
dj
.
strategy
.
mapper
;
package
cn
.
com
.
glsx
.
dj
.
strategy
.
mapper
;
import
cn.com.glsx.dj.strategy.dto.MarketingActivityCarSeriesRespDTO
;
import
cn.com.glsx.dj.strategy.model.MarketingActivityCarSeries
;
import
cn.com.glsx.dj.strategy.model.MarketingActivityCarSeries
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -18,9 +19,9 @@ import java.util.List;
...
@@ -18,9 +19,9 @@ import java.util.List;
public
interface
MarketingActivityCarSeriesMapper
extends
OreMapper
<
MarketingActivityCarSeries
>
{
public
interface
MarketingActivityCarSeriesMapper
extends
OreMapper
<
MarketingActivityCarSeries
>
{
/**
/**
* 按活动ID查询车系列表
* 按活动ID查询车系列表
(返回 DTO,可配合 includeDetail 使用)
*/
*/
List
<
MarketingActivityCarSeries
>
selectByActivityId
(
@Param
(
"activityId"
)
Integer
activityId
);
List
<
MarketingActivityCarSeries
RespDTO
>
selectByActivityId
(
@Param
(
"activityId"
)
Integer
activityId
);
/**
/**
* 按活动ID删除所有车系关联(逻辑删除)
* 按活动ID删除所有车系关联(逻辑删除)
...
...
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/mapper/MarketingActivityProductMapper.java
View file @
4a4b343
...
@@ -37,6 +37,11 @@ public interface MarketingActivityProductMapper extends OreMapper<MarketingActiv
...
@@ -37,6 +37,11 @@ public interface MarketingActivityProductMapper extends OreMapper<MarketingActiv
List
<
MarketingActivityProduct
>
selectByActivityIds
(
@Param
(
"activityIds"
)
List
<
Integer
>
activityIds
);
List
<
MarketingActivityProduct
>
selectByActivityIds
(
@Param
(
"activityIds"
)
List
<
Integer
>
activityIds
);
/**
/**
* 级联查询商品/套餐 + 套餐子商品(LEFT JOIN product_item,含 items 集合)
*/
List
<
MarketingActivityProductRespDTO
>
selectProductWithItemsByActivityId
(
@Param
(
"activityId"
)
Integer
activityId
);
/**
* 按门店+商品编码查询有效活动商品
* 按门店+商品编码查询有效活动商品
*/
*/
List
<
MarketingActivityProduct
>
selectActiveByMerchantIdAndGoodsCodes
(
List
<
MarketingActivityProduct
>
selectActiveByMerchantIdAndGoodsCodes
(
...
...
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/remote/MarketingActivityRemoteImpl.java
View file @
4a4b343
package
cn
.
com
.
glsx
.
dj
.
strategy
.
remote
;
package
cn
.
com
.
glsx
.
dj
.
strategy
.
remote
;
import
cn.com.glsx.dj.strategy.dto.*
;
import
cn.com.glsx.dj.strategy.dto.*
;
import
cn.com.glsx.dj.strategy.model.MarketingActivityCarSeries
;
import
cn.com.glsx.dj.strategy.model.MarketingActivityProduct
;
import
cn.com.glsx.dj.strategy.model.MarketingActivityProduct
;
import
cn.com.glsx.dj.strategy.service.MarketingActivityService
;
import
cn.com.glsx.dj.strategy.service.MarketingActivityService
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
...
@@ -110,9 +109,9 @@ public class MarketingActivityRemoteImpl implements MarketingActivityRemote {
...
@@ -110,9 +109,9 @@ public class MarketingActivityRemoteImpl implements MarketingActivityRemote {
}
}
@Override
@Override
public
RpcResponse
<
List
<
MarketingActivityCarSeries
>>
carSeries
(
Integer
activityId
)
{
public
RpcResponse
<
List
<
MarketingActivityCarSeries
RespDTO
>>
carSeries
(
MarketingActivityCarSeriesQueryDTO
query
)
{
try
{
try
{
List
<
MarketingActivityCarSeries
>
result
=
marketingActivityService
.
carSeries
(
activityId
);
List
<
MarketingActivityCarSeries
RespDTO
>
result
=
marketingActivityService
.
carSeries
(
query
);
return
RpcResponse
.
success
(
result
);
return
RpcResponse
.
success
(
result
);
}
catch
(
RpcServiceException
e
)
{
}
catch
(
RpcServiceException
e
)
{
log
.
error
(
"查询活动车系发生业务异常"
,
e
);
log
.
error
(
"查询活动车系发生业务异常"
,
e
);
...
...
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/CustomerTagProfileService.java
View file @
4a4b343
...
@@ -28,6 +28,7 @@ import java.util.List;
...
@@ -28,6 +28,7 @@ import java.util.List;
public
class
CustomerTagProfileService
{
public
class
CustomerTagProfileService
{
private
static
final
String
CATEGORY_CODE_INIT
=
"INIT_C1"
;
private
static
final
String
CATEGORY_CODE_INIT
=
"INIT_C1"
;
private
static
final
String
DIMENSION_CODE_INIT
=
"INIT_D1"
;
private
static
final
String
SOURCE_TYPE_ARCHIVE
=
"ARCHIVE"
;
private
static
final
String
SOURCE_TYPE_ARCHIVE
=
"ARCHIVE"
;
private
static
final
int
DEFAULT_SCORE
=
1
;
private
static
final
int
DEFAULT_SCORE
=
1
;
...
@@ -73,7 +74,7 @@ public class CustomerTagProfileService {
...
@@ -73,7 +74,7 @@ public class CustomerTagProfileService {
CustomerTagProfile
profile
=
new
CustomerTagProfile
();
CustomerTagProfile
profile
=
new
CustomerTagProfile
();
profile
.
setPhone
(
phone
);
profile
.
setPhone
(
phone
);
profile
.
setCategoryCode
(
CATEGORY_CODE_INIT
);
profile
.
setCategoryCode
(
CATEGORY_CODE_INIT
);
profile
.
setDimensionCode
(
null
);
profile
.
setDimensionCode
(
DIMENSION_CODE_INIT
);
profile
.
setEnumCode
(
tagEnum
.
getEnumCode
());
profile
.
setEnumCode
(
tagEnum
.
getEnumCode
());
profile
.
setScoreBasis
(
buildScoreBasis
(
tagEnum
,
carSeriesDetail
,
avgPrice
));
profile
.
setScoreBasis
(
buildScoreBasis
(
tagEnum
,
carSeriesDetail
,
avgPrice
));
profile
.
setScore
(
DEFAULT_SCORE
);
profile
.
setScore
(
DEFAULT_SCORE
);
...
...
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/CustomerTagProfileSyncService.java
View file @
4a4b343
...
@@ -10,8 +10,8 @@ import cn.com.glsx.dj.strategy.util.GopApiUtil;
...
@@ -10,8 +10,8 @@ import cn.com.glsx.dj.strategy.util.GopApiUtil;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
...
@@ -28,7 +28,6 @@ import java.util.List;
...
@@ -28,7 +28,6 @@ import java.util.List;
*/
*/
@Slf4j
@Slf4j
@Service
@Service
@RequiredArgsConstructor
public
class
CustomerTagProfileSyncService
{
public
class
CustomerTagProfileSyncService
{
/**
/**
...
@@ -36,6 +35,8 @@ public class CustomerTagProfileSyncService {
...
@@ -36,6 +35,8 @@ public class CustomerTagProfileSyncService {
*/
*/
private
static
final
String
CATEGORY_CODE_INIT
=
"INIT_C1"
;
private
static
final
String
CATEGORY_CODE_INIT
=
"INIT_C1"
;
private
static
final
String
DIMENSION_CODE_INIT
=
"INIT_D1"
;
/**
/**
* 来源类型 - 建档同步
* 来源类型 - 建档同步
*/
*/
...
@@ -51,8 +52,10 @@ public class CustomerTagProfileSyncService {
...
@@ -51,8 +52,10 @@ public class CustomerTagProfileSyncService {
*/
*/
private
static
final
int
DEFAULT_SCORE
=
1
;
private
static
final
int
DEFAULT_SCORE
=
1
;
private
final
CustomerInfoRemote
customerInfoRemote
;
@Autowired
private
final
CustomerTagProfileMapper
customerTagProfileMapper
;
private
CustomerInfoRemote
customerInfoRemote
;
@Autowired
private
CustomerTagProfileMapper
customerTagProfileMapper
;
/**
/**
* 执行客户标签画像全量同步
* 执行客户标签画像全量同步
...
@@ -110,7 +113,8 @@ public class CustomerTagProfileSyncService {
...
@@ -110,7 +113,8 @@ public class CustomerTagProfileSyncService {
RpcPagination
<
CustomerProfileInfoDTO
>
pagination
=
new
RpcPagination
<>();
RpcPagination
<
CustomerProfileInfoDTO
>
pagination
=
new
RpcPagination
<>();
pagination
.
setList
(
new
ArrayList
<>());
pagination
.
setList
(
new
ArrayList
<>());
pagination
.
setPageSize
(
PAGE_SIZE
);
pagination
.
setPageNum
(
pageNum
);
RpcResponse
<
RpcPagination
<
CustomerProfileInfoDTO
>>
response
=
customerInfoRemote
.
pageCustomerProfileInfo
(
pagination
);
RpcResponse
<
RpcPagination
<
CustomerProfileInfoDTO
>>
response
=
customerInfoRemote
.
pageCustomerProfileInfo
(
pagination
);
if
(
response
.
isFailed
())
{
if
(
response
.
isFailed
())
{
log
.
error
(
"查询客户画像信息失败: {}"
,
response
.
getMessage
());
log
.
error
(
"查询客户画像信息失败: {}"
,
response
.
getMessage
());
...
@@ -211,7 +215,7 @@ public class CustomerTagProfileSyncService {
...
@@ -211,7 +215,7 @@ public class CustomerTagProfileSyncService {
CustomerTagProfile
profile
=
new
CustomerTagProfile
();
CustomerTagProfile
profile
=
new
CustomerTagProfile
();
profile
.
setPhone
(
phone
);
profile
.
setPhone
(
phone
);
profile
.
setCategoryCode
(
CATEGORY_CODE_INIT
);
profile
.
setCategoryCode
(
CATEGORY_CODE_INIT
);
profile
.
setDimensionCode
(
null
);
profile
.
setDimensionCode
(
DIMENSION_CODE_INIT
);
profile
.
setEnumCode
(
tagEnum
.
getEnumCode
());
profile
.
setEnumCode
(
tagEnum
.
getEnumCode
());
profile
.
setScoreBasis
(
buildScoreBasis
(
tagEnum
,
carSeriesDetail
,
avgPrice
));
profile
.
setScoreBasis
(
buildScoreBasis
(
tagEnum
,
carSeriesDetail
,
avgPrice
));
profile
.
setScore
(
DEFAULT_SCORE
);
profile
.
setScore
(
DEFAULT_SCORE
);
...
...
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/InspectionCustomerTagSyncService.java
View file @
4a4b343
...
@@ -34,6 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -34,6 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
tk.mybatis.mapper.entity.Example
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.time.format.DateTimeFormatter
;
...
@@ -41,8 +42,6 @@ import java.util.*;
...
@@ -41,8 +42,6 @@ import java.util.*;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
tk.mybatis.mapper.entity.Example
;
/**
/**
* 客户标签同步服务
* 客户标签同步服务
* 从 AI 分析服务同步客户标签数据到客户标签画像表
* 从 AI 分析服务同步客户标签数据到客户标签画像表
...
@@ -178,10 +177,13 @@ public class InspectionCustomerTagSyncService {
...
@@ -178,10 +177,13 @@ public class InspectionCustomerTagSyncService {
query
.
setCategoryCode
(
CATEGORY_CODE_BEHAVIOR_TAG
);
query
.
setCategoryCode
(
CATEGORY_CODE_BEHAVIOR_TAG
);
TagCategoryDimensionRespDTO
categoryData
=
tagCategoryService
.
queryCategoryWithDimensions
(
query
);
TagCategoryDimensionRespDTO
categoryData
=
tagCategoryService
.
queryCategoryWithDimensions
(
query
);
List
<
TagCategoryDimensionRespDTO
>
all
=
tagCategoryService
.
listALL
();
// 初始化分类代码缓存
// 初始化分类代码缓存
categoryCodeCache
=
new
ConcurrentHashMap
<>();
categoryCodeCache
=
new
ConcurrentHashMap
<>();
categoryCodeCache
.
put
(
categoryData
.
getId
(),
categoryData
.
getCategoryCode
());
categoryCodeCache
.
put
(
categoryData
.
getId
(),
categoryData
.
getCategoryCode
());
for
(
TagCategoryDimensionRespDTO
tagCategoryDimensionRespDTO
:
all
)
{
categoryCodeCache
.
put
(
tagCategoryDimensionRespDTO
.
getId
(),
tagCategoryDimensionRespDTO
.
getCategoryCode
());
}
// 初始化维度缓存和枚举缓存
// 初始化维度缓存和枚举缓存
dimensionCache
=
new
ConcurrentHashMap
<>();
dimensionCache
=
new
ConcurrentHashMap
<>();
...
@@ -224,6 +226,8 @@ public class InspectionCustomerTagSyncService {
...
@@ -224,6 +226,8 @@ public class InspectionCustomerTagSyncService {
private
TagDimension
convertToDimensionEntity
(
TagDimensionRespDTO
dto
)
{
private
TagDimension
convertToDimensionEntity
(
TagDimensionRespDTO
dto
)
{
TagDimension
entity
=
new
TagDimension
();
TagDimension
entity
=
new
TagDimension
();
entity
.
setId
(
dto
.
getId
());
entity
.
setId
(
dto
.
getId
());
entity
.
setCategoryId
(
dto
.
getCategoryId
());
entity
.
setCategoryName
(
dto
.
getCategoryName
());
entity
.
setDimensionCode
(
dto
.
getDimensionCode
());
entity
.
setDimensionCode
(
dto
.
getDimensionCode
());
entity
.
setDimensionName
(
dto
.
getDimensionName
());
entity
.
setDimensionName
(
dto
.
getDimensionName
());
entity
.
setCategoryId
(
dto
.
getCategoryId
());
entity
.
setCategoryId
(
dto
.
getCategoryId
());
...
@@ -556,11 +560,11 @@ public class InspectionCustomerTagSyncService {
...
@@ -556,11 +560,11 @@ public class InspectionCustomerTagSyncService {
//车衣大类
//车衣大类
String
carCoverTypesStr
=
OrePropertyConfigurer
.
getString
(
"smartcarlife.customer.tag.goodsType.carCover"
,
"4,12,161,14,6,162,127"
);
String
carCoverTypesStr
=
OrePropertyConfigurer
.
getString
(
"smartcarlife.customer.tag.goodsType.carCover"
,
"4,12,161,14,6,162,127"
);
//电动踏板
//电动踏板
Integer
electricPedalTypeId
=
OrePropertyConfigurer
.
getProperty
(
"smartcarlife.customer.tag.goodsType.electricPedal"
,
Integer
.
class
,
163
);
String
electricPedalTypesStr
=
OrePropertyConfigurer
.
getString
(
"smartcarlife.customer.tag.goodsType.electricPedal"
,
"163"
);
//底盘护板
//底盘护板
String
groundGuardBoardTypesStr
=
OrePropertyConfigurer
.
getString
(
"smartcarlife.customer.tag.goodsType.groundGuardBoard"
,
"129,166"
);
String
groundGuardBoardTypesStr
=
OrePropertyConfigurer
.
getString
(
"smartcarlife.customer.tag.goodsType.groundGuardBoard"
,
"129,166"
);
//小桌板
//小桌板
Integer
smallTableBoardId
=
OrePropertyConfigurer
.
getProperty
(
"smartcarlife.customer.tag.goodsType.smallTableBoard"
,
Integer
.
class
,
167
);
String
smallTableBoardTypesStr
=
OrePropertyConfigurer
.
getString
(
"smartcarlife.customer.tag.goodsType.smallTableBoard"
,
"167"
);
//脚垫
//脚垫
String
footMatTypesStr
=
OrePropertyConfigurer
.
getString
(
"smartcarlife.customer.tag.goodsType.footMat"
,
"2,125,130"
);
String
footMatTypesStr
=
OrePropertyConfigurer
.
getString
(
"smartcarlife.customer.tag.goodsType.footMat"
,
"2,125,130"
);
...
@@ -603,9 +607,9 @@ public class InspectionCustomerTagSyncService {
...
@@ -603,9 +607,9 @@ public class InspectionCustomerTagSyncService {
// 3. 品类ID集合 → 产品标签枚举映射
// 3. 品类ID集合 → 产品标签枚举映射
Set
<
Integer
>
solarFilmTypes
=
parseTypeIds
(
solarFilmTypesStr
);
Set
<
Integer
>
solarFilmTypes
=
parseTypeIds
(
solarFilmTypesStr
);
Set
<
Integer
>
carCoverTypes
=
parseTypeIds
(
carCoverTypesStr
);
Set
<
Integer
>
carCoverTypes
=
parseTypeIds
(
carCoverTypesStr
);
Set
<
Integer
>
electricPedalTypes
=
parseTypeIds
(
String
.
valueOf
(
electricPedalTypeId
)
);
Set
<
Integer
>
electricPedalTypes
=
parseTypeIds
(
electricPedalTypesStr
);
Set
<
Integer
>
groundGuardBoardTypes
=
parseTypeIds
(
groundGuardBoardTypesStr
);
Set
<
Integer
>
groundGuardBoardTypes
=
parseTypeIds
(
groundGuardBoardTypesStr
);
Set
<
Integer
>
smallTableBoardTypes
=
parseTypeIds
(
String
.
valueOf
(
smallTableBoardId
)
);
Set
<
Integer
>
smallTableBoardTypes
=
parseTypeIds
(
smallTableBoardTypesStr
);
Set
<
Integer
>
footMatTypes
=
parseTypeIds
(
footMatTypesStr
);
Set
<
Integer
>
footMatTypes
=
parseTypeIds
(
footMatTypesStr
);
Map
<
Set
<
Integer
>,
String
>
goodsTypeEnumMap
=
new
LinkedHashMap
<>();
Map
<
Set
<
Integer
>,
String
>
goodsTypeEnumMap
=
new
LinkedHashMap
<>();
...
@@ -692,7 +696,7 @@ public class InspectionCustomerTagSyncService {
...
@@ -692,7 +696,7 @@ public class InspectionCustomerTagSyncService {
}
}
/**
/**
* @description: 取消客户产品标签 - 默认1
5
天内退款订单
* @description: 取消客户产品标签 - 默认1
6
天内退款订单
* @param: [jobParameter]
* @param: [jobParameter]
* @return: void
* @return: void
* @author: lqWang
* @author: lqWang
...
@@ -709,7 +713,7 @@ public class InspectionCustomerTagSyncService {
...
@@ -709,7 +713,7 @@ public class InspectionCustomerTagSyncService {
if
(
StrUtil
.
isBlank
(
jobParameter
))
{
if
(
StrUtil
.
isBlank
(
jobParameter
))
{
endLocalDate
=
LocalDate
.
now
();
endLocalDate
=
LocalDate
.
now
();
startLocalDate
=
endLocalDate
.
minusDays
(
1
5
);
startLocalDate
=
endLocalDate
.
minusDays
(
1
6
);
}
else
{
}
else
{
JSONObject
params
=
JSONUtil
.
parseObj
(
jobParameter
);
JSONObject
params
=
JSONUtil
.
parseObj
(
jobParameter
);
String
startDateStr
=
params
.
getStr
(
"startDate"
);
String
startDateStr
=
params
.
getStr
(
"startDate"
);
...
@@ -745,19 +749,19 @@ public class InspectionCustomerTagSyncService {
...
@@ -745,19 +749,19 @@ public class InspectionCustomerTagSyncService {
//车衣大类
//车衣大类
String
carCoverTypesStr
=
OrePropertyConfigurer
.
getString
(
"smartcarlife.customer.tag.goodsType.carCover"
,
"4,12,161,14,6,162,127"
);
String
carCoverTypesStr
=
OrePropertyConfigurer
.
getString
(
"smartcarlife.customer.tag.goodsType.carCover"
,
"4,12,161,14,6,162,127"
);
//电动踏板
//电动踏板
Integer
electricPedalTypeId
=
OrePropertyConfigurer
.
getProperty
(
"smartcarlife.customer.tag.goodsType.electricPedal"
,
Integer
.
class
,
163
);
String
electricPedalTypesStr
=
OrePropertyConfigurer
.
getString
(
"smartcarlife.customer.tag.goodsType.electricPedal"
,
"163"
);
//底盘护板
//底盘护板
String
groundGuardBoardTypesStr
=
OrePropertyConfigurer
.
getString
(
"smartcarlife.customer.tag.goodsType.groundGuardBoard"
,
"129,166"
);
String
groundGuardBoardTypesStr
=
OrePropertyConfigurer
.
getString
(
"smartcarlife.customer.tag.goodsType.groundGuardBoard"
,
"129,166"
);
//小桌板
//小桌板
Integer
smallTableBoardId
=
OrePropertyConfigurer
.
getProperty
(
"smartcarlife.customer.tag.goodsType.smallTableBoard"
,
Integer
.
class
,
167
);
String
smallTableBoardTypesStr
=
OrePropertyConfigurer
.
getString
(
"smartcarlife.customer.tag.goodsType.smallTableBoard"
,
"167"
);
//脚垫
//脚垫
String
footMatTypesStr
=
OrePropertyConfigurer
.
getString
(
"smartcarlife.customer.tag.goodsType.footMat"
,
"2,125,130"
);
String
footMatTypesStr
=
OrePropertyConfigurer
.
getString
(
"smartcarlife.customer.tag.goodsType.footMat"
,
"2,125,130"
);
Set
<
Integer
>
solarFilmTypes
=
parseTypeIds
(
solarFilmTypesStr
);
Set
<
Integer
>
solarFilmTypes
=
parseTypeIds
(
solarFilmTypesStr
);
Set
<
Integer
>
carCoverTypes
=
parseTypeIds
(
carCoverTypesStr
);
Set
<
Integer
>
carCoverTypes
=
parseTypeIds
(
carCoverTypesStr
);
Set
<
Integer
>
electricPedalTypes
=
parseTypeIds
(
String
.
valueOf
(
electricPedalTypeId
)
);
Set
<
Integer
>
electricPedalTypes
=
parseTypeIds
(
electricPedalTypesStr
);
Set
<
Integer
>
groundGuardBoardTypes
=
parseTypeIds
(
groundGuardBoardTypesStr
);
Set
<
Integer
>
groundGuardBoardTypes
=
parseTypeIds
(
groundGuardBoardTypesStr
);
Set
<
Integer
>
smallTableBoardTypes
=
parseTypeIds
(
String
.
valueOf
(
smallTableBoardId
)
);
Set
<
Integer
>
smallTableBoardTypes
=
parseTypeIds
(
smallTableBoardTypesStr
);
Set
<
Integer
>
footMatTypes
=
parseTypeIds
(
footMatTypesStr
);
Set
<
Integer
>
footMatTypes
=
parseTypeIds
(
footMatTypesStr
);
Map
<
Set
<
Integer
>,
String
>
goodsTypeEnumMap
=
new
LinkedHashMap
<>();
Map
<
Set
<
Integer
>,
String
>
goodsTypeEnumMap
=
new
LinkedHashMap
<>();
...
...
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/MarketingActivityService.java
View file @
4a4b343
...
@@ -148,9 +148,39 @@ public class MarketingActivityService {
...
@@ -148,9 +148,39 @@ public class MarketingActivityService {
/**
/**
* 查询活动关联车系列表
* 查询活动关联车系列表
*
* @param query 查询条件(activityId + includeDetail)
*/
*/
public
List
<
MarketingActivityCarSeries
>
carSeries
(
Integer
activityId
)
{
public
List
<
MarketingActivityCarSeriesRespDTO
>
carSeries
(
MarketingActivityCarSeriesQueryDTO
query
)
{
return
marketingActivityCarSeriesMapper
.
selectByActivityId
(
activityId
);
Integer
activityId
=
query
.
getActivityId
();
Boolean
includeDetail
=
query
.
getIncludeDetail
();
List
<
MarketingActivityCarSeriesRespDTO
>
result
=
marketingActivityCarSeriesMapper
.
selectByActivityId
(
activityId
);
if
(
CollectionUtils
.
isEmpty
(
result
))
{
return
Collections
.
emptyList
();
}
if
(
Boolean
.
TRUE
.
equals
(
includeDetail
))
{
// 级联查询商品/套餐 + 套餐子商品
List
<
MarketingActivityProductRespDTO
>
allProducts
=
marketingActivityProductMapper
.
selectProductWithItemsByActivityId
(
activityId
);
if
(!
CollectionUtils
.
isEmpty
(
allProducts
))
{
Map
<
Integer
,
List
<
MarketingActivityProductRespDTO
>>
productMap
=
allProducts
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
MarketingActivityProductRespDTO:
:
getCarSeriesId
));
for
(
MarketingActivityCarSeriesRespDTO
dto
:
result
)
{
List
<
MarketingActivityProductRespDTO
>
csProducts
=
productMap
.
getOrDefault
(
dto
.
getId
(),
Collections
.
emptyList
());
if
(!
CollectionUtils
.
isEmpty
(
csProducts
))
{
dto
.
setGoodsList
(
csProducts
.
stream
()
.
filter
(
p
->
ProductTypeEnum
.
GOODS
.
getValue
().
equals
(
p
.
getProductType
()))
.
collect
(
Collectors
.
toList
()));
dto
.
setPackageList
(
csProducts
.
stream
()
.
filter
(
p
->
ProductTypeEnum
.
PACKAGE
.
getValue
().
equals
(
p
.
getProductType
()))
.
collect
(
Collectors
.
toList
()));
}
}
}
}
return
result
;
}
}
/**
/**
...
@@ -640,6 +670,7 @@ public class MarketingActivityService {
...
@@ -640,6 +670,7 @@ public class MarketingActivityService {
}
}
}
}
p
.
setProductName
(
req
.
getProductName
());
p
.
setSortOrder
(
req
.
getSortOrder
()
!=
null
?
req
.
getSortOrder
()
:
0
);
p
.
setSortOrder
(
req
.
getSortOrder
()
!=
null
?
req
.
getSortOrder
()
:
0
);
p
.
setTabName
(
req
.
getTabName
());
p
.
setTabName
(
req
.
getTabName
());
p
.
setTabDescription
(
req
.
getTabDescription
());
p
.
setTabDescription
(
req
.
getTabDescription
());
...
@@ -810,6 +841,7 @@ public class MarketingActivityService {
...
@@ -810,6 +841,7 @@ public class MarketingActivityService {
pd
.
setGoodsTypeName
(
p
.
getGoodsTypeName
());
pd
.
setGoodsTypeName
(
p
.
getGoodsTypeName
());
pd
.
setGoodsCode
(
p
.
getGoodsCode
());
pd
.
setGoodsCode
(
p
.
getGoodsCode
());
pd
.
setPackageCode
(
p
.
getPackageCode
());
pd
.
setPackageCode
(
p
.
getPackageCode
());
pd
.
setProductName
(
p
.
getProductName
());
pd
.
setSortOrder
(
p
.
getSortOrder
());
pd
.
setSortOrder
(
p
.
getSortOrder
());
pd
.
setTabName
(
p
.
getTabName
());
pd
.
setTabName
(
p
.
getTabName
());
pd
.
setTabDescription
(
p
.
getTabDescription
());
pd
.
setTabDescription
(
p
.
getTabDescription
());
...
...
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/StrategySopQueryService.java
View file @
4a4b343
...
@@ -187,6 +187,7 @@ public class StrategySopQueryService {
...
@@ -187,6 +187,7 @@ public class StrategySopQueryService {
*/
*/
private
SopActionDTO
convertToActionDTO
(
SopStrategyAction
action
)
{
private
SopActionDTO
convertToActionDTO
(
SopStrategyAction
action
)
{
SopActionDTO
dto
=
BeanUtil
.
copyProperties
(
action
,
SopActionDTO
.
class
);
SopActionDTO
dto
=
BeanUtil
.
copyProperties
(
action
,
SopActionDTO
.
class
);
dto
.
setPageTitle
(
action
.
getContent
());
List
<
SopStrategyActionMedia
>
medias
=
sopStrategyActionMediaMapper
.
selectByActionId
(
action
.
getId
());
List
<
SopStrategyActionMedia
>
medias
=
sopStrategyActionMediaMapper
.
selectByActionId
(
action
.
getId
());
dto
.
setMedias
(
medias
.
stream
()
dto
.
setMedias
(
medias
.
stream
()
...
@@ -209,7 +210,7 @@ public class StrategySopQueryService {
...
@@ -209,7 +210,7 @@ public class StrategySopQueryService {
// 设置日期变量
// 设置日期变量
List
<
SopConditionVariableDTO
>
collect
=
allConditionVariables
.
stream
()
List
<
SopConditionVariableDTO
>
collect
=
allConditionVariables
.
stream
()
.
filter
(
index
->
index
.
getVariableType
()
==
1
).
map
(
index
->
{
.
filter
(
index
->
index
.
getVariableType
()
==
3
).
map
(
index
->
{
SopConditionVariableDTO
variable
=
new
SopConditionVariableDTO
();
SopConditionVariableDTO
variable
=
new
SopConditionVariableDTO
();
variable
.
setVariableCode
(
index
.
getVariableCode
());
variable
.
setVariableCode
(
index
.
getVariableCode
());
variable
.
setVariableName
(
index
.
getVariableName
());
variable
.
setVariableName
(
index
.
getVariableName
());
...
@@ -358,8 +359,8 @@ public class StrategySopQueryService {
...
@@ -358,8 +359,8 @@ public class StrategySopQueryService {
* @param variableType 变量类型
* @param variableType 变量类型
* @return 可用操作符列表
* @return 可用操作符列表
*/
*/
private
List
<
SopStrategyMetaDTO
.
SopMetaItemDTO
>
buildOperatorsByVariableType
(
Integer
variableType
)
{
private
List
<
SopStrategyMetaDTO
.
SopMetaItemDTO
Int
>
buildOperatorsByVariableType
(
Integer
variableType
)
{
List
<
SopStrategyMetaDTO
.
SopMetaItemDTO
>
items
=
new
ArrayList
<>();
List
<
SopStrategyMetaDTO
.
SopMetaItemDTO
Int
>
items
=
new
ArrayList
<>();
if
(
variableType
==
null
)
{
if
(
variableType
==
null
)
{
return
items
;
return
items
;
...
@@ -372,45 +373,45 @@ public class StrategySopQueryService {
...
@@ -372,45 +373,45 @@ public class StrategySopQueryService {
switch
(
typeEnum
)
{
switch
(
typeEnum
)
{
case
DATE:
case
DATE:
items
.
add
(
createMetaItem
(
String
.
valueOf
(
SopOperatorTypeEnum
.
LESS_THAN
.
getValue
()),
items
.
add
(
createMetaItem
Int
(
SopOperatorTypeEnum
.
LESS_THAN
.
getValue
(),
SopOperatorTypeEnum
.
LESS_THAN
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
LESS_THAN
.
getDisplayName
()));
SopOperatorTypeEnum
.
LESS_THAN
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
LESS_THAN
.
getDisplayName
()));
items
.
add
(
createMetaItem
(
String
.
valueOf
(
SopOperatorTypeEnum
.
EQUAL_TO
.
getValue
()),
items
.
add
(
createMetaItem
Int
(
SopOperatorTypeEnum
.
EQUAL_TO
.
getValue
(),
SopOperatorTypeEnum
.
EQUAL_TO
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
EQUAL_TO
.
getDisplayName
()));
SopOperatorTypeEnum
.
EQUAL_TO
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
EQUAL_TO
.
getDisplayName
()));
items
.
add
(
createMetaItem
(
String
.
valueOf
(
SopOperatorTypeEnum
.
GREATER_THAN
.
getValue
()),
items
.
add
(
createMetaItem
Int
(
SopOperatorTypeEnum
.
GREATER_THAN
.
getValue
(),
SopOperatorTypeEnum
.
GREATER_THAN
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
GREATER_THAN
.
getDisplayName
()));
SopOperatorTypeEnum
.
GREATER_THAN
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
GREATER_THAN
.
getDisplayName
()));
break
;
break
;
case
NUMBER:
case
NUMBER:
items
.
add
(
createMetaItem
(
String
.
valueOf
(
SopOperatorTypeEnum
.
EQUAL_TO
.
getValue
()),
items
.
add
(
createMetaItem
Int
(
SopOperatorTypeEnum
.
EQUAL_TO
.
getValue
(),
SopOperatorTypeEnum
.
EQUAL_TO
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
EQUAL_TO
.
getDisplayName
()));
SopOperatorTypeEnum
.
EQUAL_TO
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
EQUAL_TO
.
getDisplayName
()));
items
.
add
(
createMetaItem
(
String
.
valueOf
(
SopOperatorTypeEnum
.
NOT_EQUAL_TO
.
getValue
()),
items
.
add
(
createMetaItem
Int
(
SopOperatorTypeEnum
.
NOT_EQUAL_TO
.
getValue
(),
SopOperatorTypeEnum
.
NOT_EQUAL_TO
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
NOT_EQUAL_TO
.
getDisplayName
()));
SopOperatorTypeEnum
.
NOT_EQUAL_TO
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
NOT_EQUAL_TO
.
getDisplayName
()));
items
.
add
(
createMetaItem
(
String
.
valueOf
(
SopOperatorTypeEnum
.
GREATER
.
getValue
()),
items
.
add
(
createMetaItem
Int
(
SopOperatorTypeEnum
.
GREATER
.
getValue
(),
SopOperatorTypeEnum
.
GREATER
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
GREATER
.
getDisplayName
()));
SopOperatorTypeEnum
.
GREATER
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
GREATER
.
getDisplayName
()));
items
.
add
(
createMetaItem
(
String
.
valueOf
(
SopOperatorTypeEnum
.
GREATER_EQUAL
.
getValue
()),
items
.
add
(
createMetaItem
Int
(
SopOperatorTypeEnum
.
GREATER_EQUAL
.
getValue
(),
SopOperatorTypeEnum
.
GREATER_EQUAL
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
GREATER_EQUAL
.
getDisplayName
()));
SopOperatorTypeEnum
.
GREATER_EQUAL
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
GREATER_EQUAL
.
getDisplayName
()));
items
.
add
(
createMetaItem
(
String
.
valueOf
(
SopOperatorTypeEnum
.
LESS
.
getValue
()),
items
.
add
(
createMetaItem
Int
(
SopOperatorTypeEnum
.
LESS
.
getValue
(),
SopOperatorTypeEnum
.
LESS
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
LESS
.
getDisplayName
()));
SopOperatorTypeEnum
.
LESS
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
LESS
.
getDisplayName
()));
items
.
add
(
createMetaItem
(
String
.
valueOf
(
SopOperatorTypeEnum
.
LESS_EQUAL
.
getValue
()),
items
.
add
(
createMetaItem
Int
(
SopOperatorTypeEnum
.
LESS_EQUAL
.
getValue
(),
SopOperatorTypeEnum
.
LESS_EQUAL
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
LESS_EQUAL
.
getDisplayName
()));
SopOperatorTypeEnum
.
LESS_EQUAL
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
LESS_EQUAL
.
getDisplayName
()));
break
;
break
;
case
TEXT:
case
TEXT:
items
.
add
(
createMetaItem
(
String
.
valueOf
(
SopOperatorTypeEnum
.
CONTAINS
.
getValue
()),
items
.
add
(
createMetaItem
Int
(
SopOperatorTypeEnum
.
CONTAINS
.
getValue
(),
SopOperatorTypeEnum
.
CONTAINS
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
CONTAINS
.
getDisplayName
()));
SopOperatorTypeEnum
.
CONTAINS
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
CONTAINS
.
getDisplayName
()));
items
.
add
(
createMetaItem
(
String
.
valueOf
(
SopOperatorTypeEnum
.
NOT_CONTAINS
.
getValue
()),
items
.
add
(
createMetaItem
Int
(
SopOperatorTypeEnum
.
NOT_CONTAINS
.
getValue
(),
SopOperatorTypeEnum
.
NOT_CONTAINS
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
NOT_CONTAINS
.
getDisplayName
()));
SopOperatorTypeEnum
.
NOT_CONTAINS
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
NOT_CONTAINS
.
getDisplayName
()));
items
.
add
(
createMetaItem
(
String
.
valueOf
(
SopOperatorTypeEnum
.
EQUAL_TO
.
getValue
()),
items
.
add
(
createMetaItem
Int
(
SopOperatorTypeEnum
.
EQUAL_TO
.
getValue
(),
SopOperatorTypeEnum
.
EQUAL_TO
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
EQUAL_TO
.
getDisplayName
()));
SopOperatorTypeEnum
.
EQUAL_TO
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
EQUAL_TO
.
getDisplayName
()));
items
.
add
(
createMetaItem
(
String
.
valueOf
(
SopOperatorTypeEnum
.
NOT_EQUAL_TO
.
getValue
()),
items
.
add
(
createMetaItem
Int
(
SopOperatorTypeEnum
.
NOT_EQUAL_TO
.
getValue
(),
SopOperatorTypeEnum
.
NOT_EQUAL_TO
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
NOT_EQUAL_TO
.
getDisplayName
()));
SopOperatorTypeEnum
.
NOT_EQUAL_TO
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
NOT_EQUAL_TO
.
getDisplayName
()));
break
;
break
;
case
ENUM:
case
ENUM:
items
.
add
(
createMetaItem
(
String
.
valueOf
(
SopOperatorTypeEnum
.
CONTAINS
.
getValue
()),
items
.
add
(
createMetaItem
Int
(
SopOperatorTypeEnum
.
CONTAINS
.
getValue
(),
SopOperatorTypeEnum
.
CONTAINS
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
CONTAINS
.
getDisplayName
()));
SopOperatorTypeEnum
.
CONTAINS
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
CONTAINS
.
getDisplayName
()));
items
.
add
(
createMetaItem
(
String
.
valueOf
(
SopOperatorTypeEnum
.
NOT_CONTAINS
.
getValue
()),
items
.
add
(
createMetaItem
Int
(
SopOperatorTypeEnum
.
NOT_CONTAINS
.
getValue
(),
SopOperatorTypeEnum
.
NOT_CONTAINS
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
NOT_CONTAINS
.
getDisplayName
()));
SopOperatorTypeEnum
.
NOT_CONTAINS
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
NOT_CONTAINS
.
getDisplayName
()));
items
.
add
(
createMetaItem
(
String
.
valueOf
(
SopOperatorTypeEnum
.
EQUAL_TO
.
getValue
()),
items
.
add
(
createMetaItem
Int
(
SopOperatorTypeEnum
.
EQUAL_TO
.
getValue
(),
SopOperatorTypeEnum
.
EQUAL_TO
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
EQUAL_TO
.
getDisplayName
()));
SopOperatorTypeEnum
.
EQUAL_TO
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
EQUAL_TO
.
getDisplayName
()));
items
.
add
(
createMetaItem
(
String
.
valueOf
(
SopOperatorTypeEnum
.
NOT_EQUAL_TO
.
getValue
()),
items
.
add
(
createMetaItem
Int
(
SopOperatorTypeEnum
.
NOT_EQUAL_TO
.
getValue
(),
SopOperatorTypeEnum
.
NOT_EQUAL_TO
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
NOT_EQUAL_TO
.
getDisplayName
()));
SopOperatorTypeEnum
.
NOT_EQUAL_TO
.
getDisplayName
(),
4
,
SopOperatorTypeEnum
.
NOT_EQUAL_TO
.
getDisplayName
()));
break
;
break
;
default
:
default
:
...
@@ -485,6 +486,24 @@ public class StrategySopQueryService {
...
@@ -485,6 +486,24 @@ public class StrategySopQueryService {
}
}
/**
/**
* 创建元数据项DTO
*
* @param code 编码
* @param name 名称
* @param type 类型
* @param description 描述
* @return 元数据项DTO
*/
private
SopStrategyMetaDTO
.
SopMetaItemDTOInt
createMetaItemInt
(
Integer
code
,
String
name
,
Integer
type
,
String
description
)
{
SopStrategyMetaDTO
.
SopMetaItemDTOInt
item
=
new
SopStrategyMetaDTO
.
SopMetaItemDTOInt
();
item
.
setCode
(
code
);
item
.
setName
(
name
);
item
.
setType
(
type
);
item
.
setDescription
(
description
);
return
item
;
}
/**
* 根据记录ID查询策略执行记录详情
* 根据记录ID查询策略执行记录详情
*
*
* @param recordId 执行记录ID
* @param recordId 执行记录ID
...
...
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/StrategySopService.java
View file @
4a4b343
...
@@ -203,8 +203,10 @@ public class StrategySopService {
...
@@ -203,8 +203,10 @@ public class StrategySopService {
if
(
CollUtil
.
isEmpty
(
branches
))
{
if
(
CollUtil
.
isEmpty
(
branches
))
{
return
;
return
;
}
}
int
branchNo
=
1
;
for
(
SopBranchReqDTO
branchReq
:
branches
)
{
for
(
SopBranchReqDTO
branchReq
:
branches
)
{
SopStrategyBranch
branch
=
BeanUtil
.
copyProperties
(
branchReq
,
SopStrategyBranch
.
class
);
SopStrategyBranch
branch
=
BeanUtil
.
copyProperties
(
branchReq
,
SopStrategyBranch
.
class
);
branch
.
setBranchNo
(
branchNo
);
branch
.
setStrategyId
(
strategyId
);
branch
.
setStrategyId
(
strategyId
);
branch
.
setDeletedFlag
(
DeleteFlagEnum
.
N
.
getValue
());
branch
.
setDeletedFlag
(
DeleteFlagEnum
.
N
.
getValue
());
branch
.
setCreatedBy
(
createdBy
);
branch
.
setCreatedBy
(
createdBy
);
...
@@ -212,9 +214,9 @@ public class StrategySopService {
...
@@ -212,9 +214,9 @@ public class StrategySopService {
branch
.
setStep
(
3
);
branch
.
setStep
(
3
);
sopStrategyBranchMapper
.
insertSelective
(
branch
);
sopStrategyBranchMapper
.
insertSelective
(
branch
);
Integer
branchId
=
branch
.
getId
();
Integer
branchId
=
branch
.
getId
();
saveConditionGroups
(
strategyId
,
branchId
,
branchReq
.
getConditionGroups
(),
createdBy
);
saveConditionGroups
(
strategyId
,
branchId
,
branchReq
.
getConditionGroups
(),
createdBy
);
saveActions
(
strategyId
,
branchId
,
branchReq
.
getActions
(),
createdBy
);
saveActions
(
strategyId
,
branchId
,
branchReq
.
getActions
(),
createdBy
);
branchNo
++
;
}
}
}
}
...
@@ -222,10 +224,12 @@ public class StrategySopService {
...
@@ -222,10 +224,12 @@ public class StrategySopService {
if
(
CollUtil
.
isEmpty
(
conditionGroups
))
{
if
(
CollUtil
.
isEmpty
(
conditionGroups
))
{
return
;
return
;
}
}
int
groupNo
=
1
;
for
(
SopConditionGroupReqDTO
groupReq
:
conditionGroups
)
{
for
(
SopConditionGroupReqDTO
groupReq
:
conditionGroups
)
{
SopStrategyConditionGroup
group
=
BeanUtil
.
copyProperties
(
groupReq
,
SopStrategyConditionGroup
.
class
);
SopStrategyConditionGroup
group
=
BeanUtil
.
copyProperties
(
groupReq
,
SopStrategyConditionGroup
.
class
);
group
.
setStrategyId
(
strategyId
);
group
.
setStrategyId
(
strategyId
);
group
.
setBranchId
(
null
);
group
.
setBranchId
(
null
);
group
.
setGroupSeq
(
groupNo
);
group
.
setStep
(
2
);
group
.
setStep
(
2
);
group
.
setDeletedFlag
(
DeleteFlagEnum
.
N
.
getValue
());
group
.
setDeletedFlag
(
DeleteFlagEnum
.
N
.
getValue
());
group
.
setCreatedBy
(
createdBy
);
group
.
setCreatedBy
(
createdBy
);
...
@@ -234,6 +238,7 @@ public class StrategySopService {
...
@@ -234,6 +238,7 @@ public class StrategySopService {
Integer
groupId
=
group
.
getId
();
Integer
groupId
=
group
.
getId
();
saveConditions
(
strategyId
,
null
,
groupId
,
groupReq
.
getConditions
(),
createdBy
);
saveConditions
(
strategyId
,
null
,
groupId
,
groupReq
.
getConditions
(),
createdBy
);
groupNo
++
;
}
}
}
}
...
@@ -241,11 +246,13 @@ public class StrategySopService {
...
@@ -241,11 +246,13 @@ public class StrategySopService {
if
(
CollUtil
.
isEmpty
(
conditionGroups
))
{
if
(
CollUtil
.
isEmpty
(
conditionGroups
))
{
return
;
return
;
}
}
int
groupNo
=
1
;
for
(
SopConditionGroupReqDTO
groupReq
:
conditionGroups
)
{
for
(
SopConditionGroupReqDTO
groupReq
:
conditionGroups
)
{
SopStrategyConditionGroup
group
=
BeanUtil
.
copyProperties
(
groupReq
,
SopStrategyConditionGroup
.
class
);
SopStrategyConditionGroup
group
=
BeanUtil
.
copyProperties
(
groupReq
,
SopStrategyConditionGroup
.
class
);
group
.
setStrategyId
(
strategyId
);
group
.
setStrategyId
(
strategyId
);
group
.
setBranchId
(
branchId
);
group
.
setBranchId
(
branchId
);
group
.
setStep
(
3
);
group
.
setStep
(
3
);
group
.
setGroupSeq
(
groupNo
);
group
.
setDeletedFlag
(
DeleteFlagEnum
.
N
.
getValue
());
group
.
setDeletedFlag
(
DeleteFlagEnum
.
N
.
getValue
());
group
.
setCreatedBy
(
createdBy
);
group
.
setCreatedBy
(
createdBy
);
group
.
setCreatedDate
(
new
Date
());
group
.
setCreatedDate
(
new
Date
());
...
@@ -253,6 +260,7 @@ public class StrategySopService {
...
@@ -253,6 +260,7 @@ public class StrategySopService {
Integer
groupId
=
group
.
getId
();
Integer
groupId
=
group
.
getId
();
saveConditions
(
strategyId
,
branchId
,
groupId
,
groupReq
.
getConditions
(),
createdBy
);
saveConditions
(
strategyId
,
branchId
,
groupId
,
groupReq
.
getConditions
(),
createdBy
);
groupNo
++
;
}
}
}
}
...
@@ -276,6 +284,7 @@ public class StrategySopService {
...
@@ -276,6 +284,7 @@ public class StrategySopService {
if
(
CollUtil
.
isEmpty
(
actions
))
{
if
(
CollUtil
.
isEmpty
(
actions
))
{
return
;
return
;
}
}
int
actionNo
=
1
;
for
(
SopActionReqDTO
actionReq
:
actions
)
{
for
(
SopActionReqDTO
actionReq
:
actions
)
{
SopStrategyAction
action
=
BeanUtil
.
copyProperties
(
actionReq
,
SopStrategyAction
.
class
);
SopStrategyAction
action
=
BeanUtil
.
copyProperties
(
actionReq
,
SopStrategyAction
.
class
);
List
<
SopActionMediaReqDTO
>
medias
=
actionReq
.
getMedias
();
List
<
SopActionMediaReqDTO
>
medias
=
actionReq
.
getMedias
();
...
@@ -283,6 +292,7 @@ public class StrategySopService {
...
@@ -283,6 +292,7 @@ public class StrategySopService {
action
.
setMediaIds
(
medias
.
stream
().
map
(
SopActionMediaReqDTO:
:
getMediaUrl
).
collect
(
action
.
setMediaIds
(
medias
.
stream
().
map
(
SopActionMediaReqDTO:
:
getMediaUrl
).
collect
(
Collectors
.
joining
(
","
)));
Collectors
.
joining
(
","
)));
}
}
action
.
setActionSeq
(
actionNo
);
action
.
setStrategyId
(
strategyId
);
action
.
setStrategyId
(
strategyId
);
action
.
setBranchId
(
branchId
);
action
.
setBranchId
(
branchId
);
action
.
setDeletedFlag
(
DeleteFlagEnum
.
N
.
getValue
());
action
.
setDeletedFlag
(
DeleteFlagEnum
.
N
.
getValue
());
...
@@ -313,6 +323,7 @@ public class StrategySopService {
...
@@ -313,6 +323,7 @@ public class StrategySopService {
Integer
actionId
=
action
.
getId
();
Integer
actionId
=
action
.
getId
();
saveActionMedias
(
actionId
,
actionReq
.
getMedias
(),
createdBy
);
saveActionMedias
(
actionId
,
actionReq
.
getMedias
(),
createdBy
);
actionNo
++
;
}
}
}
}
...
...
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/TagCategoryService.java
View file @
4a4b343
...
@@ -335,6 +335,78 @@ public class TagCategoryService {
...
@@ -335,6 +335,78 @@ public class TagCategoryService {
}
}
/**
/**
* 查询所有分类及其维度和枚举
*
* @return 所有分类及其维度枚举列表
* @since 2026/06/24 15:30
*/
public
List
<
TagCategoryDimensionRespDTO
>
listALL
()
{
// 一次性加载全部分类
List
<
TagCategory
>
allCategories
=
tagCategoryMapper
.
selectAllCategories
();
if
(
allCategories
.
isEmpty
())
{
return
Collections
.
emptyList
();
}
Map
<
Integer
,
TagCategory
>
allCategoryMap
=
allCategories
.
stream
()
.
collect
(
Collectors
.
toMap
(
TagCategory:
:
getId
,
c
->
c
));
// 查询所有维度
TagDimensionQueryReqDTO
dimQuery
=
new
TagDimensionQueryReqDTO
();
List
<
TagDimension
>
allDimensions
=
tagDimensionMapper
.
queryDimensionList
(
dimQuery
);
// 批量查询所有枚举值
Map
<
Integer
,
List
<
TagEnum
>>
enumMap
=
Collections
.
emptyMap
();
if
(!
allDimensions
.
isEmpty
())
{
List
<
Integer
>
dimensionIds
=
allDimensions
.
stream
()
.
map
(
TagDimension:
:
getId
)
.
collect
(
Collectors
.
toList
());
enumMap
=
tagEnumMapper
.
selectByDimensionIds
(
dimensionIds
).
stream
()
.
collect
(
Collectors
.
groupingBy
(
TagEnum:
:
getDimensionId
));
}
// 按分类ID分组维度
Map
<
Integer
,
List
<
TagDimension
>>
dimensionByCategoryMap
=
allDimensions
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
TagDimension:
:
getCategoryId
));
// 构建每个分类的响应DTO
final
Map
<
Integer
,
List
<
TagEnum
>>
finalEnumMap
=
enumMap
;
return
allCategories
.
stream
().
map
(
category
->
{
TagCategoryDimensionRespDTO
dto
=
new
TagCategoryDimensionRespDTO
();
dto
.
setId
(
category
.
getId
());
dto
.
setCategoryCode
(
category
.
getCategoryCode
());
dto
.
setCategoryName
(
category
.
getCategoryName
());
dto
.
setParentId
(
category
.
getParentId
());
dto
.
setLevel
(
category
.
getLevel
());
dto
.
setFullPath
(
buildFullPath
(
category
,
allCategoryMap
));
// 设置该分类下的维度
List
<
TagDimension
>
dimensions
=
dimensionByCategoryMap
.
getOrDefault
(
category
.
getId
(),
Collections
.
emptyList
());
List
<
TagDimensionRespDTO
>
dimensionDTOs
=
dimensions
.
stream
().
map
(
dim
->
{
TagDimensionRespDTO
dimDto
=
new
TagDimensionRespDTO
();
dimDto
.
setId
(
dim
.
getId
());
dimDto
.
setDimensionCode
(
dim
.
getDimensionCode
());
dimDto
.
setDimensionName
(
dim
.
getDimensionName
());
dimDto
.
setCategoryId
(
dim
.
getCategoryId
());
TagCategory
cat
=
allCategoryMap
.
get
(
dim
.
getCategoryId
());
dimDto
.
setCategoryName
(
cat
!=
null
?
cat
.
getCategoryName
()
:
null
);
dimDto
.
setCategoryFullPath
(
cat
!=
null
?
buildFullPath
(
cat
,
allCategoryMap
)
:
null
);
dimDto
.
setEnumCount
(
dim
.
getEnumCount
());
dimDto
.
setSortOrder
(
dim
.
getSortOrder
());
dimDto
.
setCanEdit
(
dim
.
getCanEdit
());
dimDto
.
setCanAddEnum
(
dim
.
getCanAddEnum
());
List
<
TagEnum
>
dimEnums
=
finalEnumMap
.
getOrDefault
(
dim
.
getId
(),
Collections
.
emptyList
());
dimDto
.
setEnums
(
dimEnums
.
stream
().
map
(
this
::
convertTagEnumToRespDTO
).
collect
(
Collectors
.
toList
()));
dimDto
.
setCreatedDate
(
dim
.
getCreatedDate
());
dimDto
.
setUpdatedDate
(
dim
.
getUpdatedDate
());
return
dimDto
;
}).
collect
(
Collectors
.
toList
());
dto
.
setDimensions
(
dimensionDTOs
);
return
dto
;
}).
collect
(
Collectors
.
toList
());
}
/**
* 根据类别代码查询类别
* 根据类别代码查询类别
*/
*/
public
TagCategoryRespDTO
getByCode
(
String
categoryCode
)
{
public
TagCategoryRespDTO
getByCode
(
String
categoryCode
)
{
...
...
rpc-dj-strategy/src/main/resources/META-INF/orm/MarketingActivityCarSeriesMapper.xml
View file @
4a4b343
...
@@ -2,13 +2,19 @@
...
@@ -2,13 +2,19 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"cn.com.glsx.dj.strategy.mapper.MarketingActivityCarSeriesMapper"
>
<mapper
namespace=
"cn.com.glsx.dj.strategy.mapper.MarketingActivityCarSeriesMapper"
>
<select
id=
"selectByActivityId"
resultType=
"cn.com.glsx.dj.strategy.model.MarketingActivityCarSeries"
>
<resultMap
id=
"CarSeriesRespDTOResultMap"
type=
"cn.com.glsx.dj.strategy.dto.MarketingActivityCarSeriesRespDTO"
>
SELECT id, activity_id activityId,
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
brand_id brandId, brand_name brandName,
<result
column=
"activity_id"
property=
"activityId"
jdbcType=
"INTEGER"
/>
child_id childId, child_name childName,
<result
column=
"brand_id"
property=
"brandId"
jdbcType=
"INTEGER"
/>
car_series_id carSeriesId, car_series_name carSeriesName,
<result
column=
"brand_name"
property=
"brandName"
jdbcType=
"VARCHAR"
/>
created_by createdBy, created_date createdDate
<result
column=
"child_id"
property=
"childId"
jdbcType=
"INTEGER"
/>
FROM dj_marketing_activity_car_series
<result
column=
"child_name"
property=
"childName"
jdbcType=
"VARCHAR"
/>
<result
column=
"car_series_id"
property=
"carSeriesId"
jdbcType=
"INTEGER"
/>
<result
column=
"car_series_name"
property=
"carSeriesName"
jdbcType=
"VARCHAR"
/>
</resultMap>
<select
id=
"selectByActivityId"
resultMap=
"CarSeriesRespDTOResultMap"
>
SELECT * FROM dj_marketing_activity_car_series
WHERE activity_id = #{activityId} AND deleted_flag = 'N'
WHERE activity_id = #{activityId} AND deleted_flag = 'N'
</select>
</select>
...
...
rpc-dj-strategy/src/main/resources/META-INF/orm/MarketingActivityProductMapper.xml
View file @
4a4b343
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
<result
column=
"sort_order"
property=
"sortOrder"
jdbcType=
"INTEGER"
/>
<result
column=
"sort_order"
property=
"sortOrder"
jdbcType=
"INTEGER"
/>
<result
column=
"goods_type"
property=
"goodsType"
jdbcType=
"INTEGER"
/>
<result
column=
"goods_type"
property=
"goodsType"
jdbcType=
"INTEGER"
/>
<result
column=
"goods_type_name"
property=
"goodsTypeName"
jdbcType=
"VARCHAR"
/>
<result
column=
"goods_type_name"
property=
"goodsTypeName"
jdbcType=
"VARCHAR"
/>
<result
column=
"product_name"
property=
"productName"
jdbcType=
"VARCHAR"
/>
<result
column=
"tab_name"
property=
"tabName"
jdbcType=
"VARCHAR"
/>
<result
column=
"tab_name"
property=
"tabName"
jdbcType=
"VARCHAR"
/>
<result
column=
"tab_description"
property=
"tabDescription"
jdbcType=
"VARCHAR"
/>
<result
column=
"tab_description"
property=
"tabDescription"
jdbcType=
"VARCHAR"
/>
<result
column=
"discount_price"
property=
"discountPrice"
jdbcType=
"DECIMAL"
/>
<result
column=
"discount_price"
property=
"discountPrice"
jdbcType=
"DECIMAL"
/>
...
@@ -67,6 +68,40 @@
...
@@ -67,6 +68,40 @@
<result
column=
"detail_image_url"
property=
"detailImageUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"detail_image_url"
property=
"detailImageUrl"
jdbcType=
"VARCHAR"
/>
</resultMap>
</resultMap>
<!-- 级联查询商品/套餐 + 套餐子商品(LEFT JOIN product_item,一次查询带回所有数据) -->
<resultMap
id=
"ProductWithItemsResultMap"
type=
"cn.com.glsx.dj.strategy.dto.MarketingActivityProductRespDTO"
extends=
"ProductRespDTOResultMap"
>
<collection
property=
"packageItems"
ofType=
"cn.com.glsx.dj.strategy.dto.MarketingActivityProductItemRespDTO"
>
<id
column=
"item_id"
property=
"itemId"
/>
<result
column=
"item_activity_product_id"
property=
"activityProductId"
/>
<result
column=
"item_goods_code"
property=
"goodsCode"
/>
<result
column=
"item_goods_name"
property=
"goodsName"
/>
<result
column=
"item_goods_type"
property=
"goodsType"
/>
<result
column=
"item_goods_type_name"
property=
"goodsTypeName"
/>
<result
column=
"item_current_price"
property=
"currentPrice"
/>
<result
column=
"item_minimum_price"
property=
"minimumPrice"
/>
<result
column=
"item_discount_price"
property=
"discountPrice"
/>
<result
column=
"item_sales_incentive"
property=
"salesIncentive"
/>
</collection>
</resultMap>
<select
id=
"selectProductWithItemsByActivityId"
resultMap=
"ProductWithItemsResultMap"
>
SELECT p.*,
i.id AS item_id,
i.activity_product_id AS item_activity_product_id,
i.goods_code AS item_goods_code,
i.goods_name AS item_goods_name,
i.goods_type AS item_goods_type,
i.goods_type_name AS item_goods_type_name,
i.current_price AS item_current_price,
i.minimum_price AS item_minimum_price,
i.discount_price AS item_discount_price,
i.sales_incentive AS item_sales_incentive
FROM dj_marketing_activity_product p
LEFT JOIN dj_marketing_activity_product_item i ON i.activity_product_id = p.id AND i.deleted_flag = 'N'
WHERE p.activity_id = #{activityId} AND p.deleted_flag = 'N'
ORDER BY p.sort_order
</select>
<select
id=
"selectProductDTOList"
resultMap=
"ProductRespDTOResultMap"
>
<select
id=
"selectProductDTOList"
resultMap=
"ProductRespDTOResultMap"
>
SELECT *
SELECT *
FROM dj_marketing_activity_product
FROM dj_marketing_activity_product
...
...
rpc-dj-strategy/src/main/resources/META-INF/orm/MarketingGoodsQueryMapper.xml
View file @
4a4b343
...
@@ -4,14 +4,16 @@
...
@@ -4,14 +4,16 @@
<!-- 分页查询适用门店范围内的上架商品(仅取必要字段) -->
<!-- 分页查询适用门店范围内的上架商品(仅取必要字段) -->
<select
id=
"pageGoods"
resultType=
"cn.com.glsx.dj.strategy.dto.GoodsRespDTO"
>
<select
id=
"pageGoods"
resultType=
"cn.com.glsx.dj.strategy.dto.GoodsRespDTO"
>
SELECT mgi.merchant_goods_code AS goodsCode,
SELECT ug.commodity_code AS productId,
mgi.goods_alias AS goodsName,
mgi.merchant_goods_code AS goodsCode,
ug.commodity_code AS listingId,
ug.upgrade_goods_name AS productName,
mgi.scene_type AS scene,
mgi.goods_alias AS goodsAlias,
mgi.base_scene_code AS baseSceneCode,
ug.commodity_code AS listingId,
mgi.scene_type AS scene,
mgi.base_scene_code AS baseSceneCode,
COUNT(DISTINCT mgr.merchant_id) AS storeCount,
COUNT(DISTINCT mgr.merchant_id) AS storeCount,
mgi.sell_price
AS currentPrice,
mgi.sell_price AS currentPrice,
mgi.min_sell_price
AS minimumPrice
mgi.min_sell_price AS minimumPrice
FROM dj_car_life_merchant_goods_info mgi
FROM dj_car_life_merchant_goods_info mgi
LEFT JOIN dj_car_life_upgrade_goods ug ON ug.id = mgi.upgrade_goods_id AND ug.deleted_flag = 'N'
LEFT JOIN dj_car_life_upgrade_goods ug ON ug.id = mgi.upgrade_goods_id AND ug.deleted_flag = 'N'
JOIN dj_car_life_merchant_goods_ref mgr ON mgr.merchant_goods_id = mgi.id AND mgr.deleted_flag = 'N'
JOIN dj_car_life_merchant_goods_ref mgr ON mgr.merchant_goods_id = mgi.id AND mgr.deleted_flag = 'N'
...
@@ -42,7 +44,8 @@
...
@@ -42,7 +44,8 @@
<!-- 查询商品/套餐在适用门店范围内的门店列表(不分页,取交集) -->
<!-- 查询商品/套餐在适用门店范围内的门店列表(不分页,取交集) -->
<select
id=
"findStores"
resultType=
"cn.com.glsx.dj.strategy.dto.GoodsStoreRespDTO"
>
<select
id=
"findStores"
resultType=
"cn.com.glsx.dj.strategy.dto.GoodsStoreRespDTO"
>
SELECT mgr.merchant_id AS merchantId,
SELECT DISTINCT
mgr.merchant_id AS merchantId,
sm.merchant_name AS merchantName,
sm.merchant_name AS merchantName,
sm.address AS merchantAddress
sm.address AS merchantAddress
FROM dj_car_life_merchant_goods_info mgi
FROM dj_car_life_merchant_goods_info mgi
...
...
rpc-dj-strategy/src/main/resources/META-INF/orm/MarketingPackageQueryMapper.xml
View file @
4a4b343
...
@@ -52,11 +52,15 @@
...
@@ -52,11 +52,15 @@
<!-- 查询套餐下所有子商品 -->
<!-- 查询套餐下所有子商品 -->
<select
id=
"findPackageItems"
resultType=
"cn.com.glsx.dj.strategy.dto.PackageItemRespDTO"
>
<select
id=
"findPackageItems"
resultType=
"cn.com.glsx.dj.strategy.dto.PackageItemRespDTO"
>
SELECT mgi.merchant_goods_code AS goodsCode,
SELECT ug.commodity_code AS productId,
mgi.goods_alias AS goodsName,
mgi.merchant_goods_code AS goodsCode,
ug.upgrade_goods_name AS productName,
mgi.goods_alias AS goodsAlias,
ug.commodity_code AS listingId,
mgi.sell_price AS currentPrice,
mgi.sell_price AS currentPrice,
mgi.min_sell_price AS minimumPrice
mgi.min_sell_price AS minimumPrice
FROM dj_car_life_merchant_goods_info mgi
FROM dj_car_life_merchant_goods_info mgi
LEFT JOIN dj_car_life_upgrade_goods ug ON ug.id = mgi.upgrade_goods_id AND ug.deleted_flag = 'N'
WHERE mgi.package_code = #{packageCode}
WHERE mgi.package_code = #{packageCode}
AND mgi.deleted_flag = 'N'
AND mgi.deleted_flag = 'N'
AND mgi.status = 1
AND mgi.status = 1
...
...
rpc-dj-strategy/src/main/resources/META-INF/orm/SopStrategyConditionMapper.xml
View file @
4a4b343
...
@@ -12,6 +12,8 @@
...
@@ -12,6 +12,8 @@
<result
column=
"variable_name"
property=
"variableName"
/>
<result
column=
"variable_name"
property=
"variableName"
/>
<result
column=
"value_type"
property=
"valueType"
/>
<result
column=
"value_type"
property=
"valueType"
/>
<result
column=
"operator"
property=
"operator"
/>
<result
column=
"operator"
property=
"operator"
/>
<result
column=
"value_source"
property=
"valueSource"
/>
<result
column=
"variable_ref_code"
property=
"variableRefCode"
/>
<result
column=
"text_value"
property=
"textValue"
/>
<result
column=
"text_value"
property=
"textValue"
/>
<result
column=
"number_value"
property=
"numberValue"
/>
<result
column=
"number_value"
property=
"numberValue"
/>
<result
column=
"date_value"
property=
"dateValue"
/>
<result
column=
"date_value"
property=
"dateValue"
/>
...
...
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