10 changed files with 157 additions and 33 deletions
@ -0,0 +1,26 @@ |
|||
package com.bnyer.common.core.dto; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Getter; |
|||
import lombok.Setter; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
|
|||
@Getter |
|||
@Setter |
|||
@ApiModel("批量状态接收类") |
|||
public class BatchStatusDto implements Serializable { |
|||
|
|||
@ApiModelProperty(value="主键Ids") |
|||
private List<Long> ids; |
|||
|
|||
@NotNull(message = "状态不能为空!") |
|||
@ApiModelProperty(value="状态") |
|||
private String status; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
package com.bnyer.common.core.dto; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Getter; |
|||
import lombok.Setter; |
|||
|
|||
|
|||
@Getter |
|||
@Setter |
|||
@ApiModel("图片分类接收类") |
|||
public class TiktokImgTypeDto extends BasePageDto { |
|||
|
|||
@ApiModelProperty(value="分类id") |
|||
private Long typeId; |
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
<?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.bnyer.system.mapper.TiktokImgMapper"> |
|||
<resultMap id="BaseResultMap" type="com.bnyer.common.core.domain.TiktokImg"> |
|||
<!--@mbg.generated--> |
|||
<!--@Table img_tiktok_img--> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="img_url" jdbcType="VARCHAR" property="imgUrl" /> |
|||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" /> |
|||
<result column="type_id" jdbcType="BIGINT" property="typeId" /> |
|||
<result column="download_num" jdbcType="INTEGER" property="downloadNum" /> |
|||
<result column="great_num" jdbcType="INTEGER" property="greatNum" /> |
|||
<result column="collection_num" jdbcType="INTEGER" property="collectionNum" /> |
|||
<result column="status" jdbcType="CHAR" property="status" /> |
|||
<result column="is_hot" jdbcType="CHAR" property="isHot" /> |
|||
<result column="is_original" jdbcType="CHAR" property="isOriginal" /> |
|||
<result column="is_show" jdbcType="CHAR" property="isShow" /> |
|||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
|||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
|||
<result column="sort" jdbcType="INTEGER" property="sort" /> |
|||
</resultMap> |
|||
|
|||
<sql id="Base_Column_List"> |
|||
<!--@mbg.generated--> |
|||
id, img_url, creator_id, type_id, download_num, great_num, collection_num, `status`, |
|||
is_hot, is_show, create_time, update_time, sort,is_original |
|||
</sql> |
|||
|
|||
<update id="batchUpdateStatus"> |
|||
update img_tiktok_img |
|||
set status = #{status},update_time = now() |
|||
where id in |
|||
<foreach collection="ids" item="id" separator="," open="(" close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</update> |
|||
</mapper> |
|||
Loading…
Reference in new issue