瀏覽代碼

Merge branch 'master' of http://git.ycjcjy.com/zhiyuxing/estateagents

胡轶钦 5 年之前
父節點
當前提交
34c6baafef

+ 10
- 0
src/main/java/com/huiju/estateagents/common/CommConstant.java 查看文件

@@ -245,6 +245,16 @@ public class CommConstant {
245 245
      */
246 246
     public static final Integer POINTS_RULE_SIGNUP_AGENT = 4;
247 247
 
248
+    /**
249
+     * 平台积分
250
+     */
251
+    public static final String POINTS_RULE_PLATFORM = "platform";
252
+
253
+    /**
254
+     * 项目积分
255
+     */
256
+    public static final String POINTS_RULE_PROJECT = "project";
257
+
248 258
 
249 259
     // ----   用户活跃数  查询条件 start ------
250 260
 

+ 10
- 1
src/main/java/com/huiju/estateagents/controller/TdPointsRulesController.java 查看文件

@@ -8,6 +8,7 @@ import com.huiju.estateagents.base.ResponseBean;
8 8
 import com.huiju.estateagents.common.CommConstant;
9 9
 import com.huiju.estateagents.entity.TdPointsRules;
10 10
 import com.huiju.estateagents.service.ITdPointsRulesService;
11
+import org.apache.commons.lang3.StringUtils;
11 12
 import org.slf4j.Logger;
12 13
 import org.slf4j.LoggerFactory;
13 14
 import org.springframework.beans.factory.annotation.Autowired;
@@ -45,13 +46,21 @@ public class TdPointsRulesController extends BaseController {
45 46
      */
46 47
     @RequestMapping(value="/admin/tdPointsRules",method= RequestMethod.GET)
47 48
     public ResponseBean tdPointsRulesList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
48
-                                          @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
49
+                                          @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
50
+                                          @RequestParam(value ="buildingId", required = false) String buildingId,
51
+                                          @RequestParam(value = "type", required = false) String type){
49 52
         ResponseBean responseBean = new ResponseBean();
50 53
         try {
51 54
             //使用分页插件
52 55
 		    IPage<TdPointsRules> pg = new Page<>(pageNum, pageSize);
53 56
             QueryWrapper<TdPointsRules> queryWrapper = new QueryWrapper<>();
54 57
             queryWrapper.orderByDesc("create_date");
58
+            queryWrapper.eq(StringUtils.isNotBlank(buildingId),"building_id", buildingId);
59
+            if (CommConstant.POINTS_RULE_PLATFORM.equals(type)) {
60
+                queryWrapper.isNull("building_id");
61
+            } else if (CommConstant.POINTS_RULE_PROJECT.equals(type)) {
62
+                queryWrapper.isNotNull("building_id");
63
+            }
55 64
 
56 65
             IPage<TdPointsRules> result = iTdPointsRulesService.page(pg, queryWrapper);
57 66
             responseBean.addSuccess(result);