| | |
| | | private ProductLockLogService productLockLogService; |
| | | |
| | | //查询出所有的产品信息(分页加模糊查询<产品的编码,型号,名字,定制表编号> |
| | | public Response getAllProduct(String subCode,String parentCode, String parentName, String parentModel, String customCode, int pageCurr, int pageSize) { |
| | | public Response getAllProduct(String subCode,String parentCode, String parentName, String parentModel, String customCode,Integer enabled, int pageCurr, int pageSize) { |
| | | PageHelper.startPage(pageCurr,pageSize); |
| | | /*QueryWrapper wrapper=new QueryWrapper(); |
| | | if(parentCode!=null){ |
| | |
| | | } |
| | | wrapper.orderByAsc("id"); |
| | | List list=mapper.selectList(wrapper);*/ |
| | | List<Product> list=mapper.getAllProduct(subCode,parentCode,parentName,parentModel,customCode); |
| | | list.stream().forEach(product -> { |
| | | List<Product> list=mapper.getAllProduct(subCode,parentCode,parentName,parentModel,customCode,enabled); |
| | | /*list.stream().forEach(product -> { |
| | | //1.查询是否存在该记录 |
| | | QueryWrapper qwrapper=new QueryWrapper(); |
| | | qwrapper.eq("id",product.getId()); |
| | | qwrapper.last("limit 1"); |
| | | ProductHistory pHis=hisMapper.selectOne(qwrapper); |
| | | product.setEnabled(pHis.getEnabled()); |
| | | }); |
| | | });*/ |
| | | PageInfo pageInfo=new PageInfo(list); |
| | | return new Response().setII(1,list.size()>0,pageInfo,"返回产品信息"); |
| | | } |