weiximei 6 年之前
父節點
當前提交
81bb911eae

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java 查看文件

@@ -72,7 +72,7 @@ public class UserController extends BaseController {
72 72
         ResponseBean responseBean = new ResponseBean();
73 73
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
74 74
         Integer userId=userElement.getId();
75
-        ResponseBean response=iTaUserService.upDateloginName(userId,paramets);
75
+        ResponseBean response=iTaUserService.upDateloginName(userId,paramets,userElement.getCommunityId());
76 76
         return response;
77 77
     }
78 78
 

+ 5
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java 查看文件

@@ -25,4 +25,9 @@ public interface TpBuildingOwnerInfoMapper {
25 25
     @ResultMap("BaseResultMap")
26 26
     @Select("select * from tp_building_owner_info where community_id=#{communityId} and owner_tel=#{ownerTel}")
27 27
     List<TpBuildingOwnerInfo> getByCommunityIdAndOwnerTel(@Param("communityId") Integer communityId, @Param("ownerTel") String ownerTel);
28
+
29
+    TpBuildingOwnerInfo updatOwnerTel(Integer communityId,String OwnerTel);
30
+
31
+    //根据手机号查询当前信息
32
+    TpBuildingOwnerInfo selectOwnerTel(@Param("ownerTel")String ownerTel);
28 33
 }

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java 查看文件

