8 Commits 071175b915 ... 0166902185

Autor SHA1 Mensagem Data
  liujc 0166902185 merge 1 mês atrás
  liujc 17374b0a59 fix 1 mês atrás
  liujc 3d084b3e1b fix 1 mês atrás
  liujc d10771d3fc fix 1 mês atrás
  liujc f3adeb5bfe 聊天用户处理 1 mês atrás
  liujc 7d83173ee6 注销三方im 1 mês atrás
  liujc cf986bf199 移除粉丝 1 mês atrás
  liujc eda0e40611 注销账号,修改名称和头像 1 mês atrás
30 arquivos alterados com 279 adições e 3 exclusões
  1. 50 0
      cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/ImUserFriendController.java
  2. 6 0
      cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/SysUserController.java
  3. 17 0
      cooleshow-app/src/main/java/com/yonge/cooleshow/student/controller/ImUserFriendController.java
  4. 16 0
      cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/ImUserFriendController.java
  5. 12 0
      cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/TeacherController.java
  6. 1 0
      cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/dal/dao/SysUserDao.java
  7. 4 0
      cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/service/impl/SysUserServiceImpl.java
  8. 5 0
      cooleshow-auth/auth-server/src/main/resources/config/mybatis/SysUserMapper.xml
  9. 1 0
      cooleshow-common/src/main/java/com/yonge/cooleshow/common/constant/SysConfigConstant.java
  10. 2 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/StudentStarDao.java
  11. 2 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/ImUserFriendService.java
  12. 2 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/StudentTotalService.java
  13. 2 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/TeacherService.java
  14. 2 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/TeacherTotalService.java
  15. 9 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/im/ImGroupCoreService.java
  16. 29 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/im/impl/ImGroupCoreServiceImpl.java
  17. 1 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseHomeworkServiceImpl.java
  18. 18 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/ImUserFriendServiceImpl.java
  19. 2 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/StudentTotalServiceImpl.java
  20. 9 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/SysUserServiceImpl.java
  21. 14 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TeacherServiceImpl.java
  22. 2 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TeacherTotalServiceImpl.java
  23. 14 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseHomeworkVo.java
  24. 13 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/MyCourseVo.java
  25. 11 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/StudentHomeworkVo.java
  26. 27 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/im/ImUserFriendVO.java
  27. 2 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseHomeworkMapper.xml
  28. 1 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  29. 4 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/StudentStarMapper.xml
  30. 1 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/SysUserMapper.xml

+ 50 - 0
cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/ImUserFriendController.java

@@ -0,0 +1,50 @@
+package com.yonge.cooleshow.admin.controller;
+
+
+import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
+import com.yonge.cooleshow.auth.api.entity.SysUser;
+import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
+import com.yonge.cooleshow.biz.dal.enums.MK;
+import com.yonge.cooleshow.biz.dal.mapper.SysUserMapper;
+import com.yonge.cooleshow.biz.dal.service.ImGroupService;
+import com.yonge.cooleshow.biz.dal.service.ImUserFriendService;
+import com.yonge.cooleshow.biz.dal.vo.im.ImUserFriendVO;
+import com.yonge.cooleshow.biz.dal.wrapper.im.ImUserWrapper;
+import com.yonge.cooleshow.common.controller.BaseController;
+import com.yonge.cooleshow.common.entity.HttpResponseResult;
+import io.swagger.annotations.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * 用户通讯录表(ImUserFriend)表控制层
+ *
+ * @author zx
+ * @since 2022-03-22 10:45:59
+ */
+@Api(tags = "用户通讯录表")
+@RestController
+@RequestMapping("${app-config.url.admin:}/imUserFriend")
+public class ImUserFriendController extends BaseController {
+    /**
+     * 服务对象
+     */
+    @Autowired
+    private ImUserFriendService imUserFriendService;
+
+    @ApiOperation("获取聊天用户详情")
+    @PostMapping(value = "/getMessageUser/{userId}")
+    public HttpResponseResult<ImUserFriendVO.ImMessageUser> getMessageUser(@ApiParam(value = "用户编号", required = true) @PathVariable("userId") String userId) {
+
+
+        // 用户ID
+        ImUserFriendVO.ImMessageUser imMessageUser = imUserFriendService.getImMessageUser(userId);
+        return succeed(imMessageUser);
+
+    }
+}
+

