Commit af5a5d1a by songyinghui

feat: 保存落地页、欢迎语关联关系

parent 10979da2
......@@ -35,6 +35,9 @@ public class HmPageRelationBO implements Serializable {
*/
private String referId;
/**
* 引用方code
*/
private String referCode;
/**
......
......@@ -31,7 +31,7 @@ public interface HmPageRelationService {
* @param hmPageRelationBO
* @return
*/
boolean updateRelationStatus(HmPageRelationBO hmPageRelationBO);
boolean updatePageRelation(HmPageRelationBO hmPageRelationBO);
/**
* 根据落地页模板code 查询关联的引用方
......
......@@ -59,5 +59,5 @@ public interface WelcomeRelationService {
* @see com.gic.haoban.manage.api.enums.WelcomeRelationStatusEnum
* @return
*/
Boolean updateWelcomeRelationStatus(HmWelcomeRelationBO hmWelcomeRelationBO);
Boolean updateWelcomeRelation(HmWelcomeRelationBO hmWelcomeRelationBO);
}
......@@ -45,6 +45,7 @@ public class HmPageRelationServiceImpl implements HmPageRelationService {
pageRelation.setWxEnterpriseId(hmPageRelationBO.getWxEnterpriseId());
pageRelation.setPageCode(hmPageRelationBO.getPageCode());
pageRelation.setReferId(hmPageRelationBO.getReferId());
pageRelation.setReferCode(hmPageRelationBO.getReferCode());
pageRelation.setReferName(hmPageRelationBO.getReferName());
pageRelation.setCreateTime(new Date());
pageRelation.setUpdateTime(new Date());
......@@ -54,7 +55,7 @@ public class HmPageRelationServiceImpl implements HmPageRelationService {
}
@Override
public boolean updateRelationStatus(HmPageRelationBO hmPageRelationBO) {
public boolean updatePageRelation(HmPageRelationBO hmPageRelationBO) {
// 移除该referId之前的引用
Date now = new Date();
HmPageRelationQO pageRelationQo = new HmPageRelationQO();
......
......@@ -143,7 +143,7 @@ public class WelcomeRelationServiceImpl implements WelcomeRelationService {
*/
@Override
@Transactional(rollbackFor = RuntimeException.class)
public Boolean updateWelcomeRelationStatus(HmWelcomeRelationBO hmWelcomeRelationBO) {
public Boolean updateWelcomeRelation(HmWelcomeRelationBO hmWelcomeRelationBO) {
log.info("[updateWelcomeRelationStatus] params:{}", JSON.toJSONString(hmWelcomeRelationBO));
// 取消该referId已有的引用
List<TabHaobanWelcomeTemplateRelation> tabHaobanWelcomeTemplateRelations =
......
......@@ -102,7 +102,7 @@ public class HmPageApiServiceImpl implements HmPageApiService {
*/
private Integer checkPageIsBeQuoted(String pageCode) {
List<HmPageRelationBO> relations = pageRelationService.queryPageRelation(pageCode);
return 0;
return relations.size();
}
/**
......
......@@ -193,7 +193,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
welcomeRelationBo.setReferCode(hmQrcodeQDTO.getHmCode());
welcomeRelationBo.setReferName(hmQrcodeQDTO.getName());
welcomeRelationBo.setType(HmWelcomeReferType.HM.getCode());
welcomeRelationService.updateWelcomeRelationStatus(welcomeRelationBo);
welcomeRelationService.updateWelcomeRelation(welcomeRelationBo);
}
/**
......
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