Commit 67828138 authored by 332784038@qq.com's avatar 332784038@qq.com

Merge remote-tracking branch 'origin/dev' into dev

parents f5f85128 02ac2898
......@@ -13,10 +13,26 @@ public class NodeRespDTO {
* 国家
*/
private Long guojia;
/**
* 国家中文
*/
private String guojiaZh;
/**
* 国家英文
*/
private String guojiaEn;
/**
* 市
*/
private Long shi;
/**
* 市中文
*/
private String shiZh;
/**
* 市英文
*/
private String shiEn;
/**
* 中文标题
*/
......
......@@ -4,7 +4,9 @@ import cn.iocoder.yudao.module.ecw.api.node.NodeApi;
import cn.iocoder.yudao.module.ecw.api.node.dto.NodeRespDTO;
import cn.iocoder.yudao.module.ecw.api.node.dto.NodeTreeRegionDTO;
import cn.iocoder.yudao.module.ecw.dal.dataobject.node.NodeDO;
import cn.iocoder.yudao.module.ecw.dal.dataobject.region.RegionDO;
import cn.iocoder.yudao.module.ecw.dal.mysql.node.NodeMapper;
import cn.iocoder.yudao.module.ecw.service.region.RegionService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
......@@ -16,6 +18,8 @@ import java.util.List;
public class NodeApiImpl implements NodeApi {
@Resource
private NodeMapper nodeMapper;
@Resource
private RegionService regionService;
@Override
public List<NodeRespDTO> getNodesByCity(Long cityId, Long countryId) {
......@@ -48,6 +52,12 @@ public class NodeApiImpl implements NodeApi {
if (nodeDO != null) {
NodeRespDTO nodeRespDTO = new NodeRespDTO();
BeanUtils.copyProperties(nodeDO, nodeRespDTO);
RegionDO regionCountry = regionService.getRegion(nodeRespDTO.getGuojia());
nodeRespDTO.setGuojiaZh(regionCountry.getTitleZh());
nodeRespDTO.setGuojiaEn(regionCountry.getTitleEn());
RegionDO regionCity = regionService.getRegion(nodeRespDTO.getShi());
nodeRespDTO.setShiZh(regionCity.getTitleZh());
nodeRespDTO.setShiEn(regionCity.getTitleEn());
return nodeRespDTO;
}
return null;
......
......@@ -365,8 +365,8 @@ public class RewardServiceImpl extends AbstractService<RewardMapper, RewardDO> i
setPickMethod(appRewardBackVO);
NodeRespDTO nodesById = nodeApi.getNodesById(Long.valueOf(rewardDO.getNodeId()));
if (nodesById != null) {
appRewardBackVO.setNodeZh(nodesById.getTitleZh());
appRewardBackVO.setNodeEn(nodesById.getTitleEn());
appRewardBackVO.setNodeZh(nodesById.getGuojiaZh() + "、" + nodesById.getShiZh() + "、" + nodesById.getTitleZh());
appRewardBackVO.setNodeEn(nodesById.getGuojiaEn() + "、" + nodesById.getShiEn() + "、" + nodesById.getTitleEn());
}
return appRewardBackVO;
}
......
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