Commit 732a2f3d by 朱亚洁

feat:[1003921]自建码规则更新-小睿码改成/t-3

parent 01118c60
......@@ -564,14 +564,14 @@ public class BookGroupBizImpl implements BookGroupBiz {
bookGroupDao.insert(bookGroup);
BookGroup group = new BookGroup();
group.setId(bookGroup.getId());
group.setGroupQrcodeLink(this.getGroupQrcodeLink(bookGroup.getId(), adviserId));
group.setGroupQrcodeLink(this.getGroupQrcodeLink(bookGroup.getId(), adviserId, joinGroupType));
if (joinGroupType != null) {
group.setJoinGroupType(joinGroupType);
}
bookGroupDao.update(group);
} else {
bookGroupDao.insert(bookGroup);
String groupQrcodeLink = this.getGroupQrcodeLink(bookGroup.getId(), adviserId);
String groupQrcodeLink = this.getGroupQrcodeLink(bookGroup.getId(), adviserId, joinGroupType);
String groupQrcodeUrl = QrcodeUtils.createWithMargin(groupQrcodeLink, 1);
BookGroup group = new BookGroup();
group.setId(bookGroup.getId());
......@@ -760,7 +760,7 @@ public class BookGroupBizImpl implements BookGroupBiz {
}
group.setSceneId(groupQrcodeVO.getSceneId());
group.setGroupQrcodeUrl(groupQrcodeVO.getQrcodeUrl());
group.setGroupQrcodeLink(this.getGroupQrcodeLink(bookGroupDTO.getId(), adviserId));
group.setGroupQrcodeLink(this.getGroupQrcodeLink(bookGroupDTO.getId(), adviserId, joinGroupType));
bookGroupDao.update(group);
// 展示返回最新生成的
bookGroupDTO.setGroupQrcodeUrl(groupQrcodeVO.getQrcodeUrl());
......@@ -773,7 +773,7 @@ public class BookGroupBizImpl implements BookGroupBiz {
final Boolean haveQrcode = this.isHaveQrcode(bookId, channelId, adviserId);
// 如果之前是公众号二维码则要重新生成自有码
if (!haveQrcode) {
String groupQrcodeLink = this.getGroupQrcodeLink(bookGroupDTO.getId(), adviserId);
String groupQrcodeLink = this.getGroupQrcodeLink(bookGroupDTO.getId(), adviserId, joinGroupType);
String groupQrcodeUrl = QrcodeUtils.createWithMargin(groupQrcodeLink, 1);
group.setGroupQrcodeUrl(groupQrcodeUrl);
group.setGroupQrcodeLink(groupQrcodeLink);
......@@ -830,9 +830,15 @@ public class BookGroupBizImpl implements BookGroupBiz {
t-1,自建码,sceneId
t-2,社群码,bookGroupId
*/
private String getGroupQrcodeLink(Long bookGroupId, Long adviserId) {
private String getGroupQrcodeLink(Long bookGroupId, Long adviserId, Integer joinGroupType) {
Long agentId = adviserConsr.getAgentIdByAdviser(adviserId);
String url = bookGroupQrcodeDomain + "/t-2/" + agentId + "/" + bookGroupId;
String url;
if (JoinGroupTypeEnum.XIAORUI.getCode().equals(joinGroupType)){
//小睿码t-3
url = bookGroupQrcodeDomain + "/t-3/" + agentId + "/" + bookGroupId;
} else {
url = bookGroupQrcodeDomain + "/t-2/" + agentId + "/" + bookGroupId;
}
return url;
}
......
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