Commit c3ce7061 authored by hezhen's avatar hezhen

Merge branch 'master-customer-management' into dev

parents eb334b67 fd50cc09
...@@ -247,9 +247,15 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper, AppUserRe ...@@ -247,9 +247,15 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper, AppUserRe
*/ */
@Cache(key = "user:relation{1}") @Cache(key = "user:relation{1}")
public AppUserRelation getRelationByUserId(Integer userId) { public AppUserRelation getRelationByUserId(Integer userId) {
AppUserRelation relation = new AppUserRelation(); /* AppUserRelation relation = new AppUserRelation();
relation.setUserId(userId); relation.setUserId(userId);*/
return selectOne(relation); Example example=new Example(AppUserRelation.class);
example.createCriteria().andEqualTo("userId",userId);
List<AppUserRelation> list=selectByExample(example);
if (list.size()>0){
return list.get(0);
}
return null;
} }
//获取有效的上线 //获取有效的上线
......
...@@ -44,6 +44,7 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -44,6 +44,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.context.request.ServletRequestAttributes;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.*; import java.util.*;
...@@ -323,6 +324,7 @@ public class AppPermissionService { ...@@ -323,6 +324,7 @@ public class AppPermissionService {
parentId=appUserDetailBiz.getUserByCode(code); parentId=appUserDetailBiz.getUserByCode(code);
} }
if(parentId!=null&&parentId>0){ if(parentId!=null&&parentId>0){
rsUserDetail.setSource(1);
relationBiz.bindRelation(userid, parentId, 1); relationBiz.bindRelation(userid, parentId, 1);
if(StringUtils.isNotBlank(activityCode)){ if(StringUtils.isNotBlank(activityCode)){
rsUserDetail.setInviterAccount(parentId); rsUserDetail.setInviterAccount(parentId);
...@@ -390,6 +392,18 @@ public class AppPermissionService { ...@@ -390,6 +392,18 @@ public class AppPermissionService {
} }
} }
/*public void test(){
Example example=new Example(AppUserLogin.class);
example.createCriteria().andEqualTo("imUserid",0);
List<AppUserLogin> list=appUserLoginBiz.selectByExample(example);
for (AppUserLogin userLogin:list){
}
}*/
private void sendQueue(String username, String password, String headimgurl, String nickname, String mobilecode, String openId, String unionid, Integer type, String code, String activityCode, Integer userid,Integer sign) { private void sendQueue(String username, String password, String headimgurl, String nickname, String mobilecode, String openId, String unionid, Integer type, String code, String activityCode, Integer userid,Integer sign) {
try { try {
RegisterQueueDTO registerQueueDTO = new RegisterQueueDTO(); RegisterQueueDTO registerQueueDTO = new RegisterQueueDTO();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment