Browse Source

线上bug

weichaochao 5 years ago
parent
commit
790c961457

+ 2
- 2
src/main/java/com/huiju/estateagents/center/taUser/controller/TaUserController.java View File

@@ -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 View File

@@ -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 View File

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

+ 5
- 0
src/main/java/com/huiju/estateagents/common/CommConstant.java View File

@@ -563,6 +563,11 @@ public class CommConstant {
563 563
      */
564 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 572
      * 查看分享者活动类型 h5
568 573
      */