From bec88badaeb0341a1d5429b31357eb37c0b16fb0 Mon Sep 17 00:00:00 2001 From: zhouxiang <zhouxiang> Date: 星期四, 23 二月 2023 12:03:01 +0800 Subject: [PATCH] Merge branch 'master-prod-new' of http://1.15.4.62/r/~chenjiahe/phi_platform --- phi_platform_user/src/main/java/com/hx/phip/controller/order/OrderControllerV2.java | 169 ++++++++++++++++++++++++++++----- phi_platform_common/src/main/resources/mapper/platform/CouponOrderDiscountLogMapper.xml | 12 + phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderServiceV2Impl.java | 91 ------------------ phi_platform_user/src/main/java/com/hx/phip/util/api/PartialRefundUtil.java | 4 4 files changed, 154 insertions(+), 122 deletions(-) diff --git a/phi_platform_common/src/main/resources/mapper/platform/CouponOrderDiscountLogMapper.xml b/phi_platform_common/src/main/resources/mapper/platform/CouponOrderDiscountLogMapper.xml index c8c4276..6f4c141 100644 --- a/phi_platform_common/src/main/resources/mapper/platform/CouponOrderDiscountLogMapper.xml +++ b/phi_platform_common/src/main/resources/mapper/platform/CouponOrderDiscountLogMapper.xml @@ -8,7 +8,7 @@ <!-- 鏁翠釜瀹炰綋绫讳慨鏀癸紝琛ㄥ瓧娈�=瀹炰綋绫诲瓧娈�--> <sql id="Update_Column_All"> <trim prefixOverrides=","> - ,orderId = #{orderId},couponId = #{couponId},couponNumberId = #{couponNumberId},type = #{type},title = #{title},describeInfo = #{describeInfo},discountTotal = #{discountTotal},isDel = #{isDel},createTime = #{createTime},editTime = #{editTime} + ,orderId = #{orderId},couponId = #{couponId},couponNumberId = #{couponNumberId},conversionCode = #{conversionCode},type = #{type},title = #{title},describeInfo = #{describeInfo},discountTotal = #{discountTotal},status = #{status},isDel = #{isDel},createTime = #{createTime},editTime = #{editTime} </trim> </sql> @@ -19,8 +19,12 @@ <selectKey keyProperty="id" resultType="String" order="BEFORE"> select replace(uuid(),'-','') from dual </selectKey> - insert into coupon_order_discount_log (id,orderId,couponId,couponNumberId,type,title,describeInfo,discountTotal,isDel,createTime,editTime) values (#{id},#{orderId},#{couponId},#{couponNumberId},#{type},#{title},#{describeInfo},#{discountTotal},#{isDel},#{createTime},#{editTime}) + insert into coupon_order_discount_log (id,orderId,couponId,couponNumberId,conversionCode,type,title,describeInfo,discountTotal,status,isDel,createTime,editTime) values (#{id},#{orderId},#{couponId},#{couponNumberId},#{conversionCode},#{type},#{title},#{describeInfo},#{discountTotal},#{status},#{isDel},#{createTime},#{editTime}) </insert> + + <insert id="insertById" parameterType="com.hx.phiappt.model.coupon.CouponOrderDiscountLog"> + insert into coupon_order_discount_log (id,orderId,couponId,couponNumberId,conversionCode,type,title,describeInfo,discountTotal,status,isDel,createTime,editTime) values (#{id},#{orderId},#{couponId},#{couponNumberId},#{conversionCode},#{type},#{title},#{describeInfo},#{discountTotal},#{status},#{isDel},#{createTime},#{editTime}) + </insert> <select id="selectList" resultType="com.hx.phiappt.model.coupon.CouponOrderDiscountLog" parameterType="com.hx.mybatisTool.SqlSentence" > ${sqlSentence} @@ -51,14 +55,14 @@ <select id="selectOneByKey" resultType="com.hx.phiappt.model.coupon.CouponOrderDiscountLog" parameterType="java.lang.Object" > select - id,orderId,couponId,couponNumberId,type,title,describeInfo,discountTotal,isDel,createTime,editTime + id,orderId,couponId,couponNumberId,conversionCode,type,title,describeInfo,discountTotal,status,isDel,createTime,editTime from coupon_order_discount_log WHERE id = #{value} </select> <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.coupon.CouponOrderDiscountLog" parameterType="java.lang.Object" > select - id,orderId,couponId,couponNumberId,type,title,describeInfo,discountTotal,isDel,createTime,editTime + id,orderId,couponId,couponNumberId,conversionCode,type,title,describeInfo,discountTotal,status,isDel,createTime,editTime from coupon_order_discount_log WHERE id = #{value} </select> diff --git a/phi_platform_user/src/main/java/com/hx/phip/controller/order/OrderControllerV2.java b/phi_platform_user/src/main/java/com/hx/phip/controller/order/OrderControllerV2.java index 9475355..64d9df2 100644 --- a/phi_platform_user/src/main/java/com/hx/phip/controller/order/OrderControllerV2.java +++ b/phi_platform_user/src/main/java/com/hx/phip/controller/order/OrderControllerV2.java @@ -13,20 +13,18 @@ import com.hx.common.BaseController; import com.hx.common.service.CommonService; import com.hx.mybatisTool.SqlSentence; -import com.hx.phiappt.common.OrderTotalConstants; -import com.hx.phiappt.common.PlatformConstants; +import com.hx.phiappt.common.*; import com.hx.phiappt.common.PlatformConstants; import com.hx.phiappt.constants.tool.ConsultantCashReportTool; import com.hx.phiappt.constants.tool.PerformanceInfoTool; +import com.hx.phiappt.constants.tool.UserStatusTool; import com.hx.phiappt.dao.mapper.CouponNumberMapper; import com.hx.phiappt.model.*; import com.hx.phiappt.model.coupon.Coupon; import com.hx.phiappt.model.coupon.CouponNumber; -import com.hx.phiappt.model.order.OrderDeveloper; -import com.hx.phiappt.model.order.OrderInfo; -import com.hx.phiappt.model.order.OrderItem; -import com.hx.phiappt.model.order.OrdersTotal; +import com.hx.phiappt.model.order.*; import com.hx.phiappt.model.performance.PerformanceInfo; +import com.hx.phiappt.model.userStatus.UserStatusLog; import com.hx.phip.config.CustomParameter; import com.hx.phip.dao.mapper.*; import com.hx.phip.service.ShopService; @@ -34,9 +32,7 @@ import com.hx.phip.service.UserService; import com.hx.phip.service.order.OrderService; import com.hx.phip.service.order.OrderServiceV2; -import com.hx.phip.util.api.ApiOrderUtil; -import com.hx.phip.util.api.OrderCreateUtil; -import com.hx.phip.util.api.UserMoneyUtil; +import com.hx.phip.util.api.*; import com.hx.util.StringUtils; import com.hz.his.dto.order.OrderPHisDto; import com.hz.his.dto.order.PayDto; @@ -55,10 +51,8 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.math.BigDecimal; +import java.util.*; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -283,20 +277,36 @@ Map<String, Object> map = orderServiceV2.orderPayMoney(type, ordersTotal,user,payUser,shop,info,orderItemList,operator,userMoney,total, amountList,userCouponIds,null); if(map!=null && map.containsKey("orderId")){ - //璁板綍鏀跺叆纭琛� - try{ - orderServiceV2.statementPerformanceInfo((String) map.get("orderId")); - }catch (Exception e) { - logger.info("璁板綍鏀跺叆纭琛�,寮傚父:{}", e.getMessage(), e); - // 娣诲姞閿欒鏃ュ織 - PerformanceInfoTool.addErrorLog(commonService, map.get("orderId").toString(), PerformanceInfo.ASSOCIATION_TYPE_GOODS_ORDER, e.getMessage()); + OrdersTotal sucOrdersTotal=commonService.selectOneByKey(OrdersTotalMapper.class,map.get("orderId")); + if(OrderTotalConstants.PAY_STATUS_SUC==sucOrdersTotal.getPayStatus()){ + //澶勭悊鑰佸甫鏂� + JSONObject commissionObject = handOrderOldNew(amountList, ordersTotal, user, map); + + //鏇存柊鐢ㄦ埛鏈�鍚庝笅鍗曟椂闂� + updateUserLastTime(ordersTotal, user); + + //闇�姹�: 1.HIS鍔╂墜缁撹处鎴愬姛锛氳閫氱煡瀹㈡埛鎵�灞為【闂紝鍙戦�佷紒涓氬井淇¢�氱煡 ,濡傛灉娌℃湁鎵�灞為【闂彂閫佺粰闂ㄥ簵杩愯惀瀹㈡湇(涓夊皯璇寸洰鍓嶄笉澶勭悊crm宸插鐞�) -寮傛 + try { + orderServiceV2.sendUserConsultant(ordersTotal.getUserId(),ordersTotal.getOrderNo(),ordersTotal.getId(),commissionObject,commonService); + }catch (Exception e){ + logger.info("瑕侀�氱煡瀹㈡埛鎵�灞為【闂紝鍙戦�佷紒涓氬井淇¢�氱煡寮傚父 -寮傛:{}",e.getMessage(),e); + } + //璁板綍鏀跺叆纭琛� + try{ + orderServiceV2.statementPerformanceInfo((String) map.get("orderId")); + }catch (Exception e) { + logger.info("璁板綍鏀跺叆纭琛�,寮傚父:{}", e.getMessage(), e); + // 娣诲姞閿欒鏃ュ織 + PerformanceInfoTool.addErrorLog(commonService, map.get("orderId").toString(), PerformanceInfo.ASSOCIATION_TYPE_GOODS_ORDER, e.getMessage()); + } + //鍜ㄨ甯堢幇閲戜笟缁╂姤琛� + try{ + orderServiceV2.statementConsultantCash((String) map.get("orderId")); + }catch (Exception e){ + logger.info("鍜ㄨ甯堢幇閲戜笟缁╂姤琛�,寮傚父:{}",e.getMessage(),e); + } } - //鍜ㄨ甯堢幇閲戜笟缁╂姤琛� - try{ - orderServiceV2.statementConsultantCash((String) map.get("orderId")); - }catch (Exception e){ - logger.info("鍜ㄨ甯堢幇閲戜笟缁╂姤琛�,寮傚父:{}",e.getMessage(),e); - } + //寮傛鑾峰彇鏈墽琛屽垝鎵d俊鎭�,娴嬭瘯鐜鍏堟斁寮�锛岃崳鐖疯,璁板緱鍐欓噸鍙� // if(user!=null && StringUtils.noNull(user.getApiId())){ // try { @@ -474,4 +484,111 @@ } } + /** + * 鏇存柊鐢ㄦ埛鏈�鍚庝竴娆′笅鍗曟椂闂� + * @param ordersTotal + * @param user + */ + public void updateUserLastTime(OrdersTotal ordersTotal, User user) { + try { + SqlSentence sqlSentence = new SqlSentence(); + Map<String, Object> sqlValues = new HashMap<>(); + sqlValues.put("lastPayOrderTime", new Date()); + sqlValues.put("editTime", new Date()); + sqlValues.put("isLoss", BaseEntity.NO); + sqlValues.put("isDel", BaseEntity.NO); + sqlValues.put("id", user.getId()); + StringBuilder sql = new StringBuilder(); + sql.append(" lastPayOrderTime=#{m.lastPayOrderTime},editTime=#{m.editTime},isLoss=#{m.isLoss}"); + // 浼氬憳鏈夋秷璐瑰拰鎵ц灏辨槸娲昏穬浼氬憳 + String status = null; + if (!UserStatusConstants.USER_STATUS_NON_MEMBER.equals(user.getUserStatus())) { + status = UserStatusConstants.USER_STATUS_ACTIVE_MEMBER; + sqlValues.put("userStatus", status); + sql.append(",userStatus=#{m.userStatus}"); + } + sql.append(" WHERE id=#{m.id} AND isDel=#{m.isDel}"); + sqlSentence.sqlSentence(sql.toString(), sqlValues); + commonService.updateWhere(UserMapper.class, sqlSentence); + // 娣诲姞璋冩暣鐢ㄦ埛鐘舵�佹棩蹇� 璋冩暣浜嗙敤鎴风瓑绾у湪鍐欏叆鏃ュ織 + if (!StringUtils.isEmpty(status)) { + UserStatusTool.addUserStatusLog(commonService, user, UserStatusLog.CHANGE_STATUS_TYPE_ORDER, ordersTotal.getId(), UserStatusConstants.USER_STATUS_ACTIVE_MEMBER); + } + } catch (Exception e) { + logger.info("鏇存柊鐢ㄦ埛鏈�鍚庝笅鍗曟椂闂�,寮傚父:{}", e.getMessage(), e); + } + } + + /** + * 澶勭悊鑰佸甫鏂� + * @param amountList + * @param ordersTotal + * @param user + * @param map + * @return + */ + private JSONObject handOrderOldNew(JSONArray amountList, OrdersTotal ordersTotal, User user, Map<String, Object> map) { + /** + * 澶勭悊鑰佸甫鏂�(绂呴亾涓哄噯,绂呴亾鍙�176) + * 1.鍑嗕細鍛樸�佹櫘鍗°�侀摱鍗★細 + * 閭�璇蜂汉澧炲�奸噾鐧惧垎姣旓細8% + * 琚個璇蜂汉澧炲�奸噾鐧惧垎姣旓細2% + * 2.閲戝崱銆侀捇鍗°�侀粦鍗★細 + * 閭�璇蜂汉澧炲�奸噾鐧惧垎姣旓細10% + * 琚個璇蜂汉澧炲�奸噾鐧惧垎姣旓細5% + */ + SqlSentence sql = new SqlSentence(); + Map<String,Object> paramMap=new HashMap<>(); + sql.setM(paramMap); + JSONObject commissionObject =new JSONObject(); + JSONArray hisPayList=new JSONArray(); + StringBuilder orderNodeBuilder = new StringBuilder(); + if(ordersTotal.getOrderInfo().getIsOldBringNew() !=null && ordersTotal.getOrderInfo().getIsOldBringNew()== BaseEntity.YES){ + JSONObject hisPay ; + for(int i=0;i<amountList.size();i++) { + JSONObject jsonObject = amountList.getJSONObject(i); + String amount = jsonObject.getString("amount");//鐢ㄦ埛瀹為檯鏀粯閲戦 + String method = jsonObject.getString("method");//鐢ㄦ埛鏀粯缂栫爜 + + hisPay = new JSONObject(); + + //鏍规嵁鏀粯缂栫爜,涓婃灦鐨勬敮浠樻柟寮忥紝骞跺垽绌� + paramMap.put("method", method); + paramMap.put("isDel", BaseEntity.NO); + paramMap.put("isUp", BaseEntity.YES); + sql.setSqlSentence("select * from payment_method where numberNo=#{m.method} and isDel=#{m.isDel} and isUp=#{m.isUp}"); + PaymentMethod paymentMethod = commonService.selectOne(PaymentMethodMapper.class, sql); + if (paymentMethod != null) { + //娣诲姞鐢ㄦ埛鏀粯鏂瑰紡閲戦銆佷互鍙婃柟娉曪紝鐢ㄤ簬鍚屾鍒癶is绯荤粺 + hisPay.put("amount",amount); + hisPay.put("methodCode",paymentMethod.getNumberNo()); + hisPay.put("isMoneyPay",paymentMethod.getIsMoneyPay()); + hisPayList.add(hisPay); + } + } + try { + orderNodeBuilder.append("-寮�濮嬪鐞嗚�佸甫鏂�"); + commissionObject = OrderPayMoneyUtil.handPayOldNew(ordersTotal, user, hisPayList, commonService); + orderNodeBuilder.append("-缁撴潫澶勭悊鑰佸甫鏂�"); + }catch (Exception e){ + String snapshot="澶勭悊鑰佸甫鏂板け璐�"; + orderNodeBuilder.append("-澶勭悊鑰佸甫鏂板け璐�,寮傚父鍘熷洜:"+e.getMessage()); + logger.error("澶勭悊鑰佸甫鏂板け璐ワ細" + e.getMessage(),e); + //鍙戦�佷紒涓氬井淇¢�氱煡缁欏伐浣滀汉鍛� + SendNoticeUtil.failOrderSendNotice(ordersTotal,e.getMessage(),snapshot,commonService,customParameter); + } + + paramMap.put("orderId",map.get("orderId")); + sql.setSqlSentence("select * from orders_node_log where orderId=#{m.orderId} and isDel=0 order by createTime desc LIMIT 1"); + OrdersNodeLog ordersNodeLog=commonService.selectOne(OrdersNodeLogMapper.class,sql); + if(ordersNodeLog!=null ){ + String concat = ordersNodeLog.getContent().concat(orderNodeBuilder.toString()); + paramMap.put("concat",concat); + paramMap.put("id",ordersNodeLog.getId()); + sql.setSqlSentence(" content=#{m.concat} where id=#{m.id} "); + commonService.updateWhere(OrdersNodeLogMapper.class,sql); + } + } + return commissionObject; + } } diff --git a/phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderServiceV2Impl.java b/phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderServiceV2Impl.java index 520e1b4..feed348 100644 --- a/phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderServiceV2Impl.java +++ b/phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderServiceV2Impl.java @@ -392,62 +392,6 @@ orderNodeBuilder.append("-缁撴潫澶勭悊娲诲姩瑙勫垯"); //闈炰富绾夸笟鍔� - /** - * 澶勭悊鑰佸甫鏂�(绂呴亾涓哄噯,绂呴亾鍙�176) - * 1.鍑嗕細鍛樸�佹櫘鍗°�侀摱鍗★細 - * 閭�璇蜂汉澧炲�奸噾鐧惧垎姣旓細8% - * 琚個璇蜂汉澧炲�奸噾鐧惧垎姣旓細2% - * 2.閲戝崱銆侀捇鍗°�侀粦鍗★細 - * 閭�璇蜂汉澧炲�奸噾鐧惧垎姣旓細10% - * 琚個璇蜂汉澧炲�奸噾鐧惧垎姣旓細5% - */ - JSONObject commissionObject =new JSONObject(); - if(ordersTotal.getOrderInfo().getIsOldBringNew() !=null && ordersTotal.getOrderInfo().getIsOldBringNew()==BaseEntity.YES){ - //杩欑鍐欐硶閿欒锛屼細鎶� 寮傚父锛歍ransaction rolled back because it has been marked as rollback-only -// try { -// orderNodeBuilder.append("-寮�濮嬪鐞嗚�佸甫鏂�"); -// commissionObject = OrderPayMoneyUtil.handPayOldNew(ordersTotal, user, hisPayList, commonService); -// orderNodeBuilder.append("-缁撴潫澶勭悊鑰佸甫鏂�"); -// }catch (Exception e){ -// String snapshot="澶勭悊鑰佸甫鏂板け璐�"; -// orderNodeBuilder.append("-澶勭悊鑰佸甫鏂板け璐�,寮傚父鍘熷洜:"+e.getMessage()); -// logger.error("澶勭悊鑰佸甫鏂板け璐ワ細" + e.getMessage()); -// //鍙戦�佷紒涓氬井淇¢�氱煡缁欏伐浣滀汉鍛� -// SendNoticeUtil.failOrderSendNotice(ordersTotal,e.getMessage(),snapshot,commonService,customParameter); -// message=e.getMessage(); -// } - //瑙e喅浠ヤ笂鎶ラ敊 - try { - /** - * 寮傚父: - * Transaction rolled back because it has been marked as rollback-only - * 寮�鍚嚎绋嬪鐞嗚�佸甫鏂帮紝鏄洜涓鸿皟鐢ㄧ敤鎴锋搷浣滆祫閲戞柟娉曟姤閿欎簡锛屼細鏍囪浜嬪姟闇�瑕佷細婊氬鑷翠富涓氬姟杩涜浼氭粴闂 - * 鍘熷洜:涓讳笟鍔℃湁浜嬪姟锛屾搷浣滅敤鎴疯祫閲戜篃鏈変簨鍔★紝鍚庤�呬簨鍔$户鎵夸簡鍓嶈�呬簨鍔★紝鎵�浠ュ悗鑰呬簨鍔″洖婊氫細鏍囪锛屽鑷翠富涓氬姟浜嬪姟涔熶細鍥炴粴 - * 瑙e喅鍔炴硶: - * 1銆佷慨鏀规搷浣滅敤鎴疯祫閲戜簨鍔¢殧绂荤骇鍒紝涓嶄娇鐢ㄩ粯璁ょ殑浜嬪姟闅旂绾у埆锛岄噰鐢ㄦ湁浜嬪姟鍒欏紑鍚柊浜嬬墿闅旂绾у埆 - * 2銆佸紑鍚嚎绋嬭繘琛屽鐞� - * 3銆佽创寮傛娉ㄨВ鏂瑰紡(@Async) - */ - OrdersTotal ordersTotalSync = ordersTotal; - JSONArray hisPayListSync = hisPayList; - orderNodeBuilder.append("-寮�濮嬪鐞嗚�佸甫鏂�"); - CompletableFuture<JSONObject> commissionObjectFuture = CompletableFuture.supplyAsync(() -> { - return OrderPayMoneyUtil.handPayOldNew(ordersTotalSync, user, hisPayListSync, commonService); - }, threadPool); - // get 绾跨▼杩斿洖缁撴灉 - commissionObject = commissionObjectFuture.get(); -// orderService.handPayOldNew(ordersTotal,user,hisPayList,commonService); - - orderNodeBuilder.append("-缁撴潫澶勭悊鑰佸甫鏂�"); - }catch (Exception e){ - String snapshot="澶勭悊鑰佸甫鏂板け璐�"; - orderNodeBuilder.append("-澶勭悊鑰佸甫鏂板け璐�,寮傚父鍘熷洜:"+e.getMessage()); - logger.error("澶勭悊鑰佸甫鏂板け璐ワ細" + e.getMessage()); - //鍙戦�佷紒涓氬井淇¢�氱煡缁欏伐浣滀汉鍛� - SendNoticeUtil.failOrderSendNotice(ordersTotal,e.getMessage(),snapshot,commonService,customParameter); - message=e.getMessage(); - } - } /** * 鐢ㄦ埛鍗囬檷绾�(璋冪敤鑸埛) 閲戦=鐢ㄦ埛鏀粯鐨勫疄浠樼幇閲戦噾棰�(涓嶅寘鍚偍鍊奸噾) @@ -582,40 +526,7 @@ }catch (Exception e){ logger.info("缁撹处鎴愬姛鍙戦�佸叕浼楀彿閫氱煡缁欑敤鎴峰紓甯� -寮傛:{}",e.getMessage(),e); } - //闇�姹�: 1.HIS鍔╂墜缁撹处鎴愬姛锛氳閫氱煡瀹㈡埛鎵�灞為【闂紝鍙戦�佷紒涓氬井淇¢�氱煡 ,濡傛灉娌℃湁鎵�灞為【闂彂閫佺粰闂ㄥ簵杩愯惀瀹㈡湇(涓夊皯璇寸洰鍓嶄笉澶勭悊crm宸插鐞�) -寮傛 - try { - sendUserConsultant(ordersTotal.getUserId(),ordersTotal.getOrderNo(),ordersTotal.getId(),commissionObject,commonService); - }catch (Exception e){ - logger.info("瑕侀�氱煡瀹㈡埛鎵�灞為【闂紝鍙戦�佷紒涓氬井淇¢�氱煡寮傚父 -寮傛:{}",e.getMessage(),e); - } - //鏇存柊鐢ㄦ埛鏈�鍚庝笅鍗曟椂闂� - try { - SqlSentence sqlSentence = new SqlSentence(); - Map<String, Object> sqlValues = new HashMap<>(); - sqlValues.put("lastPayOrderTime", new Date()); - sqlValues.put("editTime", new Date()); - sqlValues.put("isLoss", BaseEntity.NO); - sqlValues.put("isDel", BaseEntity.NO); - sqlValues.put("id", user.getId()); - StringBuilder sql = new StringBuilder(); - sql.append(" lastPayOrderTime=#{m.lastPayOrderTime},editTime=#{m.editTime},isLoss=#{m.isLoss}"); - // 浼氬憳鏈夋秷璐瑰拰鎵ц灏辨槸娲昏穬浼氬憳 - String status = null; - if (!UserStatusConstants.USER_STATUS_NON_MEMBER.equals(user.getUserStatus())) { - status = UserStatusConstants.USER_STATUS_ACTIVE_MEMBER; - sqlValues.put("userStatus", status); - sql.append(",userStatus=#{m.userStatus}"); - } - sql.append(" WHERE id=#{m.id} AND isDel=#{m.isDel}"); - sqlSentence.sqlSentence(sql.toString(), sqlValues); - commonService.updateWhere(UserMapper.class, sqlSentence); - // 娣诲姞璋冩暣鐢ㄦ埛鐘舵�佹棩蹇� 璋冩暣浜嗙敤鎴风瓑绾у湪鍐欏叆鏃ュ織 - if (!StringUtils.isEmpty(status)) { - UserStatusTool.addUserStatusLog(commonService, user, UserStatusLog.CHANGE_STATUS_TYPE_ORDER, ordersTotal.getId(), UserStatusConstants.USER_STATUS_ACTIVE_MEMBER); - } - } catch (Exception e) { - logger.info("鏇存柊鐢ㄦ埛鏈�鍚庝笅鍗曟椂闂�,寮傚父:{}", e.getMessage(), e); - } + //杩斿洖phis璁㈠崟鍙枫�乸his璁㈠崟id data.put("orderId",ordersTotal.getId()); diff --git a/phi_platform_user/src/main/java/com/hx/phip/util/api/PartialRefundUtil.java b/phi_platform_user/src/main/java/com/hx/phip/util/api/PartialRefundUtil.java index 88976d0..27fcbbe 100644 --- a/phi_platform_user/src/main/java/com/hx/phip/util/api/PartialRefundUtil.java +++ b/phi_platform_user/src/main/java/com/hx/phip/util/api/PartialRefundUtil.java @@ -217,10 +217,10 @@ sqlSentence.setSqlSentence("select * from refund_record_coupon where refundRecordId=#{m.refundRecordId} and isDel=0 "); List<RefundRecordCoupon> refundRecordCouponList=commonService.selectList(RefundRecordCouponMapper.class,sqlSentence); //閫�娆炬垚鍔� - map.put("isDel", BaseEntity.YES); + map.put("status", BaseEntity.YES); CouponOrderDiscountLog couponOrderDiscountLog=null; for (RefundRecordCoupon refundRecordCoupon : refundRecordCouponList) { - sqlSentence.setSqlSentence(" isDel=#{m.isDel} WHERE id = #{m.id} "); + sqlSentence.setSqlSentence(" status=#{m.status} WHERE id = #{m.id} "); map.put("id", refundRecordCoupon.getCouponOrderId()); couponOrderDiscountLog=commonService.selectOneByKey(CouponOrderDiscountLogMapper.class,refundRecordCoupon.getCouponOrderId()); if(couponOrderDiscountLog==null){ -- Gitblit v1.8.0