魏熙美 6 years ago
parent
commit
dc1dcf618a
18 changed files with 783 additions and 35 deletions
  1. 15
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/BannerController.java
  2. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/ToBannerMapper.java
  3. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpCarouselSettingMapper.java
  4. 17
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpConfigurationMapper.java
  5. 41
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpEquipmentMapper.java
  6. 105
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpConfiguration.java
  7. 188
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpEquipment.java
  8. 14
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/BannerServiceI.java
  9. 8
    3
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BannerServiceImpl.java
  10. 35
    24
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/MonitoringServiceImpl.java
  11. 3
    3
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java
  12. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/WxLoginServiceImpl.java
  13. 3
    0
      CODE/smart-community/app-api/src/main/resources/mapper/ToBannerMapper.xml
  14. 3
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpCarouselSettingMapper.xml
  15. 153
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpConfigurationMapper.xml
  16. 188
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpEquipmentMapper.xml
  17. 7
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/mode/ResponseBean.java
  18. BIN
      CODE/smart-community/community-common/target/community-common-0.0.1.jar

+ 15
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/BannerController.java View File

@@ -45,14 +45,27 @@ public class BannerController {
45 45
 
46 46
     @ApiOperation(value = "获取首页运营所有banner接口", notes = "获取首页所有运营banner")
47 47
     @ApiImplicitParams({
48
-            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "bannerPosition", value = "banner位: 1首页banner 2服务端banner")
48
+            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "bannerPosition", value = "banner位: 1首页banner 2服务端"),
49 49
     })
50 50
     @RequestMapping(value = "/banners", method = RequestMethod.GET)
51
-    public ResponseBean selectAllToBannerImg(@RequestParam Integer bannerPosition){
51
+    public ResponseBean selectAllToBannerImg(@RequestParam("bannerPosition") Integer bannerPosition){
52 52
         ResponseBean responseBean = new ResponseBean();
53 53
         List<ToBanner> toBannerList = bannerService.viewAllBannerImg(bannerPosition);
54 54
         responseBean.addSuccess(toBannerList);
55 55
         return responseBean;
56 56
     }
57 57
 
58
+    @ApiOperation(value = "获取广告banner接口", notes = "获取广告运营banner")
59
+    @ApiImplicitParams({
60
+            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "bannerPosition", value = " 3 广告banner"),
61
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "communityId", value = "小区编号")
62
+    })
63
+    @RequestMapping(value = "/banners/advertising", method = RequestMethod.GET)
64
+    public ResponseBean selectAllToBannerImg(@RequestParam("bannerPosition") Integer bannerPosition, @RequestParam(value = "communityId", required = false) Integer communityId){
65
+        ResponseBean responseBean = new ResponseBean();
66
+        List<ToBanner> toBannerList = bannerService.viewAllBannerImgAndCommunityId(bannerPosition, communityId);
67
+        responseBean.addSuccess(toBannerList);
68
+        return responseBean;
69
+    }
70
+
58 71
 }

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/ToBannerMapper.java View File

@@ -13,5 +13,5 @@ public interface ToBannerMapper {
13 13
 
14 14
     ToBanner selectByCommunityId(@Param("bannerId") Integer bannerId);
15 15
 
16
-    List<ToBanner> selectAllByNum(@Param("nowTime") String nowTime, @Param("num")Integer num, @Param("bannerPosition") Integer bannerPosition);
16
+    List<ToBanner> selectAllByNum(@Param("nowTime") String nowTime, @Param("num")Integer num, @Param("bannerPosition") Integer bannerPosition, @Param("communityId") Integer communityId);
17 17
 }

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpCarouselSettingMapper.java View File

@@ -20,6 +20,6 @@ public interface TpCarouselSettingMapper {
20 20
 
21 21
      Integer getcarouselNum(@Param("lease") String lease, @Param("communityId") Integer communityId);
22 22
 
23
-    Integer selectCarouselNum(String carouselType);
23
+    Integer selectCarouselNum(@Param("carouselType") String carouselType, @Param("communityId") Integer communityId);
24 24
 
25 25
 }

+ 17
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpConfigurationMapper.java View File

@@ -0,0 +1,17 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TpConfiguration;
4
+
5
+public interface TpConfigurationMapper {
6
+    int deleteByPrimaryKey(Integer id);
7
+
8
+    int insert(TpConfiguration record);
9
+
10
+    int insertSelective(TpConfiguration record);
11
+
12
+    TpConfiguration selectByPrimaryKey(Integer id);
13
+
14
+    int updateByPrimaryKeySelective(TpConfiguration record);
15
+
16
+    int updateByPrimaryKey(TpConfiguration record);
17
+}

+ 41
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpEquipmentMapper.java View File

