|
@@ -7,6 +7,7 @@ import cn.rankin.apiweb.service.user.UserService;
|
|
|
import cn.rankin.common.utils.api.model.APIResult;
|
|
|
import cn.rankin.data.api.app.vo.DeviceUserVo;
|
|
|
import cn.rankin.data.api.app.vo.UserInfoVo;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -20,6 +21,7 @@ import java.util.Map;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping(value = "/user")
|
|
|
+@Slf4j
|
|
|
public class UserController {
|
|
|
|
|
|
@Autowired
|
|
@@ -43,15 +45,19 @@ public class UserController {
|
|
|
public APIResult getProductValid(@NeedUser DeviceUserVo user) {
|
|
|
String uid = user.getUid();
|
|
|
if (StringUtils.isEmpty(uid)) {
|
|
|
+ log.error("Uid-Empty, uid={}", uid);
|
|
|
return APIResult.error(ApiWebCode.NOT_EXISTS);
|
|
|
}
|
|
|
|
|
|
List<Map<String, Object>> products = userService.getProductValid(uid);
|
|
|
|
|
|
+
|
|
|
if (null == products){
|
|
|
products = new ArrayList<>();
|
|
|
}
|
|
|
|
|
|
+ log.info("Valid-Product-Get-From-Service, product={}, len={}", products, products.size());
|
|
|
+
|
|
|
List<Map<String, Object> > recs = new ArrayList<>();
|
|
|
|
|
|
for(Map<String, Object> item : products){
|