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

package com.tuoheng.api.service.impl; package com.tuoheng.api.service.impl;


import cn.hutool.core.util.ObjectUtil; 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.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
.eq(WestreamVideoUser::getMark, 1)); .eq(WestreamVideoUser::getMark, 1));


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

Loading…
Cancel
Save