From cfedbfad423aa6fd758da748967122819b1787e2 Mon Sep 17 00:00:00 2001 From: chenjiahe <763432473@qq.com> Date: 星期五, 01 三月 2024 18:14:57 +0800 Subject: [PATCH] 爆款活动-退款处理 --- phi_platform_common/src/main/java/com/hx/phip/tool/order/OrderTool.java | 32 +++++++++++++++++++++++++++++++- 1 files changed, 31 insertions(+), 1 deletions(-) diff --git a/phi_platform_common/src/main/java/com/hx/phip/tool/order/OrderTool.java b/phi_platform_common/src/main/java/com/hx/phip/tool/order/OrderTool.java index d6fc7e7..8c37ebe 100644 --- a/phi_platform_common/src/main/java/com/hx/phip/tool/order/OrderTool.java +++ b/phi_platform_common/src/main/java/com/hx/phip/tool/order/OrderTool.java @@ -3,13 +3,17 @@ import com.hx.common.service.CommonService; import com.hx.mybatisTool.SqlSentence; import com.hx.phiappt.model.consume.ConsumePayItem; +import com.hx.phiappt.model.order.OrdersTotal; +import com.hx.phiappt.model.userMoney.UserMoneyUnclaimed; import com.hx.phip.dao.mapper.ConsumePayItemMapper; +import com.hx.phip.dao.mapper.UserMoneyUnclaimedMapper; import java.util.HashMap; import java.util.List; import java.util.Map; -/**璁㈠崟宸ュ叿绫�*/ +/**璁㈠崟宸ュ叿绫� + * @author CJH*/ public class OrderTool { /**鑾峰彇涓�绾у瓙鍗曠殑鏀粯鏂瑰紡 @@ -26,5 +30,31 @@ return commonService.selectList(ConsumePayItemMapper.class,sqlSentence); } + /**鑾峰彇娲诲姩璧犻�佽祫閲戝鍔辫褰�*/ + public static UserMoneyUnclaimed getActivityGive(OrdersTotal ordersTotal, CommonService commonService){ + //鏌ユ壘棰嗗彇璁板綍閲婃斁瀛樺湪 + //棰嗗彇璁板綍鏄惁宸查鍙� + SqlSentence sqlSentence = new SqlSentence(); + Map<String,Object> values = new HashMap<>(); + + values.put("orderId",ordersTotal.getId()); + values.put("commonId",ordersTotal.getActivityPageCode()); + sqlSentence.sqlSentence("SELECT * FROM user_money_unclaimed WHERE isDel = 0 AND orderId = #{m.orderId} AND commonId = #{m.commonId}",values); + return commonService.selectOne(UserMoneyUnclaimedMapper.class,sqlSentence); + } + + /**鑾峰彇鐢ㄦ埛娲诲姩璧犻�佽祫閲戝鍔辫褰�-鏈夋晥*/ + public static List<UserMoneyUnclaimed> getActivityGive(String userId,String commonId, CommonService commonService){ + //鏌ユ壘棰嗗彇璁板綍閲婃斁瀛樺湪 + //棰嗗彇璁板綍鏄惁宸查鍙� + SqlSentence sqlSentence = new SqlSentence(); + Map<String,Object> values = new HashMap<>(); + + values.put("userId",userId); + values.put("commonId",commonId); + sqlSentence.sqlSentence("SELECT * FROM user_money_unclaimed WHERE isDel = 0 AND isValid = 1 AND userId = #{m.userId} AND commonId = #{m.commonId}",values); + return commonService.selectList(UserMoneyUnclaimedMapper.class,sqlSentence); + } + } -- Gitblit v1.8.0