package com.chinaztt.mes.quality.controller;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.chinaztt.mes.common.wrapper.QueryWrapperUtil;
|
import com.chinaztt.mes.quality.dto.ZxLabelBindRelationDTO;
|
import com.chinaztt.mes.quality.entity.ZxLabelBindRelation;
|
import com.chinaztt.mes.quality.service.ZxLabelBindRelationService;
|
import com.chinaztt.ztt.common.core.util.R;
|
import com.chinaztt.ztt.common.log.annotation.SysLog;
|
import com.chinaztt.ztt.common.security.annotation.Inner;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.AllArgsConstructor;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
|
/**
|
* @Description : 中兴标签关系绑定
|
* @ClassName : ZxLabelBindRelationController
|
* @Author : sll
|
* @Date: 2022-11-30 14:58
|
*/
|
@RestController
|
@AllArgsConstructor
|
@RequestMapping("/zxlabelbind")
|
@Api(value = "zxlabelbind", tags = "中兴标签关系绑定")
|
public class ZxLabelBindRelationController{
|
private ZxLabelBindRelationService zxLabelBindRelationService;
|
|
@ApiOperation(value = "新增中兴标签绑定关系", notes = "新增中兴标签绑定关系")
|
@SysLog("新增中兴标签绑定关系")
|
@PostMapping
|
@PreAuthorize("@pms.hasPermission('quality_zx_label_bind_relation_add')" )
|
public R addLabelRelation(@RequestBody ZxLabelBindRelationDTO zxLabelBindRelationDTO){
|
return R.ok(zxLabelBindRelationService.addLabelRelation(zxLabelBindRelationDTO));
|
}
|
|
@ApiOperation(value = "删除中兴标签关系", notes = "删除中兴标签关系")
|
@SysLog("删除中兴标签关系")
|
@DeleteMapping
|
@PreAuthorize("@pms.hasPermission('quality_zx_label_bind_relation_del')" )
|
public R delLabelRelation(@RequestBody List<Long> ids){
|
return R.ok(zxLabelBindRelationService.removeByIds(ids));
|
}
|
|
@ApiOperation(value = "分页查询", notes = "分页查询")
|
@GetMapping("/page")
|
public R qryLabelRelationPage(Page page,ZxLabelBindRelation zxLabelBindRelation){
|
return R.ok(zxLabelBindRelationService.page(page, QueryWrapperUtil.gen(zxLabelBindRelation)));
|
}
|
}
|