|
@@ -10,7 +10,9 @@ import java.util.List;
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.pj.api.client.admin.AdminInterface;
|
|
import com.pj.api.client.admin.AdminInterface;
|
|
|
|
+import com.pj.enummj.People;
|
|
import com.pj.tb_goods_transit.TbGoodsTransit;
|
|
import com.pj.tb_goods_transit.TbGoodsTransit;
|
|
|
|
+import com.pj.tb_people.dto.StartStopDto;
|
|
import com.pj.utils.so.SoMap;
|
|
import com.pj.utils.so.SoMap;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.poi.hssf.usermodel.HSSFRow;
|
|
import org.apache.poi.hssf.usermodel.HSSFRow;
|
|
@@ -102,9 +104,9 @@ public class TbPeopleService extends ServiceImpl<TbPeopleMapper, TbPeople> imple
|
|
/**
|
|
/**
|
|
* 启/停
|
|
* 启/停
|
|
*/
|
|
*/
|
|
- boolean isLock(TbPeople tbPeople){
|
|
|
|
|
|
+ boolean isLock(StartStopDto startStopDto){
|
|
//获取被修改用户id
|
|
//获取被修改用户id
|
|
- Long id = tbPeople.getId();
|
|
|
|
|
|
+ Long id = startStopDto.getId();
|
|
//查询
|
|
//查询
|
|
TbPeople tbPeople1 = tbPeopleMapper.selectById(id);
|
|
TbPeople tbPeople1 = tbPeopleMapper.selectById(id);
|
|
if(tbPeople1 == null)throw new RuntimeException("审核用户不存在,请检查!");
|
|
if(tbPeople1 == null)throw new RuntimeException("审核用户不存在,请检查!");
|
|
@@ -112,13 +114,15 @@ public class TbPeopleService extends ServiceImpl<TbPeopleMapper, TbPeople> imple
|
|
Integer deleteStatus = tbPeople1.getDeleteStatus();
|
|
Integer deleteStatus = tbPeople1.getDeleteStatus();
|
|
if(deleteStatus == 0)throw new RuntimeException("该用户已被删除,无法进行启/停操作!");
|
|
if(deleteStatus == 0)throw new RuntimeException("该用户已被删除,无法进行启/停操作!");
|
|
//获取启停状态
|
|
//获取启停状态
|
|
- Integer isLock = tbPeople.getIsLock();
|
|
|
|
|
|
+ Integer isLock = startStopDto.getIsLock();
|
|
//设置启/停
|
|
//设置启/停
|
|
tbPeople1.setIsLock(isLock);
|
|
tbPeople1.setIsLock(isLock);
|
|
//保存结果
|
|
//保存结果
|
|
int i = tbPeopleMapper.updateById(tbPeople1);
|
|
int i = tbPeopleMapper.updateById(tbPeople1);
|
|
- //远程调用停用app user表中的便民账号
|
|
|
|
- int lock = adminInterface.isLock(id.toString(), 1, isLock);
|
|
|
|
|
|
+ //远程调用停用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;
|
|
return i == 1 && lock == 1;
|
|
}
|
|
}
|
|
|
|
|