Commit 920eef38 by 阮思源

Merge branch 'feat-1002558' into 'master'

【1002558】定制服务新增个人号分类和标题模板

See merge request rays/pcloud-book!541
parents 3c41e6fe 69c2fdd9
......@@ -2,6 +2,8 @@ package com.pcloud.book.custom.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
......@@ -43,4 +45,10 @@ public class CustomPlan {
private Integer suggestionCount;
private String confirmFeedbackReply;
@ApiModelProperty("个人号类型")
private Integer robotType;
@ApiModelProperty("个人号类型名称")
private String robotTypeName;
}
\ No newline at end of file
......@@ -46,4 +46,8 @@ public class CustomPlanModule {
private Date updateTime;
private Integer openFeedback;
private String bookName;
private Integer readType;
}
\ No newline at end of file
......@@ -21,7 +21,15 @@ public enum PlanModuleTypeEnum {
/**
* 应用作品模块
*/
APP(5);
APP(5),
/**
* 顶部模块
*/
TOP(6),
/**
* 底部模块
*/
BOTTOM(7);
public final Integer value;
......
......@@ -44,4 +44,8 @@ public class CustomPlanModuleVO {
private List<CustomPlanModuleVO> customPlanModuleVOList;
private Integer openFeedback;
private String bookName;
private Integer readType;
}
\ No newline at end of file
......@@ -22,4 +22,8 @@ public class PcloudRobotClassifyResponseVO {
private Integer seqNum;
private String miniAppQr;
private String planTopPic;
private String planBottomPic;
}
......@@ -19,12 +19,13 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="suggestion_count" jdbcType="INTEGER" property="suggestionCount" />
<result column="confirm_feedback_reply" jdbcType="VARCHAR" property="confirmFeedbackReply" />
<result column="robot_type" jdbcType="TINYINT" property="robotType" />
</resultMap>
<sql id="Base_Column_List">
id, plan_number, plan_name, create_user_name, description, open_feedback, paper_id,
paper_title, paper_desc, use_state, pdf_url, h5_url, preview_qrcode_url, create_time,
update_time, confirm_feedback_reply
update_time, confirm_feedback_reply,robot_type
</sql>
<insert id="insert" parameterType="CustomPlan" useGeneratedKeys="true" keyProperty="id">
......@@ -32,12 +33,12 @@
description, open_feedback, paper_id,
paper_title, paper_desc, use_state,
pdf_url, h5_url, preview_qrcode_url,
create_time, update_time, confirm_feedback_reply)
create_time, update_time, confirm_feedback_reply,robot_type)
values (#{planNumber,jdbcType=VARCHAR}, #{planName,jdbcType=VARCHAR}, #{createUserName,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR}, #{openFeedback,jdbcType=INTEGER}, #{paperId,jdbcType=INTEGER},
#{paperTitle,jdbcType=VARCHAR}, #{paperDesc,jdbcType=VARCHAR}, #{useState,jdbcType=INTEGER},
#{pdfUrl,jdbcType=VARCHAR}, #{h5Url,jdbcType=VARCHAR}, #{previewQrcodeUrl,jdbcType=VARCHAR},
NOW(), NOW(), #{confirmFeedbackReply})
NOW(), NOW(), #{confirmFeedbackReply},#{robotType})
</insert>
<update id="update" parameterType="CustomPlan">
......@@ -79,6 +80,9 @@
<if test="previewQrcodeUrl != null">
preview_qrcode_url = #{previewQrcodeUrl,jdbcType=VARCHAR},
</if>
<if test="robotType != null">
robot_type = #{robotType},
</if>
update_time = NOW(),confirm_feedback_reply = #{confirmFeedbackReply}
</set>
where id = #{id,jdbcType=INTEGER}
......@@ -117,9 +121,11 @@
<select id="listCustomPlanByPage" resultMap="BaseResultMap">
select
a.id, plan_number, plan_name, create_user_name, description, a.open_feedback,
use_state, pdf_url, h5_url, preview_qrcode_url, a.create_time, COUNT(DISTINCT b.batch_id) suggestion_count
use_state, pdf_url, h5_url, preview_qrcode_url, a.create_time, COUNT(DISTINCT b.batch_id) suggestion_count,
a.robot_type,t.classify_name robotTypeName
from custom_plan a left join custom_plan_module_suggestion b
on a.id = b.plan_id
left join pcloud_robot_classify t on a.robot_type = t.id
where 1= 1
<if test="content != null">
and (plan_number like concat('%', #{content}, '%')
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pcloud.book.custom.mapper.CustomPlanModuleMapper" >
<resultMap id="BaseResultMap" type="CustomPlanModuleVO" >
<resultMap id="BaseResultMap" type="com.pcloud.book.custom.vo.CustomPlanModuleVO" >
<id column="id" jdbcType="INTEGER" property="id" />
<result column="plan_id" jdbcType="INTEGER" property="planId" />
<result column="parent_id" jdbcType="INTEGER" property="parentId" />
......@@ -19,6 +19,8 @@
<result column="product_unique_number" jdbcType="VARCHAR" property="productUniqueNumber" />
<result column="link_url" jdbcType="VARCHAR" property="linkUrl" />
<result column="open_feedback" jdbcType="INTEGER" property="openFeedback" />
<result column="book_name" jdbcType="VARCHAR" property="bookName" />
<result column="read_type" jdbcType="INTEGER" property="readType" />
</resultMap>
<sql id="Base_Column_List">
......@@ -31,12 +33,12 @@
type_name, title, content,
skill_id, skill_cover, app_id, agent_name,
product_id, merchant_name, product_unique_number, link_url, create_time,
update_time, open_feedback)
update_time, open_feedback, book_name, read_type)
values (#{planId,jdbcType=INTEGER}, #{parentId,jdbcType=INTEGER}, #{moduleType,jdbcType=INTEGER}, #{picUrl,jdbcType=VARCHAR},
#{typeName,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR},
#{skillId,jdbcType=INTEGER}, #{skillCover,jdbcType=VARCHAR}, #{appId,jdbcType=BIGINT}, #{agentName,jdbcType=VARCHAR},
#{productId,jdbcType=BIGINT}, #{merchantName,jdbcType=VARCHAR}, #{productUniqueNumber,jdbcType=VARCHAR}, #{linkUrl,jdbcType=VARCHAR},
NOW(), NOW(), #{openFeedback})
NOW(), NOW(), #{openFeedback}, #{bookName}, #{readType})
</insert>
<update id="update" parameterType="CustomPlanModule">
......@@ -75,6 +77,12 @@
<if test="linkUrl != null">
link_url = #{linkUrl,jdbcType=VARCHAR},
</if>
<if test="bookName != null">
book_name = #{bookName,jdbcType=VARCHAR},
</if>
<if test="readType != null">
read_type = #{readType,jdbcType=INTEGER},
</if>
update_time = NOW(),
</set>
where id = #{id,jdbcType=INTEGER}
......
......@@ -64,7 +64,9 @@
<select id="listAllRobotClassify" resultType="com.pcloud.book.pcloudkeyword.facade.response.PcloudRobotClassifyResponseVO">
select
id, classify_name as classifyName
id, classify_name as classifyName,
plan_top_pic planTopPic,
plan_bottom_pic planBottomPic
from pcloud_robot_classify where is_delete = 0
order by seq_num
</select>
......
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