|
@@ -1,6 +1,7 @@
|
|
|
package com.yc.ship.module.marketing.service.policy;
|
|
package com.yc.ship.module.marketing.service.policy;
|
|
|
|
|
|
|
|
import com.yc.ship.framework.common.util.collection.CollectionUtils;
|
|
import com.yc.ship.framework.common.util.collection.CollectionUtils;
|
|
|
|
|
+import com.yc.ship.framework.ip.core.utils.AreaUtils;
|
|
|
import com.yc.ship.module.marketing.dal.dataobject.policydetail.PolicyDetailDO;
|
|
import com.yc.ship.module.marketing.dal.dataobject.policydetail.PolicyDetailDO;
|
|
|
import com.yc.ship.module.marketing.dal.mysql.policydetail.PolicyDetailMapper;
|
|
import com.yc.ship.module.marketing.dal.mysql.policydetail.PolicyDetailMapper;
|
|
|
import com.yc.ship.module.product.dal.dataobject.voyage.VoyageDO;
|
|
import com.yc.ship.module.product.dal.dataobject.voyage.VoyageDO;
|
|
@@ -60,10 +61,10 @@ public class PolicyServiceImpl implements PolicyService {
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public void updatePolicy(PolicySaveReqVO updateReqVO) {
|
|
public void updatePolicy(PolicySaveReqVO updateReqVO) {
|
|
|
- throw exception0(500, "暂不支持修改");
|
|
|
|
|
|
|
+// throw exception0(500, "暂不支持修改");
|
|
|
// 更新
|
|
// 更新
|
|
|
-// PolicyDO updateObj = BeanUtils.toBean(updateReqVO, PolicyDO.class);
|
|
|
|
|
-// policyMapper.updateById(updateObj);
|
|
|
|
|
|
|
+ PolicyDO updateObj = BeanUtils.toBean(updateReqVO, PolicyDO.class);
|
|
|
|
|
+ policyMapper.updateById(updateObj);
|
|
|
// handlePolicyDetail(updateObj.getId(), updateReqVO);
|
|
// handlePolicyDetail(updateObj.getId(), updateReqVO);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -168,6 +169,9 @@ public class PolicyServiceImpl implements PolicyService {
|
|
|
PolicyDetailDO policyDetailDO = policyDetailDOMap.get(policyRespVO.getId());
|
|
PolicyDetailDO policyDetailDO = policyDetailDOMap.get(policyRespVO.getId());
|
|
|
if(policyDetailDO != null) {
|
|
if(policyDetailDO != null) {
|
|
|
policyRespVO.setAreaIds(policyDetailDO.getAreaIds());
|
|
policyRespVO.setAreaIds(policyDetailDO.getAreaIds());
|
|
|
|
|
+ List<AreaCountryDTO> areaCountryListByAreaIds = areaApi.getAreaCountryListByAreaIds(policyDetailDO.getAreaIds());
|
|
|
|
|
+ List<Integer> countryIds = CollectionUtils.convertList(areaCountryListByAreaIds, AreaCountryDTO::getCountryId);
|
|
|
|
|
+ policyRespVO.setCountryIds(countryIds);
|
|
|
policyRespVO.setRoomModelIds(policyDetailDO.getRoomModelIds());
|
|
policyRespVO.setRoomModelIds(policyDetailDO.getRoomModelIds());
|
|
|
policyRespVO.setSurplusNum(policyDetailDO.getSurplusNum());
|
|
policyRespVO.setSurplusNum(policyDetailDO.getSurplusNum());
|
|
|
}
|
|
}
|