Browse Source

Merge branch 'develop' into release

tags/V1.8.0^2
wanghaoran 1 year ago
parent
commit
db5d738b9a
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      tuoheng-api/src/main/java/com/tuoheng/api/service/impl/WestreamVideoServiceImpl.java

+ 5
- 1
tuoheng-api/src/main/java/com/tuoheng/api/service/impl/WestreamVideoServiceImpl.java View File

@@ -1,6 +1,8 @@
package com.tuoheng.api.service.impl;

import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@@ -102,16 +104,18 @@ public class WestreamVideoServiceImpl extends BaseServiceImpl<WestreamVideoMappe
.eq(WestreamVideoUser::getMark, 1));

if(ObjectUtil.isNull(westreamVideoUser)){
log.info("全民护河学习视频用户表insert,入参:"+ JSON.toJSONString(query));
WestreamVideoUser westreamVideoUserAdd = new WestreamVideoUser();
BeanUtils.copyProperties(query, westreamVideoUserAdd);
westreamVideoUserAdd.setCreateTime(new Date());
westreamVideoUserMapper.insert(westreamVideoUserAdd);
}else {
log.info("全民护河学习视频用户表update,入参:"+ JSON.toJSONString(query));
westreamVideoUser.setVideoProgress(query.getVideoProgress());
westreamVideoUser.setStatus(query.getStatus());
westreamVideoUserMapper.updateById(westreamVideoUser);
//视频学习完成,开始计算积分
if(2 == query.getStatus()){
if(2 == query.getStatus().intValue()){
log.info("视频学习完成,开始计算积分【" + query.getTenantId() +"】"+ query.getOpenid());
//查询学习视频 积分设置
ThDict thDict = thDictMapper.selectOne(new LambdaQueryWrapper<ThDict>()

Loading…
Cancel
Save