Prechádzať zdrojové kódy

添加事务,确保数据一致性

qiangxuan 5 dní pred
rodič
commit
a4a49cb6c3

+ 2 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetOriginalProductRecord/controller/BilletOriginalProductRecordController.java

@@ -58,6 +58,7 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.dao.DuplicateKeyException;
 import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
 
@@ -659,6 +660,7 @@ public class BilletOriginalProductRecordController extends JeecgController<Bille
 	}
 
 	@AutoLog(value = "确认凉钢坯打印单")
+	@Transactional(rollbackFor = Exception.class)
 	@ApiOperation(value="确认凉钢坯打印单", notes="确认凉钢坯打印单")
 	@RequestMapping(value = "/coldConfirmRecord", method = {RequestMethod.PUT})
 	public Result<String> coldConfirmRecord(@RequestBody BilletColdOriginalRecordVo billetOriginalProductRecordVo) {