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.
147 lines
7.4 KiB
147 lines
7.4 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, ",
|
||
|
"coupon_value, coupon_img, ",
|
||
|
"coupon_price, is_present, ",
|
||
|
"create_time, update_time, ",
|
||
|
"operator_id, operator_name, ",
|
||
|
"`status`, ext_1, ext_2, ",
|
||
|
"ext_3)",
|
||
|
"values (#{companyId,jdbcType=BIGINT}, #{merchantId,jdbcType=BIGINT}, ",
|
||
|
"#{couponKey,jdbcType=VARCHAR}, #{couponName,jdbcType=VARCHAR}, ",
|
||
|
"#{couponValue,jdbcType=VARCHAR}, #{couponImg,jdbcType=VARCHAR}, ",
|
||
|
"#{couponPrice,jdbcType=DECIMAL}, #{isPresent,jdbcType=BIT}, ",
|
||
|
"#{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(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),
|
||
|
@Result(column="coupon_value", property="couponValue", jdbcType=JdbcType.VARCHAR),
|
||
|
@Result(column="coupon_img", property="couponImg", jdbcType=JdbcType.VARCHAR),
|
||
|
@Result(column="coupon_price", property="couponPrice", jdbcType=JdbcType.DECIMAL),
|
||
|
@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="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<HighCoupon> selectByExample(HighCouponExample example);
|
||
|
|
||
|
@Select({
|
||
|
"select",
|
||
|
"id, company_id, merchant_id, coupon_key, coupon_name, coupon_value, coupon_img, ",
|
||
|
"coupon_price, is_present, create_time, update_time, operator_id, operator_name, ",
|
||
|
"`status`, ext_1, ext_2, ext_3",
|
||
|
"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),
|
||
|
@Result(column="coupon_value", property="couponValue", jdbcType=JdbcType.VARCHAR),
|
||
|
@Result(column="coupon_img", property="couponImg", jdbcType=JdbcType.VARCHAR),
|
||
|
@Result(column="coupon_price", property="couponPrice", jdbcType=JdbcType.DECIMAL),
|
||
|
@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="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)
|
||
|
})
|
||
|
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},",
|
||
|
"coupon_value = #{couponValue,jdbcType=VARCHAR},",
|
||
|
"coupon_img = #{couponImg,jdbcType=VARCHAR},",
|
||
|
"coupon_price = #{couponPrice,jdbcType=DECIMAL},",
|
||
|
"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},",
|
||
|
"`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(HighCoupon record);
|
||
|
}
|