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