+ 6 - 0
cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/SysUserController.java

@@ -1,9 +1,12 @@
 package com.yonge.cooleshow.admin.controller;
 
+import com.google.common.collect.Lists;
 import com.yonge.cooleshow.api.feign.dto.ApiWrapper;
 import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
 import com.yonge.cooleshow.auth.api.entity.SysUser;
+import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
 import com.yonge.cooleshow.biz.dal.service.SysUserService;
+import com.yonge.cooleshow.biz.dal.service.im.ImGroupCoreService;
 import com.yonge.cooleshow.common.controller.BaseController;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
 import io.swagger.annotations.Api;
@@ -25,6 +28,9 @@ public class SysUserController extends BaseController {
     @Autowired
     private SysUserFeignService sysUserFeignService;
 
+    @Autowired
+    private ImGroupCoreService imGroupCoreService;
+
     /**
      * 账号注销校验
      */

+ 17 - 0
cooleshow-app/src/main/java/com/yonge/cooleshow/student/controller/ImUserFriendController.java

@@ -7,8 +7,10 @@ import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.biz.dal.entity.ImUserFriend;
 import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
 import com.yonge.cooleshow.biz.dal.enums.MK;
+import com.yonge.cooleshow.biz.dal.mapper.SysUserMapper;
 import com.yonge.cooleshow.biz.dal.service.ImGroupService;
 import com.yonge.cooleshow.biz.dal.service.ImUserFriendService;
+import com.yonge.cooleshow.biz.dal.service.SysUserService;
 import com.yonge.cooleshow.biz.dal.vo.im.ImUserFriendVO;
 import com.yonge.cooleshow.biz.dal.wrapper.im.ImUserWrapper;
 import com.yonge.cooleshow.common.controller.BaseController;
@@ -50,6 +52,9 @@ public class ImUserFriendController extends BaseController {
     @Autowired
     private ImGroupService imGroupService;
 
+    @Autowired
+    private SysUserMapper sysUserMapper;
+
     @ApiImplicitParams({
             @ApiImplicitParam(name = "search", dataType = "String", value = "根据用户编号、昵称模糊查询")
     })
@@ -111,5 +116,17 @@ public class ImUserFriendController extends BaseController {
 
         return succeed(userFriend);
     }
+
+
+    @ApiOperation("获取聊天用户详情")
+    @PostMapping(value = "/getMessageUser/{userId}")
+    public HttpResponseResult<ImUserFriendVO.ImMessageUser> getMessageUser(@ApiParam(value = "用户编号", required = true) @PathVariable("userId") String userId) {
+
+
+        // 用户ID
+        ImUserFriendVO.ImMessageUser imMessageUser = imUserFriendService.getImMessageUser(userId);
+        return succeed(imMessageUser);
+
+    }
 }
 

+ 16 - 0
cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/ImUserFriendController.java

@@ -2,9 +2,11 @@ package com.yonge.cooleshow.teacher.controller;
 
 
 import com.alibaba.fastjson.JSON;
+import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.biz.dal.entity.ImUserFriend;
 import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
 import com.yonge.cooleshow.biz.dal.enums.MK;
+import com.yonge.cooleshow.biz.dal.mapper.SysUserMapper;
 import com.yonge.cooleshow.biz.dal.service.ImGroupService;
 import com.yonge.cooleshow.biz.dal.service.ImUserFriendService;
 import com.yonge.cooleshow.biz.dal.service.SysUserService;
@@ -18,6 +20,7 @@ import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
+import org.jetbrains.annotations.NotNull;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -50,6 +53,9 @@ public class ImUserFriendController extends BaseController {
     @Autowired
     private ImGroupService imGroupService;
 
+    @Autowired
+    private SysUserMapper sysUserMapper;
+
     @SuppressWarnings("unchecked")//因为返回是集合,这里提示你集合内容较多排序可能回耗费性能
     @ApiImplicitParams({
             @ApiImplicitParam(name = "search", dataType = "String", value = "根据用户编号、昵称模糊查询")
@@ -113,5 +119,15 @@ public class ImUserFriendController extends BaseController {
         return succeed(userFriend);
     }
 
+    @ApiOperation("获取聊天用户详情")
+    @PostMapping(value = "/getMessageUser/{userId}")
+    public HttpResponseResult<ImUserFriendVO.ImMessageUser> getMessageUser(@ApiParam(value = "用户编号", required = true) @PathVariable("userId") String userId) {
+
+
+        // 用户ID
+        ImUserFriendVO.ImMessageUser imMessageUser = imUserFriendService.getImMessageUser(userId);
+        return succeed(imMessageUser);
+
+    }
 }
 

+ 12 - 0
cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/TeacherController.java

@@ -210,6 +210,18 @@ public class TeacherController extends BaseController {
     }
 
 
+    @ApiOperation(value = "移除粉丝")
+    @PostMapping(value = "/delFans/{userId}")
+    public HttpResponseResult<Void> delFans(@PathVariable("userId") Long userId) {
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if (sysUser == null || sysUser.getId() == null) {
+            return failed(HttpStatus.FORBIDDEN, "请登录");
+        }
+        teacherService.delFans(userId, sysUser.getId());
+        return succeed();
+    }
+
+
     /**
      * 最近练习
      */

+ 1 - 0
cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/dal/dao/SysUserDao.java

@@ -188,4 +188,5 @@ public interface SysUserDao extends BaseDAO<Long, SysUser> {
 
     SysUser getCustomerServiceByFriendLeast();
 
+    void updateNameAndImg(@Param("userId") Long userId);
 }

+ 4 - 0
cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/service/impl/SysUserServiceImpl.java

@@ -441,6 +441,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<Long, SysUser> implement
             log.error("logoffByPhone check error", e);
             throw new BizException("数据检查失败");
         }
+        SysUser sysUser = sysUserDao.queryByPhone(phone);
         int num = sysUserDao.countByPhone(phone);
         //冻结相关所有客户端账号
         sysUserDao.updateLockStatusByPhone(phone);
@@ -449,6 +450,9 @@ public class SysUserServiceImpl extends BaseServiceImpl<Long, SysUser> implement
         if(i < 1){
             throw new BizException("用户不存在或已注销");
         }
+
+        // 修改名称 和头像
+        sysUserDao.updateNameAndImg(sysUser.getId());
         // 解散群、退群、删除好友关系
         adminFeignService.logoffQuitImGroup(phone);
 

+ 5 - 0
cooleshow-auth/auth-server/src/main/resources/config/mybatis/SysUserMapper.xml

@@ -405,4 +405,9 @@
               limit 1) t
                  left join sys_user m on m.id_ = t.user_id_
     </select>
+
+    <update id="updateNameAndImg">
+        update sys_user set bak_username_ = username_,username_ = concat('账号已注销',id_)
+                          ,avatar_ = (select param_value_ from sys_config where param_name_ = 'logoff_img') where id_= #{userId};
+    </update>
 </mapper>

+ 1 - 0
cooleshow-common/src/main/java/com/yonge/cooleshow/common/constant/SysConfigConstant.java

@@ -483,4 +483,5 @@ public interface SysConfigConstant {
      */
     String TENANT_ALBUM_MUSIC_TYPE_CATEGORY = "tenant_album_music_type_category";
     String COURSE_SUBJECT_MAP = "course_subject_map";
+    String LOGOFF_IMG = "logoff_img";
 }

+ 2 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/StudentStarDao.java

@@ -40,4 +40,6 @@ public interface StudentStarDao extends BaseMapper<StudentStar>{
      * @return
      */
     List<StudentStar> queryByStudentId(Long studentId);
+
+    void delFans(@Param("studentId") Long studentId, @Param("teacherId") Long teacherId);
 }

+ 2 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/ImUserFriendService.java

@@ -83,5 +83,7 @@ public interface ImUserFriendService extends IService<ImUserFriend> {
     void delStudentFriendByTenantId(Long tenantId, Long userId, String clientType);
 
     void refreshCustomer(Long userId, ClientEnum userClientType, List<Long> friendIds, ClientEnum friendClientType);
+
+    ImUserFriendVO.ImMessageUser getImMessageUser(String imUserId);
 }
 

+ 2 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/StudentTotalService.java

@@ -45,4 +45,6 @@ public interface StudentTotalService extends IService<StudentTotal>  {
 	StudentTotal getTotalById(Long id);
 
 	void updateTotalCache(StudentTotal studentTotal);
+
+    StudentTotal totalStudentTotalById(Long id);
 }

+ 2 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/TeacherService.java

@@ -211,4 +211,6 @@ public interface TeacherService extends IService<Teacher> {
      * @return String
      */
     String updateUserCustomerService(Long userId);
+
+    void delFans(Long studentId, Long teacherId);
 }

+ 2 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/TeacherTotalService.java

@@ -56,4 +56,6 @@ public interface TeacherTotalService extends IService<TeacherTotal>  {
     TeacherTotal getTotalById(Long userId);
 
 	void updateTotalCache(TeacherTotal teacherTotal);
+
+    TeacherTotal totalTeacherTotalById(Long id);
 }

+ 9 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/im/ImGroupCoreService.java

@@ -92,6 +92,15 @@ public interface ImGroupCoreService {
     void groupQuit(GroupMemberWrapper.ImGroupMember groupMember, String groupId,Boolean quit) throws Exception;
 
     /**
+     * 删除IM用户
+     *
+     * @param imUserIds
+     */
+    void  accountDelete(List<String> imUserIds);
+
+    void  messageDelete(String imUserId, List<String> toImUserIds);
+
+    /**
      * 用户主动退出群聊
      * @param userId 用户信息
      * @param clientType EClientType

+ 29 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/im/impl/ImGroupCoreServiceImpl.java

@@ -402,6 +402,35 @@ public class ImGroupCoreServiceImpl implements ImGroupCoreService {
         }
     }
 
+    @Override
+    public void  accountDelete(List<String> imUserIds) {
+        try {
+            imPluginContext.getPluginService().accountDelete(imUserIds);
+        } catch (Exception e) {
+            log.error("accountDelete error",e);
+
+        }
+
+    }
+
+
+    @Override
+    public void  messageDelete(String imUserId,List<String> toImUserIds) {
+        if (CollectionUtils.isEmpty(toImUserIds)) {
+            return;
+        }
+
+        for (String toImUserId : toImUserIds) {
+            try {
+                imPluginContext.getPluginService().deletePrivateRecentContact(imUserId,null);
+            } catch (Exception e) {
+                log.error("messageDelete error",e);
+            }
+
+        }
+
+    }
+
     /**
      * 用户主动退出群聊
      *

+ 1 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseHomeworkServiceImpl.java

@@ -154,6 +154,7 @@ public class CourseHomeworkServiceImpl extends ServiceImpl<CourseHomeworkDao, Co
                 record.setStudentId(courseHomeworkVo.getStudentId());
                 record.setStudentAvatar(courseHomeworkVo.getStudentAvatar());
                 record.setStudentName(courseHomeworkVo.getStudentName());
+                record.setDelFlag(courseHomeworkVo.getDelFlag());
             }
             courseHomeworkVoList = teacherCollect.get(record.getCourseId());
             if (!CollectionUtils.isEmpty(courseHomeworkVoList)) {

+ 18 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/ImUserFriendServiceImpl.java

@@ -680,5 +680,23 @@ public class ImUserFriendServiceImpl extends ServiceImpl<ImUserFriendDao, ImUser
                 .eq(ImUserFriend::getFriendType, userClientType)
                 .update();*/
     }
+
+    @Override
+    public ImUserFriendVO.ImMessageUser getImMessageUser(String imUserId) {
+        long id = Long.parseLong(imGroupService.analysisImUserId(imUserId));
+
+        SysUser byUserId = sysUserMapper.getByUserId(id);
+
+        ImUserFriendVO.ImMessageUser imMessageUser = new ImUserFriendVO.ImMessageUser();
+        imMessageUser.setImUserId(imUserId);
+        imMessageUser.setDelFlag(true);
+        if (byUserId !=null) {
+            imMessageUser.setUserId(byUserId.getId());
+            imMessageUser.setDelFlag(byUserId.getDelFlag());
+            imMessageUser.setUsername(byUserId.getUsername());
+            imMessageUser.setAvatar(byUserId.getAvatar());
+        }
+        return imMessageUser;
+    }
 }
 

