Commit 55485466 by 裴大威

Merge branch 'feat-1002440' into 'master'

【1002440】方案进度展示H5页面平台端设置

See merge request rays/pcloud-book!463
parents 4d40144e ceae1218
...@@ -51,7 +51,7 @@ public interface PersonalStageBiz { ...@@ -51,7 +51,7 @@ public interface PersonalStageBiz {
void sendNotKeywordReply(String robotId, String userWxId, String ip, Long personalStageId, Long personalStageUserId); void sendNotKeywordReply(String robotId, String userWxId, String ip, Long personalStageId, Long personalStageUserId);
void sendNotKeywordFusingReply(String robotId, String userWxId, String ip, Long personalStageId); void sendNotKeywordFusingReply(String robotId, String userWxId, String ip, Long personalStageId,Long personalStageUserId);
void dealDelayFusingFinish(DelayQueueDTO dto); void dealDelayFusingFinish(DelayQueueDTO dto);
......
package com.pcloud.book.personalstage.biz;
import com.pcloud.book.personalstage.entity.PersonalStageProgressMessage;
import com.pcloud.common.page.PageBeanNew;
import java.util.List;
/**
* (PersonalStageProgressMessage)表服务接口
*
* @author zyq
* @since 2020-02-25 09:56:00
*/
public interface PersonalStageProgressMessageBiz {
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
PersonalStageProgressMessage getById(Long id);
/**
* 分页查询
*/
List<PersonalStageProgressMessage> getProgressMessageList();
/**
* 新增数据
*
* @param personalStageProgressMessage 实例对象
* @return 主键
*/
Long save(List<PersonalStageProgressMessage> personalStageProgressMessage);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 是否成功
*/
void deleteById(Long id);
}
\ No newline at end of file
...@@ -289,8 +289,19 @@ public class PersonalStageBizImpl implements PersonalStageBiz { ...@@ -289,8 +289,19 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
//是关键词且有记录 //是关键词且有记录
if (iskeyword){ if (iskeyword){
LOGGER.info("是关键词且有记录"); LOGGER.info("是关键词且有记录");
//调关键词处理逻辑 String key = "PERSONAL_STAGE_JUMP_KEYWORD_LOCK".concat(userWxId).concat(robotId);
personalStageJumpBiz.handlePersonalStageJump(userWxId,robotId,content,JumpTypeEnum.READER_TRIGGER); try {
// 加锁,一条一条数据进行处理
while (!CacheUtils.lock(key)) {
Thread.sleep(100);
}
//调关键词处理逻辑
personalStageJumpBiz.handlePersonalStageJump(userWxId,robotId,content,JumpTypeEnum.READER_TRIGGER);
} catch (Exception e){
LOGGER.info("缓存加锁失败,userWxId=" + userWxId +" robotId="+robotId);
} finally {
CacheUtils.unlock(key);
}
} }
//不是关键词且有记录 //不是关键词且有记录
if (!iskeyword&&hasRecord){ if (!iskeyword&&hasRecord){
...@@ -432,7 +443,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz { ...@@ -432,7 +443,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
String robotId=wakeupDelayDTO.getRobotId(); String robotId=wakeupDelayDTO.getRobotId();
String userWxId=wakeupDelayDTO.getWxId(); String userWxId=wakeupDelayDTO.getWxId();
String ip=wakeupDelayDTO.getIp(); String ip=wakeupDelayDTO.getIp();
sendReplyItems(replyItems,robotId,userWxId,ip); sendReplyItems(replyItems,robotId,userWxId,ip,wakeupDelayDTO.getPersonalStageUserId());
//下一个延时 //下一个延时
List<PersonalStageWakeup> wakeups = personalStageWakeupDao.getListByPersonalStageId(personalStageId); List<PersonalStageWakeup> wakeups = personalStageWakeupDao.getListByPersonalStageId(personalStageId);
int i=0; int i=0;
...@@ -453,6 +464,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz { ...@@ -453,6 +464,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
wakeupDelayDTONew.setWxId(userWxId); wakeupDelayDTONew.setWxId(userWxId);
wakeupDelayDTONew.setIp(ip); wakeupDelayDTONew.setIp(ip);
wakeupDelayDTONew.setPersonalStageId(personalStageId); wakeupDelayDTONew.setPersonalStageId(personalStageId);
wakeupDelayDTONew.setPersonalStageUserId(wakeupDelayDTO.getPersonalStageUserId());
DelayQueueDTO delayQueueDTONew = DelayQueueDTO.builder().key(userWxId).type(PersonalStageConstant.PERSONALSTAGE_DELAY_WAKEUP).msg(wakeupDelayDTONew).timeout(time).build(); DelayQueueDTO delayQueueDTONew = DelayQueueDTO.builder().key(userWxId).type(PersonalStageConstant.PERSONALSTAGE_DELAY_WAKEUP).msg(wakeupDelayDTONew).timeout(time).build();
delayMessageSender.send(delayQueueDTONew); delayMessageSender.send(delayQueueDTONew);
LOGGER.info("下一个延时发送delayQueueDTONew="+delayQueueDTONew.toString()); LOGGER.info("下一个延时发送delayQueueDTONew="+delayQueueDTONew.toString());
...@@ -494,6 +506,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz { ...@@ -494,6 +506,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
wakeupDelayDTO.setWxId(userWxId); wakeupDelayDTO.setWxId(userWxId);
wakeupDelayDTO.setIp(ip); wakeupDelayDTO.setIp(ip);
wakeupDelayDTO.setPersonalStageId(personalStageId); wakeupDelayDTO.setPersonalStageId(personalStageId);
wakeupDelayDTO.setPersonalStageUserId(personalStageUser.getId());
DelayQueueDTO delayQueueDTO = DelayQueueDTO.builder().key(userWxId).type(PersonalStageConstant.PERSONALSTAGE_DELAY_WAKEUP).msg(wakeupDelayDTO).timeout(toStageStartTime*60*1000).build(); DelayQueueDTO delayQueueDTO = DelayQueueDTO.builder().key(userWxId).type(PersonalStageConstant.PERSONALSTAGE_DELAY_WAKEUP).msg(wakeupDelayDTO).timeout(toStageStartTime*60*1000).build();
delayMessageSender.send(delayQueueDTO); delayMessageSender.send(delayQueueDTO);
} }
...@@ -511,9 +524,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz { ...@@ -511,9 +524,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
if (ListUtils.isEmpty(items)){ if (ListUtils.isEmpty(items)){
return; return;
} }
// 替换进度链接 sendReplyItems(items,robotId,userWxId,ip,personalStageUserId);
replaceProjectProgressUrl(items,robotId,userWxId,personalStageUserId);
sendReplyItems(items,robotId,userWxId,ip);
} }
@ParamLog("尝试插入单号") @ParamLog("尝试插入单号")
...@@ -541,7 +552,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz { ...@@ -541,7 +552,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
@ParamLog("非关键词熔断回复") @ParamLog("非关键词熔断回复")
@Override @Override
public void sendNotKeywordFusingReply(String robotId, String userWxId, String ip, Long personalStageId) { public void sendNotKeywordFusingReply(String robotId, String userWxId, String ip, Long personalStageId, Long personalStageUserId) {
List<Long> ids = personalStageReplyDao.getIdsByRelevance(StageReplyRelevEnum.FUSING_NOT_KEYWORD.value, personalStageId); List<Long> ids = personalStageReplyDao.getIdsByRelevance(StageReplyRelevEnum.FUSING_NOT_KEYWORD.value, personalStageId);
if (ListUtils.isEmpty(ids)) { if (ListUtils.isEmpty(ids)) {
return; return;
...@@ -552,11 +563,13 @@ public class PersonalStageBizImpl implements PersonalStageBiz { ...@@ -552,11 +563,13 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
if (ListUtils.isEmpty(items)){ if (ListUtils.isEmpty(items)){
return; return;
} }
sendReplyItems(items,robotId,userWxId,ip); sendReplyItems(items,robotId,userWxId,ip,personalStageUserId);
} }
@ParamLog("发送回复") @ParamLog("发送回复")
private void sendReplyItems(List<PersonalStageReplyItem> replyItems,String robotId, String userWxId, String ip){ private void sendReplyItems(List<PersonalStageReplyItem> replyItems,String robotId, String userWxId, String ip,Long personalStageUserId){
// 替换进度链接
replaceProjectProgressUrl(replyItems,robotId,userWxId,personalStageUserId);
for (PersonalStageReplyItem item:replyItems){ for (PersonalStageReplyItem item:replyItems){
Integer type=item.getReplyType(); Integer type=item.getReplyType();
if (ReplyTypeEnum.TEXT.value.equals(type)) { if (ReplyTypeEnum.TEXT.value.equals(type)) {
...@@ -604,7 +617,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz { ...@@ -604,7 +617,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
if (!JedisClusterUtils.exists(key)) { if (!JedisClusterUtils.exists(key)) {
// 发送熔断回复消息 // 发送熔断回复消息
JedisClusterUtils.set(key, "true", 60); JedisClusterUtils.set(key, "true", 60);
sendNotKeywordFusingReply(robotId, userWxId, ip, personalStage.getId()); sendNotKeywordFusingReply(robotId, userWxId, ip, personalStage.getId(), last.getId());
} }
} }
......
...@@ -54,6 +54,7 @@ import org.slf4j.Logger; ...@@ -54,6 +54,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.Date; import java.util.Date;
...@@ -298,7 +299,7 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz { ...@@ -298,7 +299,7 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
*/ */
@Override @Override
@ParamLog("处理用户阶段跳转逻辑") @ParamLog("处理用户阶段跳转逻辑")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW)
public Boolean handlePersonalStageJump(String userWxId, String robotWxId, String content, JumpTypeEnum jumpTypeEnum) { public Boolean handlePersonalStageJump(String userWxId, String robotWxId, String content, JumpTypeEnum jumpTypeEnum) {
// 查询用户的当前状态信息 // 查询用户的当前状态信息
PersonalStageUser currentStageUser = personalStageUserDao.getLast(userWxId, robotWxId, null); PersonalStageUser currentStageUser = personalStageUserDao.getLast(userWxId, robotWxId, null);
......
package com.pcloud.book.personalstage.biz.impl;
import com.google.common.collect.Lists;
import com.pcloud.book.personalstage.entity.PersonalStageProgressMessage;
import com.pcloud.book.personalstage.dao.PersonalStageProgressMessageDao;
import com.pcloud.book.personalstage.biz.PersonalStageProgressMessageBiz;
import com.pcloud.common.core.aspect.ParamLog;
import com.pcloud.common.page.PageBeanNew;
import com.pcloud.common.page.PageParam;
import com.pcloud.common.exceptions.BizException;
import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.NumberUtil;
import com.pcloud.common.utils.string.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* (PersonalStageProgressMessage)表服务实现类
*
* @author zyq
* @since 2020-02-25 09:56:00
*/
@Service("personalStageProgressMessageBiz")
public class PersonalStageProgressMessageBizImpl implements PersonalStageProgressMessageBiz {
private static final Logger LOGGER = LoggerFactory.getLogger(PersonalStageProgressMessageBizImpl.class);
@Autowired
private PersonalStageProgressMessageDao personalStageProgressMessageDao;
@Override
@ParamLog("通过ID查询单条数据")
public PersonalStageProgressMessage getById(Long id) {
return personalStageProgressMessageDao.getById(id);
}
@Override
@ParamLog("查询多条数据")
public List<PersonalStageProgressMessage> getProgressMessageList() {
List<PersonalStageProgressMessage> progressMessageList = personalStageProgressMessageDao.getProgressMessageList();
if (ListUtils.isEmpty(progressMessageList)){
return Lists.newArrayList();
}
return progressMessageList;
}
@Override
@ParamLog("保存")
@Transactional(rollbackFor = Exception.class)
public Long save(List<PersonalStageProgressMessage> personalStageProgressMessage) {
if(ListUtils.isEmpty(personalStageProgressMessage)){
throw BizException.PARAM_IS_NULL;
}
if(personalStageProgressMessage.stream().filter(x-> StringUtil.isEmpty(x.getContent())).count() > 0){
throw BizException.PARAM_IS_NULL;
}
// 删除所有旧数据
personalStageProgressMessageDao.deleteAll();
// 重新插入
return personalStageProgressMessageDao.insert(personalStageProgressMessage);
}
@Override
@ParamLog("删除")
public void deleteById(Long id) {
personalStageProgressMessageDao.deleteById(id);
}
}
\ No newline at end of file
...@@ -15,4 +15,8 @@ import java.util.List; ...@@ -15,4 +15,8 @@ import java.util.List;
public interface PersonalStageProgressMessageDao extends BaseDao<PersonalStageProgressMessage> { public interface PersonalStageProgressMessageDao extends BaseDao<PersonalStageProgressMessage> {
List<PersonalStageProgressMessage> getPersonalProgress(Date startTime); List<PersonalStageProgressMessage> getPersonalProgress(Date startTime);
List<PersonalStageProgressMessage> getProgressMessageList();
void deleteAll();
} }
\ No newline at end of file
...@@ -22,4 +22,14 @@ public class PersonalStageProgressMessageDaoImpl extends BaseDaoImpl<PersonalSta ...@@ -22,4 +22,14 @@ public class PersonalStageProgressMessageDaoImpl extends BaseDaoImpl<PersonalSta
public List<PersonalStageProgressMessage> getPersonalProgress(Date startTime) { public List<PersonalStageProgressMessage> getPersonalProgress(Date startTime) {
return getSessionTemplate().selectList(getStatement("getPersonalProgress"),startTime); return getSessionTemplate().selectList(getStatement("getPersonalProgress"),startTime);
} }
@Override
public List<PersonalStageProgressMessage> getProgressMessageList() {
return getSessionTemplate().selectList(getStatement("getProgressMessageList"));
}
@Override
public void deleteAll() {
super.getSessionTemplate().delete(getStatement("deleteAll"));
}
} }
\ No newline at end of file
...@@ -34,6 +34,9 @@ public class PersonalStageDTO extends BaseDto { ...@@ -34,6 +34,9 @@ public class PersonalStageDTO extends BaseDto {
@ApiModelProperty("排序值") @ApiModelProperty("排序值")
private Integer seqNum; private Integer seqNum;
@ApiModelProperty("显示进度链接")
private Integer showProgress;
@ApiModelProperty("非关键词回复条数") @ApiModelProperty("非关键词回复条数")
private Integer notKeywordReplyCount; private Integer notKeywordReplyCount;
......
...@@ -20,4 +20,6 @@ public class WakeupDelayDTO implements Serializable { ...@@ -20,4 +20,6 @@ public class WakeupDelayDTO implements Serializable {
private String wxId; private String wxId;
@ApiModelProperty("ip地址") @ApiModelProperty("ip地址")
private String ip; private String ip;
@ApiModelProperty("用户阶段记录id")
private Long personalStageUserId;
} }
...@@ -27,6 +27,9 @@ public class PersonalStage extends BaseEntity { ...@@ -27,6 +27,9 @@ public class PersonalStage extends BaseEntity {
@ApiModelProperty("排序值") @ApiModelProperty("排序值")
private Integer seqNum; private Integer seqNum;
@ApiModelProperty("显示进度链接")
private Integer showProgress;
@ApiModelProperty("阶段非关键词回复集合") @ApiModelProperty("阶段非关键词回复集合")
private List<PersonalStageReply> stageNotKeywordReplies; private List<PersonalStageReply> stageNotKeywordReplies;
......
package com.pcloud.book.personalstage.facade; package com.pcloud.book.personalstage.facade;
import com.pcloud.book.personalstage.biz.PersonalStageBiz; import com.pcloud.book.personalstage.biz.PersonalStageBiz;
import com.pcloud.book.personalstage.biz.PersonalStageProgressMessageBiz;
import com.pcloud.book.personalstage.dto.PersonalStageProgressDTO; import com.pcloud.book.personalstage.dto.PersonalStageProgressDTO;
import com.pcloud.book.personalstage.entity.PersonalStage; import com.pcloud.book.personalstage.entity.PersonalStage;
import com.pcloud.book.personalstage.entity.PersonalStageProgressMessage; import com.pcloud.book.personalstage.entity.PersonalStageProgressMessage;
...@@ -29,6 +30,7 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -29,6 +30,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Optional; import java.util.Optional;
@Api("定制化阶段") @Api("定制化阶段")
...@@ -40,6 +42,8 @@ public class PersonalStageFacade { ...@@ -40,6 +42,8 @@ public class PersonalStageFacade {
private PersonalStageBiz personalStageBiz; private PersonalStageBiz personalStageBiz;
@Autowired @Autowired
private PersonalStageJumpBiz personalStageJumpBiz; private PersonalStageJumpBiz personalStageJumpBiz;
@Autowired
private PersonalStageProgressMessageBiz personalStageProgressMessageBiz;
@ApiOperation("新增定制化阶段") @ApiOperation("新增定制化阶段")
@PostMapping("/createPersonalStage") @PostMapping("/createPersonalStage")
...@@ -194,4 +198,18 @@ public class PersonalStageFacade { ...@@ -194,4 +198,18 @@ public class PersonalStageFacade {
return new ResponseDto<>(personalStageProgressDTO); return new ResponseDto<>(personalStageProgressDTO);
} }
@ApiOperation("查询所有的进度消息")
@GetMapping("getProgressMessageList")
public ResponseDto<?> getProgressMessageList()
throws BizException, PermissionException {
return new ResponseDto<>(personalStageProgressMessageBiz.getProgressMessageList());
}
@ApiOperation("保存进度消息")
@PostMapping("saveProgressMessage")
public ResponseDto<?> saveProgressMessage(@RequestBody List<PersonalStageProgressMessage> personalStageProgressMessage)
throws BizException, PermissionException {
return new ResponseDto<>(personalStageProgressMessageBiz.save(personalStageProgressMessage));
}
} }
...@@ -9,11 +9,12 @@ ...@@ -9,11 +9,12 @@
<result property="notKeywordFusingTime" column="not_keyword_fusing_time" jdbcType="BIGINT"/> <result property="notKeywordFusingTime" column="not_keyword_fusing_time" jdbcType="BIGINT"/>
<result property="robotClassifyId" column="robot_classify_id" jdbcType="BIGINT"/> <result property="robotClassifyId" column="robot_classify_id" jdbcType="BIGINT"/>
<result property="seqNum" column="seq_num" jdbcType="INTEGER"/> <result property="seqNum" column="seq_num" jdbcType="INTEGER"/>
<result property="showProgress" column="show_progress" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, name, not_keyword_fusing_count, not_keyword_fusing_time, robot_classify_id, seq_num, create_time id, name, not_keyword_fusing_count, not_keyword_fusing_time, robot_classify_id, seq_num, show_progress, create_time
</sql> </sql>
<select id="getById" resultMap="BaseResultMap" parameterType="java.lang.Long"> <select id="getById" resultMap="BaseResultMap" parameterType="java.lang.Long">
...@@ -36,6 +37,7 @@ ...@@ -36,6 +37,7 @@
not_keyword_fusing_time, not_keyword_fusing_time,
robot_classify_id, robot_classify_id,
seq_num, seq_num,
show_progress,
create_time create_time
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -44,6 +46,7 @@ ...@@ -44,6 +46,7 @@
#{notKeywordFusingTime,jdbcType=BIGINT}, #{notKeywordFusingTime,jdbcType=BIGINT},
#{robotClassifyId,jdbcType=BIGINT}, #{robotClassifyId,jdbcType=BIGINT},
#{seqNum,jdbcType=INTEGER}, #{seqNum,jdbcType=INTEGER},
#{showProgress,jdbcType=INTEGER},
NOW() NOW()
</trim> </trim>
</insert> </insert>
...@@ -66,6 +69,9 @@ ...@@ -66,6 +69,9 @@
<if test="seqNum != null"> <if test="seqNum != null">
seq_num = #{seqNum,jdbcType=INTEGER}, seq_num = #{seqNum,jdbcType=INTEGER},
</if> </if>
<if test="showProgress != null">
show_progress = #{showProgress,jdbcType=INTEGER},
</if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<mapper namespace="com.pcloud.book.personalstage.dao.impl.PersonalStageProgressMessageDaoImpl"> <mapper namespace="com.pcloud.book.personalstage.dao.impl.PersonalStageProgressMessageDaoImpl">
<resultMap id="BaseResultMap" type="com.pcloud.book.personalstage.entity.PersonalStageProgressMessage"> <resultMap id="BaseResultMap" type="com.pcloud.book.personalstage.entity.PersonalStageProgressMessage">
<id column="id" property="id" jdbcType="INTEGER"/> <id column="id" property="id" jdbcType="BIGINT"/>
<result column="content" property="content" jdbcType="VARCHAR"/> <result column="content" property="content" jdbcType="VARCHAR"/>
<result column="minutes" property="minutes" jdbcType="INTEGER"/> <result column="minutes" property="minutes" jdbcType="INTEGER"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/> <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
WHERE id = #{id} WHERE id = #{id}
</select> </select>
<select id="getList" resultMap="BaseResultMap"> <select id="getProgressMessageList" resultMap="BaseResultMap">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM personal_stage_progress_message FROM personal_stage_progress_message
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
) VALUES ( ) VALUES (
#{content, jdbcType=VARCHAR}, #{content, jdbcType=VARCHAR},
#{minutes, jdbcType=INTEGER}, #{minutes, jdbcType=INTEGER},
#{createTime, jdbcType=TIMESTAMP}, NOW(),
#{updateTime, jdbcType=TIMESTAMP} NOW()
) )
</insert> </insert>
...@@ -50,10 +50,10 @@ ...@@ -50,10 +50,10 @@
) VALUES ) VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
( (
#{content, jdbcType=VARCHAR}, #{item.content, jdbcType=VARCHAR},
#{minutes, jdbcType=INTEGER}, #{item.minutes, jdbcType=INTEGER},
#{createTime, jdbcType=TIMESTAMP}, NOW(),
#{updateTime, jdbcType=TIMESTAMP} NOW()
) )
</foreach> </foreach>
</insert> </insert>
...@@ -83,6 +83,10 @@ ...@@ -83,6 +83,10 @@
DELETE FROM personal_stage_progress_message where id = #{id} DELETE FROM personal_stage_progress_message where id = #{id}
</delete> </delete>
<delete id="deleteAll">
DELETE FROM personal_stage_progress_message
</delete>
<select id="getPersonalProgress" parameterType="date" resultType="com.pcloud.book.personalstage.entity.PersonalStageProgressMessage"> <select id="getPersonalProgress" parameterType="date" resultType="com.pcloud.book.personalstage.entity.PersonalStageProgressMessage">
select select
id, id,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment