Commit 53d2760cb21f68b21df757748c5af41ad0676bdf

Authored by 房远帅
1 parent c505683b

采购:同行报价信息-删除

@@ -23,12 +23,7 @@ import javax.validation.Valid; @@ -23,12 +23,7 @@ import javax.validation.Valid;
23 import javax.validation.constraints.NotBlank; 23 import javax.validation.constraints.NotBlank;
24 import javax.validation.constraints.NotNull; 24 import javax.validation.constraints.NotNull;
25 import org.springframework.validation.annotation.Validated; 25 import org.springframework.validation.annotation.Validated;
26 -import org.springframework.web.bind.annotation.GetMapping;  
27 -import org.springframework.web.bind.annotation.PostMapping;  
28 -import org.springframework.web.bind.annotation.PutMapping;  
29 -import org.springframework.web.bind.annotation.RequestBody;  
30 -import org.springframework.web.bind.annotation.RequestMapping;  
31 -import org.springframework.web.bind.annotation.RestController; 26 +import org.springframework.web.bind.annotation.*;
32 import org.springframework.web.multipart.MultipartFile; 27 import org.springframework.web.multipart.MultipartFile;
33 import java.io.IOException; 28 import java.io.IOException;
34 29
@@ -108,6 +103,20 @@ public class SalesmanQuotationPeerController extends DefaultBaseController { @@ -108,6 +103,20 @@ public class SalesmanQuotationPeerController extends DefaultBaseController {
108 } 103 }
109 104
110 /** 105 /**
  106 + * 删除
  107 + *
  108 + * @param id 主键ID
  109 + */
  110 + @ApiOperation("详情")
  111 + @HasPermission({"procure-manage:sales-price-peer:delete"})
  112 + @DeleteMapping("")
  113 + public InvokeResult<Void> delete(@NotBlank(message = "id不能为空!") String id) {
  114 + salesmanQuotationPeerService.delete(id);
  115 +
  116 + return InvokeResultBuilder.success();
  117 + }
  118 +
  119 + /**
111 * 下载导入模板 120 * 下载导入模板
112 */ 121 */
113 @ApiOperation("下载导入模板") 122 @ApiOperation("下载导入模板")
@@ -156,6 +156,21 @@ public class SalesmanQuotationPeerServiceImpl @@ -156,6 +156,21 @@ public class SalesmanQuotationPeerServiceImpl
156 } 156 }
157 157
158 /** 158 /**
  159 + * 删除
  160 + *
  161 + * @param id 主键
  162 + */
  163 + @OpLog(type = OtherOpLogType.class, name = "删除同行报价信息,ID:{}", params = {"#id"})
  164 + @Transactional(rollbackFor = Exception.class)
  165 + @Override
  166 + public void delete(String id) {
  167 + getBaseMapper().deleteById(id);
  168 +
  169 + OpLogUtil.setVariable("id", id);
  170 + OpLogUtil.setExtra(id);
  171 + }
  172 +
  173 + /**
159 * 清理缓存 174 * 清理缓存
160 * 175 *
161 * @param key 缓存键 176 * @param key 缓存键
@@ -62,4 +62,11 @@ public interface SalesmanQuotationPeerService extends BaseMpService<SalesmanQuot @@ -62,4 +62,11 @@ public interface SalesmanQuotationPeerService extends BaseMpService<SalesmanQuot
62 * @param vo 修改参数 62 * @param vo 修改参数
63 */ 63 */
64 void update(UpdateSalesmanQuotationPeerVo vo); 64 void update(UpdateSalesmanQuotationPeerVo vo);
  65 +
  66 + /**
  67 + * 删除
  68 + *
  69 + * @param id 主键
  70 + */
  71 + void delete(String id);
65 } 72 }