|
@@ -62,7 +62,7 @@ public class PlanServiceImpl implements PlanService {
|
|
|
public String getSign(PlanAddBo bo) {
|
|
|
QueryWrapper<App> appQueryWrapper = new QueryWrapper<>();
|
|
|
appQueryWrapper.eq("appkey",bo.getAppkey());
|
|
|
- appQueryWrapper.eq("state",0);
|
|
|
+ appQueryWrapper.eq("state",1);
|
|
|
appQueryWrapper.eq("deleted","0");
|
|
|
App app = appMapper.selectOne(appQueryWrapper);
|
|
|
if (app == null)
|
|
@@ -89,7 +89,7 @@ public class PlanServiceImpl implements PlanService {
|
|
|
public int addPlan(PlanAddBo bo) {
|
|
|
QueryWrapper<App> appQueryWrapper = new QueryWrapper<>();
|
|
|
appQueryWrapper.eq("appkey",bo.getAppkey());
|
|
|
- appQueryWrapper.eq("state",0);
|
|
|
+ appQueryWrapper.eq("state",1);
|
|
|
appQueryWrapper.eq("deleted","0");
|
|
|
App app = appMapper.selectOne(appQueryWrapper);
|
|
|
if (app == null)
|
|
@@ -161,10 +161,15 @@ public class PlanServiceImpl implements PlanService {
|
|
|
Plan plan = planMapper.selectOne(planQueryWrapper);
|
|
|
if (plan == null)
|
|
|
return -1;
|
|
|
+ // 没有该app或者该app已经被禁用,则不允许审核
|
|
|
QueryWrapper<App> appQueryWrapper = new QueryWrapper<>();
|
|
|
appQueryWrapper.eq("appkey",plan.getAppkey());
|
|
|
+ appQueryWrapper.eq("state",1);
|
|
|
appQueryWrapper.eq("deleted","0");
|
|
|
App app = appMapper.selectOne(appQueryWrapper);
|
|
|
+ if (app == null)
|
|
|
+ return -1;
|
|
|
+
|
|
|
plan.setState(bo.getState());
|
|
|
int i = planMapper.updateById(plan);
|
|
|
if (i == 0)
|
|
@@ -495,6 +500,7 @@ public class PlanServiceImpl implements PlanService {
|
|
|
public PageInfo<List<Equipment>> getEquipments(PlanBo bo) {
|
|
|
PageHelper.startPage(bo.getPageNum(),bo.getPageSize(),true);
|
|
|
QueryWrapper<Equipment> equipmentQueryWrapper = new QueryWrapper<>();
|
|
|
+ equipmentQueryWrapper.eq("state",1);
|
|
|
if (bo.getText() != null)
|
|
|
equipmentQueryWrapper.and(equipmentQueryWrapper1 -> {
|
|
|
equipmentQueryWrapper1.like("equipment_id",bo.getText())
|