Browse Source

领取客户新增锁定

anderx 1 year ago
parent
commit
2d55107a66

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

@@ -518,7 +518,7 @@
   </update>
   <select id="selectByUidGetCount" resultType="java.lang.Integer">
   select count(*) from user_lock_release
-  	where `type` =1 and status=0 and aid = #{aid} and uid= #{uid}
+  	where `type` =0 and status=0 and aid = #{aid} and uid= #{uid}
   </select>
   <update id="updateReleaseUser">
   update t_order_new a ,user b ,user_business  c

+ 11 - 2
src/main/java/com/goafanti/customer/service/impl/UserClueServiceImpl.java

@@ -11,7 +11,6 @@ import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.customer.bo.*;
-import com.goafanti.customer.service.CustomerService;
 import com.goafanti.customer.service.UserClueService;
 import org.springframework.stereotype.Service;
 
@@ -32,7 +31,7 @@ public class UserClueServiceImpl extends BaseMybatisDao<UserMapper> implements U
     @Resource
     private AdminMapper adminMapper;
     @Resource
-    private CustomerService customerService;
+    private UserLockReleaseMapper userLockReleaseMapper;
     @Resource
     private UserNamesMapper userNamesMapper;
     @Resource
@@ -193,6 +192,16 @@ public class UserClueServiceImpl extends BaseMybatisDao<UserMapper> implements U
             user.setShareType(0);
             user.setTransferTime(date);
             type=26;
+            if (userLockReleaseMapper.selectByUidGetCount(aid,user.getId())==0){
+                UserLockRelease ulr=new UserLockRelease();
+                ulr.setId(UUID.randomUUID().toString());
+                ulr.setAid(aid);
+                ulr.setUid(user.getId());
+                ulr.setLockTime(date);
+                ulr.setStatus(0);
+                ulr.setType(0);
+                userLockReleaseMapper.insert(ulr);
+            }
         }
         userMapper.update(user);
         addUserTransferLog(user,type,aid);