@@ -39,7 +39,7 @@ public interface ITaUserService {
39 39
      * @param id
40 40
      * @return
41 41
      */
42
-    ResponseBean upDateloginName(Integer id, String paramets);
42
+    ResponseBean upDateloginName(Integer id, String paramets,Integer communityId);
43 43
 
44 44
     /**
45 45
      * 获取房屋成员列表

+ 26
- 10
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java 查看文件

@@ -35,6 +35,8 @@ import java.time.format.DateTimeFormatter;
35 35
 import java.util.*;
36 36
 import java.util.logging.SimpleFormatter;
37 37
 
38
+import static com.community.commom.constant.Constant.OWNER;
39
+
38 40
 /**
39 41
  * 用户业务 实现
40 42
  * @author weiximei
@@ -239,7 +241,7 @@ public class TaUserServiceImpl implements ITaUserService {
239 241
 
240 242
     @Transactional(rollbackFor = Exception.class)
241 243
     @Override
242
-    public ResponseBean upDateloginName(Integer id, String paramets) {
244
+    public ResponseBean upDateloginName(Integer id, String paramets,Integer communityId) {
243 245
         ResponseBean response = new ResponseBean();
244 246
 
245 247
         JSONObject jsonObject = JSONObject.parseObject(paramets);
@@ -288,11 +290,11 @@ public class TaUserServiceImpl implements ITaUserService {
288 290
             response.addError("验证码错误!");
289 291
             return response;
290 292
         }
291
-
292
-
293 293
             TaUser taUser=new TaUser();
294 294
             taUser.setLoginName(phone);
295 295
             taUser.setId(userId);
296
+            taUser.setUpdateDate(new Date());
297
+            taUser.setUpdateUser(id);
296 298
             taUserMapper.updateLongName(taUser);
297 299
             response.addSuccess("修改成功");
298 300
             AppkeyCache.setCache(user.getLoginName(),"null");
@@ -303,10 +305,10 @@ public class TaUserServiceImpl implements ITaUserService {
303 305
              */
304 306
 
305 307
             // 修改楼栋信息资料库的手机号
306
-            Map<String, Object> map = Maps.newHashMap();
307
-            map.put("communityId", user.getCommunityId());
308
-            map.put("userId", userId);
309
-            TaSysUserRole taSysUserRole = taSysUserRoleMapper.selectByCommunityIdAndUserId(map);
308
+            Map<String, Object> roleMap = Maps.newHashMap();
309
+            roleMap.put("communityId", user.getCommunityId());
310
+            roleMap.put("userId", userId);
311
+            TaSysUserRole taSysUserRole = taSysUserRoleMapper.selectByCommunityIdAndUserId(roleMap);
310 312
             // 1 业主 2 租客 3 家属
311 313
             // 只允许业主修改
312 314
             if (taSysUserRole.getRoleId().intValue() == 1) {
@@ -350,10 +352,24 @@ public class TaUserServiceImpl implements ITaUserService {
350 352
         ResponseBean response = new ResponseBean();
351 353
 
352 354
         TaUser taUser = taUserMapper.selectByPrimaryKey(user.getId());
355
+        HashMap map= new HashMap<>();
356
+                map.put("communityId",taUser.getCommunityId());
357
+                map.put("userId",taUser.getId());
358
+        TaSysUserRole TaSysUserRole= taSysUserRoleMapper.selectByCommunityIdAndUserId(map);
353 359
         BeanTools.copyProperties(user, taUser);
354
-
355
-        int result = taUserMapper.updateByPrimaryKeySelective(taUser);
356
-
360
+            int result = taUserMapper.updateByPrimaryKeySelective(taUser);
361
+            int VerifyStatus= Integer.parseInt(taUser.getVerifyStatus());
362
+            int Role= TaSysUserRole.getRoleId();
363
+            if (1==VerifyStatus &&1==Role) {
364
+            TpBuildingOwnerInfo TpBuildingOwnerInfo = new TpBuildingOwnerInfo();
365
+            TpBuildingOwnerInfo.setOwnerName(user.getUserName());
366
+            TpBuildingOwnerInfo.setGender(user.getGender());
367
+            TpBuildingOwnerInfo.setOwnerTel(user.getLoginName());
368
+            TpBuildingOwnerInfo.setUpdateDate(new Date());
369
+            TpBuildingOwnerInfo.setUpdateUser(taUser.getId());
370
+            TpBuildingOwnerInfo.setId(taUser.getBuildingOwnerInfoId());
371
+            tpBuildingOwnerInfoMapper.updateByPrimaryKeySelective(TpBuildingOwnerInfo);
372
+        }
357 373
         if (result > 0){
358 374
             response.addSuccess("修改成功!");
359 375
         }else {

+ 63
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml 查看文件

@@ -231,4 +231,67 @@
231 231
       update_date = #{updateDate,jdbcType=TIMESTAMP}
232 232
     where id = #{id,jdbcType=INTEGER}
233 233
   </update>
234
+  <update id="updatOwnerTel" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
235
+    update tp_building_owner_info
236
+    <set >
237
+      <if test="communityId != null" >
238
+        community_id = #{communityId,jdbcType=INTEGER},
239
+      </if>
240
+      <if test="idCard != null" >
241
+        id_card = #{idCard,jdbcType=VARCHAR},
242
+      </if>
243
+      <if test="phase != null">
244
+        phase = #{phase,jdbcType=VARCHAR},
245
+      </if>
246
+      <if test="building != null" >
247
+        building = #{building,jdbcType=VARCHAR},
248
+      </if>
249
+      <if test="unit != null" >
250
+        unit = #{unit,jdbcType=VARCHAR},
251
+      </if>
252
+      <if test="level != null" >
253
+        level = #{level,jdbcType=VARCHAR},
254
+      </if>
255
+      <if test="roomNo != null" >
256
+        room_no = #{roomNo,jdbcType=VARCHAR},
257
+      </if>
258
+      <if test="ownerName != null" >
259
+        owner_name = #{ownerName,jdbcType=VARCHAR},
260
+      </if>
261
+      <if test="ownerTel != null" >
262
+        owner_tel = #{ownerTel,jdbcType=VARCHAR},
263
+      </if>
264
+      <if test="gender != null" >
265
+        gender = #{gender,jdbcType=CHAR},
266
+      </if>
267
+      <if test="pairStatus != null" >
268
+        pair_status = #{pairStatus,jdbcType=CHAR},
269
+      </if>
270
+      <if test="verifyStatus != null" >
271
+        verify_status = #{verifyStatus,jdbcType=CHAR},
272
+      </if>
273
+      <if test="createUser != null" >
274
+        create_user = #{createUser,jdbcType=INTEGER},
275
+      </if>
276
+      <if test="createDate != null" >
277
+        create_date = #{createDate,jdbcType=TIMESTAMP},
278
+      </if>
279
+      <if test="updateUser != null" >
280
+        update_user = #{updateUser,jdbcType=INTEGER},
281
+      </if>
282
+      <if test="updateDate != null" >
283
+        update_date = #{updateDate,jdbcType=TIMESTAMP},
284
+      </if>
285
+    </set>
286
+    where community_id = #{communityId,jdbcType=INTEGER} and wnerTel =  owner_tel = #{ownerTel,jdbcType=VARCHAR}
287
+  </update>
288
+
289
+  <select id="selectOwnerTel" resultType="com.community.huiju.model.TpBuildingOwnerInfo" parameterType="string">
290
+    select
291
+    id
292
+    from
293
+    tp_building_owner_info
294
+    where  owner_tel = #{ownerTel,jdbcType=VARCHAR}
295
+  </select>
296
+
234 297
 </mapper>

+ 1
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/UserMapper.java 查看文件

@@ -16,6 +16,6 @@ import org.apache.ibatis.annotations.Param;
16 16
  */
17 17
 @Mapper
18 18
 public interface UserMapper extends BaseMapper<User> {
19
-    String selectByIdCreateUserName(@Param("id") Integer id);
19
+    String selectByIdUserName(@Param("id") Integer id);
20 20
 
21 21
 }

+ 2
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpAnnouncementServiceImpl.java 查看文件

@@ -74,9 +74,9 @@ private  TpAnnouncementMapper tpAnnouncementMapper;
74 74
             AnnouncementTable announcementTable = new AnnouncementTable();
75 75
             BeanUtils.copyProperties(e, announcementTable);
76 76
             //创建人
77
-            String createUserName = userMapper.selectByIdCreateUserName(e.getUpdateUser());
77
+            String createUserName = userMapper.selectByIdUserName(e.getUpdateUser());
78 78
             //修改人
79
-            String updateDateName = userMapper.selectByIdCreateUserName(e.getCreateUser());
79
+            String updateDateName = userMapper.selectByIdUserName(e.getCreateUser());
80 80
             announcementTable.setCreateUserName(createUserName);
81 81
             announcementTable.setUpdateDateName(updateDateName);
82 82
             return announcementTable;

+ 1
- 1
CODE/smart-community/property-api/src/main/resources/mapper/TpAnnouncementMapper.xml 查看文件

@@ -21,7 +21,7 @@
21 21
           AND announcement_title like concat('%',#{record.announcementTitle,jdbcType=VARCHAR},'%')
22 22
         </if>
23 23
           AND community_id = #{record.communityId,jdbcType=INTEGER}
24
-          order by create_date desc
24
+          ORDER BY sort DESC,create_date desc
25 25
       </where>
26 26
   </select>
27 27
   <select id="getById" resultType="com.community.huiju.model.TpAnnouncement">

+ 1
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml 查看文件

@@ -32,6 +32,7 @@
32 32
                 and	(verify_status = 1 or verify_status = 2)
33 33
             </if>
34 34
             and community_id=#{CommunityId,jdbcType=INTEGER}
35
+            order by create_date desc
35 36
         </where>
36 37
     </select>
37 38
 

+ 1
- 1
CODE/smart-community/property-api/src/main/resources/mapper/UserMapper.xml 查看文件

@@ -1,7 +1,7 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.community.huiju.dao.UserMapper">
4
-    <select id="selectByIdCreateUserName" parameterType="int" resultType="string">
4
+    <select id="selectByIdUserName" parameterType="int" resultType="string">
5 5
         SELECT
6 6
          user_name
7 7
         FROM

+ 4
- 4
VUECODE/smart-property-manage/src/router/index.js 查看文件

@@ -145,14 +145,14 @@ export const constantRouterMap = [
145 145
         meta: { title: '活动详情', icon: 'table' }
146 146
       },
147 147
       {
148
-        path: '/announcement',
148
+        path: '/announcement/add',
149 149
         component: () => import('@/views/social/announcement/add'),
150 150
         name: 'announcement-add',
151 151
         hidden: true,
152 152
         meta: { title: '添加公告', icon: 'table' }
153 153
       },
154 154
       {
155
-        path: '/announcement',
155
+        path: '/announcement/edit',
156 156
         component: () => import('@/views/social/announcement/edit'),
157 157
         name: 'announcement-edit',
158 158
         hidden: true,
@@ -166,11 +166,11 @@ export const constantRouterMap = [
166 166
         meta: { title: '活动报名人', icon: 'table' }
167 167
       },
168 168
       {
169
-        path: '/announcement',
169
+        path: '/announcement/details',
170 170
         component: () => import('@/views/social/announcement/details'),
171 171
         name: 'contentParticulars-details',
172 172
         hidden: true,
173
-        meta: { title: '编辑公告', icon: 'table' }
173
+        meta: { title: '公告详情', icon: 'table' }
174 174
       }
175 175
     ]
176 176
   },

+ 2
- 0
VUECODE/smart-property-manage/src/views/social/announcement/add.vue 查看文件

@@ -112,6 +112,8 @@ export default {
112 112
           return false
113 113
         }
114 114
       })
115
+       // 关闭加载框
116
+      loading.close()
115 117
     },
116 118
     resetForm(formName,status) {
117 119
       console.log(status)

+ 8
- 9
VUECODE/smart-property-manage/src/views/social/announcement/details.vue 查看文件

@@ -24,7 +24,7 @@
24 24
     </div> -->
25 25
     <!-- <span>报名截止时间:{{ formatDate(ruleForm.registrationEndTime) }}</span> -->
26 26
     <div class="bom-button">
27
-      <el-button type="primary" style="width: 150px;" @click="ediActivity">修改</el-button>
27
+      <el-button type="primary" style="width: 150px;" @click="edi">修改</el-button>
28 28
     </div>
29 29
   </div>
30 30
 </template>
@@ -64,14 +64,10 @@ export default {
64 64
       this.ruleForm.announcementCarouselImg=resData.tpAnnouncement.announcementCarouselImg // 轮播图
65 65
       this.sort=resData.tpAnnouncement.sort// 权重
66 66
         //多张图片进行遍历
67
-        for (let i = 0; i <=resData.studentList.length; i++) {
68
-        //  this.ruleForm.contentImg.push({ url: resData.studentList[i].imageUrl })
69
-        
70
-        console.log("sssss:",resData.studentList.imageUrl[i])
67
+        for (let i = 0; i <resData.studentList.length; i++) {
68
+          this.ruleForm.contentImg.push({ url: resData.studentList[i].imageUrl })
71 69
         }
72 70
       })
73
-
74
-      console.log(this.ruleForm.contentImg)
75 71
     },
76 72
     formatDate(val) {
77 73
       var value = new Date(val)
@@ -84,8 +80,11 @@ export default {
84 80
       // return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
85 81
       return year + '-' + month + '-' + day
86 82
     },
87
-    ediActivity() { // 修改活动
88
-      this.$router.push({ name: 'activity-edi', params: { id: this.ruleForm.id }})
83
+    edi() { // 修改活动
84
+        this.$router.push({ name: 'announcement-edit' , params: { id: this.ruleForm.id }})
85
+        console.log("123")
86
+        //   this.$router.push({ name: 'announcement-edit', params: { id: this.ruleForm.id }})
87
+      
89 88
     }
90 89
   }
91 90
 }