傅行帆 6 gadus atpakaļ
vecāks
revīzija
9827f44803

+ 7
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaUserMapper.java Parādīt failu

@@ -44,6 +44,13 @@ public interface TaUserMapper extends BaseMapper<TaUser> {
44 44
     TaUser selectByTel(@Param("loginName") String ownerTel,@Param("communityId") Integer communityId);
45 45
     
46 46
     int batchUpdate(List<TaUser> updataTaUserList);
47
+    
48
+    /**
49
+     * 更新角色为业主
50
+     * @param updataTaUserList
51
+     * @return
52
+     */
53
+    int batchUpdateRole(List<TaUser> updataTaUserList);
47 54
 
48 55
     /**
49 56
      * 根据手机得到用户ID

+ 1
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java Parādīt failu

@@ -428,6 +428,7 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
428 428
         }
429 429
         if (updataTaUserList.size() > 0){
430 430
             taUserMapper.batchUpdate(updataTaUserList);
431
+            taUserMapper.batchUpdateRole(updataTaUserList);
431 432
         }
432 433
         responseBean.addSuccess("success");
433 434
         return responseBean;

+ 10
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TaUserMapper.xml Parādīt failu

@@ -339,4 +339,14 @@
339 339
     where parent_id=#{id,jdbcType=INTEGER};
340 340
   </select>
341 341
 
342
+  <update id="batchUpdateRole" parameterType="java.util.ArrayList">
343
+    <foreach collection="list" item="item" index="index" open="" close="" separator=";">
344
+      update ta_sys_user_role
345
+      <set>
346
+        role_id= 1
347
+      </set>
348
+      where user_id = ${item.id} and community_id = ${item.communityId}
349
+    </foreach>
350
+  </update>
351
+
342 352
 </mapper>

+ 1
- 0
VUECODE/smart-property-manage/src/utils/ajax.js Parādīt failu

@@ -18,6 +18,7 @@ const Axios = axios.create({
18 18
 Axios.interceptors.request.use((config) => {
19 19
   config.headers['Content-Type'] = config.headerData ? config.headerData : 'multipart/form-data'
20 20
   config.headers['X-Auth-Token'] = getToken()
21
+  config.headers['Login-Type'] = 'web'
21 22
   // config.urlData = { ...config.urlData,  }
22 23
   // 处理请求data,若为get请求,拼到url后面,若为post请求,直接添加到body中
23 24
   const urlData = qs.stringify(config.urlData)