|
@@ -9,10 +9,12 @@ import com.ruoyi.common.core.domain.R;
|
|
|
import com.ruoyi.common.core.validate.QueryGroup;
|
|
|
import com.ruoyi.demo.entity.App;
|
|
|
import com.ruoyi.demo.entity.Commercial;
|
|
|
+import com.ruoyi.demo.entity.Plan;
|
|
|
import com.ruoyi.demo.entity.bo.CallBackBean;
|
|
|
import com.ruoyi.demo.entity.vo.AppVo;
|
|
|
import com.ruoyi.demo.mapper.AppMapper;
|
|
|
import com.ruoyi.demo.mapper.CommercialMapper;
|
|
|
+import com.ruoyi.demo.mapper.PlanMapper;
|
|
|
import com.ruoyi.demo.service.AppService;
|
|
|
import com.ruoyi.demo.utils.SendCallBackUtil;
|
|
|
import com.ruoyi.demo.utils.UuidUtil;
|
|
@@ -36,6 +38,9 @@ public class AppServiceImpl implements AppService {
|
|
|
@Autowired
|
|
|
CommercialMapper commercialMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ PlanMapper planMapper;
|
|
|
+
|
|
|
@Override
|
|
|
public R addApp(AppVo appVo) {
|
|
|
//判断是否存在该商户
|
|
@@ -106,6 +111,15 @@ public class AppServiceImpl implements AppService {
|
|
|
.set("prove_5",appVo.getProve5())
|
|
|
.set("annotation",appVo.getAnnotation());
|
|
|
appMapper.update(null,updateWrapper);
|
|
|
+
|
|
|
+
|
|
|
+ if(appVo.getState() == 1){
|
|
|
+ //禁用
|
|
|
+ UpdateWrapper<Plan> planUpdateWrapper = new UpdateWrapper<>();
|
|
|
+ planUpdateWrapper.eq("appkey",appVo.getAppkey());
|
|
|
+ planUpdateWrapper.set("on_state",1);
|
|
|
+ planMapper.update(null,planUpdateWrapper);
|
|
|
+ }
|
|
|
return R.ok("修改成功");
|
|
|
}else
|
|
|
return R.fail("不存在该商户");
|