Sfoglia il codice sorgente

Merge branch 'develop' into release

tags/V1.8.0^2
wanghaoran 1 anno fa
parent
commit
f193e342d6
3 ha cambiato i file con 30 aggiunte e 3 eliminazioni
  1. +11
    -0
      tuoheng-api/src/main/java/com/tuoheng/api/controller/WestreamVideoController.java
  2. +2
    -0
      tuoheng-api/src/main/java/com/tuoheng/api/service/IWestreamVideoService.java
  3. +17
    -3
      tuoheng-api/src/main/java/com/tuoheng/api/service/impl/WestreamVideoServiceImpl.java

+ 11
- 0
tuoheng-api/src/main/java/com/tuoheng/api/controller/WestreamVideoController.java Vedi File

@@ -40,4 +40,15 @@ public class WestreamVideoController {
public JsonResult updateProgress(@RequestBody WestreamVideoQuery query) {
return westreamVideoService.updateProgress(query);
}

/**
* 查询学习视频观看进度
*
* @param query 查询条件
* @return
*/
@GetMapping("/getVideoProgress")
public JsonResult getVideoProgress(WestreamVideoQuery query) {
return westreamVideoService.getVideoProgress(query);
}
}

+ 2
- 0
tuoheng-api/src/main/java/com/tuoheng/api/service/IWestreamVideoService.java Vedi File

@@ -9,4 +9,6 @@ public interface IWestreamVideoService extends IBaseService<WestreamVideo> {
JsonResult queryPage(WestreamVideoQuery query);

JsonResult updateProgress(WestreamVideoQuery query);

JsonResult getVideoProgress(WestreamVideoQuery query);
}

+ 17
- 3
tuoheng-api/src/main/java/com/tuoheng/api/service/impl/WestreamVideoServiceImpl.java Vedi File

@@ -10,7 +10,6 @@ import com.tuoheng.api.entity.domain.*;
import com.tuoheng.api.entity.request.WestreamVideoQuery;
import com.tuoheng.api.mapper.*;
import com.tuoheng.api.service.IWestreamVideoService;
import com.tuoheng.api.utils.SmsUtil;
import com.tuoheng.common.common.BaseServiceImpl;
import com.tuoheng.common.utils.CommonUtils;
import com.tuoheng.common.utils.JsonResult;
@@ -19,9 +18,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
* 全民护河学习视频表 服务实现类
@@ -154,4 +151,21 @@ public class WestreamVideoServiceImpl extends BaseServiceImpl<WestreamVideoMappe

return JsonResult.success();
}

@Override
public JsonResult getVideoProgress(WestreamVideoQuery query) {
if(null == query.getTenantId() || StringUtils.isEmpty(query.getOpenid())){
return JsonResult.error("参数为空!");
}
if(null == query.getVideoId()){
return JsonResult.error("视频ID为空!");
}

WestreamVideoUser westreamVideoUser = westreamVideoUserMapper.selectOne(new LambdaQueryWrapper<WestreamVideoUser>()
.eq(WestreamVideoUser::getTenantId, query.getTenantId())
.eq(WestreamVideoUser::getOpenid, query.getOpenid())
.eq(WestreamVideoUser::getVideoId, query.getVideoId())
.eq(WestreamVideoUser::getMark, 1));
return JsonResult.success(westreamVideoUser);
}
}

Loading…
Annulla
Salva