Blame view

service-community/src/main/java/com/java110/community/dao/impl/CommunityServiceDaoImpl.java 17.3 KB
88e030b7   王彪总   init project
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  package com.java110.community.dao.impl;
  
  import com.alibaba.fastjson.JSONObject;
  import com.java110.community.dao.ICommunityServiceDao;
  import com.java110.core.base.dao.BaseServiceDao;
  import com.java110.utils.constant.ResponseConstant;
  import com.java110.utils.exception.DAOException;
  import com.java110.utils.util.DateUtil;
  import org.slf4j.Logger;
  import com.java110.core.log.LoggerFactory;
  import org.springframework.stereotype.Service;
  
  import java.util.List;
  import java.util.Map;
  
  /**
9750b443   王彪总   fix(config): 更新配置...
17
   * 项目服务 与数据库交互
88e030b7   王彪总   init project
18
19
20
21
22
23
24
25
26
   * Created by wuxw on 2017/4/5.
   */
  @Service("communityServiceDaoImpl")
  //@Transactional
  public class CommunityServiceDaoImpl extends BaseServiceDao implements ICommunityServiceDao {
  
      private static Logger logger = LoggerFactory.getLogger(CommunityServiceDaoImpl.class);
  
      /**
9750b443   王彪总   fix(config): 更新配置...
27
       * 项目信息封装
88e030b7   王彪总   init project
28
       *
9750b443   王彪总   fix(config): 更新配置...
29
       * @param businessCommunityInfo 项目信息 封装
88e030b7   王彪总   init project
30
31
32
33
34
35
       * @throws DAOException
       */
      @Override
      public void saveBusinessCommunityInfo(Map businessCommunityInfo) throws DAOException {
          businessCommunityInfo.put("month", DateUtil.getCurrentMonth());
          // 查询business_user 数据是否已经存在
9750b443   王彪总   fix(config): 更新配置...
36
          logger.debug("保存项目信息 入参 businessCommunityInfo : {}", businessCommunityInfo);
88e030b7   王彪总   init project
37
38
39
          int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveBusinessCommunityInfo", businessCommunityInfo);
  
          if (saveFlag < 1) {
9750b443   王彪总   fix(config): 更新配置...
40
              throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存项目数据失败:" + JSONObject.toJSONString(businessCommunityInfo));
88e030b7   王彪总   init project
41
42
43
44
          }
      }
  
      /**
9750b443   王彪总   fix(config): 更新配置...
45
       * 项目属性信息分装
88e030b7   王彪总   init project
46
       *
9750b443   王彪总   fix(config): 更新配置...
47
       * @param businessCommunityAttr 项目属性信息封装
88e030b7   王彪总   init project
48
49
50
51
52
53
       * @throws DAOException
       */
      @Override
      public void saveBusinessCommunityAttr(Map businessCommunityAttr) throws DAOException {
          businessCommunityAttr.put("month", DateUtil.getCurrentMonth());
          // 查询business_user 数据是否已经存在
9750b443   王彪总   fix(config): 更新配置...
54
          logger.debug("保存项目属性信息 入参 businessCommunityAttr : {}", businessCommunityAttr);
88e030b7   王彪总   init project
55
56
57
58
  
          int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveBusinessCommunityAttr", businessCommunityAttr);
  
          if (saveFlag < 1) {
9750b443   王彪总   fix(config): 更新配置...
59
              throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存项目属性数据失败:" + JSONObject.toJSONString(businessCommunityAttr));
88e030b7   王彪总   init project
60
61
62
63
          }
      }
  
      /**
9750b443   王彪总   fix(config): 更新配置...
64
       * 保存项目照片信息
88e030b7   王彪总   init project
65
       *
9750b443   王彪总   fix(config): 更新配置...
66
       * @param businessCommunityPhoto 项目照片
88e030b7   王彪总   init project
67
68
69
70
71
       * @throws DAOException
       */
      @Override
      public void saveBusinessCommunityPhoto(Map businessCommunityPhoto) throws DAOException {
          businessCommunityPhoto.put("month", DateUtil.getCurrentMonth());
9750b443   王彪总   fix(config): 更新配置...
72
          logger.debug("保存项目照片信息 入参 businessCommunityPhoto : {}", businessCommunityPhoto);
88e030b7   王彪总   init project
73
74
75
76
  
          int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveBusinessCommunityPhoto", businessCommunityPhoto);
  
          if (saveFlag < 1) {
9750b443   王彪总   fix(config): 更新配置...
77
              throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存项目照片数据失败:" + JSONObject.toJSONString(businessCommunityPhoto));
88e030b7   王彪总   init project
78
79
80
81
          }
      }
  
      /**
9750b443   王彪总   fix(config): 更新配置...
82
       * 保存项目证件信息
88e030b7   王彪总   init project
83
       *
9750b443   王彪总   fix(config): 更新配置...
84
       * @param businessCommunityCerdentials 项目证件
88e030b7   王彪总   init project
85
86
87
88
89
       * @throws DAOException
       */
      @Override
      public void saveBusinessCommunityCerdentials(Map businessCommunityCerdentials) throws DAOException {
          businessCommunityCerdentials.put("month", DateUtil.getCurrentMonth());
9750b443   王彪总   fix(config): 更新配置...
90
          logger.debug("保存项目证件信息 入参 businessCommunityCerdentials : {}", businessCommunityCerdentials);
88e030b7   王彪总   init project
91
92
93
94
  
          int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveBusinessCommunityCerdentials", businessCommunityCerdentials);
  
          if (saveFlag < 1) {
9750b443   王彪总   fix(config): 更新配置...
95
              throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存项目证件数据失败:" + JSONObject.toJSONString(businessCommunityCerdentials));
88e030b7   王彪总   init project
96
97
98
99
          }
      }
  
      /**
9750b443   王彪总   fix(config): 更新配置...
100
       * 查询项目信息
88e030b7   王彪总   init project
101
102
       *
       * @param info bId 信息
9750b443   王彪总   fix(config): 更新配置...
103
       * @return 项目信息
88e030b7   王彪总   init project
104
105
106
107
108
       * @throws DAOException
       */
      @Override
      public Map getBusinessCommunityInfo(Map info) throws DAOException {
  
9750b443   王彪总   fix(config): 更新配置...
109
          logger.debug("查询项目信息 入参 info : {}", info);
88e030b7   王彪总   init project
110
111
112
113
114
115
116
117
118
119
120
121
122
  
          List<Map> infos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getBusinessCommunityInfo", info);
          if (infos == null) {
              return null;
          }
          if (infos.size() > 1) {
              throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:infos," + JSONObject.toJSONString(info));
          }
  
          return infos.get(0);
      }
  
      /**
9750b443   王彪总   fix(config): 更新配置...
123
       * 查询项目属性
88e030b7   王彪总   init project
124
125
       *
       * @param info bId 信息
9750b443   王彪总   fix(config): 更新配置...
126
       * @return 项目属性
88e030b7   王彪总   init project
127
128
129
130
       * @throws DAOException
       */
      @Override
      public List<Map> getBusinessCommunityAttrs(Map info) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
131
          logger.debug("查询项目属性信息 入参 info : {}", info);
88e030b7   王彪总   init project
132
133
134
135
136
137
138
  
          List<Map> businessCommunityAttrs = sqlSessionTemplate.selectList("communityServiceDaoImpl.getBusinessCommunityAttrs", info);
  
          return businessCommunityAttrs;
      }
  
      /**
9750b443   王彪总   fix(config): 更新配置...
139
       * 查询项目照片
88e030b7   王彪总   init project
140
141
142
143
144
145
146
       *
       * @param info bId 信息
       * @return
       * @throws DAOException
       */
      @Override
      public List<Map> getBusinessCommunityPhoto(Map info) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
