Procházet zdrojové kódy

释放改成强制释放所有客户锁,防止走流程时期客户丢失被领取。出现多个锁

anderx před 1 rokem
rodič
revize
bf2589a91f

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

@@ -4,10 +4,10 @@ import com.goafanti.common.bo.userDaysBo;
 import com.goafanti.common.model.UserLockRelease;
 import com.goafanti.common.model.UserLockReleaseExample;
 import com.goafanti.customer.bo.LockingReleaseBo;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.Date;
 import java.util.List;
-import org.apache.ibatis.annotations.Param;
 
 public interface UserLockReleaseMapper {
 
@@ -127,7 +127,7 @@ public interface UserLockReleaseMapper {
 
 	void updateReleaseUser(String orderNo);
 
-	void updateByAidAndUid(@Param("aid")String aid, @Param("uid")String uid);
+	void updateByAidAndUid( @Param("uid")String uid);
 
 	List<userDaysBo> selectChannelUserDays(@Param("days")Integer days, @Param("aid")String aid);
 

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

@@ -524,8 +524,8 @@
 
   <update id="updateByAidAndUid">
   	update user_lock_release
-	set status =2,release_time =now()
-	where aid= #{aid} and uid= #{uid} and `type` =0
+	set status =2,release_time =now(),type=0
+	where   uid= #{uid} and `type` =0
   </update>
   <select id="selectByids" resultType="java.lang.String">
   select uid from user_lock_release

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

@@ -276,7 +276,8 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	 */
 	private void pushUser(TOrderTask t, TOrderNew tn, Date date) {
 		if (userMapper.checkLock(tn.getBuyerId())<1) {
-			userLockReleaseMapper.updateByAidAndUid(tn.getSalesmanId(),tn.getBuyerId());
+			//释放改成强制释放所有客户锁
+			userLockReleaseMapper.updateByAidAndUid(tn.getBuyerId());
 			userMapper.updateShareType(tn.getBuyerId(),tn.getSalesmanId());
 		}
 		//未锁定业务就锁定业务