Commit f34e3470 authored by 廖旭伟's avatar 廖旭伟

客户作品增加草稿内容

parent e006b558
...@@ -4485,6 +4485,7 @@ data|object|数据对象 ...@@ -4485,6 +4485,7 @@ data|object|数据对象
  pictureBackgroundIds|String|模版引用的背景   pictureBackgroundIds|String|模版引用的背景
  fontIds|String|作品引用的字体   fontIds|String|作品引用的字体
  previewUrl|String|图片预览地址(相对地址)   previewUrl|String|图片预览地址(相对地址)
  draft|String|草稿内容
dict|object|字典对象 dict|object|字典对象
...@@ -4520,6 +4521,7 @@ pictureSrcIds|String|是|模版引用的素材 ...@@ -4520,6 +4521,7 @@ pictureSrcIds|String|是|模版引用的素材
pictureBackgroundIds|String|是|模版引用的背景 pictureBackgroundIds|String|是|模版引用的背景
fontIds|String|是|作品引用的字体 fontIds|String|是|作品引用的字体
previewUrl|String|是|图片预览地址(相对地址) previewUrl|String|是|图片预览地址(相对地址)
draft|String|是|草稿内容
**请求样例:** **请求样例:**
``` ```
...@@ -4532,7 +4534,8 @@ previewUrl|String|是|图片预览地址(相对地址) ...@@ -4532,7 +4534,8 @@ previewUrl|String|是|图片预览地址(相对地址)
"pictureSrcIds":"ykn50w", "pictureSrcIds":"ykn50w",
"pictureBackgroundIds":"ad0eh7", "pictureBackgroundIds":"ad0eh7",
"fontIds":"f3bacv", "fontIds":"f3bacv",
"previewUrl":"f3bacv" "previewUrl":"f3bacv",
"draft":"f3bacv"
} }
``` ```
...@@ -4557,6 +4560,7 @@ data|object|数据对象 ...@@ -4557,6 +4560,7 @@ data|object|数据对象
  pictureBackgroundIds|String|模版引用的背景   pictureBackgroundIds|String|模版引用的背景
  fontIds|String|作品引用的字体   fontIds|String|作品引用的字体
  previewUrl|String|图片预览地址(相对地址)   previewUrl|String|图片预览地址(相对地址)
  draft|String|草稿内容
