| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ycl.common.base.Result; |
| | | import com.ycl.common.constant.UserConstants; |
| | | import com.ycl.common.core.controller.BaseController; |
| | | import com.ycl.common.core.domain.AjaxResult; |
| | | import com.ycl.common.core.domain.entity.SysMenu; |
| | | import com.ycl.common.group.Add; |
| | | import com.ycl.common.group.Update; |
| | | import com.ycl.domain.entity.FlowableType; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Api(value = "工作流分类", tags = "工作流分类管理") |
| | | @RestController |
| | | @RequestMapping("/flowable_type") |
| | | public class FlowableTypeController { |
| | | public class FlowableTypeController extends BaseController { |
| | | |
| | | private final FlowableTypeService flowableTypeService; |
| | | |
| | |
| | | @ApiOperation(value = "添加", notes = "添加") |
| | | // @PreAuthorize("hasAuthority('flowableType:add')") |
| | | public Result add(@RequestBody @Validated(Add.class) FlowableType form) { |
| | | form.setCreateBy(getUsername()); |
| | | form.setCreateTime(new Date()); |
| | | form.setUpdateBy(getUsername()); |
| | | form.setUpdateTime(new Date()); |
| | | flowableTypeService.save(form); |
| | | return Result.ok(); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | @GetMapping("/page") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | @GetMapping("/list") |
| | | // @PreAuthorize("hasAuthority('flowableType:page')") |
| | | public Result page(AbsQuery query) { |
| | | IPage<FlowableType> page = PageUtil.getPage(query, FlowableType.class); |
| | | flowableTypeService.page(page); |
| | | return Result.ok().data(page.getRecords()).total(page.getTotal()); |
| | | public Result list(FlowableType flowableType) { |
| | | List<FlowableType> list = flowableTypeService.selectTypeList(flowableType); |
| | | return Result.ok().data(list); |
| | | } |
| | | |
| | | @GetMapping("/tree_select") |
| | | public AjaxResult treeSelect(FlowableType flowableType) { |
| | | List<FlowableType> list = flowableTypeService.selectTypeList(flowableType); |
| | | return success(flowableTypeService.buildTreeSelect(list)); |
| | | } |
| | | } |