| | |
| | | public Response getAllComponent(@RequestParam int pageCurr, @RequestParam int pageSize){ |
| | | return service.getAllComponent(pageCurr,pageSize); |
| | | } |
| | | @ApiOperation(tags = "产品管理",value = "查询所有的散装件信息不分页") |
| | | @ApiOperation(tags = "产品管理",value = "查询所有的散装件信息不分页(不包含被关联的散装件)") |
| | | @GetMapping("getComponentWithoutSub") |
| | | public Response getComponentWithoutSub(@RequestParam String parentModel, @RequestParam String subName){ |
| | | return service.getComponentWithoutSub(parentModel,subName); |
| | | } |
| | | @ApiOperation(value = "删除散装件(将散装件标识为不可用)") |
| | | @GetMapping("deleteComponent") |
| | | public Response deleteComponent(@RequestParam int id){ |
| | | return service.deleteComponent(id); |
| | | } |
| | | } |
| | |
| | | private Long upUserId; |
| | | private Date createDate; |
| | | private Date updateDate; |
| | | @ApiModelProperty(value = "是否可以表示",notes ="1可用,0不可用") |
| | | private int status; |
| | | |
| | | @ApiModelProperty("工程图纸url") |
| | | private String dwgUrl; |
| | |
| | | this.dwgUrl = dwgUrl; |
| | | } |
| | | |
| | | public int getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(int status) { |
| | | this.status = status; |
| | | } |
| | | } |
| | |
| | | package com.whyc.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Response; |
| | |
| | | List<Component> list=mapper.getComponentWithoutSub(parentModel,subName); |
| | | return new Response().setII(1,list.size()>0?true:false,list,"返回子件没有添加过联系的散装件"); |
| | | } |
| | | //删除散装件(将散装件标识为不可用) |
| | | public Response deleteComponent(int id) { |
| | | UpdateWrapper wrapper=new UpdateWrapper(); |
| | | wrapper.set("status",0); |
| | | wrapper.eq("id",id); |
| | | int bl=mapper.update(null,wrapper); |
| | | return new Response().setII(1,bl>0?true:false,bl,"将散装件标识为不可用"); |
| | | } |
| | | } |