1 文件已重命名
139个文件已修改
1个文件已删除
9个文件已添加
| | |
| | | String COUPON_GET_ERROR = "该优惠券不可领取"; |
| | | |
| | | String COUPON_GET_ALL = "该优惠券已领取完"; |
| | | |
| | | String DOUBLE_INTEGRAL_TASK = "任务已完成,请勿重复提交"; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.api.constant; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Getter; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | @JsonFormat(shape = JsonFormat.Shape.OBJECT) |
| | | @Getter |
| | | public enum DelayTaskEnum { |
| | | |
| | | ORDER_AUTOMATIC_CANCEL("订单延时任务-自动关闭","15分钟后订单自动关闭"), |
| | | COUPON_SEND_DELAY_TASK("优惠券延时任务","定时启动优惠券发送"), |
| | | ACTIVITY_START_TASK("活动延时任务","定时开始任务"), |
| | | ACTIVITY_END_TASK("活动延时任务","定时结束任务"), |
| | | ; |
| | | |
| | | String name; |
| | | String code; |
| | | |
| | | private static Map<String, DelayTaskEnum> valueMap = new HashMap<>(); |
| | | |
| | | static { |
| | | for(DelayTaskEnum gender : DelayTaskEnum.values()) { |
| | | valueMap.put(gender.name, gender); |
| | | } |
| | | } |
| | | |
| | | DelayTaskEnum(String name, String code) { |
| | | this.code = code; |
| | | this.name=name; |
| | | } |
| | | |
| | | public static String getByName(String name) { |
| | | DelayTaskEnum result = valueMap.get(name); |
| | | if(result == null) { |
| | | throw new IllegalArgumentException("No element matches " + name); |
| | | } |
| | | return result.code; |
| | | } |
| | | } |
| | |
| | | * 省市区列表key |
| | | */ |
| | | String CITY_LIST = "CITY_LIST"; |
| | | |
| | | /** |
| | | * 秒杀活动商品key前缀 |
| | | */ |
| | | String ACTIVITY_GOODS = "ACTIVITY_GOODS"; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.api.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @ClassName IntegralChangeDto |
| | | * @Description TODO |
| | | * @Author jqs |
| | | * @Date 2023/7/12 15:39 |
| | | * @Version 1.0 |
| | | */ |
| | | @Data |
| | | public class IntegralChangeDto { |
| | | |
| | | @ApiModelProperty(value="积分类型1分享获取2平台建议获取3门店建议获取4每日签到5消费得积分") |
| | | private Integer integralType; |
| | | |
| | | @ApiModelProperty(value="变动值") |
| | | private Integer changeIntegral; |
| | | |
| | | @ApiModelProperty(value="变动用户id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value="订单") |
| | | private String orderId; |
| | | |
| | | @ApiModelProperty(value="订单") |
| | | private String orderNo; |
| | | } |
| | |
| | | @ApiModelProperty(value = "商户id集合",hidden = true) |
| | | private List<Long> shopIdList; |
| | | |
| | | @ApiModelProperty("店铺地址省code") |
| | | @ApiModelProperty(value="店铺地址省code") |
| | | private String shopProvinceCode; |
| | | |
| | | @ApiModelProperty("店铺地址市code") |
| | | @ApiModelProperty(value="店铺地址市code") |
| | | private String shopCityCode; |
| | | |
| | | @ApiModelProperty("店铺地址区code") |
| | | @ApiModelProperty(value="店铺地址区code") |
| | | private String shopAreaCode; |
| | | |
| | | @ApiModelProperty("部门id") |
| | | @ApiModelProperty(value="部门id") |
| | | private Long deptId; |
| | | |
| | | @ApiModelProperty("员工id") |
| | | @ApiModelProperty(value="员工id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "员工list",hidden = true) |
| | | private List<Long> userIdList; |
| | | |
| | | @ApiModelProperty("活动来源1平台2商户") |
| | | @ApiModelProperty(value="活动来源1平台2商户") |
| | | private Integer activityFrom; |
| | | |
| | | @ApiModelProperty("活动类型1秒杀") |
| | | @ApiModelProperty(value="活动类型1秒杀") |
| | | private Integer activityType; |
| | | |
| | | @ApiModelProperty("活动id") |
| | | @ApiModelProperty(value="活动id") |
| | | private Long activityId; |
| | | } |
File was renamed from ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/pojo/config/DelayTask.java |
| | |
| | | package com.ruoyi.system.domain.pojo.config; |
| | | package com.ruoyi.system.api.domain.poji.config; |
| | | |
| | | import java.util.Date; |
| | | 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; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @TableField("end_time") |
| | | private Date endTime; |
| | | |
| | | @TableField("create_time") |
| | | private Date createTime; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_user_coupon") |
| | | @TableName("t_member_coupon") |
| | | public class MemberCoupon extends Model<MemberCoupon> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | @ApiModelProperty(value = "商品id") |
| | | private String goodsId; |
| | | |
| | | @ApiModelProperty("优惠券类型1.满减2.折扣3.代金4.商品") |
| | | @ApiModelProperty(value="优惠券类型1.满减2.折扣3.代金4.商品") |
| | | private Integer couponType; |
| | | |
| | | @ApiModelProperty("优惠券名称") |
| | | @ApiModelProperty(value="优惠券名称") |
| | | private String couponName; |
| | | |
| | | @ApiModelProperty("门槛金额") |
| | | @ApiModelProperty(value="门槛金额") |
| | | private BigDecimal moneyThreshold; |
| | | |
| | | @ApiModelProperty("折扣金额") |
| | | @ApiModelProperty(value="折扣金额") |
| | | private BigDecimal discountMoney; |
| | | |
| | | @ApiModelProperty("折扣百分比") |
| | | @ApiModelProperty(value="折扣百分比") |
| | | private BigDecimal discountPercent; |
| | | |
| | | @ApiModelProperty("有效开始时间") |
| | | @ApiModelProperty(value="有效开始时间") |
| | | private Date validStartTime; |
| | | |
| | | @ApiModelProperty("使用有效期") |
| | | @ApiModelProperty(value="使用有效期") |
| | | private Date deadlineTime; |
| | | |
| | | @ApiModelProperty("关联商品ids") |
| | | @ApiModelProperty(value="关联商品ids") |
| | | private String relGoodsIds; |
| | | } |
| | |
| | | @Data |
| | | public class AppOrderTotalVo { |
| | | |
| | | @ApiModelProperty("待支付统计") |
| | | @ApiModelProperty(value="待支付统计") |
| | | private Integer noPayCount; |
| | | |
| | | @ApiModelProperty("待核销统计") |
| | | @ApiModelProperty(value="待核销统计") |
| | | private Integer noUseCount; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.api.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @ClassName AppOtherConfigGetVo |
| | | * @Description TODO |
| | | * @Author jqs |
| | | * @Date 2023/7/12 15:26 |
| | | * @Version 1.0 |
| | | */ |
| | | @Data |
| | | public class AppOtherConfigGetVo { |
| | | |
| | | @ApiModelProperty(value = "分享小程序可获得积分") |
| | | private Integer shareIntegral; |
| | | |
| | | @ApiModelProperty(value = "平台建议可获得积分") |
| | | private Integer suggestPlatformIntegral; |
| | | |
| | | @ApiModelProperty(value = "每日签到可获得积分") |
| | | private Integer signInIntegral; |
| | | |
| | | @ApiModelProperty(value = "门店建议可获得积分") |
| | | private Integer suggestShopIntegral; |
| | | |
| | | @ApiModelProperty(value = "购物满1元可获得积分") |
| | | private Integer payMoneyIntegral; |
| | | |
| | | @ApiModelProperty(value = "C端订单自动取消时间") |
| | | private Integer orderAutoCancelTime; |
| | | |
| | | @ApiModelProperty(value = "首页风格1.鸿瑞堂2.古引坊") |
| | | private Integer homeStyle; |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "任务时间") |
| | | private Date taskDate; |
| | | |
| | | @ApiModelProperty("任务内容") |
| | | @ApiModelProperty(value="任务内容") |
| | | private String taskContent; |
| | | |
| | | |
| | |
| | | @ApiModelProperty(value = "商品数量") |
| | | private String goodsNum; |
| | | |
| | | |
| | | @ApiModelProperty(value = "商品类型") |
| | | private String goodsType; |
| | | } |
| | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("商户类型1.经销商2.代理商") |
| | | @ApiModelProperty(value="商户类型1.经销商2.代理商") |
| | | private Integer shopType; |
| | | |
| | | @ApiModelProperty(value = "今日到店") |
| | |
| | | @Data |
| | | public class ShopRelUserVo { |
| | | |
| | | @ApiModelProperty("商户id") |
| | | @ApiModelProperty(value="商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("用户姓名") |
| | | @ApiModelProperty(value="用户姓名") |
| | | private String userName; |
| | | } |
| | |
| | | /** |
| | | * 员工id |
| | | */ |
| | | @ApiModelProperty("员工id") |
| | | @ApiModelProperty(value="员工id") |
| | | private String staffId; |
| | | /** |
| | | * 删除标记 |
| | | */ |
| | | @ApiModelProperty("删除标记") |
| | | @ApiModelProperty(value="删除标记") |
| | | private Integer delFlag; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty("用户id") |
| | | @ApiModelProperty(value="用户id") |
| | | private Long userId; |
| | | /** |
| | | * 员工姓名 |
| | | */ |
| | | @ApiModelProperty("员工姓名") |
| | | @ApiModelProperty(value="员工姓名") |
| | | private String staffName; |
| | | /** |
| | | * 员工电话 |
| | | */ |
| | | @ApiModelProperty("员工电话") |
| | | @ApiModelProperty(value="员工电话") |
| | | private String staffMobile; |
| | | /** |
| | | * 员工邮箱 |
| | | */ |
| | | @ApiModelProperty("员工邮箱") |
| | | @ApiModelProperty(value="员工邮箱") |
| | | private String staffEmail; |
| | | /** |
| | | * 员工职位 |
| | | */ |
| | | @ApiModelProperty("员工职位") |
| | | @ApiModelProperty(value="员工职位") |
| | | private String staffPost; |
| | | /** |
| | | * 员工头像 |
| | | */ |
| | | @ApiModelProperty("员工头像") |
| | | @ApiModelProperty(value="员工头像") |
| | | private String staffAvatar; |
| | | /** |
| | | * 负责人标记 |
| | | */ |
| | | @ApiModelProperty("负责人标记") |
| | | @ApiModelProperty(value="负责人标记") |
| | | private String headFlag; |
| | | |
| | | } |
| | |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseBathDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtUserIdByDept; |
| | | import com.ruoyi.system.api.domain.poji.config.Activeness; |
| | | import com.ruoyi.system.api.domain.poji.config.DelayTask; |
| | | import com.ruoyi.system.api.domain.poji.config.SysClassification; |
| | | import com.ruoyi.system.api.domain.vo.AppOtherConfigGetVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtSysSimpleUserVo; |
| | | import com.ruoyi.system.api.service.RemoteConfigService; |
| | | import com.ruoyi.system.api.domain.poji.config.SysTag; |
| | |
| | | return R.fail("获取活跃度失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<DelayTask> getDelayTask(String key) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public R addDelayTask(DelayTask delayTask) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public R deleteDelayTask(String key) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public R<AppOtherConfigGetVo> getAppOtherConfigGetVo() { |
| | | return R.fail("获取其他设置失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | |
| | | @Override |
| | |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public R autoTimeSendCoupon(String couponId) { |
| | | return R.fail("定时发送"+couponId+"优惠券失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | |
| | | }; |
| | | } |
| | |
| | | return R.fail("获取核销奖品信息失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R signShare(IntegralChangeDto integralChangeDto) { |
| | | return R.fail("积分变动失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | |
| | | }; |
| | | } |
| | |
| | | @Data |
| | | public class OauthUrlVo { |
| | | |
| | | @ApiModelProperty("企业微信网页授权链接") |
| | | @ApiModelProperty(value="企业微信网页授权链接") |
| | | private String oauthUrl; |
| | | |
| | | public OauthUrlVo(String oauthUrl) { |
| | |
| | | @Data |
| | | public class OauthUserVo { |
| | | |
| | | @ApiModelProperty("商户id") |
| | | @ApiModelProperty(value="商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("成员UserID") |
| | | @ApiModelProperty(value="成员UserID") |
| | | private String userid; |
| | | |
| | | @ApiModelProperty("手机") |
| | | @ApiModelProperty(value="手机") |
| | | private String mobile; |
| | | |
| | | @ApiModelProperty("token凭证") |
| | | @ApiModelProperty(value="token凭证") |
| | | private String token; |
| | | |
| | | @ApiModelProperty("过期时间") |
| | | @ApiModelProperty(value="过期时间") |
| | | private Long expiresIn; |
| | | } |
| | |
| | | @Data |
| | | public class QwH5LoginVo { |
| | | |
| | | @ApiModelProperty("成员UserID") |
| | | @ApiModelProperty(value="成员UserID") |
| | | private String userid; |
| | | |
| | | @ApiModelProperty("商户id") |
| | | @ApiModelProperty(value="商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("手机") |
| | | @ApiModelProperty(value="手机") |
| | | private String mobile; |
| | | |
| | | @ApiModelProperty(value = "用户信息") |
| | |
| | | @Data |
| | | public class QwUserDetailDto { |
| | | |
| | | @ApiModelProperty("成员UserID") |
| | | @ApiModelProperty(value="成员UserID") |
| | | private String userid; |
| | | |
| | | @ApiModelProperty("手机") |
| | | @ApiModelProperty(value="手机") |
| | | private String mobile; |
| | | } |
| | |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseBathDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtUserIdByDept; |
| | | import com.ruoyi.system.api.domain.poji.config.Activeness; |
| | | import com.ruoyi.system.api.domain.poji.config.DelayTask; |
| | | import com.ruoyi.system.api.domain.poji.config.SysClassification; |
| | | import com.ruoyi.system.api.domain.poji.config.SysTag; |
| | | import com.ruoyi.system.api.domain.vo.AppOtherConfigGetVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtSysSimpleUserVo; |
| | | import com.ruoyi.system.api.factory.RemoteConfigFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | |
| | | @PostMapping("/config/getActivenessByName") |
| | | public R<Activeness> getActivenessByName(@RequestBody String name); |
| | | |
| | | /** |
| | | * 延时任务控制 |
| | | */ |
| | | @PostMapping("/config/getDelayTask") |
| | | public R<DelayTask> getDelayTask(@RequestBody String key); |
| | | |
| | | @PostMapping("/config/addDelayTask") |
| | | public R addDelayTask(@RequestBody DelayTask delayTask); |
| | | |
| | | @PostMapping("/config/deleteDelayTask") |
| | | public R deleteDelayTask(@RequestBody String key); |
| | | /** |
| | | * 延时任务控制 |
| | | */ |
| | | |
| | | /** |
| | | * @description 获取其他设置 |
| | | * @author jqs |
| | | * @date 2023/7/12 15:27 |
| | | * @param |
| | | * @return R<AppOtherConfigGetVo> |
| | | */ |
| | | @PostMapping("/config/getAppOtherConfigGetVo") |
| | | public R<AppOtherConfigGetVo> getAppOtherConfigGetVo(); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/coupon/sendCouponGift") |
| | | public R sendCouponGift(@RequestBody List<BirthdayGiftSendDto> giftSendDtoList); |
| | | |
| | | /** |
| | | * @description 定时发送优惠券 |
| | | * @author jqs |
| | | * @date 2023/7/12 11:56 |
| | | * @param couponId |
| | | * @return R |
| | | */ |
| | | @PostMapping("/coupon/autoTimeSendCoupon") |
| | | public R autoTimeSendCoupon(@RequestBody String couponId); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/member/getVerifyPrize") |
| | | public R<MemberGiftRecord> getVerifyPrize(@RequestBody String verifyPrize); |
| | | |
| | | |
| | | /** |
| | | * @description 积分变动 |
| | | * @author jqs |
| | | * @date 2023/7/12 17:04 |
| | | * @param integralChangeDto |
| | | * @return R |
| | | */ |
| | | @PostMapping("/member/changeIntegral") |
| | | public R signShare(@RequestBody IntegralChangeDto integralChangeDto); |
| | | } |
| | |
| | | return R.ok(activityGoodsGetVo); |
| | | } |
| | | |
| | | /** |
| | | * @description 开始活动 |
| | | * @author jqs |
| | | * @date 2023/7/12 20:30 |
| | | * @param activityId |
| | | * @return R |
| | | */ |
| | | @PostMapping("/startActivity") |
| | | public R startActivity(@RequestBody String activityId){ |
| | | activityService.startActivity(activityId); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * @description 结束活动 |
| | | * @author jqs |
| | | * @date 2023/7/12 20:30 |
| | | * @param activityId |
| | | * @return R |
| | | */ |
| | | @PostMapping("/endActivity") |
| | | public R endActivity(@RequestBody String activityId){ |
| | | activityService.endActivity(activityId); |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | @Data |
| | | public class MgtActivityListDto { |
| | | |
| | | @ApiModelProperty("活动来源1平台2商户") |
| | | @ApiModelProperty(value="活动来源1平台2商户") |
| | | private Integer activityFrom; |
| | | |
| | | @ApiModelProperty("活动类型1秒杀") |
| | | @ApiModelProperty(value="活动类型1秒杀") |
| | | private Integer activityType; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "商品调理问题") |
| | | private BigDecimal goodsNurses; |
| | | |
| | | @ApiModelProperty("服务次数") |
| | | @ApiModelProperty(value="服务次数") |
| | | private Integer serviceNum; |
| | | |
| | | @ApiModelProperty(value = "商品售价") |
| | |
| | | @ApiModelProperty(value = "商品售价") |
| | | private BigDecimal salesPrice;; |
| | | |
| | | @ApiModelProperty("周期次数标记0否1是") |
| | | @ApiModelProperty(value="周期次数标记0否1是") |
| | | private Integer cycleNumFlag; |
| | | |
| | | @ApiModelProperty(value = "商品默认服务次数") |
New file |
| | |
| | | package com.ruoyi.goods.scheduler; |
| | | |
| | | |
| | | import com.ruoyi.goods.service.activity.ActivityService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | |
| | | @Component |
| | | @Slf4j |
| | | public class ActivityScheduler { |
| | | |
| | | |
| | | @Autowired |
| | | private SchedulerUtils schedulerUtils; |
| | | |
| | | @Autowired |
| | | private ActivityService activityService; |
| | | |
| | | /** |
| | | * 活动定时开始 |
| | | */ |
| | | @Scheduled(cron="0 */1 * * * ?") |
| | | private void timingSendCoupon(){ |
| | | if(schedulerUtils.getSchedulerRun()) { |
| | | log.info("活动定时任务开始执行"); |
| | | activityService.timingStartActivity(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.goods.scheduler; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.net.Inet4Address; |
| | | import java.net.InetAddress; |
| | | import java.net.NetworkInterface; |
| | | import java.util.Enumeration; |
| | | |
| | | |
| | | @Component |
| | | public class SchedulerUtils { |
| | | |
| | | @Autowired |
| | | private StringRedisTemplate redisTemplate; |
| | | |
| | | public boolean getSchedulerRun() { |
| | | String localIpAddress = getLocalIpAddress(); |
| | | return true; |
| | | } |
| | | |
| | | public static String getLocalIpAddress() { |
| | | String localIpAddress = ""; |
| | | try { |
| | | Enumeration<NetworkInterface> allNetInterfaces = NetworkInterface.getNetworkInterfaces(); |
| | | InetAddress ip = null; |
| | | while (allNetInterfaces.hasMoreElements()) { |
| | | NetworkInterface netInterface = (NetworkInterface) allNetInterfaces.nextElement(); |
| | | if (netInterface.isLoopback() || netInterface.isVirtual() || !netInterface.isUp()) { |
| | | continue; |
| | | } else { |
| | | Enumeration<InetAddress> addresses = netInterface.getInetAddresses(); |
| | | while (addresses.hasMoreElements()) { |
| | | ip = addresses.nextElement(); |
| | | if (ip != null && ip instanceof Inet4Address) { |
| | | return ip.getHostAddress(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return localIpAddress; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.goods.domain.vo.MgtActivityGoodsListVo; |
| | | import com.ruoyi.system.api.domain.dto.ActivityGoodsGetDto; |
| | | import com.ruoyi.system.api.domain.poji.activity.ActivityGoods; |
| | | import com.ruoyi.system.api.domain.vo.ActivityGoodsGetVo; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | List<MgtActivityGoodsListVo> listVoByActivityId(String activityId); |
| | | |
| | | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/7/12 20:35 |
| | | * @param activityId |
| | | * @return List<ActivityGoods> |
| | | */ |
| | | List<ActivityGoods> listByActivityId(String activityId); |
| | | } |
| | |
| | | * @return ActivityGoodsGetVo |
| | | */ |
| | | ActivityGoodsGetVo getUserActivityGoods(ActivityGoodsGetDto activityGoodsGetDto); |
| | | |
| | | /** |
| | | * @description 活动定时开始 |
| | | * @author jqs |
| | | * @date 2023/7/12 19:44 |
| | | * @param |
| | | * @return void |
| | | */ |
| | | void timingStartActivity(); |
| | | |
| | | /** |
| | | * @description 开始活动 |
| | | * @author jqs |
| | | * @date 2023/7/12 20:31 |
| | | * @param activityId |
| | | * @return void |
| | | */ |
| | | void startActivity(String activityId); |
| | | |
| | | /** |
| | | * @description 结束活动 |
| | | * @author jqs |
| | | * @date 2023/7/12 20:31 |
| | | * @param activityId |
| | | * @return void |
| | | */ |
| | | void endActivity(String activityId); |
| | | } |
| | |
| | | import com.ruoyi.goods.mapper.activity.ActivityGoodsMapper; |
| | | import com.ruoyi.goods.service.activity.ActivityGoodsService; |
| | | import com.ruoyi.goods.service.activity.ActivityRecordService; |
| | | import com.ruoyi.system.api.domain.dto.ActivityGoodsGetDto; |
| | | import com.ruoyi.system.api.domain.poji.activity.ActivityGoods; |
| | | import com.ruoyi.system.api.domain.vo.ActivityGoodsGetVo; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | return activityGoodsMapper.listVoByActivityId(activityId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/7/12 20:35 |
| | | * @param activityId |
| | | * @return List<ActivityGoods> |
| | | */ |
| | | @Override |
| | | public List<ActivityGoods> listByActivityId(String activityId){ |
| | | LambdaQueryWrapper<ActivityGoods> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(ActivityGoods::getDelFlag,0); |
| | | queryWrapper.eq(ActivityGoods::getActivityId,activityId); |
| | | return this.list(queryWrapper); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.goods.service.impl.activity; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.common.core.utils.DateUtils; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.core.utils.uuid.IdUtils; |
| | | import com.ruoyi.common.redis.service.RedisService; |
| | | import com.ruoyi.goods.domain.dto.MgtActivityEditDto; |
| | | import com.ruoyi.goods.domain.dto.MgtActivityGoodsEditDto; |
| | | import com.ruoyi.goods.domain.dto.MgtActivityPageDto; |
| | |
| | | import com.ruoyi.goods.service.activity.ActivityService; |
| | | import com.ruoyi.goods.service.activity.ActivityTotalService; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.constant.DelayTaskEnum; |
| | | import com.ruoyi.system.api.constant.SecurityConstant; |
| | | import com.ruoyi.system.api.domain.dto.ActivityGoodsGetDto; |
| | | import com.ruoyi.system.api.domain.dto.MerPageDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseBathDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtUserIdByKeywordDto; |
| | | import com.ruoyi.system.api.domain.poji.activity.ActivityGoods; |
| | | import com.ruoyi.system.api.domain.poji.config.DelayTask; |
| | | import com.ruoyi.system.api.domain.vo.ActivityGoodsGetVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtSimpleMemberVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtSimpleShopVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtUserIdByKeywordVo; |
| | | import com.ruoyi.system.api.service.RemoteConfigService; |
| | | import com.ruoyi.system.api.service.RemoteMemberService; |
| | | import com.ruoyi.system.api.service.RemoteShopService; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private RemoteMemberService remoteMemberService; |
| | | |
| | | @Resource |
| | | private RemoteConfigService remoteConfigService; |
| | | |
| | | @Resource |
| | | private RedisService redisService; |
| | | |
| | | |
| | | /** |
| | | * @param mgtActivityEditDto |
| | |
| | | activityGoodsGetVo.setAvailableBuyNum(availableBuyNum); |
| | | return activityGoodsGetVo; |
| | | } |
| | | |
| | | /** |
| | | * @description 活动定时开始 |
| | | * @author jqs |
| | | * @date 2023/7/12 19:44 |
| | | * @param |
| | | * @return void |
| | | */ |
| | | @Override |
| | | public void timingStartActivity(){ |
| | | // 创建LambdaQueryWrapper对象 |
| | | LambdaQueryWrapper<Activity> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(Activity::getDelFlag, 0); |
| | | queryWrapper.eq(Activity::getActivityStatus, 0); |
| | | // 计算时间差 |
| | | Date checkTime = DateUtils.addMinutes(new Date(), 61); |
| | | queryWrapper.lt(Activity::getActivityStartTime, checkTime); |
| | | // 查询符合条件的活动列表 |
| | | List<Activity> activityList = activityMapper.selectList(queryWrapper); |
| | | // 如果活动列表不为空 |
| | | if (activityList != null && !activityList.isEmpty()) { |
| | | // 遍历活动列表 |
| | | for (Activity activity : activityList) { |
| | | String activityId = activity.getActivityId(); |
| | | Date activityStartTime = activity.getActivityStartTime(); |
| | | Date activityEndTime = activity.getActivityEndTime(); |
| | | long currentTimeMillis = System.currentTimeMillis(); |
| | | long startTimeDifference = currentTimeMillis - activityStartTime.getTime(); |
| | | long endTimeDifference = currentTimeMillis - activityEndTime.getTime(); |
| | | // 查询延时任务 |
| | | DelayTask startDelayTask = remoteConfigService.getDelayTask(DelayTaskEnum.ACTIVITY_START_TASK.getCode() + "-" + activityId).getData(); |
| | | // 如果延时任务为空,创建延时任务控制活动定时开始和结束 |
| | | if (startDelayTask == null) { |
| | | redisService.setCacheObject(DelayTaskEnum.ACTIVITY_START_TASK.getCode() + "-" + activityId, activityStartTime, startTimeDifference, TimeUnit.MILLISECONDS); |
| | | startDelayTask = new DelayTask(); |
| | | startDelayTask.setDelFlag(0); |
| | | startDelayTask.setCreateTime(new Date()); |
| | | startDelayTask.setEndTime(activityStartTime); |
| | | startDelayTask.setRedisKey(DelayTaskEnum.ACTIVITY_START_TASK.getCode() + "-" + activityId); |
| | | remoteConfigService.addDelayTask(startDelayTask); |
| | | } |
| | | // 查询延时任务 |
| | | DelayTask endDelayTask = remoteConfigService.getDelayTask(DelayTaskEnum.ACTIVITY_START_TASK.getCode() + "-" + activityId).getData(); |
| | | // 如果延时任务为空,创建延时任务控制活动定时开始和结束 |
| | | if (endDelayTask == null) { |
| | | redisService.setCacheObject(DelayTaskEnum.ACTIVITY_END_TASK.getCode() + "-" + activityId, activityEndTime, endTimeDifference, TimeUnit.MILLISECONDS); |
| | | endDelayTask = new DelayTask(); |
| | | endDelayTask.setDelFlag(0); |
| | | endDelayTask.setCreateTime(new Date()); |
| | | endDelayTask.setEndTime(activityEndTime); |
| | | endDelayTask.setRedisKey(DelayTaskEnum.ACTIVITY_END_TASK.getCode() + "-" + activityId); |
| | | remoteConfigService.addDelayTask(endDelayTask); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description 开始活动 |
| | | * @author jqs |
| | | * @date 2023/7/12 20:31 |
| | | * @param activityId |
| | | * @return void |
| | | */ |
| | | @Override |
| | | public void startActivity(String activityId){ |
| | | Activity activity = this.getById(activityId); |
| | | if(activity!=null&&activity.getActivityStatus()==0){ |
| | | activity.setActivityStatus(1); |
| | | List<ActivityGoods> activityGoodsList = activityGoodsService.listByActivityId(activityId); |
| | | if(activityGoodsList!=null&&!activityGoodsList.isEmpty()){ |
| | | for(ActivityGoods activityGoods : activityGoodsList){ |
| | | redisService.setCacheObject(SecurityConstant.ACTIVITY_GOODS+"-"+activityId+"-"+activityGoods.getGoodsId(),activityGoods.getActivityNumber()); |
| | | } |
| | | } |
| | | this.saveOrUpdate(activity); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description 结束活动 |
| | | * @author jqs |
| | | * @date 2023/7/12 20:31 |
| | | * @param activityId |
| | | * @return void |
| | | */ |
| | | @Override |
| | | public void endActivity(String activityId){ |
| | | Activity activity = this.getById(activityId); |
| | | if(activity!=null&&activity.getActivityStatus()==1){ |
| | | activity.setActivityStatus(2); |
| | | List<ActivityGoods> activityGoodsList = activityGoodsService.listByActivityId(activityId); |
| | | if(activityGoodsList!=null&&!activityGoodsList.isEmpty()){ |
| | | for(ActivityGoods activityGoods : activityGoodsList){ |
| | | redisService.deleteObject(SecurityConstant.ACTIVITY_GOODS+"-"+activityId+"-"+activityGoods.getGoodsId()); |
| | | } |
| | | } |
| | | this.saveOrUpdate(activity); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | goods.setRecommendFlag(mgtGoodsEditDto.getRecommendFlag()); |
| | | goods.setGoodsNurses(mgtGoodsEditDto.getGoodsNurses()); |
| | | goods.setGoodsTags(mgtGoodsEditDto.getGoodsNurses()); |
| | | goods.setGoodsTags(mgtGoodsEditDto.getGoodsTags()); |
| | | this.saveOrUpdate(goods); |
| | | //商品图片视频处理 |
| | | final String goodsIdFinal = goodsId; |
| | |
| | | mgtGoodsEditInfoVo.setGoodsPicture(goodsFile.getFileUrl()); |
| | | }else if(goodsFile.getFileType()==2){ |
| | | mgtGoodsEditInfoVo.setGoodsVideo(goodsFile.getFileUrl()); |
| | | }else if(goodsFile.getFileType()==2){ |
| | | }else if(goodsFile.getFileType()==3){ |
| | | goodsBannersSj.add(goodsFile.getFileUrl()); |
| | | } |
| | | } |
| | |
| | | couponService.sendCouponGift(giftSendDtoList); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * @description 定时发送优惠券 |
| | | * @author jqs |
| | | * @date 2023/7/12 11:56 |
| | | * @param couponId |
| | | * @return R |
| | | */ |
| | | @PostMapping("/autoTimeSendCoupon") |
| | | public R autoTimeSendCoupon(@RequestBody String couponId){ |
| | | couponService.autoTimeSendCoupon(couponId); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.ruoyi.system.api.model.AppMiniLoginDto; |
| | | import com.ruoyi.system.api.model.AppMiniLoginVo; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | MemberGiftRecord memberGiftRecord = memberGiftRecordService.getById(verifyPrize); |
| | | return R.ok(memberGiftRecord); |
| | | } |
| | | |
| | | /** |
| | | * @description 积分变动 |
| | | * @author jqs |
| | | * @date 2023/7/12 17:04 |
| | | * @param integralChangeDto |
| | | * @return R |
| | | */ |
| | | @PostMapping("/changeIntegral") |
| | | public R signShare(@RequestBody IntegralChangeDto integralChangeDto) { |
| | | memberService.changeIntegral(integralChangeDto); |
| | | return R.ok(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.member.controller.miniapp; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.member.domain.vo.AppIntegralRecordPageVo; |
| | | import com.ruoyi.member.domain.vo.AppIntegralTaskListVo; |
| | | import com.ruoyi.member.service.member.IntegralRecordService; |
| | | import com.ruoyi.member.service.member.MemberService; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.domain.dto.AppPageDto; |
| | | import com.ruoyi.system.api.domain.dto.IntegralChangeDto; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName AppIntegralController |
| | | * @Description TODO |
| | | * @Author jqs |
| | | * @Date 2023/7/12 14:09 |
| | | * @Version 1.0 |
| | | */ |
| | | @Api(value = "小程序积分相关接口", tags = "小程序积分相关接口", description = "小程序积分相关接口") |
| | | @RestController |
| | | @RequestMapping("/app/integral") |
| | | public class AppIntegralController { |
| | | |
| | | @Resource |
| | | private MemberService memberService; |
| | | |
| | | @Resource |
| | | private IntegralRecordService integralRecordService; |
| | | |
| | | |
| | | @RequestMapping(value = "/pageAppMemberIntegralRecord", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取用户积分明细列表") |
| | | public R<Page<AppIntegralRecordPageVo>> pageAppMemberIntegralRecord(@RequestBody AppPageDto appPageDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | appPageDto.setUserId(userId); |
| | | Page<AppIntegralRecordPageVo> page = new Page<>(); |
| | | page.setSize(appPageDto.getPageSize()); |
| | | page.setCurrent(appPageDto.getPageNum()); |
| | | List<AppIntegralRecordPageVo> integralRecordPageVoList = integralRecordService.pageAppMemberIntegralRecord(page,userId); |
| | | return R.ok(page.setRecords(integralRecordPageVoList)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/listAppMemberIntegralTask", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取用户积分任务列表") |
| | | public R<List<AppIntegralTaskListVo>> listAppMemberIntegralTask() { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | List<AppIntegralTaskListVo> integralTaskListVoList = memberService.listAppMemberIntegralTask(userId); |
| | | return R.ok(integralTaskListVoList); |
| | | } |
| | | |
| | | @RequestMapping(value = "/signToday", method = RequestMethod.POST) |
| | | @ApiOperation(value = "今日签到") |
| | | public R signToday() { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | IntegralChangeDto integralChangeDto = new IntegralChangeDto(); |
| | | integralChangeDto.setIntegralType(5); |
| | | integralChangeDto.setUserId(userId); |
| | | Boolean complete = memberService.changeIntegral(integralChangeDto); |
| | | if(complete){ |
| | | throw new ServiceException(AppErrorConstant.DOUBLE_INTEGRAL_TASK); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/signShare", method = RequestMethod.POST) |
| | | @ApiOperation(value = "今日分享") |
| | | public R signShare() { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | IntegralChangeDto integralChangeDto = new IntegralChangeDto(); |
| | | integralChangeDto.setIntegralType(1); |
| | | integralChangeDto.setUserId(userId); |
| | | Boolean complete = memberService.changeIntegral(integralChangeDto); |
| | | if(complete){ |
| | | throw new ServiceException(AppErrorConstant.DOUBLE_INTEGRAL_TASK); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.member.service.member.MemberService; |
| | | import com.ruoyi.member.service.member.MemberSuggestService; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.domain.dto.AppEditUserDto; |
| | | import com.ruoyi.system.api.domain.dto.AppPageDto; |
| | | import com.ruoyi.system.api.domain.dto.AppSuggestPageDto; |
| | | import com.ruoyi.system.api.domain.dto.AppUserSuggestDto; |
| | | import com.ruoyi.system.api.domain.dto.*; |
| | | import com.ruoyi.system.api.domain.poji.member.Member; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | Long userId = SecurityUtils.getUserId(); |
| | | appUserSuggestDto.setUserId(userId); |
| | | memberSuggestService.userSuggest(appUserSuggestDto); |
| | | IntegralChangeDto integralChangeDto = new IntegralChangeDto(); |
| | | if(appUserSuggestDto.getSuggestType()==1){ |
| | | integralChangeDto.setIntegralType(2); |
| | | }else{ |
| | | integralChangeDto.setIntegralType(3); |
| | | } |
| | | integralChangeDto.setUserId(userId); |
| | | memberService.changeIntegral(integralChangeDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ApiModelProperty(value = "优惠券id 新增不传") |
| | | private String couponId; |
| | | |
| | | @ApiModelProperty("优惠券类型1.满减2.折扣3.代金4.商品") |
| | | @ApiModelProperty(value="优惠券类型1.满减2.折扣3.代金4.商品") |
| | | private Integer couponType; |
| | | |
| | | @ApiModelProperty("优惠券名称") |
| | | @ApiModelProperty(value="优惠券名称") |
| | | private String couponName; |
| | | |
| | | @ApiModelProperty(value = "发送类型1.手动领取2.指定发放") |
| | |
| | | @ApiModelProperty(value = "发送对象2.全部用户3.会员用户4非会员用户5自定义") |
| | | private Integer sendTarget; |
| | | |
| | | @ApiModelProperty("发送时间类型1立即2定时") |
| | | @ApiModelProperty(value="发送时间类型1立即2定时") |
| | | private Integer sendTimeType; |
| | | |
| | | @ApiModelProperty("发送时间") |
| | | @ApiModelProperty(value="发送时间") |
| | | private Date sendTime; |
| | | |
| | | @ApiModelProperty(value = "使用范围1.全场2.指定商品") |
| | |
| | | @ApiModelProperty(value = "优惠券id") |
| | | private String couponId; |
| | | |
| | | @ApiModelProperty("审核状态2审核通过3审核拒绝") |
| | | @ApiModelProperty(value="审核状态2审核通过3审核拒绝") |
| | | private Integer auditStatus; |
| | | |
| | | @ApiModelProperty("拒绝理由") |
| | | @ApiModelProperty(value="拒绝理由") |
| | | private String auditReason; |
| | | } |
| | |
| | | @Data |
| | | public class MgtCouponAuditPageDto extends MgtPageDto { |
| | | |
| | | @ApiModelProperty("1申请中2审核通过3审核拒绝") |
| | | @ApiModelProperty(value="1申请中2审核通过3审核拒绝") |
| | | private Integer auditStatus; |
| | | |
| | | @ApiModelProperty("优惠券名称") |
| | | @ApiModelProperty(value="优惠券名称") |
| | | private String couponName; |
| | | |
| | | @ApiModelProperty(value = "创建开始时间") |
| | |
| | | @ApiModelProperty(value = "优惠券id 新增不传") |
| | | private String couponId; |
| | | |
| | | @ApiModelProperty("优惠券类型1.满减2.折扣3.代金4.商品") |
| | | @ApiModelProperty(value="优惠券类型1.满减2.折扣3.代金4.商品") |
| | | private Integer couponType; |
| | | |
| | | @ApiModelProperty("优惠券名称") |
| | | @ApiModelProperty(value="优惠券名称") |
| | | private String couponName; |
| | | |
| | | @ApiModelProperty(value = "发送类型1.手动领取2.全部用户3.会员用户4非会员用户5自定义") |
| | | private Integer sendType; |
| | | |
| | | @ApiModelProperty("发送时间类型1立即2定时") |
| | | @ApiModelProperty(value="发送时间类型1立即2定时") |
| | | private Integer sendTimeType; |
| | | |
| | | @ApiModelProperty("发送时间") |
| | | @ApiModelProperty(value="发送时间") |
| | | private Date sendTime; |
| | | |
| | | @ApiModelProperty(value = "使用范围1.全场2.指定商品") |
| | |
| | | @Data |
| | | public class MgtCouponPageDto extends MgtPageDto { |
| | | |
| | | @ApiModelProperty("商户id") |
| | | @ApiModelProperty(value="商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("优惠券名称") |
| | | @ApiModelProperty(value="优惠券名称") |
| | | private String couponName; |
| | | |
| | | @ApiModelProperty(value = "创建开始时间") |
| | |
| | | */ |
| | | @TableField("limit_number") |
| | | private Integer limitNumber; |
| | | |
| | | /** |
| | | * 是否发放过 |
| | | */ |
| | | @TableField("send_flag") |
| | | private Integer sendFlag; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | |
| | | package com.ruoyi.member.domain.pojo.member; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import java.util.Date; |
| | | 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; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @TableField(value = "user_id") |
| | | private Long userId; |
| | | /** |
| | | * 变动类型 |
| | | * 变动类型1分享获取2平台建议获取3门店建议获取4每日签到5消费得积分 |
| | | */ |
| | | @TableField("change_type") |
| | | private Integer changeType; |
| | |
| | | @TableField("total_goods_order") |
| | | private Integer totalGoodsOrder; |
| | | |
| | | /** |
| | | * 分享标记 |
| | | */ |
| | | @TableField("share_flag") |
| | | private Integer shareFlag; |
| | | /** |
| | | * 平台建议标记 |
| | | */ |
| | | @TableField("pl_suggest_flag") |
| | | private Integer plSuggestFlag; |
| | | /** |
| | | * 门店建议标记 |
| | | */ |
| | | @TableField("shop_suggest_flag") |
| | | private Integer shopSuggestFlag; |
| | | /** |
| | | * 签到标记 |
| | | */ |
| | | @TableField("sign_flag") |
| | | private Integer signFlag; |
| | | /** |
| | | * 消费标记 |
| | | */ |
| | | @TableField("buy_flag") |
| | | private Integer buyFlag; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
New file |
| | |
| | | package com.ruoyi.member.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName AppIntegralPageVo |
| | | * @Description TODO |
| | | * @Author jqs |
| | | * @Date 2023/7/12 14:29 |
| | | * @Version 1.0 |
| | | */ |
| | | @Data |
| | | public class AppIntegralRecordPageVo { |
| | | |
| | | @ApiModelProperty(value="变动理由") |
| | | private String changeReason; |
| | | |
| | | @ApiModelProperty(value="变动时间") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value="变动积分") |
| | | private Integer changeIntegral; |
| | | } |
New file |
| | |
| | | package com.ruoyi.member.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @ClassName AppIntegralTaskListVo |
| | | * @Description TODO |
| | | * @Author jqs |
| | | * @Date 2023/7/12 14:55 |
| | | * @Version 1.0 |
| | | */ |
| | | @Data |
| | | public class AppIntegralTaskListVo { |
| | | |
| | | @ApiModelProperty(value="任务内容") |
| | | private String taskContent; |
| | | |
| | | @ApiModelProperty(value="任务积分描述") |
| | | private String taskDesc; |
| | | |
| | | @ApiModelProperty(value="推荐标记0否1是") |
| | | private Integer recommendFlag; |
| | | |
| | | @ApiModelProperty(value="完成标记0否1是") |
| | | private Integer completeFlag; |
| | | |
| | | } |
| | |
| | | package com.ruoyi.member.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | private BigDecimal discountPercent; |
| | | |
| | | |
| | | @ApiModelProperty(value = "有效开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date validStartTime; |
| | | |
| | | @ApiModelProperty(value = "有效结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date deadlineTime; |
| | | |
| | | @ApiModelProperty(value = "使用时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date useTime; |
| | | |
| | | @ApiModelProperty(value = "核销店铺") |
| | | private String verifyShopName; |
| | | } |
| | |
| | | package com.ruoyi.member.domain.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.ruoyi.common.core.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | @ApiModelProperty(value = "关联id") |
| | | private Long relationShopId; |
| | | |
| | | @ApiModelProperty("会员编号") |
| | | @ApiModelProperty(value="会员编号") |
| | | private String memberNo; |
| | | |
| | | @ApiModelProperty(value = "用户姓名") |
| | |
| | | @ApiModelProperty(value = "手机号码") |
| | | private String phonenumber; |
| | | |
| | | @ApiModelProperty("关联商户") |
| | | @ApiModelProperty(value="关联商户") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty("关联商户地址") |
| | | @ApiModelProperty(value="关联商户地址") |
| | | private String shopAddress; |
| | | |
| | | @ApiModelProperty("生日") |
| | | @ApiModelProperty(value="生日") |
| | | private String birthday; |
| | | |
| | | @ApiModelProperty("性别0=男,1=女,2=未知") |
| | | @ApiModelProperty(value="性别0=男,1=女,2=未知") |
| | | private Integer gender; |
| | | |
| | | @ApiModelProperty("用户头像") |
| | | @ApiModelProperty(value="用户头像") |
| | | private String avatar; |
| | | |
| | | @ApiModelProperty("待支付统计") |
| | | @ApiModelProperty(value="待支付统计") |
| | | private Integer noPayCount; |
| | | |
| | | @ApiModelProperty("待核销统计") |
| | | @ApiModelProperty(value="待核销统计") |
| | | private Integer noUseCount; |
| | | |
| | | @ApiModelProperty(value="积分") |
| | | private Integer integral; |
| | | } |
| | |
| | | @ApiModelProperty(value = "优惠券id 新增不传") |
| | | private String couponId; |
| | | |
| | | @ApiModelProperty("优惠券类型1.满减2.折扣3.代金4.商品") |
| | | @ApiModelProperty(value="优惠券类型1.满减2.折扣3.代金4.商品") |
| | | private Integer couponType; |
| | | |
| | | @ApiModelProperty("优惠券名称") |
| | | @ApiModelProperty(value="优惠券名称") |
| | | private String couponName; |
| | | |
| | | @ApiModelProperty(value = "发送类型1.手动领取2.指定发放") |
| | |
| | | @ApiModelProperty(value = "发送对象2.全部用户3.会员用户4非会员用户5自定义") |
| | | private Integer sendTarget; |
| | | |
| | | @ApiModelProperty("发送时间类型1立即2定时") |
| | | @ApiModelProperty(value="发送时间类型1立即2定时") |
| | | private Integer sendTimeType; |
| | | |
| | | @ApiModelProperty("发送时间") |
| | | @ApiModelProperty(value="发送时间") |
| | | private Date sendTime; |
| | | |
| | | @ApiModelProperty(value = "使用范围1.全场2.指定商品") |
| | |
| | | @ApiModelProperty(value = "优惠券id") |
| | | private String couponId; |
| | | |
| | | @ApiModelProperty("优惠券名称") |
| | | @ApiModelProperty(value="优惠券名称") |
| | | private String couponName; |
| | | |
| | | @ApiModelProperty("优惠券类型1.满减2.折扣3.代金4.商品") |
| | | @ApiModelProperty(value="优惠券类型1.满减2.折扣3.代金4.商品") |
| | | private Integer couponType; |
| | | |
| | | @ApiModelProperty(value = "使用限制") |
| | |
| | | @ApiModelProperty(value = "折扣百分比",hidden = true) |
| | | private BigDecimal discountPercent; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @ApiModelProperty(value="创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("拒绝理由") |
| | | @ApiModelProperty(value="拒绝理由") |
| | | private String auditReason; |
| | | } |
| | |
| | | @ApiModelProperty(value = "手机号码") |
| | | private String phonenumber; |
| | | |
| | | @ApiModelProperty("用户头像") |
| | | @ApiModelProperty(value="用户头像") |
| | | private String avatar; |
| | | |
| | | @ApiModelProperty("用户生日") |
| | | @ApiModelProperty(value="用户生日") |
| | | private String birthday; |
| | | |
| | | @ApiModelProperty(value = "用户类型") |
| | |
| | | @ApiModelProperty(value = "优惠券id") |
| | | private String couponId; |
| | | |
| | | @ApiModelProperty("店铺名称") |
| | | @ApiModelProperty(value="店铺名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty("优惠券名称") |
| | | @ApiModelProperty(value="优惠券名称") |
| | | private String couponName; |
| | | |
| | | |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date sendTime; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @ApiModelProperty(value="创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("审核状态1申请中2审核通过3审核拒绝") |
| | | @ApiModelProperty(value="审核状态1申请中2审核通过3审核拒绝") |
| | | private String auditStatus; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "优惠券id 新增不传") |
| | | private String couponId; |
| | | |
| | | @ApiModelProperty("优惠券类型1.满减2.折扣3.代金4.商品") |
| | | @ApiModelProperty(value="优惠券类型1.满减2.折扣3.代金4.商品") |
| | | private Integer couponType; |
| | | |
| | | @ApiModelProperty("优惠券名称") |
| | | @ApiModelProperty(value="优惠券名称") |
| | | private String couponName; |
| | | |
| | | @ApiModelProperty(value = "发送类型1.手动领取2.全部用户3.会员用户4非会员用户5自定义") |
| | | private Integer sendType; |
| | | |
| | | @ApiModelProperty("发送时间类型1立即2定时") |
| | | @ApiModelProperty(value="发送时间类型1立即2定时") |
| | | private Integer sendTimeType; |
| | | |
| | | @ApiModelProperty("发送时间") |
| | | @ApiModelProperty(value="发送时间") |
| | | private Date sendTime; |
| | | |
| | | @ApiModelProperty(value = "使用范围1.全场2.指定商品") |
| | |
| | | @ApiModelProperty(value = "手机号码") |
| | | private String mobile; |
| | | |
| | | @ApiModelProperty("用户头像") |
| | | @ApiModelProperty(value="用户头像") |
| | | private String avatar; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "优惠券id") |
| | | private String couponId; |
| | | |
| | | @ApiModelProperty("优惠券名称") |
| | | @ApiModelProperty(value="优惠券名称") |
| | | private String couponName; |
| | | |
| | | @ApiModelProperty("优惠券类型1.满减2.折扣3.代金4.商品") |
| | | @ApiModelProperty(value="优惠券类型1.满减2.折扣3.代金4.商品") |
| | | private String couponType; |
| | | |
| | | @ApiModelProperty(value = "使用限制") |
| | |
| | | @ApiModelProperty(value = "折扣百分比",hidden = true) |
| | | private BigDecimal discountPercent; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @ApiModelProperty(value="创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | |
| | | @ApiModelProperty(value = "优惠券id") |
| | | private String couponId; |
| | | |
| | | @ApiModelProperty("优惠券名称") |
| | | @ApiModelProperty(value="优惠券名称") |
| | | private String couponName; |
| | | } |
| | |
| | | import com.ruoyi.member.domain.dto.MgtMemberIntegralPageDto; |
| | | import com.ruoyi.member.domain.pojo.member.IntegralRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.member.domain.vo.AppIntegralRecordPageVo; |
| | | import com.ruoyi.member.domain.vo.MgtMemberIntegralPageVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | List<MgtMemberIntegralPageVo> pageMgtMemberIntegral(Page page, @Param("param") MgtMemberIntegralPageDto mgtMemberIntegralPageDto); |
| | | |
| | | |
| | | /** |
| | | * @description 小程序获取用户积分明细 |
| | | * @author jqs |
| | | * @date 2023/7/12 14:37 |
| | | * @param page |
| | | * @param userId |
| | | * @return List<AppIntegralRecordPageVo> |
| | | */ |
| | | List<AppIntegralRecordPageVo> pageAppMemberIntegralRecord(Page page, @Param("userId")Long userId); |
| | | } |
| | |
| | | * @return List<AppMemberCouponPageVo> |
| | | */ |
| | | List<AppMemberCouponPageVo> pageAppUserGetCoupon(Page page,@Param("param") AppMemberCouponPageDto appMemberCouponPageDto); |
| | | |
| | | /** |
| | | * @description 定时检查优惠券过期 |
| | | * @author jqs |
| | | * @date 2023/7/12 19:19 |
| | | * @param |
| | | * @return void |
| | | */ |
| | | void timingCheckMemberCoupon(); |
| | | } |
New file |
| | |
| | | package com.ruoyi.member.scheduler; |
| | | |
| | | |
| | | import com.ruoyi.member.service.coupon.CouponService; |
| | | import com.ruoyi.member.service.member.MemberCouponService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | |
| | | @Component |
| | | @Slf4j |
| | | public class MemberScheduler { |
| | | |
| | | |
| | | @Autowired |
| | | private SchedulerUtils schedulerUtils; |
| | | |
| | | @Resource |
| | | private CouponService couponService; |
| | | |
| | | @Resource |
| | | private MemberCouponService memberCouponService; |
| | | |
| | | /** |
| | | * 优惠券定时发送 |
| | | */ |
| | | @Scheduled(cron="0 */1 * * * ?") |
| | | private void timingSendCoupon(){ |
| | | if(schedulerUtils.getSchedulerRun()) { |
| | | log.info("优惠券定时发放任务开始执行"); |
| | | couponService.timingSendCoupon(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 定时检查优惠券过期 |
| | | */ |
| | | @Scheduled(cron="5 0 * * * ?") |
| | | private void timingCheckMemberCoupon(){ |
| | | if(schedulerUtils.getSchedulerRun()) { |
| | | log.info("定时检查优惠券过期任务开始执行"); |
| | | memberCouponService.timingCheckMemberCoupon(); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | * @return void |
| | | */ |
| | | void appGetCoupon(String couponId,Long userId,Long shopId); |
| | | |
| | | /** |
| | | * @description 定时发送优惠券 |
| | | * @author jqs |
| | | * @date 2023/7/12 12:01 |
| | | * @param couponId |
| | | * @return void |
| | | */ |
| | | void autoTimeSendCoupon(String couponId); |
| | | } |
| | |
| | | // 创建新的生日卡 |
| | | BirthdayCard birthdayCard = new BirthdayCard(); |
| | | birthdayCard.setDelFlag(0); |
| | | if(mgtBirthdayEditDto.getShopId()!=null){ |
| | | birthdayCard.setShopId(mgtBirthdayEditDto.getShopId()); |
| | | }else{ |
| | | birthdayCard.setShopId(0L); |
| | | } |
| | | birthdayCard.setCardStatus(mgtBirthdayEditDto.getCardStatus()); |
| | | // 根据卡状态设置开启或关闭时间 |
| | | if(mgtBirthdayEditDto.getCardStatus()==1){ |
| | |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.core.utils.uuid.IdUtils; |
| | | import com.ruoyi.common.redis.service.RedisService; |
| | | import com.ruoyi.member.domain.dto.*; |
| | | import com.ruoyi.member.domain.pojo.coupon.*; |
| | | import com.ruoyi.member.domain.vo.*; |
| | |
| | | import com.ruoyi.member.service.member.MemberCouponService; |
| | | import com.ruoyi.member.service.member.MemberService; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.constant.DelayTaskEnum; |
| | | import com.ruoyi.system.api.domain.dto.*; |
| | | import com.ruoyi.system.api.domain.poji.config.DelayTask; |
| | | import com.ruoyi.system.api.domain.poji.goods.Goods; |
| | | import com.ruoyi.system.api.domain.poji.member.MemberCoupon; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import com.ruoyi.system.api.domain.vo.MerGoodsPriceListVo; |
| | | import com.ruoyi.system.api.service.RemoteActivityService; |
| | | import com.ruoyi.system.api.service.RemoteConfigService; |
| | | import com.ruoyi.system.api.service.RemoteGoodsService; |
| | | import com.ruoyi.system.api.service.RemoteShopService; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | |
| | | @Resource |
| | | private MemberCouponRecordService memberCouponRecordService; |
| | | |
| | | @Resource |
| | | private RemoteShopService remoteShopService; |
| | | |
| | | @Resource |
| | | private RedisService redisService; |
| | | |
| | | @Resource |
| | | private RemoteConfigService remoteConfigService; |
| | | |
| | | /** |
| | | * @description 平台获取优惠券列表 |
| | |
| | | coupon.setCreateUserId(mgtCouponEditDto.getUserId()); |
| | | coupon.setCouponFrom(1); |
| | | coupon.setAuditStatus(2); |
| | | coupon.setLimitNumber(0); |
| | | coupon.setSendFlag(0); |
| | | //创建优惠券统计 |
| | | couponTotal = new CouponTotal(); |
| | | couponTotal.setCouponId(couponId); |
| | |
| | | .collect(Collectors.toList()); |
| | | couponRelUserService.saveBatch(couponRelUserList); |
| | | } |
| | | this.saveOrUpdate(coupon); |
| | | //处理优惠券发放 |
| | | if(coupon.getSendTimeType()==1){ |
| | | sendCoupon(coupon,relUserIdList); |
| | | coupon.setSendFlag(1); |
| | | this.saveOrUpdate(coupon); |
| | | }else{ |
| | | this.saveOrUpdate(coupon); |
| | | } |
| | | } |
| | | |
| | |
| | | */ |
| | | @Async |
| | | protected void sendCoupon(Coupon coupon, List<Long> relUserIdList){ |
| | | //1.手动领取2.全部用户3.会员用户4非会员用户5自定义 |
| | | Date nowTime = new Date(); |
| | | Integer sendType = coupon.getSendType(); |
| | | List<Long> userIdList = new ArrayList<>(); |
| | | Long shopId = null; |
| | | if(coupon.getCouponFrom()==2 && sendType==3){ |
| | | shopId = coupon.getShopId(); |
| | | } |
| | | if(sendType >= 2 && sendType <= 4){ |
| | | userIdList = memberService.listIdBySendType(sendType,shopId); |
| | | }else if(sendType == 5){ |
| | | //关联类型1.用户管理筛选2.活动管理筛选 |
| | | if(coupon.getRelationType()==2){ |
| | | Integer relationActivityType = coupon.getRelationActivityType(); |
| | | //关联活动类型1秒杀活动 |
| | | switch(relationActivityType){ |
| | | case 1: |
| | | userIdList = remoteActivityService.listUserIdByActivityId(coupon.getRelationActivityId()).getData(); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | }else if(coupon.getRelationType()==1){ |
| | | userIdList = relUserIdList; |
| | | } |
| | | } |
| | | if(relUserIdList!=null&&!relUserIdList.isEmpty()){ |
| | | List<MemberCoupon> memberCouponList = new ArrayList<>(); |
| | | MemberCoupon memberCoupon; |
| | | Integer sendTotal = 0; |
| | | Integer sendPerson = 0; |
| | | String memberCouponId; |
| | | Integer sendUserTotal; |
| | | for(Long userId : userIdList){ |
| | | memberCouponId = IdUtils.simpleUUID(); |
| | | memberCoupon = new MemberCoupon(); |
| | | memberCoupon.setId(memberCouponId); |
| | | memberCoupon.setDelFlag(0); |
| | | memberCoupon.setCouponId(coupon.getCouponId()); |
| | | memberCoupon.setUserId(userId); |
| | | memberCoupon.setShopId(coupon.getShopId()); |
| | | memberCoupon.setCouponType(coupon.getCouponType()); |
| | | memberCoupon.setCouponStatus(coupon.getCouponStatus()); |
| | | memberCoupon.setCouponName(coupon.getCouponName()); |
| | | memberCoupon.setSendType(coupon.getSendType()); |
| | | memberCoupon.setSendTimeType(coupon.getSendTimeType()); |
| | | memberCoupon.setSendTime(coupon.getSendTime()); |
| | | memberCoupon.setMoneyThreshold(coupon.getMoneyThreshold()); |
| | | memberCoupon.setDiscountMoney(coupon.getDiscountMoney()); |
| | | memberCoupon.setDiscountPercent(coupon.getDiscountPercent()); |
| | | memberCoupon.setUseScope(coupon.getUseScope()); |
| | | memberCoupon.setValidTimeType(coupon.getValidTimeType()); |
| | | memberCoupon.setValidStartTime(coupon.getValidStartTime()); |
| | | memberCoupon.setValidEndTime(coupon.getValidEndTime()); |
| | | memberCoupon.setValidDay(coupon.getValidDay()); |
| | | memberCoupon.setReceiveTime(nowTime); |
| | | memberCoupon.setRelGoodsIds(coupon.getRelGoodsIds()); |
| | | //有效期处理1.时间段2.领取之日起 |
| | | if(coupon.getValidTimeType()==1){ |
| | | memberCoupon.setDeadlineTime(coupon.getValidEndTime()); |
| | | }else if(coupon.getValidTimeType()==2){ |
| | | memberCoupon.setDeadlineTime(DateUtils.addDays(nowTime,coupon.getValidDay())); |
| | | } |
| | | memberCouponList.add(memberCoupon); |
| | | sendTotal = sendTotal + 1; |
| | | if(coupon.getSendType()==1){ |
| | | sendUserTotal = memberCouponService.totalMemberCouponByUserAndCoupon(userId,coupon.getCouponId()); |
| | | if(sendUserTotal!=null&&sendUserTotal>0){ |
| | | }else{ |
| | | sendPerson = sendPerson + 1; |
| | | } |
| | | } |
| | | memberCouponRecordService.updateMemberCouponRecord(coupon,userId,1); |
| | | } |
| | | memberCouponService.saveBatch(memberCouponList); |
| | | //处理优惠券统计 |
| | | if(sendTotal>0){ |
| | | couponMapper.updateCouponTotal(coupon.getCouponId(),sendTotal,sendPerson); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | private void sendCouponNow(Coupon coupon, List<Long> relUserIdList){ |
| | | //1.手动领取2.全部用户3.会员用户4非会员用户5自定义 |
| | | Date nowTime = new Date(); |
| | | Integer sendType = coupon.getSendType(); |
| | |
| | | */ |
| | | @Override |
| | | public void timingSendCoupon(){ |
| | | //获取1小时内需要发送的优惠券 |
| | | LambdaQueryWrapper<Coupon> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(Coupon::getDelFlag,0); |
| | | queryWrapper.eq(Coupon::getCouponStatus,1); |
| | | queryWrapper.eq(Coupon::getSendTimeType,2); |
| | | queryWrapper.eq(Coupon::getAuditStatus,2); |
| | | queryWrapper.eq(Coupon::getSendTime,DateUtils.getNowDate()); |
| | | queryWrapper.eq(Coupon::getSendFlag,0); |
| | | Date checkTime = DateUtils.addMinutes(new Date(),61); |
| | | queryWrapper.le(Coupon::getSendTime, checkTime); |
| | | List<Coupon> couponList = couponMapper.selectList(queryWrapper); |
| | | if(couponList!=null&&!couponList.isEmpty()){ |
| | | for(Coupon coupon : couponList) { |
| | | String couponId = coupon.getCouponId(); |
| | | Date sendTime = coupon.getSendTime(); |
| | | long currentTimeMillis = System.currentTimeMillis(); |
| | | long timeDifference = currentTimeMillis - sendTime.getTime(); |
| | | DelayTask delayTask = remoteConfigService.getDelayTask(DelayTaskEnum.COUPON_SEND_DELAY_TASK.getCode()+"-"+couponId).getData(); |
| | | if(delayTask==null){ |
| | | //创建延时任务控制优惠券定时发放 |
| | | redisService.setCacheObject(DelayTaskEnum.COUPON_SEND_DELAY_TASK.getCode()+"-"+couponId,sendTime,timeDifference, TimeUnit.MILLISECONDS); |
| | | delayTask = new DelayTask(); |
| | | delayTask.setDelFlag(0); |
| | | delayTask.setCreateTime(new Date()); |
| | | delayTask.setEndTime(sendTime); |
| | | delayTask.setRedisKey(DelayTaskEnum.COUPON_SEND_DELAY_TASK.getCode()+"-"+couponId); |
| | | remoteConfigService.addDelayTask(delayTask); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description 定时发送优惠券 |
| | | * @author jqs |
| | | * @date 2023/7/12 12:01 |
| | | * @param couponId |
| | | * @return void |
| | | */ |
| | | @Override |
| | | public void autoTimeSendCoupon(String couponId){ |
| | | List<CouponRelUser> couponRelUserList; |
| | | List<Long> userIdList = new ArrayList<>(); |
| | | for(Coupon coupon : couponList){ |
| | | Coupon coupon = this.getById(couponId); |
| | | if(coupon.getSendType()==5&&coupon.getRelationType()==1){ |
| | | couponRelUserList = couponRelUserService.list(new LambdaQueryWrapper<CouponRelUser>().eq(CouponRelUser::getDelFlag,0).eq(CouponRelUser::getCouponId,coupon.getCouponId())); |
| | | if(couponRelUserList!=null&&!couponRelUserList.isEmpty()){ |
| | |
| | | } |
| | | } |
| | | //发送优惠券 |
| | | sendCoupon(coupon, userIdList); |
| | | } |
| | | } |
| | | sendCouponNow(coupon, userIdList); |
| | | } |
| | | |
| | | /** |
| | |
| | | coupon.setAuditReason(mgtCouponAuditDto.getAuditReason()); |
| | | coupon.setUpdateTime(new Date()); |
| | | coupon.setUpdateUserId(mgtCouponAuditDto.getUserId()); |
| | | this.saveOrUpdate(coupon); |
| | | //审核通过后判断是否立即发放 |
| | | if(coupon.getCouponStatus()==2&&coupon.getSendTimeType()==1){ |
| | | List<CouponRelUser> couponRelUserList = couponRelUserService.list(new LambdaQueryWrapper<CouponRelUser>().eq(CouponRelUser::getDelFlag,0).eq(CouponRelUser::getCouponId,coupon.getCouponId())); |
| | |
| | | } |
| | | //发放优惠券 |
| | | sendCoupon(coupon, userIdList); |
| | | coupon.setSendFlag(1); |
| | | } |
| | | this.saveOrUpdate(coupon); |
| | | } |
| | | |
| | | /** |
| | |
| | | coupon.setCreateTime(new Date()); |
| | | coupon.setCreateUserId(merCouponEditDto.getUserId()); |
| | | coupon.setCouponFrom(2); |
| | | coupon.setSendFlag(0); |
| | | coupon.setLimitNumber(merCouponEditDto.getLimitNumber()); |
| | | //创建优惠券统计 |
| | | couponTotal = new CouponTotal(); |
| | | couponTotal.setCouponId(couponId); |
| | |
| | | if(!getAbleCouponPageVoList.isEmpty()){ |
| | | String relGoodsIds; |
| | | List<Goods> goodsList; |
| | | List<String> goodsLimitList; |
| | | List<String> goodsLimitList = null; |
| | | Shop shop = null; |
| | | for(AppGetAbleCouponPageVo appGetAbleCouponPageVo : getAbleCouponPageVoList){ |
| | | relGoodsIds = appGetAbleCouponPageVo.getRelGoodsIds(); |
| | | if(StringUtils.isNotBlank(relGoodsIds)){ |
| | | goodsList = remoteGoodsService.listGoodsByGoodsId(relGoodsIds).getData(); |
| | | if(!goodsList.isEmpty()){ |
| | | goodsLimitList = goodsList.stream().map(goods -> { |
| | |
| | | goodsName = "限制" + goodsName + "适用"; |
| | | return goodsName; |
| | | }).collect(Collectors.toList()); |
| | | } |
| | | }else{ |
| | | goodsLimitList = new ArrayList<>(); |
| | | if(appGetAbleCouponPageVo.getShopId()!=null){ |
| | | if(shop!=null&&shop.getShopId().equals(appGetAbleCouponPageVo.getShopId())){ |
| | | }else{ |
| | | shop = remoteShopService.getShop(appGetAbleCouponPageVo.getShopId()).getData(); |
| | | } |
| | | goodsLimitList.add(shop.getShopName()+"通用"); |
| | | }else{ |
| | | goodsLimitList.add("全场通用"); |
| | | } |
| | | } |
| | | appGetAbleCouponPageVo.setGoodsLimitList(goodsLimitList); |
| | | } |
| | | } |
| | | |
| | | } |
| | | return getAbleCouponPageVoList; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.member.domain.dto.MgtMemberIntegralPageDto; |
| | | import com.ruoyi.member.domain.pojo.member.IntegralRecord; |
| | | import com.ruoyi.member.domain.vo.AppIntegralRecordPageVo; |
| | | import com.ruoyi.member.domain.vo.MgtMemberIntegralPageVo; |
| | | import com.ruoyi.member.mapper.member.IntegralRecordMapper; |
| | | import com.ruoyi.member.service.member.IntegralRecordService; |
| | |
| | | public List<MgtMemberIntegralPageVo> pageMgtMemberIntegral(Page page, MgtMemberIntegralPageDto mgtMemberIntegralPageDto){ |
| | | return integralRecordMapper.pageMgtMemberIntegral(page, mgtMemberIntegralPageDto); |
| | | } |
| | | |
| | | /** |
| | | * @description 小程序获取用户积分明细 |
| | | * @author jqs |
| | | * @date 2023/7/12 14:37 |
| | | * @param page |
| | | * @param userId |
| | | * @return List<AppIntegralRecordPageVo> |
| | | */ |
| | | @Override |
| | | public List<AppIntegralRecordPageVo> pageAppMemberIntegralRecord(Page page, Long userId){ |
| | | return integralRecordMapper.pageAppMemberIntegralRecord(page,userId); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.member.domain.dto.AppMemberCouponPageDto; |
| | | import com.ruoyi.member.domain.vo.AppMemberCouponPageVo; |
| | | import com.ruoyi.member.mapper.member.MemberCouponMapper; |
| | | import com.ruoyi.member.service.member.MemberCouponService; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseBathDto; |
| | | import com.ruoyi.system.api.domain.poji.goods.Goods; |
| | | import com.ruoyi.system.api.domain.poji.member.MemberCoupon; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import com.ruoyi.system.api.domain.vo.AppMemberCouponVo; |
| | | import com.ruoyi.system.api.domain.vo.MerVerifyCouponGetVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtSimpleShopVo; |
| | | import com.ruoyi.system.api.service.RemoteGoodsService; |
| | | import com.ruoyi.system.api.service.RemoteShopService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | |
| | | @Resource |
| | | private RemoteShopService remoteShopService; |
| | | |
| | | |
| | | /** |
| | | * @description: TODO |
| | |
| | | if(!memberCouponPageVoList.isEmpty()){ |
| | | String relGoodsIds; |
| | | List<Goods> goodsList; |
| | | List<String> goodsLimitList; |
| | | Shop shop = null; |
| | | List<String> goodsLimitList = null; |
| | | HashSet<Long> shopIdSet = new HashSet<>(); |
| | | for(AppMemberCouponPageVo appGetAbleCouponPageVo : memberCouponPageVoList){ |
| | | shopIdSet.add(appGetAbleCouponPageVo.getShopId()); |
| | | } |
| | | String shopJoinedString = String.join(",", shopIdSet.stream().map(Object::toString).collect(Collectors.toList())); |
| | | MgtBaseBathDto mgtBaseBathDto = new MgtBaseBathDto(); |
| | | mgtBaseBathDto.setIds(shopJoinedString); |
| | | List<MgtSimpleShopVo> simpleShopVoList = remoteShopService.listShopSimpleVoByIds(mgtBaseBathDto).getData(); |
| | | Map<Long, MgtSimpleShopVo> shopMap = simpleShopVoList.stream() |
| | | .collect(Collectors.toMap(MgtSimpleShopVo::getShopId, Function.identity())); |
| | | for(AppMemberCouponPageVo appGetAbleCouponPageVo : memberCouponPageVoList){ |
| | | relGoodsIds = appGetAbleCouponPageVo.getRelGoodsIds(); |
| | | if(StringUtils.isNotBlank(relGoodsIds)){ |
| | | goodsList = remoteGoodsService.listGoodsByGoodsId(relGoodsIds).getData(); |
| | | if(!goodsList.isEmpty()){ |
| | | goodsLimitList = goodsList.stream().map(goods -> { |
| | |
| | | goodsName = "限制" + goodsName + "适用"; |
| | | return goodsName; |
| | | }).collect(Collectors.toList()); |
| | | } |
| | | }else{ |
| | | goodsLimitList = new ArrayList<>(); |
| | | if(appGetAbleCouponPageVo.getShopId()!=null){ |
| | | if(shop!=null&&shop.getShopId().equals(appGetAbleCouponPageVo.getShopId())){ |
| | | }else{ |
| | | shop = remoteShopService.getShop(appGetAbleCouponPageVo.getShopId()).getData(); |
| | | } |
| | | goodsLimitList.add(shop.getShopName()+"通用"); |
| | | goodsLimitList.add(shopMap.get(appGetAbleCouponPageVo.getShopId()).getShopName()+"通用"); |
| | | }else{ |
| | | goodsLimitList.add("全场通用"); |
| | | } |
| | | } |
| | | appGetAbleCouponPageVo.setGoodsLimitList(goodsLimitList); |
| | | appGetAbleCouponPageVo.setVerifyShopName(shopMap.get(appGetAbleCouponPageVo.getShopId()).getShopName()); |
| | | } |
| | | } |
| | | return memberCouponPageVoList; |
| | | } |
| | | |
| | | /** |
| | | * @description 定时检查优惠券过期 |
| | | * @author jqs |
| | | * @date 2023/7/12 19:19 |
| | | * @param |
| | | * @return void |
| | | */ |
| | | @Override |
| | | public void timingCheckMemberCoupon(){ |
| | | memberCouponMapper.timingCheckMemberCoupon(); |
| | | } |
| | | } |
| | |
| | | AppOrderTotalVo appOrderTotalVo = orderService.getAppOrderTotal(userId).getData(); |
| | | appUserInfoVo.setNoPayCount(appOrderTotalVo.getNoPayCount()); |
| | | appUserInfoVo.setNoUseCount(appOrderTotalVo.getNoUseCount()); |
| | | MemberTotal memberTotal = memberTotalService.getById(member.getMemberId()); |
| | | appUserInfoVo.setIntegral(memberTotal.getUseableIntegral()); |
| | | return appUserInfoVo; |
| | | } |
| | | |
| | |
| | | memberTotal.setTotalExperienceOrder(0); |
| | | memberTotal.setTotalServiceOrder(0); |
| | | memberTotal.setTotalGoodsOrder(0); |
| | | memberTotal.setShareFlag(0); |
| | | memberTotal.setPlSuggestFlag(0); |
| | | memberTotal.setShopSuggestFlag(0); |
| | | memberTotal.setSignFlag(0); |
| | | memberTotal.setBuyFlag(0); |
| | | memberTotalService.saveOrUpdate(memberTotal); |
| | | } |
| | | |
| | |
| | | public void mgtFrozenMember(MgtBaseGetDto mgtBaseGetDto){ |
| | | sysUserService.frozenUser(Long.valueOf(mgtBaseGetDto.getId())); |
| | | } |
| | | |
| | | /** |
| | | * @description 获取用户任务列表 |
| | | * @author jqs |
| | | * @date 2023/7/12 15:07 |
| | | * @param userId |
| | | * @return List<AppIntegralTaskListVo> |
| | | */ |
| | | @Override |
| | | public List<AppIntegralTaskListVo> listAppMemberIntegralTask(Long userId){ |
| | | // 获取指定用户的会员信息 |
| | | Member member = this.getByUserId(userId); |
| | | // 获取会员的总积分信息 |
| | | MemberTotal memberTotal = memberTotalService.getById(member.getMemberId()); |
| | | // 获取其他配置信息 |
| | | AppOtherConfigGetVo appOtherConfigGetVo = remoteConfigService.getAppOtherConfigGetVo().getData(); |
| | | // 创建一个空的积分任务列表 |
| | | List<AppIntegralTaskListVo> appIntegralTaskListVoList = new ArrayList<>(); |
| | | // 创建分享小程序任务 |
| | | AppIntegralTaskListVo shareTask = new AppIntegralTaskListVo(); |
| | | shareTask.setTaskContent("分享小程序给微信好友"); |
| | | shareTask.setTaskDesc("完成任务+" + appOtherConfigGetVo.getShareIntegral() + "积分"); |
| | | shareTask.setRecommendFlag(1); |
| | | shareTask.setCompleteFlag(memberTotal.getShareFlag()); |
| | | appIntegralTaskListVoList.add(shareTask); |
| | | // 创建提交平台建议任务 |
| | | AppIntegralTaskListVo plSuggestTask = new AppIntegralTaskListVo(); |
| | | plSuggestTask.setTaskContent("提交平台建议"); |
| | | plSuggestTask.setTaskDesc("完成任务+" + appOtherConfigGetVo.getSuggestPlatformIntegral() + "积分"); |
| | | plSuggestTask.setRecommendFlag(1); |
| | | plSuggestTask.setCompleteFlag(memberTotal.getPlSuggestFlag()); |
| | | appIntegralTaskListVoList.add(plSuggestTask); |
| | | // 创建提交门店建议任务 |
| | | AppIntegralTaskListVo shopSuggestTask = new AppIntegralTaskListVo(); |
| | | shopSuggestTask.setTaskContent("提交门店建议"); |
| | | shopSuggestTask.setTaskDesc("完成任务+" + appOtherConfigGetVo.getSuggestShopIntegral() + "积分"); |
| | | shopSuggestTask.setRecommendFlag(1); |
| | | shopSuggestTask.setCompleteFlag(memberTotal.getShopSuggestFlag()); |
| | | appIntegralTaskListVoList.add(shopSuggestTask); |
| | | // 创建每日签到任务 |
| | | AppIntegralTaskListVo signTask = new AppIntegralTaskListVo(); |
| | | signTask.setTaskContent("每日签到"); |
| | | signTask.setTaskDesc("完成任务+" + appOtherConfigGetVo.getSignInIntegral() + "积分"); |
| | | signTask.setRecommendFlag(1); |
| | | signTask.setCompleteFlag(memberTotal.getSignFlag()); |
| | | appIntegralTaskListVoList.add(signTask); |
| | | // 创建消费得积分任务 |
| | | AppIntegralTaskListVo buyTask = new AppIntegralTaskListVo(); |
| | | buyTask.setTaskContent("消费得积分"); |
| | | buyTask.setTaskDesc("每消费1元+" + appOtherConfigGetVo.getPayMoneyIntegral() + "积分"); |
| | | buyTask.setRecommendFlag(1); |
| | | buyTask.setCompleteFlag(memberTotal.getBuyFlag()); |
| | | appIntegralTaskListVoList.add(buyTask); |
| | | // 返回积分任务列表 |
| | | return appIntegralTaskListVoList; |
| | | } |
| | | |
| | | /** |
| | | * @description 积分变动 |
| | | * @author jqs |
| | | * @date 2023/7/12 15:59 |
| | | * @param integralChangeDto |
| | | * @return void |
| | | */ |
| | | @Override |
| | | public Boolean changeIntegral(IntegralChangeDto integralChangeDto){ |
| | | Member member = this.getByUserId(integralChangeDto.getUserId()); |
| | | Integer integralType = integralChangeDto.getIntegralType(); |
| | | Integer changeIntegral = integralChangeDto.getChangeIntegral(); |
| | | MemberTotal memberTotal = memberTotalService.getById(member.getMemberId()); |
| | | Boolean completeFlag = false; |
| | | switch(integralType){ |
| | | case 1: |
| | | if(memberTotal.getShareFlag()==1){ |
| | | completeFlag = true; |
| | | } |
| | | break; |
| | | case 2: |
| | | if(memberTotal.getPlSuggestFlag()==1){ |
| | | completeFlag = true; |
| | | } |
| | | break; |
| | | case 3: |
| | | if(memberTotal.getShopSuggestFlag()==1){ |
| | | completeFlag = true; |
| | | } |
| | | break; |
| | | case 4: |
| | | if(memberTotal.getSignFlag()==1){ |
| | | completeFlag = true; |
| | | } |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | if(completeFlag){ |
| | | return completeFlag; |
| | | } |
| | | AppOtherConfigGetVo appOtherConfigGetVo = remoteConfigService.getAppOtherConfigGetVo().getData(); |
| | | IntegralRecord integralRecord = new IntegralRecord(); |
| | | integralRecord.setDelFlag(0); |
| | | integralRecord.setUserId(integralChangeDto.getUserId()); |
| | | integralRecord.setChangeType(integralType); |
| | | integralRecord.setCreateTime(new Date()); |
| | | //1分享获取2平台建议获取3门店建议获取4每日签到5消费得积分 |
| | | switch(integralType){ |
| | | case 1: |
| | | changeIntegral = appOtherConfigGetVo.getShareIntegral(); |
| | | integralRecord.setChangeIntegral(changeIntegral); |
| | | integralRecord.setSurpIntegral(integralRecord.getSurpIntegral()+changeIntegral); |
| | | integralRecord.setChangeReason("每日任务【分享小程序】获得积分"); |
| | | memberTotal.setTotalIntegral(memberTotal.getTotalIntegral()+changeIntegral); |
| | | memberTotal.setUseableIntegral(memberTotal.getUseableIntegral()+changeIntegral); |
| | | memberTotal.setShareFlag(1); |
| | | break; |
| | | case 2: |
| | | changeIntegral = appOtherConfigGetVo.getSuggestPlatformIntegral(); |
| | | integralRecord.setChangeIntegral(changeIntegral); |
| | | integralRecord.setSurpIntegral(integralRecord.getSurpIntegral()+changeIntegral); |
| | | integralRecord.setChangeReason("每日任务【提交平台建议】获得积分"); |
| | | memberTotal.setTotalIntegral(memberTotal.getTotalIntegral()+changeIntegral); |
| | | memberTotal.setUseableIntegral(memberTotal.getUseableIntegral()+changeIntegral); |
| | | memberTotal.setPlSuggestFlag(1); |
| | | break; |
| | | case 3: |
| | | changeIntegral = appOtherConfigGetVo.getSuggestShopIntegral(); |
| | | integralRecord.setChangeIntegral(changeIntegral); |
| | | integralRecord.setSurpIntegral(integralRecord.getSurpIntegral()+changeIntegral); |
| | | integralRecord.setChangeReason("每日任务【提交门店建议】获得积分"); |
| | | memberTotal.setTotalIntegral(memberTotal.getTotalIntegral()+changeIntegral); |
| | | memberTotal.setUseableIntegral(memberTotal.getUseableIntegral()+changeIntegral); |
| | | memberTotal.setShopSuggestFlag(1); |
| | | break; |
| | | case 4: |
| | | changeIntegral = appOtherConfigGetVo.getSignInIntegral(); |
| | | integralRecord.setChangeIntegral(changeIntegral); |
| | | integralRecord.setSurpIntegral(integralRecord.getSurpIntegral()+changeIntegral); |
| | | integralRecord.setChangeReason("每日任务【签到】获得积分"); |
| | | memberTotal.setTotalIntegral(memberTotal.getTotalIntegral()+changeIntegral); |
| | | memberTotal.setUseableIntegral(memberTotal.getUseableIntegral()+changeIntegral); |
| | | memberTotal.setSignFlag(1); |
| | | break; |
| | | case 5: |
| | | integralRecord.setChangeIntegral(changeIntegral); |
| | | integralRecord.setSurpIntegral(integralRecord.getSurpIntegral()+changeIntegral); |
| | | integralRecord.setChangeReason("订单【"+integralChangeDto.getOrderNo()+"】获得积分"); |
| | | integralRecord.setOrderId(integralChangeDto.getOrderId()); |
| | | integralRecord.setOrderNo(integralChangeDto.getOrderNo()); |
| | | memberTotal.setTotalIntegral(memberTotal.getTotalIntegral()+changeIntegral); |
| | | memberTotal.setUseableIntegral(memberTotal.getUseableIntegral()+changeIntegral); |
| | | memberTotal.setBuyFlag(1); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | memberTotalService.saveOrUpdate(memberTotal); |
| | | integralRecordService.saveOrUpdate(integralRecord); |
| | | return completeFlag; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.member.domain.pojo.member.MemberTotal; |
| | | import com.ruoyi.member.domain.vo.AppIntegralTaskListVo; |
| | | import com.ruoyi.member.mapper.member.MemberTotalMapper; |
| | | import com.ruoyi.member.service.member.MemberTotalService; |
| | | import com.ruoyi.system.api.domain.dto.MemberTotalChangeDto; |
| | | import com.ruoyi.system.api.domain.poji.member.Member; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | |
| | | import com.ruoyi.member.domain.dto.MgtMemberIntegralPageDto; |
| | | import com.ruoyi.member.domain.pojo.member.IntegralRecord; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.member.domain.vo.AppIntegralRecordPageVo; |
| | | import com.ruoyi.member.domain.vo.MgtMemberIntegralPageVo; |
| | | |
| | | import java.util.List; |
| | |
| | | * @return |
| | | */ |
| | | List<MgtMemberIntegralPageVo> pageMgtMemberIntegral(Page page, MgtMemberIntegralPageDto mgtMemberIntegralPageDto); |
| | | |
| | | |
| | | /** |
| | | * @description 小程序获取用户积分明细 |
| | | * @author jqs |
| | | * @date 2023/7/12 14:37 |
| | | * @param page |
| | | * @param userId |
| | | * @return List<AppIntegralRecordPageVo> |
| | | */ |
| | | List<AppIntegralRecordPageVo> pageAppMemberIntegralRecord(Page page, Long userId); |
| | | |
| | | |
| | | } |
| | |
| | | * @return List<AppMemberCouponPageVo> |
| | | */ |
| | | List<AppMemberCouponPageVo> pageAppUserGetCoupon(Page page, AppMemberCouponPageDto appMemberCouponPageDto); |
| | | |
| | | /** |
| | | * @description 定时检查优惠券过期 |
| | | * @author jqs |
| | | * @date 2023/7/12 19:19 |
| | | * @param |
| | | * @return void |
| | | */ |
| | | void timingCheckMemberCoupon(); |
| | | } |
| | |
| | | * @return void |
| | | */ |
| | | void mgtFrozenMember(MgtBaseGetDto mgtBaseGetDto); |
| | | |
| | | /** |
| | | * @description 获取用户任务列表 |
| | | * @author jqs |
| | | * @date 2023/7/12 15:07 |
| | | * @param userId |
| | | * @return List<AppIntegralTaskListVo> |
| | | */ |
| | | List<AppIntegralTaskListVo> listAppMemberIntegralTask(Long userId); |
| | | |
| | | /** |
| | | * @description 积分变动 |
| | | * @author jqs |
| | | * @date 2023/7/12 15:59 |
| | | * @param integralChangeDto |
| | | * @return void |
| | | */ |
| | | Boolean changeIntegral(IntegralChangeDto integralChangeDto); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.member.domain.pojo.member.MemberTotal; |
| | | import com.ruoyi.system.api.domain.dto.MemberTotalChangeDto; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2023-05-25 |
| | | */ |
| | | public interface MemberTotalService extends IService<MemberTotal> { |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | tc.coupon_type couponType, |
| | | tc.money_threshold moneyThreshold, |
| | | tc.discount_money discountMoney, |
| | | tc.discount_percent discountPercent |
| | | tc.discount_percent discountPercent, |
| | | tc.rel_goods_ids relGoodsIds |
| | | FROM t_coupon tc |
| | | WHERE tc.dle_flag = 0 AND tc.coupon_status = 1 AND tc.send_type = 1 AND (tc.coupon_from = 1 OR (tc.coupon_from = 2 AND tc.shop_id = #{shopId})) |
| | | WHERE tc.del_flag = 0 AND tc.coupon_status = 1 AND tc.send_type = 1 AND (tc.coupon_from = 1 OR (tc.coupon_from = 2 AND tc.shop_id = #{shopId})) |
| | | <if test="unGetList != null and unGetList.size()>0"> |
| | | AND tc.coupon_id NOT IN |
| | | <foreach collection="unGetList" item="item" open="(" separator="," close=")"> |
| | |
| | | ORDER BY tir.create_time DESC |
| | | </select> |
| | | |
| | | <select id="pageAppMemberIntegralRecord" resultType="com.ruoyi.member.domain.vo.AppIntegralRecordPageVo"> |
| | | SELECT |
| | | tir.create_time createTime, |
| | | tir.change_integral changeIntegral, |
| | | tir.change_reason changeReason |
| | | FROM t_integral_record tir |
| | | WHERE tir.del_flag = 0 AND tir.user_id = #{userId} |
| | | ORDER BY tir.create_time DESC |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | tuc.money_threshold moneyThreshold, |
| | | tuc.discount_money discountMoney, |
| | | tuc.discount_percent discountPercent, |
| | | tuc.valid_start_time validStartTime, |
| | | tuc.deadline_time deadlineTime, |
| | | tuc.rel_goods_ids relGoodsIds, |
| | | tuc.shop_id shopId |
| | | tuc.shop_id shopId, |
| | | IFNULL(tuc.valid_start_time,tuc.receive_time) validStartTime, |
| | | tuc.deadline_time deadlineTime, |
| | | tuc.use_time useTime |
| | | FROM t_member_coupon tuc |
| | | WHERE tuc.del_flag = 0 AND tuc.coupon_status = 1 AND tuc.user_id = #{param.userId} |
| | | WHERE tuc.del_flag = 0 AND tuc.user_id = #{param.userId} |
| | | <if test="param.couponStatus != null"> |
| | | tuc.coupon_status = #{param.couponStatus} |
| | | AND tuc.coupon_status = #{param.couponStatus} |
| | | </if> |
| | | ORDER BY tuc.receive_time DESC |
| | | </select> |
| | | |
| | | <update id="timingCheckMemberCoupon"> |
| | | UPDATE t_member_coupon |
| | | SET coupon_status = 0 |
| | | WHERE del_flag = 0 AND coupon_status = 1 AND deadline_time < CURDATE() |
| | | </update> |
| | | </mapper> |
| | |
| | | consumerGoodsService.sendGoodsGift(giftSendDtoList); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "shopId",hidden = true) |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("商品类型1周期2服务3体验4单品") |
| | | @ApiModelProperty(value="商品类型1周期2服务3体验4单品") |
| | | private Integer goodsType; |
| | | } |
| | |
| | | @ApiModelProperty(value = "会员用户id") |
| | | private Long memberUserId; |
| | | |
| | | @ApiModelProperty("商品类型1周期2服务3体验") |
| | | @ApiModelProperty(value="商品类型1周期2服务3体验") |
| | | private Integer goodsType; |
| | | } |
| | |
| | | @ApiModelProperty(value = "会员用户id") |
| | | private Long memberUserId; |
| | | |
| | | @ApiModelProperty("商品类型1周期2服务3体验") |
| | | @ApiModelProperty(value="商品类型1周期2服务3体验") |
| | | private Integer goodsType; |
| | | } |
| | |
| | | public class MerServiceRecordPageDto extends MerPageDto { |
| | | |
| | | |
| | | @ApiModelProperty("会员用户id") |
| | | @ApiModelProperty(value="会员用户id") |
| | | private Long memberUserId; |
| | | } |
| | |
| | | @ApiModelProperty(value = "code转换商户ids",hidden = true) |
| | | private String shopIds; |
| | | |
| | | @ApiModelProperty("店铺地址省code") |
| | | @ApiModelProperty(value="店铺地址省code") |
| | | private String shopProvinceCode; |
| | | |
| | | @ApiModelProperty("店铺地址市code") |
| | | @ApiModelProperty(value="店铺地址市code") |
| | | private String shopCityCode; |
| | | |
| | | @ApiModelProperty("店铺地址区code") |
| | | @ApiModelProperty(value="店铺地址区code") |
| | | private String shopAreaCode; |
| | | } |
| | |
| | | @Data |
| | | public class AppConsumerPageVo { |
| | | |
| | | @ApiModelProperty("服务id") |
| | | @ApiModelProperty(value="服务id") |
| | | private String consumerGoodsId; |
| | | |
| | | @ApiModelProperty("服务状态-1删除1未完成2完成") |
| | | @ApiModelProperty(value="服务状态-1删除1未完成2完成") |
| | | private Integer serviceStatus; |
| | | |
| | | @ApiModelProperty("商户id") |
| | | @ApiModelProperty(value="商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("商品类型1周期2服务3体验4单品") |
| | | @ApiModelProperty(value="商品类型1周期2服务3体验4单品") |
| | | private Integer goodsType; |
| | | |
| | | @ApiModelProperty("商品名称") |
| | | @ApiModelProperty(value="商品名称") |
| | | private String goodsName; |
| | | |
| | | @ApiModelProperty("商品图片") |
| | | @ApiModelProperty(value="商品图片") |
| | | private String goodsPicture; |
| | | |
| | | @ApiModelProperty("商品调理问题") |
| | | @ApiModelProperty(value="商品调理问题") |
| | | private String goodsNurses; |
| | | |
| | | @ApiModelProperty("周期标记") |
| | | @ApiModelProperty(value="周期标记") |
| | | private Integer cycleNumFlag; |
| | | |
| | | @ApiModelProperty("服务次数") |
| | | @ApiModelProperty(value="服务次数") |
| | | private Integer serviceNum; |
| | | |
| | | @ApiModelProperty("消耗次数") |
| | | @ApiModelProperty(value="消耗次数") |
| | | private Integer usedNum; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "商品调理问题") |
| | | private BigDecimal goodsNurses; |
| | | |
| | | @ApiModelProperty("服务次数") |
| | | @ApiModelProperty(value="服务次数") |
| | | private Integer serviceNum; |
| | | |
| | | @ApiModelProperty(value = "商品售价") |
| | |
| | | public class AppServiceRecordPageVo { |
| | | |
| | | |
| | | @ApiModelProperty("服务名称") |
| | | @ApiModelProperty(value="服务名称") |
| | | private String consumerGoodsNames; |
| | | |
| | | @ApiModelProperty("服务类型1.周期2.服务3.体验") |
| | | @ApiModelProperty(value="服务类型1.周期2.服务3.体验") |
| | | private Integer serviceType; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @ApiModelProperty(value="创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | |
| | | @ApiModelProperty(value = "订单id") |
| | | private String orderId; |
| | | |
| | | @ApiModelProperty("订单编号") |
| | | @ApiModelProperty(value="订单编号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value = "订单状态0.已取消1.待支付2.待核销3.已完成") |
| | | private Integer orderStatus; |
| | | |
| | | @ApiModelProperty("订单来源1.商城2.秒杀活动3.线下创建") |
| | | @ApiModelProperty(value="订单来源1.商城2.秒杀活动3.线下创建") |
| | | private Integer orderFrom; |
| | | |
| | | @ApiModelProperty(value = "商品总价") |
| | |
| | | @ApiModelProperty(value = "优惠券抵扣") |
| | | private BigDecimal couponDiscount; |
| | | |
| | | @ApiModelProperty("应收金额") |
| | | @ApiModelProperty(value="应收金额") |
| | | private BigDecimal receivableMoney; |
| | | |
| | | @ApiModelProperty("应收订金") |
| | | @ApiModelProperty(value="应收订金") |
| | | private BigDecimal receivableDeposit; |
| | | |
| | | @ApiModelProperty("订单商品列表") |
| | | @ApiModelProperty(value="订单商品列表") |
| | | private List<AppUserOrderGoodsPageVo> appUserOrderGoodsPageVoList; |
| | | |
| | | @ApiModelProperty("订单支付金额") |
| | | @ApiModelProperty(value="订单支付金额") |
| | | private BigDecimal payMoney; |
| | | |
| | | @ApiModelProperty("商户id") |
| | | @ApiModelProperty(value="商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("商户名称") |
| | | @ApiModelProperty(value="商户名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty(value = "是否绑定商户0否1是") |
| | | private Integer sameShop; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @ApiModelProperty(value="创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("支付时间") |
| | | @ApiModelProperty(value="支付时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date payTime; |
| | | |
| | | @ApiModelProperty("核销时间") |
| | | @ApiModelProperty(value="核销时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date useTime; |
| | | |
| | | @ApiModelProperty("取消时间") |
| | | @ApiModelProperty(value="取消时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date cancelTime; |
| | | |
| | | @ApiModelProperty("订单备注") |
| | | @ApiModelProperty(value="订单备注") |
| | | private String orderRemark; |
| | | |
| | | @ApiModelProperty(value = "核销码") |
| | |
| | | @Data |
| | | public class AppUserOrderGoodsPageVo { |
| | | |
| | | @ApiModelProperty("订单商品id") |
| | | @ApiModelProperty(value="订单商品id") |
| | | private String orderGoodsId; |
| | | |
| | | @ApiModelProperty("商品id") |
| | | @ApiModelProperty(value="商品id") |
| | | private String goodsId; |
| | | |
| | | @ApiModelProperty("商品名称") |
| | | @ApiModelProperty(value="商品名称") |
| | | private String goodsName; |
| | | |
| | | @ApiModelProperty("商品图片") |
| | | @ApiModelProperty(value="商品图片") |
| | | private String goodsPicture; |
| | | |
| | | @ApiModelProperty(value = "商品类型1周期2服务3体验4单品") |
| | |
| | | @ApiModelProperty(value = "商品实际价格") |
| | | private BigDecimal goodsRealPrice; |
| | | |
| | | @ApiModelProperty("周期标记") |
| | | @ApiModelProperty(value="周期标记") |
| | | private Integer cycleNumFlag; |
| | | |
| | | @ApiModelProperty("服务次数") |
| | | @ApiModelProperty(value="服务次数") |
| | | private Integer serviceNum; |
| | | |
| | | |
| | |
| | | @ApiModelProperty(value = "订单id") |
| | | private String orderId; |
| | | |
| | | @ApiModelProperty("订单编号") |
| | | @ApiModelProperty(value="订单编号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value = "订单状态0.已取消1.待支付2.待核销3.已完成") |
| | | private Integer orderStatus; |
| | | |
| | | @ApiModelProperty("订单来源1.商城订单2.秒杀活动3.线下创建") |
| | | @ApiModelProperty(value="订单来源1.商城订单2.秒杀活动3.线下创建") |
| | | private Integer orderFrom; |
| | | |
| | | @ApiModelProperty("订单商品列表") |
| | | @ApiModelProperty(value="订单商品列表") |
| | | private List<AppUserOrderGoodsPageVo> appUserOrderGoodsPageVoList; |
| | | |
| | | @ApiModelProperty("订单支付金额") |
| | | @ApiModelProperty(value="订单支付金额") |
| | | private BigDecimal receivableMoney; |
| | | |
| | | @ApiModelProperty("商品数量") |
| | | @ApiModelProperty(value="商品数量") |
| | | private Integer goodsNum; |
| | | |
| | | @ApiModelProperty("商户id") |
| | | @ApiModelProperty(value="商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("商户名称") |
| | | @ApiModelProperty(value="商户名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty("商户服务电话") |
| | | @ApiModelProperty(value="商户服务电话") |
| | | private String shopServicePhone; |
| | | |
| | | @ApiModelProperty(value = "是否绑定商户0否1是") |
| | |
| | | @Data |
| | | public class MerConsumerGoodsListVo { |
| | | |
| | | @ApiModelProperty("服务id") |
| | | @ApiModelProperty(value="服务id") |
| | | private String consumerGoodsId; |
| | | |
| | | @ApiModelProperty("服务状态-1删除1未完成2完成") |
| | | @ApiModelProperty(value="服务状态-1删除1未完成2完成") |
| | | private Integer serviceStatus; |
| | | |
| | | @ApiModelProperty("商户id") |
| | | @ApiModelProperty(value="商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("商品类型1周期2服务3体验4单品") |
| | | @ApiModelProperty(value="商品类型1周期2服务3体验4单品") |
| | | private Integer goodsType; |
| | | |
| | | @ApiModelProperty("商品名称") |
| | | @ApiModelProperty(value="商品名称") |
| | | private String goodsName; |
| | | |
| | | @ApiModelProperty(value = "商品简介") |
| | | private String goodsIntroduction; |
| | | |
| | | @ApiModelProperty("商品图片") |
| | | @ApiModelProperty(value="商品图片") |
| | | private String goodsPicture; |
| | | |
| | | @ApiModelProperty("商品调理问题") |
| | | @ApiModelProperty(value="商品调理问题") |
| | | private String goodsNurses; |
| | | |
| | | @ApiModelProperty("周期标记") |
| | | @ApiModelProperty(value="周期标记") |
| | | private Integer cycleNumFlag; |
| | | |
| | | @ApiModelProperty("服务次数") |
| | | @ApiModelProperty(value="服务次数") |
| | | private Integer serviceNum; |
| | | |
| | | @ApiModelProperty("消耗次数") |
| | | @ApiModelProperty(value="消耗次数") |
| | | private Integer usedNum; |
| | | } |
| | |
| | | @Data |
| | | public class MerConsumerGoodsVo { |
| | | |
| | | @ApiModelProperty("未确认商品") |
| | | @ApiModelProperty(value="未确认商品") |
| | | private List<MerConsumerGoodsListVo> noSureList; |
| | | |
| | | @ApiModelProperty("确认商品") |
| | | @ApiModelProperty(value="确认商品") |
| | | private List<MerConsumerGoodsListVo> sureList; |
| | | |
| | | |
| | |
| | | @ApiModelProperty(value = "商品售价") |
| | | private BigDecimal salesPrice;; |
| | | |
| | | @ApiModelProperty("周期次数标记0否1是") |
| | | @ApiModelProperty(value="周期次数标记0否1是") |
| | | private Integer cycleNumFlag; |
| | | |
| | | @ApiModelProperty(value = "商品默认服务次数") |
| | |
| | | @ApiModelProperty(value = "订单id") |
| | | private String orderId; |
| | | |
| | | @ApiModelProperty("订单编号") |
| | | @ApiModelProperty(value="订单编号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty("订单状态") |
| | | @ApiModelProperty(value="订单状态") |
| | | private Integer orderStatus; |
| | | |
| | | @ApiModelProperty(value = "商品总价") |
| | |
| | | @ApiModelProperty(value = "优惠券抵扣") |
| | | private BigDecimal couponDiscount; |
| | | |
| | | @ApiModelProperty("应收金额") |
| | | @ApiModelProperty(value="应收金额") |
| | | private BigDecimal receivableMoney; |
| | | |
| | | @ApiModelProperty("应收订金") |
| | | @ApiModelProperty(value="应收订金") |
| | | private BigDecimal receivableDeposit; |
| | | |
| | | @ApiModelProperty("订单实际支付金额") |
| | | @ApiModelProperty(value="订单实际支付金额") |
| | | private BigDecimal payMoney; |
| | | |
| | | @ApiModelProperty("订单未支付金额") |
| | | @ApiModelProperty(value="订单未支付金额") |
| | | private BigDecimal unPaidMoney; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @ApiModelProperty(value="创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | } |
| | |
| | | @Data |
| | | public class MerOrderGoodsPageVo { |
| | | |
| | | @ApiModelProperty("商品名字") |
| | | @ApiModelProperty(value="商品名字") |
| | | private String goodsName; |
| | | |
| | | @ApiModelProperty("购买数量") |
| | | @ApiModelProperty(value="购买数量") |
| | | private Integer buyNum; |
| | | |
| | | @ApiModelProperty(value = "商品类型1周期2服务3体验4单品") |
| | |
| | | @ApiModelProperty(value = "订单id") |
| | | private String orderId; |
| | | |
| | | @ApiModelProperty("订单编号") |
| | | @ApiModelProperty(value="订单编号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value = "订单状态0.已取消1.待支付2.待核销3.已完成") |
| | |
| | | @ApiModelProperty(value = "优惠券抵扣") |
| | | private BigDecimal couponDiscount; |
| | | |
| | | @ApiModelProperty("应收金额") |
| | | @ApiModelProperty(value="应收金额") |
| | | private BigDecimal receivableMoney; |
| | | |
| | | @ApiModelProperty("应收订金") |
| | | @ApiModelProperty(value="应收订金") |
| | | private BigDecimal receivableDeposit; |
| | | |
| | | @ApiModelProperty("订单实际支付金额") |
| | | @ApiModelProperty(value="订单实际支付金额") |
| | | private BigDecimal payMoney; |
| | | |
| | | @ApiModelProperty("订单未支付金额") |
| | | @ApiModelProperty(value="订单未支付金额") |
| | | private BigDecimal unPaidMoney; |
| | | |
| | | @ApiModelProperty("订单备注") |
| | | @ApiModelProperty(value="订单备注") |
| | | private String orderRemark; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @ApiModelProperty(value="创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("订单来源") |
| | | @ApiModelProperty(value="订单来源") |
| | | private Integer orderFrom; |
| | | |
| | | @ApiModelProperty("订单来源") |
| | | @ApiModelProperty(value="订单来源") |
| | | private String orderFromDesc; |
| | | |
| | | @ApiModelProperty("订单商品列表") |
| | | @ApiModelProperty(value="订单商品列表") |
| | | private List<MerOrderGoodsPageVo> merOrderGoodsVoList; |
| | | } |
| | |
| | | public class MerServiceRecordPageVo { |
| | | |
| | | |
| | | @ApiModelProperty("服务名称") |
| | | @ApiModelProperty(value="服务名称") |
| | | private String consumerGoodsNames; |
| | | |
| | | @ApiModelProperty("服务类型1.周期2.服务3.体验") |
| | | @ApiModelProperty(value="服务类型1.周期2.服务3.体验") |
| | | private Integer serviceType; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @ApiModelProperty(value="创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | |
| | | @Data |
| | | public class MerVerifyAwardVo { |
| | | |
| | | @ApiModelProperty(value = "核销状态1.未核销2.已核销") |
| | | private Integer verifyStatus; |
| | | |
| | | @ApiModelProperty(value = "奖品id") |
| | | private String prizeId; |
| | | |
| | | @ApiModelProperty(value = "用户姓名") |
| | | private String userName; |
| | | |
| | |
| | | package com.ruoyi.order.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.system.api.domain.vo.MerCouponGoodsListVo; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Data |
| | | public class MerVerifyCouponVo { |
| | | |
| | | @ApiModelProperty(value = "核销状态1.未核销2.已核销") |
| | | private Integer verifyStatus; |
| | | |
| | | @ApiModelProperty(value = "用户姓名") |
| | | private String userName; |
| | | |
| | |
| | | @ApiModelProperty(value = "优惠券id") |
| | | private String memberCouponId; |
| | | |
| | | @ApiModelProperty(value = "优惠券名称") |
| | | private String couponName; |
| | | |
| | | @ApiModelProperty(value = "优惠券来源") |
| | | private String couponFrom; |
| | | |
| | | @ApiModelProperty(value = "获奖时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value = "优惠券商品列表") |
| | | private List<MerCouponGoodsListVo> goodsList; |
| | | |
| | |
| | | package com.ruoyi.order.domain.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty(value = "订单id") |
| | | private String orderId; |
| | | |
| | | @ApiModelProperty("订单编号") |
| | | @ApiModelProperty(value="订单编号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value = "订单状态0.已取消1.待支付2.待核销3.已完成") |
| | | private Integer orderStatus; |
| | | |
| | | @ApiModelProperty("订单来源1.商城2.秒杀活动3.线下创建") |
| | | @ApiModelProperty(value="订单来源1.商城2.秒杀活动3.线下创建") |
| | | private Integer orderFrom; |
| | | |
| | | @ApiModelProperty(value = "商品总价") |
| | |
| | | @ApiModelProperty(value = "优惠券抵扣") |
| | | private BigDecimal couponDiscount; |
| | | |
| | | @ApiModelProperty("应收金额") |
| | | @ApiModelProperty(value="应收金额") |
| | | private BigDecimal receivableMoney; |
| | | |
| | | @ApiModelProperty("应收订金") |
| | | @ApiModelProperty(value="应收订金") |
| | | private BigDecimal receivableDeposit; |
| | | |
| | | @ApiModelProperty("订单商品列表") |
| | | @ApiModelProperty(value="订单商品列表") |
| | | private List<AppUserOrderGoodsPageVo> appUserOrderGoodsPageVoList; |
| | | |
| | | @ApiModelProperty("订单支付金额") |
| | | @ApiModelProperty(value="订单支付金额") |
| | | private BigDecimal payMoney; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @ApiModelProperty(value="创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("支付时间") |
| | | @ApiModelProperty(value="支付时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date payTime; |
| | | |
| | | @ApiModelProperty("核销时间") |
| | | @ApiModelProperty(value="核销时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date useTime; |
| | | |
| | | @ApiModelProperty("订单备注") |
| | | @ApiModelProperty(value="订单备注") |
| | | private String orderRemark; |
| | | |
| | | @ApiModelProperty(value = "用户姓名") |
| | |
| | | @ApiModelProperty(value = "用户电话") |
| | | private String userMobile; |
| | | |
| | | @ApiModelProperty("结清标记0否1是") |
| | | @ApiModelProperty(value="结清标记0否1是") |
| | | private Integer closeFlag; |
| | | } |
| | |
| | | |
| | | |
| | | @Excel(name = "订单编号", width = 30) |
| | | @ApiModelProperty("订单编号") |
| | | @ApiModelProperty(value="订单编号") |
| | | private String orderNo; |
| | | |
| | | @Excel(name = "秒杀活动", width = 30) |
| | | @ApiModelProperty("秒杀活动") |
| | | @ApiModelProperty(value="秒杀活动") |
| | | private String activityName; |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | |
| | | private String userMobile; |
| | | |
| | | @Excel(name = "商品名称", width = 30) |
| | | @ApiModelProperty("商品名称") |
| | | @ApiModelProperty(value="商品名称") |
| | | private String goodsName; |
| | | |
| | | @Excel(name = "秒杀价格", width = 30) |
| | |
| | | private BigDecimal activityPrice; |
| | | |
| | | @Excel(name = "购买数量", width = 30) |
| | | @ApiModelProperty("购买数量") |
| | | @ApiModelProperty(value="购买数量") |
| | | private Integer buyNum; |
| | | |
| | | @Excel(name = "订单金额", width = 30) |
| | | @ApiModelProperty("订单金额") |
| | | @ApiModelProperty(value="订单金额") |
| | | private BigDecimal orderMoney; |
| | | |
| | | @Excel(name = "应付金额", width = 30) |
| | | @ApiModelProperty("应付金额") |
| | | @ApiModelProperty(value="应付金额") |
| | | private BigDecimal receivableMoney; |
| | | |
| | | @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("创建时间") |
| | | @ApiModelProperty(value="创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @Excel(name = "订单实际支付金额", width = 30) |
| | | @ApiModelProperty("订单实际支付金额") |
| | | @ApiModelProperty(value="订单实际支付金额") |
| | | private BigDecimal payMoney; |
| | | |
| | | @Excel(name = "订单未支付金额", width = 30) |
| | | @ApiModelProperty("订单未支付金额") |
| | | @ApiModelProperty(value="订单未支付金额") |
| | | private BigDecimal unPaidMoney; |
| | | |
| | | @ApiModelProperty("核销店铺id") |
| | | @ApiModelProperty(value="核销店铺id") |
| | | private Long shopId; |
| | | |
| | | @Excel(name = "核销店铺", width = 30) |
| | | @ApiModelProperty("核销店铺") |
| | | @ApiModelProperty(value="核销店铺") |
| | | private String shopName; |
| | | |
| | | @Excel(name = "核销时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("核销时间") |
| | | @ApiModelProperty(value="核销时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date verifyTime; |
| | | } |
| | |
| | | private String orderId; |
| | | |
| | | @Excel(name = "订单编号", width = 30) |
| | | @ApiModelProperty("订单编号") |
| | | @ApiModelProperty(value="订单编号") |
| | | private String orderNo; |
| | | |
| | | @Excel(name = "核销门店", width = 30) |
| | | @ApiModelProperty("核销门店") |
| | | @ApiModelProperty(value="核销门店") |
| | | private String shopName; |
| | | |
| | | @Excel(name = "商品信息", width = 30) |
| | | @ApiModelProperty("商品信息") |
| | | @ApiModelProperty(value="商品信息") |
| | | private String goodsInfo; |
| | | |
| | | @Excel(name = "订单状态", width = 30) |
| | |
| | | private BigDecimal discountMoney; |
| | | |
| | | @Excel(name = "应收金额", width = 30) |
| | | @ApiModelProperty("应收金额") |
| | | @ApiModelProperty(value="应收金额") |
| | | private BigDecimal receivableMoney; |
| | | |
| | | @Excel(name = "订单实际支付金额", width = 30) |
| | | @ApiModelProperty("订单实际支付金额") |
| | | @ApiModelProperty(value="订单实际支付金额") |
| | | private BigDecimal payMoney; |
| | | |
| | | @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("创建时间") |
| | | @ApiModelProperty(value="创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @Excel(name = "订单来源", width = 30) |
| | | @ApiModelProperty("订单来源") |
| | | @ApiModelProperty(value="订单来源") |
| | | private String orderFromDesc; |
| | | |
| | | @ApiModelProperty("核销门店id") |
| | | @ApiModelProperty(value="核销门店id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("订单来源") |
| | | @ApiModelProperty(value="订单来源") |
| | | private Integer orderFrom; |
| | | |
| | | @ApiModelProperty("订单商品列表") |
| | | @ApiModelProperty(value="订单商品列表") |
| | | private List<MgtOrderGoodsPageVo> mgtOrderGoodsVoList; |
| | | } |
| | |
| | | |
| | | |
| | | @Excel(name = "服务类型", width = 30) |
| | | @ApiModelProperty("服务类型1.周期2.服务3.体验") |
| | | @ApiModelProperty(value="服务类型1.周期2.服务3.体验") |
| | | private Integer serviceType; |
| | | |
| | | @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("创建时间") |
| | | @ApiModelProperty(value="创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @Excel(name = "服务商户id", width = 30) |
| | | @ApiModelProperty("服务商户id") |
| | | @ApiModelProperty(value="服务商户id") |
| | | private Long shopId; |
| | | |
| | | @Excel(name = "服务商户", width = 30) |
| | | @ApiModelProperty("服务商户") |
| | | @ApiModelProperty(value="服务商户") |
| | | private String shopName; |
| | | |
| | | @Excel(name = "服务商品名称", width = 30) |
| | | @ApiModelProperty("服务商品名称") |
| | | @ApiModelProperty(value="服务商品名称") |
| | | private String consumerGoodsName; |
| | | |
| | | @Excel(name = "服务次数", width = 30) |
| | | @ApiModelProperty("服务次数") |
| | | @ApiModelProperty(value="服务次数") |
| | | private Integer serviceNum; |
| | | |
| | | @Excel(name = "剩余次数", width = 30) |
| | | @ApiModelProperty("剩余次数") |
| | | @ApiModelProperty(value="剩余次数") |
| | | private Integer surpNum; |
| | | } |
| | |
| | | @Data |
| | | public class MgtOrderDetailVo { |
| | | |
| | | @ApiModelProperty("订单id") |
| | | @ApiModelProperty(value="订单id") |
| | | private String orderId; |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | |
| | | @ApiModelProperty(value = "用户电话") |
| | | private String userMobile; |
| | | |
| | | @ApiModelProperty("订单商品列表") |
| | | @ApiModelProperty(value="订单商品列表") |
| | | private List<MgtOrderGoodsDetailVo> orderGoodsDetailVoList; |
| | | |
| | | @ApiModelProperty(value = "订单状态0.已取消1.待支付2.待核销3.已完成") |
| | | private String orderStatus; |
| | | |
| | | @ApiModelProperty("订单编号") |
| | | @ApiModelProperty(value="订单编号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty("订单来源1.商城2.秒杀活动3.线下创建") |
| | | @ApiModelProperty(value="订单来源1.商城2.秒杀活动3.线下创建") |
| | | private String orderFrom; |
| | | |
| | | @ApiModelProperty("订单金额") |
| | | @ApiModelProperty(value="订单金额") |
| | | private BigDecimal orderMoney; |
| | | |
| | | @ApiModelProperty("应付金额") |
| | | @ApiModelProperty(value="应付金额") |
| | | private BigDecimal receivableMoney; |
| | | |
| | | @ApiModelProperty("订单实际支付金额") |
| | | @ApiModelProperty(value="订单实际支付金额") |
| | | private BigDecimal payMoney; |
| | | |
| | | @ApiModelProperty("订单未支付金额") |
| | | @ApiModelProperty(value="订单未支付金额") |
| | | private BigDecimal unPaidMoney; |
| | | |
| | | @ApiModelProperty("秒杀活动") |
| | | @ApiModelProperty(value="秒杀活动") |
| | | private String activityName; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @ApiModelProperty(value="创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("线上支付金额") |
| | | @ApiModelProperty(value="线上支付金额") |
| | | private BigDecimal onlinePayMoney; |
| | | |
| | | @ApiModelProperty("线下支付金额") |
| | | @ApiModelProperty(value="线下支付金额") |
| | | private BigDecimal offlinePayMoney; |
| | | |
| | | @ApiModelProperty("线上支付时间") |
| | | @ApiModelProperty(value="线上支付时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date payTime; |
| | | |
| | | @ApiModelProperty("线下支付时间") |
| | | @ApiModelProperty(value="线下支付时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date offPayTime; |
| | | |
| | | @ApiModelProperty("完成时间") |
| | | @ApiModelProperty(value="完成时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date completeTime; |
| | | |
| | | @ApiModelProperty("取消时间") |
| | | @ApiModelProperty(value="取消时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date cancelTime; |
| | | |
| | | @ApiModelProperty("订单备注") |
| | | @ApiModelProperty(value="订单备注") |
| | | private String orderRemark; |
| | | |
| | | @ApiModelProperty("核销店铺id") |
| | | @ApiModelProperty(value="核销店铺id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("核销店铺") |
| | | @ApiModelProperty(value="核销店铺") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty("核销时间") |
| | | @ApiModelProperty(value="核销时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date verifyTime; |
| | | |
| | |
| | | public class MgtOrderGoodsDetailVo { |
| | | |
| | | |
| | | @ApiModelProperty("订单商品id") |
| | | @ApiModelProperty(value="订单商品id") |
| | | private String orderGoodsId; |
| | | |
| | | @ApiModelProperty("商品id") |
| | | @ApiModelProperty(value="商品id") |
| | | private String goodsId; |
| | | |
| | | @ApiModelProperty("商品名称") |
| | | @ApiModelProperty(value="商品名称") |
| | | private String goodsName; |
| | | |
| | | @ApiModelProperty("商品图片") |
| | | @ApiModelProperty(value="商品图片") |
| | | private String goodsPicture; |
| | | |
| | | @ApiModelProperty(value = "商品类型1周期2服务3体验4单品") |
| | |
| | | @Data |
| | | public class MgtOrderGoodsPageVo { |
| | | |
| | | @ApiModelProperty("商品名字") |
| | | @ApiModelProperty(value="商品名字") |
| | | private String goodsName; |
| | | |
| | | @ApiModelProperty("购买数量") |
| | | @ApiModelProperty(value="购买数量") |
| | | private Integer buyNum; |
| | | |
| | | } |
| | |
| | | @Data |
| | | public class MgtOrderTotal { |
| | | |
| | | @ApiModelProperty("订单总数") |
| | | @ApiModelProperty(value="订单总数") |
| | | private Integer orderTotal; |
| | | |
| | | @ApiModelProperty("订单金额总数") |
| | | @ApiModelProperty(value="订单金额总数") |
| | | private BigDecimal orderMoneyTotal; |
| | | |
| | | @ApiModelProperty("门店订单总数") |
| | | @ApiModelProperty(value="门店订单总数") |
| | | private Integer shopOrderTotal; |
| | | |
| | | @ApiModelProperty("门店订单金额总数") |
| | | @ApiModelProperty(value="门店订单金额总数") |
| | | private BigDecimal shopOrderMoneyTotal; |
| | | |
| | | @ApiModelProperty("门店订单已付金额总数") |
| | | @ApiModelProperty(value="门店订单已付金额总数") |
| | | private BigDecimal shopPayMoneyTotal; |
| | | |
| | | @ApiModelProperty("门店订单未付金额总数") |
| | | @ApiModelProperty(value="门店订单未付金额总数") |
| | | private BigDecimal shopUnPayMoneyTotal; |
| | | |
| | | @ApiModelProperty("活动订单总数") |
| | | @ApiModelProperty(value="活动订单总数") |
| | | private Integer activityOrderTotal; |
| | | |
| | | @ApiModelProperty("活动订单金额总数") |
| | | @ApiModelProperty(value="活动订单金额总数") |
| | | private BigDecimal activityOrderMoneyTotal; |
| | | |
| | | @ApiModelProperty("活动订单已付金额总数") |
| | | @ApiModelProperty(value="活动订单已付金额总数") |
| | | private BigDecimal activityPayMoneyTotal; |
| | | |
| | | @ApiModelProperty("活动订单未付金额总数") |
| | | @ApiModelProperty(value="活动订单未付金额总数") |
| | | private BigDecimal activityUnPayMoneyTotal; |
| | | } |
| | |
| | | @Data |
| | | public class MgtShopAllOrderPageVo { |
| | | |
| | | @ApiModelProperty("订单id") |
| | | @ApiModelProperty(value="订单id") |
| | | private String orderId; |
| | | |
| | | @Excel(name = "订单编号", width = 30) |
| | | @ApiModelProperty("订单编号") |
| | | @ApiModelProperty(value="订单编号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | |
| | | @ApiModelProperty(value = "客户信息") |
| | | private String userInfo; |
| | | |
| | | @ApiModelProperty("订单商品列表") |
| | | @ApiModelProperty(value="订单商品列表") |
| | | private List<MgtOrderGoodsPageVo> mgtOrderGoodsPageVoList; |
| | | |
| | | @Excel(name = "商品信息", width = 30) |
| | | @ApiModelProperty("商品信息") |
| | | @ApiModelProperty(value="商品信息") |
| | | private String goodsInfo; |
| | | |
| | | @Excel(name = "订单金额", width = 30) |
| | | @ApiModelProperty("订单金额") |
| | | @ApiModelProperty(value="订单金额") |
| | | private BigDecimal orderMoney; |
| | | |
| | | @Excel(name = "优惠金额", width = 30) |
| | | @ApiModelProperty("优惠金额") |
| | | @ApiModelProperty(value="优惠金额") |
| | | private BigDecimal discountMoney; |
| | | |
| | | @Excel(name = "应付金额", width = 30) |
| | | @ApiModelProperty("应付金额") |
| | | @ApiModelProperty(value="应付金额") |
| | | private BigDecimal receivableMoney; |
| | | |
| | | @Excel(name = "订单实际支付金额", width = 30) |
| | | @ApiModelProperty("订单实际支付金额") |
| | | @ApiModelProperty(value="订单实际支付金额") |
| | | private BigDecimal payMoney; |
| | | |
| | | @Excel(name = "订单来源", width = 30) |
| | | @ApiModelProperty("订单来源") |
| | | @ApiModelProperty(value="订单来源") |
| | | private String orderFrom; |
| | | |
| | | } |
| | |
| | | @Data |
| | | public class MgtShopOrderPageVo { |
| | | |
| | | @ApiModelProperty("订单id") |
| | | @ApiModelProperty(value="订单id") |
| | | private String orderId; |
| | | |
| | | @Excel(name = "订单编号", width = 30) |
| | | @ApiModelProperty("订单编号") |
| | | @ApiModelProperty(value="订单编号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | |
| | | @ApiModelProperty(value = "用户姓名") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty("订单商品列表") |
| | | @ApiModelProperty(value="订单商品列表") |
| | | private List<MgtOrderGoodsPageVo> mgtOrderGoodsPageVoList; |
| | | |
| | | @Excel(name = "商品信息", width = 30) |
| | | @ApiModelProperty("商品信息") |
| | | @ApiModelProperty(value="商品信息") |
| | | private String goodsInfo; |
| | | |
| | | @Excel(name = "订单金额", width = 30) |
| | | @ApiModelProperty("订单金额") |
| | | @ApiModelProperty(value="订单金额") |
| | | private BigDecimal orderMoney; |
| | | |
| | | @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("创建时间") |
| | | @ApiModelProperty(value="创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @Excel(name = "优惠金额", width = 30) |
| | | @ApiModelProperty("优惠金额") |
| | | @ApiModelProperty(value="优惠金额") |
| | | private BigDecimal discountMoney; |
| | | |
| | | @Excel(name = "应付金额", width = 30) |
| | | @ApiModelProperty("应付金额") |
| | | @ApiModelProperty(value="应付金额") |
| | | private BigDecimal receivableMoney; |
| | | |
| | | @Excel(name = "订单实际支付金额", width = 30) |
| | | @ApiModelProperty("订单实际支付金额") |
| | | @ApiModelProperty(value="订单实际支付金额") |
| | | private BigDecimal payMoney; |
| | | |
| | | @Excel(name = "订单未支付金额", width = 30) |
| | | @ApiModelProperty("订单未支付金额") |
| | | @ApiModelProperty(value="订单未支付金额") |
| | | private BigDecimal unPaidMoney; |
| | | |
| | | @Excel(name = "订单来源", width = 30) |
| | | @ApiModelProperty("订单来源") |
| | | @ApiModelProperty(value="订单来源") |
| | | private String orderFrom; |
| | | |
| | | @ApiModelProperty("核销店铺id") |
| | | @ApiModelProperty(value="核销店铺id") |
| | | private Long shopId; |
| | | |
| | | @Excel(name = "核销店铺", width = 30) |
| | | @ApiModelProperty("核销店铺") |
| | | @ApiModelProperty(value="核销店铺") |
| | | private String shopName; |
| | | |
| | | @Excel(name = "核销时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("核销时间") |
| | | @ApiModelProperty(value="核销时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date verifyTime; |
| | | } |
| | |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.utils.uuid.IdUtils; |
| | | import com.ruoyi.common.redis.service.RedisService; |
| | | import com.ruoyi.common.security.utils.CodeFactoryUtil; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.order.domain.dto.*; |
| | |
| | | import com.ruoyi.order.service.order.OrderService; |
| | | import com.ruoyi.order.service.order.UserServiceRecordService; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.constant.SecurityConstant; |
| | | import com.ruoyi.system.api.domain.dto.*; |
| | | import com.ruoyi.system.api.domain.poji.goods.Goods; |
| | | import com.ruoyi.system.api.domain.poji.goods.GoodsFile; |
| | |
| | | |
| | | @Resource |
| | | private UserServiceRecordMapper userServiceRecordMapper; |
| | | |
| | | @Resource |
| | | private RedisService redisService; |
| | | |
| | | /** |
| | | * @description: buyGoods |
| | |
| | | String activityId = appPlaceActivityDto.getActivityId(); |
| | | String goodsId = appPlaceActivityDto.getGoodsId(); |
| | | Integer buyNum = appPlaceActivityDto.getBuyNum(); |
| | | //redis库存控制极简版 |
| | | Integer surpNum = redisService.getCacheObject(SecurityConstant.ACTIVITY_GOODS+"-"+activityId+"-"+goodsId); |
| | | if(surpNum==null||surpNum<buyNum){ |
| | | throw new ServiceException(AppErrorConstant.ACTIVITY_GOODS_NULL); |
| | | }else{ |
| | | redisService.setCacheObject(SecurityConstant.ACTIVITY_GOODS+"-"+activityId+"-"+goodsId,surpNum-buyNum); |
| | | } |
| | | // 定义购买数量,服务数量,商品数量 |
| | | BigDecimal buyNumBig; |
| | | Integer serviceNum; |
| | |
| | | throw new ServiceException(AppErrorConstant.ACTIVITY_END); |
| | | } |
| | | if (activityGoodsGetVo.getAvailableBuyNum() < 1) { |
| | | throw new ServiceException(AppErrorConstant.ACTIVITY_GOODS_NULL); |
| | | } |
| | | if (buyNum < activityGoodsGetVo.getAvailableBuyNum()) { |
| | | throw new ServiceException(AppErrorConstant.ACTIVITY_GOODS_NULL); |
| | | } |
| | | // 创建订单ID和订单号 |
| | |
| | | merVerifyCouponVo.setUserName(member.getNickName()); |
| | | merVerifyCouponVo.setUserMobile(member.getMobile()); |
| | | merVerifyCouponVo.setCouponFrom(verifyCouponGetVo.getCouponFrom()); |
| | | merVerifyCouponVo.setCouponName(verifyCouponGetVo.getMemberCoupon().getCouponName()); |
| | | merVerifyCouponVo.setCreateTime(verifyCouponGetVo.getMemberCoupon().getReceiveTime()); |
| | | // 将goodsList转换为MerCouponGoodsListVo列表,并设置相应属性 |
| | | List<MerCouponGoodsListVo> merCouponGoodsList = goodsList.stream() |
| | | .map(goods -> { |
| | | MerCouponGoodsListVo merCouponGoods = new MerCouponGoodsListVo(); |
| | | merCouponGoods.setGoodsId(goods.getGoodsId()); |
| | | merCouponGoods.setGoodsName(goods.getGoodsName()); |
| | | if (goods.getGoodsType() == 1) { |
| | | merCouponGoods.setGoodsType("周期"); |
| | | } else if (goods.getGoodsType() == 2) { |
| | | merCouponGoods.setGoodsType("服务"); |
| | | } else if (goods.getGoodsType() == 3) { |
| | | merCouponGoods.setGoodsType("体验"); |
| | | } else if (goods.getGoodsType() == 4) { |
| | | merCouponGoods.setGoodsType("单品"); |
| | | } |
| | | // 设置其他属性 |
| | | return merCouponGoods; |
| | | }) |
| | |
| | | consumerGoodsList.add(consumerGoods); |
| | | } |
| | | consumerGoodsService.saveBatchConsumerGoods(consumerGoodsList); |
| | | merVerifyCouponVo.setVerifyStatus(2); |
| | | return merVerifyCouponVo; |
| | | } |
| | | |
| | |
| | | appMemberBindingDto.setUserId(merVerifyPrizeDto.getUserId()); |
| | | remoteMemberService.updateMemberBinding(appMemberBindingDto); |
| | | } |
| | | merVerifyAwardVo.setPrizeId(merVerifyPrizeDto.getPrizeId()); |
| | | merVerifyAwardVo.setVerifyStatus(2); |
| | | return merVerifyAwardVo; |
| | | } |
| | | |
| | |
| | | merVerifyCouponVo.setUserName(member.getNickName()); |
| | | merVerifyCouponVo.setUserMobile(member.getMobile()); |
| | | merVerifyCouponVo.setCouponFrom(verifyCouponGetVo.getCouponFrom()); |
| | | merVerifyCouponVo.setCouponName(verifyCouponGetVo.getMemberCoupon().getCouponName()); |
| | | merVerifyCouponVo.setCreateTime(verifyCouponGetVo.getMemberCoupon().getReceiveTime()); |
| | | // 将goodsList转换为MerCouponGoodsListVo列表,并设置相应属性 |
| | | List<MerCouponGoodsListVo> merCouponGoodsList = goodsList.stream() |
| | | .map(goods -> { |
| | | MerCouponGoodsListVo merCouponGoods = new MerCouponGoodsListVo(); |
| | | merCouponGoods.setGoodsId(goods.getGoodsId()); |
| | | merCouponGoods.setGoodsName(goods.getGoodsName()); |
| | | if (goods.getGoodsType() == 1) { |
| | | merCouponGoods.setGoodsType("周期"); |
| | | } else if (goods.getGoodsType() == 2) { |
| | | merCouponGoods.setGoodsType("服务"); |
| | | } else if (goods.getGoodsType() == 3) { |
| | | merCouponGoods.setGoodsType("体验"); |
| | | } else if (goods.getGoodsType() == 4) { |
| | | merCouponGoods.setGoodsType("单品"); |
| | | } |
| | | // 设置其他属性 |
| | | return merCouponGoods; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | // 设置merVerifyCouponVo的goodsList属性为merCouponGoodsList |
| | | merVerifyCouponVo.setGoodsList(merCouponGoodsList); |
| | | merVerifyCouponVo.setVerifyStatus(1); |
| | | return merVerifyCouponVo; |
| | | } |
| | | |
| | |
| | | break; |
| | | } |
| | | merVerifyAwardVo.setCreateTime(memberGiftRecord.getCreateTime()); |
| | | merVerifyAwardVo.setVerifyStatus(1); |
| | | merVerifyAwardVo.setPrizeId(verifyCode); |
| | | return merVerifyAwardVo; |
| | | } |
| | | |
| | |
| | | IFNULL(SUM(order_money),0) orderMoney, |
| | | IFNULL(SUM(CASE WHEN order_from = 1 THEN order_money ELSE 0 END),0) onlineMoney, |
| | | IFNULL(SUM(CASE WHEN order_from = 3 THEN order_money ELSE 0 END),0) offlineMoney, |
| | | IFNULL(SUM(CASE WHEN order_from = 2 THEN order_money ELSE 0 END),0) activityMoney, |
| | | 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 order_from = 2 THEN order_money ELSE 0 END),0) activityMoney |
| | | FROM t_order WHERE del_flag = 0 |
| | | <if test="param.shopId != null and param.shopId != ''"> |
| | | AND shop_id = #{param.shopId} |
| | |
| | | @ApiModelProperty(value = "任务id") |
| | | private String taskId; |
| | | |
| | | @ApiModelProperty("跟踪类型1电话2手动") |
| | | @ApiModelProperty(value="跟踪类型1电话2手动") |
| | | private Integer followType; |
| | | |
| | | @ApiModelProperty("拨打电话") |
| | | @ApiModelProperty(value="拨打电话") |
| | | private String callPhone; |
| | | |
| | | @ApiModelProperty("电话跟踪内容") |
| | | @ApiModelProperty(value="电话跟踪内容") |
| | | private List<MerFollowPhoneDto> followPhone; |
| | | |
| | | @ApiModelProperty("跟踪内容") |
| | | @ApiModelProperty(value="跟踪内容") |
| | | private String followContent; |
| | | |
| | | @ApiModelProperty("跟进图片地址 多个,号隔开") |
| | | @ApiModelProperty(value="跟进图片地址 多个,号隔开") |
| | | private String picture; |
| | | |
| | | @ApiModelProperty("跟进视频地址 多个,号隔开") |
| | | @ApiModelProperty(value="跟进视频地址 多个,号隔开") |
| | | private String video; |
| | | |
| | | @ApiModelProperty("跟进音频地址 多个,号隔开") |
| | | @ApiModelProperty(value="跟进音频地址 多个,号隔开") |
| | | private String audio; |
| | | |
| | | @ApiModelProperty("下次任务时间") |
| | | @ApiModelProperty(value="下次任务时间") |
| | | private String nextTaskDate; |
| | | |
| | | @ApiModelProperty("下次任务内容") |
| | | @ApiModelProperty(value="下次任务内容") |
| | | private String nextTaskContent; |
| | | |
| | | |
| | |
| | | @ApiModelProperty(value = "任务id") |
| | | private String taskId; |
| | | |
| | | @ApiModelProperty("跟踪类型1电话2手动") |
| | | @ApiModelProperty(value="跟踪类型1电话2手动") |
| | | private Integer followType; |
| | | |
| | | @ApiModelProperty("拨打电话") |
| | | @ApiModelProperty(value="拨打电话") |
| | | private String callPhone; |
| | | |
| | | @ApiModelProperty("电话跟踪内容") |
| | | @ApiModelProperty(value="电话跟踪内容") |
| | | private List<MerFollowPhoneDto> followPhone; |
| | | |
| | | @ApiModelProperty("手动跟踪内容") |
| | | @ApiModelProperty(value="手动跟踪内容") |
| | | private String followContent; |
| | | |
| | | @ApiModelProperty("跟进图片地址 多个,号隔开") |
| | | @ApiModelProperty(value="跟进图片地址 多个,号隔开") |
| | | private String picture; |
| | | |
| | | @ApiModelProperty("跟进视频地址 多个,号隔开") |
| | | @ApiModelProperty(value="跟进视频地址 多个,号隔开") |
| | | private String video; |
| | | |
| | | @ApiModelProperty("跟进音频地址 多个,号隔开") |
| | | @ApiModelProperty(value="跟进音频地址 多个,号隔开") |
| | | private String audio; |
| | | |
| | | @ApiModelProperty("下次任务时间") |
| | | @ApiModelProperty(value="下次任务时间") |
| | | private String nextTaskDate; |
| | | |
| | | @ApiModelProperty("下次任务内容") |
| | | @ApiModelProperty(value="下次任务内容") |
| | | private String nextTaskContent; |
| | | |
| | | |
| | |
| | | @Data |
| | | public class MerFollowPhoneDto { |
| | | |
| | | @ApiModelProperty("电话时间") |
| | | @ApiModelProperty(value="电话时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00") |
| | | private Date callTime; |
| | | |
| | | @ApiModelProperty("跟踪内容") |
| | | @ApiModelProperty(value="跟踪内容") |
| | | private String followContent; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("合作开始时间") |
| | | @ApiModelProperty(value="合作开始时间") |
| | | private String coopStartTime; |
| | | |
| | | @ApiModelProperty("合作结束时间") |
| | | @ApiModelProperty(value="合作结束时间") |
| | | private String coopEndTime; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "商户id 新增不传") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("商户名称") |
| | | @ApiModelProperty(value="商户名称") |
| | | @NotNull(message = "商户名称不能为空") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty("商户类型1.经销商2.代理商") |
| | | @ApiModelProperty(value="商户类型1.经销商2.代理商") |
| | | @NotNull(message = "商户类型不能为空") |
| | | private Integer shopType; |
| | | |
| | | @ApiModelProperty("商户编号") |
| | | @ApiModelProperty(value="商户编号") |
| | | @NotNull(message = "商户编号不能为空") |
| | | private String shopNumber; |
| | | |
| | | @ApiModelProperty("营业开始时间") |
| | | @ApiModelProperty(value="营业开始时间") |
| | | private String businessStartTime; |
| | | |
| | | @ApiModelProperty("营业结束时间") |
| | | @ApiModelProperty(value="营业结束时间") |
| | | private String businessEndTime; |
| | | |
| | | @ApiModelProperty("店主姓名") |
| | | @ApiModelProperty(value="店主姓名") |
| | | private String shopownerName; |
| | | |
| | | @ApiModelProperty("店主联系方式") |
| | | @ApiModelProperty(value="店主联系方式") |
| | | private String shopownerPhone; |
| | | |
| | | @ApiModelProperty("签约区域") |
| | | @ApiModelProperty(value="签约区域") |
| | | private String signAreaCode; |
| | | |
| | | @ApiModelProperty("商户服务电话") |
| | | @ApiModelProperty(value="商户服务电话") |
| | | private String shopServicePhone; |
| | | |
| | | @ApiModelProperty("管辖员工") |
| | | @ApiModelProperty(value="管辖员工") |
| | | private Long belongUserId; |
| | | |
| | | @ApiModelProperty("所属经销商") |
| | | @ApiModelProperty(value="所属经销商") |
| | | private Long belongShopId; |
| | | |
| | | @ApiModelProperty("扶持能力1.有2.没有") |
| | | @ApiModelProperty(value="扶持能力1.有2.没有") |
| | | private Integer supportingCapacityFlag; |
| | | |
| | | @ApiModelProperty("店面操作人数1.1人2.1人以上") |
| | | @ApiModelProperty(value="店面操作人数1.1人2.1人以上") |
| | | private Integer operationPersonFlag; |
| | | |
| | | @ApiModelProperty("执行力1.强2.弱") |
| | | @ApiModelProperty(value="执行力1.强2.弱") |
| | | private Integer executiveForceFlag; |
| | | |
| | | @ApiModelProperty("格局1.大2.小") |
| | | @ApiModelProperty(value="格局1.大2.小") |
| | | private Integer patternFlag; |
| | | |
| | | @ApiModelProperty("人脉1.宽2.窄") |
| | | @ApiModelProperty(value="人脉1.宽2.窄") |
| | | private Integer connectionFlag; |
| | | |
| | | @ApiModelProperty("经济能力1.强2.差") |
| | | @ApiModelProperty(value="经济能力1.强2.差") |
| | | private Integer economicAbilityFlag; |
| | | |
| | | @ApiModelProperty("与合作商关系1.好2.差") |
| | | @ApiModelProperty(value="与合作商关系1.好2.差") |
| | | private Integer relationPartner; |
| | | |
| | | @ApiModelProperty("曾从事事业") |
| | | @ApiModelProperty(value="曾从事事业") |
| | | private String businessHistory; |
| | | |
| | | @ApiModelProperty("店铺地址省code") |
| | | @ApiModelProperty(value="店铺地址省code") |
| | | private String shopProvinceCode; |
| | | |
| | | @ApiModelProperty("店铺地址市code") |
| | | @ApiModelProperty(value="店铺地址市code") |
| | | private String shopCityCode; |
| | | |
| | | @ApiModelProperty("店铺地址区code") |
| | | @ApiModelProperty(value="店铺地址区code") |
| | | private String shopAreaCode; |
| | | |
| | | @ApiModelProperty("店铺区域全称") |
| | | @ApiModelProperty(value="店铺区域全称") |
| | | private String shopAreaName; |
| | | |
| | | @ApiModelProperty("店铺详细地址") |
| | | @ApiModelProperty(value="店铺详细地址") |
| | | private String shopAddress; |
| | | |
| | | @ApiModelProperty("店铺经度") |
| | | @ApiModelProperty(value="店铺经度") |
| | | private String shopLongitude; |
| | | |
| | | @ApiModelProperty("店铺维度") |
| | | @ApiModelProperty(value="店铺维度") |
| | | private String shopLatitude; |
| | | |
| | | @ApiModelProperty("店铺详情") |
| | | @ApiModelProperty(value="店铺详情") |
| | | private String shopDetail; |
| | | |
| | | @ApiModelProperty("营销功能1开2关") |
| | | @ApiModelProperty(value="营销功能1开2关") |
| | | private Integer marketingFunctionFlag; |
| | | |
| | | @ApiModelProperty("领券1开2关") |
| | | @ApiModelProperty(value="领券1开2关") |
| | | private Integer platformCouponFlag; |
| | | |
| | | @ApiModelProperty("生日卡1开2关") |
| | | @ApiModelProperty(value="生日卡1开2关") |
| | | private Integer platformBirthdayFlag; |
| | | |
| | | @ApiModelProperty("推荐人") |
| | | @ApiModelProperty(value="推荐人") |
| | | private String recommendPerson; |
| | | |
| | | @ApiModelProperty("商户标签id 多个用,隔开") |
| | | @ApiModelProperty(value="商户标签id 多个用,隔开") |
| | | private String shopTagIds; |
| | | |
| | | @ApiModelProperty("关联用户id 多个用,隔开") |
| | | @ApiModelProperty(value="关联用户id 多个用,隔开") |
| | | private String relUserIds; |
| | | |
| | | @ApiModelProperty("商户封面") |
| | | @ApiModelProperty(value="商户封面") |
| | | private String shopPicture; |
| | | |
| | | @ApiModelProperty("商户banner 多个用,隔开") |
| | | @ApiModelProperty(value="商户banner 多个用,隔开") |
| | | private String shopBanners; |
| | | } |
| | |
| | | @Data |
| | | public class MgtEditShopTagDto extends MgtBaseGetDto { |
| | | |
| | | @ApiModelProperty("商户标签id 多个用,隔开") |
| | | @ApiModelProperty(value="商户标签id 多个用,隔开") |
| | | private String shopTagIds; |
| | | |
| | | } |
| | |
| | | @Data |
| | | public class MgtFollowShopTaskDto extends MerBaseDto { |
| | | |
| | | @ApiModelProperty("商户id") |
| | | @ApiModelProperty(value="商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("任务标题") |
| | | @ApiModelProperty(value="任务标题") |
| | | private String taskTitle; |
| | | |
| | | @ApiModelProperty("跟进类型") |
| | | @ApiModelProperty(value="跟进类型") |
| | | private String followType; |
| | | |
| | | @ApiModelProperty("跟进内容") |
| | | @ApiModelProperty(value="跟进内容") |
| | | private String followContent; |
| | | |
| | | @ApiModelProperty("跟进图片地址 多个,号隔开") |
| | | @ApiModelProperty(value="跟进图片地址 多个,号隔开") |
| | | private String picture; |
| | | |
| | | @ApiModelProperty("下次任务时间") |
| | | @ApiModelProperty(value="下次任务时间") |
| | | private String nextTaskDate; |
| | | |
| | | @ApiModelProperty("下次任务标题") |
| | | @ApiModelProperty(value="下次任务标题") |
| | | private String nextTaskTitle; |
| | | |
| | | @ApiModelProperty("紧急程度") |
| | | @ApiModelProperty(value="紧急程度") |
| | | private String emergencyState; |
| | | } |
| | |
| | | @ApiModelProperty(value = "商户名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty("店主姓名") |
| | | @ApiModelProperty(value="店主姓名") |
| | | private String shopownerName; |
| | | |
| | | @ApiModelProperty("店主联系方式") |
| | | @ApiModelProperty(value="店主联系方式") |
| | | private String shopownerPhone; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "商户名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty("店主姓名") |
| | | @ApiModelProperty(value="店主姓名") |
| | | private String shopownerName; |
| | | |
| | | @ApiModelProperty("店主联系方式") |
| | | @ApiModelProperty(value="店主联系方式") |
| | | private String shopownerPhone; |
| | | |
| | | @ApiModelProperty("认证类型1个人2企业") |
| | | @ApiModelProperty(value="认证类型1个人2企业") |
| | | private Integer mainType; |
| | | |
| | | @ApiModelProperty("审核状态0:未提交\n" + |
| | | @ApiModelProperty(value="审核状态0:未提交\n" + |
| | | " 1:CHECKING:资料校验中\n" + |
| | | " 2:ACCOUNT_NEED_VERIFY:待账户验证\n" + |
| | | " 3:AUDITING:审核中\n" + |
| | |
| | | @Data |
| | | public class MgtShopProportionEditDto extends MgtBaseDto { |
| | | |
| | | @ApiModelProperty("分成id") |
| | | @ApiModelProperty(value="分成id") |
| | | private Long proportionId; |
| | | |
| | | @ApiModelProperty(value = "分成比例") |
| | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("合作状态0终止1开启") |
| | | @ApiModelProperty(value="合作状态0终止1开启") |
| | | private Integer cooperativeFlag; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("转移用户id") |
| | | @ApiModelProperty(value="转移用户id") |
| | | private Long transferUserId; |
| | | |
| | | @ApiModelProperty("转移备注") |
| | | @ApiModelProperty(value="转移备注") |
| | | private String transferRemark; |
| | | } |
| | |
| | | @ApiModelProperty(value = "维度") |
| | | private String shopLatitude; |
| | | |
| | | @ApiModelProperty("营业开始时间") |
| | | @ApiModelProperty(value="营业开始时间") |
| | | private String businessStartTime; |
| | | |
| | | @ApiModelProperty("营业结束时间") |
| | | @ApiModelProperty(value="营业结束时间") |
| | | private String businessEndTime; |
| | | |
| | | @ApiModelProperty("商户标签") |
| | | @ApiModelProperty(value="商户标签") |
| | | private String shopTags; |
| | | |
| | | @ApiModelProperty("商户服务电话") |
| | | @ApiModelProperty(value="商户服务电话") |
| | | private String shopServicePhone; |
| | | |
| | | @ApiModelProperty("商户封面") |
| | | @ApiModelProperty(value="商户封面") |
| | | private String shopPicture; |
| | | |
| | | @ApiModelProperty("商户banners") |
| | | @ApiModelProperty(value="商户banners") |
| | | private String shopBanners; |
| | | |
| | | @ApiModelProperty("店铺详情") |
| | | @ApiModelProperty(value="店铺详情") |
| | | private String shopDetail; |
| | | |
| | | @ApiModelProperty("店铺证书") |
| | | @ApiModelProperty(value="店铺证书") |
| | | private List<ShopCertificate> shopCertificateList; |
| | | } |
| | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("商户状态0冻结1正常2终止合作") |
| | | @ApiModelProperty(value="商户状态0冻结1正常2终止合作") |
| | | private Integer shopStatus; |
| | | |
| | | @ApiModelProperty(value = "商户名称") |
| | |
| | | @ApiModelProperty(value = "商户地址") |
| | | private String shopAddress; |
| | | |
| | | @ApiModelProperty("店主姓名") |
| | | @ApiModelProperty(value="店主姓名") |
| | | private String shopownerName; |
| | | |
| | | @ApiModelProperty("店主联系方式") |
| | | @ApiModelProperty(value="店主联系方式") |
| | | private String shopownerPhone; |
| | | |
| | | @ApiModelProperty("合作期限") |
| | | @ApiModelProperty(value="合作期限") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date cooperationEndTime; |
| | | |
| | |
| | | @ApiModelProperty(value = "任务时间") |
| | | private String taskDate; |
| | | |
| | | @ApiModelProperty("任务内容") |
| | | @ApiModelProperty(value="任务内容") |
| | | private String taskContent; |
| | | |
| | | @ApiModelProperty("今日标记") |
| | | @ApiModelProperty(value="今日标记") |
| | | private Integer todayFlag; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "任务时间") |
| | | private String taskDate; |
| | | |
| | | @ApiModelProperty("跟踪类型1电话2手动") |
| | | @ApiModelProperty(value="跟踪类型1电话2手动") |
| | | private Integer followType; |
| | | |
| | | @ApiModelProperty("电话时间") |
| | | @ApiModelProperty(value="电话时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date callTime; |
| | | |
| | | @ApiModelProperty("跟踪内容") |
| | | @ApiModelProperty(value="跟踪内容") |
| | | private String followContent; |
| | | |
| | | @ApiModelProperty("联系人") |
| | | @ApiModelProperty(value="联系人") |
| | | private String callName; |
| | | |
| | | @ApiModelProperty("拨打电话") |
| | | @ApiModelProperty(value="拨打电话") |
| | | private String callPhone; |
| | | |
| | | @ApiModelProperty("跟进图片地址") |
| | | @ApiModelProperty(value="跟进图片地址") |
| | | private List<String> picture; |
| | | |
| | | @ApiModelProperty("跟进视频地址") |
| | | @ApiModelProperty(value="跟进视频地址") |
| | | private List<String> video; |
| | | |
| | | @ApiModelProperty("跟进音频地址") |
| | | @ApiModelProperty(value="跟进音频地址") |
| | | private List<String> audio; |
| | | } |
| | |
| | | @ApiModelProperty(value = "任务时间") |
| | | private String taskDate; |
| | | |
| | | @ApiModelProperty("任务内容") |
| | | @ApiModelProperty(value="任务内容") |
| | | private String taskContent; |
| | | |
| | | @ApiModelProperty("处理内容") |
| | | @ApiModelProperty(value="处理内容") |
| | | private String dealContent; |
| | | |
| | | |
| | | @ApiModelProperty("今日标记") |
| | | @ApiModelProperty(value="今日标记") |
| | | private Integer todayFlag; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "任务时间") |
| | | private String taskDate; |
| | | |
| | | @ApiModelProperty("跟踪类型1电话2手动") |
| | | @ApiModelProperty(value="跟踪类型1电话2手动") |
| | | private Integer followType; |
| | | |
| | | @ApiModelProperty("电话时间") |
| | | @ApiModelProperty(value="电话时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date callTime; |
| | | |
| | | @ApiModelProperty("跟踪内容") |
| | | @ApiModelProperty(value="跟踪内容") |
| | | private String followContent; |
| | | |
| | | @ApiModelProperty("拨打电话") |
| | | @ApiModelProperty(value="拨打电话") |
| | | private String callPhone; |
| | | |
| | | @ApiModelProperty("跟进图片地址") |
| | | @ApiModelProperty(value="跟进图片地址") |
| | | private List<String> picture; |
| | | |
| | | @ApiModelProperty("跟进视频地址") |
| | | @ApiModelProperty(value="跟进视频地址") |
| | | private List<String> video; |
| | | |
| | | @ApiModelProperty("跟进音频地址") |
| | | @ApiModelProperty(value="跟进音频地址") |
| | | private List<String> audio; |
| | | } |
| | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("商户名称") |
| | | @ApiModelProperty(value="商户名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty("商户类型1.经销商2.代理商") |
| | | @ApiModelProperty(value="商户类型1.经销商2.代理商") |
| | | private Integer shopType; |
| | | |
| | | @ApiModelProperty("营业开始时间") |
| | | @ApiModelProperty(value="营业开始时间") |
| | | private String businessStartTime; |
| | | |
| | | @ApiModelProperty("营业结束时间") |
| | | @ApiModelProperty(value="营业结束时间") |
| | | private String businessEndTime; |
| | | |
| | | @ApiModelProperty("店主姓名") |
| | | @ApiModelProperty(value="店主姓名") |
| | | private String shopownerName; |
| | | |
| | | @ApiModelProperty("店主联系方式") |
| | | @ApiModelProperty(value="店主联系方式") |
| | | private String shopownerPhone; |
| | | |
| | | @ApiModelProperty("签约区域") |
| | | @ApiModelProperty(value="签约区域") |
| | | private String signAreaCode; |
| | | |
| | | @ApiModelProperty("商户服务电话") |
| | | @ApiModelProperty(value="商户服务电话") |
| | | private String shopServicePhone; |
| | | |
| | | @ApiModelProperty("管辖员工") |
| | | @ApiModelProperty(value="管辖员工") |
| | | private Long belongUserId; |
| | | |
| | | @ApiModelProperty("所属经销商") |
| | | @ApiModelProperty(value="所属经销商") |
| | | private Long belongShopId; |
| | | |
| | | @ApiModelProperty("扶持能力1.有2.没有") |
| | | @ApiModelProperty(value="扶持能力1.有2.没有") |
| | | private Integer supportingCapacityFlag; |
| | | |
| | | @ApiModelProperty("店面操作人数1.1人2.1人以上") |
| | | @ApiModelProperty(value="店面操作人数1.1人2.1人以上") |
| | | private Integer operationPersonFlag; |
| | | |
| | | @ApiModelProperty("执行力1.强2.弱") |
| | | @ApiModelProperty(value="执行力1.强2.弱") |
| | | private Integer executiveForceFlag; |
| | | |
| | | @ApiModelProperty("格局1.大2.小") |
| | | @ApiModelProperty(value="格局1.大2.小") |
| | | private Integer patternFlag; |
| | | |
| | | @ApiModelProperty("人脉1.宽2.窄") |
| | | @ApiModelProperty(value="人脉1.宽2.窄") |
| | | private Integer connectionFlag; |
| | | |
| | | @ApiModelProperty("经济能力1.强2.差") |
| | | @ApiModelProperty(value="经济能力1.强2.差") |
| | | private Integer economicAbilityFlag; |
| | | |
| | | @ApiModelProperty("与合作商关系1.好2.差") |
| | | @ApiModelProperty(value="与合作商关系1.好2.差") |
| | | private Integer relationPartner; |
| | | |
| | | @ApiModelProperty("曾从事事业") |
| | | @ApiModelProperty(value="曾从事事业") |
| | | private String businessHistory; |
| | | |
| | | @ApiModelProperty("店铺地址省code") |
| | | @ApiModelProperty(value="店铺地址省code") |
| | | private String shopProvinceCode; |
| | | |
| | | @ApiModelProperty("店铺地址市code") |
| | | @ApiModelProperty(value="店铺地址市code") |
| | | private String shopCityCode; |
| | | |
| | | @ApiModelProperty("店铺地址区code") |
| | | @ApiModelProperty(value="店铺地址区code") |
| | | private String shopAreaCode; |
| | | |
| | | @ApiModelProperty("店铺区域全称") |
| | | @ApiModelProperty(value="店铺区域全称") |
| | | private String shopAreaName; |
| | | |
| | | @ApiModelProperty("店铺详细地址") |
| | | @ApiModelProperty(value="店铺详细地址") |
| | | private String shopAddress; |
| | | |
| | | @ApiModelProperty("店铺经度") |
| | | @ApiModelProperty(value="店铺经度") |
| | | private String shopLongitude; |
| | | |
| | | @ApiModelProperty("店铺维度") |
| | | @ApiModelProperty(value="店铺维度") |
| | | private String shopLatitude; |
| | | |
| | | @ApiModelProperty("店铺详情") |
| | | @ApiModelProperty(value="店铺详情") |
| | | private String shopDetail; |
| | | |
| | | @ApiModelProperty("营销功能1开2关") |
| | | @ApiModelProperty(value="营销功能1开2关") |
| | | private Integer marketingFunctionFlag; |
| | | |
| | | @ApiModelProperty("领券1开2关") |
| | | @ApiModelProperty(value="领券1开2关") |
| | | private Integer platformCouponFlag; |
| | | |
| | | @ApiModelProperty("生日卡1开2关") |
| | | @ApiModelProperty(value="生日卡1开2关") |
| | | private Integer platformBirthdayFlag; |
| | | |
| | | @ApiModelProperty("推荐人") |
| | | @ApiModelProperty(value="推荐人") |
| | | private String recommendPerson; |
| | | |
| | | @ApiModelProperty("商户标签id 多个用,隔开") |
| | | @ApiModelProperty(value="商户标签id 多个用,隔开") |
| | | private String shopTagIds; |
| | | |
| | | @ApiModelProperty("商户标签") |
| | | @ApiModelProperty(value="商户标签") |
| | | private String shopTags; |
| | | |
| | | @ApiModelProperty("关联用户id 多个用,隔开") |
| | | @ApiModelProperty(value="关联用户id 多个用,隔开") |
| | | private String relUserIds; |
| | | |
| | | @ApiModelProperty("关联用户") |
| | | @ApiModelProperty(value="关联用户") |
| | | private String relUsers; |
| | | |
| | | @ApiModelProperty("商户封面") |
| | | @ApiModelProperty(value="商户封面") |
| | | private String shopPicture; |
| | | |
| | | @ApiModelProperty("商户banner 多个用,隔开") |
| | | @ApiModelProperty(value="商户banner 多个用,隔开") |
| | | private String shopBanners; |
| | | |
| | | @ApiModelProperty("证书list") |
| | | @ApiModelProperty(value="证书list") |
| | | private List<ShopCertificate> shopCertificateList; |
| | | |
| | | |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("跟踪类型1电话2手动") |
| | | @ApiModelProperty(value="跟踪类型1电话2手动") |
| | | private Integer followType; |
| | | |
| | | @ApiModelProperty("电话时间") |
| | | @ApiModelProperty(value="电话时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date callTime; |
| | | |
| | | @ApiModelProperty("跟踪内容") |
| | | @ApiModelProperty(value="跟踪内容") |
| | | private String followContent; |
| | | |
| | | @ApiModelProperty("拨打电话") |
| | | @ApiModelProperty(value="拨打电话") |
| | | private String callPhone; |
| | | |
| | | @ApiModelProperty("跟进图片地址") |
| | | @ApiModelProperty(value="跟进图片地址") |
| | | private List<String> picture; |
| | | |
| | | @ApiModelProperty("跟进视频地址") |
| | | @ApiModelProperty(value="跟进视频地址") |
| | | private List<String> video; |
| | | |
| | | @ApiModelProperty("跟进音频地址") |
| | | @ApiModelProperty(value="跟进音频地址") |
| | | private List<String> audio; |
| | | } |
| | |
| | | @ApiModelProperty(value = "任务时间") |
| | | private String taskDate; |
| | | |
| | | @ApiModelProperty("跟踪类型1电话2手动") |
| | | @ApiModelProperty(value="跟踪类型1电话2手动") |
| | | private Integer followType; |
| | | |
| | | @ApiModelProperty("电话时间") |
| | | @ApiModelProperty(value="电话时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date callTime; |
| | | |
| | | @ApiModelProperty("跟踪内容") |
| | | @ApiModelProperty(value="跟踪内容") |
| | | private String followContent; |
| | | |
| | | @ApiModelProperty("拨打电话") |
| | | @ApiModelProperty(value="拨打电话") |
| | | private String callPhone; |
| | | |
| | | @ApiModelProperty("跟进图片地址") |
| | | @ApiModelProperty(value="跟进图片地址") |
| | | private List<String> picture; |
| | | |
| | | @ApiModelProperty("跟进视频地址") |
| | | @ApiModelProperty(value="跟进视频地址") |
| | | private List<String> video; |
| | | |
| | | @ApiModelProperty("跟进音频地址") |
| | | @ApiModelProperty(value="跟进音频地址") |
| | | private List<String> audio; |
| | | } |
| | |
| | | @ApiModelProperty(value = "商户名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty("店主姓名") |
| | | @ApiModelProperty(value="店主姓名") |
| | | private String shopownerName; |
| | | |
| | | @ApiModelProperty("店主联系方式") |
| | | @ApiModelProperty(value="店主联系方式") |
| | | private String shopownerPhone; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "商户名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty("店主姓名") |
| | | @ApiModelProperty(value="店主姓名") |
| | | private String shopownerName; |
| | | |
| | | @ApiModelProperty("店主联系方式") |
| | | @ApiModelProperty(value="店主联系方式") |
| | | private String shopownerPhone; |
| | | |
| | | @ApiModelProperty("认证类型") |
| | | @ApiModelProperty(value="认证类型") |
| | | private String mainType; |
| | | |
| | | @ApiModelProperty("审核状态") |
| | | @ApiModelProperty(value="审核状态") |
| | | private Integer auditStatus; |
| | | |
| | | @ApiModelProperty("审核状态描述") |
| | | @ApiModelProperty(value="审核状态描述") |
| | | private String auditStatusDesc; |
| | | } |
| | |
| | | @ApiModelProperty(value = "商户名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty("店主姓名") |
| | | @ApiModelProperty(value="店主姓名") |
| | | private String shopownerName; |
| | | |
| | | @ApiModelProperty("店主联系方式") |
| | | @ApiModelProperty(value="店主联系方式") |
| | | private String shopownerPhone; |
| | | } |
| | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("商户名称") |
| | | @ApiModelProperty(value="商户名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty("商户类型1.经销商2.代理商") |
| | | @ApiModelProperty(value="商户类型1.经销商2.代理商") |
| | | private Integer shopType; |
| | | |
| | | @ApiModelProperty("营业开始时间") |
| | | @ApiModelProperty(value="营业开始时间") |
| | | private String businessStartTime; |
| | | |
| | | @ApiModelProperty("营业结束时间") |
| | | @ApiModelProperty(value="营业结束时间") |
| | | private String businessEndTime; |
| | | |
| | | @ApiModelProperty("店主姓名") |
| | | @ApiModelProperty(value="店主姓名") |
| | | private String shopownerName; |
| | | |
| | | @ApiModelProperty("店主联系方式") |
| | | @ApiModelProperty(value="店主联系方式") |
| | | private String shopownerPhone; |
| | | |
| | | @ApiModelProperty("签约区域") |
| | | @ApiModelProperty(value="签约区域") |
| | | private String signAreaCode; |
| | | |
| | | @ApiModelProperty("商户服务电话") |
| | | @ApiModelProperty(value="商户服务电话") |
| | | private String shopServicePhone; |
| | | |
| | | @ApiModelProperty("管辖员工") |
| | | @ApiModelProperty(value="管辖员工") |
| | | private Long belongUserId; |
| | | |
| | | @ApiModelProperty("所属经销商") |
| | | @ApiModelProperty(value="所属经销商") |
| | | private Long belongShopId; |
| | | |
| | | @ApiModelProperty("扶持能力1.有2.没有") |
| | | @ApiModelProperty(value="扶持能力1.有2.没有") |
| | | private Integer supportingCapacityFlag; |
| | | |
| | | @ApiModelProperty("店面操作人数1.1人2.1人以上") |
| | | @ApiModelProperty(value="店面操作人数1.1人2.1人以上") |
| | | private Integer operationPersonFlag; |
| | | |
| | | @ApiModelProperty("执行力1.强2.弱") |
| | | @ApiModelProperty(value="执行力1.强2.弱") |
| | | private Integer executiveForceFlag; |
| | | |
| | | @ApiModelProperty("格局1.大2.小") |
| | | @ApiModelProperty(value="格局1.大2.小") |
| | | private Integer patternFlag; |
| | | |
| | | @ApiModelProperty("人脉1.宽2.窄") |
| | | @ApiModelProperty(value="人脉1.宽2.窄") |
| | | private Integer connectionFlag; |
| | | |
| | | @ApiModelProperty("经济能力1.强2.差") |
| | | @ApiModelProperty(value="经济能力1.强2.差") |
| | | private Integer economicAbilityFlag; |
| | | |
| | | @ApiModelProperty("与合作商关系1.好2.差") |
| | | @ApiModelProperty(value="与合作商关系1.好2.差") |
| | | private Integer relationPartner; |
| | | |
| | | @ApiModelProperty("曾从事事业") |
| | | @ApiModelProperty(value="曾从事事业") |
| | | private String businessHistory; |
| | | |
| | | @ApiModelProperty("店铺地址省code") |
| | | @ApiModelProperty(value="店铺地址省code") |
| | | private String shopProvinceCode; |
| | | |
| | | @ApiModelProperty("店铺地址市code") |
| | | @ApiModelProperty(value="店铺地址市code") |
| | | private String shopCityCode; |
| | | |
| | | @ApiModelProperty("店铺地址区code") |
| | | @ApiModelProperty(value="店铺地址区code") |
| | | private String shopAreaCode; |
| | | |
| | | @ApiModelProperty("店铺区域全称") |
| | | @ApiModelProperty(value="店铺区域全称") |
| | | private String shopAreaName; |
| | | |
| | | @ApiModelProperty("店铺详细地址") |
| | | @ApiModelProperty(value="店铺详细地址") |
| | | private String shopAddress; |
| | | |
| | | @ApiModelProperty("店铺经度") |
| | | @ApiModelProperty(value="店铺经度") |
| | | private String shopLongitude; |
| | | |
| | | @ApiModelProperty("店铺维度") |
| | | @ApiModelProperty(value="店铺维度") |
| | | private String shopLatitude; |
| | | |
| | | @ApiModelProperty("店铺详情") |
| | | @ApiModelProperty(value="店铺详情") |
| | | private String shopDetail; |
| | | |
| | | @ApiModelProperty("营销功能1开2关") |
| | | @ApiModelProperty(value="营销功能1开2关") |
| | | private Integer marketingFunctionFlag; |
| | | |
| | | @ApiModelProperty("领券1开2关") |
| | | @ApiModelProperty(value="领券1开2关") |
| | | private Integer platformCouponFlag; |
| | | |
| | | @ApiModelProperty("生日卡1开2关") |
| | | @ApiModelProperty(value="生日卡1开2关") |
| | | private Integer platformBirthdayFlag; |
| | | |
| | | @ApiModelProperty("推荐人") |
| | | @ApiModelProperty(value="推荐人") |
| | | private String recommendPerson; |
| | | |
| | | @ApiModelProperty("商户标签id 多个用,隔开") |
| | | @ApiModelProperty(value="商户标签id 多个用,隔开") |
| | | private String shopTagIds; |
| | | |
| | | @ApiModelProperty("商户标签") |
| | | @ApiModelProperty(value="商户标签") |
| | | private String shopTags; |
| | | |
| | | @ApiModelProperty("关联用户id 多个用,隔开") |
| | | @ApiModelProperty(value="关联用户id 多个用,隔开") |
| | | private String relUserIds; |
| | | |
| | | @ApiModelProperty("关联用户") |
| | | @ApiModelProperty(value="关联用户") |
| | | private String relUsers; |
| | | |
| | | @ApiModelProperty("商户封面") |
| | | @ApiModelProperty(value="商户封面") |
| | | private String shopPicture; |
| | | |
| | | @ApiModelProperty("商户banner 多个用,隔开") |
| | | @ApiModelProperty(value="商户banner 多个用,隔开") |
| | | private String shopBanners; |
| | | |
| | | @ApiModelProperty("证书list") |
| | | @ApiModelProperty(value="证书list") |
| | | private List<ShopCertificate> shopCertificateList; |
| | | |
| | | |
| | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("商户名称") |
| | | @ApiModelProperty(value="商户名称") |
| | | private String shopName; |
| | | |
| | | } |
| | |
| | | private Long shopId; |
| | | |
| | | @Excel(name = "签约时间", width = 30) |
| | | @ApiModelProperty("签约时间") |
| | | @ApiModelProperty(value="签约时间") |
| | | private String signTime; |
| | | |
| | | @Excel(name = "商户名称", width = 30) |
| | | @ApiModelProperty("商户名称") |
| | | @ApiModelProperty(value="商户名称") |
| | | private String shopName; |
| | | |
| | | @Excel(name = "商户编号", width = 30) |
| | | @ApiModelProperty("商户编号") |
| | | @ApiModelProperty(value="商户编号") |
| | | private String shopNumber; |
| | | |
| | | @Excel(name = "商户标签", width = 30) |
| | | @ApiModelProperty("商户标签") |
| | | @ApiModelProperty(value="商户标签") |
| | | private String shopTags; |
| | | |
| | | @ApiModelProperty("签约人id") |
| | | @ApiModelProperty(value="签约人id") |
| | | private Long signUserId; |
| | | |
| | | @Excel(name = "签约员工", width = 30) |
| | | @ApiModelProperty("签约员工") |
| | | @ApiModelProperty(value="签约员工") |
| | | private String signUser; |
| | | |
| | | @Excel(name = "首提金额", width = 30) |
| | | @ApiModelProperty("首提金额") |
| | | @ApiModelProperty(value="首提金额") |
| | | private BigDecimal firstWithdraw; |
| | | |
| | | @ApiModelProperty("关联员工id") |
| | | @ApiModelProperty(value="关联员工id") |
| | | private Long belongUserId; |
| | | |
| | | @Excel(name = "关联员工", width = 30) |
| | | @ApiModelProperty("关联员工") |
| | | @ApiModelProperty(value="关联员工") |
| | | private String belongUser; |
| | | |
| | | @Excel(name = "关联部门", width = 30) |
| | | @ApiModelProperty("关联部门") |
| | | @ApiModelProperty(value="关联部门") |
| | | private String belongDept; |
| | | |
| | | @Excel(name = "来源渠道", width = 30) |
| | | @ApiModelProperty("来源渠道") |
| | | @ApiModelProperty(value="来源渠道") |
| | | private String shopSource; |
| | | |
| | | @Excel(name = "签约区域", width = 30) |
| | | @ApiModelProperty("签约区域") |
| | | @ApiModelProperty(value="签约区域") |
| | | private String signAreaName; |
| | | |
| | | @Excel(name = "合作期限", width = 30) |
| | | @ApiModelProperty("合作期限") |
| | | @ApiModelProperty(value="合作期限") |
| | | private String cooperationTime; |
| | | |
| | | @Excel(name = "店铺地址", width = 30) |
| | | @ApiModelProperty("店铺地址") |
| | | @ApiModelProperty(value="店铺地址") |
| | | private String shopAddress; |
| | | |
| | | @Excel(name = "店主姓名", width = 30) |
| | | @ApiModelProperty("店主姓名") |
| | | @ApiModelProperty(value="店主姓名") |
| | | private String shopownerName; |
| | | |
| | | @Excel(name = "店主联系方式", width = 30) |
| | | @ApiModelProperty("店主联系方式") |
| | | @ApiModelProperty(value="店主联系方式") |
| | | private String shopownerPhone; |
| | | |
| | | @Excel(name = "商户状态", width = 30) |
| | | @ApiModelProperty("商户状态-1删除0冻结1正常2终止合作") |
| | | @ApiModelProperty(value="商户状态-1删除0冻结1正常2终止合作") |
| | | private String shopStatus; |
| | | |
| | | @Excel(name = "商户活动次数", width = 30) |
| | | @ApiModelProperty("商户活动次数") |
| | | @ApiModelProperty(value="商户活动次数") |
| | | private Integer shopActivityCount; |
| | | |
| | | @Excel(name = "店铺设置状态", width = 30) |
| | | @ApiModelProperty("店铺设置状态") |
| | | @ApiModelProperty(value="店铺设置状态") |
| | | private String shopCustomStatus; |
| | | } |
| | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("商户名称") |
| | | @ApiModelProperty(value="商户名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty("店铺地址") |
| | | @ApiModelProperty(value="店铺地址") |
| | | private String shopAddress; |
| | | |
| | | @ApiModelProperty("店主姓名") |
| | | @ApiModelProperty(value="店主姓名") |
| | | private String shopownerName; |
| | | |
| | | @ApiModelProperty(value = "分成比例") |
| | |
| | | private String shopType; |
| | | |
| | | @Excel(name = "店主姓名", width = 30) |
| | | @ApiModelProperty("店主姓名") |
| | | @ApiModelProperty(value="店主姓名") |
| | | private String shopownerName; |
| | | |
| | | @Excel(name = "店主联系方式", width = 30) |
| | | @ApiModelProperty("店主联系方式") |
| | | @ApiModelProperty(value="店主联系方式") |
| | | private String shopownerPhone; |
| | | |
| | | @Excel(name = "建议内容", width = 30) |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("跟踪类型1电话2手动") |
| | | @ApiModelProperty(value="跟踪类型1电话2手动") |
| | | private String followType; |
| | | |
| | | @ApiModelProperty("电话时间") |
| | | @ApiModelProperty(value="电话时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date callTime; |
| | | |
| | | @ApiModelProperty("跟踪内容") |
| | | @ApiModelProperty(value="跟踪内容") |
| | | private String followContent; |
| | | |
| | | @ApiModelProperty("拨打电话") |
| | | @ApiModelProperty(value="拨打电话") |
| | | private String callPhone; |
| | | |
| | | @ApiModelProperty("跟进图片地址") |
| | | @ApiModelProperty(value="跟进图片地址") |
| | | private List<String> picture; |
| | | |
| | | @ApiModelProperty("跟进视频地址") |
| | | @ApiModelProperty(value="跟进视频地址") |
| | | private List<String> video; |
| | | |
| | | @ApiModelProperty("跟进音频地址") |
| | | @ApiModelProperty(value="跟进音频地址") |
| | | private List<String> audio; |
| | | } |
| | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("商户名称") |
| | | @ApiModelProperty(value="商户名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty("店铺区域全称") |
| | | @ApiModelProperty(value="店铺区域全称") |
| | | private String shopAreaName; |
| | | |
| | | @ApiModelProperty("店铺详细地址") |
| | | @ApiModelProperty(value="店铺详细地址") |
| | | private String shopAddress; |
| | | |
| | | @ApiModelProperty("店主姓名") |
| | | @ApiModelProperty(value="店主姓名") |
| | | private String shopownerName; |
| | | |
| | | @ApiModelProperty("联系电话") |
| | | @ApiModelProperty(value="联系电话") |
| | | private String shopownerPhone; |
| | | |
| | | @ApiModelProperty("合作期限") |
| | | @ApiModelProperty(value="合作期限") |
| | | private Date cooperationEndTime; |
| | | |
| | | @ApiModelProperty("所属经销商") |
| | | @ApiModelProperty(value="所属经销商") |
| | | private String belongShopName; |
| | | } |
| | |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseBathDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtUserIdByDept; |
| | | import com.ruoyi.system.api.domain.poji.config.Activeness; |
| | | import com.ruoyi.system.api.domain.poji.config.DelayTask; |
| | | import com.ruoyi.system.api.domain.poji.config.SysClassification; |
| | | import com.ruoyi.system.api.domain.poji.config.SysTag; |
| | | import com.ruoyi.system.api.domain.vo.AppOtherConfigGetVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtSysSimpleUserVo; |
| | | import com.ruoyi.system.service.config.ActivenessService; |
| | | import com.ruoyi.system.service.config.SysClassificationService; |
| | | import com.ruoyi.system.service.config.SysTagService; |
| | | import com.ruoyi.system.service.config.*; |
| | | import com.ruoyi.system.service.sys.ISysUserService; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | @Resource |
| | | private ISysUserService sysUserService; |
| | | |
| | | @Resource |
| | | private DelayTaskService delayTaskService; |
| | | |
| | | @Resource |
| | | private CustomConfigService customConfigService; |
| | | |
| | | /** |
| | | * 获取系统标签 |
| | |
| | | return R.ok(activeness); |
| | | } |
| | | |
| | | @PostMapping("/getDelayTask") |
| | | public R<DelayTask> getDelayTask(@RequestBody String key) |
| | | { |
| | | DelayTask delayTask = delayTaskService.getDelayTask(key); |
| | | return R.ok(delayTask); |
| | | } |
| | | |
| | | @PostMapping("/addDelayTask") |
| | | public R addDelayTask(@RequestBody DelayTask delayTask) |
| | | { |
| | | delayTaskService.addDelayTask(delayTask); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("/deleteDelayTask") |
| | | public R deleteDelayTask(@RequestBody String key) |
| | | { |
| | | delayTaskService.deleteDelayTask(key); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * @description 获取其他设置 |
| | | * @author jqs |
| | | * @date 2023/7/12 15:27 |
| | | * @param |
| | | * @return R<AppOtherConfigGetVo> |
| | | */ |
| | | @PostMapping("/getAppOtherConfigGetVo") |
| | | public R<AppOtherConfigGetVo> getAppOtherConfigGetVo() |
| | | { |
| | | AppOtherConfigGetVo appOtherConfigGetVo = customConfigService.getAppOtherConfigGetVo(); |
| | | return R.ok(appOtherConfigGetVo); |
| | | } |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "部门名称") |
| | | private String deptName; |
| | | @Excel(name = "手机号", width = 30) |
| | | @ApiModelProperty("手机号") |
| | | @ApiModelProperty(value="手机号") |
| | | private String mobile; |
| | | @Excel(name = "建议内容", width = 30) |
| | | @ApiModelProperty(value = "建议内容") |
| | |
| | | |
| | | import com.ruoyi.common.core.utils.DateUtils; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.system.api.constant.DelayTaskEnum; |
| | | import com.ruoyi.system.api.service.RemoteConfigService; |
| | | import com.ruoyi.system.api.service.RemoteCouponService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.data.redis.connection.Message; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | |
| | | |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | private RemoteConfigService remoteConfigService; |
| | | |
| | | private RemoteCouponService remoteCouponService; |
| | | |
| | | public RedisListener(RedisMessageListenerContainer listenerContainer, |
| | | RedisTemplate redisTemplate) { |
| | |
| | | if(expiredKey.contains("-")){ |
| | | String[] split = expiredKey.split("-"); |
| | | String operation=split[0]; |
| | | |
| | | if(DelayTaskEnum.COUPON_SEND_DELAY_TASK.getCode().equals(operation)){ |
| | | //自动关闭订单 |
| | | autoTimeSendCoupon(split[1]); |
| | | } |
| | | //删除失效的key |
| | | redisTemplate.delete(expiredKey); |
| | | } |
| | |
| | | } |
| | | |
| | | //延时任务表 |
| | | |
| | | |
| | | //自动定时发送优惠券 |
| | | private void autoTimeSendCoupon(String couponId){ |
| | | log.info("autoTimeSendCoupon scheduler task is running :" + couponId); |
| | | remoteCouponService.autoTimeSendCoupon(couponId); |
| | | //删除定时任务 |
| | | remoteConfigService.deleteDelayTask(DelayTaskEnum.COUPON_SEND_DELAY_TASK.getCode()+"-"+couponId); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper.config; |
| | | |
| | | import com.ruoyi.system.domain.pojo.config.DelayTask; |
| | | import com.ruoyi.system.api.domain.poji.config.DelayTask; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.system.api.domain.vo.AppOtherConfigGetVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtBulletinBoardVo; |
| | | import com.ruoyi.system.domain.dto.*; |
| | | import com.ruoyi.system.domain.pojo.config.CustomConfig; |
| | |
| | | */ |
| | | MgtBulletinBoardVo getBulletinBoard(); |
| | | |
| | | /** |
| | | * @description 获取其他设置 |
| | | * @author jqs |
| | | * @date 2023/7/12 15:28 |
| | | * @param |
| | | * @return AppOtherConfigGetVo |
| | | */ |
| | | AppOtherConfigGetVo getAppOtherConfigGetVo(); |
| | | |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.service.config; |
| | | |
| | | import com.ruoyi.system.domain.pojo.config.DelayTask; |
| | | import com.ruoyi.system.api.domain.poji.config.DelayTask; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | ; |
| | | |
| | |
| | | */ |
| | | public interface DelayTaskService extends IService<DelayTask> { |
| | | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/7/12 11:39 |
| | | * @param key |
| | | * @return DelayTask |
| | | */ |
| | | DelayTask getDelayTask(String key); |
| | | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/7/12 11:37 |
| | | * @param delayTask |
| | | * @return void |
| | | */ |
| | | void addDelayTask(DelayTask delayTask); |
| | | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/7/12 11:39 |
| | | * @param key |
| | | * @return DelayTask |
| | | */ |
| | | void deleteDelayTask(String key); |
| | | } |
| | |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.system.api.constant.ConfigEnum; |
| | | import com.ruoyi.system.api.domain.poji.config.Activeness; |
| | | import com.ruoyi.system.api.domain.vo.AppOtherConfigGetVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtBulletinBoardVo; |
| | | import com.ruoyi.system.api.service.RemoteActivityService; |
| | | import com.ruoyi.system.api.service.RemoteMemberService; |
| | |
| | | return mgtBulletinBoardVo; |
| | | } |
| | | |
| | | /** |
| | | * @description 获取其他设置 |
| | | * @author jqs |
| | | * @date 2023/7/12 15:28 |
| | | * @param |
| | | * @return AppOtherConfigGetVo |
| | | */ |
| | | @Override |
| | | public AppOtherConfigGetVo getAppOtherConfigGetVo(){ |
| | | AppOtherConfigGetVo appOtherConfigGetVo = new AppOtherConfigGetVo(); |
| | | //获取自定义配置 |
| | | List<CustomConfig> customConfigList = customConfigMapper.selectList(new LambdaQueryWrapper<CustomConfig>().eq(CustomConfig::getDelFlag, 0)); |
| | | Optional.ofNullable(customConfigList).ifPresent(list -> { |
| | | Map<String, CustomConfig> configMap = list.stream().collect(Collectors.toMap(CustomConfig::getConfigKey, Function.identity())); |
| | | // 遍历配置映射,设置相应的属性值 |
| | | configMap.forEach((key, value) -> { |
| | | switch (key) { |
| | | case "SHARE_INTEGRAL": |
| | | appOtherConfigGetVo.setShareIntegral(Integer.valueOf(value.getConfigValue())); |
| | | break; |
| | | case "SUGGEST_PLATFORM_INTEGRAL": |
| | | appOtherConfigGetVo.setSuggestPlatformIntegral(Integer.valueOf(value.getConfigValue())); |
| | | break; |
| | | case "SIGN_IN_INTEGRAL": |
| | | appOtherConfigGetVo.setSignInIntegral(Integer.valueOf(value.getConfigValue())); |
| | | break; |
| | | case "SUGGEST_SHOP_INTEGRAL": |
| | | appOtherConfigGetVo.setSuggestShopIntegral(Integer.valueOf(value.getConfigValue())); |
| | | break; |
| | | case "PAY_MONEY_INTEGRAL": |
| | | appOtherConfigGetVo.setPayMoneyIntegral(Integer.valueOf(value.getConfigValue())); |
| | | break; |
| | | case "ORDER_AUTO_CANCEL_TIME": |
| | | appOtherConfigGetVo.setOrderAutoCancelTime(Integer.valueOf(value.getConfigValue())); |
| | | break; |
| | | case "HOME_STYLE": |
| | | appOtherConfigGetVo.setHomeStyle(Integer.valueOf(value.getConfigValue())); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | }); |
| | | }); |
| | | return appOtherConfigGetVo; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl.config; |
| | | |
| | | import com.ruoyi.system.domain.pojo.config.DelayTask; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.ruoyi.system.api.domain.poji.config.DelayTask; |
| | | import com.ruoyi.system.mapper.config.DelayTaskMapper; |
| | | import com.ruoyi.system.service.config.DelayTaskService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | @Service |
| | | public class DelayTaskServiceImpl extends ServiceImpl<DelayTaskMapper, DelayTask> implements DelayTaskService { |
| | | |
| | | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/7/12 11:38 |
| | | * @param key |
| | | * @return DelayTask |
| | | */ |
| | | @Override |
| | | public DelayTask getDelayTask(String key){ |
| | | LambdaQueryWrapper<DelayTask> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(DelayTask::getDelFlag,0); |
| | | queryWrapper.eq(DelayTask::getRedisKey,key); |
| | | DelayTask delayTask = this.getOne(queryWrapper,false); |
| | | return delayTask; |
| | | } |
| | | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/7/12 11:37 |
| | | * @param delayTask |
| | | * @return void |
| | | */ |
| | | @Override |
| | | public void addDelayTask(DelayTask delayTask){ |
| | | this.saveOrUpdate(delayTask); |
| | | } |
| | | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/7/12 11:39 |
| | | * @param key |
| | | * @return DelayTask |
| | | */ |
| | | @Override |
| | | public void deleteDelayTask(String key){ |
| | | LambdaUpdateWrapper<DelayTask> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper.eq(DelayTask::getDelFlag,0); |
| | | updateWrapper.eq(DelayTask::getRedisKey,key); |
| | | updateWrapper.set(DelayTask::getDelFlag,1); |
| | | this.update(updateWrapper); |
| | | } |
| | | } |