weichaochao 5 vuotta sitten
vanhempi
commit
790c961457

+ 2
- 2
src/main/java/com/huiju/estateagents/center/taUser/controller/TaUserController.java Näytä tiedosto

155
     }
155
     }
156
 
156
 
157
     @PutMapping(value = "/{plat}/turn/taUser/{id}/{type}")
157
     @PutMapping(value = "/{plat}/turn/taUser/{id}/{type}")
158
-    public ResponseBean turnUser(@PathVariable String type, @PathVariable Integer id) {
158
+    public ResponseBean turnUser(@PathVariable String type, @PathVariable Integer id, @PathVariable("plat")String plat) {
159
         try {
159
         try {
160
-            iTaUserService.turnUserOnOrNot(id, "on".equals(type));
160
+            iTaUserService.turnUserOnOrNot(id, "on".equals(type), plat);
161
         } catch (Exception e) {
161
         } catch (Exception e) {
162
             e.printStackTrace();
162
             e.printStackTrace();
163
             return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
163
             return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);

+ 1
- 1
src/main/java/com/huiju/estateagents/center/taUser/service/ITaUserService.java Näytä tiedosto

28
 
28
 
29
     void updateInfoWithOrg(TaUser taUser) throws Exception;
29
     void updateInfoWithOrg(TaUser taUser) throws Exception;
30
 
30
 
31
-    void turnUserOnOrNot(Integer id, boolean isOn) throws Exception;
31
+    void turnUserOnOrNot(Integer id, boolean isOn, String plat) throws Exception;
32
 
32
 
33
     void resetPassword(Integer id, String newPass) throws Exception;
33
     void resetPassword(Integer id, String newPass) throws Exception;
34
     
34
     

+ 4
- 1
src/main/java/com/huiju/estateagents/center/taUser/service/impl/TaUserServiceImpl.java Näytä tiedosto

348
 	}
348
 	}
349
 
349
 
350
 	@Override
350
 	@Override
351
-	public void turnUserOnOrNot(Integer id, boolean isOn) throws Exception {
351
+	public void turnUserOnOrNot(Integer id, boolean isOn, String plat) throws Exception {
352
 		TaUser taUser = this.getById(id);
352
 		TaUser taUser = this.getById(id);
353
 		if (null == taUser) {
353
 		if (null == taUser) {
354
 			throw new Exception("未找到有效的用户信息");
354
 			throw new Exception("未找到有效的用户信息");
359
 		user.setStatus(status);
359
 		user.setStatus(status);
360
 
360
 
361
 		QueryWrapper<TaUser> taUserQueryWrapper = new QueryWrapper<>();
361
 		QueryWrapper<TaUser> taUserQueryWrapper = new QueryWrapper<>();
362
+		if (CommConstant.LOGIN_TYPE_ADMIN.equals(plat)){
363
+			taUserQueryWrapper.eq("user_id", id);
364
+		}
362
 		taUserQueryWrapper.eq("org_id", taUserMapper.selectById(id).getOrgId());
365
 		taUserQueryWrapper.eq("org_id", taUserMapper.selectById(id).getOrgId());
363
 
366
 
364
 		if (!this.update(user, taUserQueryWrapper)) {
367
 		if (!this.update(user, taUserQueryWrapper)) {

+ 5
- 0
src/main/java/com/huiju/estateagents/common/CommConstant.java Näytä tiedosto

563
      */
563
      */
564
     public static final String LOGIN_TYPE_CENTER = "center";
564
     public static final String LOGIN_TYPE_CENTER = "center";
565
 
565
 
566
+    /**
567
+     * 登录业务端系统类型
568
+     */
569
+    public static final String LOGIN_TYPE_ADMIN = "admin";
570
+
566
     /**
571
     /**
567
      * 查看分享者活动类型 h5
572
      * 查看分享者活动类型 h5
568
      */
573
      */