wuxw лет назад: 4
Родитель
Сommit
1f0721af7f

+ 0 - 1
service-api/src/main/java/com/java110/api/smo/payment/impl/ToPaySMOImpl.java

@@ -94,7 +94,6 @@ public class ToPaySMOImpl extends AppAbstractComponentSMO implements IToPaySMO {
         double money = Double.parseDouble(orderInfo.getString("receivedAmount"));
         //需要判断金额是否 == 0 等于0 直接掉缴费通知接口
         if (money <= 0) {
-
             JSONObject paramOut = new JSONObject();
             paramOut.put("oId", orderId);
             String urlOut = "fee.payFeeConfirm";

+ 15 - 5
service-fee/src/main/java/com/java110/fee/cmd/fee/PayFeePreCmd.java

@@ -46,7 +46,7 @@ import java.util.Map;
  * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
  * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
  */
-@Java110Cmd(serviceCode = "fee.payFeePreNew")
+@Java110Cmd(serviceCode = "fee.payFeePre")
 public class PayFeePreCmd extends AbstractServiceCmdListener {
     private static Logger logger = LoggerFactory.getLogger(PayFeePreCmd.class);
 
@@ -102,13 +102,14 @@ public class PayFeePreCmd extends AbstractServiceCmdListener {
     public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
         logger.debug("ServiceDataFlowEvent : {}", event);
 
-        JSONObject paramObj = reqJson;
 
-        JSONArray businesses = new JSONArray();
         //判断是否有折扣情况
-        judgeDiscount(paramObj);
+        judgeDiscount(reqJson);
+        //2.0 考虑账户抵消
+        judgeAccount(reqJson);
         //3.0 考虑优惠卷
-        checkCouponUser(paramObj);
+        checkCouponUser(reqJson);
+
 
         String appId = cmdDataFlowContext.getReqHeaders().get("app-id");
         reqJson.put("appId", appId);
@@ -146,6 +147,14 @@ public class PayFeePreCmd extends AbstractServiceCmdListener {
         cmdDataFlowContext.setResponseEntity(responseEntity);
     }
 
+    /**
+     *  考虑账户抵消
+     * @param reqJson
+     */
+    private void judgeAccount(JSONObject reqJson) {
+
+    }
+
     private void checkCouponUser(JSONObject paramObj) {
         JSONArray couponList = paramObj.getJSONArray("couponList");
         BigDecimal couponPrice = new BigDecimal(0.0);
@@ -153,6 +162,7 @@ public class PayFeePreCmd extends AbstractServiceCmdListener {
 
         if (couponList == null || couponList.size() < 1) {
             paramObj.put("couponPrice", couponPrice);
+            paramObj.put("couponUserDtos", new ArrayList<CouponUserDto>()); //这里考虑空
             return;
         }
         for (int couponIndex = 0; couponIndex < couponList.size(); couponIndex++) {