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