|
@@ -13,6 +13,7 @@ import com.yonge.toolset.base.util.StringUtil;
|
|
import io.swagger.annotations.*;
|
|
import io.swagger.annotations.*;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.http.HttpStatus;
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
@@ -39,6 +40,7 @@ public class ActivityPlanController extends BaseController {
|
|
*/
|
|
*/
|
|
@GetMapping("/detail/{id}")
|
|
@GetMapping("/detail/{id}")
|
|
@ApiOperation(value = "详情", notes = "传入id")
|
|
@ApiOperation(value = "详情", notes = "传入id")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('activityPlan/detail')")
|
|
public HttpResponseResult<ActivityPlanVo> detail(@PathVariable("id") Long id) {
|
|
public HttpResponseResult<ActivityPlanVo> detail(@PathVariable("id") Long id) {
|
|
return succeed(activityPlanService.detail(id));
|
|
return succeed(activityPlanService.detail(id));
|
|
}
|
|
}
|
|
@@ -48,6 +50,7 @@ public class ActivityPlanController extends BaseController {
|
|
*/
|
|
*/
|
|
@PostMapping("/page")
|
|
@PostMapping("/page")
|
|
@ApiOperation(value = "查询分页", notes = "传入activityPlanSearch")
|
|
@ApiOperation(value = "查询分页", notes = "传入activityPlanSearch")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('activityPlan/page')")
|
|
public HttpResponseResult<PageInfo<ActivityPlanVo>> page(@RequestBody ActivityPlanSearch query) {
|
|
public HttpResponseResult<PageInfo<ActivityPlanVo>> page(@RequestBody ActivityPlanSearch query) {
|
|
IPage<ActivityPlanVo> pages = activityPlanService.selectPage(PageUtil.getPage(query), query);
|
|
IPage<ActivityPlanVo> pages = activityPlanService.selectPage(PageUtil.getPage(query), query);
|
|
return succeed(PageUtil.pageInfo(pages));
|
|
return succeed(PageUtil.pageInfo(pages));
|
|
@@ -58,6 +61,7 @@ public class ActivityPlanController extends BaseController {
|
|
*/
|
|
*/
|
|
@PostMapping("/submit")
|
|
@PostMapping("/submit")
|
|
@ApiOperation(value = "新增或修改", notes = "传入activityPlan")
|
|
@ApiOperation(value = "新增或修改", notes = "传入activityPlan")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('activityPlan/submit')")
|
|
public HttpResponseResult<ActivityPlan> submit(@Valid @RequestBody ActivityPlanDto activityPlan) {
|
|
public HttpResponseResult<ActivityPlan> submit(@Valid @RequestBody ActivityPlanDto activityPlan) {
|
|
SysUser user = sysUserFeignService.queryUserInfo();
|
|
SysUser user = sysUserFeignService.queryUserInfo();
|
|
if (user == null || null == user.getId()) {
|
|
if (user == null || null == user.getId()) {
|
|
@@ -71,6 +75,7 @@ public class ActivityPlanController extends BaseController {
|
|
*/
|
|
*/
|
|
@GetMapping("/updateActivityState")
|
|
@GetMapping("/updateActivityState")
|
|
@ApiOperation(value = "启用/停用")
|
|
@ApiOperation(value = "启用/停用")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('activityPlan/updateActivityState')")
|
|
public HttpResponseResult updateActivityState(
|
|
public HttpResponseResult updateActivityState(
|
|
@ApiParam(value = "活动id", required = true) @RequestParam("activityId") Long activityId,
|
|
@ApiParam(value = "活动id", required = true) @RequestParam("activityId") Long activityId,
|
|
@ApiParam(value = "活动状态 0 停用 1 启用", required = true) @RequestParam("activityState") Integer activityState) {
|
|
@ApiParam(value = "活动状态 0 停用 1 启用", required = true) @RequestParam("activityState") Integer activityState) {
|