|
@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("/userDetail")
|
|
@RequestMapping("/userDetail")
|
|
@@ -73,6 +74,56 @@ public class UserDetailController extends BaseController {
|
|
|
return userDetail;
|
|
return userDetail;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @GetMapping("/light/{userId}")
|
|
|
|
|
+ public boolean light(@PathVariable Long userId) {
|
|
|
|
|
+ UserDetail userDetail = userDetailRepo.findById(userId).orElse(null);
|
|
|
|
|
+ if (Objects.isNull(userDetail)) {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotBlank(userDetail.getAutograph())) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotBlank(userDetail.getBgpic())) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotBlank(userDetail.getBirthday())) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotBlank(userDetail.getBlood())) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotBlank(userDetail.getCompany())) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotBlank(userDetail.getConstellation())) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotBlank(userDetail.getHome())) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotBlank(userDetail.getMail())) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotBlank(userDetail.getNickname())) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotBlank(userDetail.getOccupation())) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotBlank(userDetail.getPic())) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotBlank(userDetail.getSchool())) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotBlank(userDetail.getSex())) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@GetMapping("/{userId}/metaQuery")
|
|
@GetMapping("/{userId}/metaQuery")
|
|
|
public MetaRestResult<UserDetail> metaQuery(@PathVariable Long userId) {
|
|
public MetaRestResult<UserDetail> metaQuery(@PathVariable Long userId) {
|
|
|
return MetaRestResult.returnSuccess(get(userId));
|
|
return MetaRestResult.returnSuccess(get(userId));
|