chenjiahe
2023-08-14 f3ff4ed544dab12f9471a738e106379a466bb5e2
phi_platform_common/src/main/java/com/hx/phip/tool/payment/ConsumeTool.java
@@ -2,10 +2,10 @@
import com.hx.common.service.CommonService;
import com.hx.mybatisTool.SqlSentence;
import com.hx.phiappt.dao.mapper.ConsumeNotifyMapper;
import com.hx.phiappt.model.PaymentMethod;
import com.hx.phiappt.model.consume.ConsumeNotify;
import com.hx.phiappt.model.consume.ConsumePay;
import com.hx.phip.dao.mapper.ConsumeNotifyMapper;
import com.hx.phip.dao.mapper.PaymentMethodMapper;
import com.hx.util.StringUtils;
@@ -162,8 +162,11 @@
        StringBuilder stringBuilder = new StringBuilder();
        values.put("orderId",orderId);
        values.put("paymentNo",paymentNo);
        stringBuilder.append("SELECT * FROM consume_notify WHERE isDel = 0 AND paymentNo = #{m.paymentNo} AND orderId = #{m.orderId}");
        stringBuilder.append("SELECT * FROM consume_notify WHERE isDel = 0 AND orderId = #{m.orderId}");
        if(StringUtils.noNull(paymentNo)){
            values.put("paymentNo",paymentNo);
            stringBuilder.append(" AND paymentNo = #{m.paymentNo}");
        }
        if(payAmount != null){
            values.put("payAmount",payAmount);
            stringBuilder.append(" AND payAmount = #{m.payAmount}");
@@ -182,7 +185,7 @@
        values.put("id",consumeNotify.getId());
        values.put("refundStatus",refundStatus);
        sqlSentence.sqlUpdate("refundTotal = refundTotal+#{m.refundTotal},refundStatus = #{m.refundStatus} WHERE id = #{m.id}",values);
        commonService.updateWhere(ConsumeNotify.class,sqlSentence);
        commonService.updateWhere(ConsumeNotifyMapper.class,sqlSentence);
    }