|
@@ -14,33 +14,22 @@ import com.yonge.cooleshow.auth.api.dto.RealnameAuthReq;
|
|
|
import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
|
import com.yonge.cooleshow.biz.dal.dao.MusicSheetAuthRecordDao;
|
|
|
import com.yonge.cooleshow.biz.dal.dao.MusicSheetDao;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.CourseGroup;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.ImGroup;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.ImGroupMember;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.ImUserFriend;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.Student;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.Teacher;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.UserOrder;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.UserOrderRefund;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroup;
|
|
|
+import com.yonge.cooleshow.biz.dal.entity.*;
|
|
|
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;
|
|
|
import com.yonge.cooleshow.common.enums.ContractTemplateTypeEnum;
|
|
|
import com.yonge.cooleshow.common.enums.SysUserType;
|
|
|
import com.yonge.toolset.base.exception.BizException;
|
|
|
-import com.yonge.toolset.thirdparty.message.MessageSenderPluginContext;
|
|
|
import com.yonge.toolset.thirdparty.user.realname.RealnameAuthenticationPlugin;
|
|
|
import com.yonge.toolset.utils.idcard.IdcardInfoExtractor;
|
|
|
import com.yonge.toolset.utils.idcard.IdcardValidator;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
@@ -66,44 +55,27 @@ public class SysUserServiceImpl implements SysUserService {
|
|
|
@Resource
|
|
|
private TeacherService teacherService;
|
|
|
@Resource
|
|
|
- private MessageSenderPluginContext messageSenderPluginContext;
|
|
|
-
|
|
|
- @Autowired
|
|
|
private UserOrderService userOrderService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private UserOrderRefundService userOrderRefundService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private ImGroupMemberService imGroupMemberService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private ImGroupService imGroupService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private ImGroupCoreService imGroupCoreService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private CourseGroupService courseGroupService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private VideoLessonGroupService videoLessonGroupService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private UserAccountService userAccountService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private MallPortalFeignService mallPortalFeignService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private ImUserFriendService imUserFriendService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private MusicSheetDao musicSheetDao;
|
|
|
-
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private MusicSheetAuthRecordDao musicSheetAuthRecordDao;
|
|
|
-
|
|
|
@Resource
|
|
|
private MessageFeignClientService messageFeignClientService;
|
|
|
@Override
|
|
@@ -278,29 +250,19 @@ public class SysUserServiceImpl implements SysUserService {
|
|
|
// 趣纠课
|
|
|
List<CourseGroup> list = courseGroupService.lambdaQuery()
|
|
|
.eq(CourseGroup::getTeacherId, userId)
|
|
|
- .in(CourseGroup::getType, Arrays.asList("PRACTICE", "LIVE", "PIANO_ROOM_CLASS"))
|
|
|
+ .in(CourseGroup::getType, Arrays.asList("PRACTICE", "LIVE", "PIANO_ROOM_CLASS", "GROUP","VIP"))
|
|
|
.in(CourseGroup::getStatus, Arrays.asList("ING", "APPLY", "NOT_SALE"))
|
|
|
.list();
|
|
|
- String courseMsg ="";
|
|
|
+ StringBuffer courseMsg = new StringBuffer();
|
|
|
if (!CollectionUtils.isEmpty(list)) {
|
|
|
- List<String> courseTypes = list.stream().map(o -> o.getType()).distinct().collect(Collectors.toList());
|
|
|
- if (courseTypes.contains(CourseScheduleEnum.LIVE.name())) {
|
|
|
- courseMsg += "直播课";
|
|
|
- }
|
|
|
- if (courseTypes.contains(CourseScheduleEnum.PRACTICE.name())){
|
|
|
- if (courseMsg.length() > 0) {
|
|
|
- courseMsg+="/";
|
|
|
- }
|
|
|
- courseMsg += "趣纠课";
|
|
|
- }
|
|
|
- if (courseTypes.contains(CourseScheduleEnum.PIANO_ROOM_CLASS.name())){
|
|
|
- if (courseMsg.length() > 0) {
|
|
|
- courseMsg+="/";
|
|
|
- }
|
|
|
- courseMsg += "琴房课";
|
|
|
- }
|
|
|
+ List<String> courseTypes = list.stream().map(CourseGroup::getType).distinct().collect(Collectors.toList());
|
|
|
+ this.appendErrMsg(courseMsg,courseTypes,CourseScheduleEnum.LIVE);
|
|
|
+ this.appendErrMsg(courseMsg,courseTypes,CourseScheduleEnum.PRACTICE);
|
|
|
+ this.appendErrMsg(courseMsg,courseTypes,CourseScheduleEnum.PIANO_ROOM_CLASS);
|
|
|
+ this.appendErrMsg(courseMsg,courseTypes,CourseScheduleEnum.VIP);
|
|
|
+ this.appendErrMsg(courseMsg,courseTypes,CourseScheduleEnum.GROUP);
|
|
|
if (courseMsg.length() > 0) {
|
|
|
- courseMsg="账号存在未开始/进行中的" + courseMsg;
|
|
|
+ courseMsg.insert(0,"账号存在未开始/进行中的");
|
|
|
}
|
|
|
}
|
|
|
// 视频课
|
|
@@ -311,9 +273,9 @@ public class SysUserServiceImpl implements SysUserService {
|
|
|
|
|
|
if (videoCourse > 0) {
|
|
|
if (courseMsg.length() > 0) {
|
|
|
- courseMsg+="和未下架的视频课";
|
|
|
+ courseMsg.append("和未下架的视频课");
|
|
|
} else {
|
|
|
- courseMsg="账号存在未下架的视频课";
|
|
|
+ courseMsg.append("账号存在未下架的视频课");
|
|
|
}
|
|
|
} else {
|
|
|
// 判断审核中的视频课
|
|
@@ -324,15 +286,15 @@ public class SysUserServiceImpl implements SysUserService {
|
|
|
.count();
|
|
|
if (videoCourse > 0) {
|
|
|
if (courseMsg.length() > 0) {
|
|
|
- courseMsg+="和未下架的视频课";
|
|
|
+ courseMsg.append("和未下架的视频课");
|
|
|
} else {
|
|
|
- courseMsg="账号存在未下架的视频课";
|
|
|
+ courseMsg.append("账号存在未下架的视频课");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
if (courseMsg.length() > 0) {
|
|
|
- errMsg.add(courseMsg);
|
|
|
+ errMsg.add(courseMsg.toString());
|
|
|
}
|
|
|
|
|
|
// 存在未提现的金额
|
|
@@ -379,6 +341,15 @@ public class SysUserServiceImpl implements SysUserService {
|
|
|
return logOffs;
|
|
|
}
|
|
|
|
|
|
+ private void appendErrMsg(StringBuffer courseMsg,List<String> courseTypes,CourseScheduleEnum courseScheduleEnum) {
|
|
|
+ if (courseTypes.contains(courseScheduleEnum.name())) {
|
|
|
+ if (courseMsg.length() > 0) {
|
|
|
+ courseMsg.append("/");
|
|
|
+ }
|
|
|
+ courseMsg.append(courseScheduleEnum.getMsg());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private Map<String, String> hasUnfinishedOrder(Long userId) {
|
|
|
// 商城订单 0->待付款;1->待发货;2->已发货
|
|
|
HttpResponseResult<Map<String, Set<CheckStatus>>> httpResponseResult = mallPortalFeignService.checkOrderStatus(userId);
|