147
          logger.debug("查询项目照片信息 入参 info : {}", info);
88e030b7   王彪总   init project
148
149
150
151
152
153
154
  
          List<Map> businessCommunityPhotos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getBusinessCommunityPhoto", info);
  
          return businessCommunityPhotos;
      }
  
      /**
9750b443   王彪总   fix(config): 更新配置...
155
       * 查询项目证件
88e030b7   王彪总   init project
156
157
158
159
160
161
162
       *
       * @param info bId 信息
       * @return
       * @throws DAOException
       */
      @Override
      public List<Map> getBusinessCommunityCerdentials(Map info) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
163
          logger.debug("查询项目证件信息 入参 info : {}", info);
88e030b7   王彪总   init project
164
165
166
167
168
169
170
  
          List<Map> businessCommunityCerdentialses = sqlSessionTemplate.selectList("communityServiceDaoImpl.getBusinessCommunityCerdentials", info);
  
          return businessCommunityCerdentialses;
      }
  
      /**
9750b443   王彪总   fix(config): 更新配置...
171
       * 保存项目信息  instance
88e030b7   王彪总   init project
172
173
174
175
176
177
       *
       * @param info bId 信息
       * @throws DAOException
       */
      @Override
      public void saveCommunityInfoInstance(Map info) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
