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.
105 lines
4.5 KiB
105 lines
4.5 KiB
4 years ago
|
package com.hai.dao;
|
||
|
|
||
|
import com.hai.entity.HighUserCoupon;
|
||
|
import com.hai.entity.HighUserCouponExample;
|
||
|
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 HighUserCouponMapper extends HighUserCouponMapperExt {
|
||
|
@SelectProvider(type=HighUserCouponSqlProvider.class, method="countByExample")
|
||
|
long countByExample(HighUserCouponExample example);
|
||
|
|
||
|
@DeleteProvider(type=HighUserCouponSqlProvider.class, method="deleteByExample")
|
||
|
int deleteByExample(HighUserCouponExample example);
|
||
|
|
||
|
@Delete({
|
||
|
"delete from high_user_coupon",
|
||
|
"where id = #{id,jdbcType=BIGINT}"
|
||
|
})
|
||
|
int deleteByPrimaryKey(Long id);
|
||
|
|
||
|
@Insert({
|
||
|
"insert into high_user_coupon (user_id, coupon_code_id, ",
|
||
|
"ext_1, ext_2, ext_3, ",
|
||
|
"ext_4)",
|
||
|
"values (#{userId,jdbcType=VARCHAR}, #{couponCodeId,jdbcType=VARCHAR}, ",
|
||
|
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ",
|
||
|
"#{ext4,jdbcType=VARCHAR})"
|
||
|
})
|
||
|
@Options(useGeneratedKeys=true,keyProperty="id")
|
||
|
int insert(HighUserCoupon record);
|
||
|
|
||
|
@InsertProvider(type=HighUserCouponSqlProvider.class, method="insertSelective")
|
||
|
@Options(useGeneratedKeys=true,keyProperty="id")
|
||
|
int insertSelective(HighUserCoupon record);
|
||
|
|
||
|
@SelectProvider(type=HighUserCouponSqlProvider.class, method="selectByExample")
|
||
|
@Results({
|
||
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
|
||
|
@Result(column="user_id", property="userId", jdbcType=JdbcType.VARCHAR),
|
||
|
@Result(column="coupon_code_id", property="couponCodeId", jdbcType=JdbcType.VARCHAR),
|
||
|
@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="ext_4", property="ext4", jdbcType=JdbcType.VARCHAR)
|
||
|
})
|
||
|
List<HighUserCoupon> selectByExample(HighUserCouponExample example);
|
||
|
|
||
|
@Select({
|
||
|
"select",
|
||
|
"id, user_id, coupon_code_id, ext_1, ext_2, ext_3, ext_4",
|
||
|
"from high_user_coupon",
|
||
|
"where id = #{id,jdbcType=BIGINT}"
|
||
|
})
|
||
|
@Results({
|
||
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
|
||
|
@Result(column="user_id", property="userId", jdbcType=JdbcType.VARCHAR),
|
||
|
@Result(column="coupon_code_id", property="couponCodeId", jdbcType=JdbcType.VARCHAR),
|
||
|
@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="ext_4", property="ext4", jdbcType=JdbcType.VARCHAR)
|
||
|
})
|
||
|
HighUserCoupon selectByPrimaryKey(Long id);
|
||
|
|
||
|
@UpdateProvider(type=HighUserCouponSqlProvider.class, method="updateByExampleSelective")
|
||
|
int updateByExampleSelective(@Param("record") HighUserCoupon record, @Param("example") HighUserCouponExample example);
|
||
|
|
||
|
@UpdateProvider(type=HighUserCouponSqlProvider.class, method="updateByExample")
|
||
|
int updateByExample(@Param("record") HighUserCoupon record, @Param("example") HighUserCouponExample example);
|
||
|
|
||
|
@UpdateProvider(type=HighUserCouponSqlProvider.class, method="updateByPrimaryKeySelective")
|
||
|
int updateByPrimaryKeySelective(HighUserCoupon record);
|
||
|
|
||
|
@Update({
|
||
|
"update high_user_coupon",
|
||
|
"set user_id = #{userId,jdbcType=VARCHAR},",
|
||
|
"coupon_code_id = #{couponCodeId,jdbcType=VARCHAR},",
|
||
|
"ext_1 = #{ext1,jdbcType=VARCHAR},",
|
||
|
"ext_2 = #{ext2,jdbcType=VARCHAR},",
|
||
|
"ext_3 = #{ext3,jdbcType=VARCHAR},",
|
||
|
"ext_4 = #{ext4,jdbcType=VARCHAR}",
|
||
|
"where id = #{id,jdbcType=BIGINT}"
|
||
|
})
|
||
|
int updateByPrimaryKey(HighUserCoupon record);
|
||
|
}
|