| | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty(value = "活动来源1平台活动2店铺活动") |
| | | private Integer activityFrom; |
| | | |
| | | @ApiModelProperty(value = "活动类型1秒杀") |
| | | private Integer activityType; |
| | | |
| | | @ApiModelProperty(value = "活动id") |
| | | private String activityId; |
| | | |
| | |
| | | import com.ruoyi.system.api.domain.dto.BirthdayGiftSendDto; |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBasePlatformDto; |
| | | import com.ruoyi.system.api.domain.vo.MgtBulletinBoardVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtMapIntTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.*; |
| | | import com.ruoyi.system.api.service.RemoteOrderService; |
| | | import com.ruoyi.system.api.domain.vo.AppOrderTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.cloud.openfeign.FallbackFactory; |
| | |
| | | public R autoCancelOrder(String orderId) { |
| | | return R.fail("自动取消订单失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<List<MgtMapBigTotalVo>> shopSalesRank(List<Long> shopIdList) { |
| | | return R.fail("获取销售排行失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<MerHomeShopTotalVo> getShopServiceTotal(Long shopId) { |
| | | return R.fail("获取商户服务统计失败:" + throwable.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.system.api.domain.dto.BirthdayGiftSendDto; |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBasePlatformDto; |
| | | import com.ruoyi.system.api.domain.vo.AppOrderTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtBulletinBoardVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtMapIntTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.*; |
| | | import com.ruoyi.system.api.factory.RemoteOrderFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | */ |
| | | @PostMapping("/order/autoCancelOrder") |
| | | public R autoCancelOrder(@RequestBody String orderId); |
| | | |
| | | |
| | | @PostMapping("/order/shopSalesRank") |
| | | public R<List<MgtMapBigTotalVo>> shopSalesRank(@RequestBody List<Long> shopIdList); |
| | | |
| | | /** |
| | | * @description 获取商户服务统计 |
| | | * @author jqs |
| | | * @date 2023/8/24 18:29 |
| | | * @param shopId |
| | | * @return R<MerHomeShopTotalVo> |
| | | */ |
| | | @PostMapping("/order/getShopServiceTotal") |
| | | public R<MerHomeShopTotalVo> getShopServiceTotal(@RequestBody Long shopId); |
| | | } |
| | |
| | | @Data |
| | | public class StaffActivityListDto extends StaffBaseDto { |
| | | |
| | | @ApiModelProperty(value = "活动来源1平台活动2店铺活动") |
| | | private Integer activityFrom; |
| | | |
| | | @ApiModelProperty(value = "活动类型1秒杀") |
| | | private Integer activityType; |
| | |
| | | @ApiModelProperty(value = "活动id") |
| | | private String activityId; |
| | | |
| | | @ApiModelProperty(value = "活动类型1秒杀") |
| | | private Integer activityType; |
| | | |
| | | @ApiModelProperty(value = "活动名称") |
| | | private String activityName; |
| | | |
| | |
| | | return activityMapper.listStaffActivity(staffActivityListDto); |
| | | } |
| | | |
| | | private void createActivityCode(String activityId){ |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | <select id="listStaffActivity" resultType="com.ruoyi.goods.domain.vo.MgtActivityListVo"> |
| | | SELECT |
| | | ta.activity_id activityId, |
| | | 1 activityType, |
| | | ta.activity_name activityName |
| | | FROM t_activity ta |
| | | WHERE ta.del_flag = 0 |
| | |
| | | @Excel(name = "用户昵称", width = 30, sort = 1) |
| | | @ApiModelProperty(value = "用户昵称") |
| | | private String userNickName; |
| | | @Excel(name = "用户性别", width = 30, sort = 3) |
| | | @Excel(name = "性别", width = 30, sort = 3) |
| | | @ApiModelProperty(value = "用户性别") |
| | | private String gender; |
| | | @Excel(name = "用户手机", width = 30, sort = 4) |
| | | @Excel(name = "用户手机号", width = 30, sort = 4) |
| | | @ApiModelProperty(value = "用户手机") |
| | | private String userMobile; |
| | | @Excel(name = "建议类型", width = 30, sort = 5) |
| | | @ApiModelProperty(value = "建议类型1.平台2.门店") |
| | | private String suggestType; |
| | | @Excel(name = "建议内容", width = 30, sort = 6) |
| | | @Excel(name = "建议内容", width = 30, sort = 7) |
| | | @ApiModelProperty(value = "建议内容") |
| | | private String suggestContent; |
| | | @Excel(name = "平台回复内容", width = 30, sort = 8) |
| | | @Excel(name = "平台回复内容", width = 30, sort = 9) |
| | | @ApiModelProperty(value = "平台回复内容") |
| | | private String replayContent; |
| | | @Excel(name = "商户回复内容", width = 30, sort = 7) |
| | | @Excel(name = "店铺回复内容", width = 30, sort = 8) |
| | | @ApiModelProperty(value = "商户回复内容") |
| | | private String shopReplayContent; |
| | | @Excel(name = "建议状态", width = 30, sort = 9) |
| | | @Excel(name = "状态", width = 30, sort = 10) |
| | | @ApiModelProperty(value = "建议状态") |
| | | private String suggestStatus; |
| | | @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 10) |
| | | @Excel(name = "提交时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 11) |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | @Excel(name = "平台回复人", width = 30, sort = 11) |
| | | @Excel(name = "平台回复人", width = 30, sort = 12) |
| | | @ApiModelProperty(value = "回复人姓名") |
| | | private String replayUserName; |
| | | @Excel(name = "平台回复时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 13) |
| | | @Excel(name = "平台回复时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 14) |
| | | @ApiModelProperty(value = "回复时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date replayTime; |
| | | @Excel(name = "平台响应时间", width = 30, sort = 15) |
| | | @Excel(name = "平台响应时间", width = 30, sort = 16) |
| | | @ApiModelProperty(value = "平台响应时间") |
| | | private String responseTime; |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long shopId; |
| | | @Excel(name = "商户名", width = 30) |
| | | @Excel(name = "店铺名称", width = 30, sort = 6) |
| | | @ApiModelProperty(value = "商户名") |
| | | private String shopName; |
| | | @Excel(name = "商户回复人", width = 30, sort = 12) |
| | | @Excel(name = "店铺回复人", width = 30, sort = 13) |
| | | @ApiModelProperty(value = "商户回复人姓名") |
| | | private String shopReplayUserName; |
| | | @Excel(name = "商户回复时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 14) |
| | | @Excel(name = "店铺回复时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 15) |
| | | @ApiModelProperty(value = "商户回复时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date shopReplayTime; |
| | | @Excel(name = "商户响应时间", width = 30, sort = 16) |
| | | @Excel(name = "店铺响应时间", width = 30, sort = 17) |
| | | @ApiModelProperty(value = "商户响应时间") |
| | | private String shopResponseTime; |
| | | @Excel(name = "建议标签", width = 30, sort = 17) |
| | | @Excel(name = "建议标签", width = 30, sort = 18) |
| | | @ApiModelProperty(value = "建议标签") |
| | | private String suggestTags; |
| | | |
| | |
| | | import com.ruoyi.system.api.domain.dto.BirthdayGiftSendDto; |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBasePlatformDto; |
| | | import com.ruoyi.system.api.domain.vo.AppOrderTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtBulletinBoardVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtMapIntTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.*; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | orderService.autoCancelOrder(orderId); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * @description 销量排行 |
| | | * @author jqs |
| | | * @date 2023/8/24 18:24 |
| | | * @param shopIdList |
| | | * @return R<List<MgtMapBigTotalVo>> |
| | | */ |
| | | @PostMapping("/shopSalesRank") |
| | | public R<List<MgtMapBigTotalVo>> shopSalesRank(@RequestBody List<Long> shopIdList){ |
| | | List<MgtMapBigTotalVo> mapIntTotalVoList= orderService.shopSalesRank(shopIdList); |
| | | return R.ok(mapIntTotalVoList); |
| | | } |
| | | |
| | | /** |
| | | * @description 获取商户服务统计 |
| | | * @author jqs |
| | | * @date 2023/8/24 18:29 |
| | | * @param shopId |
| | | * @return R<MerHomeShopTotalVo> |
| | | */ |
| | | @PostMapping("/getShopServiceTotal") |
| | | public R<MerHomeShopTotalVo> getShopServiceTotal(@RequestBody Long shopId){ |
| | | MerHomeShopTotalVo homeShopTotalVo= orderService.getShopServiceTotal(shopId); |
| | | return R.ok(homeShopTotalVo); |
| | | } |
| | | |
| | | } |
| | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/6/20 15:50 |
| | | * @param mgtBaseShopDto |
| | | * @return MgtTotalDataTotalVo |
| | | */ |
| | | MgtTotalDataTotalVo getTotalDataMemberTotal(@Param("param")MgtBaseShopDto mgtBaseShopDto); |
| | | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/6/20 18:16 |
| | | * @param |
| | | * @return Integer |
| | |
| | | * @return |
| | | */ |
| | | List<MerOrderPageVo> pageMerMemberPayOrder(Page page,@Param("param") MerMemberNoClearOrderDto merOrderPageDto); |
| | | |
| | | /** |
| | | * @description 获取销售排行 |
| | | * @author jqs |
| | | * @date 2023/8/24 18:00 |
| | | * @param shopIdList |
| | | * @return List<MgtMapIntTotalVo> |
| | | */ |
| | | List<MgtMapBigTotalVo> shopSalesRank(@Param("shopIdList")List<Long> shopIdList); |
| | | } |
| | |
| | | @Override |
| | | public MgtTotalDataTotalVo getTotalDataTotal(MgtBaseShopDto mgtBaseShopDto) { |
| | | |
| | | //获取人数统计 |
| | | //营业额 |
| | | BigDecimal salesTotal = orderMapper.shopSalesTotal(mgtBaseShopDto); |
| | | MgtTotalDataTotalVo mgtTotalDataTotalVo = orderMapper.getTotalDataTotal(mgtBaseShopDto); |
| | | // 获取当月时间 |
| | | LocalDate currentDate = LocalDate.now(); |
| | | LocalDate firstDayOfMonth = currentDate.withDayOfMonth(1); |
| | |
| | | String lastDayOfMonthStr = lastDayOfMonth.format(formatter); |
| | | mgtBaseShopDto.setStartDate(firstDayOfMonthStr); |
| | | mgtBaseShopDto.setEndDate(lastDayOfMonthStr); |
| | | // |
| | | MgtTotalDataTotalVo mgtTotalDataTotalVo = orderMapper.getTotalDataTotal(mgtBaseShopDto); |
| | | |
| | | mgtTotalDataTotalVo.setSalesTotal(salesTotal); |
| | | //总进店人数 体验人数 体验开单人数 没体验开单人数 |
| | | MgtTotalDataTotalVo mgtTotalDataMemberTotalVo = orderMapper.getTotalDataMemberTotal(mgtBaseShopDto); |
| | | mgtTotalDataTotalVo.setOnlyExperiencePerson(mgtTotalDataMemberTotalVo.getOnlyExperiencePerson()); |
| | | mgtTotalDataTotalVo.setExperienceCyclePerson(mgtTotalDataMemberTotalVo.getExperienceCyclePerson()); |
| | | mgtTotalDataTotalVo.setOnlyCyclePerson(mgtTotalDataMemberTotalVo.getOnlyCyclePerson()); |
| | | mgtTotalDataTotalVo.setOrderPerson(mgtTotalDataMemberTotalVo.getOrderPerson()); |
| | | //续单人数 |
| | | Integer reorderPerson = orderMapper.getReorderPerson(mgtBaseShopDto); |
| | | mgtTotalDataTotalVo.setReorderPerson(reorderPerson); |
| | | //回头客 |
| | | Integer returnedPerson = orderMapper.getReturnedPerson(mgtBaseShopDto); |
| | | mgtTotalDataTotalVo.setSalesTotal(salesTotal); |
| | | mgtTotalDataTotalVo.setReorderPerson(reorderPerson); |
| | | mgtTotalDataTotalVo.setReturnedPerson(returnedPerson); |
| | | return mgtTotalDataTotalVo; |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public StaffActivityOrderTotalVo getStaffActivityOrderTotal(StaffTotalDto staffTotalDto) { |
| | | StaffActivityOrderTotalVo staffActivityOrderTotalVo = orderMapper.getStaffActivityOrderTotal(staffTotalDto); |
| | | StaffActivityOrderTotalVo staffActivityOrderTotalVo = new StaffActivityOrderTotalVo(); |
| | | if(staffTotalDto.getActivityFrom()==1){ |
| | | staffActivityOrderTotalVo = orderMapper.getStaffActivityOrderTotal(staffTotalDto); |
| | | StaffActivityOrderTotalVo staffActivityOrderGoodsTotalVo = orderMapper.getStaffActivityOrderGoodsTotal(staffTotalDto); |
| | | staffActivityOrderTotalVo.setCycleTotal(staffActivityOrderGoodsTotalVo.getCycleTotal()); |
| | | staffActivityOrderTotalVo.setServiceTotal(staffActivityOrderGoodsTotalVo.getServiceTotal()); |
| | | staffActivityOrderTotalVo.setExperienceTotal(staffActivityOrderGoodsTotalVo.getExperienceTotal()); |
| | | } |
| | | return staffActivityOrderTotalVo; |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public StaffActivityTotalVo getStaffActivityTotal(StaffTotalDto staffTotalDto) { |
| | | StaffActivityTotalVo staffActivityTotalVo = orderMapper.getStaffActivityTotal(staffTotalDto); |
| | | StaffActivityTotalVo staffActivityTotalVo = new StaffActivityTotalVo(); |
| | | if(staffTotalDto.getActivityFrom()==1){ |
| | | staffActivityTotalVo = orderMapper.getStaffActivityTotal(staffTotalDto); |
| | | } |
| | | return staffActivityTotalVo; |
| | | } |
| | | |
| | |
| | | orderDistributionTotalVo.setOrderTotalValue(orderTotalValue); |
| | | orderDistributionTotalVo.setOrderMoneyValue(orderMoneyValue); |
| | | }*/ |
| | | if(staffTotalDto.getActivityFrom()==1){ |
| | | List<MgtMapTotalPlusVo> mgtMapTotalPlusVoList = orderMapper.listStaffActivityOrderDistributionTotal(staffTotalDto); |
| | | if (mgtMapTotalPlusVoList != null && !mgtMapTotalPlusVoList.isEmpty()) { |
| | | String[] orderTotalKey = new String[mgtMapTotalPlusVoList.size()]; |
| | |
| | | orderMoneyValue[i] = mgtMapTotalPlusVo.getMapValueSecond(); |
| | | } |
| | | orderDistributionTotalVo = fillOrderTotalKeyAndValuesToRecentFiveDays(orderTotalKey,orderTotalValue,orderMoneyValue); |
| | | } |
| | | } |
| | | // 返回订单分布总数对象 |
| | | return orderDistributionTotalVo; |
| | |
| | | @Override |
| | | public MerOrderTypeTotalVo getStaffOrderTypeTotal(StaffTotalDto staffTotalDto) { |
| | | MerOrderTypeTotalVo orderTypeTotalVo = new MerOrderTypeTotalVo(); |
| | | if(staffTotalDto.getActivityFrom()==1){ |
| | | //获取商品分类销售数据 |
| | | List<MgtMapTotalPlusVo> MgtMapIntTotalVoGoodsType = orderMapper.listStaffOrderTotalGoodsType(staffTotalDto); |
| | | List<MgtMapIntTotalVo> goodsTypeTotalList = new ArrayList<>(); |
| | |
| | | orderTypeTotalVo.setGoodsTypeTotalList(goodsTypeTotalList); |
| | | orderTypeTotalVo.setGoodsTypeMoneyList(goodsTypeMoneyList); |
| | | } |
| | | } |
| | | return orderTypeTotalVo; |
| | | } |
| | | |
| | |
| | | public StaffActivityDateMemberTotalVo getStaffActivityGetMemberTotal(StaffTotalDto staffTotalDto) { |
| | | // 创建返回对象 |
| | | StaffActivityDateMemberTotalVo staffActivityDateMemberTotalVo = new StaffActivityDateMemberTotalVo(); |
| | | if(staffTotalDto.getActivityFrom()==1){ |
| | | // 查询数据库获取数据 |
| | | List<MgtMapIntTotalVo> mgtMapIntTotalVoList = orderMapper.getStaffActivityGetMemberTotal(staffTotalDto); |
| | | // 将查询结果转为Map |
| | |
| | | // 设置返回对象的日期和成员总数数组 |
| | | staffActivityDateMemberTotalVo.setDateMemberTotalKey(dateMemberTotalKey); |
| | | staffActivityDateMemberTotalVo.setDateMemberTotalValue(dateMemberTotalValue); |
| | | } |
| | | // 返回结果对象 |
| | | return staffActivityDateMemberTotalVo; |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public StaffActivityDateMemberTotalVo getStaffActivityMemberTotal(StaffTotalDto staffTotalDto) { |
| | | // 创建返回对象 |
| | | StaffActivityDateMemberTotalVo staffActivityDateMemberTotalVo = new StaffActivityDateMemberTotalVo(); |
| | | if(staffTotalDto.getActivityFrom()==1){ |
| | | MerTotalDto merTotalDto = new MerTotalDto(); |
| | | merTotalDto.setAgeType(staffTotalDto.getAgeType()); |
| | | if(staffTotalDto.getAgeType()!=null){ |
| | | List<Long> userIdList = remoteMemberService.listUserIdByAgeType(staffTotalDto.getAgeType()).getData(); |
| | | staffTotalDto.setUserIdList(userIdList); |
| | | } |
| | | // 创建返回对象 |
| | | StaffActivityDateMemberTotalVo staffActivityDateMemberTotalVo = new StaffActivityDateMemberTotalVo(); |
| | | // 查询数据库获取数据 |
| | | List<MgtMapIntTotalVo> mgtMapIntTotalVoList = orderMapper.getStaffActivityMemberTotal(staffTotalDto); |
| | | // 将查询结果转为Map |
| | |
| | | // 设置返回对象的日期和成员总数数组 |
| | | staffActivityDateMemberTotalVo.setDateMemberTotalKey(dateMemberTotalKey); |
| | | staffActivityDateMemberTotalVo.setDateMemberTotalValue(dateMemberTotalValue); |
| | | } |
| | | // 返回结果对象 |
| | | return staffActivityDateMemberTotalVo; |
| | | } |
| | |
| | | } |
| | | return merOrderPageVoList; |
| | | } |
| | | |
| | | /** |
| | | * @description 获取销售排行 |
| | | * @author jqs |
| | | * @date 2023/8/24 18:00 |
| | | * @param shopIdList |
| | | * @return List<MgtMapIntTotalVo> |
| | | */ |
| | | @Override |
| | | public List<MgtMapBigTotalVo> shopSalesRank(List<Long> shopIdList){ |
| | | return orderMapper.shopSalesRank(shopIdList); |
| | | } |
| | | |
| | | /** |
| | | * @description 获取商户服务统计 |
| | | * @author jqs |
| | | * @date 2023/8/24 18:28 |
| | | * @param shopId |
| | | * @return MerHomeShopTotalVo |
| | | */ |
| | | @Override |
| | | public MerHomeShopTotalVo getShopServiceTotal(Long shopId){ |
| | | MerHomeShopTotalVo serviceTotalVo = orderMapper.getMerHomeShopServiceTotalVo(shopId); |
| | | return serviceTotalVo; |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.order.domain.pojo.order.Order; |
| | | import com.ruoyi.order.domain.vo.*; |
| | | import com.ruoyi.system.api.domain.dto.*; |
| | | import com.ruoyi.system.api.domain.vo.AppOrderTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtBulletinBoardVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtMapIntTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | |
| | | String goodsName, String orderNo, |
| | | String orderId, BigDecimal payMoney, |
| | | String openid, String payerClientIp, List<String> goodsNameList); |
| | | |
| | | /** |
| | | * @description 获取销售排行 |
| | | * @author jqs |
| | | * @date 2023/8/24 18:00 |
| | | * @param shopIdList |
| | | * @return List<MgtMapIntTotalVo> |
| | | */ |
| | | List<MgtMapBigTotalVo> shopSalesRank(List<Long> shopIdList); |
| | | |
| | | /** |
| | | * @description 获取商户服务统计 |
| | | * @author jqs |
| | | * @date 2023/8/24 18:28 |
| | | * @param shopId |
| | | * @return MerHomeShopTotalVo |
| | | */ |
| | | MerHomeShopTotalVo getShopServiceTotal(Long shopId); |
| | | } |
| | |
| | | |
| | | <select id="getTotalDataTotal" resultType="com.ruoyi.order.domain.vo.MgtTotalDataTotalVo"> |
| | | SELECT |
| | | COUNT(DISTINCT CASE WHEN tog.goods_type = 1 THEN toc.user_id ELSE NULL END) cyclePerson, |
| | | COUNT(DISTINCT CASE WHEN tog.goods_type = 4 THEN toc.user_id ELSE NULL END) goodsPerson, |
| | | COUNT(DISTINCT CASE WHEN tog.goods_type = 4 THEN toc.order_id ELSE NULL END) goodsNumber |
| | | FROM t_order toc |
| | | INNER JOIN t_order_goods tog ON toc.order_id = tog.order_id |
| | | <if test="param.shopId != null and param.shopId != ''"> |
| | | AND toc.shop_id = #{param.shopId} |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND Date(toc.create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND Date(toc.create_time) <= #{param.endDate} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getTotalDataMemberTotal" resultType="com.ruoyi.order.domain.vo.MgtTotalDataTotalVo"> |
| | | SELECT |
| | | COUNT(DISTINCT CASE WHEN goods_type_1_count > 0 AND goods_type_3_count = 0 THEN user_id ELSE NULL END) AS onlyCyclePerson, |
| | | COUNT(DISTINCT CASE WHEN goods_type_1_count = 0 AND goods_type_3_count > 0 THEN user_id ELSE NULL END) AS onlyExperiencePerson, |
| | | COUNT(DISTINCT CASE WHEN goods_type_1_count > 0 AND goods_type_3_count > 0 THEN user_id ELSE NULL END) AS experienceCyclePerson, |
| | | COUNT(DISTINCT CASE WHEN goods_type_1_count > 0 THEN user_id ELSE NULL END) AS cyclePerson, |
| | | COUNT(DISTINCT CASE WHEN goods_type_4_count > 0 THEN user_id ELSE NULL END) AS goodsPerson, |
| | | SUM(goods_type_4_count) AS goodsNumber, |
| | | COUNT(DISTINCT CASE WHEN goods_type_1_count > 0 AND goods_type_2_count > 0 AND goods_type_3_count > 0 AND goods_type_4_count > 0 THEN user_id ELSE NULL END) AS orderPerson |
| | | COUNT(DISTINCT CASE WHEN goods_type_1_count > 0 OR goods_type_2_count > 0 OR goods_type_3_count > 0 OR goods_type_4_count > 0 THEN user_id ELSE NULL END) AS orderPerson |
| | | FROM ( |
| | | SELECT |
| | | o.user_id, |
| | |
| | | COUNT(DISTINCT CASE WHEN og.goods_type = 4 THEN og.goods_id ELSE NULL END) AS goods_type_4_count |
| | | FROM t_order o |
| | | JOIN t_order_goods og ON o.order_id = og.order_id |
| | | WHERE o.del_flag = 0 AND og.del_flag = 0 AND o.order_status IN (2,3) |
| | | WHERE o.del_flag = 0 AND og.del_flag = 0 AND o.order_status = 3 |
| | | <if test="param.shopId != null and param.shopId != ''"> |
| | | AND o.shop_id = #{param.shopId} |
| | | </if> |
| | |
| | | </select> |
| | | |
| | | <select id="getReorderPerson" resultType="java.lang.Integer"> |
| | | SELECT COUNT(DISTINCT user_id) |
| | | SELECT COUNT(temp.userId) FROM |
| | | (SELECT toc.user_id userId, |
| | | COUNT(DISTINCT toc.order_id) orderCount |
| | | FROM t_order toc |
| | | INNER JOIN t_order_goods tog ON toc.order_id = tog.order_id |
| | | WHERE toc.del_flag = 0 AND tog.goods_type = 1 |
| | | <if test="param.shopId != null and param.shopId != ''"> |
| | | AND toc.shop_id = #{param.shopId} |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND Date(toc.create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND Date(toc.create_time) <= #{param.endDate} |
| | | </if> |
| | | GROUP BY toc.user_id) AS temp |
| | | WHERE temp.orderCount > 1 |
| | | <!--SELECT COUNT(DISTINCT user_id) |
| | | FROM (SELECT t1.user_id, t1.pay_time, t2.pay_time as last_pay_time |
| | | FROM t_order t1 |
| | | INNER JOIN (SELECT toc.user_id, toc.pay_time |
| | |
| | | <if test="param.shopId != null and param.shopId != ''"> |
| | | AND toc.shop_id = #{param.shopId} |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND Date(create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND Date(create_time) <= #{param.endDate} |
| | | </if> |
| | | ORDER BY toc.pay_time DESC LIMIT 2) t2 |
| | | ON t1.user_id = t2.user_id AND t1.pay_time < t2.pay_time |
| | | WHERE t1.del_flag = 0 |
| | | HAVING DATEDIFF(t2.pay_time, t1.pay_time) <= 30) AS temp |
| | | HAVING DATEDIFF(t2.pay_time, t1.pay_time) <= 30) AS temp--> |
| | | </select> |
| | | |
| | | <select id="getReturnedPerson" resultType="java.lang.Integer"> |
| | |
| | | WHERE toc.del_flag = 0 AND (toc.order_status = 2 OR toc.order_status = 3) AND toc.shop_id = #{param.shopId} AND toc.user_id = #{param.memberUserId} |
| | | ORDER BY toc.create_time DESC |
| | | </select> |
| | | |
| | | <select id="shopSalesRank" resultType="com.ruoyi.system.api.domain.vo.MgtMapBigTotalVo"> |
| | | SELECT |
| | | shop_id mapKey, |
| | | SUM(change_receivable_money) mapValue |
| | | FROM t_order |
| | | WHERE del_flag = 0 AND order_status = 3 AND shop_id IN |
| | | <foreach collection="shopIdList" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | GROUP BY shop_id |
| | | ORDER BY mapValue DESC LIMIT 15 |
| | | </select> |
| | | </mapper> |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/pageMerAgencyTask", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取商户代理商跟进任务列表") |
| | | public R<Page<MerAgencyTaskPageVo>> pageMerAgencyTask(@RequestBody MerAgencyTaskPageDto merAgencyTaskPageDto) { |
| | |
| | | @PostMapping("/getShopByBelongUserId") |
| | | public R<ShopRelUserVo> getShopByBelongUserId(@RequestBody Long userId) |
| | | { |
| | | Shop shop = shopService.getShopByBelongUserId(userId); |
| | | Optional.ofNullable(shop).orElseThrow(() -> new ServiceException("未查询到商户信息")); |
| | | List<Shop> shopList = shopService.getShopByBelongUserId(userId); |
| | | Optional.ofNullable(shopList.get(0)).orElseThrow(() -> new ServiceException("未查询到商户信息")); |
| | | ShopRelUserVo shopRelUserVo = new ShopRelUserVo(); |
| | | shopRelUserVo.setShopId(shop.getShopId()); |
| | | shopRelUserVo.setShopId(shopList.get(0).getShopId()); |
| | | return R.ok(shopRelUserVo); |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.shop.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @ClassName FileDto |
| | | * @Description TODO |
| | | * @Author jqs |
| | | * @Date 2023/8/24 10:51 |
| | | * @Version 1.0 |
| | | */ |
| | | @Data |
| | | public class FileDto { |
| | | |
| | | @ApiModelProperty(value="文件名") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty(value="文件地址") |
| | | private String fileUrl; |
| | | |
| | | } |
| | |
| | | private String followContent; |
| | | |
| | | @ApiModelProperty(value="跟进图片地址 多个,号隔开") |
| | | private String picture; |
| | | private List<FileDto> picture; |
| | | |
| | | @ApiModelProperty(value="跟进视频地址 多个,号隔开") |
| | | private String video; |
| | | private List<FileDto> video; |
| | | |
| | | @ApiModelProperty(value="跟进音频地址 多个,号隔开") |
| | | private String audio; |
| | | private List<FileDto> audio; |
| | | |
| | | @ApiModelProperty(value="下次任务时间") |
| | | private String nextTaskDate; |
| | |
| | | private String followContent; |
| | | |
| | | @ApiModelProperty(value="跟进图片地址 多个,号隔开") |
| | | private String picture; |
| | | private List<FileDto> picture; |
| | | |
| | | @ApiModelProperty(value="跟进视频地址 多个,号隔开") |
| | | private String video; |
| | | private List<FileDto> video; |
| | | |
| | | @ApiModelProperty(value="跟进音频地址 多个,号隔开") |
| | | private String audio; |
| | | private List<FileDto> audio; |
| | | |
| | | @ApiModelProperty(value="下次任务时间") |
| | | private String nextTaskDate; |
| | |
| | | private String followContent; |
| | | |
| | | @ApiModelProperty(value="跟进图片地址 多个,号隔开") |
| | | private String picture; |
| | | private List<FileDto> picture; |
| | | |
| | | @ApiModelProperty(value="跟进视频地址 多个,号隔开") |
| | | private String video; |
| | | private List<FileDto> video; |
| | | |
| | | @ApiModelProperty(value="跟进音频地址 多个,号隔开") |
| | | private String audio; |
| | | private List<FileDto> audio; |
| | | |
| | | @ApiModelProperty(value="下次任务时间") |
| | | private String nextTaskDate; |
| | |
| | | package com.ruoyi.shop.domain.pojo.task; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @TableField("follow_from") |
| | | private Integer followFrom; |
| | | |
| | | /** |
| | | * 文件名 |
| | | */ |
| | | @TableField("file_name") |
| | | private String fileName; |
| | | /** |
| | | * 文件地址 |
| | | */ |
| | |
| | | package com.ruoyi.shop.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.shop.domain.dto.FileDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | private String callPhone; |
| | | |
| | | @ApiModelProperty(value="跟进图片地址") |
| | | private List<String> picture; |
| | | private List<FileDto> picture; |
| | | |
| | | @ApiModelProperty(value="跟进视频地址") |
| | | private List<String> video; |
| | | private List<FileDto> video; |
| | | |
| | | @ApiModelProperty(value="跟进音频地址") |
| | | private List<String> audio; |
| | | private List<FileDto> audio; |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MerMemberTaskPageVo |
| | |
| | | private String taskContent; |
| | | |
| | | @ApiModelProperty(value="处理内容") |
| | | private String dealContent; |
| | | private List<String> dealContent; |
| | | |
| | | @ApiModelProperty(value="紧急情况") |
| | | private String emergencyState;; |
| | |
| | | package com.ruoyi.shop.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.shop.domain.dto.FileDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | private String callPhone; |
| | | |
| | | @ApiModelProperty(value="跟进图片地址") |
| | | private List<String> picture; |
| | | private List<FileDto> picture; |
| | | |
| | | @ApiModelProperty(value="跟进视频地址") |
| | | private List<String> video; |
| | | private List<FileDto> video; |
| | | |
| | | @ApiModelProperty(value="跟进音频地址") |
| | | private List<String> audio; |
| | | private List<FileDto> audio; |
| | | } |
| | |
| | | package com.ruoyi.shop.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.shop.domain.dto.FileDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | private String callPhone; |
| | | |
| | | @ApiModelProperty(value="跟进图片地址") |
| | | private List<String> picture; |
| | | private List<FileDto> picture; |
| | | |
| | | @ApiModelProperty(value="跟进视频地址") |
| | | private List<String> video; |
| | | private List<FileDto> video; |
| | | |
| | | @ApiModelProperty(value="跟进音频地址") |
| | | private List<String> audio; |
| | | private List<FileDto> audio; |
| | | } |
| | |
| | | package com.ruoyi.shop.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.shop.domain.dto.FileDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | private String callPhone; |
| | | |
| | | @ApiModelProperty(value="跟进图片地址") |
| | | private List<String> picture; |
| | | private List<FileDto> picture; |
| | | |
| | | @ApiModelProperty(value="跟进视频地址") |
| | | private List<String> video; |
| | | private List<FileDto> video; |
| | | |
| | | @ApiModelProperty(value="跟进音频地址") |
| | | private List<String> audio; |
| | | private List<FileDto> audio; |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | private String[] shopSalesRankKey; |
| | | |
| | | @ApiModelProperty(value = "合作商营业额value") |
| | | private Integer[] shopSalesRankValue; |
| | | private BigDecimal[] shopSalesRankValue; |
| | | |
| | | @ApiModelProperty(value = "合作商推荐") |
| | | private List<MgtMapIntTotalVo> shopRecommendVos; |
| | |
| | | */ |
| | | @ApiModelProperty(value = "法人姓名") |
| | | private String lpCorporateName; |
| | | |
| | | @ApiModelProperty(value = "法人手机号") |
| | | private String lpMobilePhone; |
| | | |
| | | @ApiModelProperty(value = "法人邮箱") |
| | | private String lpContactEmail; |
| | | /** |
| | | * 法人身份证号 |
| | | */ |
| | |
| | | package com.ruoyi.shop.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.shop.domain.dto.FileDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | private String callPhone; |
| | | |
| | | @ApiModelProperty(value="跟进图片地址") |
| | | private List<String> picture; |
| | | private List<FileDto> picture; |
| | | |
| | | @ApiModelProperty(value="跟进视频地址") |
| | | private List<String> video; |
| | | private List<FileDto> video; |
| | | |
| | | @ApiModelProperty(value="跟进音频地址") |
| | | private List<String> audio; |
| | | private List<FileDto> audio; |
| | | } |
| | |
| | | package com.ruoyi.shop.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.shop.domain.dto.FileDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | private String callPhone; |
| | | |
| | | @ApiModelProperty(value="跟进图片地址") |
| | | private List<String> picture; |
| | | private List<FileDto> picture; |
| | | |
| | | @ApiModelProperty(value="跟进视频地址") |
| | | private List<String> video; |
| | | private List<FileDto> video; |
| | | |
| | | @ApiModelProperty(value="跟进音频地址") |
| | | private List<String> audio; |
| | | private List<FileDto> audio; |
| | | } |
| | |
| | | package com.ruoyi.shop.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.shop.domain.dto.FileDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | private String callPhone; |
| | | |
| | | @ApiModelProperty(value="跟进图片地址") |
| | | private List<String> picture; |
| | | private List<FileDto> picture; |
| | | |
| | | @ApiModelProperty(value="跟进视频地址") |
| | | private List<String> video; |
| | | private List<FileDto> video; |
| | | |
| | | @ApiModelProperty(value="跟进音频地址") |
| | | private List<String> audio; |
| | | private List<FileDto> audio; |
| | | |
| | | |
| | | } |
| | |
| | | List<MgtMapIntTotalVo> listShopAreaRank(@Param("param")MgtBasePlatformDto mgtBasePlatformDto); |
| | | |
| | | /** |
| | | * @description 商户类型统计 |
| | | * @description 销售排行 |
| | | * @author jqs |
| | | * @date 2023/6/21 17:40 |
| | | * @param |
| | | * @return List<MgtMapIntTotalVo> |
| | | */ |
| | | List<MgtMapIntTotalVo> listShopSalesRank(@Param("param")MgtBasePlatformDto mgtBasePlatformDto); |
| | | List<Long> listShopSalesRank(@Param("param")MgtBasePlatformDto mgtBasePlatformDto); |
| | | |
| | | /** |
| | | * @description 商户类型统计 |
| | |
| | | */ |
| | | MemberTaskSimpleVo getLastMemberTask(@Param("userId")Long userId); |
| | | |
| | | /** |
| | | * @description 获取任务处理内容 |
| | | * @author jqs |
| | | * @date 2023/8/24 12:05 |
| | | * @param taskId |
| | | * @return List<String> |
| | | */ |
| | | List<String> listDealContent(@Param("taskId")String taskId); |
| | | |
| | | } |
| | |
| | | * 0 0/30 * * * ? |
| | | * 定时检查 每30分钟检查一次 微信二级商户进件状态 |
| | | */ |
| | | @Scheduled(cron="0 0/30 * * * ?") |
| | | @Scheduled(cron="0 0/15 * * * ?") |
| | | private void queryEcommerceApplyMentsStatus(){ |
| | | if(schedulerUtils.getSchedulerRun()) { |
| | | log.info("--------------------定时检查微信二级商户进件状态任务开始执行--------------------"); |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.binarywang.wxpay.bean.ecommerce.ApplymentsStatusResult; |
| | | import com.google.common.base.Joiner; |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopAuthentication; |
| | |
| | | import com.ruoyi.shop.enums.dict.IDict; |
| | | import com.ruoyi.shop.mapper.shop.ShopAuthenticationMapper; |
| | | import com.ruoyi.shop.service.shop.ShopAuthenticationService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | |
| | | @Override |
| | | public List<ShopAuthentication> getShopAuthNeedUpdateStatus() { |
| | | List<Integer> auditStatusList = Arrays.asList(1, 2, 3, 5); |
| | | |
| | | LambdaQueryWrapper<ShopAuthentication> queryWrapper = Wrappers.lambdaQuery(); |
| | | queryWrapper.in(ShopAuthentication::getAuditStatus, auditStatusList); |
| | | queryWrapper.isNotNull(ShopAuthentication::getApplymentId); |
| | |
| | | import com.ruoyi.system.api.domain.poji.sys.SysUser; |
| | | import com.ruoyi.system.api.domain.vo.*; |
| | | import com.ruoyi.system.api.service.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | * @since 2023-04-25 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class ShopServiceImpl extends ServiceImpl<ShopMapper, Shop> implements ShopService { |
| | | |
| | | @Resource |
| | |
| | | */ |
| | | @Override |
| | | public StaffHomeShopTotalVo getStaffHomeTotal(Long userId){ |
| | | List<Long> userIds = null; |
| | | List<Long> shopIds = null; |
| | | List<Long> userIds = new ArrayList<>(); |
| | | List<Long> shopIds = new ArrayList<>(); |
| | | //如果是leader 查询leader下面所有的员工下的所有shopId |
| | | if(remoteSysStaffService.isLeader()){ |
| | | userIds = sysUserService.getUserIdsByDept(userId).getData(); |
| | |
| | | MgtBasePlatformDto mgtBasePlatformDto = new MgtBasePlatformDto(); |
| | | mgtBasePlatformDto.setUserIdList(userIds); |
| | | shopIds = shopMapper.listShopIdByTotal(mgtBasePlatformDto); |
| | | Shop shop = this.getShopByBelongUserId(userId); |
| | | if(shop!=null){ |
| | | List<Shop> shopList = this.getShopByBelongUserId(userId); |
| | | if(shopList!=null&&!shopList.isEmpty()){ |
| | | for(Shop shop : shopList){ |
| | | shopIds.add(shop.getShopId()); |
| | | } |
| | | userIds.add(userId); |
| | | } |
| | | }else { |
| | | //普通员工查询商户归属的shopId |
| | | Shop shop = this.getShopByBelongUserId(userId); |
| | | List<Shop> shopList = this.getShopByBelongUserId(userId); |
| | | if(shopList!=null&&!shopList.isEmpty()){ |
| | | for(Shop shop : shopList){ |
| | | shopIds.add(shop.getShopId()); |
| | | } |
| | | } |
| | | } |
| | | //分别查询 |
| | | StaffHomeShopTotalVo staffHomeShopTotalVo = new StaffHomeShopTotalVo(); |
| | |
| | | throw new ServiceException(e.getMessage()); |
| | | } |
| | | shopAuthentication.setAuditStatus(3); |
| | | shopAuthentication.setApplymentId(applymentsResult.getApplymentId()); |
| | | shopAuthenticationService.saveOrUpdate(shopAuthentication); |
| | | } |
| | | |
| | |
| | | plTotalShopTotalVo.setAreaRankVos(shopAreaRank); |
| | | } |
| | | //获取销售排名 |
| | | List<MgtMapIntTotalVo> shopSalesRank = shopMapper.listShopSalesRank(mgtBasePlatformDto); |
| | | List<MgtMapBigTotalVo> shopSalesRank = remoteOrderService.shopSalesRank(shopIdList).getData(); |
| | | if (shopSalesRank != null && shopSalesRank.size() > 0) { |
| | | String[] shopSalesKey = new String[shopSalesRank.size()]; |
| | | Integer[] shopSalesValue = new Integer[shopSalesRank.size()]; |
| | | BigDecimal[] shopSalesValue = new BigDecimal[shopSalesRank.size()]; |
| | | // 遍历不同商品类型的会员数列表,设置商品类型数组和对应的会员数数组 |
| | | for (int i = 0; i < shopSalesRank.size(); i++) { |
| | | shopSalesKey[i] = shopSalesRank.get(i).getMapKey(); |
| | |
| | | * @return Shop |
| | | */ |
| | | @Override |
| | | public Shop getShopByBelongUserId(Long userId){ |
| | | public List<Shop> getShopByBelongUserId(Long userId){ |
| | | LambdaQueryWrapper<Shop> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(Shop::getDelFlag,0); |
| | | queryWrapper.eq(Shop::getBelongUserId,userId); |
| | | return this.getOne(queryWrapper,false); |
| | | return this.list(queryWrapper); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public StaffShopSimpleTotalVo getStaffSimpleTotal(Long userId){ |
| | | List<Long> userIdList = null; |
| | | List<Long> userIdList = new ArrayList<>(); |
| | | if(remoteSysStaffService.isLeader()){ |
| | | userIdList = sysUserService.getUserIdsByDept(userId).getData(); |
| | | userIdList.add(userId); |
| | |
| | | merHomeShopTotalVo.setShopId(shopId); |
| | | // 通过远程订单服务获取商店总览信息 |
| | | MerHomeShopTotalVo orderVo = remoteOrderService.getMerHomeTotal(merHomeShopTotalVo).getData(); |
| | | // 获取商店总计信息 |
| | | ShopTotal shopTotal = shopTotalService.getById(shopId); |
| | | // 获取商店任务计数 |
| | | Integer taskCount = memberTaskService.getMemberIngTotal(shopId); |
| | | // 设置员工商店信息对象的属性 |
| | |
| | | staffShopInfoGetVo.setUnHandleOrder(orderVo.getUnHandleOrder()); |
| | | staffShopInfoGetVo.setShopTask(taskCount); |
| | | staffShopInfoGetVo.setShopTurnover(orderVo.getShopTurnover()); |
| | | staffShopInfoGetVo.setCycleSurp(shopTotal.getUseableCyclePerson()); |
| | | staffShopInfoGetVo.setExplorationSurp(shopTotal.getUseableExperiencePerson()); |
| | | staffShopInfoGetVo.setCycleSurp(orderVo.getCycleSurp()); |
| | | staffShopInfoGetVo.setExplorationSurp(orderVo.getExplorationSurp()); |
| | | staffShopInfoGetVo.setShopId(shopId); |
| | | staffShopInfoGetVo.setShopName(shop.getShopName()); |
| | | staffShopInfoGetVo.setShopType(shop.getShopType()); |
| | | staffShopInfoGetVo.setShopPicture(shopPicture); |
| | | staffShopInfoGetVo.setBusinessStartTime(shop.getBusinessStartTime()); |
| | | staffShopInfoGetVo.setBusinessEndTime(shop.getBusinessEndTime()); |
| | |
| | | |
| | | @Override |
| | | public void queryEcommerceApplyMentsStatus() { |
| | | log.info("开始获取微信二级商户待检查列表"); |
| | | List<ShopAuthentication> list = shopAuthenticationService.getShopAuthNeedUpdateStatus(); |
| | | log.info("定时检查微信二级商户"+list.toString()); |
| | | list.forEach(item -> queryApplyStatusByApplymentId(item.getApplymentId(), item.getShopId())); |
| | | } |
| | | |
| | |
| | | */ |
| | | private void queryApplyStatusByApplymentId(String applymentId, Long shopId) { |
| | | try { |
| | | log.debug("定时检查微信二级商户applymentId"+applymentId); |
| | | if (StringUtils.isNotBlank(applymentId)) { |
| | | ApplymentsStatusResult result = wechatPayUtils.queryApplyStatusByApplymentId(applymentId); |
| | | shopAuthenticationService.updateAuditStatusByApplymentId(applymentId, result); |
| | |
| | | if(shopTask!=null){ |
| | | staffShopDetailVo.setNextTaskDate(shopTask.getTaskDate()); |
| | | } |
| | | staffShopDetailVo.setShopId(shopId); |
| | | return staffShopDetailVo; |
| | | } |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.shop.domain.dto.FileDto; |
| | | import com.ruoyi.shop.domain.dto.MerAgencyTaskPageDto; |
| | | import com.ruoyi.shop.domain.dto.MgtShopTaskPageDto; |
| | | import com.ruoyi.shop.domain.dto.StaffAgencyPageDto; |
| | |
| | | if(merAgencyTaskRecordPageVoList!=null&&!merAgencyTaskRecordPageVoList.isEmpty()){ |
| | | Long followId; |
| | | List<TaskFile> taskFileList; |
| | | List<String> picture = new ArrayList<>(); |
| | | List<String> video = new ArrayList<>(); |
| | | List<String> audio = new ArrayList<>(); |
| | | List<FileDto> picture = new ArrayList<>(); |
| | | List<FileDto> video = new ArrayList<>(); |
| | | List<FileDto> audio = new ArrayList<>(); |
| | | //获取跟进详情文件 |
| | | for(MerAgencyTaskRecordPageVo merAgencyTaskRecordPageVo : merAgencyTaskRecordPageVoList){ |
| | | followId = merAgencyTaskRecordPageVo.getFollowId(); |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,1); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | picture = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | picture = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,2); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | video = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | video = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,3); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | audio = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | audio = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | merAgencyTaskRecordPageVo.setPicture(picture); |
| | | merAgencyTaskRecordPageVo.setVideo(video); |
| | |
| | | if(mgtAgencyTaskRecordPageVoList!=null&&!mgtAgencyTaskRecordPageVoList.isEmpty()){ |
| | | Long followId; |
| | | List<TaskFile> taskFileList; |
| | | List<String> picture = new ArrayList<>(); |
| | | List<String> video = new ArrayList<>(); |
| | | List<String> audio = new ArrayList<>(); |
| | | List<FileDto> picture = new ArrayList<>(); |
| | | List<FileDto> video = new ArrayList<>(); |
| | | List<FileDto> audio = new ArrayList<>(); |
| | | Long userId; |
| | | SysUser sysUser; |
| | | for(MgtAgencyTaskRecordPageVo mgtAgencyTaskRecordPageVo : mgtAgencyTaskRecordPageVoList){ |
| | |
| | | followId = mgtAgencyTaskRecordPageVo.getFollowId(); |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,1); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | picture = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | picture = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,2); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | video = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | video = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,3); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | audio = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | audio = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | mgtAgencyTaskRecordPageVo.setPicture(picture); |
| | | mgtAgencyTaskRecordPageVo.setVideo(video); |
| | |
| | | if(agencyTaskRecordPageVoList!=null&&!agencyTaskRecordPageVoList.isEmpty()){ |
| | | Long followId; |
| | | List<TaskFile> taskFileList; |
| | | List<String> picture = new ArrayList<>(); |
| | | List<String> video = new ArrayList<>(); |
| | | List<String> audio = new ArrayList<>(); |
| | | List<FileDto> picture = new ArrayList<>(); |
| | | List<FileDto> video = new ArrayList<>(); |
| | | List<FileDto> audio = new ArrayList<>(); |
| | | Long userId; |
| | | SysUser sysUser; |
| | | for(StaffAgencyTaskRecordPageVo staffAgencyTaskRecordPageVo : agencyTaskRecordPageVoList){ |
| | |
| | | followId = staffAgencyTaskRecordPageVo.getFollowId(); |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,1); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | picture = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | picture = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,2); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | video = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | video = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,3); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | audio = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | audio = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | staffAgencyTaskRecordPageVo.setPicture(picture); |
| | | staffAgencyTaskRecordPageVo.setVideo(video); |
| | |
| | | import com.ruoyi.common.core.utils.DateUtils; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.utils.uuid.IdUtils; |
| | | import com.ruoyi.shop.domain.dto.MerAgencyTaskPageDto; |
| | | import com.ruoyi.shop.domain.dto.MerCreateAgencyTaskDto; |
| | | import com.ruoyi.shop.domain.dto.MerFollowAgencyTaskDto; |
| | | import com.ruoyi.shop.domain.dto.MerFollowPhoneDto; |
| | | import com.ruoyi.shop.domain.dto.*; |
| | | import com.ruoyi.shop.domain.pojo.task.*; |
| | | import com.ruoyi.shop.domain.vo.MerAgencySimpleTaskRecordPageVo; |
| | | import com.ruoyi.shop.domain.vo.MerAgencyTaskPageVo; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | agencyTaskRecord.setFollowContent(merFollowAgencyTaskDto.getFollowContent()); |
| | | agencyTaskRecord.setCreateTime(new Date()); |
| | | //创建任务详情文件 |
| | | String picture = merFollowAgencyTaskDto.getPicture(); |
| | | String video = merFollowAgencyTaskDto.getVideo(); |
| | | String audio = merFollowAgencyTaskDto.getAudio(); |
| | | String[] strArr; |
| | | List<FileDto> picture = merFollowAgencyTaskDto.getPicture(); |
| | | List<FileDto> video = merFollowAgencyTaskDto.getVideo(); |
| | | List<FileDto> audio = merFollowAgencyTaskDto.getAudio(); |
| | | TaskFile taskFile; |
| | | if(StringUtils.isNotBlank(picture)){ |
| | | strArr = picture.split(","); |
| | | for(String str : strArr){ |
| | | List<TaskFile> taskFileList = new ArrayList<>(); |
| | | // 判断图片是否为空,并处理 |
| | | if (picture!=null&&!picture.isEmpty()) { |
| | | for (FileDto fileDto : picture) { |
| | | taskFile = new TaskFile(); |
| | | taskFile.setDelFlag(0); |
| | | taskFile.setFollowId(agencyTaskRecord.getId()); |
| | | taskFile.setFollowFrom(2); |
| | | taskFile.setFileUrl(str); |
| | | taskFile.setFollowFrom(1); |
| | | taskFile.setFileName(fileDto.getFileName()); |
| | | taskFile.setFileUrl(fileDto.getFileUrl()); |
| | | taskFile.setFileType(1); |
| | | taskFileService.saveOrUpdate(taskFile); |
| | | taskFileList.add(taskFile); |
| | | } |
| | | } |
| | | if(StringUtils.isNotBlank(video)){ |
| | | strArr = video.split(","); |
| | | for(String str : strArr){ |
| | | // 判断视频是否为空,并处理 |
| | | if (video!=null&&!video.isEmpty()) { |
| | | for (FileDto fileDto : video) { |
| | | taskFile = new TaskFile(); |
| | | taskFile.setDelFlag(0); |
| | | taskFile.setFollowId(agencyTaskRecord.getId()); |
| | | taskFile.setFollowFrom(2); |
| | | taskFile.setFileUrl(str); |
| | | taskFile.setFollowFrom(1); |
| | | taskFile.setFileName(fileDto.getFileName()); |
| | | taskFile.setFileUrl(fileDto.getFileUrl()); |
| | | taskFile.setFileType(2); |
| | | taskFileService.saveOrUpdate(taskFile); |
| | | |
| | | taskFileList.add(taskFile); |
| | | } |
| | | } |
| | | if(StringUtils.isNotBlank(audio)){ |
| | | strArr = audio.split(","); |
| | | for(String str : strArr){ |
| | | // 判断音频是否为空,并处理 |
| | | if (audio!=null&&!audio.isEmpty()) { |
| | | for (FileDto fileDto : audio) { |
| | | taskFile = new TaskFile(); |
| | | taskFile.setDelFlag(0); |
| | | taskFile.setFollowId(agencyTaskRecord.getId()); |
| | | taskFile.setFollowFrom(2); |
| | | taskFile.setFileUrl(str); |
| | | taskFile.setFollowFrom(1); |
| | | taskFile.setFileName(fileDto.getFileName()); |
| | | taskFile.setFileUrl(fileDto.getFileUrl()); |
| | | taskFile.setFileType(3); |
| | | taskFileService.saveOrUpdate(taskFile); |
| | | taskFileList.add(taskFile); |
| | | } |
| | | } |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | taskFileService.saveBatch(taskFileList); |
| | | } |
| | | } |
| | | //创建新任务 |
| | | if(StringUtils.isNotBlank(merFollowAgencyTaskDto.getNextTaskDate())){ |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.utils.DateUtils; |
| | | import com.ruoyi.shop.domain.dto.FileDto; |
| | | import com.ruoyi.shop.domain.dto.MerMemberTaskPageDto; |
| | | import com.ruoyi.shop.domain.dto.MgtMemberTaskPageDto; |
| | | import com.ruoyi.shop.domain.pojo.task.MemberTaskRecord; |
| | |
| | | if(merMemberTaskRecordPageVoList!=null&&!merMemberTaskRecordPageVoList.isEmpty()){ |
| | | Long followId; |
| | | List<TaskFile> taskFileList; |
| | | List<String> picture = new ArrayList<>(); |
| | | List<String> video = new ArrayList<>(); |
| | | List<String> audio = new ArrayList<>(); |
| | | List<FileDto> picture = new ArrayList<>(); |
| | | List<FileDto> video = new ArrayList<>(); |
| | | List<FileDto> audio = new ArrayList<>(); |
| | | for(MerMemberTaskRecordPageVo merMemberTaskRecordPageVo : merMemberTaskRecordPageVoList){ |
| | | followId = merMemberTaskRecordPageVo.getFollowId(); |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,1); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | picture = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | picture = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,2); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | video = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | video = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,3); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | audio = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | audio = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | merMemberTaskRecordPageVo.setPicture(picture); |
| | | merMemberTaskRecordPageVo.setVideo(video); |
| | |
| | | if(mgtMemberFollowPageVoList!=null&&!mgtMemberFollowPageVoList.isEmpty()){ |
| | | Long followId; |
| | | List<TaskFile> taskFileList; |
| | | List<String> picture = new ArrayList<>(); |
| | | List<String> video = new ArrayList<>(); |
| | | List<String> audio = new ArrayList<>(); |
| | | List<FileDto> picture = new ArrayList<>(); |
| | | List<FileDto> video = new ArrayList<>(); |
| | | List<FileDto> audio = new ArrayList<>(); |
| | | for(MgtMemberFollowPageVo mgtMemberFollowPageVo : mgtMemberFollowPageVoList){ |
| | | followId = mgtMemberFollowPageVo.getFollowId(); |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,1); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | picture = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | picture = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,2); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | video = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | video = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,3); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | audio = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | audio = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | mgtMemberFollowPageVo.setPicture(picture); |
| | | mgtMemberFollowPageVo.setVideo(video); |
| | |
| | | import com.ruoyi.common.core.utils.DateUtils; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.utils.uuid.IdUtils; |
| | | import com.ruoyi.shop.domain.dto.MerCreateMemberTaskDto; |
| | | import com.ruoyi.shop.domain.dto.MerFollowMemberTaskDto; |
| | | import com.ruoyi.shop.domain.dto.MerFollowPhoneDto; |
| | | import com.ruoyi.shop.domain.dto.MerMemberTaskPageDto; |
| | | import com.ruoyi.shop.domain.dto.*; |
| | | import com.ruoyi.shop.domain.pojo.task.MemberTask; |
| | | import com.ruoyi.shop.domain.pojo.task.MemberTaskRecord; |
| | | import com.ruoyi.shop.domain.pojo.task.TaskFile; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | @Override |
| | | public List<MerMemberTaskPageVo> pageMerMemberTask(Page page, MerMemberTaskPageDto merMemberTaskPageDto){ |
| | | List<MerMemberTaskPageVo> merMemberTaskPageVoList = memberTaskMapper.pageMerMemberTask(page, merMemberTaskPageDto); |
| | | List<String> dealContent = new ArrayList<>(); |
| | | if(merMemberTaskPageVoList!=null&&!merMemberTaskPageVoList.isEmpty() ){ |
| | | for(MerMemberTaskPageVo merMemberTaskPageVo : merMemberTaskPageVoList){ |
| | | dealContent = memberTaskMapper.listDealContent(merMemberTaskPageVo.getTaskId()); |
| | | if(dealContent!=null&&!dealContent.isEmpty()){ |
| | | merMemberTaskPageVo.setDealContent(dealContent); |
| | | } |
| | | } |
| | | } |
| | | return merMemberTaskPageVoList; |
| | | } |
| | | |
| | |
| | | // 保存或更新会员任务记录 |
| | | memberTaskRecordService.saveOrUpdate(memberTaskRecord); |
| | | // 获取图片、视频和音频 |
| | | String picture = merFollowMemberTaskDto.getPicture(); |
| | | String video = merFollowMemberTaskDto.getVideo(); |
| | | String audio = merFollowMemberTaskDto.getAudio(); |
| | | String[] strArr; |
| | | List<FileDto> picture = merFollowMemberTaskDto.getPicture(); |
| | | List<FileDto> video = merFollowMemberTaskDto.getVideo(); |
| | | List<FileDto> audio = merFollowMemberTaskDto.getAudio(); |
| | | TaskFile taskFile; |
| | | List<TaskFile> taskFileList = new ArrayList<>(); |
| | | // 判断图片是否为空,并处理 |
| | | if (StringUtils.isNotBlank(picture)) { |
| | | strArr = picture.split(","); |
| | | for (String str : strArr) { |
| | | if (picture!=null&&!picture.isEmpty()) { |
| | | for (FileDto fileDto : picture) { |
| | | taskFile = new TaskFile(); |
| | | taskFile.setDelFlag(0); |
| | | taskFile.setFollowId(memberTaskRecord.getId()); |
| | | taskFile.setFollowFrom(2); |
| | | taskFile.setFileUrl(str); |
| | | taskFile.setFileName(fileDto.getFileName()); |
| | | taskFile.setFileUrl(fileDto.getFileUrl()); |
| | | taskFile.setFileType(1); |
| | | taskFileService.saveOrUpdate(taskFile); |
| | | taskFileList.add(taskFile); |
| | | } |
| | | } |
| | | // 判断视频是否为空,并处理 |
| | | if (StringUtils.isNotBlank(video)) { |
| | | strArr = video.split(","); |
| | | for (String str : strArr) { |
| | | if (video!=null&&!video.isEmpty()) { |
| | | for (FileDto fileDto : video) { |
| | | taskFile = new TaskFile(); |
| | | taskFile.setDelFlag(0); |
| | | taskFile.setFollowId(memberTaskRecord.getId()); |
| | | taskFile.setFollowFrom(2); |
| | | taskFile.setFileUrl(str); |
| | | taskFile.setFileName(fileDto.getFileName()); |
| | | taskFile.setFileUrl(fileDto.getFileUrl()); |
| | | taskFile.setFileType(2); |
| | | taskFileService.saveOrUpdate(taskFile); |
| | | taskFileList.add(taskFile); |
| | | } |
| | | } |
| | | // 判断音频是否为空,并处理 |
| | | if (StringUtils.isNotBlank(audio)) { |
| | | strArr = audio.split(","); |
| | | for (String str : strArr) { |
| | | if (audio!=null&&!audio.isEmpty()) { |
| | | for (FileDto fileDto : audio) { |
| | | taskFile = new TaskFile(); |
| | | taskFile.setDelFlag(0); |
| | | taskFile.setFollowId(memberTaskRecord.getId()); |
| | | taskFile.setFollowFrom(2); |
| | | taskFile.setFileUrl(str); |
| | | taskFile.setFileName(fileDto.getFileName()); |
| | | taskFile.setFileUrl(fileDto.getFileUrl()); |
| | | taskFile.setFileType(3); |
| | | taskFileService.saveOrUpdate(taskFile); |
| | | taskFileList.add(taskFile); |
| | | } |
| | | } |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | taskFileService.saveBatch(taskFileList); |
| | | } |
| | | } |
| | | // 判断下一个任务日期是否为空,并处理 |
| | | if (StringUtils.isNotBlank(merFollowMemberTaskDto.getNextTaskDate())) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.shop.domain.dto.FileDto; |
| | | import com.ruoyi.shop.domain.dto.MgtShopTaskPageDto; |
| | | import com.ruoyi.shop.domain.dto.StaffShopTaskPageDto; |
| | | import com.ruoyi.shop.domain.pojo.task.ShopTaskRecord; |
| | |
| | | if(mgtShopTaskRecordPageVoList!=null&&!mgtShopTaskRecordPageVoList.isEmpty()){ |
| | | Long followId; |
| | | List<TaskFile> taskFileList; |
| | | List<String> picture = new ArrayList<>(); |
| | | List<String> video = new ArrayList<>(); |
| | | List<String> audio = new ArrayList<>(); |
| | | List<FileDto> picture = new ArrayList<>(); |
| | | List<FileDto> video = new ArrayList<>(); |
| | | List<FileDto> audio = new ArrayList<>(); |
| | | Long userId; |
| | | SysUser sysUser; |
| | | for(MgtShopTaskRecordPageVo mgtShopTaskRecordPageVo : mgtShopTaskRecordPageVoList){ |
| | |
| | | followId = mgtShopTaskRecordPageVo.getFollowId(); |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,1); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | picture = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | picture = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,2); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | video = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | video = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,3); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | audio = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | audio = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | mgtShopTaskRecordPageVo.setPicture(picture); |
| | | mgtShopTaskRecordPageVo.setVideo(video); |
| | |
| | | if(myShopTaskRecordPageVoList!=null&&!myShopTaskRecordPageVoList.isEmpty()){ |
| | | Long followId; |
| | | List<TaskFile> taskFileList; |
| | | List<String> picture = new ArrayList<>(); |
| | | List<String> video = new ArrayList<>(); |
| | | List<String> audio = new ArrayList<>(); |
| | | List<FileDto> picture = new ArrayList<>(); |
| | | List<FileDto> video = new ArrayList<>(); |
| | | List<FileDto> audio = new ArrayList<>(); |
| | | Long userId; |
| | | SysUser sysUser; |
| | | for(StaffMyShopTaskRecordPageVo staffMyShopTaskRecordPageVo : myShopTaskRecordPageVoList){ |
| | |
| | | followId = staffMyShopTaskRecordPageVo.getFollowId(); |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,1); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | picture = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | picture = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,2); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | video = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | video = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,3); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | audio = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | audio = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | staffMyShopTaskRecordPageVo.setPicture(picture); |
| | | staffMyShopTaskRecordPageVo.setVideo(video); |
| | |
| | | if(myShopTaskRecordPageVoList!=null&&!myShopTaskRecordPageVoList.isEmpty()){ |
| | | Long followId; |
| | | List<TaskFile> taskFileList; |
| | | List<String> picture = new ArrayList<>(); |
| | | List<String> video = new ArrayList<>(); |
| | | List<String> audio = new ArrayList<>(); |
| | | List<FileDto> picture = new ArrayList<>(); |
| | | List<FileDto> video = new ArrayList<>(); |
| | | List<FileDto> audio = new ArrayList<>(); |
| | | Long userId; |
| | | SysUser sysUser; |
| | | for(StaffMyShopTaskRecordPageVo staffMyShopTaskRecordPageVo : myShopTaskRecordPageVoList){ |
| | |
| | | followId = staffMyShopTaskRecordPageVo.getFollowId(); |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,1); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | picture = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | picture = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,2); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | video = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | video = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,3); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | audio = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | audio = taskFileList.stream() |
| | | .map(taskFile -> { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileName(taskFile.getFileName()); |
| | | fileDto.setFileUrl(taskFile.getFileUrl()); |
| | | return fileDto; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | staffMyShopTaskRecordPageVo.setPicture(picture); |
| | | staffMyShopTaskRecordPageVo.setVideo(video); |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | // 保存或更新会员任务记录 |
| | | shopTaskRecordService.saveOrUpdate(shopTaskRecord); |
| | | // 获取图片、视频和音频 |
| | | String picture = staffFollowShopTaskDto.getPicture(); |
| | | String video = staffFollowShopTaskDto.getVideo(); |
| | | String audio = staffFollowShopTaskDto.getAudio(); |
| | | String[] strArr; |
| | | List<FileDto> picture = staffFollowShopTaskDto.getPicture(); |
| | | List<FileDto> video = staffFollowShopTaskDto.getVideo(); |
| | | List<FileDto> audio = staffFollowShopTaskDto.getAudio(); |
| | | TaskFile taskFile; |
| | | List<TaskFile> taskFileList = new ArrayList<>(); |
| | | // 判断图片是否为空,并处理 |
| | | if (StringUtils.isNotBlank(picture)) { |
| | | strArr = picture.split(","); |
| | | for (String str : strArr) { |
| | | if (picture!=null&&!picture.isEmpty()) { |
| | | for (FileDto fileDto : picture) { |
| | | taskFile = new TaskFile(); |
| | | taskFile.setDelFlag(0); |
| | | taskFile.setFollowId(shopTaskRecord.getId()); |
| | | taskFile.setFollowFrom(4); |
| | | taskFile.setFileUrl(str); |
| | | taskFile.setFileName(fileDto.getFileName()); |
| | | taskFile.setFileUrl(fileDto.getFileUrl()); |
| | | taskFile.setFileType(1); |
| | | taskFileService.saveOrUpdate(taskFile); |
| | | taskFileList.add(taskFile); |
| | | } |
| | | } |
| | | // 判断视频是否为空,并处理 |
| | | if (StringUtils.isNotBlank(video)) { |
| | | strArr = video.split(","); |
| | | for (String str : strArr) { |
| | | if (video!=null&&!video.isEmpty()) { |
| | | for (FileDto fileDto : video) { |
| | | taskFile = new TaskFile(); |
| | | taskFile.setDelFlag(0); |
| | | taskFile.setFollowId(shopTaskRecord.getId()); |
| | | taskFile.setFollowFrom(4); |
| | | taskFile.setFileUrl(str); |
| | | taskFile.setFileName(fileDto.getFileName()); |
| | | taskFile.setFileUrl(fileDto.getFileUrl()); |
| | | taskFile.setFileType(2); |
| | | taskFileService.saveOrUpdate(taskFile); |
| | | taskFileList.add(taskFile); |
| | | } |
| | | } |
| | | // 判断音频是否为空,并处理 |
| | | if (StringUtils.isNotBlank(audio)) { |
| | | strArr = audio.split(","); |
| | | for (String str : strArr) { |
| | | if (audio!=null&&!audio.isEmpty()) { |
| | | for (FileDto fileDto : audio) { |
| | | taskFile = new TaskFile(); |
| | | taskFile.setDelFlag(0); |
| | | taskFile.setFollowId(shopTaskRecord.getId()); |
| | | taskFile.setFollowFrom(4); |
| | | taskFile.setFileUrl(str); |
| | | taskFile.setFileName(fileDto.getFileName()); |
| | | taskFile.setFileUrl(fileDto.getFileUrl()); |
| | | taskFile.setFileType(3); |
| | | taskFileService.saveOrUpdate(taskFile); |
| | | taskFileList.add(taskFile); |
| | | } |
| | | } |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | taskFileService.saveBatch(taskFileList); |
| | | } |
| | | } |
| | | // 判断下一个任务日期是否为空,并处理 |
| | | if (StringUtils.isNotBlank(staffFollowShopTaskDto.getNextTaskDate())) { |
| | |
| | | * @param userId |
| | | * @return Shop |
| | | */ |
| | | Shop getShopByBelongUserId(Long userId); |
| | | List<Shop> getShopByBelongUserId(Long userId); |
| | | |
| | | /** |
| | | * @description 员工端获取商户列表 |
| | |
| | | ORDER BY COUNT(ts.shop_id) DESC LIMIT 15 |
| | | </select> |
| | | |
| | | <select id="listShopSalesRank" resultType="com.ruoyi.system.api.domain.vo.MgtMapIntTotalVo"> |
| | | <select id="listShopSalesRank" resultType="java.lang.Long"> |
| | | SELECT |
| | | ts.shop_name mapKey, |
| | | ts.shop_id mapKey, |
| | | tst.total_order_money mapValue |
| | | FROM t_shop ts |
| | | INNER JOIN t_shop_total tst ON ts.shop_id = tst.shop_id |
| | |
| | | tmt.task_id taskId, |
| | | tmt.task_date taskDate, |
| | | tmt.task_content taskContent, |
| | | tmtr.follow_content dealContent, |
| | | tmt.emergency_state emergencyState, |
| | | CASE tmt.task_status WHEN 1 THEN 1 WHEN 3 THEN 1 ELSE 0 END todayFlag |
| | | FROM t_member_task tmt |
| | | LEFT JOIN t_member_task_record tmtr ON tmt.task_id = tmtr.task_id |
| | | WHERE tmt.del_flag = 0 AND tmt.shop_id = #{param.shopId} AND tmt.user_id = #{param.memberUserId} |
| | | ORDER BY todayFlag,task_date DESC |
| | | </select> |
| | |
| | | WHERE del_flag = 0 AND task_status = 2 AND user_id = #{userId} |
| | | ORDER BY task_date DESC LIMIT 1 |
| | | </select> |
| | | |
| | | <select id="listDealContent" resultType="java.lang.String"> |
| | | SELECT follow_content FROM t_member_task_record WHERE del_flag = 0 AND task_id = #{taskId} |
| | | </select> |
| | | </mapper> |