**响应消息样例:** **响应消息样例:**
``` ```
......
...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.customer.model.vo.CustomerWorkDesignVo; ...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.customer.model.vo.CustomerWorkDesignVo;
* 客户作品信息实体对象 * 客户作品信息实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-07-01 * @date 2022-07-08
*/ */
public class CustomerWorkDesignEntity extends CustomerWorkDesignVo { public class CustomerWorkDesignEntity extends CustomerWorkDesignVo {
...@@ -52,6 +52,10 @@ public class CustomerWorkDesignEntity extends CustomerWorkDesignVo { ...@@ -52,6 +52,10 @@ public class CustomerWorkDesignEntity extends CustomerWorkDesignVo {
* 作品图片预览地址(相对地址) * 作品图片预览地址(相对地址)
*/ */
private String previewUrl; private String previewUrl;
/**
* 设计草稿
*/
private String draft;
...@@ -182,6 +186,20 @@ public class CustomerWorkDesignEntity extends CustomerWorkDesignVo { ...@@ -182,6 +186,20 @@ public class CustomerWorkDesignEntity extends CustomerWorkDesignVo {
public void setPreviewUrl(String previewUrl){ public void setPreviewUrl(String previewUrl){
this.previewUrl = previewUrl; this.previewUrl = previewUrl;
} }
/**
* 获取 设计草稿
* @return String
*/
public String getDraft(){
return draft;
}
/**
* 设置 设计草稿
* @param draft
*/
public void setDraft(String draft){
this.draft = draft;
}
...@@ -213,6 +231,7 @@ public class CustomerWorkDesignEntity extends CustomerWorkDesignVo { ...@@ -213,6 +231,7 @@ public class CustomerWorkDesignEntity extends CustomerWorkDesignVo {
sb.append(",pictureBackgroundIds:").append(getPictureBackgroundIds()); sb.append(",pictureBackgroundIds:").append(getPictureBackgroundIds());
sb.append(",fontIds:").append(getFontIds()); sb.append(",fontIds:").append(getFontIds());
sb.append(",previewUrl:").append(getPreviewUrl()); sb.append(",previewUrl:").append(getPreviewUrl());
sb.append(",draft:").append(getDraft());
return sb.toString(); return sb.toString();
} }
...@@ -235,5 +254,7 @@ public class CustomerWorkDesignEntity extends CustomerWorkDesignVo { ...@@ -235,5 +254,7 @@ public class CustomerWorkDesignEntity extends CustomerWorkDesignVo {
this.fontIds = ""; this.fontIds = "";
this.previewUrl = ""; this.previewUrl = "";
this.draft = "";
} }
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.customer.model.CustomerWorkDesignEntity; ...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.customer.model.CustomerWorkDesignEntity;
* 客户作品信息查询对象 * 客户作品信息查询对象
* *
* @author zxfei * @author zxfei
* @date 2022-07-01 * @date 2022-07-08
*/ */
public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity { public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
/** 开始 主键ID,主键,自增长 */ /** 开始 主键ID,主键,自增长 */
...@@ -78,6 +78,9 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity { ...@@ -78,6 +78,9 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
/** 作品图片预览地址(相对地址) */ /** 作品图片预览地址(相对地址) */
private List<String> previewUrlList; private List<String> previewUrlList;
/** 设计草稿 */
private List<String> draftList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<CustomerWorkDesignQuery> orConditionList; private List<CustomerWorkDesignQuery> orConditionList;
...@@ -447,6 +450,21 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity { ...@@ -447,6 +450,21 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
public void setPreviewUrlList(List<String> previewUrlList){ public void setPreviewUrlList(List<String> previewUrlList){
this.previewUrlList = previewUrlList; this.previewUrlList = previewUrlList;
} }
/**
* 获取 设计草稿
* @return draftList
*/
public List<String> getDraftList(){
return this.draftList;
}
/**
* 设置 设计草稿
* @param draftList
*/
public void setDraftList(List<String> draftList){
this.draftList = draftList;
}
/** /**
* 设置 主键ID,主键,自增长 * 设置 主键ID,主键,自增长
* @param id * @param id
...@@ -717,6 +735,25 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity { ...@@ -717,6 +735,25 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
return this; return this;
} }
/**
* 设置 设计草稿
* @param draft
*/
public CustomerWorkDesignQuery draft(String draft){
setDraft(draft);
return this;
}
/**
* 设置 设计草稿
* @param draftList
*/
public CustomerWorkDesignQuery draftList(List<String> draftList){
this.draftList = draftList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
<result property="pictureBackgroundIds" column="pictureBackgroundIds" /> <result property="pictureBackgroundIds" column="pictureBackgroundIds" />
<result property="fontIds" column="fontIds" /> <result property="fontIds" column="fontIds" />
<result property="previewUrl" column="previewUrl" /> <result property="previewUrl" column="previewUrl" />
<result property="draft" column="draft" />
</resultMap> </resultMap>
...@@ -60,23 +61,26 @@ ...@@ -60,23 +61,26 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('previewUrl') or colPickMode == 1 and data.containsKey('previewUrl')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('previewUrl') or colPickMode == 1 and data.containsKey('previewUrl')))">
a.previewUrl, a.previewUrl,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('draft') or colPickMode == 1 and data.containsKey('draft')))">
a.draft,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="CustomerWorkDesignEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="CustomerWorkDesignEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_customer_work_design insert into mortals_xhx_customer_work_design
(customerId,workDesignName,workDesignStatus,workDesignDesc,createTime,updateTime,pictureIds,pictureSrcIds,pictureBackgroundIds,fontIds,previewUrl) (customerId,workDesignName,workDesignStatus,workDesignDesc,createTime,updateTime,pictureIds,pictureSrcIds,pictureBackgroundIds,fontIds,previewUrl,draft)
VALUES VALUES
(#{customerId},#{workDesignName},#{workDesignStatus},#{workDesignDesc},#{createTime},#{updateTime},#{pictureIds},#{pictureSrcIds},#{pictureBackgroundIds},#{fontIds},#{previewUrl}) (#{customerId},#{workDesignName},#{workDesignStatus},#{workDesignDesc},#{createTime},#{updateTime},#{pictureIds},#{pictureSrcIds},#{pictureBackgroundIds},#{fontIds},#{previewUrl},#{draft})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_customer_work_design insert into mortals_xhx_customer_work_design
(customerId,workDesignName,workDesignStatus,workDesignDesc,createTime,updateTime,pictureIds,pictureSrcIds,pictureBackgroundIds,fontIds,previewUrl) (customerId,workDesignName,workDesignStatus,workDesignDesc,createTime,updateTime,pictureIds,pictureSrcIds,pictureBackgroundIds,fontIds,previewUrl,draft)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.customerId},#{item.workDesignName},#{item.workDesignStatus},#{item.workDesignDesc},#{item.createTime},#{item.updateTime},#{item.pictureIds},#{item.pictureSrcIds},#{item.pictureBackgroundIds},#{item.fontIds},#{item.previewUrl}) (#{item.customerId},#{item.workDesignName},#{item.workDesignStatus},#{item.workDesignDesc},#{item.createTime},#{item.updateTime},#{item.pictureIds},#{item.pictureSrcIds},#{item.pictureBackgroundIds},#{item.fontIds},#{item.previewUrl},#{item.draft})
</foreach> </foreach>
</insert> </insert>
...@@ -125,6 +129,9 @@ ...@@ -125,6 +129,9 @@
<if test="(colPickMode==0 and data.containsKey('previewUrl')) or (colPickMode==1 and !data.containsKey('previewUrl'))"> <if test="(colPickMode==0 and data.containsKey('previewUrl')) or (colPickMode==1 and !data.containsKey('previewUrl'))">
a.previewUrl=#{data.previewUrl}, a.previewUrl=#{data.previewUrl},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('draft')) or (colPickMode==1 and !data.containsKey('draft'))">
a.draft=#{data.draft},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -224,6 +231,13 @@ ...@@ -224,6 +231,13 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="draft=(case" suffix="ELSE draft end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('draft')) or (colPickMode==1 and !item.containsKey('draft'))">
when a.id=#{item.id} then #{item.draft}
</if>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -523,6 +537,21 @@ ...@@ -523,6 +537,21 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('draft')">
<if test="conditionParamRef.draft != null and conditionParamRef.draft != ''">
${_conditionType_} a.draft like #{${_conditionParam_}.draft}
</if>
<if test="conditionParamRef.draft == null">
${_conditionType_} a.draft is null
</if>
</if>
<if test="conditionParamRef.containsKey('draftList')">
${_conditionType_} a.draft in
<foreach collection="conditionParamRef.draftList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -596,6 +625,11 @@ ...@@ -596,6 +625,11 @@
<if test='orderCol.previewUrl != null and "DESC".equalsIgnoreCase(orderCol.previewUrl)'>DESC</if> <if test='orderCol.previewUrl != null and "DESC".equalsIgnoreCase(orderCol.previewUrl)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('draft')">
a.draft
<if test='orderCol.draft != null and "DESC".equalsIgnoreCase(orderCol.draft)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
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