胡轶钦 5 年 前
コミット
4fd250b317

+ 4
- 4
src/main/java/com/huiju/estateagents/controller/TaCheckinController.java ファイルの表示

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

+ 2
- 1
src/main/java/com/huiju/estateagents/interceptor/AccessInterceptor.java ファイルの表示

16
     private String[] whiteList = {
16
     private String[] whiteList = {
17
             "/wx/chat", // 聊天暂时不鉴权
17
             "/wx/chat", // 聊天暂时不鉴权
18
             "/api/wx/login",
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 ファイルの表示

5
 import com.baomidou.mybatisplus.core.metadata.IPage;
5
 import com.baomidou.mybatisplus.core.metadata.IPage;
6
 import com.huiju.estateagents.entity.TaCheckin;
6
 import com.huiju.estateagents.entity.TaCheckin;
7
 import org.apache.ibatis.annotations.Mapper;
7
 import org.apache.ibatis.annotations.Mapper;
8
+import org.apache.ibatis.annotations.Param;
8
 
9
 
9
 /**
10
 /**
10
  * <p>
11
  * <p>
16
  */
17
  */
17
 @Mapper
18
 @Mapper
18
 public interface TaCheckinMapper extends BaseMapper<TaCheckin> {
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 ファイルの表示

14
  * @since 2019-07-24
14
  * @since 2019-07-24
15
  */
15
  */
16
 public interface ITaCheckinService extends IService<TaCheckin> {
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 ファイルの表示

22
     TaCheckinMapper taCheckinMapper;
22
     TaCheckinMapper taCheckinMapper;
23
 
23
 
24
     @Override
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 ファイルの表示

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