Jelajahi Sumber

添加交易锁

Newspaper 2 tahun lalu
induk
melakukan
f093c329f4

+ 1 - 1
admin/src/main/java/com/huimv/farm/damsubsidy/service/impl/BillBuyInfoServiceImpl.java

@@ -49,7 +49,7 @@ public class BillBuyInfoServiceImpl extends ServiceImpl<BillBuyInfoMapper, BillB
 
     @Override
     @Transactional(rollbackFor = RuntimeException.class)
-    public Result addTransaction(HttpServletRequest httpServletRequest, MultipartFile image1, MultipartFile image2, MultipartFile image3, String inspectionNum, String seller, String buyer, String num, String eartags,String buyerPhone) throws IOException {
+    public synchronized Result addTransaction(HttpServletRequest httpServletRequest, MultipartFile image1, MultipartFile image2, MultipartFile image3, String inspectionNum, String seller, String buyer, String num, String eartags,String buyerPhone) throws IOException {
         BillBuyInfo billBuyInfo1 = billBuyInfoMapper.selectOne(new QueryWrapper<BillBuyInfo>().eq("create_user", TokenSign.getMemberIdByJwtToken(httpServletRequest)).eq("bill_buy_status",1));
         SysUser sysUser = sysUserMapper.selectOne(new QueryWrapper<SysUser>().eq("phone", buyerPhone));
         BillLandingInspection billLandingInspection = billLandingInspectionMapper.selectOne(new QueryWrapper<BillLandingInspection>().eq("inspection_num", inspectionNum));