|  | @@ -7,10 +7,13 @@ import com.dayaedu.cbs.openfeign.wrapper.message.CbsMessageWrapper;
 | 
	
		
			
				|  |  |  import com.google.common.collect.Lists;
 | 
	
		
			
				|  |  |  import com.microsvc.toolkit.common.response.template.R;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.api.feign.MallPortalFeignService;
 | 
	
		
			
				|  |  | -import com.yonge.cooleshow.api.feign.dto.OmsOrderDetail;
 | 
	
		
			
				|  |  | +import com.yonge.cooleshow.api.feign.dto.ApiWrapper;
 | 
	
		
			
				|  |  | +import com.yonge.cooleshow.api.feign.enums.CheckStatus;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
 | 
	
		
			
				|  |  |  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;
 | 
	
	
		
			
				|  | @@ -20,10 +23,7 @@ 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.enums.AuthStatusEnum;
 | 
	
		
			
				|  |  | -import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
 | 
	
		
			
				|  |  | -import com.yonge.cooleshow.biz.dal.enums.ImGroupType;
 | 
	
		
			
				|  |  | -import com.yonge.cooleshow.biz.dal.enums.OrderStatusEnum;
 | 
	
		
			
				|  |  | +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.*;
 | 
	
	
		
			
				|  | @@ -45,13 +45,7 @@ import org.springframework.util.CollectionUtils;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import javax.annotation.Resource;
 | 
	
		
			
				|  |  |  import java.math.BigDecimal;
 | 
	
		
			
				|  |  | -import java.util.ArrayList;
 | 
	
		
			
				|  |  | -import java.util.Arrays;
 | 
	
		
			
				|  |  | -import java.util.Collection;
 | 
	
		
			
				|  |  | -import java.util.HashMap;
 | 
	
		
			
				|  |  | -import java.util.List;
 | 
	
		
			
				|  |  | -import java.util.Map;
 | 
	
		
			
				|  |  | -import java.util.Optional;
 | 
	
		
			
				|  |  | +import java.util.*;
 | 
	
		
			
				|  |  |  import java.util.stream.Collectors;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  @Slf4j
 | 
	
	
		
			
				|  | @@ -100,6 +94,12 @@ public class SysUserServiceImpl implements SysUserService {
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private ImUserFriendService imUserFriendService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private MusicSheetDao musicSheetDao;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private MusicSheetAuthRecordDao musicSheetAuthRecordDao;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      @Resource
 | 
	
		
			
				|  |  |      private MessageFeignClientService messageFeignClientService;
 | 
	
		
			
				|  |  |      @Override
 | 
	
	
		
			
				|  | @@ -238,86 +238,216 @@ public class SysUserServiceImpl implements SysUserService {
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  | -    public List<String> accountLogoffCheck(String phone) {
 | 
	
		
			
				|  |  | +    public List<ApiWrapper.LogOff> accountLogoffCheck(String phone) {
 | 
	
		
			
				|  |  |          SysUser sysUser = this.getDao().findUserByPhone(phone);
 | 
	
		
			
				|  |  |          if (sysUser == null || Boolean.TRUE.equals(sysUser.getDelFlag())) {
 | 
	
		
			
				|  |  |              throw new BizException("账号不存在");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        List<String> errMsg = new ArrayList<>();
 | 
	
		
			
				|  |  |          Long userId = sysUser.getId();
 | 
	
		
			
				|  |  | +        Map<String, List<String>> result = new HashMap<>();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          // 存在待支付、未确认收货、售后处理的订单
 | 
	
		
			
				|  |  | -        if(hasUnfinishedOrder(userId)){
 | 
	
		
			
				|  |  | -            errMsg.add("账户存在未支付、未确认收货、售后处理中的订单");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        // 存在进行中的课程
 | 
	
		
			
				|  |  | -        // 陪练课
 | 
	
		
			
				|  |  | -        Integer course = courseGroupService.lambdaQuery()
 | 
	
		
			
				|  |  | -                .eq(CourseGroup::getTeacherId, userId)
 | 
	
		
			
				|  |  | -                .in(CourseGroup::getType, Arrays.asList("PRACTICE", "LIVE", "PIANO_ROOM_CLASS"))
 | 
	
		
			
				|  |  | -                .in(CourseGroup::getStatus, Arrays.asList("ING", "APPLY"))
 | 
	
		
			
				|  |  | -                .count();
 | 
	
		
			
				|  |  | -        // 视频课
 | 
	
		
			
				|  |  | -        Integer videoCourse = videoLessonGroupService.lambdaQuery()
 | 
	
		
			
				|  |  | -                .eq(VideoLessonGroup::getTeacherId, userId)
 | 
	
		
			
				|  |  | -                .eq(VideoLessonGroup::getShelvesFlag, 1)
 | 
	
		
			
				|  |  | -                .count();
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        if (course > 0 || videoCourse > 0) {
 | 
	
		
			
				|  |  | -            errMsg.add("存在进行中的课程");
 | 
	
		
			
				|  |  | +        Map<String, String> map = hasUnfinishedOrder(userId);
 | 
	
		
			
				|  |  | +        if(map != null && map.size()>0){
 | 
	
		
			
				|  |  | +            map.forEach((k,v)-> result.put(k, Lists.newArrayList("账号存在"+v+"的订单")));
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          Teacher teacher = teacherService.getById(userId);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          if (teacher != null) {
 | 
	
		
			
				|  |  | +            List<String> errMsg = new ArrayList<>();
 | 
	
		
			
				|  |  |              // 存在群主身份
 | 
	
		
			
				|  |  |              List<ImGroupMember> groupMembers = imGroupMemberService.lambdaQuery()
 | 
	
		
			
				|  |  | -                    .eq(ImGroupMember::getUserId, userId)
 | 
	
		
			
				|  |  | -                    .eq(ImGroupMember::getGroupRoleType, EImGroupMemberRoleType.Owner)
 | 
	
		
			
				|  |  | -                    .list();
 | 
	
		
			
				|  |  | +                .eq(ImGroupMember::getUserId, userId)
 | 
	
		
			
				|  |  | +                .eq(ImGroupMember::getGroupRoleType, EImGroupMemberRoleType.Owner)
 | 
	
		
			
				|  |  | +                .list();
 | 
	
		
			
				|  |  |              List<String> groupIdList = groupMembers.stream().map(ImGroupMember::getGroupId).collect(Collectors.toList());
 | 
	
		
			
				|  |  |              if (!groupIdList.isEmpty()) {
 | 
	
		
			
				|  |  |                  Collection<ImGroup> imGroups = imGroupService.listByIds(groupIdList);
 | 
	
		
			
				|  |  |                  long orgGroups = imGroups.stream().filter(next -> ImGroupType.ORG.equals(next.getType())).count();
 | 
	
		
			
				|  |  |                  if (orgGroups > 0) {
 | 
	
		
			
				|  |  | -                    errMsg.add("账户为机构群群主、需要庄毅群主或解散群聊");
 | 
	
		
			
				|  |  | +                    errMsg.add("账号为机构群群主,需要转移群主或解散群聊");
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            // 存在进行中的课程
 | 
	
		
			
				|  |  | +            // 陪练课
 | 
	
		
			
				|  |  | +            List<CourseGroup> list = courseGroupService.lambdaQuery()
 | 
	
		
			
				|  |  | +                .eq(CourseGroup::getTeacherId, userId)
 | 
	
		
			
				|  |  | +                .in(CourseGroup::getType, Arrays.asList("PRACTICE", "LIVE", "PIANO_ROOM_CLASS"))
 | 
	
		
			
				|  |  | +                .in(CourseGroup::getStatus, Arrays.asList("ING", "APPLY", "NOT_SALE"))
 | 
	
		
			
				|  |  | +                .list();
 | 
	
		
			
				|  |  | +            String courseMsg ="";
 | 
	
		
			
				|  |  | +            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 += "琴房课";
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                if (courseMsg.length() > 0) {
 | 
	
		
			
				|  |  | +                    courseMsg="账号存在未开始/进行中的" + courseMsg;
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            // 视频课
 | 
	
		
			
				|  |  | +            Integer videoCourse = videoLessonGroupService.lambdaQuery()
 | 
	
		
			
				|  |  | +                .eq(VideoLessonGroup::getTeacherId, userId)
 | 
	
		
			
				|  |  | +                .eq(VideoLessonGroup::getShelvesFlag, 1)
 | 
	
		
			
				|  |  | +                .count();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            if (videoCourse > 0) {
 | 
	
		
			
				|  |  | +                if (courseMsg.length() > 0) {
 | 
	
		
			
				|  |  | +                    courseMsg+="和未下架的视频课";
 | 
	
		
			
				|  |  | +                } else {
 | 
	
		
			
				|  |  | +                    courseMsg="账号存在未下架的视频课";
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | +            } else {
 | 
	
		
			
				|  |  | +                // 判断审核中的视频课
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                videoCourse = videoLessonGroupService.lambdaQuery()
 | 
	
		
			
				|  |  | +                    .eq(VideoLessonGroup::getTeacherId, userId)
 | 
	
		
			
				|  |  | +                    .eq(VideoLessonGroup::getAuditStatus, AuthStatusEnum.DOING)
 | 
	
		
			
				|  |  | +                    .count();
 | 
	
		
			
				|  |  | +                if (videoCourse > 0) {
 | 
	
		
			
				|  |  | +                    if (courseMsg.length() > 0) {
 | 
	
		
			
				|  |  | +                        courseMsg+="和未下架的视频课";
 | 
	
		
			
				|  |  | +                    } else {
 | 
	
		
			
				|  |  | +                        courseMsg="账号存在未下架的视频课";
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            if (courseMsg.length() > 0) {
 | 
	
		
			
				|  |  | +                errMsg.add(courseMsg);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              // 存在未提现的金额
 | 
	
		
			
				|  |  |              UserAccountVo detail = userAccountService.detail(userId);
 | 
	
		
			
				|  |  | -            if (detail != null && (detail.getAmountTotal().compareTo(BigDecimal.ZERO) > 0 || detail.getAmountUnrecorded().compareTo(BigDecimal.ZERO) > 0)) {
 | 
	
		
			
				|  |  | +            if (detail != null && (detail.getAmountTotal().compareTo(BigDecimal.ZERO) > 0
 | 
	
		
			
				|  |  | +                || detail.getAmountUsable().compareTo(BigDecimal.ZERO) > 0
 | 
	
		
			
				|  |  | +                || detail.getAmountFrozen().compareTo(BigDecimal.ZERO) > 0)
 | 
	
		
			
				|  |  | +                || detail.getAmountUnrecorded().compareTo(BigDecimal.ZERO) > 0) {
 | 
	
		
			
				|  |  |                  errMsg.add("收入未结算/推广计划未入账");
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            // 查询来源是老师的,用户未下架的曲目
 | 
	
		
			
				|  |  | +            int i = musicSheetDao.countTeacherEnable(userId);
 | 
	
		
			
				|  |  | +            if (i > 0) {
 | 
	
		
			
				|  |  | +                errMsg.add("账号存在未下架曲目");
 | 
	
		
			
				|  |  | +            } else {
 | 
	
		
			
				|  |  | +                // 检查审核中的曲目
 | 
	
		
			
				|  |  | +                int j = musicSheetAuthRecordDao.countTeacherAudit(userId);
 | 
	
		
			
				|  |  | +                if (j > 0) {
 | 
	
		
			
				|  |  | +                    errMsg.add("账号存在未下架曲目");
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            List<String> strings = result.get(ClientEnum.TEACHER.name());
 | 
	
		
			
				|  |  | +            if (strings == null) {
 | 
	
		
			
				|  |  | +                strings = new ArrayList<>();
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            strings.addAll(errMsg);
 | 
	
		
			
				|  |  | +            result.put(ClientEnum.TEACHER.name(), strings);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        return errMsg;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        List<ApiWrapper.LogOff> logOffs = new ArrayList<>();
 | 
	
		
			
				|  |  | +        result.forEach((k,v)->{
 | 
	
		
			
				|  |  | +            if (CollectionUtils.isEmpty(v)) {
 | 
	
		
			
				|  |  | +                return;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            ApiWrapper.LogOff logOff = new ApiWrapper.LogOff();
 | 
	
		
			
				|  |  | +            logOff.setClient(k);
 | 
	
		
			
				|  |  | +            logOff.setErrList(v);
 | 
	
		
			
				|  |  | +            logOffs.add(logOff);
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        return logOffs;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    private boolean hasUnfinishedOrder(Long userId) {
 | 
	
		
			
				|  |  | +    private Map<String, String> hasUnfinishedOrder(Long userId) {
 | 
	
		
			
				|  |  |          // 商城订单 0->待付款;1->待发货;2->已发货
 | 
	
		
			
				|  |  | -        HttpResponseResult<List<OmsOrderDetail>> httpResponseResult = mallPortalFeignService.queryOrderList("0,1,2", userId);
 | 
	
		
			
				|  |  | +        HttpResponseResult<Map<String, Set<CheckStatus>>> httpResponseResult = mallPortalFeignService.checkOrderStatus(userId);
 | 
	
		
			
				|  |  |          if (httpResponseResult == null) {
 | 
	
		
			
				|  |  |              throw new BizException("检查订单信息失败");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        List<OmsOrderDetail> data = httpResponseResult.getData();
 | 
	
		
			
				|  |  | -        if (!CollectionUtils.isEmpty(data)) {
 | 
	
		
			
				|  |  | -            return true;
 | 
	
		
			
				|  |  | +        Map<String, Set<CheckStatus>> data = httpResponseResult.getData();
 | 
	
		
			
				|  |  | +        if (data == null) {
 | 
	
		
			
				|  |  | +            data = new HashMap<>();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          // 酷乐秀订单
 | 
	
		
			
				|  |  | -        Integer count = userOrderService.lambdaQuery()
 | 
	
		
			
				|  |  | -                .eq(UserOrder::getUserId, userId)
 | 
	
		
			
				|  |  | -                .in(UserOrder::getStatus, Arrays.asList(OrderStatusEnum.WAIT_PAY, OrderStatusEnum.PAYING))
 | 
	
		
			
				|  |  | -                .count();
 | 
	
		
			
				|  |  | -        if (count > 0) {
 | 
	
		
			
				|  |  | -            return true;
 | 
	
		
			
				|  |  | +        List<UserOrder> list = userOrderService.lambdaQuery()
 | 
	
		
			
				|  |  | +            .eq(UserOrder::getUserId, userId)
 | 
	
		
			
				|  |  | +            .in(UserOrder::getStatus, Arrays.asList(OrderStatusEnum.WAIT_PAY, OrderStatusEnum.PAYING))
 | 
	
		
			
				|  |  | +            .list();
 | 
	
		
			
				|  |  | +        if (!CollectionUtils.isEmpty(list)) {
 | 
	
		
			
				|  |  | +            for (UserOrder userOrder : list) {
 | 
	
		
			
				|  |  | +                Set<CheckStatus> checkStatuses = data.get(userOrder.getOrderClient().name());
 | 
	
		
			
				|  |  | +                if (checkStatuses == null) {
 | 
	
		
			
				|  |  | +                    checkStatuses = new HashSet<>();
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                checkStatuses.add(CheckStatus.WAIT_PAY);
 | 
	
		
			
				|  |  | +                data.put(userOrder.getOrderClient().name(), checkStatuses);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        Integer refundCount = userOrderRefundService.lambdaQuery()
 | 
	
		
			
				|  |  | -                .eq(UserOrderRefund::getUserId, userId)
 | 
	
		
			
				|  |  | -                .eq(UserOrderRefund::getStatus, AuthStatusEnum.DOING)
 | 
	
		
			
				|  |  | -                .count();
 | 
	
		
			
				|  |  | -        return refundCount > 0;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        // 退款订单
 | 
	
		
			
				|  |  | +        List<UserOrderRefund> list1 = userOrderRefundService.lambdaQuery()
 | 
	
		
			
				|  |  | +            .eq(UserOrderRefund::getUserId, userId)
 | 
	
		
			
				|  |  | +            .eq(UserOrderRefund::getStatus, AuthStatusEnum.DOING)
 | 
	
		
			
				|  |  | +            .list();
 | 
	
		
			
				|  |  | +        if (!CollectionUtils.isEmpty(list1)) {
 | 
	
		
			
				|  |  | +            // 订单id 集合
 | 
	
		
			
				|  |  | +            Set<Long> orderIds = list1.stream().map(UserOrderRefund::getOrderId).collect(Collectors.toSet());
 | 
	
		
			
				|  |  | +            List<UserOrder> userOrders = userOrderService.lambdaQuery()
 | 
	
		
			
				|  |  | +                .in(UserOrder::getId, orderIds)
 | 
	
		
			
				|  |  | +                .list();
 | 
	
		
			
				|  |  | +            for (UserOrder userOrder : userOrders) {
 | 
	
		
			
				|  |  | +                Set<CheckStatus> checkStatuses = data.get(userOrder.getOrderClient().name());
 | 
	
		
			
				|  |  | +                if (checkStatuses == null) {
 | 
	
		
			
				|  |  | +                    checkStatuses = new HashSet<>();
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                checkStatuses.add(CheckStatus.WAIT_AFTER_SALE);
 | 
	
		
			
				|  |  | +                data.put(userOrder.getOrderClient().name(), checkStatuses);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        if (data.isEmpty()) {
 | 
	
		
			
				|  |  | +            return null;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        Map<String,String> clientResult = new HashMap<>();
 | 
	
		
			
				|  |  | +        data.forEach((k, v) -> {
 | 
	
		
			
				|  |  | +            StringBuffer result = new StringBuffer("");
 | 
	
		
			
				|  |  | +            if (v.contains(CheckStatus.WAIT_PAY)){
 | 
	
		
			
				|  |  | +                result.append("待支付");
 | 
	
		
			
				|  |  | +            } if (v.contains(CheckStatus.WAIT_CONFIRM)){
 | 
	
		
			
				|  |  | +                if (result.length() > 0) {
 | 
	
		
			
				|  |  | +                    result.append("/");
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                result.append("未确认收货");
 | 
	
		
			
				|  |  | +            } if (v.contains(CheckStatus.WAIT_AFTER_SALE)){
 | 
	
		
			
				|  |  | +                if (result.length() > 0) {
 | 
	
		
			
				|  |  | +                    result.append("/");
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                result.append("售后处理中");
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            if (result.length() > 0) {
 | 
	
		
			
				|  |  | +                clientResult.put(k,result.toString());
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +        return clientResult;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      /**
 |