|
|
@ -2,12 +2,22 @@ package com.hai.dao; |
|
|
|
|
|
|
|
|
|
|
|
import com.hai.entity.CmsCategory; |
|
|
|
import com.hai.entity.CmsCategory; |
|
|
|
import com.hai.entity.CmsCategoryExample; |
|
|
|
import com.hai.entity.CmsCategoryExample; |
|
|
|
import org.apache.ibatis.annotations.*; |
|
|
|
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.apache.ibatis.type.JdbcType; |
|
|
|
import org.springframework.stereotype.Repository; |
|
|
|
import org.springframework.stereotype.Repository; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* |
|
|
|
* |
|
|
|
* 代码由工具生成,请勿修改!!! |
|
|
|
* 代码由工具生成,请勿修改!!! |
|
|
@ -16,10 +26,10 @@ import java.util.List; |
|
|
|
**/ |
|
|
|
**/ |
|
|
|
@Repository |
|
|
|
@Repository |
|
|
|
public interface CmsCategoryMapper extends CmsCategoryMapperExt { |
|
|
|
public interface CmsCategoryMapper extends CmsCategoryMapperExt { |
|
|
|
@SelectProvider(type= CmsCategorySqlProvider.class, method="countByExample") |
|
|
|
@SelectProvider(type=CmsCategorySqlProvider.class, method="countByExample") |
|
|
|
long countByExample(CmsCategoryExample example); |
|
|
|
long countByExample(CmsCategoryExample example); |
|
|
|
|
|
|
|
|
|
|
|
@DeleteProvider(type= CmsCategorySqlProvider.class, method="deleteByExample") |
|
|
|
@DeleteProvider(type=CmsCategorySqlProvider.class, method="deleteByExample") |
|
|
|
int deleteByExample(CmsCategoryExample example); |
|
|
|
int deleteByExample(CmsCategoryExample example); |
|
|
|
|
|
|
|
|
|
|
|
@Delete({ |
|
|
|
@Delete({ |
|
|
@ -29,72 +39,77 @@ public interface CmsCategoryMapper extends CmsCategoryMapperExt { |
|
|
|
int deleteByPrimaryKey(Long id); |
|
|
|
int deleteByPrimaryKey(Long id); |
|
|
|
|
|
|
|
|
|
|
|
@Insert({ |
|
|
|
@Insert({ |
|
|
|
"insert into cms_category (parent_id, `name`, ", |
|
|
|
"insert into cms_category (`type`, parent_id, ", |
|
|
|
"code, sort, cover_img, ", |
|
|
|
"`name`, code, sort, ", |
|
|
|
"`status`, remark, ", |
|
|
|
"cover_img, `status`, ", |
|
|
|
"ext_1, ext_2, ext_3)", |
|
|
|
"remark, ext_1, ext_2, ", |
|
|
|
"values (#{parentId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, ", |
|
|
|
"ext_3)", |
|
|
|
"#{code,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{coverImg,jdbcType=VARCHAR}, ", |
|
|
|
"values (#{type,jdbcType=INTEGER}, #{parentId,jdbcType=BIGINT}, ", |
|
|
|
"#{status,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, ", |
|
|
|
"#{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, ", |
|
|
|
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
|
|
|
"#{coverImg,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", |
|
|
|
|
|
|
|
"#{remark,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", |
|
|
|
|
|
|
|
"#{ext3,jdbcType=VARCHAR})" |
|
|
|
}) |
|
|
|
}) |
|
|
|
@Options(useGeneratedKeys=true,keyProperty="id") |
|
|
|
@Options(useGeneratedKeys=true,keyProperty="id") |
|
|
|
int insert(CmsCategory record); |
|
|
|
int insert(CmsCategory record); |
|
|
|
|
|
|
|
|
|
|
|
@InsertProvider(type= CmsCategorySqlProvider.class, method="insertSelective") |
|
|
|
@InsertProvider(type=CmsCategorySqlProvider.class, method="insertSelective") |
|
|
|
@Options(useGeneratedKeys=true,keyProperty="id") |
|
|
|
@Options(useGeneratedKeys=true,keyProperty="id") |
|
|
|
int insertSelective(CmsCategory record); |
|
|
|
int insertSelective(CmsCategory record); |
|
|
|
|
|
|
|
|
|
|
|
@SelectProvider(type= CmsCategorySqlProvider.class, method="selectByExample") |
|
|
|
@SelectProvider(type=CmsCategorySqlProvider.class, method="selectByExample") |
|
|
|
@Results({ |
|
|
|
@Results({ |
|
|
|
@Result(column="id", property="id", jdbcType= JdbcType.BIGINT, id=true), |
|
|
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
|
|
|
@Result(column="parent_id", property="parentId", jdbcType= JdbcType.BIGINT), |
|
|
|
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
|
|
|
@Result(column="name", property="name", jdbcType= JdbcType.VARCHAR), |
|
|
|
@Result(column="parent_id", property="parentId", jdbcType=JdbcType.BIGINT), |
|
|
|
@Result(column="code", property="code", jdbcType= JdbcType.VARCHAR), |
|
|
|
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), |
|
|
|
@Result(column="sort", property="sort", jdbcType= JdbcType.INTEGER), |
|
|
|
@Result(column="code", property="code", jdbcType=JdbcType.VARCHAR), |
|
|
|
@Result(column="cover_img", property="coverImg", jdbcType= JdbcType.VARCHAR), |
|
|
|
@Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER), |
|
|
|
@Result(column="status", property="status", jdbcType= JdbcType.INTEGER), |
|
|
|
@Result(column="cover_img", property="coverImg", jdbcType=JdbcType.VARCHAR), |
|
|
|
@Result(column="remark", property="remark", jdbcType= JdbcType.VARCHAR), |
|
|
|
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
|
|
|
@Result(column="ext_1", property="ext1", jdbcType= JdbcType.VARCHAR), |
|
|
|
@Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR), |
|
|
|
@Result(column="ext_2", property="ext2", jdbcType= JdbcType.VARCHAR), |
|
|
|
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
|
|
|
@Result(column="ext_3", property="ext3", jdbcType= JdbcType.VARCHAR) |
|
|
|
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
|
|
|
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
|
|
|
}) |
|
|
|
}) |
|
|
|
List<CmsCategory> selectByExample(CmsCategoryExample example); |
|
|
|
List<CmsCategory> selectByExample(CmsCategoryExample example); |
|
|
|
|
|
|
|
|
|
|
|
@Select({ |
|
|
|
@Select({ |
|
|
|
"select", |
|
|
|
"select", |
|
|
|
"id, parent_id, `name`, code, sort, cover_img, `status`, remark, ext_1, ext_2, ", |
|
|
|
"id, `type`, parent_id, `name`, code, sort, cover_img, `status`, remark, ext_1, ", |
|
|
|
"ext_3", |
|
|
|
"ext_2, ext_3", |
|
|
|
"from cms_category", |
|
|
|
"from cms_category", |
|
|
|
"where id = #{id,jdbcType=BIGINT}" |
|
|
|
"where id = #{id,jdbcType=BIGINT}" |
|
|
|
}) |
|
|
|
}) |
|
|
|
@Results({ |
|
|
|
@Results({ |
|
|
|
@Result(column="id", property="id", jdbcType= JdbcType.BIGINT, id=true), |
|
|
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
|
|
|
@Result(column="parent_id", property="parentId", jdbcType= JdbcType.BIGINT), |
|
|
|
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
|
|
|
@Result(column="name", property="name", jdbcType= JdbcType.VARCHAR), |
|
|
|
@Result(column="parent_id", property="parentId", jdbcType=JdbcType.BIGINT), |
|
|
|
@Result(column="code", property="code", jdbcType= JdbcType.VARCHAR), |
|
|
|
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), |
|
|
|
@Result(column="sort", property="sort", jdbcType= JdbcType.INTEGER), |
|
|
|
@Result(column="code", property="code", jdbcType=JdbcType.VARCHAR), |
|
|
|
@Result(column="cover_img", property="coverImg", jdbcType= JdbcType.VARCHAR), |
|
|
|
@Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER), |
|
|
|
@Result(column="status", property="status", jdbcType= JdbcType.INTEGER), |
|
|
|
@Result(column="cover_img", property="coverImg", jdbcType=JdbcType.VARCHAR), |
|
|
|
@Result(column="remark", property="remark", jdbcType= JdbcType.VARCHAR), |
|
|
|
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
|
|
|
@Result(column="ext_1", property="ext1", jdbcType= JdbcType.VARCHAR), |
|
|
|
@Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR), |
|
|
|
@Result(column="ext_2", property="ext2", jdbcType= JdbcType.VARCHAR), |
|
|
|
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
|
|
|
@Result(column="ext_3", property="ext3", jdbcType= JdbcType.VARCHAR) |
|
|
|
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
|
|
|
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
|
|
|
}) |
|
|
|
}) |
|
|
|
CmsCategory selectByPrimaryKey(Long id); |
|
|
|
CmsCategory selectByPrimaryKey(Long id); |
|
|
|
|
|
|
|
|
|
|
|
@UpdateProvider(type= CmsCategorySqlProvider.class, method="updateByExampleSelective") |
|
|
|
@UpdateProvider(type=CmsCategorySqlProvider.class, method="updateByExampleSelective") |
|
|
|
int updateByExampleSelective(@Param("record") CmsCategory record, @Param("example") CmsCategoryExample example); |
|
|
|
int updateByExampleSelective(@Param("record") CmsCategory record, @Param("example") CmsCategoryExample example); |
|
|
|
|
|
|
|
|
|
|
|
@UpdateProvider(type= CmsCategorySqlProvider.class, method="updateByExample") |
|
|
|
@UpdateProvider(type=CmsCategorySqlProvider.class, method="updateByExample") |
|
|
|
int updateByExample(@Param("record") CmsCategory record, @Param("example") CmsCategoryExample example); |
|
|
|
int updateByExample(@Param("record") CmsCategory record, @Param("example") CmsCategoryExample example); |
|
|
|
|
|
|
|
|
|
|
|
@UpdateProvider(type= CmsCategorySqlProvider.class, method="updateByPrimaryKeySelective") |
|
|
|
@UpdateProvider(type=CmsCategorySqlProvider.class, method="updateByPrimaryKeySelective") |
|
|
|
int updateByPrimaryKeySelective(CmsCategory record); |
|
|
|
int updateByPrimaryKeySelective(CmsCategory record); |
|
|
|
|
|
|
|
|
|
|
|
@Update({ |
|
|
|
@Update({ |
|
|
|
"update cms_category", |
|
|
|
"update cms_category", |
|
|
|
"set parent_id = #{parentId,jdbcType=BIGINT},", |
|
|
|
"set `type` = #{type,jdbcType=INTEGER},", |
|
|
|
|
|
|
|
"parent_id = #{parentId,jdbcType=BIGINT},", |
|
|
|
"`name` = #{name,jdbcType=VARCHAR},", |
|
|
|
"`name` = #{name,jdbcType=VARCHAR},", |
|
|
|
"code = #{code,jdbcType=VARCHAR},", |
|
|
|
"code = #{code,jdbcType=VARCHAR},", |
|
|
|
"sort = #{sort,jdbcType=INTEGER},", |
|
|
|
"sort = #{sort,jdbcType=INTEGER},", |
|
|
|