@@ -82,8 +82,17 @@ public class MaterialMouldController extends BaseController { | |||||
if(record.getType() == null){ | if(record.getType() == null){ | ||||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"类型为空"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"类型为空"); | ||||
} | } | ||||
if(EnumMouldPatchType.background_mould.getCode().equals(record.getType())){ | |||||
if(record.getVideoType() == null){ | |||||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"视频类型为空"); | |||||
} | |||||
}else if(EnumMouldPatchType.material_mould.getCode().equals(record.getType())){ | |||||
record.setVideoType(null); | |||||
}else{ | |||||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"类型错误"); | |||||
} | |||||
if(StringUtils.isBlank(record.getMaterial())){ | if(StringUtils.isBlank(record.getMaterial())){ | ||||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"图片为空"); | |||||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"素材为空"); | |||||
} | } | ||||
if(record.getTitle() == null){ | if(record.getTitle() == null){ | ||||
record.setTitle("用户自建"); | record.setTitle("用户自建"); | ||||
@@ -41,6 +41,8 @@ public class MaterialMould extends TenantEntity { | |||||
@io.swagger.annotations.ApiModelProperty(value="EnumMouldPatchType",name="type") | @io.swagger.annotations.ApiModelProperty(value="EnumMouldPatchType",name="type") | ||||
private Integer type; | private Integer type; | ||||
@io.swagger.annotations.ApiModelProperty(value="EnumVideoType",name="videoType") | |||||
private Integer videoType; | |||||
@io.swagger.annotations.ApiModelProperty(value="名称",name="title") | @io.swagger.annotations.ApiModelProperty(value="名称",name="title") | ||||
@Excel(name="名称",width = 20,orderNum = "1") | @Excel(name="名称",width = 20,orderNum = "1") | ||||
private String title; | private String title; | ||||
@@ -106,6 +106,11 @@ public class PersonMould extends TenantEntity { | |||||
@io.swagger.annotations.ApiModelProperty(value="素材",name="material") | @io.swagger.annotations.ApiModelProperty(value="素材",name="material") | ||||
private String material; | private String material; | ||||
@io.swagger.annotations.ApiModelProperty(value="背景Id",name="backgroundId") | |||||
private Long backgroundId; | |||||
@io.swagger.annotations.ApiModelProperty(value="背景素材",name="backgroundMaterial") | |||||
private String backgroundMaterial; | |||||
@io.swagger.annotations.ApiModelProperty(value="EnumaMouldPatchStatus 状态(-1:全部,0:草稿/待生效,1:已生效,2:已失效,3:已作废)",name="status") | @io.swagger.annotations.ApiModelProperty(value="EnumaMouldPatchStatus 状态(-1:全部,0:草稿/待生效,1:已生效,2:已失效,3:已作废)",name="status") | ||||
private Integer status; | private Integer status; | ||||
@io.swagger.annotations.ApiModelProperty(value="上架时间",name="putonDate") | @io.swagger.annotations.ApiModelProperty(value="上架时间",name="putonDate") | ||||
@@ -6,6 +6,7 @@ | |||||
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | ||||
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | ||||
<result column="type" jdbcType="INTEGER" property="type"/> | <result column="type" jdbcType="INTEGER" property="type"/> | ||||
<result column="video_type" jdbcType="INTEGER" property="videoType"/> | |||||
<result column="title" jdbcType="VARCHAR" property="title"/> | <result column="title" jdbcType="VARCHAR" property="title"/> | ||||
<result column="sub_title" jdbcType="VARCHAR" property="subTitle"/> | <result column="sub_title" jdbcType="VARCHAR" property="subTitle"/> | ||||
<result column="scene_sign" jdbcType="VARCHAR" property="sceneSign"/> | <result column="scene_sign" jdbcType="VARCHAR" property="sceneSign"/> | ||||
@@ -23,7 +24,7 @@ | |||||
</resultMap> | </resultMap> | ||||
<sql id="allColumns"> | <sql id="allColumns"> | ||||
`id`, `tenant_id`, `parent_tenant_id`, `type`, | |||||
`id`, `tenant_id`, `parent_tenant_id`, `type`,`video_type`, | |||||
`title`, `sub_title`, `scene_sign`, `sale_price`, `price`, | `title`, `sub_title`, `scene_sign`, `sale_price`, `price`, | ||||
`send_type`, `detail`, `remark`, `material`, `user_id`, `status`, `puton_date`, `create_date`, `update_date` | `send_type`, `detail`, `remark`, `material`, `user_id`, `status`, `puton_date`, `create_date`, `update_date` | ||||
</sql> | </sql> | ||||
@@ -46,6 +47,10 @@ | |||||
and `type` = #{type} | and `type` = #{type} | ||||
</if> | </if> | ||||
<if test=" null != videoType "> | |||||
and `video_type` = #{videoType} | |||||
</if> | |||||
<if test=" null != title and ''!=title"> | <if test=" null != title and ''!=title"> | ||||
and `title` like concat('%', #{title},'%') | and `title` like concat('%', #{title},'%') | ||||
</if> | </if> | ||||
@@ -115,7 +120,7 @@ | |||||
<select id="findCList" parameterType="com.iformall.domain.po.sm.MaterialMould" resultMap="BaseResultMap"> | <select id="findCList" parameterType="com.iformall.domain.po.sm.MaterialMould" resultMap="BaseResultMap"> | ||||
select | select | ||||
`id`, `type`, | |||||
`id`, `type`,`video_type`, | |||||
`title`, `sub_title`, `scene_sign`, `sale_price`, `price`, | `title`, `sub_title`, `scene_sign`, `sale_price`, `price`, | ||||
`send_type`, `material`, `status`, `create_date`, `update_date` | `send_type`, `material`, `status`, `create_date`, `update_date` | ||||
from material_mould | from material_mould | ||||
@@ -22,6 +22,8 @@ | |||||
<result column="remark" jdbcType="VARCHAR" property="remark"/> | <result column="remark" jdbcType="VARCHAR" property="remark"/> | ||||
<result column="mould_sm_id" jdbcType="VARCHAR" property="mouldSmId"/> | <result column="mould_sm_id" jdbcType="VARCHAR" property="mouldSmId"/> | ||||
<result column="material" jdbcType="VARCHAR" property="material"/> | <result column="material" jdbcType="VARCHAR" property="material"/> | ||||
<result column="background_id" jdbcType="BIGINT" property="backgroundId"/> | |||||
<result column="background_material" jdbcType="VARCHAR" property="backgroundMaterial"/> | |||||
<result column="status" jdbcType="INTEGER" property="status"/> | <result column="status" jdbcType="INTEGER" property="status"/> | ||||
<result column="puton_date" jdbcType="TIMESTAMP" property="putonDate"/> | <result column="puton_date" jdbcType="TIMESTAMP" property="putonDate"/> | ||||
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> | <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> | ||||
@@ -31,7 +33,8 @@ | |||||
<sql id="allColumns"> | <sql id="allColumns"> | ||||
`id`, `tenant_id`, `parent_tenant_id`, `video_type`, `cover_img`, `cover_picture`, `detail_picture`, | `id`, `tenant_id`, `parent_tenant_id`, `video_type`, `cover_img`, `cover_picture`, `detail_picture`, | ||||
`title`, `sub_title`, `sex`, `age`, `colour`, `scene_sign`, `sale_price`, `price`, | `title`, `sub_title`, `sex`, `age`, `colour`, `scene_sign`, `sale_price`, `price`, | ||||
`send_type`, `detail`, `remark`, `mould_sm_id`,`material`, `status`, `puton_date`, `create_date`, `update_date` | |||||
`send_type`, `detail`, `remark`, `mould_sm_id`,`material`,`background_id`,`background_material`, | |||||
`status`, `puton_date`, `create_date`, `update_date` | |||||
</sql> | </sql> | ||||
<sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
@@ -124,7 +127,8 @@ | |||||
select | select | ||||
`id`, `video_type`, `cover_img`, `cover_picture`, | `id`, `video_type`, `cover_img`, `cover_picture`, | ||||
`title`, `sub_title`, `sex`, `age`, `colour`, `scene_sign`, `sale_price`, `price`, | `title`, `sub_title`, `sex`, `age`, `colour`, `scene_sign`, `sale_price`, `price`, | ||||
`send_type`, `mould_sm_id`,`material`, `status`, `create_date`, `update_date` | |||||
`send_type`, `mould_sm_id`,`material`,`background_id`,`background_material`, | |||||
`status`, `create_date`, `update_date` | |||||
from person_mould | from person_mould | ||||
<include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
</select> | </select> | ||||