胡轶钦 5 lat temu
rodzic
commit
4fd250b317

+ 4
- 4
src/main/java/com/huiju/estateagents/controller/TaCheckinController.java Wyświetl plik

@@ -36,7 +36,7 @@ import java.util.List;
36 36
  * @since 2019-07-24
37 37
  */
38 38
 @RestController
39
-@RequestMapping("/")
39
+@RequestMapping("/api")
40 40
 public class TaCheckinController extends BaseController {
41 41
 
42 42
     private final Logger logger = LoggerFactory.getLogger(TaCheckinController.class);
@@ -53,14 +53,14 @@ public class TaCheckinController extends BaseController {
53 53
      * @param pageSize
54 54
      * @return
55 55
      */
56
-    @RequestMapping(value="/taCheckin",method= RequestMethod.GET)
56
+    @RequestMapping(value="/taCheckin/activity/{activity}",method= RequestMethod.GET)
57 57
     public ResponseBean taCheckinList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
58
-                                      @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
58
+                                      @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,String activity){
59 59
         ResponseBean responseBean = new ResponseBean();
60 60
         try {
61 61
             //使用分页插件
62 62
 		    IPage<TaCheckin> pg = new Page<>(pageNum, pageSize);
63
-            IPage<TaCheckin> result = iTaCheckinService.getUndisplayedCustomerList(pg);
63
+            IPage<TaCheckin> result = iTaCheckinService.getUndisplayedCustomerList(pg,activity);
64 64
             for (int i = 0;i<result.getRecords().size();i++){
65 65
                 result.getRecords().get(i).setStatus(1);
66 66
             }

+ 2
- 1
src/main/java/com/huiju/estateagents/interceptor/AccessInterceptor.java Wyświetl plik

@@ -16,7 +16,8 @@ public class AccessInterceptor implements HandlerInterceptor {
16 16
     private String[] whiteList = {
17 17
             "/wx/chat", // 聊天暂时不鉴权
18 18
             "/api/wx/login",
19
-            "/api/admin/signin"
19
+            "/api/admin/signin",
20
+            "/api/taCheckin/activity"
20 21
     };
21 22
 
22 23
     /*

+ 2
- 1
src/main/java/com/huiju/estateagents/mapper/TaCheckinMapper.java Wyświetl plik

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 5
 import com.baomidou.mybatisplus.core.metadata.IPage;
6 6
 import com.huiju.estateagents.entity.TaCheckin;
7 7
 import org.apache.ibatis.annotations.Mapper;
8
+import org.apache.ibatis.annotations.Param;
8 9
 
9 10
 /**
10 11
  * <p>
@@ -16,6 +17,6 @@ import org.apache.ibatis.annotations.Mapper;
16 17
  */
17 18
 @Mapper
18 19
 public interface TaCheckinMapper extends BaseMapper<TaCheckin> {
19
-    IPage<TaCheckin>getUndisplayedCustomerList(IPage<TaCheckin> pg);
20
+    IPage<TaCheckin>getUndisplayedCustomerList(IPage<TaCheckin> pg, @Param("activity")String activity);
20 21
 
21 22
 }

+ 1
- 1
src/main/java/com/huiju/estateagents/service/ITaCheckinService.java Wyświetl plik

@@ -14,6 +14,6 @@ import com.huiju.estateagents.entity.TaCheckin;
14 14
  * @since 2019-07-24
15 15
  */
16 16
 public interface ITaCheckinService extends IService<TaCheckin> {
17
-    IPage<TaCheckin> getUndisplayedCustomerList(IPage<TaCheckin> pg);
17
+    IPage<TaCheckin> getUndisplayedCustomerList(IPage<TaCheckin> pg,String activity);
18 18
 
19 19
 }

+ 2
- 2
src/main/java/com/huiju/estateagents/service/impl/TaCheckinServiceImpl.java Wyświetl plik

@@ -22,8 +22,8 @@ public class TaCheckinServiceImpl extends ServiceImpl<TaCheckinMapper, TaCheckin
22 22
     TaCheckinMapper taCheckinMapper;
23 23
 
24 24
     @Override
25
-    public IPage<TaCheckin> getUndisplayedCustomerList(IPage<TaCheckin> pg){
26
-        return taCheckinMapper.getUndisplayedCustomerList(pg);
25
+    public IPage<TaCheckin> getUndisplayedCustomerList(IPage<TaCheckin> pg,String activity){
26
+        return taCheckinMapper.getUndisplayedCustomerList(pg,activity);
27 27
     }
28 28
 
29 29
 }

+ 1
- 0
src/main/resources/mapper/TaCheckinMapper.xml Wyświetl plik

@@ -8,6 +8,7 @@
8 8
         ta_checkin
9 9
         WHERE
10 10
         STATUS &lt; 1
11
+        AND activity = #{activity}
11 12
     </select>
12 13
 
13 14
 </mapper>