+ 2 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/StudentTotalServiceImpl.java

@@ -131,7 +131,8 @@ public class StudentTotalServiceImpl extends ServiceImpl<StudentTotalDao, Studen
     }
 
 
-    private StudentTotal totalStudentTotalById(Long id) {
+    @Override
+    public StudentTotal totalStudentTotalById(Long id) {
         StudentTotal studentTotal = new StudentTotal();
         studentTotal.setUserId(id);
 

+ 9 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/SysUserServiceImpl.java

@@ -27,6 +27,7 @@ import com.yonge.cooleshow.biz.dal.enums.*;
 import com.yonge.cooleshow.biz.dal.enums.im.EImGroupMemberRoleType;
 import com.yonge.cooleshow.biz.dal.mapper.SysUserMapper;
 import com.yonge.cooleshow.biz.dal.service.*;
+import com.yonge.cooleshow.biz.dal.service.im.ImGroupCoreService;
 import com.yonge.cooleshow.biz.dal.vo.UserAccountVo;
 import com.yonge.cooleshow.biz.dal.wrapper.UserInfoWrapper;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
@@ -80,6 +81,9 @@ public class SysUserServiceImpl implements SysUserService {
     private ImGroupService imGroupService;
 
     @Autowired
+    private ImGroupCoreService imGroupCoreService;
+
+    @Autowired
     private CourseGroupService courseGroupService;
 
     @Autowired
@@ -486,6 +490,9 @@ public class SysUserServiceImpl implements SysUserService {
                     .eq(ImUserFriend::getFriendId, userId)
                     .eq(ImUserFriend::getFriendType, EClientType.STUDENT)
                     .remove();
+
+            // 注销三方im
+//            imGroupCoreService.accountDelete(Lists.newArrayList(imGroupCoreService.getImUserId(userId, ClientEnum.STUDENT)));
         }
 
 
@@ -519,6 +526,8 @@ public class SysUserServiceImpl implements SysUserService {
                     .eq(ImUserFriend::getFriendId, userId)
                     .eq(ImUserFriend::getFriendType, EClientType.TEACHER)
                     .remove();
+            // 注销三方im
+//            imGroupCoreService.accountDelete(Lists.newArrayList(imGroupCoreService.getImUserId(userId, ClientEnum.TEACHER)));
         }
     }
     public EClientType getClientType(String jpushType){

+ 14 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TeacherServiceImpl.java

@@ -202,6 +202,12 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
     @Autowired
     private VipCardRecordService vipCardRecordService;
 
+    @Autowired
+    private TeacherTotalService teacherTotalService;
+
+    @Autowired
+    private StudentTotalService studentTotalService;
+
     @Override
     public TeacherDao getDao() {
         return baseMapper;
@@ -1625,4 +1631,12 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
 
         return imCustomerServiceId;
     }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void delFans(Long studentId, Long teacherId) {
+        studentStarDao.delFans(studentId,teacherId);
+        teacherTotalService.totalTeacherTotalById(teacherId);
+        studentTotalService.totalStudentTotalById(studentId);
+    }
 }

+ 2 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TeacherTotalServiceImpl.java

@@ -215,7 +215,8 @@ public class TeacherTotalServiceImpl extends ServiceImpl<TeacherTotalDao, Teache
         }
     }
 
