| | |
| | | <version>2.3.3</version> |
| | | </dependency> |
| | | |
| | | <!-- 测试类 --> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-test</artifactId> |
| | | <version>2.7.7</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>junit</groupId> |
| | | <artifactId>junit</artifactId> |
| | | <version>4.13.1</version> |
| | | <scope>test</scope> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | |
| | | @Data |
| | | public class MgtGoodsPageVo { |
| | | |
| | | @Excel(name = "商品图片", width = 30, sort = 1) |
| | | @Excel(name = "序号", width = 30, sort = 1) |
| | | @ApiModelProperty(value = "商品id") |
| | | private String goodsId; |
| | | |
| | |
| | | @ApiModelProperty(value = "商品标签") |
| | | private String goodsTags; |
| | | |
| | | @Excel(name = "商品图片", width = 30, sort = 2) |
| | | @Excel(name = "商品封面", width = 30, sort = 2) |
| | | @ApiModelProperty(value = "商品图片") |
| | | private String goodsPicture; |
| | | |
| | |
| | | private ActivityService activityService; |
| | | |
| | | /** |
| | | * 活动定时开始 |
| | | * 每1小时检查活动定时开始 |
| | | */ |
| | | @Scheduled(cron="0 0 */1 * * ?") |
| | | private void timingSendCoupon(){ |
| | |
| | | Date activityStartTime = mgtActivityEditDto.getActivityStartTime(); |
| | | Date activityEndTime = mgtActivityEditDto.getActivityEndTime(); |
| | | // 根据当前时间和活动时间判断活动状态 |
| | | if (nowTime.compareTo(activityStartTime) < 0) { |
| | | /*if (nowTime.compareTo(activityStartTime) < 0) { |
| | | activity.setActivityStatus(0); |
| | | } else { |
| | | activity.setActivityStatus(1); |
| | | |
| | | } |
| | | }*/ |
| | | // 设置活动信息 |
| | | activity.setActivityName(mgtActivityEditDto.getActivityName()); |
| | | activity.setActivityIntroduce(mgtActivityEditDto.getActivityIntroduce()); |
New file |
| | |
| | | package com.ruoyi.goods; |
| | | |
| | | import com.ruoyi.goods.service.activity.ActivityService; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @ClassName goodsTest |
| | | * @Description TODO |
| | | * @Author jqs |
| | | * @Date 2023/8/30 17:09 |
| | | * @Version 1.0 |
| | | */ |
| | | @RunWith(SpringJUnit4ClassRunner.class) |
| | | @SpringBootTest(classes = RuoYiGoodsApplication.class) |
| | | public class goodsTest { |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private ActivityService activityService; |
| | | |
| | | /*@Test |
| | | public void main() { |
| | | activityService.startActivity("5bc8775388954f4182826b9b02ae8983"); |
| | | |
| | | }*/ |
| | | } |
| | |
| | | private MemberService memberService; |
| | | |
| | | /** |
| | | * 优惠券定时发送 |
| | | * 每小时优惠券定时发送 |
| | | */ |
| | | @Scheduled(cron="0 */1 * * * ?") |
| | | private void timingSendCoupon(){ |
| | | if(schedulerUtils.getSchedulerRun()) { |
| | | log.info("优惠券定时发放任务开始执行"); |
| | | log.info("----------------优惠券定时发放任务开始执行-------------"); |
| | | couponService.timingSendCoupon(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 定时检查优惠券过期 |
| | | * 每天凌晨定时检查优惠券过期 |
| | | */ |
| | | @Scheduled(cron="1 0 0 * * ?") |
| | | private void timingCheckMemberCoupon(){ |
| | | if(schedulerUtils.getSchedulerRun()) { |
| | | log.info("定时检查优惠券过期任务开始执行"); |
| | | log.info("----------------定时检查优惠券过期任务开始执行----------------"); |
| | | memberCouponService.timingCheckMemberCoupon(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description 每天凌晨定时更新用户每日任务 |
| | | * @author jqs |
| | | * @date 2023/8/30 11:39 |
| | | * @param |
| | | * @return void |
| | | */ |
| | | @Scheduled(cron="3 0 0 * * ?") |
| | | private void timinginitIntegralFlag(){ |
| | | if(schedulerUtils.getSchedulerRun()) { |
| | | log.info("定时更新用户每日任务标记开始执行"); |
| | | log.info("----------------定时更新用户每日任务标记开始执行----------------"); |
| | | memberTotalService.initIntegralFlag(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description 早上10点发送生日祝福 |
| | | * @author jqs |
| | | * @date 2023/8/30 11:38 |
| | | * @param |
| | | * @return void |
| | | */ |
| | | @Scheduled(cron="0 0 10 * * ?") |
| | | private void timingSendBirthdayBless(){ |
| | | if(schedulerUtils.getSchedulerRun()) { |
| | | log.info("定时发送生日祝福开始执行"); |
| | | log.info("----------------定时发送生日祝福开始执行----------------"); |
| | | memberService.sendBirthdayBless(); |
| | | } |
| | | } |
| | |
| | | @ApiModelProperty(value="服务商户id") |
| | | private Long shopId; |
| | | |
| | | @Excel(name = "服务商户", width = 30, sort = 2) |
| | | @ApiModelProperty(value="服务商户") |
| | | @Excel(name = "服务店铺", width = 30, sort = 2) |
| | | @ApiModelProperty(value="服务店铺") |
| | | private String shopName; |
| | | |
| | | @Excel(name = "服务商品名称", width = 30, sort = 3) |
| | | @ApiModelProperty(value="服务商品名称") |
| | | @Excel(name = "周期商品名称", width = 30, sort = 3) |
| | | @ApiModelProperty(value="周期商品名称") |
| | | private String consumerGoodsName; |
| | | |
| | | @Excel(name = "服务次数", width = 30, sort = 4) |
| | |
| | | |
| | | |
| | | /** |
| | | * 定时检查订单状态任务开始执行 |
| | | * 每15分钟定时检查订单状态任务开始执行 |
| | | */ |
| | | @Scheduled(cron="0 0/15 * * * ?") |
| | | private void timingCheckMemberCoupon(){ |
| | | if(schedulerUtils.getSchedulerRun()) { |
| | | log.info("定时检查订单状态任务开始执行"); |
| | | log.info("---------------定时检查订单状态任务开始执行---------------"); |
| | | orderService.checkOrderStatus(); |
| | | log.info("---------------定时检查订单状态任务结束执行---------------"); |
| | | } |
| | | } |
| | | |
| | |
| | | * @param payerClientIp |
| | | * @param goodsNameList |
| | | */ |
| | | public void createWxPayInfo(AppPlaceOrderVo appPlaceOrderVo, Long userId, Long shopId, |
| | | |
| | | private void createWxPayInfo(AppPlaceOrderVo appPlaceOrderVo, Long userId, Long shopId, |
| | | String goodsName, String outTradeNo, |
| | | String orderId, BigDecimal payMoney, |
| | | String openid, String payerClientIp, List<String> goodsNameList,Integer orderFrom){ |
| | |
| | | } |
| | | //订单分布 |
| | | //日期全部时固定为5天 |
| | | Boolean fillZero = false; |
| | | if(StringUtils.isBlank(mgtBasePlatformDto.getStartDate())){ |
| | | mgtBasePlatformDto.setEndDate(DateUtils.getDate()); |
| | | mgtBasePlatformDto.setStartDate(DateUtils.parseDateToStr("yyyy-MM-dd",DateUtils.addDays(new Date(),-4))); |
| | | fillZero = true; |
| | | } |
| | | List<MgtMapTotalPlusVo> MgtMapIntTotalVos = orderMapper.listPlTotalOrderTotal(mgtBasePlatformDto); |
| | | if (MgtMapIntTotalVos != null && MgtMapIntTotalVos.size() > 0) { |
| | |
| | | orderTotalValue[i] = MgtMapIntTotalVos.get(i).getMapValueFirst(); |
| | | orderMoneyValue[i] = MgtMapIntTotalVos.get(i).getMapValueSecond(); |
| | | } |
| | | if(fillZero){ |
| | | MerOrderDistributionTotalVo merOrderDistributionTotalVo = fillOrderTotalKeyAndValuesToRecentFiveDays(orderTotalKey,orderTotalValue,orderMoneyValue); |
| | | mgtTotalOrderTotalVo.setOrderTotalKey(merOrderDistributionTotalVo.getOrderTotalKey()); |
| | | mgtTotalOrderTotalVo.setOrderTotalValue(merOrderDistributionTotalVo.getOrderTotalValue()); |
| | | mgtTotalOrderTotalVo.setOrderMoneyValue(merOrderDistributionTotalVo.getOrderMoneyValue()); |
| | | }else{ |
| | | mgtTotalOrderTotalVo.setOrderTotalKey(orderTotalKey); |
| | | mgtTotalOrderTotalVo.setOrderTotalValue(orderTotalValue); |
| | | mgtTotalOrderTotalVo.setOrderMoneyValue(orderMoneyValue); |
| | | } |
| | | |
| | | } |
| | | return mgtTotalOrderTotalVo; |
| | | } |
| | |
| | | } |
| | | }*/ |
| | | List<Long> shopIdList = remoteShopService.listShopIdByPlTotal(mgtBasePlatformDto).getData(); |
| | | if(mgtBasePlatformDto.getShopId()!=null){ |
| | | shopIdList = new ArrayList<>(); |
| | | shopIdList.add(mgtBasePlatformDto.getShopId()); |
| | | } |
| | | mgtBasePlatformDto.setShopIdList(shopIdList); |
| | | //获取基础统计 |
| | | MgtPlTotalActivityTotalVo totalActivityTotalVo = orderMapper.getPlTotalActivityTotal(mgtBasePlatformDto); |
| | |
| | | mgtMapBigTotalVo.setMapKey("单品"); |
| | | noGoods = false; |
| | | } |
| | | goodsTypeTotalList.add(mgtMapIntTotalVo); |
| | | goodsTypeMoneyList.add(mgtMapBigTotalVo); |
| | | } |
| | | //补充缺少类型 |
| | | if(noCycle){ |
| | |
| | | */ |
| | | @Override |
| | | public MerOrderDistributionTotalVo MerOrderDistributionTotalVo(MerTotalDto merTotalDto) { |
| | | //获取查询的商户列表 |
| | | if (merTotalDto.getShopAllFlag() != null && merTotalDto.getShopAllFlag() == 1) { |
| | | List<Long> shopIdList = remoteShopService.listShopIdByShopId(merTotalDto.getShopId()).getData(); |
| | | merTotalDto.setShopIdList(shopIdList); |
| | |
| | | String[] orderTotalKey = new String[mgtMapTotalPlusVoList.size()]; |
| | | Integer[] orderTotalValue = new Integer[mgtMapTotalPlusVoList.size()]; |
| | | BigDecimal[] orderMoneyValue = new BigDecimal[mgtMapTotalPlusVoList.size()]; |
| | | //数据为空返回空数组 |
| | | if (mgtMapTotalPlusVoList != null && !mgtMapTotalPlusVoList.isEmpty()) { |
| | | MgtMapTotalPlusVo mgtMapTotalPlusVo; |
| | | for (int i = 0; i < mgtMapTotalPlusVoList.size(); i++) { |
| | |
| | | orderTotalValue[i] = mgtMapTotalPlusVo.getMapValueFirst(); |
| | | orderMoneyValue[i] = mgtMapTotalPlusVo.getMapValueSecond(); |
| | | } |
| | | //补充日期到近5日 |
| | | orderDistributionTotalVo = fillOrderTotalKeyAndValuesToRecentFiveDays(orderTotalKey,orderTotalValue,orderMoneyValue); |
| | | }else{ |
| | | orderDistributionTotalVo.setOrderTotalKey(orderTotalKey); |
| | |
| | | List<MerOrderPageVo> pageMerMemberPayOrder(Page page,MerMemberNoClearOrderDto merOrderPageDto); |
| | | |
| | | |
| | | void createWxPayInfo(AppPlaceOrderVo appPlaceOrderVo, Long userId, Long shopId, |
| | | String goodsName, String orderNo, |
| | | String orderId, BigDecimal payMoney, |
| | | String openid, String payerClientIp, List<String> goodsNameList,Integer orderFrom); |
| | | |
| | | /** |
| | | * @description 获取销售排行 |
| | |
| | | AND Date(toc.create_time) <= #{param.endDate} |
| | | </if> |
| | | GROUP BY tog.goods_name |
| | | ORDER BY SUM(tog.goods_total_money) DESC LIMIT 10 |
| | | ORDER BY SUM(tog.goods_receivable_money) DESC LIMIT 10 |
| | | </select> |
| | | |
| | | <select id="listTotalOrderTotalOrderFrom" resultType="com.ruoyi.system.api.domain.vo.MgtMapBigTotalVo"> |
| | |
| | | <select id="getTotalActivityTotal" resultType="com.ruoyi.order.domain.vo.MgtTotalActivityTotalVo"> |
| | | SELECT |
| | | COUNT(CASE WHEN order_status = 3 THEN order_id ELSE NULL END) orderTotal, |
| | | IFNULL(SUM(CASE WHEN order_status = 3 AND pay_type = 1 THEN change_receivable_money WHEN order_status = 3 AND pay_type = 2 THEN change_receivable_money + online_pay_money ELSE 0 END),0) orderMoney, |
| | | IFNULL(SUM(change_receivable_money),0) orderMoney, |
| | | COUNT(DISTINCT user_id) orderJoinPerson |
| | | FROM t_order WHERE del_flag = 0 AND order_from = 2 AND order_status IN (2,3) |
| | | <if test="param.shopId != null and param.shopId != ''"> |
| | |
| | | SELECT |
| | | tog.goods_type mapKey, |
| | | COUNT(DISTINCT toc.order_id) AS mapValueFirst, |
| | | IFNULL(SUM(tog.goods_total_money),0) AS mapValueSecond, |
| | | IFNULL(SUM(tog.goods_receivable_money),0) AS mapValueSecond, |
| | | COUNT(DISTINCT toc.user_id) AS mapValueThird |
| | | FROM t_order toc |
| | | INNER JOIN t_order_goods tog ON tog.order_id = toc.order_id |
| | |
| | | IFNULL(SUM(CASE WHEN tog.goods_type = 1 THEN 1 ELSE 0 END),0) cycleTotal, |
| | | IFNULL(SUM(CASE WHEN tog.goods_type = 3 THEN 1 ELSE 0 END),0) experienceTotal, |
| | | IFNULL(SUM(CASE WHEN tog.goods_type = 2 THEN 1 ELSE 0 END),0) serviceTotal, |
| | | IFNULL(SUM(CASE WHEN tog.goods_type = 1 THEN tog.goods_total_money ELSE 0 END),0) cycleMoney, |
| | | IFNULL(SUM(CASE WHEN tog.goods_type = 3 THEN tog.goods_total_money ELSE 0 END),0) experienceMoney, |
| | | IFNULL(SUM(CASE WHEN tog.goods_type = 2 THEN tog.goods_total_money ELSE 0 END),0) serviceMoney |
| | | IFNULL(SUM(CASE WHEN tog.goods_type = 1 THEN tog.goods_receivable_money ELSE 0 END),0) cycleMoney, |
| | | IFNULL(SUM(CASE WHEN tog.goods_type = 3 THEN tog.goods_receivable_money ELSE 0 END),0) experienceMoney, |
| | | IFNULL(SUM(CASE WHEN tog.goods_type = 2 THEN tog.goods_receivable_money ELSE 0 END),0) serviceMoney |
| | | FROM t_order toc |
| | | INNER JOIN t_order_goods tog ON tog.order_id = toc.order_id |
| | | WHERE toc.del_flag = 0 |
| | |
| | | WHEN 2 THEN "秒杀订单" |
| | | WHEN 3 THEN "线下订单" |
| | | END mapKey, |
| | | IFNULL(SUM(toc.order_money),0) mapValue |
| | | IFNULL(SUM(CASE WHEN pay_type = 1 THEN change_receivable_money WHEN pay_type = 2 THEN change_receivable_money + online_pay_money ELSE 0 END),0) mapValue |
| | | FROM t_order toc |
| | | WHERE toc.del_flag = 0 AND order_status = 3 |
| | | <if test="param.shopIdList != null and param.shopIdList.size() > 0"> |
| | |
| | | SELECT |
| | | COUNT(DISTINCT toc.user_id) orderPerson, |
| | | COUNT(DISTINCT CASE WHEN tog.goods_type = 1 THEN toc.user_id ELSE NULL END) cyclePerson, |
| | | COUNT(DISTINCT CASE WHEN tog.goods_type = 2 THEN toc.user_id ELSE NULL END) experiencePerson, |
| | | COUNT(DISTINCT CASE WHEN tog.goods_type = 3 THEN toc.user_id ELSE NULL END) servicePerson |
| | | COUNT(DISTINCT CASE WHEN tog.goods_type = 3 THEN toc.user_id ELSE NULL END) experiencePerson, |
| | | COUNT(DISTINCT CASE WHEN tog.goods_type = 2 THEN toc.user_id ELSE NULL END) servicePerson |
| | | FROM t_order toc |
| | | INNER JOIN t_order_goods tog ON tog.order_id = toc.order_id |
| | | WHERE toc.del_flag = 0 AND toc.order_from = 2 AND toc.order_status = 3 AND toc.new_member_flag = 1 |
| | |
| | | SUM(tog.goods_receivable_money) AS mapValueSecond |
| | | FROM t_order toc |
| | | INNER JOIN t_order_goods tog ON toc.order_id = tog.order_id |
| | | WHERE toc.del_flag = 0 AND toc.order_status IN (2,3) AND tog.del_flag = 0 |
| | | WHERE toc.del_flag = 0 AND toc.order_status = 3 AND tog.del_flag = 0 |
| | | <if test="param.goodsType != null and param.goodsType != ''"> |
| | | AND tog.goods_type = #{param.goodsType} |
| | | </if> |
| | |
| | | <select id="getStaffActivityOrderTotal" resultType="com.ruoyi.order.domain.vo.StaffActivityOrderTotalVo"> |
| | | SELECT |
| | | COUNT(DISTINCT toc.order_id) orderTotal, |
| | | IFNULL(SUM(toc.change_receivable_money),0) orderMoney, |
| | | IFNULL(SUM(SUM(CASE WHEN toc.order_status = 3 AND toc.pay_type = 1 THEN toc.change_receivable_money WHEN toc.order_status = 3 AND toc.pay_type = 2 THEN toc.change_receivable_money + toc.online_pay_money ELSE 0 END),0) orderMoney, |
| | | COUNT(DISTINCT toc.user_id) memberTotal |
| | | FROM t_order toc |
| | | WHERE toc.del_flag = 0 AND toc.shop_id = #{param.shopId} AND toc.order_from = 2 AND toc.order_status = 3 |
| | |
| | | IFNULL(SUM(CASE WHEN tog.goods_type = 2 THEN 1 ELSE 0 END),0) serviceTotal |
| | | FROM t_order toa |
| | | INNER JOIN t_order_goods tog ON tog.order_id = toa.order_id |
| | | WHERE toa.order_from = 2 AND toa.shop_id = #{param.shopId} AND toa.order_status IN (2,3) AND toa.new_member_flag = 1 |
| | | WHERE toa.order_from = 2 AND toa.shop_id = #{param.shopId} AND toa.order_status = 3 AND toa.new_member_flag = 1 |
| | | <if test="param.activityId !=null and param.activityId != ''"> |
| | | AND toa.activity_id = #{param.activityId} |
| | | </if> |
| | |
| | | SELECT |
| | | tog.goods_type mapKey, |
| | | COUNT(DISTINCT toc.order_id) AS mapValueFirst, |
| | | IFNULL(SUM(tog.goods_total_money),0) AS mapValueSecond |
| | | IFNULL(SUM(tog.goods_receivable_money),0) AS mapValueSecond |
| | | FROM t_order toc |
| | | INNER JOIN t_order_goods tog ON tog.order_id = toc.order_id |
| | | WHERE toc.del_flag = 0 AND toc.shop_id = #{param.shopId} AND toc.order_from = 2 AND toc.order_status = 3 |
| | |
| | | package com.ruoyi.order; |
| | | |
| | | import com.ruoyi.order.service.order.OrderService; |
| | | import com.ruoyi.system.api.domain.dto.MgtBasePlatformDto; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
| | |
| | | @Resource |
| | | private OrderService orderService; |
| | | |
| | | /*@Test |
| | | @Test |
| | | public void main() { |
| | | MgtBasePlatformDto mgtBasePlatformDto = new MgtBasePlatformDto(); |
| | | orderService.getPlTotalOrderTotal(mgtBasePlatformDto); |
| | | |
| | | }*/ |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value="签约时间") |
| | | private String signTime; |
| | | |
| | | @Excel(name = "商户名称", width = 30, sort = 9) |
| | | @ApiModelProperty(value="商户名称") |
| | | @Excel(name = "店铺名称", width = 30, sort = 9) |
| | | @ApiModelProperty(value="店铺名称") |
| | | private String shopName; |
| | | |
| | | @Excel(name = "商户编号", width = 30, sort = 2) |
| | | @Excel(name = "店铺编号", width = 30, sort = 2) |
| | | @ApiModelProperty(value="商户编号") |
| | | private String shopNumber; |
| | | |
| | | @Excel(name = "商户标签", width = 30, sort = 3) |
| | | @ApiModelProperty(value="商户标签") |
| | | @Excel(name = "店铺标签", width = 30, sort = 3) |
| | | @ApiModelProperty(value="店铺标签") |
| | | private String shopTags; |
| | | |
| | | @ApiModelProperty(value="签约人id") |
| | |
| | | @ApiModelProperty(value="关联员工") |
| | | private String belongUser; |
| | | |
| | | @Excel(name = "关联部门", width = 30, sort = 7) |
| | | @Excel(name = "所属部门", width = 30, sort = 7) |
| | | @ApiModelProperty(value="关联部门") |
| | | private String belongDept; |
| | | |
| | |
| | | @ApiModelProperty(value="店铺地址") |
| | | private String shopAddress; |
| | | |
| | | @Excel(name = "店主姓名", width = 30, sort = 14) |
| | | @ApiModelProperty(value="店主姓名") |
| | | @Excel(name = "店长", width = 30, sort = 14) |
| | | @ApiModelProperty(value="店长") |
| | | private String shopownerName; |
| | | |
| | | @Excel(name = "店主联系方式", width = 30, sort = 15) |
| | | @ApiModelProperty(value="店主联系方式") |
| | | @Excel(name = "店长联系方式", width = 30, sort = 15) |
| | | @ApiModelProperty(value="店长联系方式") |
| | | private String shopownerPhone; |
| | | |
| | | @Excel(name = "商户状态", width = 30, sort = 18) |
| | | @Excel(name = "状态", width = 30, sort = 18) |
| | | @ApiModelProperty(value="商户状态-1删除0冻结1正常2终止合作") |
| | | private String shopStatus; |
| | | |
| | | @Excel(name = "商户活动次数", width = 30, sort = 17) |
| | | @ApiModelProperty(value="商户活动次数") |
| | | @Excel(name = "店铺活动次数", width = 30, sort = 17) |
| | | @ApiModelProperty(value="店铺活动次数") |
| | | private Integer shopActivityCount; |
| | | |
| | | @Excel(name = "店铺设置状态", width = 30, sort = 16) |
| | | @ApiModelProperty(value="店铺设置状态") |
| | | @Excel(name = "店铺状态", width = 30, sort = 16) |
| | | @ApiModelProperty(value="店铺状态") |
| | | private String shopCustomStatus; |
| | | |
| | | @ApiModelProperty(value="冻结状态0解冻1冻结") |
| | |
| | | @ApiModelProperty(value = "商户类型1.经销商2.代理商") |
| | | private String shopType; |
| | | |
| | | @Excel(name = "店长姓名", width = 30, sort = 3) |
| | | @ApiModelProperty(value="店主姓名") |
| | | @Excel(name = "店长", width = 30, sort = 3) |
| | | @ApiModelProperty(value="店长") |
| | | private String shopownerName; |
| | | |
| | | @Excel(name = "手机号", width = 30, sort = 4) |
| | | @ApiModelProperty(value="店主联系方式") |
| | | @Excel(name = "店长联系方式", width = 30, sort = 4) |
| | | @ApiModelProperty(value="店长联系方式") |
| | | private String shopownerPhone; |
| | | |
| | | @Excel(name = "建议内容", width = 30, sort = 5) |
| | |
| | | |
| | | |
| | | /** |
| | | * 定时检查跟进任务状态 |
| | | * 每天凌晨定时检查今日跟进任务状态 |
| | | */ |
| | | @Scheduled(cron="5 0 * * * ?") |
| | | private void timingCheckMemberCoupon(){ |
| | | if(schedulerUtils.getSchedulerRun()) { |
| | | log.info("定时检查跟进任务状态任务开始执行"); |
| | | log.info("--------------------定时检查跟进任务状态任务开始执行--------------------"); |
| | | shopTaskService.checkTaskDateStatus(); |
| | | log.info("--------------------定时检查跟进任务状态任务结束执行--------------------"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 0 0/30 * * * ? |
| | | * |
| | | * 定时检查 每30分钟检查一次 微信二级商户进件状态 |
| | | */ |
| | | @Scheduled(cron="0 0/15 * * * ?") |
| | |
| | | for(Shop shop : shopList){ |
| | | shopIds.add(shop.getShopId()); |
| | | } |
| | | userIds.add(userId); |
| | | } |
| | | } |
| | | //分别查询 |
| | |
| | | shopTask.setEmergencyState(staffAddTaskDto.getEmergencyState()); |
| | | shopTask.setCreateTime(new Date()); |
| | | shopTask.setTaskDate(staffAddTaskDto.getTaskDate()); |
| | | //任务状态 |
| | | int i = staffAddTaskDto.getTaskDate().compareTo(nowTimeStr); |
| | | if(i>0){ |
| | | shopTask.setTaskStatus(0); |
| | |
| | | */ |
| | | @Override |
| | | public void checkTaskDateStatus(){ |
| | | //平台-商户任务状态 |
| | | shopTaskMapper.checkShopTaskStatus(); |
| | | //商户-代理商任务状态 |
| | | shopTaskMapper.checkAgencyTaskStatus(); |
| | | //商户-会员任务状态 |
| | | shopTaskMapper.checkMemberTaskStatus(); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | import com.ruoyi.shop.RuoYiShopApplication; |
| | | import com.ruoyi.shop.domain.vo.MgtPlTotalShopTotalVo; |
| | | import com.ruoyi.shop.service.shop.ShopService; |
| | | import com.ruoyi.system.api.domain.dto.MgtBasePlatformDto; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | |
| | | |
| | | @Test |
| | | public void main() { |
| | | MgtBasePlatformDto mgtBasePlatformDto = new MgtBasePlatformDto(); |
| | | mgtBasePlatformDto.setDeptId(121L); |
| | | mgtBasePlatformDto.setUserId(146L); |
| | | MgtPlTotalShopTotalVo mgtPlTotalShopTotalVo = shopService.getPlTotalShopTotal(mgtBasePlatformDto); |
| | | System.out.println(mgtPlTotalShopTotalVo); |
| | | shopService.getStaffHomeTotal(164L); |
| | | } |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) { |
| | | this.publisher = applicationEventPublisher; |
| | | } |
| | |
| | | |
| | | |
| | | /** |
| | | * 定时同步企业微信部门 |
| | | * 每天凌晨2点定时同步企业微信部门 |
| | | */ |
| | | @Scheduled(cron="0 0 2 * * ?") |
| | | private void timingCheckMemberCoupon(){ |
| | |
| | | } |
| | | |
| | | /** |
| | | * 定时同步企业微信部门 |
| | | * 每天8点35分发送员工通知今日跟进任务 |
| | | */ |
| | | @Scheduled(cron="0 35 8 * * ?") |
| | | private void timingSendTaskMessage(){ |
| | |
| | | * @author jqs34 |
| | | * @date 2023/6/24 17:32 |
| | | */ |
| | | @Override |
| | | public String importTag(List<MgtTagImportDto> tagList, Integer tagType, String operName) { |
| | | if (StringUtils.isNull(tagList) || tagList.size() == 0) { |
| | | throw new ServiceException("导入标签数据不能为空!"); |
| | |
| | | */ |
| | | @Override |
| | | public void sendTaskMessage(){ |
| | | //获取员工任务列表 |
| | | List<MgtUserTaskMsgVo> userTaskMsgVoList = remoteShopService.getTaskMsgList().getData(); |
| | | WxCpMessage message; |
| | | SysStaff sysStaff; |
| | | if(userTaskMsgVoList!=null&&!userTaskMsgVoList.isEmpty()){ |
| | | //循环发送消息 |
| | | for(MgtUserTaskMsgVo mgtUserTaskMsgVo : userTaskMsgVoList){ |
| | | sysStaff = sysStaffService.getByUserId(mgtUserTaskMsgVo.getUserId()); |
| | | if(sysStaff!=null&& StringUtils.isNotBlank(sysStaff.getWxUserId())){ |