weiximei 6 年 前
コミット
40812e0880

+ 9
- 5
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/ImageController.java ファイルの表示

@@ -13,6 +13,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
13 13
 import org.springframework.web.bind.annotation.RestController;
14 14
 import org.springframework.web.multipart.MultipartFile;
15 15
 
16
+import java.util.ArrayList;
17
+import java.util.List;
16 18
 import java.util.Map;
17 19
 
18 20
 /**
@@ -32,12 +34,14 @@ public class ImageController {
32 34
 
33 35
     @ApiOperation(value = "图片上传以及获取url", notes = "图片上传以及获取url")
34 36
     @PostMapping(value = "/uploadimage", consumes = "multipart/*", headers = "content-type=multipart/form-data")
35
-    public ResponseBean uploadImgAndGetUrl(@ApiParam(value = "file" ,required = true) MultipartFile uploadFile) throws Exception {
37
+    public ResponseBean uploadImgAndGetUrl(@ApiParam(value = "uploadFiles" ,required = true) MultipartFile[] uploadFiles) throws Exception {
36 38
         ResponseBean responseBean = new ResponseBean();
37
-        Map<String,Object> map = Maps.newHashMap();
38
-        String url = imageService.getImageUrl(uploadFile);
39
-        map.put("url",url);
40
-        responseBean.addSuccess(map);
39
+        List<String> urls = new ArrayList<String>();
40
+        for (MultipartFile uploadFile : uploadFiles){
41
+            String url = imageService.getImageUrl(uploadFile);
42
+            urls.add(url);
43
+        }
44
+        responseBean.addSuccess(urls);
41 45
         return responseBean;
42 46
     }
43 47
 }

+ 6
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaFaceMapper.java ファイルの表示

@@ -24,4 +24,10 @@ public interface TaFaceMapper{
24 24
      */
25 25
     TaFace getByUserId(@Param("userid") Integer userid);
26 26
 
27
+    /**
28
+     * 查看当前信息
29
+     * @param id
30
+     * @return
31
+     */
32
+    TaFace getById(@Param("id")Integer id);
27 33
 }

+ 8
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserMapper.java ファイルの表示

@@ -56,4 +56,12 @@ public interface TaUserMapper {
56 56
      * @return
57 57
      */
58 58
     TaUser selectTaFaceParentId(@Param("id") Integer userId, @Param("otherUserID")Integer otherUserID);
59
+
60
+    /**
61
+     * 查询此电话在小区是否存在
62
+     * @param communityId
63
+     * @param phone
64
+     * @return
65
+     */
66
+    TaUser getByLoginName(@Param("communityId")Integer communityId, @Param("phone")String phone);
59 67
 }

+ 26
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpMessage.java ファイルの表示

