|
|
@@ -1,6 +1,7 @@
|
|
|
package com.fs.app.controller;
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
import com.fs.app.annotation.Login;
|
|
|
import com.fs.app.config.ImageStorageConfig;
|
|
|
@@ -11,6 +12,7 @@ import com.fs.common.enums.BusinessType;
|
|
|
import com.fs.common.utils.StringUtils;
|
|
|
import com.fs.company.domain.CompanyUser;
|
|
|
import com.fs.company.service.ICompanyUserService;
|
|
|
+import com.fs.course.config.CourseConfig;
|
|
|
import com.fs.course.domain.FsUserCoursePeriod;
|
|
|
import com.fs.course.dto.BatchSendCourseDTO;
|
|
|
import com.fs.course.dto.BatchUrgeCourseDTO;
|
|
|
@@ -31,6 +33,7 @@ import com.fs.im.service.IFsImMsgSendDetailService;
|
|
|
import com.fs.im.service.IFsImMsgSendLogService;
|
|
|
import com.fs.im.service.OpenIMService;
|
|
|
import com.fs.im.vo.FsImMsgSendLogVO;
|
|
|
+import com.fs.system.service.ISysConfigService;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import io.swagger.annotations.Api;
|
|
|
@@ -77,6 +80,11 @@ public class FsUserCourseVideoController extends AppBaseController {
|
|
|
@Autowired
|
|
|
private IFsImMsgSendLogService imMsgSendLogService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ISysConfigService configService;
|
|
|
+
|
|
|
+ private final String FANG_HUA_APP_ID = "wx503cf8ab31f83dd4";
|
|
|
+
|
|
|
@Login
|
|
|
@GetMapping("/pageList")
|
|
|
@ApiOperation("课程分页列表")
|
|
|
@@ -348,4 +356,22 @@ public class FsUserCourseVideoController extends AppBaseController {
|
|
|
return imMsgSendLogService.deleteFsImMsgSendLogAndDetail(logId);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation("获取登录小程id值")
|
|
|
+ @GetMapping("/getLoginMiniAppId/{appId}")
|
|
|
+ public ResponseResult getLoginMiniAppId(@PathVariable String appId){
|
|
|
+ String json = configService.selectConfigByKey("course.config");
|
|
|
+ if(null == json || com.hc.openapi.tool.util.StringUtils.isBlank(json)){
|
|
|
+ ResponseResult.fail(500,"请先配置课程系统参数");
|
|
|
+ }
|
|
|
+ CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
|
|
|
+ //判断配置的appid是否为芳华惠选appid 如果配置了直接返回芳华惠选的appid
|
|
|
+ if(null != config && StringUtils.isNotBlank(config.getLoginMiniAppId())){
|
|
|
+ String loginMiniAppId = config.getLoginMiniAppId();
|
|
|
+ if(FANG_HUA_APP_ID.equals(loginMiniAppId)){
|
|
|
+ return ResponseResult.ok(FANG_HUA_APP_ID);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return ResponseResult.ok(appId);
|
|
|
+ }
|
|
|
+
|
|
|
}
|