|
|
@@ -7,8 +7,10 @@ import com.goafanti.business.bo.UserRestrictProjectBo;
|
|
|
import com.goafanti.business.service.RestrictProjectService;
|
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.dao.*;
|
|
|
+import com.goafanti.common.enums.NoticeStatus;
|
|
|
import com.goafanti.common.error.BusinessException;
|
|
|
import com.goafanti.common.model.*;
|
|
|
+import com.goafanti.common.utils.AsyncUtils;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
@@ -34,6 +36,10 @@ public class RestrictProjectServiceImpl extends BaseMybatisDao<RestrictProjectMa
|
|
|
private UserMapper userMapper;
|
|
|
@Resource
|
|
|
private AdminMapper adminMapper;
|
|
|
+ @Resource
|
|
|
+ private AsyncUtils asyncUtils;
|
|
|
+ @Resource
|
|
|
+ private BusinessProjectMapper businessProjectMapper;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -71,6 +77,10 @@ public class RestrictProjectServiceImpl extends BaseMybatisDao<RestrictProjectMa
|
|
|
ub.setRemarks("领取限定项目触发");
|
|
|
userBusinessMapper.insertSelective(ub);
|
|
|
addUserLog(in,0);
|
|
|
+ User user = userMapper.selectByPrimaryKey(in.getUid());
|
|
|
+ BusinessProject businessProject = businessProjectMapper.selectByPrimaryKey(in.getPid());
|
|
|
+ String str =String.format("客户:%s,已被营销员%s领取了【限定项目:%s】",user.getNickname(),TokenManager.getAdminToken().getName(),businessProject.getBname());
|
|
|
+ asyncUtils.addNoticAndEmail(new Notice(user.getAid(), NoticeStatus.RECEIVE_RESTRICT_PROJECT.getCode(),str));
|
|
|
return 1;
|
|
|
}
|
|
|
|