| | |
| | | supplier.create(SecurityUtils.getUserId()); |
| | | supplier.setShowed(true); |
| | | supplier.setStatus(SUPPLIER_STATUS_AUDIT); |
| | | supplier.setIsEnabled(true); |
| | | supplierMapper.insert(supplier); |
| | | }else{//重新修改 |
| | | supplier = supplierMapper.selectById(dto.getId()); |
| | |
| | | supplier.update(SecurityUtils.getUserId()); |
| | | supplierMapper.updateById(supplier); |
| | | } |
| | | |
| | | public void isEnable(Long id) { |
| | | Supplier supplier = supplierMapper.selectById(id); |
| | | if (supplier == null) { |
| | | throw new ValidationException("供应商信息不存在"); |
| | | } |
| | | if (supplier.getIsEnabled()) { |
| | | supplier.setIsEnabled(false); |
| | | } else { |
| | | supplier.setIsEnabled(true); |
| | | } |
| | | supplier.update(SecurityUtils.getUserId()); |
| | | supplierMapper.updateById(supplier); |
| | | } |
| | | } |