Commit a2bfe95b authored by 周健威's avatar 周健威

Merge remote-tracking branch 'origin/base-modify' into base-modify

parents 0324597e 2f1195f3
...@@ -57,23 +57,28 @@ public class UserBiz { ...@@ -57,23 +57,28 @@ public class UserBiz {
String result = this.doPost(imUrl + "/xxfcim/user/register",str) ; String result = this.doPost(imUrl + "/xxfcim/user/register",str) ;
JSONObject json = JSONObject.parseObject(result); JSONObject json = JSONObject.parseObject(result);
//如果已经注册过,查询出手机号对应用户信息执行登录返回 //如果已经注册过,查询出手机号对应用户信息执行登录返回
// if(0 == json.getInteger("resultCode")){ if(0 == json.getInteger("resultCode")){
// String phone = map.get("telephone").toString(); String phone = map.get("telephone").toString();
// Query query = new Query(Criteria.where("phone").is(phone)); Query query = new Query(Criteria.where("phone").is(phone));
// User mgt = mongoTemplate.findOne(query, User.class); User mgt = mongoTemplate.findOne(query, User.class);
// if(mgt == null){ if(mgt == null){
// result = "系统错误"; result = "系统错误";
// }else{ }else{
// Map<String,Object>params = new HashMap<String,Object>(); json.put("password",mgt.getPassword());
// params.put("userId",mgt.getUserId()); Map<String,Object> params = new HashMap<String,Object>();
// params.put("telephone",mgt.getPhone()); params.put("userId",mgt.getId());
// params.put("password",mgt.getPassword()); json.put("data",params);
// result = this.login(params); result = json.toJSONString();
// } /*Map<String,Object>params = new HashMap<String,Object>();
// }else{ params.put("userId",mgt.getUserId());
// json.put("password",map.get("password").toString()); params.put("telephone",mgt.getPhone());
// result = json.toJSONString(); params.put("password",mgt.getPassword());
// } result = this.login(params);*/
}
}else{
json.put("password",map.get("password").toString());
result = json.toJSONString();
}
baseResponse.setStatus(200); baseResponse.setStatus(200);
baseResponse.setMessage(result); baseResponse.setMessage(result);
......
...@@ -566,8 +566,8 @@ public class Msg { ...@@ -566,8 +566,8 @@ public class Msg {
Msg entity = new Msg(); Msg entity = new Msg();
entity.id = ObjectId.get(); entity.id = ObjectId.get();
entity.userId = user.getUserId(); entity.userId = Integer.parseInt(user.getId().toString());
if(10000==user.getUserId()) if("10000" ==user.getId().toString())
entity.nickname ="客服公众号"; entity.nickname ="客服公众号";
else else
entity.nickname = user.getNickname(); entity.nickname = user.getNickname();
......
...@@ -4,6 +4,7 @@ import java.util.List; ...@@ -4,6 +4,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.xxfc.platform.im.utils.DateUtil; import com.xxfc.platform.im.utils.DateUtil;
import org.bson.types.ObjectId;
import org.mongodb.morphia.annotations.Embedded; import org.mongodb.morphia.annotations.Embedded;
import org.mongodb.morphia.annotations.Entity; import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Id; import org.mongodb.morphia.annotations.Id;
...@@ -27,7 +28,7 @@ import lombok.Setter; ...@@ -27,7 +28,7 @@ import lombok.Setter;
public class User { public class User {
@Id @Id
private Integer userId;// 用户Id private ObjectId id;// 用户Id
//@JSONField(serialize = false) //@JSONField(serialize = false)
...@@ -188,8 +189,8 @@ public class User { ...@@ -188,8 +189,8 @@ public class User {
// ********************引用字段******************** // ********************引用字段********************
public Integer getUserId() { public ObjectId getId() {
return userId; return id;
} }
...@@ -209,8 +210,8 @@ public class User { ...@@ -209,8 +210,8 @@ public class User {
this.num = num; this.num = num;
} }
public void setUserId(Integer userId) { public void setid(ObjectId id) {
this.userId = userId; this.id = id;
} }
public String getUserKey() { public String getUserKey() {
......
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