m
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package com.cnbm.packing.controller;
|
||||
|
||||
import com.cnbm.admin.annotation.LogOperation;
|
||||
import com.cnbm.admin.utils.CodeGeneratorHelper;
|
||||
import com.cnbm.common.constant.Constant;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.utils.ExcelUtils;
|
||||
@@ -24,7 +23,6 @@ import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -49,9 +47,11 @@ public class PrintModelController {
|
||||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
|
||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
|
||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
|
||||
@ApiImplicitParam(name = "name", value = "标签名称", paramType = "query", dataTypeClass = String.class)
|
||||
@ApiImplicitParam(name = "name", value = "标签名称", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "type", value = "类型,0:模组标签,1:等级标签", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "lineBody", value = "线体,1=F ; 2=S", paramType = "query", dataTypeClass = Integer.class)
|
||||
})
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:printModel:page')")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:printModel:page')")
|
||||
public Result<PageData<PrintModelDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||
PageData<PrintModelDTO> page = printModelService.page(params);
|
||||
|
||||
@@ -60,7 +60,7 @@ public class PrintModelController {
|
||||
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("信息")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:printModel:info')")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:printModel:info')")
|
||||
public Result<PrintModelDTO> get(@PathVariable("id") Long id){
|
||||
PrintModelDTO data = printModelService.get(id);
|
||||
|
||||
@@ -69,8 +69,8 @@ public class PrintModelController {
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("保存")
|
||||
// @LogOperation("保存")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:printModel:save')")
|
||||
@LogOperation("保存")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:printModel:save')")
|
||||
public Result<Long> save(@RequestBody PrintModelDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
@@ -82,8 +82,8 @@ public class PrintModelController {
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
// @LogOperation("修改")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:printModel:update')")
|
||||
@LogOperation("修改")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:printModel:update')")
|
||||
public Result<Long> update(@RequestBody PrintModelDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
@@ -95,8 +95,8 @@ public class PrintModelController {
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除")
|
||||
// @LogOperation("删除")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:printModel:delete')")
|
||||
@LogOperation("删除")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:printModel:delete')")
|
||||
public Result delete(@RequestBody Long[] ids){
|
||||
//效验数据
|
||||
AssertUtils.isArrayEmpty(ids, "id");
|
||||
@@ -108,8 +108,8 @@ public class PrintModelController {
|
||||
|
||||
@GetMapping("export")
|
||||
@ApiOperation("导出")
|
||||
// @LogOperation("导出")
|
||||
// @PreAuthorize("@ex.hasAuthority('packing:printModel:export')")
|
||||
@LogOperation("导出")
|
||||
@PreAuthorize("@ex.hasAuthority('packing:printModel:export')")
|
||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<PrintModelDTO> list = printModelService.list(params);
|
||||
|
||||
@@ -118,12 +118,10 @@ public class PrintModelController {
|
||||
|
||||
@PostMapping(value = "list")
|
||||
@ApiOperation(value = "获取打印标签模板列表")
|
||||
// @LogOperation("获取打印标签模板列表")
|
||||
public List<PrintModelDTO> list() { return printModelService.list(); }
|
||||
|
||||
@PostMapping(value = "getCode")
|
||||
@ApiOperation(value = "获取标签编码")
|
||||
// @LogOperation("获取标签编码")
|
||||
public Result<String> getCode() {
|
||||
String code = printModelService.getCode();
|
||||
return new Result<String>().ok(code);
|
||||
|
||||
Reference in New Issue
Block a user