|
|
@@ -88,15 +88,15 @@
|
|
|
order by ${orderByClause}
|
|
|
</if>
|
|
|
</select>
|
|
|
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from maxnumbers
|
|
|
- where mn_id = #{id,jdbcType=INTEGER}
|
|
|
+ where mn_id = #{id}
|
|
|
</select>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
|
|
delete from maxnumbers
|
|
|
- where mn_id = #{id,jdbcType=INTEGER}
|
|
|
+ where mn_id = #{id}
|
|
|
</delete>
|
|
|
<delete id="deleteByExample" parameterType="com.usoftchina.saas.commons.po.MaxnumbersExample" >
|
|
|
delete from maxnumbers
|
|
|
@@ -105,27 +105,30 @@
|
|
|
</if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.usoftchina.saas.commons.po.Maxnumbers" >
|
|
|
- insert into maxnumbers (mn_id, mn_caller, mn_leadcode,
|
|
|
+ insert into maxnumbers (mn_caller, mn_leadcode,
|
|
|
mn_number, companyId, createTime,
|
|
|
creatorId, updateTime, updaterId
|
|
|
)
|
|
|
- values (#{id,jdbcType=INTEGER}, #{mn_caller,jdbcType=VARCHAR}, #{mn_leadcode,jdbcType=VARCHAR},
|
|
|
+ values (#{mn_caller,jdbcType=VARCHAR}, #{mn_leadcode,jdbcType=VARCHAR},
|
|
|
#{mn_number,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
#{creatorId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=INTEGER}
|
|
|
)
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.usoftchina.saas.commons.po.Maxnumbers" >
|
|
|
+ <selectKey resultType="java.lang.Long" keyProperty="id">
|
|
|
+ SELECT LAST_INSERT_ID() AS ID
|
|
|
+ </selectKey>
|
|
|
insert into maxnumbers
|
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
- <if test="id != null" >
|
|
|
- mn_id,
|
|
|
- </if>
|
|
|
<if test="mn_caller != null" >
|
|
|
mn_caller,
|
|
|
</if>
|
|
|
<if test="mn_leadcode != null" >
|
|
|
mn_leadcode,
|
|
|
</if>
|
|
|
+ <if test="mn_rule != null" >
|
|
|
+ mn_rule,
|
|
|
+ </if>
|
|
|
<if test="mn_number != null" >
|
|
|
mn_number,
|
|
|
</if>
|
|
|
@@ -146,15 +149,15 @@
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
- <if test="id != null" >
|
|
|
- #{id,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
<if test="mn_caller != null" >
|
|
|
#{mn_caller,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="mn_leadcode != null" >
|
|
|
#{mn_leadcode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="mn_rule != null" >
|
|
|
+ #{mn_rule,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="mn_number != null" >
|
|
|
#{mn_number,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -175,7 +178,7 @@
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
- <select id="countByExample" parameterType="com.usoftchina.saas.commons.po.MaxnumbersExample" resultType="java.lang.Integer" >
|
|
|
+ <select id="countByExample" parameterType="com.usoftchina.saas.commons.po.MaxnumbersExample" resultType="java.lang.Long" >
|
|
|
select count(*) from maxnumbers
|
|
|
<if test="_parameter != null" >
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
@@ -240,6 +243,9 @@
|
|
|
<if test="mn_leadcode != null" >
|
|
|
mn_leadcode = #{mn_leadcode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="mn_rule != null" >
|
|
|
+ mn_rule = #{mn_rule,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="mn_number != null" >
|
|
|
mn_number = #{mn_number,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -259,7 +265,7 @@
|
|
|
updaterId = #{updaterId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</set>
|
|
|
- where mn_id = #{id,jdbcType=INTEGER}
|
|
|
+ where mn_id = #{id}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.commons.po.Maxnumbers" >
|
|
|
update maxnumbers
|
|
|
@@ -271,6 +277,18 @@
|
|
|
creatorId = #{creatorId,jdbcType=INTEGER},
|
|
|
updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
updaterId = #{updaterId,jdbcType=INTEGER}
|
|
|
- where mn_id = #{id,jdbcType=INTEGER}
|
|
|
+ where mn_id = #{id}
|
|
|
</update>
|
|
|
+ <select id="getListDataByCondition" resultMap="BaseResultMap">
|
|
|
+ SELECT * FROM MAXNUMBERS
|
|
|
+ <where>
|
|
|
+ <if test="condition">
|
|
|
+ ${condition}
|
|
|
+ </if>
|
|
|
+ <if test="companyId">
|
|
|
+ and COMPANYID=#{companyId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY MN_ID DESC
|
|
|
+ </select>
|
|
|
</mapper>
|