178
          logger.debug("保存项目信息Instance 入参 info : {}", info);
88e030b7   王彪总   init project
179
180
181
182
  
          int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveCommunityInfoInstance", info);
  
          if (saveFlag < 1) {
9750b443   王彪总   fix(config): 更新配置...
183
              throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存项目信息Instance数据失败:" + JSONObject.toJSONString(info));
88e030b7   王彪总   init project
184
185
186
187
188
          }
      }
  
      @Override
      public void saveCommunityAttrsInstance(Map info) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
189
          logger.debug("保存项目属性信息Instance 入参 info : {}", info);
88e030b7   王彪总   init project
190
191
192
193
  
          int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveCommunityAttrsInstance", info);
  
          if (saveFlag < 1) {
9750b443   王彪总   fix(config): 更新配置...
194
              throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存项目属性信息Instance数据失败:" + JSONObject.toJSONString(info));
88e030b7   王彪总   init project
195
196
197
198
199
          }
      }
  
      @Override
      public void saveCommunityPhotoInstance(Map info) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
200
          logger.debug("保存项目照片信息Instance 入参 info : {}", info);
88e030b7   王彪总   init project
201
202
203
204
  
          int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveCommunityPhotoInstance", info);
  
          if (saveFlag < 1) {
9750b443   王彪总   fix(config): 更新配置...
205
              throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存项目照片信息Instance数据失败:" + JSONObject.toJSONString(info));
88e030b7   王彪总   init project
206
207
208
209
210
          }
      }
  
  
      /**
9750b443   王彪总   fix(config): 更新配置...
211
       * 查询项目信息(instance
88e030b7   王彪总   init project
212
213
214
215
216
217
218
       *
       * @param info bId 信息
       * @return
       * @throws DAOException
       */
      @Override
      public Map getCommunityInfo(Map info) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
219
          logger.debug("查询项目信息 入参 info : {}", info);
88e030b7   王彪总   init project
220
221
222
223
224
225
226
227
228
229
230
231
232
  
          List<Map> infos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityInfo", info);
          if (infos == null || infos.size() == 0) {
              return null;
          }
          if (infos.size() > 1) {
              throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:getCommunityInfo," + JSONObject.toJSONString(info));
          }
  
          return infos.get(0);
      }
  
      /**
9750b443   王彪总   fix(config): 更新配置...
233
       * 项目属性查询(instance
88e030b7   王彪总   init project
234
235
236
237
238
239
240
       *
       * @param info bId 信息
       * @return
       * @throws DAOException
       */
      @Override
      public List<Map> getCommunityAttrs(Map info) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
