| | |
| | | int opNum = 0; |
| | | StringBuilder sql; |
| | | for(UserCardUsed userCardUsed:userCardUsedList){ |
| | | //判断是否够了,跳出循环 |
| | | if(opNum == returnNum){ |
| | | break; |
| | | } |
| | | sql = new StringBuilder(); |
| | | sql.append("isDel = 1"); |
| | | map.clear(); |
| | |
| | | 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); |