Commit 5ae233a8 by guojuxing

店招品牌共享标志调整

parent 07d3b589
......@@ -191,6 +191,13 @@ public interface EnterpriseApiService {
* @throws
*/
ServiceResponse<List<EnterpriseDTO>> listEnterpriseByIds(List<Integer> enterpriseIdList);
/**
* key:商户ID value:商户名称
* @param enterpriseIdList
* @return
*/
ServiceResponse<Map<Integer, String>> getEnterpriseIdMapName(List<Integer> enterpriseIdList);
/**
* getEnterpriseByName
* @Title: getEnterpriseByName
......
......@@ -383,6 +383,17 @@ public class EnterpriseApiServiceImpl implements EnterpriseApiService {
}
@Override
public ServiceResponse<Map<Integer, String>> getEnterpriseIdMapName(List<Integer> enterpriseIdList) {
Map<Integer, String> map = new HashMap<>();
List<EnterpriseDTO> list = listEnterpriseByIds(enterpriseIdList).getResult();
if (CollectionUtils.isNotEmpty(list)) {
return ServiceResponse.success(list.stream()
.collect(Collectors.toMap(EnterpriseDTO::getEnterpriseId, EnterpriseDTO::getEnterpriseName)));
}
return ServiceResponse.success(map);
}
@Override
public ServiceResponse<EnterpriseDTO> getEnterpriseByName(String enterpriseName) {
TabEnterprise enterpriseByName = this.enterpriseService.getEnterpriseByName(enterpriseName);
return ServiceResponse.success(EntityUtil.changeEntityByJSON(EnterpriseDTO.class, enterpriseByName));
......
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