anderx лет назад: 5
Родитель
Сommit
437cc1616a

+ 3 - 1
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -177,9 +177,12 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			//设置催款触发
 			TOrderNew b=tOrderNewMapper.selectByPrimaryKey(t.getOrderNo());
 			if(b.getApproval()==0)orderNewService.pushOrderDun(t.getOrderNo());
+			//未锁定客户就锁定客户
 			if (userMapper.checkLock(tn.getBuyerId())<1) {
+				userLockReleaseMapper.updateByAidAndUid(tn.getSalesmanId(),tn.getBuyerId());
 				userMapper.updateShareType(tn.getBuyerId(),tn.getSalesmanId());
 			}
+			//未锁定业务就锁定业务
 			if (userLockReleaseMapper.checkLock(tn.getSalesmanId(),tn.getBuyerId(),t.getCommodityId())<1) {
 				UserLockRelease ulr=new UserLockRelease();
 				ulr.setId(UUID.randomUUID().toString());
@@ -189,7 +192,6 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 				ulr.setAid(tn.getSalesmanId());
 				ulr.setStatus(0);
 				ulr.setLockTime(date);
-				userLockReleaseMapper.updateByAidAndUid(tn.getSalesmanId(),tn.getBuyerId());
 				userLockReleaseMapper.insertSelective(ulr);
 			}
 				UserBusiness ub=new UserBusiness();