241
          logger.debug("查询项目属性信息 入参 info : {}", info);
88e030b7   王彪总   init project
242
243
244
245
246
247
248
  
          List<Map> communityAttrs = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityAttrs", info);
  
          return communityAttrs;
      }
  
      /**
9750b443   王彪总   fix(config): 更新配置...
249
       * 项目照片查询(instance
88e030b7   王彪总   init project
250
251
252
253
254
255
256
       *
       * @param info bId 信息
       * @return
       * @throws DAOException
       */
      @Override
      public List<Map> getCommunityPhoto(Map info) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
257
          logger.debug("查询项目照片信息 入参 info : {}", info);
88e030b7   王彪总   init project
258
259
260
261
262
263
264
265
  
          List<Map> communityPhotos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityPhoto", info);
  
          return communityPhotos;
      }
  
  
      /**
9750b443   王彪总   fix(config): 更新配置...
266
       * 修改项目信息
88e030b7   王彪总   init project
267
268
269
270
271
272
       *
       * @param info 修改信息
       * @throws DAOException
       */
      @Override
      public void updateCommunityInfoInstance(Map info) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
273
          logger.debug("修改项目信息Instance 入参 info : {}", info);
88e030b7   王彪总   init project
274
275
276
277
  
          int saveFlag = sqlSessionTemplate.update("communityServiceDaoImpl.updateCommunityInfoInstance", info);
  
          if (saveFlag < 1) {
9750b443   王彪总   fix(config): 更新配置...
278
              throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改项目信息Instance数据失败:" + JSONObject.toJSONString(info));
88e030b7   王彪总   init project
279
280
281
282
          }
      }
  
      /**
9750b443   王彪总   fix(config): 更新配置...
283
       * 修改项目属性信息(instance
88e030b7   王彪总   init project
284
285
286
287
288
289
       *
       * @param info 修改信息
       * @throws DAOException
       */
      @Override
      public void updateCommunityAttrInstance(Map info) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
290
          logger.debug("修改项目属性信息Instance 入参 info : {}", info);
88e030b7   王彪总   init project
291
292
293
294
  
          int saveFlag = sqlSessionTemplate.update("communityServiceDaoImpl.updateCommunityAttrInstance", info);
  
          if (saveFlag < 1) {
9750b443   王彪总   fix(config): 更新配置...
295
              throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改项目属性信息Instance数据失败:" + JSONObject.toJSONString(info));
88e030b7   王彪总   init project
296
297
298
299
          }
      }
  
      /**
9750b443   王彪总   fix(config): 更新配置...
300
       * 修改 项目照片信息
88e030b7   王彪总   init project
301
302
303
304
305
306
       *
       * @param info 修改信息
       * @throws DAOException
       */
      @Override
      public void updateCommunityPhotoInstance(Map info) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
307
          logger.debug("修改项目照片信息Instance 入参 info : {}", info);
88e030b7   王彪总   init project
308
309
310
311
  
          int saveFlag = sqlSessionTemplate.update("communityServiceDaoImpl.updateCommunityPhotoInstance", info);
  
          if (saveFlag < 1) {
9750b443   王彪总   fix(config): 更新配置...
312
              throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改项目照片信息Instance数据失败:" + JSONObject.toJSONString(info));
88e030b7   王彪总   init project
313
314
315
316
317
          }
      }
  
  
      /**
9750b443   王彪总   fix(config): 更新配置...
318
       * 项目成员加入信息
88e030b7   王彪总   init project
319
       *
9750b443   王彪总   fix(config): 更新配置...
320
       * @param businessCommunityMember 项目成员信息 封装
88e030b7   王彪总   init project
321
322
323
       * @throws DAOException 操作数据库异常
       */
      public void saveBusinessCommunityMember(Map businessCommunityMember) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
