| | |
| | | |
| | | import com.nanometer.smartlab.dao.SysWarehouseStatusDao; |
| | | import com.nanometer.smartlab.entity.SysWarehouseStatus; |
| | | import com.nanometer.smartlab.exception.BusinessException; |
| | | import com.nanometer.smartlab.exception.ExceptionEnumCode; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | |
| | | @Override |
| | | public void addOne(SysWarehouseStatus one) { |
| | | if (one.getTemperature() == null || one.getHumidity() == null || one.getSelectDate() == null) { |
| | | throw new BusinessException(ExceptionEnumCode.PARAM_NULL, "参数不能为空"); |
| | | } |
| | | if (StringUtils.isBlank(one.getName()) || StringUtils.isBlank(one.getType())) { |
| | | throw new BusinessException(ExceptionEnumCode.PARAM_NULL, "字符不能为空"); |
| | | } |
| | | sysWarehouseStatusDao.insertOne(one); |
| | | } |
| | | } |