Selaa lähdekoodia

主分支bug,dev分支也提交一份

weichaochao 5 vuotta sitten
vanhempi
commit
cf17158702

+ 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)) {

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

575
      */
575
      */
576
     public static final String LOGIN_TYPE_CHANNEL = "channel";
576
     public static final String LOGIN_TYPE_CHANNEL = "channel";
577
 
577
 
578
+    /**
579
+     * 登录业务端系统类型
580
+     */
581
+    public static final String LOGIN_TYPE_ADMIN = "admin";
582
+
583
+
578
     /**
584
     /**
579
      * 登录中心端系统类型
585
      * 登录中心端系统类型
580
      */
586
      */