@@ -0,0 +1,41 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TpEquipment;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+import org.apache.ibatis.annotations.ResultType;
7
+import org.apache.ibatis.annotations.Select;
8
+
9
+import java.util.List;
10
+
11
+@Mapper
12
+public interface TpEquipmentMapper {
13
+    int deleteByPrimaryKey(Integer id);
14
+
15
+    int insert(TpEquipment record);
16
+
17
+    int insertSelective(TpEquipment record);
18
+
19
+    TpEquipment selectByPrimaryKey(Integer id);
20
+
21
+    int updateByPrimaryKeySelective(TpEquipment record);
22
+
23
+    int updateByPrimaryKey(TpEquipment record);
24
+
25
+    /**
26
+     * 根据小区获取 监控列表
27
+     * @param communityId
28
+     * @return
29
+     */
30
+    @ResultType(TpEquipment.class)
31
+    @Select("select " +
32
+            "tm.id as id, " +
33
+            "(select configuration_value FROM tp_configuration WHERE id = tm.url_id) as monitoringUrl, " +
34
+            "(select configuration_value FROM tp_configuration WHERE id = tm.security_guard_tel_id) as securityGuardTel, " +
35
+            "(select configuration_value FROM tp_configuration WHERE id = tm.security_room_tel_id) as securityRoomTel, " +
36
+            "(select configuration_value FROM tp_configuration WHERE id = tm.address_id) as monitoringAddressId " +
37
+            "FROM " +
38
+            "tp_equipment tm " +
39
+            "where tm.community_id = #{communityId} and tm.equipment_type = 1")
40
+    List<TpEquipment> selectByCommunityId(@Param("communityId") Integer communityId);
41
+}

+ 105
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpConfiguration.java View File

@@ -0,0 +1,105 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpConfiguration {
6
+    private Integer id;
7
+
8
+    private String key;
9
+
10
+    private String configurationName;
11
+
12
+    private Integer configurationType;
13
+
14
+    private String configurationValue;
15
+
16
+    private Date createTiem;
17
+
18
+    private Integer createUser;
19
+
20
+    private Date updateTime;
21
+
22
+    private Integer updateUser;
23
+
24
+    private Integer communityId;
25
+
26
+    public Integer getId() {
27
+        return id;
28
+    }
29
+
30
+    public void setId(Integer id) {
31
+        this.id = id;
32
+    }
33
+
34
+    public String getKey() {
35
+        return key;
36
+    }
37
+
38
+    public void setKey(String key) {
39
+        this.key = key == null ? null : key.trim();
40
+    }
41
+
42
+    public String getConfigurationName() {
43
+        return configurationName;
44
+    }
45
+
46
+    public void setConfigurationName(String configurationName) {
47
+        this.configurationName = configurationName == null ? null : configurationName.trim();
48
+    }
49
+
50
+    public Integer getConfigurationType() {
51
+        return configurationType;
52
+    }
53
+
54
+    public void setConfigurationType(Integer configurationType) {
55
+        this.configurationType = configurationType;
56
+    }
57
+
58
+    public String getConfigurationValue() {
59
+        return configurationValue;
60
+    }
61
+
62
+    public void setConfigurationValue(String configurationValue) {
63
+        this.configurationValue = configurationValue == null ? null : configurationValue.trim();
64
+    }
65
+
66
+    public Date getCreateTiem() {
67
+        return createTiem;
68
+    }
69
+
70
+    public void setCreateTiem(Date createTiem) {
71
+        this.createTiem = createTiem;
72
+    }
73
+
74
+    public Integer getCreateUser() {
75
+        return createUser;
76
+    }
77
+
78
+    public void setCreateUser(Integer createUser) {
79
+        this.createUser = createUser;
80
+    }
81
+
82
+    public Date getUpdateTime() {
83
+        return updateTime;
84
+    }
85
+
86
+    public void setUpdateTime(Date updateTime) {
87
+        this.updateTime = updateTime;
88
+    }
89
+
90
+    public Integer getUpdateUser() {
91
+        return updateUser;
92
+    }
93
+
94
+    public void setUpdateUser(Integer updateUser) {
95
+        this.updateUser = updateUser;
96
+    }
97
+
98
+    public Integer getCommunityId() {
99
+        return communityId;
100
+    }
101
+
102
+    public void setCommunityId(Integer communityId) {
103
+        this.communityId = communityId;
104
+    }
105
+}

+ 188
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpEquipment.java View File

