|
|
@@ -72,16 +72,19 @@ public class RestrictProjectServiceImpl extends BaseMybatisDao<RestrictProjectMa
|
|
|
in.setId(use.getId());
|
|
|
restrictProjectMapper.updateByPrimaryKeySelective(in);
|
|
|
}
|
|
|
- UserBusiness ub=new UserBusiness();
|
|
|
- ub.setId(UUID.randomUUID().toString());
|
|
|
- ub.setAid(aid);
|
|
|
- ub.setUid(in.getUid());
|
|
|
- ub.setBusinessProjectId(in.getPid());
|
|
|
- ub.setCustomerStatus(in.getCustomerStatus());
|
|
|
- ub.setFollowSituation(in.getFollowSituation());
|
|
|
- ub.setCreateTime(new Date());
|
|
|
- ub.setRemarks("领取限定项目触发");
|
|
|
- userBusinessMapper.insertSelective(ub);
|
|
|
+ int i = userBusinessMapper.judgeBusiness(in.getUid(), in.getPid(), TokenManager.getAdminId());
|
|
|
+ if (i==0){
|
|
|
+ UserBusiness ub=new UserBusiness();
|
|
|
+ ub.setId(UUID.randomUUID().toString());
|
|
|
+ ub.setAid(aid);
|
|
|
+ ub.setUid(in.getUid());
|
|
|
+ ub.setBusinessProjectId(in.getPid());
|
|
|
+ ub.setCustomerStatus(in.getCustomerStatus());
|
|
|
+ ub.setFollowSituation(in.getFollowSituation());
|
|
|
+ ub.setCreateTime(new Date());
|
|
|
+ ub.setRemarks("领取限定项目触发");
|
|
|
+ userBusinessMapper.insertSelective(ub);
|
|
|
+ }
|
|
|
addUserLog(in,0);
|
|
|
User user = userMapper.queryById(in.getUid());
|
|
|
BusinessProject businessProject = businessProjectMapper.queryById(in.getPid());
|