#
luxiaotao1123
2024-09-14 e3687b1f791370f5b35f11d91e2b41c11e491aac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package com.zy.acs.manager.manager.controller;
 
import com.zy.acs.manager.common.annotation.OperationLog;
import com.zy.acs.framework.common.R;
import com.zy.acs.manager.system.controller.BaseController;
import com.zy.acs.manager.core.service.MainService;
import com.zy.acs.manager.manager.controller.param.OpenBusSubmitParam;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * Created by vincent on 2023/6/12
 */
@Api(tags = "开放平台")
@RestController
@RequestMapping("/api/open")
public class OpenController extends BaseController {
 
    @Autowired
    private MainService mainService;
 
    @PreAuthorize("hasAuthority('open:bus:submit')")
    @PostMapping("/bus/submit")
    @OperationLog("任务下发")
    public R save(@RequestBody OpenBusSubmitParam param) {
        mainService.generateBusAndTask(param, null);
        return R.ok("保存成功");
    }
 
}