-    private TeacherTotal totalTeacherTotalById(Long id) {
+    @Override
+    public TeacherTotal totalTeacherTotalById(Long id) {
         TeacherTotal teacherTotal = new TeacherTotal();
         teacherTotal.setUserId(id);
         //查询粉丝数

+ 14 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseHomeworkVo.java

@@ -74,6 +74,9 @@ public class CourseHomeworkVo{
 	@ApiModelProperty("学员头像")
 	private String studentAvatar;
 
+    @ApiModelProperty("是否注销")
+    private Boolean delFlag = false;
+
 	@ApiModelProperty("老师id")
 	private Long teacherId;
 
@@ -95,7 +98,17 @@ public class CourseHomeworkVo{
 	@ApiModelProperty("IM用户ID")
 	private String imUserId;
 
-	public String getImGroupId() {
+
+
+    public Boolean getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(Boolean delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getImGroupId() {
 		return imGroupId;
 	}
 

+ 13 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/MyCourseVo.java

@@ -21,6 +21,11 @@ public class MyCourseVo implements Serializable {
     @ApiModelProperty(value = "用户姓名")
     private String userName;
 
+
+    @ApiModelProperty("是否注销")
+    private Boolean delFlag = false;
+
+
     private String realName;
 
     @ApiModelProperty(value = "头像地址")
@@ -62,6 +67,14 @@ public class MyCourseVo implements Serializable {
     @ApiModelProperty(value = "IM聊天用户ID")
     private String imUserId;
 
+
+    public Boolean getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(Boolean delFlag) {
+        this.delFlag = delFlag;
+    }
     public Integer getStudentReplied() {
         return studentReplied;
     }

+ 11 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/StudentHomeworkVo.java

@@ -32,6 +32,17 @@ public class StudentHomeworkVo {
     @ApiModelProperty("NOTCOMMIT:未提交 ,NOTREVIEW: 未评价 REVIEWED:已评价")
     private HomeworkStatusEnum homeworkStatus;
 
+    @ApiModelProperty("是否注销")
+    private Boolean delFlag = false;
+
+    public Boolean getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(Boolean delFlag) {
+        this.delFlag = delFlag;
+    }
+
     public HomeworkStatusEnum getHomeworkStatus() {
         return homeworkStatus;
     }

+ 27 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/im/ImUserFriendVO.java

@@ -128,4 +128,31 @@ public class ImUserFriendVO {
             return Optional.ofNullable(getImUserId()).orElse(userId);
         }
     }
+
+
+    /**
+     * 用户好友信息
+     */
+    @Data
+    @NoArgsConstructor
+    @AllArgsConstructor
+    public static class ImMessageUser implements Serializable {
+
+
+        @ApiModelProperty(value = "当前用户编号")
+        private Long userId;
+
+        @ApiModelProperty(value = "imUserId")
+        private String imUserId;
+
+        @ApiModelProperty("用户名称")
+        private String username;
+
+        @ApiModelProperty("用户头像")
+        private String avatar;
+
+        @ApiModelProperty("是否注销")
+        private Boolean delFlag = false;
+    }
+
 }

+ 2 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseHomeworkMapper.xml

@@ -265,6 +265,7 @@
         cssp.user_id_ as studentId
         ,su.username_ as studentName
         ,su.avatar_ as studentAvatar
+        ,su.del_flag_ as delFlag
         from course_schedule cs
         left join  course_schedule_student_payment cssp on cssp.course_id_ = cs.id_
         left join sys_user su on cssp.user_id_ = su.id_
@@ -349,6 +350,7 @@
         s.id_ as studentId,
         s.username_ as studentName,
         s.avatar_ as studentAvatar,
+        s.del_flag_ as delFlag,
         if(sch.id_ is not null,1,0) as submitHomework,
         (case when sch.id_ is null then 'NOTCOMMIT'
         when sch.teacher_replied_ is null or sch.teacher_replied_ = '' then 'NOTREVIEW'

+ 1 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -195,6 +195,7 @@
             cs.status_ AS `status`,
             g.subject_id_ AS subjectId,
             sb.name_ AS subjectName,
+            u.del_flag_ as delFlag,
             p.course_id_ AS courseId,
             p.course_group_id_ AS courseGoupId,
             (r.student_replied_ IS NOT NULL) AS studentReplied,

+ 4 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/StudentStarMapper.xml

@@ -49,4 +49,8 @@
 	<select id="queryByStudentId" resultMap="BaseResultMap">
 		select * from student_star ss where ss.student_id_ = #{studentId}
 	</select>
+
+	<delete id="delFans">
+        delete from student_star where student_id_ = #{studentId} and teacher_id_ = #{teacherId}
+    </delete>
 </mapper>

+ 1 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/SysUserMapper.xml

@@ -117,6 +117,7 @@
                username_ as username,
                password_ as password,
                salt_ as salt,
+        del_flag_ as delFlag,
                phone_ as phone,
                avatar_ as avatar,
                lock_flag_ as lockFlag,