You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
156 lines
8.4 KiB
156 lines
8.4 KiB
package com.hai.dao;
|
|
|
|
import com.hai.entity.HighDiscount;
|
|
import com.hai.entity.HighDiscountExample;
|
|
import java.util.List;
|
|
import org.apache.ibatis.annotations.Delete;
|
|
import org.apache.ibatis.annotations.DeleteProvider;
|
|
import org.apache.ibatis.annotations.Insert;
|
|
import org.apache.ibatis.annotations.InsertProvider;
|
|
import org.apache.ibatis.annotations.Options;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.apache.ibatis.annotations.Result;
|
|
import org.apache.ibatis.annotations.Results;
|
|
import org.apache.ibatis.annotations.Select;
|
|
import org.apache.ibatis.annotations.SelectProvider;
|
|
import org.apache.ibatis.annotations.Update;
|
|
import org.apache.ibatis.annotations.UpdateProvider;
|
|
import org.apache.ibatis.type.JdbcType;
|
|
import org.springframework.stereotype.Repository;
|
|
|
|
/**
|
|
*
|
|
* 代码由工具生成,请勿修改!!!
|
|
* 如果需要扩展请在其父类进行扩展
|
|
*
|
|
**/
|
|
@Repository
|
|
public interface HighDiscountMapper extends HighDiscountMapperExt {
|
|
@SelectProvider(type=HighDiscountSqlProvider.class, method="countByExample")
|
|
long countByExample(HighDiscountExample example);
|
|
|
|
@DeleteProvider(type=HighDiscountSqlProvider.class, method="deleteByExample")
|
|
int deleteByExample(HighDiscountExample example);
|
|
|
|
@Delete({
|
|
"delete from high_discount",
|
|
"where id = #{id,jdbcType=BIGINT}"
|
|
})
|
|
int deleteByPrimaryKey(Long id);
|
|
|
|
@Insert({
|
|
"insert into high_discount (company_id, discount_key, ",
|
|
"discount_name, discount_img, ",
|
|
"discount_carousel_img, discount_type, ",
|
|
"discount_condition, discount_price, ",
|
|
"effective_day, sales_end_time, ",
|
|
"create_time, update_time, ",
|
|
"operator_id, operator_name, ",
|
|
"`status`, ext_1, ext_2, ",
|
|
"ext_3)",
|
|
"values (#{companyId,jdbcType=BIGINT}, #{discountKey,jdbcType=VARCHAR}, ",
|
|
"#{discountName,jdbcType=VARCHAR}, #{discountImg,jdbcType=VARCHAR}, ",
|
|
"#{discountCarouselImg,jdbcType=VARCHAR}, #{discountType,jdbcType=INTEGER}, ",
|
|
"#{discountCondition,jdbcType=DECIMAL}, #{discountPrice,jdbcType=DECIMAL}, ",
|
|
"#{effectiveDay,jdbcType=INTEGER}, #{salesEndTime,jdbcType=TIMESTAMP}, ",
|
|
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
|
|
"#{operatorId,jdbcType=BIGINT}, #{operatorName,jdbcType=VARCHAR}, ",
|
|
"#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ",
|
|
"#{ext3,jdbcType=VARCHAR})"
|
|
})
|
|
@Options(useGeneratedKeys=true,keyProperty="id")
|
|
int insert(HighDiscount record);
|
|
|
|
@InsertProvider(type=HighDiscountSqlProvider.class, method="insertSelective")
|
|
@Options(useGeneratedKeys=true,keyProperty="id")
|
|
int insertSelective(HighDiscount record);
|
|
|
|
@SelectProvider(type=HighDiscountSqlProvider.class, method="selectByExample")
|
|
@Results({
|
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
|
|
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
|
|
@Result(column="discount_key", property="discountKey", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="discount_img", property="discountImg", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="discount_carousel_img", property="discountCarouselImg", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="discount_type", property="discountType", jdbcType=JdbcType.INTEGER),
|
|
@Result(column="discount_condition", property="discountCondition", jdbcType=JdbcType.DECIMAL),
|
|
@Result(column="discount_price", property="discountPrice", jdbcType=JdbcType.DECIMAL),
|
|
@Result(column="effective_day", property="effectiveDay", jdbcType=JdbcType.INTEGER),
|
|
@Result(column="sales_end_time", property="salesEndTime", jdbcType=JdbcType.TIMESTAMP),
|
|
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
|
|
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
|
|
@Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT),
|
|
@Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
|
|
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
|
|
})
|
|
List<HighDiscount> selectByExample(HighDiscountExample example);
|
|
|
|
@Select({
|
|
"select",
|
|
"id, company_id, discount_key, discount_name, discount_img, discount_carousel_img, ",
|
|
"discount_type, discount_condition, discount_price, effective_day, sales_end_time, ",
|
|
"create_time, update_time, operator_id, operator_name, `status`, ext_1, ext_2, ",
|
|
"ext_3",
|
|
"from high_discount",
|
|
"where id = #{id,jdbcType=BIGINT}"
|
|
})
|
|
@Results({
|
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
|
|
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
|
|
@Result(column="discount_key", property="discountKey", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="discount_img", property="discountImg", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="discount_carousel_img", property="discountCarouselImg", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="discount_type", property="discountType", jdbcType=JdbcType.INTEGER),
|
|
@Result(column="discount_condition", property="discountCondition", jdbcType=JdbcType.DECIMAL),
|
|
@Result(column="discount_price", property="discountPrice", jdbcType=JdbcType.DECIMAL),
|
|
@Result(column="effective_day", property="effectiveDay", jdbcType=JdbcType.INTEGER),
|
|
@Result(column="sales_end_time", property="salesEndTime", jdbcType=JdbcType.TIMESTAMP),
|
|
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
|
|
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
|
|
@Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT),
|
|
@Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
|
|
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
|
|
})
|
|
HighDiscount selectByPrimaryKey(Long id);
|
|
|
|
@UpdateProvider(type=HighDiscountSqlProvider.class, method="updateByExampleSelective")
|
|
int updateByExampleSelective(@Param("record") HighDiscount record, @Param("example") HighDiscountExample example);
|
|
|
|
@UpdateProvider(type=HighDiscountSqlProvider.class, method="updateByExample")
|
|
int updateByExample(@Param("record") HighDiscount record, @Param("example") HighDiscountExample example);
|
|
|
|
@UpdateProvider(type=HighDiscountSqlProvider.class, method="updateByPrimaryKeySelective")
|
|
int updateByPrimaryKeySelective(HighDiscount record);
|
|
|
|
@Update({
|
|
"update high_discount",
|
|
"set company_id = #{companyId,jdbcType=BIGINT},",
|
|
"discount_key = #{discountKey,jdbcType=VARCHAR},",
|
|
"discount_name = #{discountName,jdbcType=VARCHAR},",
|
|
"discount_img = #{discountImg,jdbcType=VARCHAR},",
|
|
"discount_carousel_img = #{discountCarouselImg,jdbcType=VARCHAR},",
|
|
"discount_type = #{discountType,jdbcType=INTEGER},",
|
|
"discount_condition = #{discountCondition,jdbcType=DECIMAL},",
|
|
"discount_price = #{discountPrice,jdbcType=DECIMAL},",
|
|
"effective_day = #{effectiveDay,jdbcType=INTEGER},",
|
|
"sales_end_time = #{salesEndTime,jdbcType=TIMESTAMP},",
|
|
"create_time = #{createTime,jdbcType=TIMESTAMP},",
|
|
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
|
|
"operator_id = #{operatorId,jdbcType=BIGINT},",
|
|
"operator_name = #{operatorName,jdbcType=VARCHAR},",
|
|
"`status` = #{status,jdbcType=INTEGER},",
|
|
"ext_1 = #{ext1,jdbcType=VARCHAR},",
|
|
"ext_2 = #{ext2,jdbcType=VARCHAR},",
|
|
"ext_3 = #{ext3,jdbcType=VARCHAR}",
|
|
"where id = #{id,jdbcType=BIGINT}"
|
|
})
|
|
int updateByPrimaryKey(HighDiscount record);
|
|
} |