|
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.xunmei.common.core.constant.SecurityConstants;
|
|
import com.xunmei.common.core.constant.SecurityConstants;
|
|
|
import com.xunmei.common.core.domain.R;
|
|
import com.xunmei.common.core.domain.R;
|
|
|
import com.xunmei.common.core.web.domain.AjaxResult;
|
|
import com.xunmei.common.core.web.domain.AjaxResult;
|
|
|
|
|
+import com.xunmei.common.security.annotation.RequiresPermissions;
|
|
|
import com.xunmei.core.resumption.domain.AppPlan;
|
|
import com.xunmei.core.resumption.domain.AppPlan;
|
|
|
import com.xunmei.core.resumption.dto.DistributeDto;
|
|
import com.xunmei.core.resumption.dto.DistributeDto;
|
|
|
import com.xunmei.core.resumption.service.AppPlanService;
|
|
import com.xunmei.core.resumption.service.AppPlanService;
|
|
@@ -45,6 +46,7 @@ public class ApiPlanController {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("/find")
|
|
@PostMapping("/find")
|
|
|
|
|
+ @RequiresPermissions("core:plan:find")
|
|
|
public AjaxResult hostList(@RequestBody AppPlanVo info) {
|
|
public AjaxResult hostList(@RequestBody AppPlanVo info) {
|
|
|
|
|
|
|
|
Page<AppPlan> result = appPlanService.selectPage(info);
|
|
Page<AppPlan> result = appPlanService.selectPage(info);
|
|
@@ -52,6 +54,7 @@ public class ApiPlanController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/distribute")
|
|
@PostMapping("/distribute")
|
|
|
|
|
+ @RequiresPermissions("core:plan:distribute")
|
|
|
public AjaxResult distribute(@RequestBody DistributeDto dto) {
|
|
public AjaxResult distribute(@RequestBody DistributeDto dto) {
|
|
|
try {
|
|
try {
|
|
|
appPlanService.distributeToOrg(dto);
|
|
appPlanService.distributeToOrg(dto);
|
|
@@ -80,6 +83,7 @@ public class ApiPlanController {
|
|
|
* @time 2022/5/5 14:39
|
|
* @time 2022/5/5 14:39
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping("/item/find")
|
|
@RequestMapping("/item/find")
|
|
|
|
|
+ @RequiresPermissions("core:plan:itemFind")
|
|
|
public AjaxResult itemList(@RequestBody RuleItemVo info) {
|
|
public AjaxResult itemList(@RequestBody RuleItemVo info) {
|
|
|
Page<RuleItemVo> result = appPlanService.selectItemPage(info);
|
|
Page<RuleItemVo> result = appPlanService.selectItemPage(info);
|
|
|
return AjaxResult.success(result);
|
|
return AjaxResult.success(result);
|
|
@@ -94,6 +98,7 @@ public class ApiPlanController {
|
|
|
* @time 2022/5/5 15:05
|
|
* @time 2022/5/5 15:05
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping("/find/rule")
|
|
@RequestMapping("/find/rule")
|
|
|
|
|
+ @RequiresPermissions("core:plan:findRule")
|
|
|
public AjaxResult findRule(@RequestBody RuleRequestVo info) {
|
|
public AjaxResult findRule(@RequestBody RuleRequestVo info) {
|
|
|
List<Map<String, Object>> list = appPlanService.findByOrg(info);
|
|
List<Map<String, Object>> list = appPlanService.findByOrg(info);
|
|
|
return AjaxResult.success(list);
|
|
return AjaxResult.success(list);
|
|
@@ -108,6 +113,7 @@ public class ApiPlanController {
|
|
|
* @time 2022/5/5 16:37
|
|
* @time 2022/5/5 16:37
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping("/edit")
|
|
@RequestMapping("/edit")
|
|
|
|
|
+ @RequiresPermissions("core:plan:edit")
|
|
|
public AjaxResult edit(@RequestBody AppPlanVo info) {
|
|
public AjaxResult edit(@RequestBody AppPlanVo info) {
|
|
|
try {
|
|
try {
|
|
|
appPlanService.saveOrUpdatePlan(info);
|
|
appPlanService.saveOrUpdatePlan(info);
|
|
@@ -129,6 +135,7 @@ public class ApiPlanController {
|
|
|
*/
|
|
*/
|
|
|
@ApiOperation(value = "获取详情")
|
|
@ApiOperation(value = "获取详情")
|
|
|
@GetMapping(value = "/find/{id}")
|
|
@GetMapping(value = "/find/{id}")
|
|
|
|
|
+ @RequiresPermissions("core:plan:findById")
|
|
|
public AjaxResult findById(@PathVariable Long id) {
|
|
public AjaxResult findById(@PathVariable Long id) {
|
|
|
AppPlanVo app = appPlanService.findById(id);
|
|
AppPlanVo app = appPlanService.findById(id);
|
|
|
return AjaxResult.success(app);
|
|
return AjaxResult.success(app);
|
|
@@ -136,6 +143,7 @@ public class ApiPlanController {
|
|
|
|
|
|
|
|
@ApiOperation(value = "获取详情")
|
|
@ApiOperation(value = "获取详情")
|
|
|
@GetMapping(value = "/getPointIds/{id}")
|
|
@GetMapping(value = "/getPointIds/{id}")
|
|
|
|
|
+// @RequiresPermissions("core:plan:findById")
|
|
|
public AjaxResult getPointIds(@PathVariable Long id) {
|
|
public AjaxResult getPointIds(@PathVariable Long id) {
|
|
|
return AjaxResult.success(appPlanService.selectItemIdsByPlanId(id));
|
|
return AjaxResult.success(appPlanService.selectItemIdsByPlanId(id));
|
|
|
}
|
|
}
|
|
@@ -150,6 +158,7 @@ public class ApiPlanController {
|
|
|
*/
|
|
*/
|
|
|
@ApiOperation(value = "删除计划")
|
|
@ApiOperation(value = "删除计划")
|
|
|
@GetMapping(value = "/delete/{id}")
|
|
@GetMapping(value = "/delete/{id}")
|
|
|
|
|
+ @RequiresPermissions("core:plan:delete")
|
|
|
public AjaxResult deleted(@PathVariable Long id) {
|
|
public AjaxResult deleted(@PathVariable Long id) {
|
|
|
try {
|
|
try {
|
|
|
appPlanService.deleted(id);
|
|
appPlanService.deleted(id);
|