dingxin 6 anni fa
parent
commit
0000a74098

+ 2
- 2
src/main/java/com.huiju.welcome/controller/TaFirstUsherRecordController.java Vedi File

@@ -151,12 +151,12 @@ public class TaFirstUsherRecordController extends BaseController {
151 151
     }
152 152
 
153 153
     @RequestMapping(value="/firstUsherRecord",method= RequestMethod.GET)
154
-    public ResponseBean list(@RequestParam(defaultValue = "1") int pageNumber,
154
+    public ResponseBean list(@RequestParam(defaultValue = "1") int pageNum,
155 155
                              @RequestParam(defaultValue = "10") int pageSize,
156 156
                              @RequestParam(value = "plateNumber",required = false) String plateNumber,
157 157
                              @RequestParam(value = "visiteDate",required = false) String visiteDate){
158 158
             ResponseBean responseBean = new ResponseBean();
159
-            IPage<TaFirstUsherRecord> pg = new Page<>(pageNumber, pageSize);
159
+            IPage<TaFirstUsherRecord> pg = new Page<>(pageNum, pageSize);
160 160
             IPage<TaFirstUsherRecord> result = iTaFirstUsherRecordService.taFirstUsherRecordlist(pg,plateNumber,visiteDate);
161 161
             responseBean.addSuccess(result);
162 162
             return responseBean;

+ 8
- 4
src/main/java/com.huiju.welcome/controller/TaMainUsherRecordController.java Vedi File

@@ -195,12 +195,16 @@ public class TaMainUsherRecordController extends BaseController {
195 195
     }
196 196
 
197 197
     @RequestMapping(value="/mainUsherRecord",method= RequestMethod.GET)
198
-    public ResponseBean list(@RequestParam(defaultValue = "1") int pageNumber,
199
-                            @RequestParam(defaultValue = "10") int pageSize){
198
+    public ResponseBean list(@RequestParam(defaultValue = "1") int pageNum,
199
+                            @RequestParam(defaultValue = "10") int pageSize,
200
+                             @RequestParam(value = "phone",required = false) String phone,
201
+                             @RequestParam(value = "platNumber",required = false) String platNumber,
202
+                             @RequestParam(value = "personName",required = false) String personName,
203
+                             @RequestParam(value = "appointment",required = false) Integer appointment){
200 204
         ResponseBean responseBean = new ResponseBean();
201 205
 
202
-        IPage<TaMainUsherRecord> pg = new Page<>(pageNumber, pageSize);
203
-        IPage<TaMainUsherRecord> result = iTaMainUsherRecordService.taMainUsherRecordList(pg);
206
+        IPage<TaMainUsherRecord> pg = new Page<>(pageNum, pageSize);
207
+        IPage<TaMainUsherRecord> result = iTaMainUsherRecordService.taMainUsherRecordList(pg,phone,platNumber,personName,appointment);
204 208
         responseBean.addSuccess(result);
205 209
         return responseBean;
206 210
     }

+ 7
- 8
src/main/java/com.huiju.welcome/controller/TaVisitorAppointmentController.java Vedi File

@@ -121,19 +121,18 @@ public class TaVisitorAppointmentController extends BaseController {
121 121
             return ResponseBean.error("更新数据失败", HttpStatus.SC_INTERNAL_SERVER_ERROR);
122 122
         }
123 123
     }
124
-    @ApiOperation(value = "访客预约信息",httpMethod = "访客预约信息")
124
+    @ApiOperation(value = "访客预约信息",notes = "访客预约信息")
125 125
     @RequestMapping(value="/visitorAppointmentList",method= RequestMethod.GET)
126 126
     @ApiImplicitParams({
127 127
             @ApiImplicitParam(paramType = "query", dataType = "String", name = "platNumber", value = "车牌"),
128 128
             @ApiImplicitParam(paramType = "query", dataType = "String", name = "personName", value = "预约人姓名"),
129 129
             @ApiImplicitParam(paramType = "query", dataType = "String", name = "phone", value = "预约人电话")})
130
-    public ResponseBean visitorAppointmentList(@RequestParam(defaultValue = "1") int pageNumber,
131
-                             @RequestParam(defaultValue = "10") int pageSize,
132
-                             @RequestParam(value = "platNumber",required = false) String platNumber,
133
-                             @RequestParam(value = "personName",required = false) String personName,
134
-                             @RequestParam(value = "phone",required = false) String phone){
135
-
136
-        IPage<TaVisitorAppointment> pg = new Page<>(pageNumber, pageSize);
130
+    public ResponseBean visitorAppointmentList(@RequestParam(defaultValue = "1") int pageNum,
131
+                                               @RequestParam(defaultValue = "10") int pageSize,
132
+                                               @RequestParam(value = "platNumber",required = false) String platNumber,
133
+                                               @RequestParam(value = "personName",required = false) String personName,
134
+                                               @RequestParam(value = "phone",required = false) String phone){
135
+        IPage<TaVisitorAppointment> pg = new Page<>(pageNum, pageSize);
137 136
         ResponseBean result = taVisitorAppointmentService.visitorAppointmentList(pg,platNumber,personName,phone);
138 137
         return result;
139 138
     }

+ 1
- 1
src/main/java/com.huiju.welcome/mapper/TaMainUsherRecordMapper.java Vedi File

@@ -25,5 +25,5 @@ public interface TaMainUsherRecordMapper extends BaseMapper<TaMainUsherRecord> {
25 25
      * @param pg
26 26
      * @return
27 27
      */
28
-    IPage<TaMainUsherRecord> aMainUsherRecordList(IPage<TaMainUsherRecord> pg);
28
+    IPage<TaMainUsherRecord> taMainUsherRecordList(IPage<TaMainUsherRecord> pg,@Param("phone")String phone,@Param("platNumber")String platNumber,@Param("personName")String personName,@Param("appointment")Integer appointment);
29 29
 }

+ 1
- 1
src/main/java/com.huiju.welcome/service/ITaMainUsherRecordService.java Vedi File

@@ -26,7 +26,7 @@ public interface ITaMainUsherRecordService extends IService<TaMainUsherRecord> {
26 26
      * @param pg
27 27
      * @return
28 28
      */
29
-    IPage<TaMainUsherRecord> taMainUsherRecordList(IPage<TaMainUsherRecord> pg);
29
+    IPage<TaMainUsherRecord> taMainUsherRecordList(IPage<TaMainUsherRecord> pg,String phone,String platNumber,String personName,Integer appointment);
30 30
 
31 31
     /**
32 32
      * 查询客户列表

+ 2
- 2
src/main/java/com.huiju.welcome/service/impl/TaMainUsherRecordServiceImpl.java Vedi File

@@ -69,8 +69,8 @@ public class TaMainUsherRecordServiceImpl extends ServiceImpl<TaMainUsherRecordM
69 69
     }
70 70
     
71 71
     @Override
72
-    public IPage<TaMainUsherRecord> taMainUsherRecordList(IPage<TaMainUsherRecord> pg) {
73
-        IPage<TaMainUsherRecord>  taMainUsherRecordList= taMainUsherRecordMapper.aMainUsherRecordList(pg);
72
+    public IPage<TaMainUsherRecord> taMainUsherRecordList(IPage<TaMainUsherRecord> pg,String phone,String platNumber,String personName,Integer appointment) {
73
+        IPage<TaMainUsherRecord>  taMainUsherRecordList= taMainUsherRecordMapper.taMainUsherRecordList(pg,phone,platNumber,personName,appointment);
74 74
         return taMainUsherRecordList;
75 75
     }
76 76
 

+ 18
- 1
src/main/resources/mapper/TaMainUsherRecordMapper.xml Vedi File

@@ -10,10 +10,27 @@
10 10
         WHERE
11 11
             t.customer_id = #{customerId}
12 12
     </select>
13
-    <select id="aMainUsherRecordList" resultType="com.huiju.welcome.model.TaMainUsherRecord">
13
+    <select id="taMainUsherRecordList" resultType="com.huiju.welcome.model.TaMainUsherRecord">
14 14
         SELECT
15 15
         *
16 16
         FROM
17 17
         ta_main_usher_record
18
+        <where>
19
+            <if test="phone !=null and phone !=''">
20
+                phone LIKE CONCAT('%',#{phone},'%')
21
+            </if>
22
+            <if test="platNumber !=null and platNumber !=''">
23
+                plate_number LIKE CONCAT('%',#{platNumber},'%')
24
+            </if>
25
+
26
+            <if test="personName !=null and personName !=''">
27
+                person_name LIKE CONCAT('%',#{personName},'%')
28
+            </if>
29
+
30
+            <if test="appointment !=null">
31
+                appointment =#{appointment}
32
+            </if>
33
+        </where>
34
+        order by visite_date desc
18 35
     </select>
19 36
 </mapper>