| | |
| | | import com.ruoyi.member.service.member.MemberTotalService; |
| | | import com.ruoyi.member.util.HttpUtils; |
| | | import com.ruoyi.member.util.MsgUtils; |
| | | import com.ruoyi.member.util.OBSUploadUtils; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.constant.SecurityConstant; |
| | | import com.ruoyi.system.api.domain.dto.*; |
| | |
| | | import org.apache.http.HttpResponse; |
| | | import org.apache.http.util.EntityUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.Base64Utils; |
| | | import org.springframework.util.FileCopyUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | //今日到店用户 |
| | | if(null != merMemberPageDto.getIsTodayStore() && 1 == merMemberPageDto.getIsTodayStore()){ |
| | | List<Integer> data = remoteOrderService.countShopServicePerson(merMemberPageDto.getShopId()).getData(); |
| | | if(data.isEmpty()){ |
| | | data.add(-1); |
| | | } |
| | | merMemberPageDto.setUserIds(data); |
| | | } |
| | | //有未跟进的任务用户 |
| | | if(null != merMemberPageDto.getIsTask() && 1 == merMemberPageDto.getIsTask()){ |
| | | List<Integer> data = remoteShopService.getMemberIngTotal(merMemberPageDto.getShopId()).getData(); |
| | | if(data.isEmpty()){ |
| | | data.add(-1); |
| | | } |
| | | merMemberPageDto.setUserIds(data); |
| | | } |
| | | //剩余周期人数 |
| | | if(null != merMemberPageDto.getResiduePeriod() && 1 == merMemberPageDto.getResiduePeriod()){ |
| | | Set<Long> data = remoteOrderService.getConsumerGoodsResidueUserId(merMemberPageDto.getShopId(), 1).getData(); |
| | | List<Integer> collect = data.stream().map(s -> Integer.valueOf(s.intValue())).collect(Collectors.toList()); |
| | | if(collect.isEmpty()){ |
| | | collect.add(-1); |
| | | } |
| | | merMemberPageDto.setUserIds(collect); |
| | | } |
| | | //剩余体验人数 |
| | | if(null != merMemberPageDto.getResidueExperience() && 1 == merMemberPageDto.getResidueExperience()){ |
| | | Set<Long> data = remoteOrderService.getConsumerGoodsResidueUserId(merMemberPageDto.getShopId(), 3).getData(); |
| | | List<Integer> collect = data.stream().map(s -> Integer.valueOf(s.intValue())).collect(Collectors.toList()); |
| | | if(collect.isEmpty()){ |
| | | collect.add(-1); |
| | | } |
| | | merMemberPageDto.setUserIds(collect); |
| | | } |
| | | List<MerMemberPageVo> merMemberPageVoList = memberMapper.pageMerMember(page, merMemberPageDto); |
| | | //处理活跃度返回 |
| | |
| | | @Override |
| | | public String getWeiXinQrCode(String scene, String path) { |
| | | try { |
| | | File file = wxMaService.getQrcodeService().createWxaCodeUnlimit(scene, path); |
| | | FileInputStream input = new FileInputStream(file); |
| | | MultipartFile multipartFile = new MyMultipartFile("file", file.getName(), "text/plain", IOUtils.toByteArray(input)); |
| | | String data = remoteFileService.uploadOSS(multipartFile).getData(); |
| | | return data; |
| | | File file = wxMaService.getQrcodeService().createQrcode(path + "?" + scene); |
| | | String url = OBSUploadUtils.uploadLocalFile(file); |
| | | return url; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |