清除公开征求意见

This commit is contained in:
yuezhihang
2022-03-23 15:31:56 +08:00
parent cee8fb564f
commit aefc5c72a5
@@ -3,12 +3,16 @@ package com.adc.da.slrs.sarStandIdea.controller;
import com.adc.da.http.ResponseMessage;
import com.adc.da.http.Result;
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
import com.adc.da.slrs.sarStandIdea.entity.SeByoDto;
import com.adc.da.slrs.sarStandIdea.service.ISarPublicIdeaAllService;
import com.adc.da.slrs.sarStandIdea.service.ISarPublicIdeaService;
import com.adc.da.slrs.sarStandIdea.service.Impl.SarPublicIdeaServiceImpl;
import com.adc.da.sys.util.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdea;
@@ -36,6 +40,9 @@ public class SarPublicIdeaController extends BaseController<SarPublicIdea> {
@Autowired
private ISarPublicIdeaService sarPublicIdeaService;
@Autowired
private ISarPublicIdeaAllService sarPublicIdeaAllService;
@ApiOperation(value = "分页查询")
@GetMapping("/SelectAllPage")
public ResponseMessage selectAllPage(@RequestParam(defaultValue="1")Integer page,@RequestParam(defaultValue="10")Integer size,String categorg, String cname,
@@ -87,4 +94,18 @@ public class SarPublicIdeaController extends BaseController<SarPublicIdea> {
}
@ApiOperation(value = "动态查询")
@GetMapping("/deletePublicIdea")
public ResponseMessage delete(@RequestParam("id") String id){
QueryWrapper<SarPublicIdea> wrapper=new QueryWrapper<>();
wrapper.eq("uniques",id);
SarPublicIdea sarPublicIdea=sarPublicIdeaService.getOne(wrapper);
sarPublicIdeaService.remove(wrapper);
QueryWrapper<SarPublicIdeaAll> wrapper1=new QueryWrapper<>();
wrapper1.eq("idea_id",sarPublicIdea.getId());
sarPublicIdeaAllService.remove(wrapper1);
return Result.success();
}
}