1.调整ai话术生成逻辑
parent
760c69e3a0
commit
e07684fbb4
@ -0,0 +1,20 @@
|
|||||||
|
package com.supervision.livedigitalavatarmanage.config;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class ThreadPoolConfig {
|
||||||
|
|
||||||
|
@Bean("taskExecutor")
|
||||||
|
public ThreadPoolTaskExecutor taskExecutor() {
|
||||||
|
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||||
|
executor.setCorePoolSize(1);
|
||||||
|
executor.setMaxPoolSize(1);
|
||||||
|
executor.setQueueCapacity(1000);
|
||||||
|
executor.setThreadNamePrefix("Async-Task-");
|
||||||
|
executor.initialize();
|
||||||
|
return executor;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.supervision.livedigitalavatarmanage.constant;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public enum TaskStautsEnum {
|
||||||
|
|
||||||
|
WAITING(0, "等待中"),
|
||||||
|
RUNNING(1, "进行中"),
|
||||||
|
SUCCESS(2, "成功"),
|
||||||
|
FAILED(3, "失败");
|
||||||
|
|
||||||
|
private final int code;
|
||||||
|
private final String description;
|
||||||
|
|
||||||
|
TaskStautsEnum(int code, String description) {
|
||||||
|
this.code = code;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,66 @@
|
|||||||
|
package com.supervision.livedigitalavatarmanage.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 话术重要点表
|
||||||
|
* @TableName script_keypoints
|
||||||
|
*/
|
||||||
|
@TableName(value ="script_keypoints")
|
||||||
|
@Data
|
||||||
|
public class ScriptKeypoints implements Serializable {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 话术类型
|
||||||
|
*/
|
||||||
|
private String scriptType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 话术组id
|
||||||
|
*/
|
||||||
|
private String scriptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关键点
|
||||||
|
*/
|
||||||
|
private String keyPoint;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关键点示例
|
||||||
|
*/
|
||||||
|
private String keyPointExample;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 话术类型序号 数值越小优先级越高
|
||||||
|
*/
|
||||||
|
private String scriptTypeOrderNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关键点序号 数值越小优先级越高
|
||||||
|
*/
|
||||||
|
private Integer keyPointOrderNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
package com.supervision.livedigitalavatarmanage.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 话术组信息
|
||||||
|
* @TableName script_user
|
||||||
|
*/
|
||||||
|
@TableName(value ="script_user")
|
||||||
|
@Data
|
||||||
|
public class ScriptUser implements Serializable {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 话术名称
|
||||||
|
*/
|
||||||
|
private String scriptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品分类
|
||||||
|
*/
|
||||||
|
private String productCategory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
package com.supervision.livedigitalavatarmanage.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销售话术要点DTO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ScriptKeyPointsDTO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 话术组id
|
||||||
|
*/
|
||||||
|
private String scriptGroupId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 话术名称
|
||||||
|
*/
|
||||||
|
private String scriptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品分类
|
||||||
|
*/
|
||||||
|
private String productCategory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 话术类型
|
||||||
|
*/
|
||||||
|
private String scriptType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 话术组id
|
||||||
|
*/
|
||||||
|
private String scriptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关键点
|
||||||
|
*/
|
||||||
|
private String keyPoint;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关键点示例
|
||||||
|
*/
|
||||||
|
private String keyPointExample;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 话术类型序号 数值越小优先级越高
|
||||||
|
*/
|
||||||
|
private Integer scriptTypeOrderNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关键点序号 数值越小优先级越高
|
||||||
|
*/
|
||||||
|
private Integer keyPointOrderNum;
|
||||||
|
|
||||||
|
|
||||||
|
public ScriptKeyPointsDTO() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public ScriptKeyPointsDTO(String scriptType, String keyPoint, String keyPointExample) {
|
||||||
|
this.scriptType = scriptType;
|
||||||
|
this.keyPoint = keyPoint;
|
||||||
|
this.keyPointExample = keyPointExample;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.supervision.livedigitalavatarmanage.mapper;
|
||||||
|
|
||||||
|
import com.supervision.livedigitalavatarmanage.domain.AsyncTaskResult;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Administrator
|
||||||
|
* @description 针对表【async_task_result(异步任务结果表)】的数据库操作Mapper
|
||||||
|
* @createDate 2025-09-17 15:35:10
|
||||||
|
* @Entity com.supervision.livedigitalavatarmanage.domain.AsyncTaskResult
|
||||||
|
*/
|
||||||
|
public interface AsyncTaskResultMapper extends BaseMapper<AsyncTaskResult> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
|||||||
|
package com.supervision.livedigitalavatarmanage.mapper;
|
||||||
|
|
||||||
|
import com.supervision.livedigitalavatarmanage.domain.ScriptKeypoints;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.supervision.livedigitalavatarmanage.dto.ScriptKeyPointsDTO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Administrator
|
||||||
|
* @description 针对表【script_keypoints(话术重要点表)】的数据库操作Mapper
|
||||||
|
* @createDate 2025-09-17 10:57:12
|
||||||
|
* @Entity com.supervision.livedigitalavatarmanage.domain.ScriptKeypoints
|
||||||
|
*/
|
||||||
|
public interface ScriptKeypointsMapper extends BaseMapper<ScriptKeypoints> {
|
||||||
|
|
||||||
|
List<ScriptKeyPointsDTO> listByUserIdAndProductCategory(@Param("userId") String userId,@Param("productCategory") String productCategory);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.supervision.livedigitalavatarmanage.mapper;
|
||||||
|
|
||||||
|
import com.supervision.livedigitalavatarmanage.domain.ScriptUser;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Administrator
|
||||||
|
* @description 针对表【script_user(话术组信息)】的数据库操作Mapper
|
||||||
|
* @createDate 2025-09-17 10:57:12
|
||||||
|
* @Entity com.supervision.livedigitalavatarmanage.domain.ScriptUser
|
||||||
|
*/
|
||||||
|
public interface ScriptUserMapper extends BaseMapper<ScriptUser> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.supervision.livedigitalavatarmanage.service;
|
||||||
|
|
||||||
|
import com.supervision.livedigitalavatarmanage.domain.AsyncTaskResult;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
import java.util.concurrent.Callable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Administrator
|
||||||
|
* @description 针对表【async_task_result(异步任务结果表)】的数据库操作Service
|
||||||
|
* @createDate 2025-09-17 15:35:10
|
||||||
|
*/
|
||||||
|
public interface AsyncTaskResultService extends IService<AsyncTaskResult> {
|
||||||
|
|
||||||
|
<T> String submitAsyncTask(String taskType, Object requestData, Callable<T> callable);
|
||||||
|
|
||||||
|
|
||||||
|
int cleanExpiredTasks();
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.supervision.livedigitalavatarmanage.service;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class ExpiredTaskCleaner {
|
||||||
|
|
||||||
|
private final AsyncTaskResultService asyncTaskResultService;
|
||||||
|
|
||||||
|
@Scheduled(cron = "0 0 2 * * ?") // 每天凌晨2点执行
|
||||||
|
public void cleanExpiredTasks() {
|
||||||
|
|
||||||
|
int count = asyncTaskResultService.cleanExpiredTasks();
|
||||||
|
log.info("清理了 {} 条过期任务记录", count);
|
||||||
|
}
|
||||||
|
}
|
@ -1,10 +1,14 @@
|
|||||||
package com.supervision.livedigitalavatarmanage.service;
|
package com.supervision.livedigitalavatarmanage.service;
|
||||||
|
|
||||||
|
import com.supervision.livedigitalavatarmanage.dto.AsyncTaskResultDTO;
|
||||||
import com.supervision.livedigitalavatarmanage.vo.SalesPitchReqVo;
|
import com.supervision.livedigitalavatarmanage.vo.SalesPitchReqVo;
|
||||||
|
import com.supervision.livedigitalavatarmanage.vo.SalesPitchResVo;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface LiveDigitalService {
|
public interface LiveDigitalService {
|
||||||
List<String> generateSalesPitch(SalesPitchReqVo salespitchReqVo);
|
List<SalesPitchResVo> generateSalesPitch(SalesPitchReqVo salespitchReqVo);
|
||||||
|
|
||||||
|
String submitSalesPitchTask(SalesPitchReqVo salespitchReqVo);
|
||||||
|
|
||||||
|
AsyncTaskResultDTO<List<SalesPitchResVo>> querySalespitchTaskResult(String taskId);
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
package com.supervision.livedigitalavatarmanage.service;
|
||||||
|
|
||||||
|
import com.supervision.livedigitalavatarmanage.domain.ScriptKeypoints;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.supervision.livedigitalavatarmanage.dto.ScriptKeyPointsDTO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Administrator
|
||||||
|
* @description 针对表【script_keypoints(话术重要点表)】的数据库操作Service
|
||||||
|
* @createDate 2025-09-17 10:57:12
|
||||||
|
*/
|
||||||
|
public interface ScriptKeypointsService extends IService<ScriptKeypoints> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户ID和产品类别查询话术重点
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param productCategory 产品类别
|
||||||
|
* @return 话术重点列表
|
||||||
|
*/
|
||||||
|
List<ScriptKeyPointsDTO> listByUserIdAndProductCategory(String userId, String productCategory);
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package com.supervision.livedigitalavatarmanage.service;
|
||||||
|
|
||||||
|
import com.supervision.livedigitalavatarmanage.domain.ScriptUser;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Administrator
|
||||||
|
* @description 针对表【script_user(话术组信息)】的数据库操作Service
|
||||||
|
* @createDate 2025-09-17 10:57:12
|
||||||
|
*/
|
||||||
|
public interface ScriptUserService extends IService<ScriptUser> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.supervision.livedigitalavatarmanage.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.supervision.livedigitalavatarmanage.domain.ScriptKeypoints;
|
||||||
|
import com.supervision.livedigitalavatarmanage.dto.ScriptKeyPointsDTO;
|
||||||
|
import com.supervision.livedigitalavatarmanage.service.ScriptKeypointsService;
|
||||||
|
import com.supervision.livedigitalavatarmanage.mapper.ScriptKeypointsMapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Administrator
|
||||||
|
* @description 针对表【script_keypoints(话术重要点表)】的数据库操作Service实现
|
||||||
|
* @createDate 2025-09-17 10:57:12
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ScriptKeypointsServiceImpl extends ServiceImpl<ScriptKeypointsMapper, ScriptKeypoints>
|
||||||
|
implements ScriptKeypointsService{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ScriptKeyPointsDTO> listByUserIdAndProductCategory(String userId, String productCategory) {
|
||||||
|
return super.getBaseMapper().listByUserIdAndProductCategory(userId,productCategory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
|||||||
|
package com.supervision.livedigitalavatarmanage.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.supervision.livedigitalavatarmanage.domain.ScriptUser;
|
||||||
|
import com.supervision.livedigitalavatarmanage.service.ScriptUserService;
|
||||||
|
import com.supervision.livedigitalavatarmanage.mapper.ScriptUserMapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Administrator
|
||||||
|
* @description 针对表【script_user(话术组信息)】的数据库操作Service实现
|
||||||
|
* @createDate 2025-09-17 10:57:12
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ScriptUserServiceImpl extends ServiceImpl<ScriptUserMapper, ScriptUser>
|
||||||
|
implements ScriptUserService{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.supervision.livedigitalavatarmanage.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SalesPitchResVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销售话术
|
||||||
|
*/
|
||||||
|
private String salesPitch;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 话术类型
|
||||||
|
*/
|
||||||
|
private String scriptType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 话术名称
|
||||||
|
*/
|
||||||
|
private String scriptName;
|
||||||
|
|
||||||
|
public SalesPitchResVo() {
|
||||||
|
}
|
||||||
|
public SalesPitchResVo(String salesPitch, String scriptType, String scriptName) {
|
||||||
|
this.salesPitch = salesPitch;
|
||||||
|
this.scriptType = scriptType;
|
||||||
|
this.scriptName = scriptName;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
<?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.supervision.livedigitalavatarmanage.mapper.AsyncTaskResultMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.supervision.livedigitalavatarmanage.domain.AsyncTaskResult">
|
||||||
|
<id property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="taskType" column="task_type" jdbcType="VARCHAR"/>
|
||||||
|
<result property="status" column="status" jdbcType="SMALLINT"/>
|
||||||
|
<result property="requestData" column="request_data" jdbcType="VARCHAR"/>
|
||||||
|
<result property="resultData" column="result_data" jdbcType="VARCHAR"/>
|
||||||
|
<result property="errorMessage" column="error_message" jdbcType="VARCHAR"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="expireTime" column="expire_time" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,task_type,status,
|
||||||
|
request_data,result_data,error_message,
|
||||||
|
create_time,update_time,expire_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
@ -0,0 +1,46 @@
|
|||||||
|
<?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.supervision.livedigitalavatarmanage.mapper.ScriptKeypointsMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.supervision.livedigitalavatarmanage.domain.ScriptKeypoints">
|
||||||
|
<id property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="scriptType" column="script_type" jdbcType="VARCHAR"/>
|
||||||
|
<result property="scriptId" column="script_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="keyPoint" column="key_point " jdbcType="VARCHAR"/>
|
||||||
|
<result property="keyPointExample" column="key_point_example" jdbcType="VARCHAR"/>
|
||||||
|
<result property="scriptTypeOrderNum" column="script_type_order_num" jdbcType="INTEGER"/>
|
||||||
|
<result property="keyPointOrderNum" column="keypoint_order_num" jdbcType="INTEGER"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,script_type,script_id,
|
||||||
|
key_point ,key_point_example,script_type_order_num,keypoint_order_num,
|
||||||
|
create_time,update_time
|
||||||
|
</sql>
|
||||||
|
<select id="listByUserIdAndProductCategory" resultType="com.supervision.livedigitalavatarmanage.dto.ScriptKeyPointsDTO">
|
||||||
|
SELECT
|
||||||
|
su.script_name,
|
||||||
|
su.product_category,
|
||||||
|
su.user_id,
|
||||||
|
sk.script_id as script_group_id,
|
||||||
|
sk.script_type,
|
||||||
|
sk.key_point,
|
||||||
|
sk.key_point_example,
|
||||||
|
sk.keypoint_order_num,
|
||||||
|
sk.script_type_order_num
|
||||||
|
FROM script_user su
|
||||||
|
LEFT JOIN script_keypoints sk ON su.id = sk.script_id
|
||||||
|
<where>
|
||||||
|
<if test="userId != null">
|
||||||
|
AND su.user_id = #{userId}
|
||||||
|
</if>
|
||||||
|
<if test="productCategory != null and productCategory != ''">
|
||||||
|
AND su.product_category = #{productCategory}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,20 @@
|
|||||||
|
<?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.supervision.livedigitalavatarmanage.mapper.ScriptUserMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.supervision.livedigitalavatarmanage.domain.ScriptUser">
|
||||||
|
<id property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="scriptName" column="script_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="productCategory" column="product_category" jdbcType="VARCHAR"/>
|
||||||
|
<result property="userId" column="user_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,script_name,product_category,
|
||||||
|
user_id,create_time,update_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue