org.apache.ibatis.annotations.Mapper.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(11.2k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中org.apache.ibatis.annotations.Mapper.<init>()方法的一些代码示例,展示了Mapper.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mapper.<init>()方法的具体详情如下:
包路径:org.apache.ibatis.annotations.Mapper
类名称:Mapper
方法名:<init>

Mapper.<init>介绍

暂无

代码示例

代码示例来源:origin: xuxueli/xxl-job

/**
 * Created by xuxueli on 16/9/30.
 */
@Mapper
public interface XxlJobGroupDao {

  public List<XxlJobGroup> findAll();

  public List<XxlJobGroup> findByAddressType(@Param("addressType") int addressType);

  public int save(XxlJobGroup xxlJobGroup);

  public int update(XxlJobGroup xxlJobGroup);

  public int remove(@Param("id") int id);

  public XxlJobGroup load(@Param("id") int id);
}

代码示例来源:origin: xuxueli/xxl-job

/**
 * job log for glue
 * @author xuxueli 2016-5-19 18:04:56
 */
@Mapper
public interface XxlJobLogGlueDao {
  
  public int save(XxlJobLogGlue xxlJobLogGlue);
  
  public List<XxlJobLogGlue> findByJobId(@Param("jobId") int jobId);

  public int removeOld(@Param("jobId") int jobId, @Param("limit") int limit);

  public int deleteByJobId(@Param("jobId") int jobId);
  
}

代码示例来源:origin: qiurunze123/miaosha

@Mapper
public interface MiaoShaUserDao {

  @Select("select * from miaosha_user where nickname = #{nickname}")
  public MiaoshaUser getByNickname(@Param("nickname") String nickname ) ;

  @Select("select * from miaosha_user where id = #{id}")
  public MiaoshaUser getById(@Param("id") long id ) ;

  @Update("update miaosha_user set password = #{password} where id = #{id}")
  public void update(MiaoshaUser toBeUpdate);

  @Insert("insert into miaosha_user (id , nickname ,password , salt ,head,register_date,last_login_date)value (#{id},#{nickname},#{password},#{salt},#{head},#{registerDate},#{lastLoginDate}) ")
  @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
  public void insertMiaoShaUser(MiaoshaUser miaoshaUser);

}

代码示例来源:origin: qiurunze123/miaosha

@Mapper
public interface UserDao {

  @Select("select * from user where id = #{id}")
  public User getById(@Param("id")int id);

  @Insert("insert into user (id, name) values(#{id}, #{name})")
  public int insert(User user);
  
  

}

代码示例来源:origin: qiurunze123/miaosha

@Mapper
public interface GoodsDao {
  
  @Select("select g.*,mg.stock_count, mg.start_date, mg.end_date,mg.miaosha_price from miaosha_goods mg left join goods g on mg.goods_id = g.id")
  public List<GoodsVo> listGoodsVo();

  @Select("select g.*,mg.stock_count, mg.start_date, mg.end_date,mg.miaosha_price from miaosha_goods mg left join goods g on mg.goods_id = g.id where g.id = #{goodsId}")
  public GoodsVo getGoodsVoByGoodsId(@Param("goodsId") long goodsId);

  @Update("update miaosha_goods set stock_count = stock_count - 1 where goods_id = #{goodsId} and stock_count > 0")
  public int reduceStock(MiaoshaGoods g);
  
}

代码示例来源:origin: xuxueli/xxl-job

/**
 * Created by xuxueli on 16/9/30.
 */
@Mapper
public interface XxlJobRegistryDao {

  public int removeDead(@Param("timeout") int timeout);

  public List<XxlJobRegistry> findAll(@Param("timeout") int timeout);

  public int registryUpdate(@Param("registryGroup") String registryGroup,
               @Param("registryKey") String registryKey,
               @Param("registryValue") String registryValue);

  public int registrySave(@Param("registryGroup") String registryGroup,
              @Param("registryKey") String registryKey,
              @Param("registryValue") String registryValue);

  public int registryDelete(@Param("registryGroup") String registGroup,
             @Param("registryKey") String registryKey,
             @Param("registryValue") String registryValue);

}

代码示例来源:origin: roncoo/spring-boot-demo

@Mapper
public interface RoncooUserMapper {

  @Insert(value = "insert into roncoo_user (name, create_time) values (#{name,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})")
  int insert(RoncooUser record);

  @Select(value = "select id, name, create_time from roncoo_user where id = #{id,jdbcType=INTEGER}")
  @Results(value = { @Result(column = "create_time", property = "createTime", jdbcType = JdbcType.TIMESTAMP) })
  RoncooUser selectByPrimaryKey(Integer id);
}

代码示例来源:origin: qiurunze123/miaosha

@Mapper
public interface OrderDao {
  
  @Select("select * from miaosha_order where user_id=#{userNickName} and goods_id=#{goodsId}")
  public MiaoshaOrder getMiaoshaOrderByUserIdGoodsId(@Param("userNickName") long userNickName, @Param("goodsId") long goodsId);

  @Insert("insert into order_info(user_id, goods_id, goods_name, goods_count, goods_price, order_channel, status, create_date)values("
      + "#{userId}, #{goodsId}, #{goodsName}, #{goodsCount}, #{goodsPrice}, #{orderChannel},#{status},#{createDate} )")
  @SelectKey(keyColumn="id", keyProperty="id", resultType=long.class, before=false, statement="select last_insert_id()")
  public long insert(OrderInfo orderInfo);
  
  @Insert("insert into miaosha_order (user_id, goods_id, order_id)values(#{userId}, #{goodsId}, #{orderId})")
  public int insertMiaoshaOrder(MiaoshaOrder miaoshaOrder);

  @Select("select * from order_info where id = #{orderId}")
  public OrderInfo getOrderById(@Param("orderId")long orderId);

  @Select("select * from order_info where status=#{status} and create_Date<=#{createDate}")
  public List<OrderInfo> selectOrderStatusByCreateTime(@Param("status")Integer status, @Param("createDate") String createDate);

  @Select("update order_info set status=0 where id=#{id}")
  public int closeOrderByOrderInfo();
}

代码示例来源:origin: xuxueli/xxl-job

@Mapper
public interface XxlJobInfoDao {

代码示例来源:origin: qiurunze123/miaosha

@Mapper
public interface MiaoShaMessageDao {
  
  @Select("select * from miaosha_message where messageid =  #{messageid}  ")
  public List<MiaoShaMessageInfo> listMiaoShaMessage(@Param("messageId") String messageId);
  @Select("<script>select * from miaosha_message_user where 1=1 <if test=\"messageId !=null \">and messageId = #{messageId} </if></script>")
  public List<MiaoShaMessageUser> listMiaoShaMessageUser(@Param("messageId") String messageId);
  @Insert("insert into miaosha_message (id , messageid ,content , create_time ,status,over_time,message_type ,send_type , good_name , price,messageHead)" +
      "value (#{id},#{messageId},#{content},#{createTime},#{status},#{overTime},#{messageType},#{sendType},#{goodName},#{price},#{messageHead}) ")
  @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
  public void insertMiaoShaMessage(MiaoShaMessageInfo miaoShaMessage);

  @Insert("insert into miaosha_message_user (id , userid ,messageid , goodid ,orderid)" +
      "value (#{id},#{userId},#{messageId},#{goodId},#{orderId}) ")
  @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
  public void insertMiaoShaMessageUser(MiaoShaMessageUser miaoShaMessageUser);

  @Select(" <script> select * from miaosha_message_user mmu , miaosha_message mm where " +
      " mmu.messageid = mm.messageid and  userid=${userId}  <if test=\"status !=null \">and status = #{status} </if></script> ")
  public List<MiaoShaMessageInfo> listMiaoShaMessageByUserId(@Param("userId") long userId,@Param("status")  Integer status );
}

代码示例来源:origin: ChinaSilence/any-video

@Mapper
public interface AttentionMapper {

  @Insert("insert into any_attention(user_id, other_id) values(#{userId}, #{otherId})")
  int insert(Attention attention);

  @Delete("delete from any_attention where user_id = #{userId} and other_id = #{otherId}")
  int delete(@Param("userId") Long userId, @Param("otherId") Long otherId);

  @Select("select * from any_attention where user_id = #{userId} and other_id = #{otherId}")
  Attention select(@Param("userId") Long userId, @Param("otherId") Long otherId);

}

代码示例来源:origin: ChinaSilence/any-video

/**
 * 打赏
 */
@Mapper
public interface TipMapper {

  @Select("SELECT * FROM any_tip ORDER BY id DESC")
  List<Tip> list();

}

代码示例来源:origin: cachecats/coderiver

/**
 * @Author: solo
 * @Date: 2018/12/12 2:30 PM
 * @Version 1.0
 */
@Mapper
public interface ProjectCategoryMapper {

  int insert(ProjectCategory category);

  int deleteByType(Integer type);

  int updateByType(ProjectCategory category);

  ProjectCategory selectByType(Integer type);
}

代码示例来源:origin: cachecats/coderiver

/**
 * @Author: solo
 * @Date: 2018/12/12 6:48 PM
 * @Version 1.0
 */
@Mapper
public interface ProjectMemberMapper {

  List<ProjectMember> selectByProjectId(String projectId);
}

代码示例来源:origin: roncoo/spring-boot-demo

@Mapper
public interface RoncooUserLogMapper {
  int countByExample(RoncooUserLogExample example);

  int deleteByExample(RoncooUserLogExample example);

  int deleteByPrimaryKey(Integer id);

  int insert(RoncooUserLog record);

  int insertSelective(RoncooUserLog record);

  List<RoncooUserLog> selectByExample(RoncooUserLogExample example);

  RoncooUserLog selectByPrimaryKey(Integer id);

  int updateByExampleSelective(@Param("record") RoncooUserLog record, @Param("example") RoncooUserLogExample example);

  int updateByExample(@Param("record") RoncooUserLog record, @Param("example") RoncooUserLogExample example);

  int updateByPrimaryKeySelective(RoncooUserLog record);

  int updateByPrimaryKey(RoncooUserLog record);
}

代码示例来源:origin: roncoo/spring-boot-demo

@Mapper
public interface RoncooUserMapper {
  int countByExample(RoncooUserExample example);

  int deleteByExample(RoncooUserExample example);

  int deleteByPrimaryKey(Integer id);

  int insert(RoncooUser record);

  int insertSelective(RoncooUser record);

  List<RoncooUser> selectByExample(RoncooUserExample example);

  RoncooUser selectByPrimaryKey(Integer id);

  int updateByExampleSelective(@Param("record") RoncooUser record, @Param("example") RoncooUserExample example);

  int updateByExample(@Param("record") RoncooUser record, @Param("example") RoncooUserExample example);

  int updateByPrimaryKeySelective(RoncooUser record);

  int updateByPrimaryKey(RoncooUser record);
}

代码示例来源:origin: roncoo/spring-boot-demo

@Mapper
public interface RoncooUserMapper {
  int countByExample(RoncooUserExample example);

  int deleteByExample(RoncooUserExample example);

  int deleteByPrimaryKey(Integer id);

  int insert(RoncooUser record);

  int insertSelective(RoncooUser record);

  List<RoncooUser> selectByExample(RoncooUserExample example);

  RoncooUser selectByPrimaryKey(Integer id);

  int updateByExampleSelective(@Param("record") RoncooUser record, @Param("example") RoncooUserExample example);

  int updateByExample(@Param("record") RoncooUser record, @Param("example") RoncooUserExample example);

  int updateByPrimaryKeySelective(RoncooUser record);

  int updateByPrimaryKey(RoncooUser record);
}

代码示例来源:origin: roncoo/spring-boot-demo

@Mapper
public interface RoncooUserLogMapper {
  int countByExample(RoncooUserLogExample example);

  int deleteByExample(RoncooUserLogExample example);

  int deleteByPrimaryKey(Integer id);

  int insert(RoncooUserLog record);

  int insertSelective(RoncooUserLog record);

  List<RoncooUserLog> selectByExample(RoncooUserLogExample example);

  RoncooUserLog selectByPrimaryKey(Integer id);

  int updateByExampleSelective(@Param("record") RoncooUserLog record, @Param("example") RoncooUserLogExample example);

  int updateByExample(@Param("record") RoncooUserLog record, @Param("example") RoncooUserLogExample example);

  int updateByPrimaryKeySelective(RoncooUserLog record);

  int updateByPrimaryKey(RoncooUserLog record);
}

代码示例来源:origin: qiurunze123/miaosha

@Mapper
public interface UserMapper {

代码示例来源:origin: xuxueli/xxl-job

@Mapper
public interface XxlJobLogDao {

相关文章

微信公众号

最新文章

更多

Mapper类方法