Переглянути джерело

Merge remote-tracking branch 'origin/dev' into dev

loovi 1 рік тому
батько
коміт
c0c4806123

+ 5 - 4
sp-service/level-one-server/src/main/java/com/pj/tb_people/TbPeopleService.java

@@ -116,14 +116,15 @@ public class TbPeopleService extends ServiceImpl<TbPeopleMapper, TbPeople> imple
 		//获取启停状态
 		Integer isLock = startStopDto.getIsLock();
 		//设置启/停
-		tbPeople1.setIsLock(isLock);
+		tbPeople1.setStatus(isLock);
 		//保存结果
 		int i = tbPeopleMapper.updateById(tbPeople1);
 		//远程调用停用app user表中的边民账号
 		int lock = adminInterface.isLock(id.toString(), People.PEOPLE_TYPE_ONE.getCode(), isLock);
-		if((lock + i) != 2)throw new RuntimeException("停用失败!");
-
-		return i == 1 && lock == 1;
+//		if((lock + i) != 2)throw new RuntimeException("停用失败!");
+//
+//		return i == 1 && lock == 1;
+		return true;
 	}
 
 	/**

+ 1 - 1
sp-service/sp-admin/src/main/java/com/pj/project/app_user/AppUserController.java

@@ -111,7 +111,7 @@ public class AppUserController {
 						   @RequestParam("type") Integer type,
 						   @RequestParam("status") Integer status) {
 		int lock = appUserService.isLock(id,type,status);
-		if(lock == 1) return AjaxJson.getSuccess();
+		if(lock == 1) return AjaxJson.getSuccess(lock + "");
 		return AjaxJson.getError();
 	}
 

+ 2 - 0
sp-service/sp-admin/src/main/java/com/pj/project/app_user/AppUserService.java

@@ -152,6 +152,8 @@ public class AppUserService extends ServiceImpl<AppUserMapper, AppUser> implemen
 		if(!matches)return AjaxJson.getError("密码校验错误,请检查!");
 		//判断是否停用
 		if(appUser.getStatus().equals("0"))return AjaxJson.getError("该账户 " + appUser.getPhone() + " 已停用!");
+		//设置登录次数
+		appUser.setLoginCount(appUser.getLoginCount() + 1);
 		//开始执行登录
 		StpUtil.login(appUser.getId());
 		// 组织返回参数,直接拿过来用的,然后自己改吧改吧