浏览代码

Merge remote-tracking branch 'origin/master'

Joburgess 5 年之前
父节点
当前提交
da22ea32ee

+ 10 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRepairServiceImpl.java

@@ -91,8 +91,17 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
         BigDecimal amount = repairInfo.getAmount();
         String orderNo = idGeneratorService.generatorId("payment") + "";
         repairInfo.setTransNo(orderNo);
+        repairInfo.setRepairStatus(0);
+        repairInfo.setPayStatus(0);
+        repairInfo.setCreateTime(date);
+        repairInfo.setUpdateTime(date);
         studentRepairDao.insert(repairInfo);
-
+        if (repairInfo.getType() == 1) {
+            Map<String, Object> repairInfoMap = new HashMap<>();
+            MapUtil.populateMap(repairInfoMap, repairInfo);
+            return repairInfoMap;
+        }
+        repairInfo.setPayStatus(1);
         String channelType = "";
 
         StudentPaymentOrder studentPaymentOrder = new StudentPaymentOrder();
@@ -110,10 +119,8 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
         studentPaymentOrder.setRoutingOrganId(repairInfo.getOrganId());
 
         studentPaymentOrderService.insert(studentPaymentOrder);
-
         studentPaymentOrder.setVersion(0);
 
-
         if (amount.compareTo(BigDecimal.ZERO) == 0) {
             Map<String, String> notifyMap = new HashMap<>();
             notifyMap.put("tradeState", "1");

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/StudentRepairMapper.xml

@@ -183,7 +183,7 @@
                 AND sr.subject_id_ = #{subjectId}
             </if>
             <if test="type != null">
-                AND sr.type = #{type}
+                AND sr.type_ = #{type}
             </if>
             <if test="repairStatus != null">
                 AND sr.repair_status_ = #{repairStatus}

+ 6 - 0
mec-web/src/main/java/com/ym/mec/web/controller/StudentRepairController.java

@@ -9,6 +9,7 @@ import com.ym.mec.biz.dal.page.RepairStudentQueryInfo;
 import com.ym.mec.biz.service.StudentRepairService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
+import com.ym.mec.util.date.DateUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
@@ -20,6 +21,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.util.Arrays;
+import java.util.Date;
 import java.util.List;
 import java.util.Objects;
 
@@ -56,6 +58,10 @@ public class StudentRepairController extends BaseController {
                 }
             }
         }
+        Date endTime = queryInfo.getEndTime();
+        if(endTime != null){
+            queryInfo.setEndTime(DateUtil.addDays(endTime, 1));
+        }
         return succeed(studentRepairService.queryPage(queryInfo));
     }