Commit e30ee959 by 朱亚洁

feat:[1003936]自建码灵活配置方案

parent 27b75ceb
......@@ -749,6 +749,31 @@ public class BookDto extends BaseDto {
@ApiModelProperty("版次")
private String edition;
/**
* 小睿码跳转类型(默认进小睿小程序)
*/
private Integer jumpType;
/**
* 小睿码自定义跳转链接
*/
private String jumpUrl;
public Integer getJumpType() {
return jumpType;
}
public void setJumpType(Integer jumpType) {
this.jumpType = jumpType;
}
public String getJumpUrl() {
return jumpUrl;
}
public void setJumpUrl(String jumpUrl) {
this.jumpUrl = jumpUrl;
}
public String getEdition() {
return edition;
}
......@@ -2254,6 +2279,10 @@ public class BookDto extends BaseDto {
", desc='" + desc + '\'' +
", hasAnswer=" + hasAnswer +
", subscribeState=" + subscribeState +
", edition='" + edition + '\'' +
", jumpType=" + jumpType +
", jumpUrl='" + jumpUrl + '\'' +
", bookAdviserDto=" + bookAdviserDto +
'}';
}
}
......@@ -139,6 +139,18 @@ public class BookGroupDTO implements Serializable {
private String appletUrl;
private String appletId;
/**
* 小睿码跳转类型(默认进小睿小程序)
*/
private Integer jumpType;
public Integer getJumpType() {
return jumpType;
}
public void setJumpType(Integer jumpType) {
this.jumpType = jumpType;
}
public String getAppletId() {
return appletId;
......@@ -385,6 +397,9 @@ public class BookGroupDTO implements Serializable {
", joinGroupType=" + joinGroupType +
", sceneId=" + sceneId +
", bookName='" + bookName + '\'' +
", appletUrl='" + appletUrl + '\'' +
", appletId='" + appletId + '\'' +
", jumpType=" + jumpType +
'}';
}
}
\ No newline at end of file
package com.pcloud.book.group.enums;
/**
* 自建码跳转类型
* @author:zhuyajie
* @date:2020/12/1 15:29
* * @param null
*/
public enum QrcodeJumpType {
/**
* 进小程序-书僮小睿
*/
APPLET_XIAORUI(1, "书僮小睿"),
/**
* 进小程序-书晓
*/
APPLET_SHUXIAO(2, "书晓"),
/**
* 进h5-书僮小睿小程序码/跳转按钮
*/
H5_XIAORUI(3, "书僮小睿小程序码/跳转按钮"),
/**
* 进h5-企业微信活码
*/
H5_ENTERPRISE_WECHAT(4,"企业微信活码"),
/**
* 进h5-出版社公众号二维码
*/
H5_OFFICIAL_ACCOUNTS(5,"出版社公众号二维码"),
/**
* 进h5-自定义链接
*/
H5_SELF_URL(6,"自定义链接");
private final Integer code;
private final String name;
public Integer getCode() {
return code;
}
public String getName() {
return name;
}
private QrcodeJumpType(Integer code, String name) {
this.code = code;
this.name = name;
}
public static final Integer[] XIAORUI_JUMP_TYPES = {APPLET_XIAORUI.code, H5_XIAORUI.code};
}
......@@ -242,4 +242,8 @@ public interface BookGroupService {
@ApiOperation("体验网站获取出版社下小睿社群码")
@GetMapping("getRayGroupQrcode4Website")
ResponseEntity<ResponseDto<String>>getRayGroupQrcode4Website(@RequestParam(value = "agentId", required = false) Long agentId);
@ApiOperation("获取社群书信息-渠道用")
@GetMapping("getBookNameByBookGroupId4Channel")
ResponseEntity<ResponseDto<Map<String, Object>>> getBookNameByBookGroupId4Channel(@RequestParam("bookGroupId") Long bookGroupId);
}
......@@ -327,7 +327,7 @@ public class BookAppealBizImpl implements BookAppealBiz {
// 社群书申诉创建社群码
if (null != bookAppealDto && bookAppealDto.getIsBookGroup()) {
bookGroupBiz.recoverByBookId(bookId, channelId, appealAdviserId);
bookGroupBiz.getBookGroupInfoByBookId(bookId, channelId, appealAdviserId, bookAppealDto.getAddType(), null, null);
bookGroupBiz.getBookGroupInfoByBookId(bookId, channelId, appealAdviserId, bookAppealDto.getAddType(), null, null, null,null);
}
// 修改申诉状态
this.updateAppealState(auditUser, bookMainAdviserDto.getAppealState(), bookMainAdviserDto.getVersion(),
......
......@@ -2530,11 +2530,12 @@ public class BookBizImpl implements BookBiz {
appletId = createOneAppletId();
applet = bookAppletSceneDao.getByAppletId(appletId);
}
String url = wechatConsr.create4MiniApp(accoutnSettingId, appletId, null, page);
//直接跳小程序,不创建小程序码
// String url = wechatConsr.create4MiniApp(accoutnSettingId, appletId, null, page);
BookAppletScene bookAppletScene = new BookAppletScene();
bookAppletScene.setRaysClassifyId(raysClassifyId);
bookAppletScene.setAppletId(appletId);
bookAppletScene.setAppletUrl(url);
bookAppletScene.setAppletUrl(null);
bookAppletScene.setSceneId(sceneId);
bookAppletScene.setAccountSettingId(accoutnSettingId);
list.add(bookAppletScene);
......@@ -2715,7 +2716,7 @@ public class BookBizImpl implements BookBiz {
if(null != bookAdviserErp.getIsOpenRobotProcess() && bookAdviserErp.getIsOpenRobotProcess() == 1){
// 小睿书
BookGroupDTO bookGroupDTO = bookGroupBiz.getBookGroupInfoByBookId(book.getBookId(), book.getChannelId(), book.getCreatedUser(), null, null, 4);
BookGroupDTO bookGroupDTO = bookGroupBiz.getBookGroupInfoByBookId(book.getBookId(), book.getChannelId(), book.getCreatedUser(), null, null, 4, null,null);
BookGroup bookGroup = new BookGroup();
bookGroup.setId(bookGroupDTO.getId());
bookGroup.setAddFriendGuide("嗨,你好!我是您的专属学习助手。我会根据您的需求量身定制学习计划与学习内容,提高您的学习效率,提升您的语文学习能力");
......@@ -2805,7 +2806,7 @@ public class BookBizImpl implements BookBiz {
// 正常创建二维码
if(book.getIsBookGroup()){
// 小睿二维码
BookGroupDTO bookGroupDTO = bookGroupBiz.getBookGroupInfoByBookId(book.getBookId(), book.getChannelId(), book.getCreatedUser(), null, null, 4);
BookGroupDTO bookGroupDTO = bookGroupBiz.getBookGroupInfoByBookId(book.getBookId(), book.getChannelId(), book.getCreatedUser(), null, null, 4,null,null);
BookGroup bookGroup = new BookGroup();
bookGroup.setId(bookGroupDTO.getId());
......@@ -3659,7 +3660,7 @@ public class BookBizImpl implements BookBiz {
if (book.getIsBookGroup() != null && book.getIsBookGroup()) {
// 自动创建二维码
// 小睿二维码
BookGroupDTO bookGroupDTO = bookGroupBiz.getBookGroupInfoByBookId(book.getBookId(), book.getChannelId(), book.getCreatedUser(), null, null, 4);
BookGroupDTO bookGroupDTO = bookGroupBiz.getBookGroupInfoByBookId(book.getBookId(), book.getChannelId(), book.getCreatedUser(), null, null, 4,null,null);
BookGroup bookGroup = new BookGroup();
bookGroup.setId(bookGroupDTO.getId());
......
......@@ -91,7 +91,8 @@ public interface BookGroupBiz {
* @param adviserId 编辑ID
* @throws BizException
*/
BookGroup createBookGroupAfterCreateBook(Long bookId, Long channelId, Long adviserId, Integer addType, Long sceneId, Integer joinGroupType) throws BizException;
BookGroup createBookGroupAfterCreateBook(Long bookId, Long channelId, Long adviserId, Integer addType, Long sceneId, Integer joinGroupType,
Integer jumpType, String jumpUrl) throws BizException;
/**
* 获取社群书群二维码信息
......@@ -138,7 +139,8 @@ public interface BookGroupBiz {
* @return
* @throws BizException
*/
BookGroupDTO getBookGroupInfoByBookId(Long bookId, Long channelId, Long adviserId, Integer addType, Long sceneId, Integer joinGroupType) throws BizException;
BookGroupDTO getBookGroupInfoByBookId(Long bookId, Long channelId, Long adviserId, Integer addType, Long sceneId, Integer joinGroupType,
Integer jumpType, String jumpUrl) throws BizException;
/**
* 更新群二维码信息
......
......@@ -301,6 +301,30 @@ public class BookGroupDTO extends BaseDto {
// 读者量、扫码人数
private Integer userCount;
/**
* 小睿码跳转类型(默认进小睿小程序)
*/
private Integer jumpType;
/**
* 小睿码自定义跳转链接
*/
private String jumpUrl;
public Integer getJumpType() {
return jumpType;
}
public void setJumpType(Integer jumpType) {
this.jumpType = jumpType;
}
public String getJumpUrl() {
return jumpUrl;
}
public void setJumpUrl(String jumpUrl) {
this.jumpUrl = jumpUrl;
}
/**
* 社群码样式
......@@ -934,8 +958,23 @@ public class BookGroupDTO extends BaseDto {
", areaLabelName='" + areaLabelName + '\'' +
", friendGuideList=" + friendGuideList +
", appletUrl='" + appletUrl + '\'' +
", singleGroup=" + singleGroup +
", relatedBookGroupId=" + relatedBookGroupId +
", groupQrcodeLink='" + groupQrcodeLink + '\'' +
", groupQrcodePageNum=" + groupQrcodePageNum +
", groupQrcodeLocationId=" + groupQrcodeLocationId +
", groupQrcodeRemark='" + groupQrcodeRemark + '\'' +
", locationName='" + locationName + '\'' +
", qrcodeType='" + qrcodeType + '\'' +
", scanCount=" + scanCount +
", userCount=" + userCount +
", jumpType=" + jumpType +
", jumpUrl='" + jumpUrl + '\'' +
", openWeapp=" + openWeapp +
", adviserId=" + adviserId +
", adviserPhone='" + adviserPhone + '\'' +
", bookAdviserId=" + bookAdviserId +
", appletId='" + appletId + '\'' +
'}';
}
}
......@@ -184,6 +184,30 @@ public class BookGroup extends BaseEntity {
* 社群码链接
*/
private String groupQrcodeLink;
/**
* 小睿码跳转类型(默认进小睿小程序)
*/
private Integer jumpType;
/**
* 小睿码自定义跳转链接
*/
private String jumpUrl;
public Integer getJumpType() {
return jumpType;
}
public void setJumpType(Integer jumpType) {
this.jumpType = jumpType;
}
public String getJumpUrl() {
return jumpUrl;
}
public void setJumpUrl(String jumpUrl) {
this.jumpUrl = jumpUrl;
}
/**
* 社群码样式
......@@ -530,6 +554,8 @@ public class BookGroup extends BaseEntity {
", groupQrcodeLocationId=" + groupQrcodeLocationId +
", groupQrcodeRemark='" + groupQrcodeRemark + '\'' +
", groupQrcodeLink='" + groupQrcodeLink + '\'' +
", jumpType=" + jumpType +
", jumpUrl='" + jumpUrl + '\'' +
'}';
}
}
\ No newline at end of file
......@@ -88,10 +88,16 @@ public interface BookGroupFacade {
@ApiImplicitParam(name = "channelId", value = "运营ID", dataType = "long", paramType = "query")
})
@RequestMapping(value = "getBookGroupInfoByBookId", method = RequestMethod.GET)
ResponseDto<?> getBookGroupInfoByBookId(@RequestHeader("token") String token, @RequestParam(value = "bookId", required = false) Long bookId,
ResponseDto<?> getBookGroupInfoByBookId(
@RequestHeader("token") String token,
@RequestParam(value = "bookId", required = false) Long bookId,
@RequestParam(value = "channelId", required = false) Long channelId,
@RequestParam(value = "addType", required = false) Integer addType, @RequestParam(value = "sceneId", required = false) Long sceneId,
@RequestParam(value = "joinGroupType", required = false) Integer joinGroupType) throws BizException, PermissionException, JsonParseException;
@RequestParam(value = "addType", required = false) Integer addType,
@RequestParam(value = "sceneId", required = false) Long sceneId,
@RequestParam(value = "joinGroupType", required = false) Integer joinGroupType,
@RequestParam(value = "jumpType", required = false) Integer jumpType,
@RequestParam(value = "jumpUrl", required = false) String jumpUrl
) throws BizException, PermissionException, JsonParseException;
@ApiOperation(value = "是否有社群码", httpMethod = "GET")
@ApiImplicitParams({
......
......@@ -152,7 +152,9 @@ public class BookGroupFacadeImpl implements BookGroupFacade {
@RequestParam(value = "channelId", required = false) Long channelId,
@RequestParam(value = "addType", required = false) Integer addType,
@RequestParam(value = "sceneId", required = false) Long sceneId,
@RequestParam(value = "joinGroupType", required = false) Integer joinGroupType
@RequestParam(value = "joinGroupType", required = false) Integer joinGroupType,
@RequestParam(value = "jumpType", required = false) Integer jumpType,
@RequestParam(value = "jumpUrl", required = false) String jumpUrl
) throws BizException, PermissionException, JsonParseException {
if (null == bookId || null == channelId) {
throw new BookBizException(BookBizException.PARAM_IS_NULL, "参数有误!");
......@@ -161,7 +163,7 @@ public class BookGroupFacadeImpl implements BookGroupFacade {
return new ResponseDto<>();
}
Long adviserId = (Long) SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
return new ResponseDto<>(bookGroupBiz.getBookGroupInfoByBookId(bookId, channelId, adviserId, addType, sceneId, joinGroupType));
return new ResponseDto<>(bookGroupBiz.getBookGroupInfoByBookId(bookId, channelId, adviserId, addType, sceneId, joinGroupType, jumpType, jumpUrl));
}
/**
......
......@@ -423,4 +423,10 @@ public class BookGroupServiceImpl implements BookGroupService {
BookGroupDTO bookGroupDTO = bookGroupBiz.getMaxScanCountBookGroup(agentId, JoinGroupTypeEnum.XIAORUI.getCode());
return ResponseHandleUtil.toResponse(bookGroupDTO==null?"":bookGroupDTO.getGroupQrcodeUrl());
}
@Override
@GetMapping("getBookNameByBookGroupId4Channel")
public ResponseEntity<ResponseDto<Map<String, Object>>> getBookNameByBookGroupId4Channel(@RequestParam("bookGroupId") Long bookGroupId){
return ResponseHandleUtil.toResponse(bookGroupBiz.getBookNameByBookGroupId(bookGroupId));
}
}
......@@ -638,7 +638,8 @@
WHEN 3 THEN srk.id
WHEN 4 THEN bgs.id
else null END,0)=0,0,1)as has_serve, A.IS_PRINT isPrint, G.open_weapp openWeapp,
G.single_group singleGroup, G.related_book_group_id relatedBookGroupId, G.group_qrcode_link groupQrcodeLink
G.single_group singleGroup, G.related_book_group_id relatedBookGroupId, G.group_qrcode_link groupQrcodeLink,
G.jump_type jumpType, G.jump_url jumpUrl
FROM
book_group G
LEFT JOIN BOOK_ADVISER A ON G.BOOK_ID = A.BOOK_ID AND G.CHANNEL_ID = A.CHANNEL_ID AND G.CREATE_USER = A.ADVISER_ID
......
......@@ -37,6 +37,8 @@
<result column="group_qrcode_remark" property="groupQrcodeRemark" jdbcType="VARCHAR"/>
<result column="group_qrcode_link" property="groupQrcodeLink" jdbcType="VARCHAR"/>
<result column="back_ground_type" property="backgroundType" jdbcType="INTEGER" />
<result column="jump_type" property="jumpType" jdbcType="INTEGER"/>
<result column="jump_url" property="jumpUrl" jdbcType="VARCHAR"/>
</resultMap>
<resultMap id="BookGroupDTO" type="com.pcloud.book.group.dto.BookGroupDTO">
......@@ -80,6 +82,8 @@
<result column="group_qrcode_remark" property="groupQrcodeRemark" jdbcType="VARCHAR"/>
<result column="group_qrcode_link" property="groupQrcodeLink" jdbcType="VARCHAR"/>
<result column="back_ground_type" property="backgroundType" jdbcType="INTEGER" />
<result column="jump_type" property="jumpType" jdbcType="INTEGER"/>
<result column="jump_url" property="jumpUrl" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
......@@ -89,7 +93,7 @@
update_time, is_delete, is_show_book_name,join_group_type,add_friend_guide,customer_service_name,
is_invite_group,book_group_cipher, last_push_update_time, is_some_update, agent_id, belong_special_agent,
short_book_name, open_weapp, single_group, related_book_group_id,group_qrcode_page_num,group_qrcode_location_id,group_qrcode_remark,
group_qrcode_link,back_ground_type
group_qrcode_link,back_ground_type, jump_type, jump_url
</sql>
<select id="getById" resultMap="BaseResultMap" parameterType="java.lang.Long">
......@@ -269,6 +273,8 @@
is_some_update,
agent_id,
group_qrcode_link,
jump_type,
jump_url,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{bookId,jdbcType=BIGINT},
......@@ -295,6 +301,8 @@
#{isSomeUpdate,jdbcType=BOOLEAN},
#{agentId,jdbcType=BIGINT},
#{groupQrcodeLink},
#{jumpType},
#{jumpUrl},
</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