@@ -0,0 +1,188 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpEquipment {
6
+    private Integer id;
7
+
8
+    private Integer urlId;
9
+
10
+    private Integer communityId;
11
+
12
+    private Integer securityGuardTelId;
13
+
14
+    private Integer securityRoomTelId;
15
+
16
+    private Integer addressId;
17
+
18
+    private Date createTime;
19
+
20
+    private Integer createUser;
21
+
22
+    private Date updateTime;
23
+
24
+    private Integer updateUser;
25
+
26
+    private Integer uuidId;
27
+
28
+    private String equipmentType;
29
+
30
+    private Integer equipmentTreeId;
31
+    // ====================================
32
+
33
+    /**
34
+     * 监控url
35
+     */
36
+    private String monitoringUrl;
37
+
38
+    /**
39
+     * 保卫人员电话
40
+     */
41
+    private String securityGuardTel;
42
+
43
+    /**
44
+     * 安保室电话
45
+     */
46
+    private String securityRoomTel;
47
+
48
+    /**
49
+     * 监控地址
50
+     */
51
+    private String monitoringAddress;
52
+
53
+    public Integer getId() {
54
+        return id;
55
+    }
56
+
57
+    public void setId(Integer id) {
58
+        this.id = id;
59
+    }
60
+
61
+    public Integer getUrlId() {
62
+        return urlId;
63
+    }
64
+
65
+    public void setUrlId(Integer urlId) {
66
+        this.urlId = urlId;
67
+    }
68
+
69
+    public Integer getCommunityId() {
70
+        return communityId;
71
+    }
72
+
73
+    public void setCommunityId(Integer communityId) {
74
+        this.communityId = communityId;
75
+    }
76
+
77
+    public Integer getSecurityGuardTelId() {
78
+        return securityGuardTelId;
79
+    }
80
+
81
+    public void setSecurityGuardTelId(Integer securityGuardTelId) {
82
+        this.securityGuardTelId = securityGuardTelId;
83
+    }
84
+
85
+    public Integer getSecurityRoomTelId() {
86
+        return securityRoomTelId;
87
+    }
88
+
89
+    public void setSecurityRoomTelId(Integer securityRoomTelId) {
90
+        this.securityRoomTelId = securityRoomTelId;
91
+    }
92
+
93
+    public Integer getAddressId() {
94
+        return addressId;
95
+    }
96
+
97
+    public void setAddressId(Integer addressId) {
98
+        this.addressId = addressId;
99
+    }
100
+
101
+    public Date getCreateTime() {
102
+        return createTime;
103
+    }
104
+
105
+    public void setCreateTime(Date createTime) {
106
+        this.createTime = createTime;
107
+    }
108
+
109
+    public Integer getCreateUser() {
110
+        return createUser;
111
+    }
112
+
113
+    public void setCreateUser(Integer createUser) {
114
+        this.createUser = createUser;
115
+    }
116
+
117
+    public Date getUpdateTime() {
118
+        return updateTime;
119
+    }
120
+
121
+    public void setUpdateTime(Date updateTime) {
122
+        this.updateTime = updateTime;
123
+    }
124
+
125
+    public Integer getUpdateUser() {
126
+        return updateUser;
127
+    }
128
+
129
+    public void setUpdateUser(Integer updateUser) {
130
+        this.updateUser = updateUser;
131
+    }
132
+
133
+    public Integer getUuidId() {
134
+        return uuidId;
135
+    }
136
+
137
+    public void setUuidId(Integer uuidId) {
138
+        this.uuidId = uuidId;
139
+    }
140
+
141
+    public String getEquipmentType() {
142
+        return equipmentType;
143
+    }
144
+
145
+    public void setEquipmentType(String equipmentType) {
146
+        this.equipmentType = equipmentType;
147
+    }
148
+
149
+    public Integer getEquipmentTreeId() {
150
+        return equipmentTreeId;
151
+    }
152
+
153
+    public void setEquipmentTreeId(Integer equipmentTreeId) {
154
+        this.equipmentTreeId = equipmentTreeId;
155
+    }
156
+
157
+    public String getMonitoringUrl() {
158
+        return monitoringUrl;
159
+    }
160
+
161
+    public void setMonitoringUrl(String monitoringUrl) {
162
+        this.monitoringUrl = monitoringUrl;
163
+    }
164
+
165
+    public String getSecurityGuardTel() {
166
+        return securityGuardTel;
167
+    }
168
+
169
+    public void setSecurityGuardTel(String securityGuardTel) {
170
+        this.securityGuardTel = securityGuardTel;
171
+    }
172
+
173
+    public String getSecurityRoomTel() {
174
+        return securityRoomTel;
175
+    }
176
+
177
+    public void setSecurityRoomTel(String securityRoomTel) {
178
+        this.securityRoomTel = securityRoomTel;
179
+    }
180
+
181
+    public String getMonitoringAddress() {
182
+        return monitoringAddress;
183
+    }
184
+
185
+    public void setMonitoringAddress(String monitoringAddress) {
186
+        this.monitoringAddress = monitoringAddress;
187
+    }
188
+}

+ 14
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/BannerServiceI.java View File

@@ -12,5 +12,19 @@ import java.util.List;
12 12
 public interface BannerServiceI {
13 13
 
14 14
     ToBanner viewBannerImg(Integer bannerId);
15
+
16
+    /**
17
+     * 根据 banner位置,小区获取
18
+     * @param bannerPosition
19
+     * @param communityId
20
+     * @return
21
+     */
22
+    List<ToBanner> viewAllBannerImgAndCommunityId(Integer bannerPosition, Integer communityId);
23
+
24
+    /**
25
+     * 根据banner位置
26
+     * @param bannerPosition
27
+     * @return
28
+     */
15 29
     List<ToBanner> viewAllBannerImg(Integer bannerPosition);
16 30
 }

+ 8
- 3
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BannerServiceImpl.java View File

@@ -31,12 +31,12 @@ public class BannerServiceImpl implements BannerServiceI {
31 31
     }
32 32
 
33 33
     @Override
