嗨森逛服务
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.
hai-server/hai-service/src/main/java/com/hai/dao/HighCouponMapper.java

212 lines
12 KiB

4 years ago
package com.hai.dao;
import com.hai.entity.HighCoupon;
import com.hai.entity.HighCouponExample;
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 HighCouponMapper extends HighCouponMapperExt {
@SelectProvider(type=HighCouponSqlProvider.class, method="countByExample")
long countByExample(HighCouponExample example);
@DeleteProvider(type=HighCouponSqlProvider.class, method="deleteByExample")
int deleteByExample(HighCouponExample example);
@Delete({
"delete from high_coupon",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into high_coupon (company_id, merchant_id, ",
"coupon_key, coupon_name, ",
4 years ago
"coupon_price, coupon_img, ",
"coupon_carousel_img, coupon_desc, ",
4 years ago
"coupon_type, sales_end_time, ",
"recycle_day, limit_number, ",
4 years ago
"sales_price, discount_price, ",
"sales_count, is_present, ",
"create_time, update_time, ",
"operator_id, operator_name, ",
"pay_type, ext_1, ext_2, ",
4 years ago
"ext_3, `status`, display_area, ",
3 years ago
"coupon_source, distributor, ",
"goods_type_id, brand_id, ",
7 years ago
"reserve_status, buy_points)",
4 years ago
"values (#{companyId,jdbcType=BIGINT}, #{merchantId,jdbcType=BIGINT}, ",
"#{couponKey,jdbcType=VARCHAR}, #{couponName,jdbcType=VARCHAR}, ",
4 years ago
"#{couponPrice,jdbcType=DECIMAL}, #{couponImg,jdbcType=VARCHAR}, ",
"#{couponCarouselImg,jdbcType=VARCHAR}, #{couponDesc,jdbcType=VARCHAR}, ",
4 years ago
"#{couponType,jdbcType=INTEGER}, #{salesEndTime,jdbcType=TIMESTAMP}, ",
"#{recycleDay,jdbcType=INTEGER}, #{limitNumber,jdbcType=INTEGER}, ",
4 years ago
"#{salesPrice,jdbcType=DECIMAL}, #{discountPrice,jdbcType=DECIMAL}, ",
"#{salesCount,jdbcType=INTEGER}, #{isPresent,jdbcType=BIT}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{operatorId,jdbcType=BIGINT}, #{operatorName,jdbcType=VARCHAR}, ",
"#{payType,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ",
4 years ago
"#{ext3,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{displayArea,jdbcType=INTEGER}, ",
3 years ago
"#{couponSource,jdbcType=INTEGER}, #{distributor,jdbcType=INTEGER}, ",
"#{goodsTypeId,jdbcType=INTEGER}, #{brandId,jdbcType=INTEGER}, ",
7 years ago
"#{reserveStatus,jdbcType=BIT}, #{buyPoints,jdbcType=BIT})"
4 years ago
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighCoupon record);
@InsertProvider(type=HighCouponSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(HighCoupon record);
@SelectProvider(type=HighCouponSqlProvider.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="merchant_id", property="merchantId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_key", property="couponKey", jdbcType=JdbcType.VARCHAR),
@Result(column="coupon_name", property="couponName", jdbcType=JdbcType.VARCHAR),
4 years ago
@Result(column="coupon_price", property="couponPrice", jdbcType=JdbcType.DECIMAL),
4 years ago
@Result(column="coupon_img", property="couponImg", jdbcType=JdbcType.VARCHAR),
@Result(column="coupon_carousel_img", property="couponCarouselImg", jdbcType=JdbcType.VARCHAR),
@Result(column="coupon_desc", property="couponDesc", jdbcType=JdbcType.VARCHAR),
@Result(column="coupon_type", property="couponType", jdbcType=JdbcType.INTEGER),
4 years ago
@Result(column="sales_end_time", property="salesEndTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="recycle_day", property="recycleDay", jdbcType=JdbcType.INTEGER),
@Result(column="limit_number", property="limitNumber", jdbcType=JdbcType.INTEGER),
@Result(column="sales_price", property="salesPrice", jdbcType=JdbcType.DECIMAL),
4 years ago
@Result(column="discount_price", property="discountPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="sales_count", property="salesCount", jdbcType=JdbcType.INTEGER),
4 years ago
@Result(column="is_present", property="isPresent", jdbcType=JdbcType.BIT),
@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="pay_type", property="payType", jdbcType=JdbcType.INTEGER),
4 years ago
@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),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
4 years ago
@Result(column="display_area", property="displayArea", jdbcType=JdbcType.INTEGER),
3 years ago
@Result(column="coupon_source", property="couponSource", jdbcType=JdbcType.INTEGER),
3 years ago
@Result(column="distributor", property="distributor", jdbcType=JdbcType.INTEGER),
3 years ago
@Result(column="goods_type_id", property="goodsTypeId", jdbcType=JdbcType.INTEGER),
@Result(column="brand_id", property="brandId", jdbcType=JdbcType.INTEGER),
7 years ago
@Result(column="reserve_status", property="reserveStatus", jdbcType=JdbcType.BIT),
@Result(column="buy_points", property="buyPoints", jdbcType=JdbcType.BIT)
4 years ago
})
List<HighCoupon> selectByExample(HighCouponExample example);
@Select({
"select",
4 years ago
"id, company_id, merchant_id, coupon_key, coupon_name, coupon_price, coupon_img, ",
"coupon_carousel_img, coupon_desc, coupon_type, sales_end_time, recycle_day, ",
4 years ago
"limit_number, sales_price, discount_price, sales_count, is_present, create_time, ",
"update_time, operator_id, operator_name, pay_type, ext_1, ext_2, ext_3, `status`, ",
7 years ago
"display_area, coupon_source, distributor, goods_type_id, brand_id, reserve_status, ",
"buy_points",
4 years ago
"from high_coupon",
"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="merchant_id", property="merchantId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_key", property="couponKey", jdbcType=JdbcType.VARCHAR),
@Result(column="coupon_name", property="couponName", jdbcType=JdbcType.VARCHAR),
4 years ago
@Result(column="coupon_price", property="couponPrice", jdbcType=JdbcType.DECIMAL),
4 years ago
@Result(column="coupon_img", property="couponImg", jdbcType=JdbcType.VARCHAR),
@Result(column="coupon_carousel_img", property="couponCarouselImg", jdbcType=JdbcType.VARCHAR),
@Result(column="coupon_desc", property="couponDesc", jdbcType=JdbcType.VARCHAR),
@Result(column="coupon_type", property="couponType", jdbcType=JdbcType.INTEGER),
4 years ago
@Result(column="sales_end_time", property="salesEndTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="recycle_day", property="recycleDay", jdbcType=JdbcType.INTEGER),
@Result(column="limit_number", property="limitNumber", jdbcType=JdbcType.INTEGER),
@Result(column="sales_price", property="salesPrice", jdbcType=JdbcType.DECIMAL),
4 years ago
@Result(column="discount_price", property="discountPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="sales_count", property="salesCount", jdbcType=JdbcType.INTEGER),
4 years ago
@Result(column="is_present", property="isPresent", jdbcType=JdbcType.BIT),
@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="pay_type", property="payType", jdbcType=JdbcType.INTEGER),
4 years ago
@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),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
4 years ago
@Result(column="display_area", property="displayArea", jdbcType=JdbcType.INTEGER),
3 years ago
@Result(column="coupon_source", property="couponSource", jdbcType=JdbcType.INTEGER),
3 years ago
@Result(column="distributor", property="distributor", jdbcType=JdbcType.INTEGER),
3 years ago
@Result(column="goods_type_id", property="goodsTypeId", jdbcType=JdbcType.INTEGER),
@Result(column="brand_id", property="brandId", jdbcType=JdbcType.INTEGER),
7 years ago
@Result(column="reserve_status", property="reserveStatus", jdbcType=JdbcType.BIT),
@Result(column="buy_points", property="buyPoints", jdbcType=JdbcType.BIT)
4 years ago
})
HighCoupon selectByPrimaryKey(Long id);
@UpdateProvider(type=HighCouponSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") HighCoupon record, @Param("example") HighCouponExample example);
@UpdateProvider(type=HighCouponSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") HighCoupon record, @Param("example") HighCouponExample example);
@UpdateProvider(type=HighCouponSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(HighCoupon record);
@Update({
"update high_coupon",
"set company_id = #{companyId,jdbcType=BIGINT},",
"merchant_id = #{merchantId,jdbcType=BIGINT},",
"coupon_key = #{couponKey,jdbcType=VARCHAR},",
"coupon_name = #{couponName,jdbcType=VARCHAR},",
4 years ago
"coupon_price = #{couponPrice,jdbcType=DECIMAL},",
4 years ago
"coupon_img = #{couponImg,jdbcType=VARCHAR},",
"coupon_carousel_img = #{couponCarouselImg,jdbcType=VARCHAR},",
"coupon_desc = #{couponDesc,jdbcType=VARCHAR},",
"coupon_type = #{couponType,jdbcType=INTEGER},",
4 years ago
"sales_end_time = #{salesEndTime,jdbcType=TIMESTAMP},",
"recycle_day = #{recycleDay,jdbcType=INTEGER},",
"limit_number = #{limitNumber,jdbcType=INTEGER},",
"sales_price = #{salesPrice,jdbcType=DECIMAL},",
4 years ago
"discount_price = #{discountPrice,jdbcType=DECIMAL},",
"sales_count = #{salesCount,jdbcType=INTEGER},",
4 years ago
"is_present = #{isPresent,jdbcType=BIT},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"operator_id = #{operatorId,jdbcType=BIGINT},",
"operator_name = #{operatorName,jdbcType=VARCHAR},",
"pay_type = #{payType,jdbcType=INTEGER},",
4 years ago
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",
4 years ago
"display_area = #{displayArea,jdbcType=INTEGER},",
3 years ago
"coupon_source = #{couponSource,jdbcType=INTEGER},",
3 years ago
"distributor = #{distributor,jdbcType=INTEGER},",
3 years ago
"goods_type_id = #{goodsTypeId,jdbcType=INTEGER},",
"brand_id = #{brandId,jdbcType=INTEGER},",
7 years ago
"reserve_status = #{reserveStatus,jdbcType=BIT},",
"buy_points = #{buyPoints,jdbcType=BIT}",
4 years ago
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(HighCoupon record);
}