mongo中添加用户经纬度ID
This commit is contained in:
parent
79258e0fd2
commit
e8ddaaa510
@ -15,6 +15,7 @@ import io.swagger.annotations.ApiModel;
|
|||||||
@ApiModel
|
@ApiModel
|
||||||
public class UserLocationVO {
|
public class UserLocationVO {
|
||||||
|
|
||||||
|
private String userLocationId;
|
||||||
@CheckEmptyAnnotation(name = "用户经度")
|
@CheckEmptyAnnotation(name = "用户经度")
|
||||||
private String userLng;
|
private String userLng;
|
||||||
@CheckEmptyAnnotation(name = "用户维度")
|
@CheckEmptyAnnotation(name = "用户维度")
|
||||||
@ -29,6 +30,14 @@ public class UserLocationVO {
|
|||||||
private String userName;
|
private String userName;
|
||||||
private String gmtCreate;
|
private String gmtCreate;
|
||||||
|
|
||||||
|
public String getUserLocationId() {
|
||||||
|
return userLocationId == null ? "" : userLocationId.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserLocationId(String userLocationId) {
|
||||||
|
this.userLocationId = userLocationId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getUserLng() {
|
public String getUserLng() {
|
||||||
return userLng == null ? "" : userLng.trim();
|
return userLng == null ? "" : userLng.trim();
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ public interface IUserLocationService {
|
|||||||
* @param userLocationVO
|
* @param userLocationVO
|
||||||
* @return userLocationId
|
* @return userLocationId
|
||||||
*/
|
*/
|
||||||
String saveReturnId(String userId, UserLocationVO userLocationVO);
|
String saveAndReturnId(String userId, UserLocationVO userLocationVO);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,11 +35,11 @@ public class UserLocationServiceImpl extends DefaultBaseService implements IUser
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void save(String userId, UserLocationVO userLocationVO) {
|
public void save(String userId, UserLocationVO userLocationVO) {
|
||||||
saveReturnId(userId, userLocationVO);
|
saveAndReturnId(userId, userLocationVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String saveReturnId(String userId, UserLocationVO userLocationVO) {
|
public String saveAndReturnId(String userId, UserLocationVO userLocationVO) {
|
||||||
String userLocationId = UUIDUtil.getUUID();
|
String userLocationId = UUIDUtil.getUUID();
|
||||||
Map<String, Object> params = HashMapUtil.beanToMap(userLocationVO);
|
Map<String, Object> params = HashMapUtil.beanToMap(userLocationVO);
|
||||||
params.put("userLocationId", userLocationId);
|
params.put("userLocationId", userLocationId);
|
||||||
|
Loading…
Reference in New Issue
Block a user