|
@@ -4,6 +4,7 @@ import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.biz.dal.dao.EmployeeDao;
|
|
|
import com.ym.mec.biz.dal.dto.ActivityPlanAddDto;
|
|
|
+import com.ym.mec.biz.dal.entity.ActivityPlan;
|
|
|
import com.ym.mec.biz.dal.entity.Employee;
|
|
|
import com.ym.mec.biz.dal.page.ActivityPlanQueryInfo;
|
|
|
import com.ym.mec.biz.service.ActivityPlanService;
|
|
@@ -47,6 +48,16 @@ public class ActivityPlanController extends BaseController {
|
|
|
return succeed();
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "修改活动方案")
|
|
|
+ @PostMapping("/enable")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('activityPlan/enable')")
|
|
|
+ public Object enable(Integer id){
|
|
|
+ ActivityPlan activityPlan = activityPlanService.get(id);
|
|
|
+ activityPlan.setEnable(activityPlan.getEnable());
|
|
|
+ activityPlanService.update(activityPlan);
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "分页查询活动方案")
|
|
|
@GetMapping("/queryPage")
|
|
|
@PreAuthorize("@pcs.hasPermissions('activityPlan/queryPage')")
|
|
@@ -76,7 +87,7 @@ public class ActivityPlanController extends BaseController {
|
|
|
if(Objects.isNull(id)){
|
|
|
throw new BizException("请指定活动编号!");
|
|
|
}
|
|
|
- activityPlanService.delete(id);
|
|
|
+ activityPlanService.deleteActivityPlan(id);
|
|
|
return succeed();
|
|
|
}
|
|
|
}
|