Browse Source

优化代码

Your Name 2 years ago
parent
commit
849a61e7b9

+ 4 - 0
java110-db/src/main/resources/mapper/store/ContractChangePlanServiceDaoImplMapper.xml

@@ -73,6 +73,10 @@
         <if test="storeId !=null and storeId != ''">
             and t.store_id= #{storeId}
         </if>
+        <if test="startTime != null and startTime != ''">
+            and t.create_time &gt; #{startTime}
+            and t.create_time &lt; #{endTime}
+        </if>
         order by t.create_time desc
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}

+ 4 - 0
service-store/src/main/java/com/java110/store/api/ContractApi.java

@@ -907,6 +907,8 @@ public class ContractApi {
                                                           @RequestParam(value = "contractName", required = false) String contractName,
                                                           @RequestParam(value = "contractCode", required = false) String contractCode,
                                                           @RequestParam(value = "contractType", required = false) String contractType,
+                                                          @RequestParam(value = "logStartTime", required = false) String logStartTime,
+                                                          @RequestParam(value = "logEndTime", required = false) String logEndTime,
                                                           @RequestParam(value = "planId", required = false) String planId
     ) {
         ContractChangePlanDto contractChangePlanDto = new ContractChangePlanDto();
@@ -918,6 +920,8 @@ public class ContractApi {
         contractChangePlanDto.setPlanId(planId);
         contractChangePlanDto.setContractCode(contractCode);
         contractChangePlanDto.setContractType(contractType);
+        contractChangePlanDto.setStartTime(logStartTime);
+        contractChangePlanDto.setEndTime(logEndTime);
         return getContractChangePlanBMOImpl.get(contractChangePlanDto);
     }