Commit f96674f9 by 陶光胜

观云台小程序

parent a7cb5970
......@@ -91,9 +91,9 @@ public class DataAuthUtils {
ServiceResponse<List<OwnerMemberCardDTO>> result = memberCardApiService.getAll(enterpriseId);
List<String> cards = Arrays.asList(response.getResult().getMemberCardAuth().split("_"));
if(result.isSuccess() && CollectionUtils.isNotEmpty(result.getResult())){
return result.getResult().stream().filter(dto ->cards.contains(dto.getId()+"")).map(ownerMemberCardDTO -> {
return result.getResult().stream().filter(dto ->cards.contains(dto.getCardConfigId()+"")).map(ownerMemberCardDTO -> {
MbrVo vo = new MbrVo();
vo.setMbrAreaId(ownerMemberCardDTO.getId().toString());
vo.setMbrAreaId(ownerMemberCardDTO.getCardConfigId().toString());
vo.setMbrAreaName(ownerMemberCardDTO.getCardName());
return vo;
}).collect(Collectors.toList());
......
package com.gic.cloud.web.controller;
import com.gic.cloud.web.qo.DateTypeQo;
import com.gic.commons.webapi.reponse.RestResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
public class BaseSalesController {
@Autowired
private StoreSearchUtils storeSearchUtils;
@RequestMapping("base-sales")
public RestResponse baseSales(Integer channel, Integer userId, Integer enterpriseId, String searchJSON,
DateTypeQo dateTypeQo, String mbrAreaId, Integer level, Integer parentId){
List<Integer> list = this.storeSearchUtils.storeSearch(userId, enterpriseId, searchJSON);
List<String> onLine = this.storeSearchUtils.onLineStoreSearch(userId, enterpriseId, searchJSON);
List<Integer> childrenStoreGroupIdList = this.storeSearchUtils.getChildrenStoreGroupIdList(parentId);
return null;
}
}
package com.gic.cloud.web.controller;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.cloud.dto.FunctionDTO;
import com.gic.cloud.dto.FunctionModuleDTO;
import com.gic.cloud.service.FunctionApiService;
import com.gic.cloud.service.FunctionModuleApiService;
import com.gic.cloud.service.IndexApiService;
import com.gic.cloud.web.auth.DataAuthUtils;
import com.gic.cloud.web.qo.DateTypeQo;
......@@ -25,6 +29,8 @@ public class IndexController {
private StoreSearchUtils storeSearchUtils;
@Autowired
private DataAuthUtils dataAuthUtils;
@Autowired
private FunctionApiService functionApiService;
@RequestMapping("index-mbr")
public RestResponse indexMbr(Integer enterpriseId, Integer userId){
......@@ -41,4 +47,12 @@ public class IndexController {
StringUtils.isNoneBlank(mbrAreaId) ? Long.valueOf(mbrAreaId) : null, dateTypeQo.getType(), dateTypeQo.getDate(), dataType);
return RestResponse.success(EntityUtil.changeEntityByJSON(IndexSalesVo.class, indexSales.getResult()));
}
@RequestMapping("function-list")
public RestResponse functionList(Integer userId){
ServiceResponse<List<FunctionModuleDTO>> response = this.functionApiService.getFunctionByUserId(userId);
return RestResponse.success(response.getResult());
}
}
......@@ -5,6 +5,8 @@ import java.io.Serializable;
public class LoginUserVo implements Serializable {
private Integer userId;
private Integer enterpriseId;
private String userName;
private Integer isAdmin = 0;
private String phoneNumber;
private String areaCode;
private String code;
......@@ -48,4 +50,20 @@ public class LoginUserVo implements Serializable {
public void setCode(String code) {
this.code = code;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public Integer getIsAdmin() {
return isAdmin;
}
public void setIsAdmin(Integer isAdmin) {
this.isAdmin = isAdmin;
}
}
......@@ -146,6 +146,7 @@
<dubbo:reference interface="com.gic.cloud.service.IndexDescApiService" id="indexDescApiService" timeout="6000" retries="0"/>
<dubbo:reference interface="com.gic.cloud.service.DataExplainApiService" id="dataExplainApiService" timeout="6000" retries="0"/>
<dubbo:reference interface="com.gic.data.api.service.IndexSalesApiService" id="indexSalesApiService" timeout="6000" retries="0"/>
<dubbo:reference interface="com.gic.cloud.service.FunctionApiService" id="functionApiService" timeout="6000" retries="0"/>
<dubbo:reference interface="com.gic.cloud.service.FunctionModuleApiService" id="functionModuleApiService" timeout="6000" retries="0"/>
<dubbo:reference interface="com.gic.data.api.service.performanceoverview.PerformanceOverviewApiService" id="performanceOverviewApiService" timeout="6000" retries="0"/>
</beans>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment