|  | @@ -78,6 +78,7 @@ public class PmsProductServiceImpl implements PmsProductService {
 | 
											
												
													
														|  |      private PmsProductVertifyRecordDao productVertifyRecordDao;
 |  |      private PmsProductVertifyRecordDao productVertifyRecordDao;
 | 
											
												
													
														|  |      @Autowired
 |  |      @Autowired
 | 
											
												
													
														|  |      private CmsPrefrenceAreaService prefrenceAreaService;
 |  |      private CmsPrefrenceAreaService prefrenceAreaService;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |      @Override
 |  |      @Override
 | 
											
												
													
														|  |      public int create(PmsProductParam productParam) {
 |  |      public int create(PmsProductParam productParam) {
 | 
											
												
													
														|  |          int count;
 |  |          int count;
 | 
											
										
											
												
													
														|  | @@ -160,16 +161,18 @@ public class PmsProductServiceImpl implements PmsProductService {
 | 
											
												
													
														|  |          updateInfo.setPrefrenceAreaProductRelationList(relationInputs);
 |  |          updateInfo.setPrefrenceAreaProductRelationList(relationInputs);
 | 
											
												
													
														|  |          return updateInfo;
 |  |          return updateInfo;
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  | -    public void check(PmsProductParam productParam){
 |  | 
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    public void check(PmsProductParam productParam) {
 | 
											
												
													
														|  |          long compId = CurrUserUtil.getCompId();
 |  |          long compId = CurrUserUtil.getCompId();
 | 
											
												
													
														|  | -        if(StringUtils.isEmpty(compId)){
 |  | 
 | 
											
												
													
														|  | 
 |  | +        if (StringUtils.isEmpty(compId)) {
 | 
											
												
													
														|  |              throw new RuntimeException("没有绑定供应商无法修改!");
 |  |              throw new RuntimeException("没有绑定供应商无法修改!");
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | -        Long  productcompId = productParam.getCompId();
 |  | 
 | 
											
												
													
														|  | -        if(!productcompId.equals(compId)){
 |  | 
 | 
											
												
													
														|  | 
 |  | +        Long productcompId = productParam.getCompId();
 | 
											
												
													
														|  | 
 |  | +        if (!productcompId.equals(compId)) {
 | 
											
												
													
														|  |              throw new RuntimeException("你不能修改别的供应商数据!");
 |  |              throw new RuntimeException("你不能修改别的供应商数据!");
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |      @Override
 |  |      @Override
 | 
											
												
													
														|  |      @Transactional
 |  |      @Transactional
 | 
											
												
													
														|  |      public int update(Long id, PmsProductParam productParam) {
 |  |      public int update(Long id, PmsProductParam productParam) {
 | 
											
										
											
												
													
														|  | @@ -263,8 +266,12 @@ public class PmsProductServiceImpl implements PmsProductService {
 | 
											
												
													
														|  |          PmsProductExample.Criteria criteria = productExample.createCriteria();
 |  |          PmsProductExample.Criteria criteria = productExample.createCriteria();
 | 
											
												
													
														|  |          productExample.setOrderByClause("create_time desc");
 |  |          productExample.setOrderByClause("create_time desc");
 | 
											
												
													
														|  |          criteria.andDeleteStatusEqualTo(0);
 |  |          criteria.andDeleteStatusEqualTo(0);
 | 
											
												
													
														|  | -        if(!StringUtils.isEmpty(compId)){
 |  | 
 | 
											
												
													
														|  | 
 |  | +        if (!StringUtils.isEmpty(compId)) {
 | 
											
												
													
														|  |              criteria.andCompIdEqualTo(compId);
 |  |              criteria.andCompIdEqualTo(compId);
 | 
											
												
													
														|  | 
 |  | +        } else {
 | 
											
												
													
														|  | 
 |  | +            if (!StringUtils.isEmpty(productQueryParam.getCompId())) {
 | 
											
												
													
														|  | 
 |  | +                criteria.andCompIdEqualTo(productQueryParam.getCompId());
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |          if (productQueryParam.getPublishStatus() != null) {
 |  |          if (productQueryParam.getPublishStatus() != null) {
 | 
											
												
													
														|  |              criteria.andPublishStatusEqualTo(productQueryParam.getPublishStatus());
 |  |              criteria.andPublishStatusEqualTo(productQueryParam.getPublishStatus());
 | 
											
										
											
												
													
														|  | @@ -341,9 +348,9 @@ public class PmsProductServiceImpl implements PmsProductService {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      @Override
 |  |      @Override
 | 
											
												
													
														|  |      public int updateDeleteStatus(List<Long> ids, Integer deleteStatus) {
 |  |      public int updateDeleteStatus(List<Long> ids, Integer deleteStatus) {
 | 
											
												
													
														|  | -        if(deleteStatus.intValue() == 1){
 |  | 
 | 
											
												
													
														|  | -            long i =  pmsProductDao.check(ids);
 |  | 
 | 
											
												
													
														|  | -            if(i>0){
 |  | 
 | 
											
												
													
														|  | 
 |  | +        if (deleteStatus.intValue() == 1) {
 | 
											
												
													
														|  | 
 |  | +            long i = pmsProductDao.check(ids);
 | 
											
												
													
														|  | 
 |  | +            if (i > 0) {
 | 
											
												
													
														|  |                  throw new GlobalException("你删除的商品产生预购订单,无法删除!");
 |  |                  throw new GlobalException("你删除的商品产生预购订单,无法删除!");
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
										
											
												
													
														|  | @@ -381,7 +388,6 @@ public class PmsProductServiceImpl implements PmsProductService {
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |      /**
 |  |      /**
 | 
											
												
													
														|  |       * 建立和插入关系表操作
 |  |       * 建立和插入关系表操作
 | 
											
												
													
														|  |       *
 |  |       *
 | 
											
										
											
												
													
														|  | @@ -405,6 +411,7 @@ public class PmsProductServiceImpl implements PmsProductService {
 | 
											
												
													
														|  |              throw new RuntimeException(e.getMessage());
 |  |              throw new RuntimeException(e.getMessage());
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |      @Autowired
 |  |      @Autowired
 | 
											
												
													
														|  |      private PmsProductExcelDao productExcelDao;
 |  |      private PmsProductExcelDao productExcelDao;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -413,12 +420,14 @@ public class PmsProductServiceImpl implements PmsProductService {
 | 
											
												
													
														|  |          PageHelper.startPage(bigDataListParam.getPageNum(), bigDataListParam.getPageSize());
 |  |          PageHelper.startPage(bigDataListParam.getPageNum(), bigDataListParam.getPageSize());
 | 
											
												
													
														|  |          return productExcelDao.bigDataList(bigDataListParam);
 |  |          return productExcelDao.bigDataList(bigDataListParam);
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |      @Override
 |  |      @Override
 | 
											
												
													
														|  | -    public BigDataListInfoVo bigDatainfo(Long id){
 |  | 
 | 
											
												
													
														|  | 
 |  | +    public BigDataListInfoVo bigDatainfo(Long id) {
 | 
											
												
													
														|  |          return productExcelDao.bigDatainfo(id);
 |  |          return productExcelDao.bigDatainfo(id);
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |      @Override
 |  |      @Override
 | 
											
												
													
														|  | -    public List<SelectVo> bigDataType(){
 |  | 
 | 
											
												
													
														|  | 
 |  | +    public List<SelectVo> bigDataType() {
 | 
											
												
													
														|  |          return productExcelDao.bigDataType();
 |  |          return productExcelDao.bigDataType();
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -429,16 +438,16 @@ public class PmsProductServiceImpl implements PmsProductService {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      @Override
 |  |      @Override
 | 
											
												
													
														|  |      public int verify(Long id) {
 |  |      public int verify(Long id) {
 | 
											
												
													
														|  | -        int count = 0 ;
 |  | 
 | 
											
												
													
														|  | 
 |  | +        int count = 0;
 | 
											
												
													
														|  |          PmsProduct pmsProduct = productMapper.selectByPrimaryKey(id);
 |  |          PmsProduct pmsProduct = productMapper.selectByPrimaryKey(id);
 | 
											
												
													
														|  | -        if(!StringUtils.isEmpty(pmsProduct)){
 |  | 
 | 
											
												
													
														|  | 
 |  | +        if (!StringUtils.isEmpty(pmsProduct)) {
 | 
											
												
													
														|  |              PmsProduct product = new PmsProduct();
 |  |              PmsProduct product = new PmsProduct();
 | 
											
												
													
														|  |              product.setVerifyStatus(1);
 |  |              product.setVerifyStatus(1);
 | 
											
												
													
														|  |              PmsProductExample example = new PmsProductExample();
 |  |              PmsProductExample example = new PmsProductExample();
 | 
											
												
													
														|  |              example.createCriteria().andIdEqualTo(id);
 |  |              example.createCriteria().andIdEqualTo(id);
 | 
											
												
													
														|  |              List<PmsProductVertifyRecord> list = new ArrayList<>();
 |  |              List<PmsProductVertifyRecord> list = new ArrayList<>();
 | 
											
												
													
														|  |              return count = productMapper.updateByExampleSelective(product, example);
 |  |              return count = productMapper.updateByExampleSelective(product, example);
 | 
											
												
													
														|  | -        }else{
 |  | 
 | 
											
												
													
														|  | 
 |  | +        } else {
 | 
											
												
													
														|  |              throw new GlobalException("商品不存在无法审核!");
 |  |              throw new GlobalException("商品不存在无法审核!");
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |      }
 |  |      }
 |