Commit 995efca0 by 阮思源

修改下

parent daeb1d83
......@@ -30,6 +30,7 @@ import com.pcloud.book.group.entity.GroupQrcode;
import com.pcloud.book.group.entity.JoinGroupCipher;
import com.pcloud.book.group.entity.TempletRelevance;
import com.pcloud.book.group.enums.CipherTypeEnum;
import com.pcloud.book.group.enums.JoinGroupTypeEnum;
import com.pcloud.book.group.enums.LargTempletEnum;
import com.pcloud.book.group.vo.StatisticVO;
import com.pcloud.book.group.biz.GroupQrcodeBiz;
......@@ -453,7 +454,18 @@ public class BookGroupBizImpl implements BookGroupBiz {
@Transactional(rollbackFor = Exception.class)
public void updateBookGroup(BookGroup bookGroup) throws BizException {
if (null == bookGroup.getId() || StringUtil.isEmpty(bookGroup.getGroupQrcodeName()) || null == bookGroup.getProLabelId()
|| null == bookGroup.getDepLabelId() || null == bookGroup.getPurLabelId() ) {
|| null == bookGroup.getDepLabelId() || null == bookGroup.getPurLabelId() || bookGroup.getJoinGroupType() == null) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "参数有误!");
}
if (JoinGroupTypeEnum.GROUP_QRCODE.code.equals(bookGroup.getJoinGroupType())
&& (StringUtil.isEmpty(bookGroup.getJoinTitle())
|| StringUtil.isEmpty(bookGroup.getJoinSlogan()))) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "参数有误!");
}
if (JoinGroupTypeEnum.ROBOT.code.equals(bookGroup.getJoinGroupType())
&& (bookGroup.getIsInviteGroup() == null
|| StringUtil.isEmpty(bookGroup.getAddFriendGuide())
|| StringUtil.isEmpty(bookGroup.getCustomerServiceName()))) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "参数有误!");
}
if (bookGroup.getGroupQrcodeName().contains("#")){
......
......@@ -22,6 +22,9 @@ public class BookGroupCipherUser extends BaseEntity {
@ApiModelProperty("用户微信id")
private String wxUserId;
@ApiModelProperty("机器人id")
private String altId;
public Long getBookGroupId() {
return bookGroupId;
}
......@@ -46,12 +49,21 @@ public class BookGroupCipherUser extends BaseEntity {
this.wxUserId = wxUserId;
}
public String getAltId() {
return altId;
}
public void setAltId(String altId) {
this.altId = altId;
}
@Override
public String toString() {
return "BookGroupCipherUser{" +
"bookGroupId=" + bookGroupId +
", bookGroupCipher='" + bookGroupCipher + '\'' +
", wxUserId='" + wxUserId + '\'' +
", altId='" + altId + '\'' +
"} " + super.toString();
}
}
package com.pcloud.book.group.enums;
/**
* @Description
* @Author ruansiyuan
* @Date 2019/9/25 15:05
**/
public enum JoinGroupTypeEnum {
/**
* 群二维码
*/
GROUP_QRCODE(1, "群二维码"),
/**
* 客服机器人
*/
ROBOT(2, "客服机器人");
public final Integer code;
public final String name;
JoinGroupTypeEnum(Integer code, String name) {
this.code = code;
this.name = name;
}
}
......@@ -627,6 +627,7 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
bookGroupCipherUser.setBookGroupCipher(sendTextDTO.getTextContent());
bookGroupCipherUser.setBookGroupId(bookGroupId);
bookGroupCipherUser.setWxUserId(sendTextDTO.getWechatUserId());
bookGroupCipherUser.setAltId(sendTextDTO.getWxId());
//新增暗号对应记录
bookGroupCipherUserDao.insert(bookGroupCipherUser);
BookGroupDTO bookGroupDTO = bookGroupDao.getBookBaseInfoById(bookGroupId);
......
......@@ -6,12 +6,13 @@
<result column="book_group_id" property="bookGroupId" jdbcType="BIGINT"/>
<result column="book_group_cipher" property="bookGroupCipher" jdbcType="VARCHAR"/>
<result column="wx_user_id" property="wxUserId" jdbcType="VARCHAR"/>
<result column="alt_id" property="altId" jdbcType="VARCHAR"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id, book_group_id, book_group_cipher, wx_user_id, create_time
id, book_group_id, book_group_cipher, wx_user_id, alt_id, create_time
</sql>
<insert id="insert" parameterType="com.pcloud.book.group.entity.BookGroupCipherUser" useGeneratedKeys="true"
......@@ -21,12 +22,14 @@
book_group_id,
book_group_cipher,
wx_user_id,
alt_id,
create_time
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{bookGroupId,jdbcType=BIGINT},
#{bookGroupCipher,jdbcType=VARCHAR},
#{wxUserId,jdbcType=VARCHAR},
#{altId,jdbcType=VARCHAR},
NOW()
</trim>
</insert>
......
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