三七 2 тижнів тому
батько
коміт
094082465d

+ 12 - 3
fs-company/src/main/java/com/fs/user/FsUserAdminController.java

@@ -36,6 +36,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Date;
+import java.util.List;
 
 @Api(tags = "会员管理接口")
 @RestController
@@ -47,9 +48,6 @@ public class FsUserAdminController extends BaseController {
     @Autowired
     private IFsUserService fsUserService;
 
-    @Autowired
-    private ICompanyUserCacheService companyUserCacheService;
-
     @Autowired
     private TokenService tokenService;
 
@@ -65,6 +63,7 @@ public class FsUserAdminController extends BaseController {
     @Autowired
     private IFsUserCompanyUserService fsUserCompanyUserService;
 
+
     @PreAuthorize("@ss.hasPermi('user:fsUser:list')")
     @PostMapping("/list")
     @ApiOperation("会员列表(与移动端使用的相同查询)")
@@ -192,4 +191,14 @@ public class FsUserAdminController extends BaseController {
         return openIMService.batchSendCourse(batchSendCourseDTO);
     }
 
+    @PreAuthorize("@ss.hasPermi('his:user:unbind')")
+    @Log(title = "批量解绑会员(删除销售和会员的关系)", businessType = BusinessType.DELETE)
+    @DeleteMapping("/batchUnbind")
+    public AjaxResult batchUnbind(@RequestBody List<Long> userIds){
+        if(!userIds.isEmpty()){
+            return toAjax(fsUserCompanyUserService.batchUnbind(userIds));
+        } else {
+            return error("请先选择会员");
+        }
+    }
 }

+ 2 - 2
fs-service/src/main/resources/mapper/sop/QwSopTempVoiceMapper.xml

@@ -64,8 +64,8 @@
         select id,company_user_id companyUserId,voice_txt voiceTxt from qw_sop_temp_voice where id = #{id}
                                                                                             and voice_txt = #{voiceTxt} and record_type in (0,1) limit 1
     </select>
-    <select id="selectQwSopTempVoiceByIdAndUserVoiceUrl" resultType="com.fs.sop.domain.QwSopTempVoice">
-        select id,company_user_id companyUserId from qw_sop_temp_voice where id = #{id} and record_type in (0,1,2) limit 1
+    <select id="selectQwSopTempVoiceByIdAndUserVoiceUrl" resultType="com.fs.sop.domain.QwSopTempVoice" >
+        select id,company_user_id companyUserId,voice_txt voiceTxt from qw_sop_temp_voice where id = #{id} and record_type in (0,1,2) limit 1
     </select>
     <select id="selectQwSopTempVoiceNewList" resultType="com.fs.sop.domain.QwSopTempVoice">
         select id,voice_txt voiceTxt,company_user_id companyUserId,voice_url voiceUrl,duration,record_type recordType,