package platform.modules.api.service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import platform.modules.company.dao.StockLandDao; import platform.modules.company.entity.StockLand; import java.util.List; /** * @author wangjiang * @since 2020/01/17 2:19 PM * 做一些sql 插入的测试 */ @Service public class StockSqlService { @Autowired private StockLandDao stockLandDao; /** * 添加自动化审批简易流程 * @param applyNoList ` */ @Transactional(rollbackFor = Exception.class) public void insertAutoEasyProcessDataToStockLand(List applyNoList) { stockLandDao.updateEasyProcessData(applyNoList); for (String applyNo: applyNoList) { StockLand qo = new StockLand(); qo.setApply_no(applyNo); StockLand stockLand = stockLandDao.selectOne(qo); stockLandDao.insertAutoEasyProcessDataToStockLand(stockLand.getId().toString()); } } }