Commit 9fc84683 by lili

合并代码

parent 3e5f1ad6
...@@ -18,6 +18,19 @@ public class GroupQrcodeBaseDTO implements Serializable { ...@@ -18,6 +18,19 @@ public class GroupQrcodeBaseDTO implements Serializable {
*/ */
private String groupName; private String groupName;
/**
* 图书名称
*/
private String bookName;
public String getBookName() {
return bookName;
}
public void setBookName(String bookName) {
this.bookName = bookName;
}
public String getWeixinGroupId() { public String getWeixinGroupId() {
return weixinGroupId; return weixinGroupId;
} }
......
package com.pcloud.book.consumer.reader; package com.pcloud.book.consumer.reader;
import com.alibaba.druid.support.json.JSONUtils;
import com.pcloud.common.core.aspect.ParamLog; import com.pcloud.common.core.aspect.ParamLog;
import com.pcloud.common.exceptions.BizException; import com.pcloud.common.exceptions.BizException;
import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.ResponseHandleUtil; import com.pcloud.common.utils.ResponseHandleUtil;
import com.pcloud.readercenter.wechat.dto.WechatUserRobotDto; import com.pcloud.readercenter.wechat.dto.WechatUserRobotDto;
import com.pcloud.readercenter.wechat.entity.WechatUser; import com.pcloud.readercenter.wechat.entity.WechatUser;
...@@ -12,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -12,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* @author lily * @author lily
...@@ -55,6 +58,18 @@ public class ReaderConsr { ...@@ -55,6 +58,18 @@ public class ReaderConsr {
} }
return null; return null;
} }
@ParamLog("获取9个用户头像")
public String getNineHeadUrl() {
List<WechatUserRobotDto> wechatUsers = this.selectRobotsRandom(9);
if (ListUtils.isEmpty(wechatUsers)) {
return "";
}
List<String> headUrls = wechatUsers.stream().map(a -> a.getWechatUserHeadUrl()).collect(Collectors.toList());
return JSONUtils.toJSONString(headUrls);
}
} }
package com.pcloud.book.group.biz.impl; package com.pcloud.book.group.biz.impl;
import com.alibaba.fastjson.JSONObject;
import com.pcloud.book.base.exception.BookBizException; import com.pcloud.book.base.exception.BookBizException;
import com.pcloud.book.consumer.common.ExportConsr; import com.pcloud.book.consumer.common.ExportConsr;
import com.pcloud.book.consumer.message.MessageConsr; import com.pcloud.book.consumer.message.MessageConsr;
...@@ -158,6 +159,7 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz { ...@@ -158,6 +159,7 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
groupQrcode.setGroupSeq(1); groupQrcode.setGroupSeq(1);
groupQrcode.setGroupName(groupName + addClassifyVO.getClassify() + "1群"); groupQrcode.setGroupName(groupName + addClassifyVO.getClassify() + "1群");
groupQrcode.setClassifyId(bookGroupClassify.getId()); groupQrcode.setClassifyId(bookGroupClassify.getId());
groupQrcode.setQrcodeHeadUrl(readerConsr.getNineHeadUrl());
groupQrcodeBiz.insert(groupQrcode); groupQrcodeBiz.insert(groupQrcode);
//新增一个规格 //新增一个规格
Long specId = addSpecification(bookGroupClassify.getPrice(), qrcodeNameAndProId.getProductId(), addClassifyVO.getChannelId(), bookGroupClassify.getClassify()); Long specId = addSpecification(bookGroupClassify.getPrice(), qrcodeNameAndProId.getProductId(), addClassifyVO.getChannelId(), bookGroupClassify.getClassify());
...@@ -396,7 +398,7 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz { ...@@ -396,7 +398,7 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
//设置二维码信息 //设置二维码信息
setGroupQrcodeInfo(listClassify4WechatVOS); setGroupQrcodeInfo(listClassify4WechatVOS);
//获取头像信息 //获取头像信息
setUserHeader(listClassify4WechatVOS); //setUserHeader(listClassify4WechatVOS);
//设置是否购买 //设置是否购买
setIsBuy(listClassify4WechatVOS, wechatUserId); setIsBuy(listClassify4WechatVOS, wechatUserId);
return listClassify4WechatVOS; return listClassify4WechatVOS;
...@@ -736,6 +738,7 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz { ...@@ -736,6 +738,7 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
if (groupQrcodeInfoDTO != null) { if (groupQrcodeInfoDTO != null) {
listClassify4WechatVO.setUserNumber(groupQrcodeInfoDTO.getUserNumber()); listClassify4WechatVO.setUserNumber(groupQrcodeInfoDTO.getUserNumber());
listClassify4WechatVO.setGroupSeq(groupQrcodeInfoDTO.getGroupSeq()); listClassify4WechatVO.setGroupSeq(groupQrcodeInfoDTO.getGroupSeq());
listClassify4WechatVO.setHeadUrl(JSONObject.parseArray(groupQrcodeInfoDTO.getQrcodeHeadUrl(), String.class));
} }
} }
} }
......
package com.pcloud.book.group.biz.impl; package com.pcloud.book.group.biz.impl;
import com.pcloud.book.base.exception.BookBizException; import com.pcloud.book.base.exception.BookBizException;
import com.pcloud.book.consumer.reader.ReaderConsr;
import com.pcloud.book.consumer.wechatgroup.WechatGroupConsr; import com.pcloud.book.consumer.wechatgroup.WechatGroupConsr;
import com.pcloud.book.group.biz.BookGroupClassifyBiz; import com.pcloud.book.group.biz.BookGroupClassifyBiz;
import com.pcloud.book.group.biz.GroupQrcodeBiz; import com.pcloud.book.group.biz.GroupQrcodeBiz;
...@@ -29,6 +30,7 @@ import com.pcloud.common.page.PageParam; ...@@ -29,6 +30,7 @@ import com.pcloud.common.page.PageParam;
import com.pcloud.common.utils.ListUtils; import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.cache.redis.JedisClusterUtils; import com.pcloud.common.utils.cache.redis.JedisClusterUtils;
import com.pcloud.common.utils.string.StringUtil; import com.pcloud.common.utils.string.StringUtil;
import com.sdk.wxgroup.WxGroupSDK;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -61,6 +63,8 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz { ...@@ -61,6 +63,8 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
private BookMQProducer bookMQProducer; private BookMQProducer bookMQProducer;
@Autowired @Autowired
private BookKeywordRecordDao bookKeywordRecordDao; private BookKeywordRecordDao bookKeywordRecordDao;
@Autowired
private ReaderConsr readerConsr;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
...@@ -159,6 +163,11 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz { ...@@ -159,6 +163,11 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
@Override @Override
@ParamLog("新增一个用户") @ParamLog("新增一个用户")
public void addOneUser(String weixinGroupId, Integer memberCount) { public void addOneUser(String weixinGroupId, Integer memberCount) {
String robotIdByGroupId = wechatGroupConsr.getRobotIdByGroupId(weixinGroupId);
Integer peopleCounts = WxGroupSDK.getPeopleCounts(weixinGroupId, robotIdByGroupId);
if (peopleCounts != null) {
memberCount = peopleCounts;
}
//获取群基本信息 //获取群基本信息
GroupQrcodeDTO groupQrcodeDTO = groupQrcodeDao.getGroupQrcodeInfo(weixinGroupId); GroupQrcodeDTO groupQrcodeDTO = groupQrcodeDao.getGroupQrcodeInfo(weixinGroupId);
if (groupQrcodeDTO == null) { if (groupQrcodeDTO == null) {
...@@ -222,6 +231,7 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz { ...@@ -222,6 +231,7 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
groupQrcode.setCreateUser(groupNameAndMaxSeqDTO.getCreateUser()); groupQrcode.setCreateUser(groupNameAndMaxSeqDTO.getCreateUser());
groupQrcode.setWeixinQrcodeId(oneQrcode.getId()); groupQrcode.setWeixinQrcodeId(oneQrcode.getId());
groupQrcode.setGroupSeq(maxSeq); groupQrcode.setGroupSeq(maxSeq);
groupQrcode.setQrcodeHeadUrl(readerConsr.getNineHeadUrl());
groupQrcode.setUserNumber(oneQrcode.getUserNumber()); groupQrcode.setUserNumber(oneQrcode.getUserNumber());
groupQrcode.setGroupName(groupName); groupQrcode.setGroupName(groupName);
groupQrcode.setClassifyId(classifyId); groupQrcode.setClassifyId(classifyId);
......
...@@ -14,6 +14,16 @@ public class GroupQrcodeInfoDTO implements Serializable { ...@@ -14,6 +14,16 @@ public class GroupQrcodeInfoDTO implements Serializable {
private Integer userNumber; private Integer userNumber;
private String qrcodeHeadUrl;
public String getQrcodeHeadUrl() {
return qrcodeHeadUrl;
}
public void setQrcodeHeadUrl(String qrcodeHeadUrl) {
this.qrcodeHeadUrl = qrcodeHeadUrl;
}
public Long getId() { public Long getId() {
return id; return id;
} }
...@@ -44,6 +54,7 @@ public class GroupQrcodeInfoDTO implements Serializable { ...@@ -44,6 +54,7 @@ public class GroupQrcodeInfoDTO implements Serializable {
"id=" + id + "id=" + id +
", groupSeq=" + groupSeq + ", groupSeq=" + groupSeq +
", userNumber=" + userNumber + ", userNumber=" + userNumber +
", qrcodeHeadUrl='" + qrcodeHeadUrl + '\'' +
'}'; '}';
} }
} }
...@@ -87,6 +87,16 @@ public class GroupQrcode extends BaseEntity { ...@@ -87,6 +87,16 @@ public class GroupQrcode extends BaseEntity {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime; private Date updateTime;
private String qrcodeHeadUrl;
public String getQrcodeHeadUrl() {
return qrcodeHeadUrl;
}
public void setQrcodeHeadUrl(String qrcodeHeadUrl) {
this.qrcodeHeadUrl = qrcodeHeadUrl;
}
@Override @Override
public Long getId() { public Long getId() {
return id; return id;
......
...@@ -279,4 +279,18 @@ public class SendWeixinRequestTools { ...@@ -279,4 +279,18 @@ public class SendWeixinRequestTools {
sendTextMessageVO.setGroupId("14108963419@chatroom"); sendTextMessageVO.setGroupId("14108963419@chatroom");
WxGroupSDK.sendTextMessage(sendTextMessageVO); WxGroupSDK.sendTextMessage(sendTextMessageVO);
} }
public static void sendDefaultMessage(String groupName, String robotId, String weixinGroupId) {
String content = "";
if (StringUtil.isEmpty(groupName)) {
content = "欢迎加入本书!凭以下关键词领取任务或资源:";
} else {
content = "欢迎加入本书!\"" + groupName + "\"凭以下关键词领取任务或资源:";
}
SendTextMessageVO sendTextMessageVO = new SendTextMessageVO();
sendTextMessageVO.setContent(content);
sendTextMessageVO.setAltId(robotId);
sendTextMessageVO.setGroupId(weixinGroupId);
WxGroupSDK.sendTextMessage(sendTextMessageVO);
}
} }
...@@ -179,6 +179,7 @@ public class ListClassify4WechatVO implements Serializable { ...@@ -179,6 +179,7 @@ public class ListClassify4WechatVO implements Serializable {
public void setHeadUrl(List<String> headUrl) { public void setHeadUrl(List<String> headUrl) {
this.headUrl = headUrl; this.headUrl = headUrl;
} }
@Override @Override
public String toString() { public String toString() {
return "ListClassify4WechatVO{" + return "ListClassify4WechatVO{" +
...@@ -187,7 +188,7 @@ public class ListClassify4WechatVO implements Serializable { ...@@ -187,7 +188,7 @@ public class ListClassify4WechatVO implements Serializable {
", channelId=" + channelId + ", channelId=" + channelId +
", bookGroupId=" + bookGroupId + ", bookGroupId=" + bookGroupId +
", classify='" + classify + '\'' + ", classify='" + classify + '\'' +
", classifyIntroduce=" + classifyIntroduce + ", classifyIntroduce='" + classifyIntroduce + '\'' +
", price=" + price + ", price=" + price +
", productId=" + productId + ", productId=" + productId +
", productSpecId=" + productSpecId + ", productSpecId=" + productSpecId +
...@@ -196,6 +197,7 @@ public class ListClassify4WechatVO implements Serializable { ...@@ -196,6 +197,7 @@ public class ListClassify4WechatVO implements Serializable {
", userNumber=" + userNumber + ", userNumber=" + userNumber +
", headUrl=" + headUrl + ", headUrl=" + headUrl +
", groupQrcodeId=" + groupQrcodeId + ", groupQrcodeId=" + groupQrcodeId +
", isBuy=" + isBuy +
'}'; '}';
} }
} }
...@@ -5,10 +5,12 @@ import com.pcloud.book.consumer.channel.QrcodeSceneConsr; ...@@ -5,10 +5,12 @@ import com.pcloud.book.consumer.channel.QrcodeSceneConsr;
import com.pcloud.book.consumer.resource.ProductConsr; import com.pcloud.book.consumer.resource.ProductConsr;
import com.pcloud.book.consumer.wechatgroup.WechatGroupConsr; import com.pcloud.book.consumer.wechatgroup.WechatGroupConsr;
import com.pcloud.book.group.biz.BookGroupClassifyBiz; import com.pcloud.book.group.biz.BookGroupClassifyBiz;
import com.pcloud.book.group.biz.GroupQrcodeBiz;
import com.pcloud.book.group.dao.BookGroupDao; import com.pcloud.book.group.dao.BookGroupDao;
import com.pcloud.book.group.dto.BookGroupDTO; import com.pcloud.book.group.dto.BookGroupDTO;
import com.pcloud.book.group.dto.GroupClassifyQrcodeDTO; import com.pcloud.book.group.dto.GroupClassifyQrcodeDTO;
import com.pcloud.book.group.tools.SendWeixinRequestTools; import com.pcloud.book.group.tools.SendWeixinRequestTools;
import com.pcloud.book.group.vo.GroupQrcodeBaseInfoVO;
import com.pcloud.book.keywords.biz.BookGuideBiz; import com.pcloud.book.keywords.biz.BookGuideBiz;
import com.pcloud.book.keywords.biz.BookKeywordBiz; import com.pcloud.book.keywords.biz.BookKeywordBiz;
import com.pcloud.book.keywords.dao.BookGuideDao; import com.pcloud.book.keywords.dao.BookGuideDao;
...@@ -59,6 +61,8 @@ public class BookGuideBizImpl implements BookGuideBiz { ...@@ -59,6 +61,8 @@ public class BookGuideBizImpl implements BookGuideBiz {
private WechatGroupConsr wechatGroupConsr; private WechatGroupConsr wechatGroupConsr;
@Autowired @Autowired
private ProductConsr productConsr; private ProductConsr productConsr;
@Autowired
private GroupQrcodeBiz groupQrcodeBiz;
@Override @Override
@ParamLog("新增欢迎语") @ParamLog("新增欢迎语")
...@@ -182,15 +186,19 @@ public class BookGuideBizImpl implements BookGuideBiz { ...@@ -182,15 +186,19 @@ public class BookGuideBizImpl implements BookGuideBiz {
} else if (bookGuide != null) { } else if (bookGuide != null) {
replyMessages = bookGuideReplyDao.getReplyMessage(bookGuide.getId()); replyMessages = bookGuideReplyDao.getReplyMessage(bookGuide.getId());
} }
if (ListUtils.isEmpty(replyMessages)) {
return;
}
//获取公众号基本信息 //获取公众号基本信息
AccountSettingDto wechatInfo = qrcodeSceneConsr.getWechatInfo(classifyQrcodeInfo.getChannelId()); AccountSettingDto wechatInfo = qrcodeSceneConsr.getWechatInfo(classifyQrcodeInfo.getChannelId());
//处理链接 if (ListUtils.isEmpty(replyMessages)) {
handleUrl(replyMessages, wechatInfo, classifyQrcodeInfo); //获取群名称
//推送消息 GroupQrcodeBaseInfoVO groupInfo = groupQrcodeBiz.getBaseById(classifyQrcodeInfo.getGroupQrcodeId());
SendWeixinRequestTools.sendGuideMessage(replyMessages, robotId, weixinGroupId); //推送消息
SendWeixinRequestTools.sendDefaultMessage(groupInfo == null ? "":groupInfo.getGroupName(), robotId, weixinGroupId);
}else{
//处理链接
handleUrl(replyMessages, wechatInfo, classifyQrcodeInfo);
//推送消息
SendWeixinRequestTools.sendGuideMessage(replyMessages, robotId, weixinGroupId);
}
//获取关键词信息 //获取关键词信息
List<KeywordDTO> keywords = bookKeywordBiz.listFiveKeyword(classifyQrcodeInfo.getClassifyId(), classifyQrcodeInfo.getBookGroupId()); List<KeywordDTO> keywords = bookKeywordBiz.listFiveKeyword(classifyQrcodeInfo.getClassifyId(), classifyQrcodeInfo.getBookGroupId());
SendWeixinRequestTools.sendKeywordsInfo(keywords, robotId, weixinGroupId); SendWeixinRequestTools.sendKeywordsInfo(keywords, robotId, weixinGroupId);
......
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
from from
book_group_classify c join book_group_qrcode q on c.id = q.classify_id book_group_classify c join book_group_qrcode q on c.id = q.classify_id
where where
book_group_id = #{_parameter,jdbcType=BIGINT} and c.is_delete = 0 group by c.id order by userNumberTotal desc,id book_group_id = #{_parameter,jdbcType=BIGINT} and c.is_delete = 0 group by c.id order by userNumberTotal desc,c.id
</select> </select>
<select id="getBaseInfoBySpecId" resultType="ClassifyDTO" parameterType="Long"> <select id="getBaseInfoBySpecId" resultType="ClassifyDTO" parameterType="Long">
...@@ -226,7 +226,7 @@ ...@@ -226,7 +226,7 @@
from from
book_group_classify book_group_classify
where where
book_group_id = #{_parameter,jdbcType=BIGINT} and is_delete = 0 order by rank book_group_id = #{_parameter,jdbcType=BIGINT} and is_delete = 0 order by rank, id
</select> </select>
<select id="listClassifyByUser" resultType="ClassifyNameVO" parameterType="Long"> <select id="listClassifyByUser" resultType="ClassifyNameVO" parameterType="Long">
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
from from
book_group_classify c join book_group_qrcode q on c.id = q.classify_id book_group_classify c join book_group_qrcode q on c.id = q.classify_id
where where
book_group_id = #{_parameter,jdbcType=BIGINT} and c.is_delete = 0 group by c.id order by sum(user_number) desc book_group_id = #{_parameter,jdbcType=BIGINT} and c.is_delete = 0 group by c.id order by sum(user_number) desc, c.id
</select> </select>
<select id="getGroupCount" resultType="Integer" parameterType="Long"> <select id="getGroupCount" resultType="Integer" parameterType="Long">
...@@ -278,7 +278,7 @@ ...@@ -278,7 +278,7 @@
join join
book_group g book_group g
on on
c.book_group_id = g.id and c.id =#{_parameter} c.book_group_id = g.id and c.id =#{_parameter} and c.is_delete = 0
LEFT JOIN book_group_qrcode q on c.id = q.classify_id LIMIT 1 LEFT JOIN book_group_qrcode q on c.id = q.classify_id LIMIT 1
</select> </select>
...@@ -322,10 +322,10 @@ ...@@ -322,10 +322,10 @@
AND q.is_delete = 0 AND q.is_delete = 0
GROUP BY c.id GROUP BY c.id
<if test="rankType == 0"> <if test="rankType == 0">
order by sum(q.user_number) desc order by sum(q.user_number) desc, c.id
</if> </if>
<if test="rankType == 1"> <if test="rankType == 1">
order by c.rank order by c.rank asc, c.id
</if> </if>
</select> </select>
...@@ -354,15 +354,14 @@ ...@@ -354,15 +354,14 @@
book_group_classify c book_group_classify c
JOIN JOIN
book_group_qrcode g ON c.id = g.classify_id book_group_qrcode g ON c.id = g.classify_id
AND LEFT JOIN BOOK_GROUP bg on bg.id = c.book_group_id
LEFT JOIN book b ON c.book_id = b.book_id
WHERE
c.is_delete = 0 c.is_delete = 0
AND AND
g.is_delete = 0 g.is_delete = 0
AND AND
c.create_user = #{adviserId} c.create_user = #{adviserId}
LEFT JOIN BOOK_GROUP bg on bg.id = c.book_group_id
LEFT JOIN book b ON c.book_id = b.book_id
WHERE 1= 1
<if test="bookIds != null"> <if test="bookIds != null">
AND c.book_id IN AND c.book_id IN
<foreach collection = "bookIds" index="index" item = "item" open = "(" separator= "," close = ")"> <foreach collection = "bookIds" index="index" item = "item" open = "(" separator= "," close = ")">
...@@ -375,6 +374,7 @@ ...@@ -375,6 +374,7 @@
OR group_name LIKE CONCAT('%', #{name},'%') OR group_name LIKE CONCAT('%', #{name},'%')
) )
</if> </if>
order by c.id desc, g.id desc
</select> </select>
<select id="listGroupQrcode4Platform" resultType="GroupQrcodeVO" parameterType="map"> <select id="listGroupQrcode4Platform" resultType="GroupQrcodeVO" parameterType="map">
...@@ -546,14 +546,15 @@ ...@@ -546,14 +546,15 @@
<resultMap id="GroupQrcodeMap" type="GroupQrcodeBaseDTO"> <resultMap id="GroupQrcodeMap" type="GroupQrcodeBaseDTO">
<id column="weixin_group_id" property="weixinGroupId" jdbcType="VARCHAR"/> <id column="weixin_group_id" property="weixinGroupId" jdbcType="VARCHAR"/>
<result column="group_name" property="groupName" jdbcType="VARCHAR"/> <result column="group_name" property="groupName" jdbcType="VARCHAR"/>
<result column="book_name" property="bookName" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<select id="listGroupQrcodeBaseInfo" resultMap="GroupQrcodeMap" parameterType="list"> <select id="listGroupQrcodeBaseInfo" resultMap="GroupQrcodeMap" parameterType="list">
select select
weixin_group_id, group_name weixin_group_id, group_name, book_name
from from
book_group_qrcode book_group_qrcode q
where join book_group_classify c on q.classify_id = c.id
weixin_group_id in LEFT JOIN book b on c.book_id = b.BOOK_ID
<foreach collection = "list" index="index" item = "item" open = "(" separator= "," close = ")"> <foreach collection = "list" index="index" item = "item" open = "(" separator= "," close = ")">
#{item} #{item}
</foreach> </foreach>
...@@ -592,7 +593,7 @@ ...@@ -592,7 +593,7 @@
serve_type ='PRODUCT' serve_type ='PRODUCT'
AND AND
bk.set_type = 1 bk.set_type = 1
) ) and is_delete = 0
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
weixin_qrcode_id, weixin_qrcode_id,
weixin_group_id, weixin_group_id,
qrcode_url, qrcode_url,
qrcode_head_url,
user_number, user_number,
create_user, create_user,
create_time, create_time,
...@@ -45,6 +46,7 @@ ...@@ -45,6 +46,7 @@
#{weixinQrcodeId,jdbcType=BIGINT}, #{weixinQrcodeId,jdbcType=BIGINT},
#{weixinGroupId,jdbcType=BIGINT}, #{weixinGroupId,jdbcType=BIGINT},
#{qrcodeUrl,jdbcType=VARCHAR}, #{qrcodeUrl,jdbcType=VARCHAR},
#{qrcodeHeadUrl,jdbcType=VARCHAR},
#{userNumber,jdbcType=BIGINT}, #{userNumber,jdbcType=BIGINT},
#{createUser,jdbcType=BIGINT}, #{createUser,jdbcType=BIGINT},
NOW(), NOW(),
...@@ -151,8 +153,6 @@ ...@@ -151,8 +153,6 @@
id=#{_parameter} id=#{_parameter}
</select> </select>
<update id="updateUserNumber" parameterType="map"> <update id="updateUserNumber" parameterType="map">
update update
book_group_qrcode book_group_qrcode
...@@ -208,7 +208,8 @@ ...@@ -208,7 +208,8 @@
select select
id, id,
group_seq groupSeq, group_seq groupSeq,
user_number userNumber user_number userNumber,
qrcode_head_url qrcodeHeadUrl
from from
book_group_qrcode book_group_qrcode
where where
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
<if test="keywords!=null"> <if test="keywords!=null">
AND keywords like concat('%', #{keywords}, '%') AND keywords like concat('%', #{keywords}, '%')
</if> </if>
order by bk.rank order by bk.rank ASC, bk.id DESC
</select> </select>
<select id="listFiveKeyword" resultType="keywordDTO" parameterType="map"> <select id="listFiveKeyword" resultType="keywordDTO" parameterType="map">
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
AND AND
k.is_delete = 0 k.is_delete = 0
AND classify_id = #{classifyId} AND classify_id = #{classifyId}
AND book_group_id = #{bookGroupId} order by bk.rank limit 5 AND book_group_id = #{bookGroupId} order by bk.rank, bk.id desc limit 5
</select> </select>
<select id="getKeywordId" resultType="ReplyKeywordDTO" parameterType="map"> <select id="getKeywordId" resultType="ReplyKeywordDTO" parameterType="map">
......
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