From f52dc5114638600e934cc82fe63c4a25f22594cc Mon Sep 17 00:00:00 2001 From: fwq <582742538@qq.com> Date: 星期一, 13 五月 2024 10:56:37 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master-test' into master-test --- phis-feign/src/main/java/com/hz/his/dto/user/pretriage/UserPretriageInfoDto.java | 10 +++ phis-feign/src/main/java/com/hz/his/constant/ActivityPreferentialConstants.java | 49 ++++++++++++++++ phis-feign/src/main/java/com/hz/his/feign/service/phis/SRepoActivityService.java | 7 ++ phis-feign/src/main/java/com/hz/his/dto/order/OrderItemPreferentialDto.java | 56 ++++++++++++++++++ phis-feign/src/main/java/com/hz/his/dto/order/OrderItemPHisDto.java | 6 ++ 5 files changed, 128 insertions(+), 0 deletions(-) diff --git a/phis-feign/src/main/java/com/hz/his/constant/ActivityPreferentialConstants.java b/phis-feign/src/main/java/com/hz/his/constant/ActivityPreferentialConstants.java new file mode 100644 index 0000000..9a88017 --- /dev/null +++ b/phis-feign/src/main/java/com/hz/his/constant/ActivityPreferentialConstants.java @@ -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; + } +} diff --git a/phis-feign/src/main/java/com/hz/his/dto/order/OrderItemPHisDto.java b/phis-feign/src/main/java/com/hz/his/dto/order/OrderItemPHisDto.java index 9ed4794..dbdd194 100644 --- a/phis-feign/src/main/java/com/hz/his/dto/order/OrderItemPHisDto.java +++ b/phis-feign/src/main/java/com/hz/his/dto/order/OrderItemPHisDto.java @@ -24,6 +24,10 @@ private BigDecimal totalPoints; /**闈炲繀濉� 鎶樻墸(鍗曚綅:鐧惧垎姣�) 蹇呭~锛岄粯璁�100,涓嶄紶鍚庡彴榛樿100*/ private BigDecimal discount; + /** 浼樻儬鍒搁噾棰濓紙鍏冿級蹇呭~锛屼笉浼犲垯榛樿0 */ + private BigDecimal couponTotal; + /** 浼樻儬绂忓埄鎬婚噾棰濓紙鍏冿級蹇呭~锛屼笉浼犲垯榛樿0 */ + private BigDecimal preferentialTotal; /**鎶垫墸鐜伴噾閲戦*/ private BigDecimal cash = BigDecimal.ZERO; /**鎶垫墸鐜伴噾閲戦闇�瑕佹敮浠樼殑绉垎*/ @@ -59,4 +63,6 @@ /** 璇夋眰鍒嗙被idList */ private List<String> appealTypeIdList; + /** 瀛愬崟浼樻儬绂忓埄鏁版嵁 */ + private List<OrderItemPreferentialDto> orderItemPreferentialList; } diff --git a/phis-feign/src/main/java/com/hz/his/dto/order/OrderItemPreferentialDto.java b/phis-feign/src/main/java/com/hz/his/dto/order/OrderItemPreferentialDto.java new file mode 100644 index 0000000..5fabdb9 --- /dev/null +++ b/phis-feign/src/main/java/com/hz/his/dto/order/OrderItemPreferentialDto.java @@ -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锛圤rdersTotal锛� */ + private String orderId; + /** 涓�绾у瓙璁㈠崟id锛圤rderItem锛� */ + 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; + /** 璧犻�佷紭鎯爅son */ + private String giftJson; + + /** 浼樻儬璁$畻鎺掑簭 */ + private Integer sortNum; + /** 浼樻儬鍓嶄环鏍� */ + private BigDecimal beforePrice = BigDecimal.ZERO; + /** 浼樻儬鍚庝环鏍� */ + private BigDecimal afterPrice = BigDecimal.ZERO; + /** 浼樻儬浠锋牸(浼樻儬鍓�-浼樻儬鍚�) */ + private BigDecimal preferentialPrice = BigDecimal.ZERO; + + + //////////////////////////////////////////////////////////////////////////////////////////// + + public OrderItemPreferentialDto() { + } +} diff --git a/phis-feign/src/main/java/com/hz/his/dto/user/pretriage/UserPretriageInfoDto.java b/phis-feign/src/main/java/com/hz/his/dto/user/pretriage/UserPretriageInfoDto.java index e0866b0..7c2d9e2 100644 --- a/phis-feign/src/main/java/com/hz/his/dto/user/pretriage/UserPretriageInfoDto.java +++ b/phis-feign/src/main/java/com/hz/his/dto/user/pretriage/UserPretriageInfoDto.java @@ -42,6 +42,8 @@ private List<UserPretriageProjectDto> pretriageProjectList; //鏍囩list private List<UserPretriageLabelDto>pretriageLabelList; + //鍒濊瘖鍗℃爣绛緇ist + private List<UserPretriageLabelDto> firstVisitLabelList; //棰勭害鍗旾D private String appointmentId; @@ -216,4 +218,12 @@ public void setLabelIds(List<String> labelIds) { this.labelIds = labelIds; } + + public List<UserPretriageLabelDto> getFirstVisitLabelList() { + return firstVisitLabelList; + } + + public void setFirstVisitLabelList(List<UserPretriageLabelDto> firstVisitLabelList) { + this.firstVisitLabelList = firstVisitLabelList; + } } diff --git a/phis-feign/src/main/java/com/hz/his/feign/service/phis/SRepoActivityService.java b/phis-feign/src/main/java/com/hz/his/feign/service/phis/SRepoActivityService.java index bdd1b76..c2f2e0e 100644 --- a/phis-feign/src/main/java/com/hz/his/feign/service/phis/SRepoActivityService.java +++ b/phis-feign/src/main/java/com/hz/his/feign/service/phis/SRepoActivityService.java @@ -2,6 +2,7 @@ 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; @@ -32,4 +33,10 @@ /** 浼樻儬鍒稿垪琛� */ @PostMapping(value = "/repo/activity/coupon/list") Result couponList(@RequestBody CouponDto couponDto); + + /** 妫�鏌ユ煡璇㈢敤鎴锋槸鍚︾鍚堝弬涓庡璐椿鍔� */ + @PostMapping(value = "/repo/activity/check/user/can/join") + Result checkUserCanJoin(@RequestBody RepoActivityDto repoActivityDto); + + } -- Gitblit v1.8.0