chenjiahe
2023-05-06 1d573f8aecdeba9a0824eb10e45178c325cf7703
phi_platform_user/src/main/java/com/hx/phip/tool/refund/PartialRefundUtil.java
@@ -1138,6 +1138,10 @@
        int opNum = 0;
        StringBuilder sql;
        for(UserCardUsed userCardUsed:userCardUsedList){
            //判断是否够了,跳出循环
            if(opNum == returnNum){
                break;
            }
            sql = new StringBuilder();
            sql.append("isDel = 1");
            map.clear();
@@ -1153,10 +1157,6 @@
            sql.append(" WHERE id = #{m.id} AND isDel = 0");
            sqlSentence.sqlUpdate(sql.toString(),map);
            opNum = opNum+commonService.updateWhere(UserCardUsedMapper.class,sqlSentence);
            //判断是否够了,跳出循环
            if(opNum == returnNum){
                return;
            }
        }
        if(opNum != returnNum){
            logger.error("卡包回退数量错误-卡包退款失败,userCardId:{},cardItemInfoId:{},sourceId:{},orderId:{},refundNum:{},returnNum:{},opNum:{}",userCardId,cardItemInfoId,sourceId,orderId,refundNum,returnNum,opNum);