@@ -38,6 +38,16 @@ public class TpMessage {
38 38
     private Integer updateUser;
39 39
 
40 40
     private Date updateDate;
41
+    
42
+    /**
43
+     * 工单状态
44
+     */
45
+    private String ticketStatus;
46
+    
47
+    /**
48
+     * 工单扭转自动添加的内容
49
+     */
50
+    private String content;
41 51
 
42 52
     public Integer getId() {
43 53
         return id;
@@ -182,4 +192,20 @@ public class TpMessage {
182 192
     public void setUpdateDate(Date updateDate) {
183 193
         this.updateDate = updateDate;
184 194
     }
195
+    
196
+    public String getTicketStatus() {
197
+        return ticketStatus;
198
+    }
199
+    
200
+    public void setTicketStatus(String ticketStatus) {
201
+        this.ticketStatus = ticketStatus;
202
+    }
203
+    
204
+    public String getContent() {
205
+        return content;
206
+    }
207
+    
208
+    public void setContent(String content) {
209
+        this.content = content;
210
+    }
185 211
 }

+ 0
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/FaceServicelimpl.java ファイルの表示

@@ -130,7 +130,6 @@ public class FaceServicelimpl implements FaceServiceI {
130 130
                 }
131 131
                 taFaceMapper.insertSelective(taFace);
132 132
                 responseBean.addSuccess("操作成功");
133
-
134 133
                 HKOpenApi.downloadFaceAndFingerInfos(String.valueOf(user.getHkUserId()));
135 134
             } else if (isA == false){
136 135
                     if (null == data) {

+ 12
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java ファイルの表示

@@ -237,7 +237,17 @@ public class TaUserServiceImpl implements ITaUserService {
237 237
         String  codes= (String) AppkeyCache.getCache(phone);
238 238
         //用户电话
239 239
             /*String  phones=user.getLoginName();*/
240
-        if(codes.equals(code)){
240
+        if (!AccountValidatorUtil.isPhone(phone)){
241
+            response.addError("请输入正确的手机号!");
242
+            return response;
243
+        }
244
+        //当前小区下的电话校验
245
+        TaUser loginName=taUserMapper.getByLoginName(user.getCommunityId(),phone);
246
+        if (null!=loginName)  {
247
+            response.addError("号码重复");
248
+            return response;
249
+        }
250
+        if(null!=codes && codes.equals(code)){
241 251
             TaUser taUser=new TaUser();
242 252
             taUser.setLoginName(phone);
243 253
             taUser.setId(user.getId());
@@ -246,7 +256,7 @@ public class TaUserServiceImpl implements ITaUserService {
246 256
             AppkeyCache.setCache(user.getLoginName(),"null");
247 257
             return response;
248 258
         }else {
249
-            response.addError("验证码错误");
259
+            response.addError("验证码错误或电话号码错误");
250 260
             return response;
251 261
         }
252 262
 

+ 8
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TaFaceMapper.xml ファイルの表示

@@ -117,4 +117,12 @@
117 117
         from ta_face
118 118
         where ta_user_id = #{userid,jdbcType=INTEGER}
119 119
     </select>
120
+
121
+    <select id="getById" resultMap="BaseResultMap"  parameterType="java.lang.Integer" >
122
+        select
123
+        <include refid="Base_Column_List" />
124
+        from ta_face
125
+        where id = #{id,jdbcType=INTEGER}
126
+    </select>
127
+
120 128
 </mapper>

+ 9
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml ファイルの表示

@@ -319,4 +319,13 @@
319 319
     </if>
320 320
 
321 321
   </select>
322
+
323
+  <select id="getByLoginName" parameterType="com.community.huiju.model.TaUser" resultMap="BaseResultMap" >
324
+    select
325
+    <include refid="Base_Column_List" />
326
+    from ta_user
327
+    where community_id = #{communityId,jdbcType=INTEGER}
328
+      and login_name = #{phone ,jdbcType=VARCHAR}
329
+  </select>
330
+
322 331
 </mapper>

+ 34
- 9
CODE/smart-community/app-api/src/main/resources/mapper/TpMessageMapper.xml ファイルの表示

@@ -20,6 +20,8 @@
20 20
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
21 21
     <result column="update_user" property="updateUser" jdbcType="INTEGER" />
22 22
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
23
+    <result column="ticket_status" property="ticketStatus" jdbcType="VARCHAR" />
24
+    <result column="content" property="content" jdbcType="VARCHAR" />
23 25
   </resultMap>
24 26
   <sql id="Base_Column_List" >
25 27
     id, ticket_id,community_id, message_type, advice_type, model_type, uuid, uuid_type, source,
@@ -260,18 +262,41 @@
260 262
 
261 263
   <select id="getMessages" resultMap="BaseResultMap">
262 264
     SELECT
263
-      <include refid="Base_Column_List" />
265
+        t.id,
266
+        t.ticket_id,
267
+        t.community_id,
268
+        t.message_type,
269
+        t.advice_type,
270
+        t.model_type,
271
+        t.uuid,
272
+        t.uuid_type,
273
+        t.source,
274
+        t.message_content,
275
+        t.STATUS,
276
+        t.result,
277
+        t.meaasge_type_id,
278
+        t.read_status,
279
+        t.create_user,
280
+        t.create_date,
281
+        t.update_user,
282
+        t.update_date,
283
+        k.status,
284
+        r.content,
285
+        d.name as ticket_status
264 286
     FROM
265
-        tp_message
287
+        tp_message t
288
+    LEFT JOIN tp_ticket k on t.ticket_id = k.id  AND k.community_id = #{communityId,jdbcType=INTEGER}
289
+    LEFT JOIN tp_ticket_record r on t.ticket_id = r.ticket_id AND r.community_id = #{communityId,jdbcType=INTEGER}  AND k.status = r.status
290
+    LEFT JOIN sys_dictionary d on k.status = d.code AND d.group_id = ( SELECT id FROM sys_dictionary WHERE CODE = "ticket_status" )
266 291
     WHERE
267
-        uuid_type = 1
268
-        AND community_id = #{communityId,jdbcType=INTEGER}
269
-        AND uuid = #{userId,jdbcType=INTEGER}
270
-        AND STATUS = 1
271
-        AND advice_type = 1
272
-        AND model_type = #{modelType,jdbcType=INTEGER}
292
+        t.uuid_type = 1
293
+        AND t.community_id = #{communityId,jdbcType=INTEGER}
294
+        AND t.uuid = #{userId,jdbcType=INTEGER}
295
+        AND t.STATUS = 1
296
+        AND t.advice_type = 1
297
+        AND t.model_type = #{modelType,jdbcType=INTEGER}
273 298
     ORDER BY
274
-    create_date DESC
299
+    t.create_date DESC
275 300
   </select>
276 301
 
277 302
   <update id="updateReadStatus" parameterType="java.lang.Integer" >

+ 256
- 232
文档/MYSQL/smartCommunity.pdb
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 256
- 232
文档/MYSQL/smartCommunity.pdm
ファイル差分が大きすぎるため省略します
ファイルの表示