kongzy
2024-07-01 47a751cb301d05276ae5d75145d57b2d090fe4e1
src/main/java/com/nanometer/smartlab/service/OpeApplyOrderServiceImpl.java
@@ -33,7 +33,7 @@
    OpeApplyOrderDao opeApplyOrderDao;
    @Transactional(propagation = Propagation.REQUIRED)
    public List<OpeApplyOrder> getOpeApplyOrderList(String opeOrderId, String opeApplyId) {
    public List<OpeApplyOrder> getOpeApplyOrderList(Long opeOrderId, Long opeApplyId) {
        try {
            Map<String, Object> params = new HashMap<String, Object>();
            params.put("opeOrderId", opeOrderId);
@@ -46,7 +46,7 @@
    }
    @Transactional(propagation = Propagation.REQUIRED)
    public int getOpeApplyOrderTotalCount(String opeOrderId, String opeApplyId) {
    public int getOpeApplyOrderTotalCount(Long opeOrderId, Long opeApplyId) {
        try {
            Map<String, Object> params = new HashMap<String, Object>();
            params.put("opeOrderId", opeOrderId);
@@ -61,7 +61,6 @@
    @Transactional(propagation = Propagation.REQUIRED)
    public OpeApplyOrder insertOpeApplyOrder(OpeApplyOrder opeApplyOrder) {
        try {
            opeApplyOrder.setId(IDUtils.uuid());
            this.opeApplyOrderDao.insertOpeApplyOrder(opeApplyOrder);
            return opeApplyOrder;
        } catch (DuplicateKeyException ex) {
@@ -75,4 +74,21 @@
            throw new BusinessException(ExceptionEnumCode.DB_ERR, MessageUtil.getMessageByCode(ExceptionEnumCode.DB_ERR.getCode()), ex);
        }
    }
    public int batchInsertOpeApplyOrder(List<OpeApplyOrder> opeApplyOrderList) {
        try {
            return this.opeApplyOrderDao.batchInsertOpeApplyOrder(opeApplyOrderList);
        } catch (DuplicateKeyException ex) {
            logger.warn(ex.getMessage(), ex);
            throw new AlarmException(AlarmCode.DATA_DUPLICATE, MessageUtil.getMessage(AlarmCode.DATA_DUPLICATE.getCode()));
        } catch (DataIntegrityViolationException ex) {
            logger.warn(ex.getMessage(), ex);
            throw new AlarmException(AlarmCode.DATA_CONFICT, MessageUtil.getMessage(AlarmCode.DATA_CONFICT.getCode()));
        } catch (DataAccessException ex) {
            logger.error(ex.getMessage(), ex);
            throw new BusinessException(ExceptionEnumCode.DB_ERR, MessageUtil.getMessageByCode(ExceptionEnumCode.DB_ERR.getCode()), ex);
        }
    }
}