Commit 561e956e by 阮思源

加字段

parent b9e05f87
......@@ -21,6 +21,7 @@ import com.pcloud.book.group.biz.BookGroupClassifyBiz;
import com.pcloud.book.group.dao.BookGroupDao;
import com.pcloud.book.group.dao.GroupQrcodeDao;
import com.pcloud.book.group.vo.ClassifyVO;
import com.pcloud.common.core.aspect.ParamLog;
import com.pcloud.common.core.biz.MessageBiz;
import com.pcloud.common.core.constant.SystemCode;
import com.pcloud.common.core.dto.SendNotifyDto;
......@@ -31,12 +32,15 @@ import com.pcloud.common.page.PageBeanNew;
import com.pcloud.common.page.PageParam;
import com.pcloud.common.utils.DateUtils;
import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.QrcodeUtils;
import com.pcloud.common.utils.cache.redis.JedisClusterUtils;
import com.pcloud.common.utils.string.StringUtil;
import com.pcloud.common.utils.zip.CompressUtils;
import com.pcloud.usercenter.party.adviser.dto.AdviserBaseInfoDto;
import org.apache.commons.collections.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
......@@ -83,6 +87,12 @@ public class GroupMasterTagBizImpl implements GroupMasterTagBiz {
private MessageBiz messageBiz;
@Autowired
private BookGroupClassifyBiz bookGroupClassifyBiz;
@Value("${system.env}")
private String envStr;
/**
* 品牌方扫码进入指定群链接缓存
*/
private static final String BRAND_QRCODE_URL_REDIS = "BRAND_QRCODE_URL_REDIS";
@Override
public PageBeanNew<GroupMasterDTO> listPageGroupMaster(Integer currentPage, Integer numPerPage, Map<String, Object> paramMap) {
......@@ -175,9 +185,37 @@ public class GroupMasterTagBizImpl implements GroupMasterTagBiz {
if (!ListUtils.isEmpty(masterList)) {
groupMasterDTO.setMasterList(masterList);
}
if (new Integer(2).equals(groupMasterDTO.getJoinGroupType())) {
groupMasterDTO.setCodeUrl(findCodeUrl(groupMasterDTO.getBookGroupId(), groupMasterDTO.getClassifyId(), groupMasterDTO.getGroupQrcodeId()));
}
}
}
@ParamLog("获取品牌方进指定群链接")
private String findCodeUrl(Long bookGroupId, Long classifyId, Long groupQrcodeId){
//获取连接
String codeUrl = JedisClusterUtils.hget(BRAND_QRCODE_URL_REDIS, groupQrcodeId.toString());
if (codeUrl == null) {
String ym = "";
if ("dev".equalsIgnoreCase(envStr)) {
ym = "chubanyun.me";
}
if ("test".equalsIgnoreCase(envStr)) {
ym = "raysgo.com";
}
if ("uat".equalsIgnoreCase(envStr)) {
ym = "raysyun.com";
}
if ("pro".equalsIgnoreCase(envStr)) {
ym = "5rs.me";
}
String link = "https://wechat666." + ym + "/group/info?classify_id=" + classifyId + "&book_group_id=" + bookGroupId + "&group_qrcode_id=" + groupQrcodeId;
codeUrl = QrcodeUtils.create(link);
JedisClusterUtils.hset(BRAND_QRCODE_URL_REDIS, groupQrcodeId.toString(), codeUrl);
}
return codeUrl;
}
@Override
public List<AdvertisingMasterDTO> getBrandMaster() throws BizException {
List<AdvertisingMasterDTO> list = advertisingMasterDao.getBrandMaster();
......@@ -354,6 +392,9 @@ public class GroupMasterTagBizImpl implements GroupMasterTagBiz {
groupMasterDTO.setPurLabelName(labelMap.get(groupMasterDTO.getPurLabelId()));
}
}
if (new Integer(2).equals(groupMasterDTO.getJoinGroupType())) {
groupMasterDTO.setCodeUrl(findCodeUrl(groupMasterDTO.getBookGroupId(), groupMasterDTO.getClassifyId(), groupMasterDTO.getGroupQrcodeId()));
}
}
}
......
......@@ -109,6 +109,23 @@ public class GroupMasterDTO extends BaseDto{
* isbn
*/
private String isbn;
/**
* 分类id
*/
private Long classifyId;
/**
* 社群书id
*/
private Long bookGroupId;
/**
* 进群方式:1群二维码,2客服机器人
*/
private Integer joinGroupType;
private String codeUrl;
public String getWxGroupId() {
return wxGroupId;
}
......@@ -285,6 +302,38 @@ public class GroupMasterDTO extends BaseDto{
this.isbn = isbn;
}
public Long getClassifyId() {
return classifyId;
}
public void setClassifyId(Long classifyId) {
this.classifyId = classifyId;
}
public Long getBookGroupId() {
return bookGroupId;
}
public void setBookGroupId(Long bookGroupId) {
this.bookGroupId = bookGroupId;
}
public Integer getJoinGroupType() {
return joinGroupType;
}
public void setJoinGroupType(Integer joinGroupType) {
this.joinGroupType = joinGroupType;
}
public String getCodeUrl() {
return codeUrl;
}
public void setCodeUrl(String codeUrl) {
this.codeUrl = codeUrl;
}
@Override
public String toString() {
return "GroupMasterDTO{" +
......
......@@ -570,8 +570,11 @@
c.create_user adviserId,
b.BOOK_NAME bookName,
c.classify classify,
c.id classifyId,
q.user_number userNumber,
q.qrcode_url qrcodeUrl,
bg.id bookGroupId,
bg.join_group_type joinGroupType,
bg.dep_label_id depLabelId,
bg.pro_label_id proLabelId,
bg.pur_label_id purLabelId,
......
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