dingxin 6 years ago
parent
commit
a8e4d3ed00

+ 16
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TpTicketAndTransactionController.java View File

174
         return responseBean;
174
         return responseBean;
175
     }
175
     }
176
 
176
 
177
+    @ApiOperation(value = "app端个人中心话题管和工单管理是否展示", notes = "app端个人中心话题管和工单管理是否展示")
178
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
179
+            @ApiImplicitParam(paramType = "query", dataType = "String", name = "loginName", value = "手机号"),
180
+    })
181
+    @RequestMapping(value = "/accessAuthority/{communityId}", method = RequestMethod.GET)
182
+    public ResponseBean findUsedDetails(@PathVariable(value = "communityId") Integer communityId,@RequestParam("loginName") String loginName) {
183
+        ResponseBean responseBean = new ResponseBean();
184
+        TpUser tpUser= tpUserMapper.selectLoginName(loginName,communityId);
185
+         if (null == tpUser){
186
+             responseBean.addError("此号码无权限");
187
+             return responseBean;
188
+         }
189
+             responseBean.addSuccess("成功");
190
+        return responseBean;
191
+    }
192
+
177
 }
193
 }

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

1158
             tdImages.setCreateUser(id);
1158
             tdImages.setCreateUser(id);
1159
             tdImagesMapper.insert(tdImages);
1159
             tdImagesMapper.insert(tdImages);
1160
         }
1160
         }
1161
+        response.addSuccess(String.valueOf(tpTransaction.getId()));
1161
         return response;
1162
         return response;
1162
     }
1163
     }
1163
 
1164
 

+ 22
- 18
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketMapper.xml View File

279
 
279
 
280
   <select id="ticketList" resultMap="BaseResultMap">
280
   <select id="ticketList" resultMap="BaseResultMap">
281
     select
281
     select
282
-    id,
283
-    community_id,
284
-    ta_user_id,
285
-    ticket_title,
286
-    ticket_content,
287
-    STATUS,
288
-    repair_type,
289
-    tp_user_id,
290
-    score,
291
-    COMMENT,
292
-    create_user,
293
-    create_date,
294
-    update_user,
295
-    update_date,
282
+    t.id,
283
+    t.community_id,
284
+    t.ta_user_id,
285
+    t.ticket_title,
286
+    t.ticket_content,
287
+    t.STATUS,
288
+    t.repair_type,
289
+    t.tp_user_id,
290
+    t.score,
291
+    t.COMMENT,
292
+    t.create_user,
293
+    t.create_date,
294
+    t.update_user,
295
+    t.update_date,
296
     (CASE type WHEN 1 THEN '投诉' WHEN 2 THEN '报修' WHEN 3 THEN '联系物业' ELSE	'未知' END) as type
296
     (CASE type WHEN 1 THEN '投诉' WHEN 2 THEN '报修' WHEN 3 THEN '联系物业' ELSE	'未知' END) as type
297
-    from tp_ticket
297
+    from ta_user_verify uv
298
+    LEFT JOIN tp_ticket t on uv.id = t.create_user
298
     <where>
299
     <where>
299
       <if test="status == 0 or status == 3 ">
300
       <if test="status == 0 or status == 3 ">
300
-            status = #{status}
301
+        t.status = #{status}
301
       </if>
302
       </if>
302
       <if test="status == 9 ">
303
       <if test="status == 9 ">
303
-        and  `status` NOT in(0,3)
304
+        and  t.`status` NOT in(0,3)
304
       </if>
305
       </if>
305
-      and community_id = #{communityId,jdbcType=INTEGER}
306
+      and t.id IS NOT NULL
307
+      and uv.community_id = #{communityId,jdbcType=INTEGER}
306
     </where>
308
     </where>
309
+    GROUP BY t.id
310
+    order by  t.create_date desc
307
   </select>
311
   </select>
308
 
312
 
309
   <select id="ticketDetails" resultType="com.community.huiju.vo.TpTicketVO">
313
   <select id="ticketDetails" resultType="com.community.huiju.vo.TpTicketVO">

+ 1
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml View File

345
                 and is_reported = 1
345
                 and is_reported = 1
346
             </if>
346
             </if>
347
             <if test="ManageStatus == 2">
347
             <if test="ManageStatus == 2">
348
-                (read_status IS NULL or read_status = 0)
348
+                and  (read_status IS NULL or read_status = 0)
349
             </if>
349
             </if>
350
             <if test="ManageStatus == 3">
350
             <if test="ManageStatus == 3">
351
                 and  read_status= 1
351
                 and  read_status= 1

+ 4
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpTicketServiceImpl.java View File

84
 
84
 
85
             /*查询当前工单创建人*/
85
             /*查询当前工单创建人*/
86
             TaUserVerify taUserVerify= taUserVerifyMapper.selectById(tpTicket.getCreateUser());
86
             TaUserVerify taUserVerify= taUserVerifyMapper.selectById(tpTicket.getCreateUser());
87
+            if (null != taUserVerify ){
88
+                String createUserNmae=taUserMapper.selectLongNameAndcommunityId(taUserVerify.getUserId());
89
+                tpTicketVO.setCreateUserNmae(createUserNmae);
90
+            }
87
 
91
 
88
-            String createUserNmae=taUserMapper.selectLongNameAndcommunityId(taUserVerify.getUserId());
89
-            tpTicketVO.setCreateUserNmae(createUserNmae);
90
             tpTicketArrayList.add(tpTicketVO);
92
             tpTicketArrayList.add(tpTicketVO);
91
         }
93
         }
92
         HashMap map=new HashMap<>();
94
         HashMap map=new HashMap<>();

+ 6
- 4
CODE/smart-community/property-api/src/main/resources/mapper/TpTicketMapper.xml View File

19
     p.update_user,
19
     p.update_user,
20
     p.update_date,
20
     p.update_date,
21
     us.user_name
21
     us.user_name
22
-    FROM
23
-    tp_ticket p
22
+    from ta_user_verify uv
23
+    LEFT JOIN tp_ticket p on uv.id = p.create_user
24
     LEFT JOIN ta_user AS us ON p.create_user=us.id
24
     LEFT JOIN ta_user AS us ON p.create_user=us.id
25
     LEFT JOIN tp_user AS u ON p.tp_user_id = u.id
25
     LEFT JOIN tp_user AS u ON p.tp_user_id = u.id
26
 <where>
26
 <where>
42
     <if test="updateUserNmae != null and updateUserNmae !=''">
42
     <if test="updateUserNmae != null and updateUserNmae !=''">
43
         and u.user_name like concat('%',#{ updateUserNmae,jdbcType=VARCHAR},'%')
43
         and u.user_name like concat('%',#{ updateUserNmae,jdbcType=VARCHAR},'%')
44
     </if>
44
     </if>
45
-    and p.community_id=#{communityId,jdbcType=INTEGER}
45
+    and p.id IS NOT NULL
46
+    and uv.community_id=#{communityId,jdbcType=INTEGER}
46
 </where>
47
 </where>
47
-        order by  create_date desc
48
+        GROUP BY p.id
49
+        order by  p.create_date desc
48
     </select>
50
     </select>
49
 
51
 
50
     <select id="ticketDetails" resultType="com.community.huiju.vo.TpTicketVO">
52
     <select id="ticketDetails" resultType="com.community.huiju.vo.TpTicketVO">