dingxin 5 years ago
parent
commit
ed7d8e53f7

+ 4
- 4
src/main/java/com/huiju/estateagents/controller/HelpActivityController.java View File

@@ -89,8 +89,8 @@ public class HelpActivityController extends BaseController {
89 89
             @ApiImplicitParam(dataTypeClass = Integer.class, name = "cityId", paramType = "query", value = "城市"),
90 90
             @ApiImplicitParam(dataTypeClass = String.class, name = "buildingId", paramType = "query", value = "项目"),
91 91
             @ApiImplicitParam(dataTypeClass = String.class, name = "title", paramType = "query", value = "标题"),
92
-            @ApiImplicitParam(dataTypeClass = Data.class, name = "startDate", paramType = "query", value = "活动开始时间"),
93
-            @ApiImplicitParam(dataTypeClass = Data.class, name = "endDate", paramType = "query", value = "活动结束时间"),
92
+            @ApiImplicitParam(dataTypeClass = String.class, name = "startDate", paramType = "query", value = "活动开始时间"),
93
+            @ApiImplicitParam(dataTypeClass = String.class, name = "endDate", paramType = "query", value = "活动结束时间"),
94 94
             @ApiImplicitParam(dataTypeClass = Integer.class, name = "activityStatus", paramType = "query", value = "活动状态")
95 95
     })
96 96
     @RequestMapping(value = "admin/helpActivity/list", method = RequestMethod.GET)
@@ -99,8 +99,8 @@ public class HelpActivityController extends BaseController {
99 99
                                          @RequestParam(value = "cityId", required = false) Integer cityId,
100 100
                                          @RequestParam(value = "buildingId", required = false) String buildingId,
101 101
                                          @RequestParam(value = "title", required = false) String title,
102
-                                         @RequestParam(value = "startDate", required = false) Data startDate,
103
-                                         @RequestParam(value = "endDate", required = false) Data endDate,
102
+                                         @RequestParam(value = "startDate", required = false) String startDate,
103
+                                         @RequestParam(value = "endDate", required = false) String endDate,
104 104
                                          @RequestParam(value = "activityStatus", required = false) Integer activityStatus,
105 105
                                          HttpServletRequest request) {
106 106
         Integer orgId = getOrgId(request);

+ 1
- 1
src/main/java/com/huiju/estateagents/mapper/HelpActivityMapper.java View File

@@ -30,5 +30,5 @@ public interface HelpActivityMapper extends BaseMapper<HelpActivity> {
30 30
      * @param orgId
31 31
      * @return
32 32
      */
33
-    IPage<HelpActivity> helpActivityListPage(IPage<HelpActivity> pg, @Param("cityId")Integer cityId, @Param("buildingId")String buildingId, @Param("title")String title, @Param("startDate")Data startDate, @Param("endDate") Data endDate, @Param("activityStatus")Integer activityStatus, @Param("orgId")Integer orgId);
33
+    IPage<HelpActivity> helpActivityListPage(IPage<HelpActivity> pg, @Param("cityId")Integer cityId, @Param("buildingId")String buildingId, @Param("title")String title, @Param("startDate")String startDate, @Param("endDate") String endDate, @Param("activityStatus")Integer activityStatus, @Param("orgId")Integer orgId);
34 34
 }

+ 1
- 1
src/main/java/com/huiju/estateagents/service/IHelpActivityService.java View File

@@ -32,7 +32,7 @@ public interface IHelpActivityService extends IService<HelpActivity> {
32 32
      * @param orgId
33 33
      * @return
34 34
      */
35
-    ResponseBean helpActivityList(Integer pageNum, Integer pageSize, Integer cityId, String buildingId, String title, Data startDate, Data endDate, Integer activityStatus, Integer orgId);
35
+    ResponseBean helpActivityList(Integer pageNum, Integer pageSize, Integer cityId, String buildingId, String title, String startDate, String endDate, Integer activityStatus, Integer orgId);
36 36
 
37 37
     /**
38 38
      * 活动助力添加

+ 7
- 2
src/main/java/com/huiju/estateagents/service/impl/HelpActivityServiceImpl.java View File

@@ -45,7 +45,7 @@ public class HelpActivityServiceImpl extends ServiceImpl<HelpActivityMapper, Hel
45 45
     HelpRecordMapper helpRecordMapper;
46 46
 
47 47
     @Override
48
-    public ResponseBean helpActivityList(Integer pageNum, Integer pageSize, Integer cityId, String buildingId, String title, Data startDate, Data endDate, Integer activityStatus, Integer orgId) {
48
+    public ResponseBean helpActivityList(Integer pageNum, Integer pageSize, Integer cityId, String buildingId, String title, String startDate, String endDate, Integer activityStatus, Integer orgId) {
49 49
         ResponseBean responseBean = new ResponseBean<>();
50 50
         IPage<HelpActivity> pg = new Page<>(pageNum, pageSize);
51 51
         IPage<HelpActivity> result = taHelpActivityMapper.helpActivityListPage(pg, cityId, buildingId, title, startDate, endDate, activityStatus, orgId);
@@ -127,6 +127,11 @@ public class HelpActivityServiceImpl extends ServiceImpl<HelpActivityMapper, Hel
127 127
     public ResponseBean helpInitiateRecordVerify(Integer helpRecordInitiateId, Integer verifyCode) {
128 128
         ResponseBean responseBean = new ResponseBean<>();
129 129
         HelpInitiateRecord helpInitiateRecord = helpInitiateRecordMapper.selectById(helpRecordInitiateId);
130
+        if (null ==verifyCode || "".equals(verifyCode)){
131
+            responseBean.addError("请输入核销码");
132
+            return responseBean;
133
+        }
134
+
130 135
         // 判断是否已核销
131 136
         if ("1".equals(helpInitiateRecord.getVerificationStatus())){
132 137
             responseBean.addSuccess("已核销");
@@ -138,7 +143,7 @@ public class HelpActivityServiceImpl extends ServiceImpl<HelpActivityMapper, Hel
138 143
             helpInitiateRecordMapper.updateById(helpInitiateRecord);
139 144
             responseBean.addSuccess("成功");
140 145
         }else {
141
-            responseBean.addError("核销码错误");
146
+            responseBean.addError("核销码错误,请重新输入");
142 147
         }
143 148
         return responseBean;
144 149
     }

+ 5
- 1
src/main/resources/mapper/HelpActivityMapper.xml View File

@@ -13,7 +13,11 @@
13 13
         <if test="title != null and title != ''">
14 14
             and title = #{title}
15 15
         </if>
16
-        <if test="startDate != null and endDate != null">
16
+        <if test="startDate != null and startDate != ''and startDate!='Invalid date'">
17
+         and date_format(start_date,'%Y-%m-%d') = date_format( #{startDate}, '%Y-%m-%d' )
18
+        </if>
19
+        <if test="endDate != null and endDate != ''and endDate!='Invalid date'">
20
+            and date_format(end_date,'%Y-%m-%d') = date_format( #{endDate}, '%Y-%m-%d' )
17 21
         </if>
18 22
         <if test="activityStatus != null and activityStatus != null">
19 23
             and activity_status = #{activityStatus}