324
          logger.debug("项目成员加入 入参 businessCommunityMember : {}", businessCommunityMember);
88e030b7   王彪总   init project
325
326
327
328
          businessCommunityMember.put("month", DateUtil.getCurrentMonth());
          int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveBusinessCommunityMember", businessCommunityMember);
  
          if (saveFlag < 1) {
9750b443   王彪总   fix(config): 更新配置...
329
              throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "项目成员加入失败:" + JSONObject.toJSONString(businessCommunityMember));
88e030b7   王彪总   init project
330
331
332
333
334
335
336
337
338
339
340
          }
      }
  
      /**
       * 成员加入 保存信息至instance
       *
       * @param info
       * @throws DAOException
       */
      @Override
      public void saveCommunityMemberInstance(Map info) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
341
          logger.debug("项目成员加入Instance 入参 info : {}", info);
88e030b7   王彪总   init project
342
343
344
345
  
          int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveCommunityMemberInstance", info);
  
          if (saveFlag < 1) {
9750b443   王彪总   fix(config): 更新配置...
346
              throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存项目照片信息Instance数据失败:" + JSONObject.toJSONString(info));
88e030b7   王彪总   init project
347
348
349
350
          }
      }
  
      /**
9750b443   王彪总   fix(config): 更新配置...
351
352
       * 查询项目成员加入信息(business过程)
       * 根据bId 查询项目信息
88e030b7   王彪总   init project
353
354
       *
       * @param info bId 信息
9750b443   王彪总   fix(config): 更新配置...
355
       * @return 项目信息
88e030b7   王彪总   init project
356
357
358
       * @throws DAOException
       */
      public List<Map> getBusinessCommunityMember(Map info) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
359
          logger.debug("查询项目成员加入信息 入参 info : {}", info);
88e030b7   王彪总   init project
360
361
362
363
364
365
366
367
368
369
370
371
372
  
          List<Map> businessCommunityMembers = sqlSessionTemplate.selectList("communityServiceDaoImpl.getBusinessCommunityMember", info);
          if (businessCommunityMembers == null || businessCommunityMembers.size() == 0) {
              return null;
          }
  //        if (businessCommunityMembers.size() > 1) {
  //            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:businessCommunityMember," + JSONObject.toJSONString(info));
  //        }
  
          return businessCommunityMembers;
      }
  
      /**
9750b443   王彪总   fix(config): 更新配置...
373
374
       * 查询项目成员加入信息(instance过程)
       * 根据bId 查询项目信息
88e030b7   王彪总   init project
375
376
       *
       * @param info bId 信息
9750b443   王彪总   fix(config): 更新配置...
377
       * @return 项目信息
88e030b7   王彪总   init project
378
379
380
       * @throws DAOException
       */
      public List<Map> getCommunityMember(Map info) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
381
          logger.debug("查询项目成员加入信息 入参 info : {}", info);
88e030b7   王彪总   init project
382
383
384
385
386
387
388
389
390
391
392
393
394
  
          List<Map> memberCommunitys = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityMember", info);
          if (memberCommunitys == null || memberCommunitys.size() == 0) {
              return null;
          }
          if (memberCommunitys.size() > 1) {
              throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:getCommunityMember," + JSONObject.toJSONString(info));
          }
  
          return memberCommunitys;
      }
  
      /**
9750b443   王彪总   fix(config): 更新配置...
395
       * 修改项目成员加入信息
88e030b7   王彪总   init project
396
397
398
399
400
       *
       * @param info 修改信息
       * @throws DAOException
       */
      public void updateCommunityMemberInstance(Map info) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
401
          logger.debug("修改项目成员加入信息Instance 入参 info : {}", info);
