Ver código fonte

积分退款流程返回积分枚举修改

lxb 2 semanas atrás
pai
commit
6c43193d68

+ 11 - 10
fs-service/src/main/java/com/fs/his/service/impl/FsIntegralOrderServiceImpl.java

@@ -397,7 +397,7 @@ public class FsIntegralOrderServiceImpl implements IFsIntegralOrderService
                 if (remainingIntegral < 0) {
                     throw new CustomException("积分不足,无法创建订单");
                 }
-                
+
                 //写入日志
                 FsUser userMap=new FsUser();
                 userMap.setUserId(user.getUserId());
@@ -749,7 +749,7 @@ public class FsIntegralOrderServiceImpl implements IFsIntegralOrderService
             }
 
             List<Long> goodsIds = new ArrayList<>();
-            
+
             // 解析订单商品信息,获取商品ID列表
             if (order.getItemJson().startsWith("[") && order.getItemJson().endsWith("]")) {
                 // 多个商品
@@ -862,10 +862,11 @@ public class FsIntegralOrderServiceImpl implements IFsIntegralOrderService
             fsUserIntegralLogs.setBalance(fsUser.getIntegral());
             fsUserIntegralLogs.setBusinessId(fsIntegralOrder.getOrderId().toString());
             fsUserIntegralLogs.setUserId(fsIntegralOrder.getUserId());
-            fsUserIntegralLogs.setLogType(20);
+            fsUserIntegralLogs.setLogType(FsUserIntegralLogTypeEnum.TYPE_27.getValue());//20
             fsUserIntegralLogs.setIntegral(Long.parseLong(fsIntegralOrder.getIntegral()));
             fsUserIntegralLogs.setBusinessType(2);
             fsUserIntegralLogs.setStatus(0);
+            fsUserIntegralLogs.setCreateTime(new Date());
             i = fsUserIntegralLogsMapper.insertFsUserIntegralLogs(fsUserIntegralLogs);
         }
         return i;
@@ -1105,11 +1106,11 @@ public class FsIntegralOrderServiceImpl implements IFsIntegralOrderService
             throw new ServiceException("导入数据不能为空!");
         }
         FsIntegralOrderImportResultVO result = new FsIntegralOrderImportResultVO();
-        
+
         for (int i = 0; i < list.size(); i++) {
             FsIntegralOrderExcelVO vo = list.get(i);
             int rowNum = i + 2; // Excel行号从2开始(第1行是表头)
-            
+
             try {
                 //1.必填参数
                 ExcelUtils.validateRequiredFields(vo, rowNum);
@@ -1124,11 +1125,11 @@ public class FsIntegralOrderServiceImpl implements IFsIntegralOrderService
                     result.setFailureNum(result.getFailureNum() + 1);
                     continue;
                 }
-                
+
                 FsIntegralOrder param = new FsIntegralOrder(); //修改订单的参数
                 param.setOrderCode(vo.getOrderCode());
                 param.setOrderId(order.getOrderId());
-                
+
                 if ("6".equals(vo.getStatus())) {
                     FsIntegralOrderImportResultVO.ImportResultItem item = new FsIntegralOrderImportResultVO.ImportResultItem();
                     item.setRowNum(rowNum);
@@ -1183,7 +1184,7 @@ public class FsIntegralOrderServiceImpl implements IFsIntegralOrderService
                         continue;
                     }
                 }
-                
+
                 // 处理物流字段(非必须,填了就更新)
                 if (StringUtils.isNotBlank(vo.getDeliveryCode())) {
                     param.setDeliveryCode(vo.getDeliveryCode());
@@ -1194,7 +1195,7 @@ public class FsIntegralOrderServiceImpl implements IFsIntegralOrderService
                 if (StringUtils.isNotBlank(vo.getDeliverySn())) {
                     param.setDeliverySn(vo.getDeliverySn());
                 }
-                
+
                 param.setDeliveryStatus((vo.getDeliveryStatus()==null|| vo.getDeliveryStatus().isEmpty())?null:Integer.valueOf(vo.getDeliveryStatus()));
                 param.setDeliveryType(vo.getDeliveryType().isEmpty()?null:vo.getDeliveryType());
                 param.setUpdateTime(DateUtils.getNowDate());
@@ -1216,7 +1217,7 @@ public class FsIntegralOrderServiceImpl implements IFsIntegralOrderService
                 result.setFailureNum(result.getFailureNum() + 1);
             }
         }
-        
+
         return result;
     }