34
-    public List<ToBanner> viewAllBannerImg(Integer bannerPosition) {
34
+    public List<ToBanner> viewAllBannerImgAndCommunityId(Integer bannerPosition, Integer communityId) {
35 35
         //查询轮播图数量
36
-        Integer bannerNum = tpCarouselSettingMapper.selectCarouselNum(Constant.BANNER);
36
+        Integer bannerNum = tpCarouselSettingMapper.selectCarouselNum(Constant.BANNER, null);
37 37
 
38 38
         String nowTime = DateUtils.getDate("yyyy-MM-dd");
39
-        List<ToBanner> bannersList = toBannerMapper.selectAllByNum(nowTime, bannerNum, bannerPosition);
39
+        List<ToBanner> bannersList = toBannerMapper.selectAllByNum(nowTime, bannerNum, bannerPosition, communityId);
40 40
         bannersList.stream().forEach(banner -> {
41 41
             if (banner.getBannerType().equals(Constant.BANNER_TYPE_ARTICLE)){
42 42
                 banner.setExternalLink("http://101.132.102.231:8011/#/bannerDetail?from=index&id="+banner.getId());
@@ -44,4 +44,9 @@ public class BannerServiceImpl implements BannerServiceI {
44 44
         });
45 45
         return bannersList;
46 46
     }
47
+
48
+    @Override
49
+    public List<ToBanner> viewAllBannerImg(Integer bannerPosition) {
50
+        return viewAllBannerImgAndCommunityId(bannerPosition, null);
51
+    }
47 52
 }

+ 35
- 24
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/MonitoringServiceImpl.java View File

@@ -1,20 +1,18 @@
1 1
 package com.community.huiju.service.impl;
2 2
 import com.alibaba.fastjson.JSON;
3
-import com.alibaba.fastjson.JSONArray;
4
-import com.alibaba.fastjson.JSONObject;
5 3
 import com.community.commom.hk.Digests;
6
-import com.community.commom.hk.HttpClientSSLUtils;
7 4
 import com.community.commom.mode.ResponseBean;
8 5
 import com.community.huiju.common.hk.HKConstant;
9
-import com.community.huiju.common.hk.HKOpenApi;
6
+import com.community.huiju.dao.TpEquipmentMapper;
7
+import com.community.huiju.model.TpEquipment;
10 8
 import com.community.huiju.service.IMonitoringService;
9
+import com.github.pagehelper.Page;
10
+import com.github.pagehelper.PageHelper;
11 11
 import com.google.common.collect.Maps;
12 12
 import lombok.extern.slf4j.Slf4j;
13
+import org.springframework.beans.factory.annotation.Autowired;
13 14
 import org.springframework.stereotype.Service;
14
-import springfox.documentation.spring.web.json.Json;
15 15
 
16
-import java.util.ArrayList;
17
-import java.util.HashMap;
18 16
 import java.util.List;
19 17
 import java.util.Map;
20 18
 
@@ -26,30 +24,43 @@ import java.util.Map;
26 24
 @Slf4j
27 25
 public class MonitoringServiceImpl implements IMonitoringService {
28 26
 
27
+    @Autowired
28
+    private TpEquipmentMapper tpEquipmentMapper;
29
+
29 30
     @Override
30 31
     public ResponseBean getByCommunityId(Integer communityId,Integer pageNo, Integer pageSize) {
31 32
 
32 33
         // TODO 数据是假数据, 后期在更改. 需要根据小区查询 组织中心编号
33 34
 
35
+//        ResponseBean response = new ResponseBean();
36
+//        Map<String,Object> parMap = Maps.newHashMap();
37
+//        parMap.put("pageNo",pageNo);
38
+//        parMap.put("pageSize",pageSize);
39
+//        parMap.put("opUserUuid",HKConstant.OP_USER_UUID);
40
+//        // 组织中心编号
41
+//        parMap.put("unitUuids","1048576");
42
+//
43
+//        String result = HKOpenApi.getMonitoryPoint(parMap);
44
+//        // String url = "rtsp://vipgz1.idcfengye.com:10004/realplay://#cameraUuid#:SUB:";
45
+//        String url = "rtsp://222.190.241.190:556/realplay://#cameraUuid#:SUB:";
46
+//        JSONArray cameraList = JSONObject.parseObject(result).getJSONObject("data").getJSONArray("list");
47
+//        List<String> urlList = new ArrayList<String>();
48
+//        for (Object cameraMap : cameraList){
49
+//            JSONObject camera = (JSONObject) cameraMap;
50
+//            urlList.add(url.replace("#cameraUuid#",camera.getString("cameraUuid")));
51
+//        }
52
+//
53
+//        response.addSuccess(urlList);
34 54
         ResponseBean response = new ResponseBean();
35
-        Map<String,Object> parMap = Maps.newHashMap();
36
-        parMap.put("pageNo",pageNo);
37
-        parMap.put("pageSize",pageSize);
38
-        parMap.put("opUserUuid",HKConstant.OP_USER_UUID);
39
-        // 组织中心编号
40
-        parMap.put("unitUuids","1048576");
55
+        Page<TpEquipment> page = PageHelper.startPage(pageNo, pageSize);
56
+        List<TpEquipment> tpEquipments = tpEquipmentMapper.selectByCommunityId(communityId);
41 57
 
42
-        String result = HKOpenApi.getMonitoryPoint(parMap);
43
-        // String url = "rtsp://vipgz1.idcfengye.com:10004/realplay://#cameraUuid#:SUB:";
44
-        String url = "rtsp://222.190.241.190:556/realplay://#cameraUuid#:SUB:";
45
-        JSONArray cameraList = JSONObject.parseObject(result).getJSONObject("data").getJSONArray("list");
46
-        List<String> urlList = new ArrayList<String>();
47
-        for (Object cameraMap : cameraList){
48
-            JSONObject camera = (JSONObject) cameraMap;
49
-            urlList.add(url.replace("#cameraUuid#",camera.getString("cameraUuid")));
50
-        }
51
-        
52
-        response.addSuccess(urlList);
58
+        Map<String, Object> map = Maps.newHashMap();
59
+        map.put("pageNo", page.getPageNum());
60
+        map.put("pageSize", page.getPageSize());
61
+        map.put("total", page.getTotal());
62
+        map.put("list", tpEquipments);
63
+        response.addSuccess(map);
53 64
 
54 65
         return response;
55 66
     }

+ 3
- 3
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java View File

@@ -193,7 +193,7 @@ public class TaUserServiceImpl implements ITaUserService {
193 193
         List<TaUserVerify> taUserVerifies = taUserVerifyMapper.selectByUserId(currentUser.getId());
194 194
         // 无关联房产
195 195
         if (null == taUserVerifies || taUserVerifies.size() == 0) {
196
-            response.addSuccess(UserVerifyEnum.NO_AUDIT_REAL_ESTATE.getMsg(), taUserVO, loginCodePerproties.getLoginCode().get(UserVerifyEnum.NO_AUDIT_REAL_ESTATE.getCode()));
196
+            response.addError(UserVerifyEnum.NO_AUDIT_REAL_ESTATE.getMsg(), taUserVO, loginCodePerproties.getLoginCode().get(UserVerifyEnum.NO_AUDIT_REAL_ESTATE.getCode()));
197 197
             return response;
198 198
         }
199 199
 
@@ -208,7 +208,7 @@ public class TaUserServiceImpl implements ITaUserService {
208 208
 
209 209
             return checkHouse(response, taUserVO, userVerify);
210 210
         } else if (taUserVerifies.size() >= 2) {
211
-            response.addSuccess(UserVerifyEnum.A_MULTIPLE_REAL_ESTATE.getMsg(), taUserVO, loginCodePerproties.getLoginCode().get(UserVerifyEnum.A_MULTIPLE_REAL_ESTATE.getCode()));
211
+            response.addError(UserVerifyEnum.A_MULTIPLE_REAL_ESTATE.getMsg(), taUserVO, loginCodePerproties.getLoginCode().get(UserVerifyEnum.A_MULTIPLE_REAL_ESTATE.getCode()));
212 212
             return response;
213 213
         }
214 214
 
@@ -1045,7 +1045,7 @@ public class TaUserServiceImpl implements ITaUserService {
1045 1045
         }
1046 1046
         String resultCode = "0".equals(verifyStatus) ? UserVerifyEnum.A_TO_AUDIT_REAL_ESTATE.getCode() :
1047 1047
                 "2".equals(verifyStatus) ? UserVerifyEnum.A_AUDIT_FAILED_REAL_ESTATE.getCode() : "500";
1048
-        responseBean.addSuccess(UserVerifyEnum.getMsg(resultCode), taUserVO, loginCodePerproties.getLoginCode().get(resultCode));
1048
+        responseBean.addError(UserVerifyEnum.getMsg(resultCode), taUserVO, loginCodePerproties.getLoginCode().get(resultCode));
1049 1049
         return responseBean;
1050 1050
     }
1051 1051
 

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/WxLoginServiceImpl.java View File

@@ -72,7 +72,7 @@ public class WxLoginServiceImpl implements WxLoginServiceI {
72 72
 			result.put("userInfo", userInfo);
73 73
 			result.put("openid", openId);
74 74
 
75
-			responseBean.addSuccess(UserVerifyEnum.NO_ACCOUNT.getMsg(), result, loginCodePerproties.getLoginCode().get(UserVerifyEnum.NO_ACCOUNT.getCode()));
75
+			responseBean.addError(UserVerifyEnum.NO_ACCOUNT.getMsg(), result, loginCodePerproties.getLoginCode().get(UserVerifyEnum.NO_ACCOUNT.getCode()));
76 76
 			return responseBean;
77 77
 		}
78 78
 

+ 3
- 0
CODE/smart-community/app-api/src/main/resources/mapper/ToBannerMapper.xml View File

@@ -44,6 +44,9 @@
44 44
     <if test="bannerPosition != null">
45 45
       and banner_position = #{bannerPosition,jdbcType=INTEGER}
46 46
     </if>
47
+    <if test="communityId != null">
48
+      and community_id = #{communityId}
49
+    </if>
47 50
     order by t.sort, t.eff_time
48 51
     <if test="num != null">
49 52
       limit #{num}

+ 3
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpCarouselSettingMapper.xml View File

@@ -21,6 +21,9 @@
21 21
     carousel_num
22 22
     from tp_carousel_setting
23 23
     where carousel_type = #{carouselType}
24
+    <if test="communityId != null">
25
+      and community_id = #{communityId}
26
+    </if>
24 27
   </select>
25 28
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
26 29
     delete from tp_carousel_setting

+ 153
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpConfigurationMapper.xml View File

@@ -0,0 +1,153 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.community.huiju.dao.TpConfigurationMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpConfiguration" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="key" property="key" jdbcType="VARCHAR" />
7
+    <result column="configuration_name" property="configurationName" jdbcType="VARCHAR" />
8
+    <result column="configuration_type" property="configurationType" jdbcType="INTEGER" />
9
+    <result column="configuration_value" property="configurationValue" jdbcType="VARCHAR" />
10
+    <result column="create_tiem" property="createTiem" jdbcType="TIMESTAMP" />
11
+    <result column="create_user" property="createUser" jdbcType="INTEGER" />
12
+    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
13
+    <result column="update_user" property="updateUser" jdbcType="INTEGER" />
14
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
15
+  </resultMap>
16
+  <sql id="Base_Column_List" >
17
+    id, key, configuration_name, configuration_type, configuration_value, create_tiem, 
18
+    create_user, update_time, update_user, community_id
19
+  </sql>
20
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
21
+    select 
22
+    <include refid="Base_Column_List" />
23
+    from tp_configuration
24
+    where id = #{id,jdbcType=INTEGER}
25
+  </select>
26
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
27
+    delete from tp_configuration
28
+    where id = #{id,jdbcType=INTEGER}
29
+  </delete>
30
+  <insert id="insert" parameterType="com.community.huiju.model.TpConfiguration" >
31
+    insert into tp_configuration (id, key, configuration_name, 
32
+      configuration_type, configuration_value, 
33
+      create_tiem, create_user, update_time, 
34
+      update_user, community_id)
35
+    values (#{id,jdbcType=INTEGER}, #{key,jdbcType=VARCHAR}, #{configurationName,jdbcType=VARCHAR}, 
36
+      #{configurationType,jdbcType=INTEGER}, #{configurationValue,jdbcType=VARCHAR}, 
37
+      #{createTiem,jdbcType=TIMESTAMP}, #{createUser,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, 
38
+      #{updateUser,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER})
39
+  </insert>
40
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpConfiguration" >
41
+    insert into tp_configuration
42
+    <trim prefix="(" suffix=")" suffixOverrides="," >
43
+      <if test="id != null" >
44
+        id,
45
+      </if>
46
+      <if test="key != null" >
47
+        key,
48
+      </if>
49
+      <if test="configurationName != null" >
50
+        configuration_name,
51
+      </if>
52
+      <if test="configurationType != null" >
53
+        configuration_type,
54
+      </if>
55
+      <if test="configurationValue != null" >
56
+        configuration_value,
57
+      </if>
58
+      <if test="createTiem != null" >
59
+        create_tiem,
60
+      </if>
61
+      <if test="createUser != null" >
62
+        create_user,
63
+      </if>
64
+      <if test="updateTime != null" >
65
+        update_time,
66
+      </if>
67
+      <if test="updateUser != null" >
68
+        update_user,
69
+      </if>
70
+      <if test="communityId != null" >
71
+        community_id,
72
+      </if>
73
+    </trim>
74
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
75
+      <if test="id != null" >
76
+        #{id,jdbcType=INTEGER},
77
+      </if>
78
+      <if test="key != null" >
79
+        #{key,jdbcType=VARCHAR},
80
+      </if>
81
+      <if test="configurationName != null" >
82
+        #{configurationName,jdbcType=VARCHAR},
83
+      </if>
84
+      <if test="configurationType != null" >
85
+        #{configurationType,jdbcType=INTEGER},
86
+      </if>
87
+      <if test="configurationValue != null" >
88
+        #{configurationValue,jdbcType=VARCHAR},
89
+      </if>
90
+      <if test="createTiem != null" >
91
+        #{createTiem,jdbcType=TIMESTAMP},
92
+      </if>
93
+      <if test="createUser != null" >
94
+        #{createUser,jdbcType=INTEGER},
95
+      </if>
96
+      <if test="updateTime != null" >
97
+        #{updateTime,jdbcType=TIMESTAMP},
98
+      </if>
99
+      <if test="updateUser != null" >
100
+        #{updateUser,jdbcType=INTEGER},
101
+      </if>
102
+      <if test="communityId != null" >
103
+        #{communityId,jdbcType=INTEGER},
104
+      </if>
105
+    </trim>
106
+  </insert>
107
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpConfiguration" >
108
+    update tp_configuration
109
+    <set >
110
+      <if test="key != null" >
111
+        key = #{key,jdbcType=VARCHAR},
112
+      </if>
113
+      <if test="configurationName != null" >
114
+        configuration_name = #{configurationName,jdbcType=VARCHAR},
115
+      </if>
116
+      <if test="configurationType != null" >
117
+        configuration_type = #{configurationType,jdbcType=INTEGER},
118
+      </if>
119
+      <if test="configurationValue != null" >
120
+        configuration_value = #{configurationValue,jdbcType=VARCHAR},
121
+      </if>
122
+      <if test="createTiem != null" >
123
+        create_tiem = #{createTiem,jdbcType=TIMESTAMP},
124
+      </if>
125
+      <if test="createUser != null" >
126
+        create_user = #{createUser,jdbcType=INTEGER},
127
+      </if>
128
+      <if test="updateTime != null" >
129
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
130
+      </if>
131
+      <if test="updateUser != null" >
132
+        update_user = #{updateUser,jdbcType=INTEGER},
133
+      </if>
134
+      <if test="communityId != null" >
135
+        community_id = #{communityId,jdbcType=INTEGER},
136
+      </if>
137
+    </set>
138
+    where id = #{id,jdbcType=INTEGER}
139
+  </update>
140
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpConfiguration" >
141
+    update tp_configuration
142
+    set key = #{key,jdbcType=VARCHAR},
143
+      configuration_name = #{configurationName,jdbcType=VARCHAR},
144
+      configuration_type = #{configurationType,jdbcType=INTEGER},
145
+      configuration_value = #{configurationValue,jdbcType=VARCHAR},
146
+      create_tiem = #{createTiem,jdbcType=TIMESTAMP},
147
+      create_user = #{createUser,jdbcType=INTEGER},
148
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
149
+      update_user = #{updateUser,jdbcType=INTEGER},
150
+      community_id = #{communityId,jdbcType=INTEGER}
151
+    where id = #{id,jdbcType=INTEGER}
152
+  </update>
153
+</mapper>

+ 188
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpEquipmentMapper.xml View File

@@ -0,0 +1,188 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.community.huiju.dao.TpEquipmentMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpEquipment" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="url_id" property="urlId" jdbcType="INTEGER" />
7
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
8
+    <result column="security_guard_tel_id" property="securityGuardTelId" jdbcType="INTEGER" />
9
+    <result column="security_room_tel_id" property="securityRoomTelId" jdbcType="INTEGER" />
10
+    <result column="address_id" property="addressId" jdbcType="INTEGER" />
11
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
12
+    <result column="create_user" property="createUser" jdbcType="INTEGER" />
13
+    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
14
+    <result column="update_user" property="updateUser" jdbcType="INTEGER" />
15
+    <result column="uuid_id" property="uuidId" jdbcType="INTEGER" />
16
+    <result column="equipment_type" property="equipmentType" jdbcType="VARCHAR" />
17
+    <result column="equipment_tree_id" property="equipmentTreeId" jdbcType="INTEGER" />
18
+  </resultMap>
19
+  <sql id="Base_Column_List" >
20
+    id, url_id, community_id, security_guard_tel_id, security_room_tel_id, address_id,
21
+    create_time, create_user, update_time, update_user, uuid_id, equipment_type, equipment_tree_id
22
+  </sql>
23
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
24
+    select
25
+    <include refid="Base_Column_List" />
26
+    from tp_equipment
27
+    where id = #{id,jdbcType=INTEGER}
28
+  </select>
29
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
30
+    delete from tp_equipment
31
+    where id = #{id,jdbcType=INTEGER}
32
+  </delete>
33
+  <insert id="insert" parameterType="com.community.huiju.model.TpEquipment" >
34
+    insert into tp_equipment (id, url_id, community_id,
35
+      security_guard_tel_id, security_room_tel_id,
36
+      address_id, create_time, create_user,
37
+      update_time, update_user, uuid_id,
38
+      equipment_type, equipment_tree_id)
39
+    values (#{id,jdbcType=INTEGER}, #{urlId,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER},
40
+      #{securityGuardTelId,jdbcType=INTEGER}, #{securityRoomTelId,jdbcType=INTEGER},
41
+      #{addressId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{createUser,jdbcType=INTEGER},
42
+      #{updateTime,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{uuidId,jdbcType=INTEGER},
43
+      #{equipmentType,jdbcType=VARCHAR}, #{equipmentTreeId,jdbcType=INTEGER})
44
+  </insert>
45
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpEquipment" >
46
+    insert into tp_equipment
47
+    <trim prefix="(" suffix=")" suffixOverrides="," >
48
+      <if test="id != null" >
49
+        id,
50
+      </if>
51
+      <if test="urlId != null" >
52
+        url_id,
53
+      </if>
54
+      <if test="communityId != null" >
55
+        community_id,
56
+      </if>
57
+      <if test="securityGuardTelId != null" >
58
+        security_guard_tel_id,
59
+      </if>
60
+      <if test="securityRoomTelId != null" >
61
+        security_room_tel_id,
62
+      </if>
63
+      <if test="addressId != null" >
64
+        address_id,
65
+      </if>
66
+      <if test="createTime != null" >
67
+        create_time,
68
+      </if>
69
+      <if test="createUser != null" >
70
+        create_user,
71
+      </if>
72
+      <if test="updateTime != null" >
73
+        update_time,
74
+      </if>
75
+      <if test="updateUser != null" >
76
+        update_user,
77
+      </if>
78
+      <if test="uuidId != null" >
79
+        uuid_id,
80
+      </if>
81
+      <if test="equipmentType != null" >
82
+        equipment_type,
83
+      </if>
84
+      <if test="equipmentTreeId != null" >
85
+        equipment_tree_id,
86
+      </if>
87
+    </trim>
88
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
89
+      <if test="id != null" >
90
+        #{id,jdbcType=INTEGER},
91
+      </if>
92
+      <if test="urlId != null" >
93
+        #{urlId,jdbcType=INTEGER},
94
+      </if>
95
+      <if test="communityId != null" >
96
+        #{communityId,jdbcType=INTEGER},
97
+      </if>
98
+      <if test="securityGuardTelId != null" >
99
+        #{securityGuardTelId,jdbcType=INTEGER},
100
+      </if>
101
+      <if test="securityRoomTelId != null" >
102
+        #{securityRoomTelId,jdbcType=INTEGER},
103
+      </if>
104
+      <if test="addressId != null" >
105
+        #{addressId,jdbcType=INTEGER},
106
+      </if>
107
+      <if test="createTime != null" >
108
+        #{createTime,jdbcType=TIMESTAMP},
109
+      </if>
110
+      <if test="createUser != null" >
111
+        #{createUser,jdbcType=INTEGER},
112
+      </if>
113
+      <if test="updateTime != null" >
114
+        #{updateTime,jdbcType=TIMESTAMP},
115
+      </if>
116
+      <if test="updateUser != null" >
117
+        #{updateUser,jdbcType=INTEGER},
118
+      </if>
119
+      <if test="uuidId != null" >
120
+        #{uuidId,jdbcType=INTEGER},
121
+      </if>
122
+      <if test="equipmentType != null" >
123
+        #{equipmentType,jdbcType=VARCHAR},
124
+      </if>
125
+      <if test="equipmentTreeId != null" >
126
+        #{equipmentTreeId,jdbcType=INTEGER},
127
+      </if>
128
+    </trim>
129
+  </insert>
130
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpEquipment" >
131
+    update tp_equipment
132
+    <set >
133
+      <if test="urlId != null" >
134
+        url_id = #{urlId,jdbcType=INTEGER},
135
+      </if>
136
+      <if test="communityId != null" >
137
+        community_id = #{communityId,jdbcType=INTEGER},
138
+      </if>
139
+      <if test="securityGuardTelId != null" >
140
+        security_guard_tel_id = #{securityGuardTelId,jdbcType=INTEGER},
141
+      </if>
142
+      <if test="securityRoomTelId != null" >
143
+        security_room_tel_id = #{securityRoomTelId,jdbcType=INTEGER},
144
+      </if>
145
+      <if test="addressId != null" >
146
+        address_id = #{addressId,jdbcType=INTEGER},
147
+      </if>
148
+      <if test="createTime != null" >
149
+        create_time = #{createTime,jdbcType=TIMESTAMP},
150
+      </if>
151
+      <if test="createUser != null" >
152
+        create_user = #{createUser,jdbcType=INTEGER},
153
+      </if>
154
+      <if test="updateTime != null" >
155
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
156
+      </if>
157
+      <if test="updateUser != null" >
158
+        update_user = #{updateUser,jdbcType=INTEGER},
159
+      </if>
160
+      <if test="uuidId != null" >
161
+        uuid_id = #{uuidId,jdbcType=INTEGER},
162
+      </if>
163
+      <if test="equipmentType != null" >
164
+        equipment_type = #{equipmentType,jdbcType=VARCHAR},
165
+      </if>
166
+      <if test="equipmentTreeId != null" >
167
+        equipment_tree_id = #{equipmentTreeId,jdbcType=INTEGER},
168
+      </if>
169
+    </set>
170
+    where id = #{id,jdbcType=INTEGER}
171
+  </update>
172
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpEquipment" >
173
+    update tp_equipment
174
+    set url_id = #{urlId,jdbcType=INTEGER},
175
+      community_id = #{communityId,jdbcType=INTEGER},
176
+      security_guard_tel_id = #{securityGuardTelId,jdbcType=INTEGER},
177
+      security_room_tel_id = #{securityRoomTelId,jdbcType=INTEGER},
178
+      address_id = #{addressId,jdbcType=INTEGER},
179
+      create_time = #{createTime,jdbcType=TIMESTAMP},
180
+      create_user = #{createUser,jdbcType=INTEGER},
181
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
182
+      update_user = #{updateUser,jdbcType=INTEGER},
183
+      uuid_id = #{uuidId,jdbcType=INTEGER},
184
+      equipment_type = #{equipmentType,jdbcType=VARCHAR},
185
+      equipment_tree_id = #{equipmentTreeId,jdbcType=INTEGER}
186
+    where id = #{id,jdbcType=INTEGER}
187
+  </update>
188
+</mapper>

+ 7
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/mode/ResponseBean.java View File

@@ -39,6 +39,13 @@ public class ResponseBean<T> implements Serializable {
39 39
         this.url = url;
40 40
     }
41 41
 
42
+    public void addError(String message, T data, String url) {
43
+        this.code = "1";
44
+        this.message = message;
45
+        this.url = url;
46
+        this.data = data;
47
+    }
48
+
42 49
     public void addSuccess(String message) {
43 50
         this.code = "0";
44 51
         this.message = message;

BIN
CODE/smart-community/community-common/target/community-common-0.0.1.jar View File