phis-feign/src/main/java/com/hz/his/constant/ActivityPreferentialConstants.java
New file @@ -0,0 +1,49 @@ package com.hz.his.constant; import com.hx.util.StringUtils; /** * 活动优惠类型 * @USER: fhx * @DATE: 2024/5/8 **/ public class ActivityPreferentialConstants { /** 优惠类型 - 降价 */ public static final String TYPE_PRICE_REDUCTION = "price_reduction"; /** 优惠类型 - 赠送优惠券 */ public static final String TYPE_GIFT_COUPON = "gift_coupon"; /** 优惠类型 - 赠送积分 */ public static final String TYPE_GIFT_INTEGRAL = "gift_integral"; /** 优惠类型 - 折扣 */ public static final String TYPE_DISCOUNT = "discount"; /** 优惠类型 - 赠送项目 */ public static final String TYPE_GIFT_PROJECT = "gift_project"; /** 转换优化类型中文 */ public static String changeTypeCn(String type){ switch (type){ case TYPE_PRICE_REDUCTION: return "降价"; case TYPE_GIFT_COUPON: return "赠送优惠券"; case TYPE_GIFT_INTEGRAL: return "赠送积分"; case TYPE_DISCOUNT: return "打折"; case TYPE_GIFT_PROJECT: return "赠送项目"; default: return "未知"; } } /** 检查判断是否赠送类型 */ public static boolean checkGiftType(String type){ if(StringUtils.isEmpty(type)){ return false; } if(TYPE_GIFT_COUPON.equals(type) || TYPE_GIFT_INTEGRAL.equals(type) || TYPE_GIFT_PROJECT.equals(type)){ return true; } return false; } } phis-feign/src/main/java/com/hz/his/dto/activity/RepoActivityDto.java
New file @@ -0,0 +1,28 @@ package com.hz.his.dto.activity; import lombok.Data; import java.util.List; /** * 复购活动dto * @USER: fhx * @DATE: 2024/5/8 **/ @Data public class RepoActivityDto { /** 复购活动id */ private String activityId; /** 用户id */ private String userId; /** 限制用户会员等级(多个逗号分隔,空则不限制) */ private String limitVipLevel; /** 限制门店id */ private List<String> limitShopIdList; /** 限制历史购买过spuId */ private List<String> limitSpuIdList; /** 限制历史分类(项目映射表) */ private List<RepoActivityLimitDto> limitTypeList; } phis-feign/src/main/java/com/hz/his/dto/activity/RepoActivityLimitDto.java
New file @@ -0,0 +1,20 @@ package com.hz.his.dto.activity; import lombok.Data; import java.util.List; /** * 复购活动限制dto * @USER: fhx * @DATE: 2024/5/8 **/ @Data public class RepoActivityLimitDto { /** 映射模块 */ private Integer moduleType; /** 映射名称 */ private String itemName; } phis-feign/src/main/java/com/hz/his/dto/coupon/CouponDto.java
@@ -65,4 +65,10 @@ /** 优惠券ID*/ private List<String> couponIdList; /**平台限制*/ private Integer platLimit; /**平台可用过滤,appId*/ private List<String> limitPlatformList; } phis-feign/src/main/java/com/hz/his/dto/coupon/CouponNumberDto.java
@@ -17,6 +17,7 @@ public class CouponNumberDto{ /**标识*/ private String id; /**标题*/ private String title; /**有效开始时间*/ @@ -58,6 +59,13 @@ /**计时类型(0时间段,1领取有效时长(领取时间叠加时间),2无效时长)*/ private Integer timeType; /** 优惠券id */ private String couponId; /** 优惠券标题 */ private String couponTitle; /** 优惠券码id */ private String couponNumberId; /**计时类型-时间段*/ public static final int TIME_TYPE_SLOT = 0; /**计时类型-领取时长(领取时间叠加时间)*/ phis-feign/src/main/java/com/hz/his/dto/order/OrderItemPHisDto.java
@@ -26,6 +26,10 @@ private BigDecimal discount; /**当前是否允许低分抵扣现金*/ private Boolean isCanUseIntegralCash = false; /** 优惠券金额(元)必填,不传则默认0 */ private BigDecimal couponTotal; /** 优惠福利总金额(元)必填,不传则默认0 */ private BigDecimal preferentialTotal; /**抵扣现金金额*/ private BigDecimal cash = BigDecimal.ZERO; /**抵扣现金金额需要支付的积分*/ @@ -63,4 +67,6 @@ /** 诉求分类idList */ private List<String> appealTypeIdList; /** 子单优惠福利数据 */ private List<OrderItemPreferentialDto> orderItemPreferentialList; } phis-feign/src/main/java/com/hz/his/dto/order/OrderItemPreferentialDto.java
New file @@ -0,0 +1,56 @@ package com.hz.his.dto.order; import lombok.Data; import java.math.BigDecimal; /** * 订单子单商品关联的优惠活动 * @USER: fhx * @DATE: 2024/5/8 **/ @Data public class OrderItemPreferentialDto { /** 订单id(OrdersTotal) */ private String orderId; /** 一级子订单id(OrderItem) */ private String orderItemId; /** 优惠活动名称 */ private String name; /** 来源类型 */ private String sourceType; /** 来源标识 */ private String sourceId; /** 辅助字段1 */ private String common1Id; /** 辅助字段2 */ private String common2Id; /** 辅助数值 */ private Integer commonNum; /** 活动类型(ActivityPreferentialConstants) */ private String type; /** 优惠数值 */ private BigDecimal valNum; /** 赠送优惠json */ private String giftJson; /** 优惠计算排序 */ private Integer sortNum; /** 优惠前价格 */ private BigDecimal beforePrice = BigDecimal.ZERO; /** 优惠后价格 */ private BigDecimal afterPrice = BigDecimal.ZERO; /** 优惠价格(优惠前-优惠后) */ private BigDecimal preferentialPrice = BigDecimal.ZERO; //////////////////////////////////////////////////////////////////////////////////////////// public OrderItemPreferentialDto() { } } phis-feign/src/main/java/com/hz/his/dto/order/OrderRefundDto.java
@@ -1,5 +1,6 @@ package com.hz.his.dto.order; import com.hz.his.dto.refund.RefundPreferentialDto; import lombok.Data; import java.math.BigDecimal; @@ -78,4 +79,7 @@ //非必填 重发标识 private String resendRecordId; /** 退款优惠 */ private RefundPreferentialDto refundPreferentialDto; } phis-feign/src/main/java/com/hz/his/dto/refund/RefundPreferentialDto.java
New file @@ -0,0 +1,24 @@ package com.hz.his.dto.refund; import com.hz.his.dto.coupon.CouponNumberDto; import lombok.Data; import java.math.BigDecimal; import java.util.List; /** * 退款优惠dto * @USER: fhx * @DATE: 2024/5/15 **/ @Data public class RefundPreferentialDto { /** 要退款的复购活动赠送积分 */ private BigDecimal refundRepoGiftIntegral; /** 要退款作废的复购活动赠送优惠券 */ private List<CouponNumberDto> refundRepoGiftCouponList; /** 已使用优惠券提示 */ private List<String> couponTipsList; } phis-feign/src/main/java/com/hz/his/dto/report/user/UserDetailSelectDto.java
@@ -19,12 +19,24 @@ private List<String> adviserIdList; /**顾问编号*/ private List<String> adviserNoList; /**登录员工标识*/ private String loginEmpId; /**登录员工名称*/ private String loginCnName; /**登录员工唯一字符串*/ private String loginEmpStr; /**操作人*/ private String operatorId; /**操作人名称*/ private String operatorName; /**查询活跃老VIP,流失(流失)/活跃(状态)/沉睡(状态)之间是【或】关系0:流失 1:活跃 2:沉睡*/ private List<Integer> oldVipList; /**查询客户等级,等级之间是【或】关系*/ private List<String> userLevelList; /**查询客户状态,状态之间是【或】关系*/ private List<String> statusList; /**三大项目未执行大的是【且】,各自是【或】*/ /**打卡项目0:1-3个月未执行,1:4-6个月未执行,2:>6个月未执行*/ phis-feign/src/main/java/com/hz/his/feign/service/phis/SCouponService.java
@@ -162,6 +162,10 @@ @PostMapping(value = "/coupon/birthday/list/user") Result userBirthDayCouponList(@RequestBody(required = false) CouponDto dto); /** * 获取优惠券领取规则列表 */ @PostMapping(value = "/coupon/receive/rule/list") Result getReceiveRuleList(); } phis-feign/src/main/java/com/hz/his/feign/service/phis/SProjectService.java
@@ -111,4 +111,9 @@ /**查询项目积分抵扣现金的比例*/ @PostMapping(value = "/project/integral/cash/rate") Result getIntegralCashRate(@RequestBody ProjectDto projectDto); /**查询映射项目模块树型三级*/ @PostMapping(value = "/project/item/relation/list") Result projectItemList(@RequestBody ProjectDto projectDto); } phis-feign/src/main/java/com/hz/his/feign/service/phis/SRepoActivityService.java
New file @@ -0,0 +1,42 @@ package com.hz.his.feign.service.phis; import com.hx.resultTool.Result; import com.hz.his.dto.PageDto; import com.hz.his.dto.activity.RepoActivityDto; import com.hz.his.dto.coupon.CouponDto; import org.springframework.cloud.openfeign.FeignClient; 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.RequestParam; import java.math.BigDecimal; /** * 复购活动service */ @FeignClient(name="phis-provider",path = "/p-his-data",contextId = "repo-activity") public interface SRepoActivityService { /** 门店列表 */ @PostMapping(value = "/repo/activity/shop/list") Result shopList(); /** SPU列表 */ @PostMapping(value = "/repo/activity/spu/list") Result spuList(@RequestBody PageDto dto); /** 项目映射分类列表 */ @PostMapping(value = "/repo/activity/project/type/relation/list") Result projectTypeRelationList(@RequestBody PageDto dto); /** 优惠券列表 */ @PostMapping(value = "/repo/activity/coupon/list") Result couponList(@RequestBody CouponDto couponDto); /** 检查查询用户是否符合参与复购活动 */ @PostMapping(value = "/repo/activity/check/user/can/join") Result checkUserCanJoin(@RequestBody RepoActivityDto repoActivityDto); } phis-feign/src/main/java/com/hz/his/feign/service/platform/SPhipOrderService.java
@@ -186,5 +186,7 @@ @PostMapping(value = "/order/countOrderShouldTotal") Result countOrderShouldTotal(@RequestBody OrderCountShouldTotalDto dto); /** 退款前逻辑检查 */ @PostMapping(value = "/order/reufnd/afrer/check") Result refundAfterCheck(@RequestBody OrderRefundDto dto); } phis-feign/src/main/java/com/hz/his/feign/service/platform/bi/BiUserService.java
@@ -112,5 +112,10 @@ @PostMapping("/admin/rfmUser/report/user/search/list") Result userSearchList(@RequestBody UserDetailSelectDto userDetailSelectDto); /** * rfm客户概览-搜索用户列表-导出 */ @PostMapping("/admin/rfmUser/report/user/search/export") Result userSearchExport(@RequestBody UserDetailSelectDto userDetailSelectDto); } phis-feign/src/main/java/com/hz/his/feign/service/rfm/SRfmParagraphGradeService.java
New file @@ -0,0 +1,22 @@ package com.hz.his.feign.service.rfm; import com.hx.resultTool.Result; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.RequestMapping; /** * RFM等级数据区间service * @USER: fhx * @DATE: 2024/5/28 **/ @FeignClient(name="bi-rfm",path = "/rfm",contextId = "phip-rfm-paragraph-grade") public interface SRfmParagraphGradeService { /** * RFM综合等级等级区间获取 */ @RequestMapping("/grade-paragraph/comprehensive/data") Result comprehensiveGradeData(); } phis-feign/src/main/java/com/hz/his/vo/coupon/CouponReceiveVo.java
New file @@ -0,0 +1,15 @@ package com.hz.his.vo.coupon; import lombok.Data; /** * 优惠券领取规则 * */ @Data public class CouponReceiveVo { /**规则标识*/ private String id; /**规则名称*/ private String name; } phis-feign/src/main/java/com/hz/phis/dt/user/UserDt.java
@@ -1,7 +1,5 @@ package com.hz.phis.dt.user; import com.gitee.sunchenbin.mybatis.actable.annotation.Column; import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant; import lombok.Data; import java.math.BigDecimal; @@ -91,4 +89,8 @@ //是否含有热玛吉项目 private Boolean isHaveRmj = false; /** 所属顾问名称 */ private String adviserName; /** RFM综合等级 */ private String rfmGrade; } phis-feign/src/main/java/com/hz/phis/vo/money/MoneyRuleVo.java
@@ -9,4 +9,6 @@ public class MoneyRuleVo { /**功能编号*/ private String functionCode; /**金额类型:0增值金,1积分*/ private Integer moneyType; }