Commit f0f65f87 authored by jay's avatar jay

登录接口新增字段

parent a30451a6
......@@ -226,6 +226,7 @@ public class UserEntity extends DomainObject {
private String wxNumber;
private String wxCodeImgUrl;
private Integer onlineStatus;
private Integer isOpen;
public String getManagerName() {
return managerName;
......@@ -907,6 +908,14 @@ public class UserEntity extends DomainObject {
this.onlineStatus = onlineStatus;
}
public Integer getIsOpen() {
return isOpen;
}
public void setIsOpen(Integer isOpen) {
this.isOpen = isOpen;
}
/**
* 实体的toString方法
*
......
......@@ -12,6 +12,7 @@ import com.house365.rest.parameter.House365RestResponse;
import com.house365.ws.beans.request.UserListRequest;
import com.house365.ws.beans.response.DepartmentResponse;
import com.house365.ws.beans.response.UserListResponse;
import com.house365.ws.dao.mapper.UserMapper;
import com.house365.ws.interfaces.server.IDepartment;
import com.house365.ws.interfaces.server.IUser;
import com.house365.ws.service.interfaces.IAttachmentService;
......@@ -20,6 +21,7 @@ import com.house365.ws.service.interfaces.IUserService;
import com.house365.ws.system.ReturnAppResult;
import com.house365.ws.util.PathUtil;
import net.sf.json.JSONObject;
import org.apache.commons.collections4.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -58,6 +60,8 @@ public class AppHgsLoginImpl implements IAppHgsLogin {
@Autowired
private IAttachmentService attachmentService;
@Autowired
private UserMapper userMapper;
@Override
public Object rollback() {
......@@ -109,7 +113,7 @@ public class AppHgsLoginImpl implements IAppHgsLogin {
accountEntity = userListResponse.getObjectList().get(0);
String phone = accountEntity.getMobile();
final String cookieKey = PREFIX + "weChat:userInfo:isValid:" + phone;
LOGGER.error("------------------app登陆key-------:"+cookieKey);
LOGGER.error("------------------app登陆key-------:" + cookieKey);
if (!hasKey(cookieKey)) {
redisTemplate.execute(new RedisCallback<Object>() {
@Override
......@@ -123,6 +127,16 @@ public class AppHgsLoginImpl implements IAppHgsLogin {
}
});
}
//查询在线客服list
Map<String, Object> queryMap = new HashMap<>(5);
queryMap.put("deptUrlPath", "/1/2/69/70/71/72/77");
queryMap.put("telephone", phone);
List<UserEntity> userList = userMapper.queryByConditions(queryMap);
if (CollectionUtils.isNotEmpty(userList)) {
accountEntity.setIsOpen(1);
} else {
accountEntity.setIsOpen(0);
}
//带看次数
int seeCount = customerStatusLogService.getSeeCount(accountEntity.getId());
//初始带看次数
......
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