Przeglądaj źródła

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

weichaochao 5 lat temu
rodzic
commit
cf17158702

+ 2
- 2
src/main/java/com/huiju/estateagents/center/taUser/controller/TaUserController.java Wyświetl plik

@@ -155,9 +155,9 @@ public class TaUserController extends BaseController {
155 155
     }
156 156
 
157 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 159
         try {
160
-            iTaUserService.turnUserOnOrNot(id, "on".equals(type));
160
+            iTaUserService.turnUserOnOrNot(id, "on".equals(type), plat);
161 161
         } catch (Exception e) {
162 162
             e.printStackTrace();
163 163
             return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);

+ 1
- 1
src/main/java/com/huiju/estateagents/center/taUser/service/ITaUserService.java Wyświetl plik

@@ -28,7 +28,7 @@ public interface ITaUserService extends IService<TaUser> {
28 28
 
29 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 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 Wyświetl plik

@@ -348,7 +348,7 @@ public class TaUserServiceImpl extends ServiceImpl<TaUserMapper, TaUser> impleme
348 348
 	}
349 349
 
350 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 352
 		TaUser taUser = this.getById(id);
353 353
 		if (null == taUser) {
354 354
 			throw new Exception("未找到有效的用户信息");
@@ -359,6 +359,9 @@ public class TaUserServiceImpl extends ServiceImpl<TaUserMapper, TaUser> impleme
359 359
 		user.setStatus(status);
360 360
 
361 361
 		QueryWrapper<TaUser> taUserQueryWrapper = new QueryWrapper<>();
362
+		if (CommConstant.LOGIN_TYPE_ADMIN.equals(plat)){
363
+			taUserQueryWrapper.eq("user_id", id);
364
+		}
362 365
 		taUserQueryWrapper.eq("org_id", taUserMapper.selectById(id).getOrgId());
363 366
 
364 367
 		if (!this.update(user, taUserQueryWrapper)) {

+ 6
- 0
src/main/java/com/huiju/estateagents/common/CommConstant.java Wyświetl plik

@@ -575,6 +575,12 @@ public class CommConstant {
575 575
      */
576 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
      */