88e030b7   王彪总   init project
402
403
404
405
  
          int saveFlag = sqlSessionTemplate.update("communityServiceDaoImpl.updateCommunityMemberInstance", info);
  
          if (saveFlag < 1) {
9750b443   王彪总   fix(config): 更新配置...
406
              throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改项目成员加入信息Instance数据失败:" + JSONObject.toJSONString(info));
88e030b7   王彪总   init project
407
408
409
410
411
412
413
414
415
416
          }
      }
  
      /**
       * @param info bId 信息
       * @return
       * @throws DAOException
       */
      @Override
      public List<Map> getCommunityMembers(Map info) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
417
          logger.debug("查询项目成员加入信息 入参 info : {}", info);
88e030b7   王彪总   init project
418
419
420
421
422
423
424
425
  
          List<Map> memberCommunitys = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityMember", info);
  
          return memberCommunitys;
      }
  
      @Override
      public int getCommunityMemberCount(Map info) {
9750b443   王彪总   fix(config): 更新配置...
426
          logger.debug("查询项目成员加入信息 入参 info : {}", info);
88e030b7   王彪总   init project
427
428
429
430
431
432
433
434
435
436
437
  
          List<Map> memberCommunitys = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityMemberCount", info);
  
          if (memberCommunitys.size() < 1) {
              return 0;
          }
  
          return Integer.parseInt(memberCommunitys.get(0).get("count").toString());
      }
  
      /**
9750b443   王彪总   fix(config): 更新配置...
438
       * 查询项目信息(instance
88e030b7   王彪总   init project
439
440
441
442
443
444
445
       *
       * @param info bId 信息
       * @return List<Map>
       * @throws DAOException DAO异常
       */
      @Override
      public List<Map> getCommunityInfoNew(Map info) throws DAOException {
9750b443   王彪总   fix(config): 更新配置...
446
          logger.debug("查询项目信息 入参 info : {}", info);
88e030b7   王彪总   init project
447
448
449
450
451
452
453
  
          List<Map> infos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityInfoNew", info);
  
          return infos;
      }
  
      /**
9750b443   王彪总   fix(config): 更新配置...
454
       * 查询项目数量
88e030b7   王彪总   init project
455
       *
9750b443   王彪总   fix(config): 更新配置...
456
457
       * @param info 项目信息
       * @return 项目数量
88e030b7   王彪总   init project
458
459
460
       */
      @Override
      public int queryCommunitysCount(Map info) {
9750b443   王彪总   fix(config): 更新配置...
461
          logger.debug("查询项目数据 入参 info : {}", info);
88e030b7   王彪总   init project
462
463
464
465
466
467
468
469
470
471
472
  
          List<Map> infos = sqlSessionTemplate.selectList("communityServiceDaoImpl.queryCommunitysCount", info);
          if (infos.size() < 1) {
              return 0;
          }
  
          return Integer.parseInt(infos.get(0).get("count").toString());
      }
  
      @Override
      public int getCommunityAttrsCount(Map info) {
9750b443   王彪总   fix(config): 更新配置...
473
          logger.debug("查询项目数据 入参 info : {}", info);
88e030b7   王彪总   init project
474
475
476
477
478
479
480
481
482
483
484
  
          List<Map> infos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityAttrsCount", info);
          if (infos.size() < 1) {
              return 0;
          }
  
          return Integer.parseInt(infos.get(0).get("count").toString());
      }
  
      @Override
      public List<Map> getStoreCommunitys(Map info) {
9750b443   王彪总   fix(config): 更新配置...
485
          logger.debug("查询项目信息 入参 info : {}", info);
88e030b7   王彪总   init project
486
487
488
489
490
491
492
493
  
          List<Map> infos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getStoreCommunitys", info);
  
          return infos;
      }
  
      @Override
      public int saveCommunityAttr(Map info) {
9750b443   王彪总   fix(config): 更新配置...
494
          logger.debug("项目成员加入Instance 入参 info : {}", info);
88e030b7   王彪总   init project
495
496
497
498
499
500
501
502
  
          int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveCommunityAttr", info);
  
          return saveFlag;
      }
  
  
  }