|
@@ -1,7 +1,7 @@
|
|
|
package com.hcloud.microserver.h5.controller.web;
|
|
|
|
|
|
+import com.hcloud.microserver.commoncore.annotation.CurrentUser;
|
|
|
import com.hcloud.microserver.commoncore.base.ResponseBase;
|
|
|
-import com.hcloud.microserver.commoncore.base.ResultVO;
|
|
|
import com.hcloud.microserver.commoncore.enums.ResultEnum;
|
|
|
import com.hcloud.microserver.commoncore.exception.GlobalException;
|
|
|
import com.hcloud.microserver.commoncore.util.string.StringUtils;
|
|
@@ -11,6 +11,7 @@ import com.hcloud.microserver.h5.facade.carbon.forms.CustomerInfoForm;
|
|
|
import com.hcloud.microserver.h5.facade.carbon.vo.CustomerCarbonValRankVO;
|
|
|
import com.hcloud.microserver.h5.service.CustomerCarbonValService;
|
|
|
import com.hcloud.microserver.h5.service.CustomerService;
|
|
|
+import com.hcloud.microserver.h5.util.CurrUserUtil;
|
|
|
import io.swagger.annotations.*;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -40,17 +41,17 @@ public class CustomerCarbonValController extends CarbonBaseController {
|
|
|
}
|
|
|
CustomerCarbonValRankForm form = new CustomerCarbonValRankForm();
|
|
|
form.setType(type);
|
|
|
- //获取当前登录用户
|
|
|
- CustomerInfoForm customerInfo = customerService.getCurrentMember();
|
|
|
- if (customerInfo == null) {
|
|
|
- return responseError(new ResultVO(ResultEnum.TOKEN_EXPIRED));
|
|
|
- }
|
|
|
- if (StringUtils.isEmpty(form.getCustomerId())){
|
|
|
- form.setCustomerId(customerInfo.getGuid());
|
|
|
- }
|
|
|
- if (form.getCustomerType() == null){
|
|
|
- form.setCustomerType(customerInfo.getCustomerType());
|
|
|
+ //获取是否有登录用户
|
|
|
+ CustomerInfoForm customerInfo = CurrUserUtil.getCurrentMember();
|
|
|
+ if (customerInfo != null) {
|
|
|
+ if (StringUtils.isEmpty(form.getCustomerId())){
|
|
|
+ form.setCustomerId(customerInfo.getGuid());
|
|
|
+ }
|
|
|
+ if (form.getCustomerType() == null){
|
|
|
+ form.setCustomerType(customerInfo.getCustomerType());
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
CustomerCarbonValRankVO vo = customerCarbonValService.getCustomerCarbonValRankList(form);
|
|
|
return responseResultSuccess(vo);
|
|
|
}
|