|
@@ -10,9 +10,11 @@ import com.fs.common.core.domain.ResponseResult;
|
|
|
import com.fs.common.enums.BusinessType;
|
|
import com.fs.common.enums.BusinessType;
|
|
|
import com.fs.common.exception.ServiceException;
|
|
import com.fs.common.exception.ServiceException;
|
|
|
import com.fs.common.utils.StringUtils;
|
|
import com.fs.common.utils.StringUtils;
|
|
|
|
|
+import com.fs.company.domain.Company;
|
|
|
import com.fs.company.domain.CompanyMiniapp;
|
|
import com.fs.company.domain.CompanyMiniapp;
|
|
|
import com.fs.company.domain.CompanyUser;
|
|
import com.fs.company.domain.CompanyUser;
|
|
|
import com.fs.company.service.ICompanyMiniappService;
|
|
import com.fs.company.service.ICompanyMiniappService;
|
|
|
|
|
+import com.fs.company.service.ICompanyService;
|
|
|
import com.fs.company.service.ICompanyUserService;
|
|
import com.fs.company.service.ICompanyUserService;
|
|
|
import com.fs.course.domain.FsUserCoursePeriod;
|
|
import com.fs.course.domain.FsUserCoursePeriod;
|
|
|
import com.fs.course.dto.BatchSendCourseDTO;
|
|
import com.fs.course.dto.BatchSendCourseDTO;
|
|
@@ -39,6 +41,7 @@ import com.github.pagehelper.PageInfo;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
+import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -81,6 +84,8 @@ public class FsUserCourseVideoController extends AppBaseController {
|
|
|
private IFsImMsgSendLogService imMsgSendLogService;
|
|
private IFsImMsgSendLogService imMsgSendLogService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ICompanyMiniappService companyMiniAppService;
|
|
private ICompanyMiniappService companyMiniAppService;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private ICompanyService companyService;
|
|
|
|
|
|
|
|
@Login
|
|
@Login
|
|
|
@GetMapping("/pageList")
|
|
@GetMapping("/pageList")
|
|
@@ -275,6 +280,21 @@ public class FsUserCourseVideoController extends AppBaseController {
|
|
|
return ResponseResult.ok(courseLinkService.getGotoWxAppLink(linkStr,appid));
|
|
return ResponseResult.ok(courseLinkService.getGotoWxAppLink(linkStr,appid));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @GetMapping("/getGotoAppLink")
|
|
|
|
|
+ @ApiOperation("获取跳转微信小程序的链接地址")
|
|
|
|
|
+ public ResponseResult<String> getGotoWxAppLink(String linkStr, Long companyId) {
|
|
|
|
|
+ Company company = companyService.selectCompanyById(companyId);
|
|
|
|
|
+ String appid;
|
|
|
|
|
+ if (CollectionUtils.isNotEmpty(company.getMiniAppMaster())){
|
|
|
|
|
+ appid = company.getMiniAppMaster().get(0);
|
|
|
|
|
+ }else if (CollectionUtils.isNotEmpty(company.getMiniAppServer())){
|
|
|
|
|
+ appid = company.getMiniAppServer().get(0);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ return ResponseResult.fail(500,"请在后台配置主备小程序!");
|
|
|
|
|
+ }
|
|
|
|
|
+ return ResponseResult.ok(courseLinkService.getGotoWxAppLink(linkStr,appid));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@ApiOperation("会员批量发送课程消息")
|
|
@ApiOperation("会员批量发送课程消息")
|
|
|
@PostMapping("/batchSendCourse")
|
|
@PostMapping("/batchSendCourse")
|
|
|
public OpenImResponseDTO batchSendCourse(@RequestBody BatchSendCourseDTO batchSendCourseDTO) throws JsonProcessingException {
|
|
public OpenImResponseDTO batchSendCourse(@RequestBody BatchSendCourseDTO batchSendCourseDTO) throws JsonProcessingException {
|