Browse Source

签单修改触发修改

anderx 5 years ago
parent
commit
7b7d5e121f

+ 2 - 0
src/main/java/com/goafanti/common/dao/UserLockReleaseMapper.java

@@ -135,4 +135,6 @@ public interface UserLockReleaseMapper {
 
 	void updateReleaseUser(String orderNo);
 
+	void updateByAidAndUid(@Param("aid")String aid, @Param("uid")String uid);
+
 }

+ 6 - 0
src/main/java/com/goafanti/common/mapper/UserLockReleaseMapper.xml

@@ -513,4 +513,10 @@
 	where a.order_no = #{orderNo} and a.buyer_id =b.id  
 	and a.buyer_id =c.uid and a.salesman_id =c.aid and c.follow_situation =5
   </update>
+  
+  <update id="updateByAidAndUid">
+  	update user_lock_release 
+	set status =2,release_time =now()
+	where aid= #{aid} and uid= #{uid} and `type` =0
+  </update>
 </mapper>

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

@@ -201,6 +201,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 				ub.setUpdateTime(date);
 				ub.setRemarks("派单自动锁定客户");
 				ub.setBusinessProjectId(t.getCommodityId());
+				userLockReleaseMapper.updateByAidAndUid(tn.getSalesmanId(),tn.getBuyerId());
 				userBusinessMapper.insertSelective(ub);
 		}else if (specially==0) {
 			addOrderLog(t.getOrderNo(), OrderLogProcess.XMPD.getCode(),remarks);