Commit a9441ff6 by 高鹏

Merge branch 'feat-zdw' into 'master'

feat-zdw: 打卡作品旧数据迁移

See merge request rays/pcloud-book!148
parents d9e3e2ed 39e1c260
...@@ -61,12 +61,15 @@ import java.util.concurrent.ExecutorService; ...@@ -61,12 +61,15 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
/** /**
* @Author: hzk * @Author: hzk
* @Date: 2019/5/24 14:50 * @Date: 2019/5/24 14:50
* @Version 1.0 * @Version 1.0
*/ */
@Component("bookClockBiz") @Component("bookClockBiz")
@Slf4j
public class BookClockBizImpl implements BookClockBiz { public class BookClockBizImpl implements BookClockBiz {
@Autowired @Autowired
...@@ -459,8 +462,8 @@ public class BookClockBizImpl implements BookClockBiz { ...@@ -459,8 +462,8 @@ public class BookClockBizImpl implements BookClockBiz {
} }
@Override @Override
@ParamLog("微信群打卡作品数据迁移")
public void dealOldData4WeixinAtt() { public void dealOldData4WeixinAtt() {
timedTask.execute(()->{
SetKeywordVO setKeywordVO = new SetKeywordVO(); SetKeywordVO setKeywordVO = new SetKeywordVO();
List<BookClockInfoDTO> clockInfoIds = bookClockInfoDao.getAllAttInfoIds(); List<BookClockInfoDTO> clockInfoIds = bookClockInfoDao.getAllAttInfoIds();
if(!ListUtils.isEmpty(clockInfoIds)){ if(!ListUtils.isEmpty(clockInfoIds)){
...@@ -487,18 +490,22 @@ public class BookClockBizImpl implements BookClockBiz { ...@@ -487,18 +490,22 @@ public class BookClockBizImpl implements BookClockBiz {
setKeywordVO.setDescription("签到打卡"); setKeywordVO.setDescription("签到打卡");
setKeywordVO.setAddWarehouse(0); setKeywordVO.setAddWarehouse(0);
setKeywordVO.setClassifyId(id); setKeywordVO.setClassifyId(id);
setKeywordVO.setReplyType(1); setKeywordVO.setSetType(1);
setKeywordVO.setReplyType(4); setKeywordVO.setReplyType(4);
setKeywordVO.setMatchingRule(0); setKeywordVO.setMatchingRule(0);
setKeywordVO.setBookGroupId(classifyVO.getBookGroupId()); setKeywordVO.setBookGroupId(classifyVO.getBookGroupId());
setKeywordVO.setContent(bookClockInfoDTO.getOriginTitle()); setKeywordVO.setContent(bookClockInfoDTO.getOriginTitle());
setKeywordVO.setServeId(bookClockInfoDTO.getOriginId()); setKeywordVO.setServeId(bookClockInfoDTO.getOriginId());
setKeywordVO.setServeType(bookClockInfoDTO.getOriginType()); setKeywordVO.setServeType(bookClockInfoDTO.getOriginType());
bookKeywordBiz.insertKeyword(setKeywordVO); setKeywordVO.setUserId(bookClockInfoDTO.getCreateUser());
try {
bookKeywordBiz.insertKeyword(setKeywordVO);
}catch (BookBizException e){
log.info("打卡关键词迁移失败:"+e.toString());
}
} }
} }
} }
} }
});
} }
} }
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
<select id="getAllAttInfoIds" parameterType="map" resultMap="BaseResultMapDTO"> <select id="getAllAttInfoIds" parameterType="map" resultMap="BaseResultMapDTO">
select <include refid="Base_Column_List"/> select <include refid="Base_Column_List"/>
from book_clock_info where origin_type = 'APP' from book_clock_info where origin_type = 'PRODUCT'
</select> </select>
</mapper> </mapper>
\ No newline at end of file
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