|
|
@@ -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>() |