MybatisGenerator/config/generatorConfig.xml
@@ -48,7 +48,8 @@ </javaClientGenerator> <!-- 指定数据表 --> <table schema="" tableName="db_user.tb_user_inf"></table> <table schema="" tableName="tb_user_inf" domainObjectName="User_inf"></table> <table schema="" tableName="tb_user_battgroup_baojigroup" domainObjectName="User_battgroup_baojigroup"></table> <!-- <table schema="" tableName="tb_content_category"></table> <table schema="" tableName="tb_item"></table> <table schema="" tableName="tb_item_cat"></table> --> MybatisGenerator/src/com/lxw/genereator/mapper/TbUserInfMapper.java
File was deleted MybatisGenerator/src/com/lxw/genereator/mapper/User_battgroup_baojigroupMapper.java
New file @@ -0,0 +1,30 @@ package com.lxw.genereator.mapper; import com.lxw.genereator.po.User_battgroup_baojigroup; import com.lxw.genereator.po.User_battgroup_baojigroupExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface User_battgroup_baojigroupMapper { long countByExample(User_battgroup_baojigroupExample example); int deleteByExample(User_battgroup_baojigroupExample example); int deleteByPrimaryKey(Long baojiGroupId); int insert(User_battgroup_baojigroup record); int insertSelective(User_battgroup_baojigroup record); List<User_battgroup_baojigroup> selectByExample(User_battgroup_baojigroupExample example); User_battgroup_baojigroup selectByPrimaryKey(Long baojiGroupId); int updateByExampleSelective(@Param("record") User_battgroup_baojigroup record, @Param("example") User_battgroup_baojigroupExample example); int updateByExample(@Param("record") User_battgroup_baojigroup record, @Param("example") User_battgroup_baojigroupExample example); int updateByPrimaryKeySelective(User_battgroup_baojigroup record); int updateByPrimaryKey(User_battgroup_baojigroup record); } MybatisGenerator/src/com/lxw/genereator/mapper/User_battgroup_baojigroupMapper.xml
New file @@ -0,0 +1,164 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.lxw.genereator.mapper.User_battgroup_baojigroupMapper"> <resultMap id="BaseResultMap" type="com.lxw.genereator.po.User_battgroup_baojigroup"> <id column="baoji_group_id" jdbcType="BIGINT" property="baojiGroupId" /> <result column="baoji_group_name" jdbcType="VARCHAR" property="baojiGroupName" /> </resultMap> <sql id="Example_Where_Clause"> <where> <foreach collection="oredCriteria" item="criteria" separator="or"> <if test="criteria.valid"> <trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="criteria.criteria" item="criterion"> <choose> <when test="criterion.noValue"> and ${criterion.condition} </when> <when test="criterion.singleValue"> and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue"> and ${criterion.condition} <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Update_By_Example_Where_Clause"> <where> <foreach collection="example.oredCriteria" item="criteria" separator="or"> <if test="criteria.valid"> <trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="criteria.criteria" item="criterion"> <choose> <when test="criterion.noValue"> and ${criterion.condition} </when> <when test="criterion.singleValue"> and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue"> and ${criterion.condition} <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Base_Column_List"> baoji_group_id, baoji_group_name </sql> <select id="selectByExample" parameterType="com.lxw.genereator.po.User_battgroup_baojigroupExample" resultMap="BaseResultMap"> select <if test="distinct"> distinct </if> <include refid="Base_Column_List" /> from tb_user_battgroup_baojigroup <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order by ${orderByClause} </if> </select> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from tb_user_battgroup_baojigroup where baoji_group_id = #{baojiGroupId,jdbcType=BIGINT} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> delete from tb_user_battgroup_baojigroup where baoji_group_id = #{baojiGroupId,jdbcType=BIGINT} </delete> <delete id="deleteByExample" parameterType="com.lxw.genereator.po.User_battgroup_baojigroupExample"> delete from tb_user_battgroup_baojigroup <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.lxw.genereator.po.User_battgroup_baojigroup"> insert into tb_user_battgroup_baojigroup (baoji_group_id, baoji_group_name) values (#{baojiGroupId,jdbcType=BIGINT}, #{baojiGroupName,jdbcType=VARCHAR}) </insert> <insert id="insertSelective" parameterType="com.lxw.genereator.po.User_battgroup_baojigroup"> insert into tb_user_battgroup_baojigroup <trim prefix="(" suffix=")" suffixOverrides=","> <if test="baojiGroupId != null"> baoji_group_id, </if> <if test="baojiGroupName != null"> baoji_group_name, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="baojiGroupId != null"> #{baojiGroupId,jdbcType=BIGINT}, </if> <if test="baojiGroupName != null"> #{baojiGroupName,jdbcType=VARCHAR}, </if> </trim> </insert> <select id="countByExample" parameterType="com.lxw.genereator.po.User_battgroup_baojigroupExample" resultType="java.lang.Long"> select count(*) from tb_user_battgroup_baojigroup <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map"> update tb_user_battgroup_baojigroup <set> <if test="record.baojiGroupId != null"> baoji_group_id = #{record.baojiGroupId,jdbcType=BIGINT}, </if> <if test="record.baojiGroupName != null"> baoji_group_name = #{record.baojiGroupName,jdbcType=VARCHAR}, </if> </set> <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByExample" parameterType="map"> update tb_user_battgroup_baojigroup set baoji_group_id = #{record.baojiGroupId,jdbcType=BIGINT}, baoji_group_name = #{record.baojiGroupName,jdbcType=VARCHAR} <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="com.lxw.genereator.po.User_battgroup_baojigroup"> update tb_user_battgroup_baojigroup <set> <if test="baojiGroupName != null"> baoji_group_name = #{baojiGroupName,jdbcType=VARCHAR}, </if> </set> where baoji_group_id = #{baojiGroupId,jdbcType=BIGINT} </update> <update id="updateByPrimaryKey" parameterType="com.lxw.genereator.po.User_battgroup_baojigroup"> update tb_user_battgroup_baojigroup set baoji_group_name = #{baojiGroupName,jdbcType=VARCHAR} where baoji_group_id = #{baojiGroupId,jdbcType=BIGINT} </update> </mapper> MybatisGenerator/src/com/lxw/genereator/mapper/User_infMapper.java
New file @@ -0,0 +1,30 @@ package com.lxw.genereator.mapper; import com.lxw.genereator.po.User_inf; import com.lxw.genereator.po.User_infExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface User_infMapper { long countByExample(User_infExample example); int deleteByExample(User_infExample example); int deleteByPrimaryKey(Long uid); int insert(User_inf record); int insertSelective(User_inf record); List<User_inf> selectByExample(User_infExample example); User_inf selectByPrimaryKey(Long uid); int updateByExampleSelective(@Param("record") User_inf record, @Param("example") User_infExample example); int updateByExample(@Param("record") User_inf record, @Param("example") User_infExample example); int updateByPrimaryKeySelective(User_inf record); int updateByPrimaryKey(User_inf record); } MybatisGenerator/src/com/lxw/genereator/mapper/User_infMapper.xml
File was renamed from MybatisGenerator/src/com/lxw/genereator/mapper/TbUserInfMapper.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.lxw.genereator.mapper.TbUserInfMapper"> <resultMap id="BaseResultMap" type="com.lxw.genereator.po.TbUserInf"> <mapper namespace="com.lxw.genereator.mapper.User_infMapper"> <resultMap id="BaseResultMap" type="com.lxw.genereator.po.User_inf"> <id column="uId" jdbcType="BIGINT" property="uid" /> <result column="uSnId" jdbcType="VARCHAR" property="usnid" /> <result column="uName" jdbcType="VARCHAR" property="uname" /> @@ -90,7 +90,7 @@ uBirthDay, uAccessionDay, uSex, uDepartment, uProTitle, uAuthority, uJobGroup, uDuties, uTasks, uBaojiUsr, uNote, upassword, uPubKeyX, uPubKeyY, uKey_ID </sql> <select id="selectByExample" parameterType="com.lxw.genereator.po.TbUserInfExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.lxw.genereator.po.User_infExample" resultMap="BaseResultMap"> select <if test="distinct"> distinct @@ -114,13 +114,13 @@ delete from tb_user_inf where uId = #{uid,jdbcType=BIGINT} </delete> <delete id="deleteByExample" parameterType="com.lxw.genereator.po.TbUserInfExample"> <delete id="deleteByExample" parameterType="com.lxw.genereator.po.User_infExample"> delete from tb_user_inf <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.lxw.genereator.po.TbUserInf"> <insert id="insert" parameterType="com.lxw.genereator.po.User_inf"> insert into tb_user_inf (uId, uSnId, uName, uShenFenId, uEmployeeId, uTelephone, uMobilephone, uEmail, uAddr, @@ -140,7 +140,7 @@ #{upubkeyx,jdbcType=VARCHAR}, #{upubkeyy,jdbcType=VARCHAR}, #{ukeyId,jdbcType=VARCHAR} ) </insert> <insert id="insertSelective" parameterType="com.lxw.genereator.po.TbUserInf"> <insert id="insertSelective" parameterType="com.lxw.genereator.po.User_inf"> insert into tb_user_inf <trim prefix="(" suffix=")" suffixOverrides=","> <if test="uid != null"> @@ -291,7 +291,7 @@ </if> </trim> </insert> <select id="countByExample" parameterType="com.lxw.genereator.po.TbUserInfExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.lxw.genereator.po.User_infExample" resultType="java.lang.Long"> select count(*) from tb_user_inf <if test="_parameter != null"> <include refid="Example_Where_Clause" /> @@ -407,7 +407,7 @@ <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="com.lxw.genereator.po.TbUserInf"> <update id="updateByPrimaryKeySelective" parameterType="com.lxw.genereator.po.User_inf"> update tb_user_inf <set> <if test="usnid != null"> @@ -482,7 +482,7 @@ </set> where uId = #{uid,jdbcType=BIGINT} </update> <update id="updateByPrimaryKey" parameterType="com.lxw.genereator.po.TbUserInf"> <update id="updateByPrimaryKey" parameterType="com.lxw.genereator.po.User_inf"> update tb_user_inf set uSnId = #{usnid,jdbcType=VARCHAR}, uName = #{uname,jdbcType=VARCHAR}, MybatisGenerator/src/com/lxw/genereator/po/User_battgroup_baojigroup.java
New file @@ -0,0 +1,23 @@ package com.lxw.genereator.po; public class User_battgroup_baojigroup { private Long baojiGroupId; private String baojiGroupName; public Long getBaojiGroupId() { return baojiGroupId; } public void setBaojiGroupId(Long baojiGroupId) { this.baojiGroupId = baojiGroupId; } public String getBaojiGroupName() { return baojiGroupName; } public void setBaojiGroupName(String baojiGroupName) { this.baojiGroupName = baojiGroupName == null ? null : baojiGroupName.trim(); } } MybatisGenerator/src/com/lxw/genereator/po/User_battgroup_baojigroupExample.java
New file @@ -0,0 +1,329 @@ package com.lxw.genereator.po; import java.util.ArrayList; import java.util.List; public class User_battgroup_baojigroupExample { protected String orderByClause; protected boolean distinct; protected List<Criteria> oredCriteria; public User_battgroup_baojigroupExample() { oredCriteria = new ArrayList<>(); } public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } public String getOrderByClause() { return orderByClause; } public void setDistinct(boolean distinct) { this.distinct = distinct; } public boolean isDistinct() { return distinct; } public List<Criteria> getOredCriteria() { return oredCriteria; } public void or(Criteria criteria) { oredCriteria.add(criteria); } public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } protected abstract static class GeneratedCriteria { protected List<Criterion> criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList<>(); } public boolean isValid() { return criteria.size() > 0; } public List<Criterion> getAllCriteria() { return criteria; } public List<Criterion> getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } public Criteria andBaojiGroupIdIsNull() { addCriterion("baoji_group_id is null"); return (Criteria) this; } public Criteria andBaojiGroupIdIsNotNull() { addCriterion("baoji_group_id is not null"); return (Criteria) this; } public Criteria andBaojiGroupIdEqualTo(Long value) { addCriterion("baoji_group_id =", value, "baojiGroupId"); return (Criteria) this; } public Criteria andBaojiGroupIdNotEqualTo(Long value) { addCriterion("baoji_group_id <>", value, "baojiGroupId"); return (Criteria) this; } public Criteria andBaojiGroupIdGreaterThan(Long value) { addCriterion("baoji_group_id >", value, "baojiGroupId"); return (Criteria) this; } public Criteria andBaojiGroupIdGreaterThanOrEqualTo(Long value) { addCriterion("baoji_group_id >=", value, "baojiGroupId"); return (Criteria) this; } public Criteria andBaojiGroupIdLessThan(Long value) { addCriterion("baoji_group_id <", value, "baojiGroupId"); return (Criteria) this; } public Criteria andBaojiGroupIdLessThanOrEqualTo(Long value) { addCriterion("baoji_group_id <=", value, "baojiGroupId"); return (Criteria) this; } public Criteria andBaojiGroupIdIn(List<Long> values) { addCriterion("baoji_group_id in", values, "baojiGroupId"); return (Criteria) this; } public Criteria andBaojiGroupIdNotIn(List<Long> values) { addCriterion("baoji_group_id not in", values, "baojiGroupId"); return (Criteria) this; } public Criteria andBaojiGroupIdBetween(Long value1, Long value2) { addCriterion("baoji_group_id between", value1, value2, "baojiGroupId"); return (Criteria) this; } public Criteria andBaojiGroupIdNotBetween(Long value1, Long value2) { addCriterion("baoji_group_id not between", value1, value2, "baojiGroupId"); return (Criteria) this; } public Criteria andBaojiGroupNameIsNull() { addCriterion("baoji_group_name is null"); return (Criteria) this; } public Criteria andBaojiGroupNameIsNotNull() { addCriterion("baoji_group_name is not null"); return (Criteria) this; } public Criteria andBaojiGroupNameEqualTo(String value) { addCriterion("baoji_group_name =", value, "baojiGroupName"); return (Criteria) this; } public Criteria andBaojiGroupNameNotEqualTo(String value) { addCriterion("baoji_group_name <>", value, "baojiGroupName"); return (Criteria) this; } public Criteria andBaojiGroupNameGreaterThan(String value) { addCriterion("baoji_group_name >", value, "baojiGroupName"); return (Criteria) this; } public Criteria andBaojiGroupNameGreaterThanOrEqualTo(String value) { addCriterion("baoji_group_name >=", value, "baojiGroupName"); return (Criteria) this; } public Criteria andBaojiGroupNameLessThan(String value) { addCriterion("baoji_group_name <", value, "baojiGroupName"); return (Criteria) this; } public Criteria andBaojiGroupNameLessThanOrEqualTo(String value) { addCriterion("baoji_group_name <=", value, "baojiGroupName"); return (Criteria) this; } public Criteria andBaojiGroupNameLike(String value) { addCriterion("baoji_group_name like", value, "baojiGroupName"); return (Criteria) this; } public Criteria andBaojiGroupNameNotLike(String value) { addCriterion("baoji_group_name not like", value, "baojiGroupName"); return (Criteria) this; } public Criteria andBaojiGroupNameIn(List<String> values) { addCriterion("baoji_group_name in", values, "baojiGroupName"); return (Criteria) this; } public Criteria andBaojiGroupNameNotIn(List<String> values) { addCriterion("baoji_group_name not in", values, "baojiGroupName"); return (Criteria) this; } public Criteria andBaojiGroupNameBetween(String value1, String value2) { addCriterion("baoji_group_name between", value1, value2, "baojiGroupName"); return (Criteria) this; } public Criteria andBaojiGroupNameNotBetween(String value1, String value2) { addCriterion("baoji_group_name not between", value1, value2, "baojiGroupName"); return (Criteria) this; } } public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } public static class Criterion { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List<?>) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } } MybatisGenerator/src/com/lxw/genereator/po/User_inf.java
File was renamed from MybatisGenerator/src/com/lxw/genereator/po/TbUserInf.java @@ -2,7 +2,7 @@ import java.util.Date; public class TbUserInf { public class User_inf { private Long uid; private String usnid; MybatisGenerator/src/com/lxw/genereator/po/User_infExample.java
File was renamed from MybatisGenerator/src/com/lxw/genereator/po/TbUserInfExample.java @@ -5,14 +5,14 @@ import java.util.Iterator; import java.util.List; public class TbUserInfExample { public class User_infExample { protected String orderByClause; protected boolean distinct; protected List<Criteria> oredCriteria; public TbUserInfExample() { public User_infExample() { oredCriteria = new ArrayList<>(); }