|
|
@@ -1,6 +1,7 @@
|
|
|
package com.fs.user;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
import com.fs.common.annotation.Log;
|
|
|
import com.fs.common.core.controller.BaseController;
|
|
|
import com.fs.common.core.domain.AjaxResult;
|
|
|
@@ -10,12 +11,17 @@ import com.fs.common.enums.BusinessType;
|
|
|
import com.fs.common.utils.ServletUtils;
|
|
|
import com.fs.common.utils.StringUtils;
|
|
|
import com.fs.company.cache.ICompanyUserCacheService;
|
|
|
+import com.fs.course.dto.BatchSendCourseDTO;
|
|
|
+import com.fs.course.param.FsCourseLinkCreateParam;
|
|
|
+import com.fs.course.service.IFsUserCourseService;
|
|
|
import com.fs.framework.security.LoginUser;
|
|
|
import com.fs.framework.service.TokenService;
|
|
|
|
|
|
import com.fs.his.domain.FsUser;
|
|
|
import com.fs.his.service.IFsUserService;
|
|
|
import com.fs.his.utils.PhoneUtil;
|
|
|
+import com.fs.im.dto.OpenImResponseDTO;
|
|
|
+import com.fs.im.service.OpenIMService;
|
|
|
import com.fs.qw.domain.CustomerTransferApproval;
|
|
|
import com.fs.qw.dto.FsUserTransferParamDTO;
|
|
|
import com.fs.qw.service.ICustomerTransferApprovalService;
|
|
|
@@ -24,6 +30,7 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -51,6 +58,12 @@ public class FsUserAdminController extends BaseController {
|
|
|
@Autowired
|
|
|
private ICustomerTransferApprovalService transferApprovalService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IFsUserCourseService fsUserCourseService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private OpenIMService openIMService;
|
|
|
+
|
|
|
@PreAuthorize("@ss.hasPermi('user:fsUser:list')")
|
|
|
@PostMapping("/list")
|
|
|
@ApiOperation("会员列表(与移动端使用的相同查询)")
|
|
|
@@ -147,4 +160,17 @@ public class FsUserAdminController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @ApiOperation("后台会员批量发送课程消息")
|
|
|
+ @PostMapping("/batchSendCourse")
|
|
|
+ public OpenImResponseDTO batchSendCourse(@RequestBody BatchSendCourseDTO batchSendCourseDTO) throws JsonProcessingException {
|
|
|
+ // 生成看课短链
|
|
|
+ FsCourseLinkCreateParam fsCourseLinkCreateParam = new FsCourseLinkCreateParam();
|
|
|
+ BeanUtils.copyProperties(batchSendCourseDTO, fsCourseLinkCreateParam);
|
|
|
+ R courseSortLink = fsUserCourseService.createCourseSortLink(fsCourseLinkCreateParam);
|
|
|
+ String url = courseSortLink.get("url").toString();
|
|
|
+ batchSendCourseDTO.setUrl(url);
|
|
|
+
|
|
|
+ return openIMService.batchSendCourse(batchSendCourseDTO);
|
|
|
+ }
|
|
|
+
|
|
|
}
|