|
@@ -3,8 +3,8 @@
|
|
|
<mapper namespace="com.usoftchina.saas.document.mapper.CurrencyMapper" >
|
|
<mapper namespace="com.usoftchina.saas.document.mapper.CurrencyMapper" >
|
|
|
<resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Currency" >
|
|
<resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Currency" >
|
|
|
<id column="cr_id" property="id" jdbcType="INTEGER" />
|
|
<id column="cr_id" property="id" jdbcType="INTEGER" />
|
|
|
- <result column="cr_name" property="name" jdbcType="VARCHAR" />
|
|
|
|
|
- <result column="cr_rate" property="rate" jdbcType="VARCHAR" />
|
|
|
|
|
|
|
+ <result column="cr_name" property="cr_name" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="cr_rate" property="cr_rate" jdbcType="VARCHAR" />
|
|
|
<result column="companyId" property="companyId" jdbcType="INTEGER" />
|
|
<result column="companyId" property="companyId" jdbcType="INTEGER" />
|
|
|
<result column="creatorId" property="creatorId" jdbcType="INTEGER" />
|
|
<result column="creatorId" property="creatorId" jdbcType="INTEGER" />
|
|
|
<result column="updaterId" property="updaterId" jdbcType="INTEGER" />
|
|
<result column="updaterId" property="updaterId" jdbcType="INTEGER" />
|
|
@@ -12,7 +12,7 @@
|
|
|
<result column="creatorName" property="creatorName" jdbcType="INTEGER" />
|
|
<result column="creatorName" property="creatorName" jdbcType="INTEGER" />
|
|
|
<result column="updaterName" property="updaterName" jdbcType="INTEGER" />
|
|
<result column="updaterName" property="updaterName" jdbcType="INTEGER" />
|
|
|
<result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
|
|
<result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
|
|
|
- <result column="cr_standard" property="standard" jdbcType="INTEGER" />
|
|
|
|
|
|
|
+ <result column="cr_standard" property="cr_standard" jdbcType="INTEGER" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
<sql id="Base_Column_List" >
|
|
|
cr_id, cr_name, cr_rate, companyId, creatorId, updaterId, updateTime, creatorName, updaterName, createTime, cr_standard
|
|
cr_id, cr_name, cr_rate, companyId, creatorId, updaterId, updateTime, creatorName, updaterName, createTime, cr_standard
|
|
@@ -30,13 +30,13 @@
|
|
|
<insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Currency" >
|
|
<insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Currency" >
|
|
|
insert into Currencys
|
|
insert into Currencys
|
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
- <if test="name != null" >
|
|
|
|
|
|
|
+ <if test="cr_name != null" >
|
|
|
cr_name,
|
|
cr_name,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="rate != null">
|
|
|
|
|
|
|
+ <if test="cr_rate != null">
|
|
|
cr_rate,
|
|
cr_rate,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="standard != null">
|
|
|
|
|
|
|
+ <if test="cr_standard != null">
|
|
|
cr_standard,
|
|
cr_standard,
|
|
|
</if>
|
|
</if>
|
|
|
<if test="companyId != null" >
|
|
<if test="companyId != null" >
|
|
@@ -59,14 +59,14 @@
|
|
|
</if>
|
|
</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
- <if test="name != null" >
|
|
|
|
|
- #{name,jdbcType=VARCHAR},
|
|
|
|
|
|
|
+ <if test="cr_name != null" >
|
|
|
|
|
+ #{cr_name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="rate != null" >
|
|
|
|
|
- #{rate,jdbcType=DOUBLE},
|
|
|
|
|
|
|
+ <if test="cr_rate != null" >
|
|
|
|
|
+ #{cr_rate,jdbcType=DOUBLE},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="standard != null" >
|
|
|
|
|
- #{standard,jdbcType=INTEGER},
|
|
|
|
|
|
|
+ <if test="cr_standard != null" >
|
|
|
|
|
+ #{cr_standard,jdbcType=INTEGER},
|
|
|
</if>
|
|
</if>
|
|
|
<if test="companyId != null" >
|
|
<if test="companyId != null" >
|
|
|
#{companyId,jdbcType=INTEGER},
|
|
#{companyId,jdbcType=INTEGER},
|
|
@@ -91,14 +91,14 @@
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Currency" >
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Currency" >
|
|
|
update Currencys
|
|
update Currencys
|
|
|
<set >
|
|
<set >
|
|
|
- <if test="name != null" >
|
|
|
|
|
- cr_name = #{name,jdbcType=VARCHAR},
|
|
|
|
|
|
|
+ <if test="cr_name != null" >
|
|
|
|
|
+ cr_name = #{cr_name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="rate != null" >
|
|
|
|
|
- cr_rate = #{rate,jdbcType=DOUBLE},
|
|
|
|
|
|
|
+ <if test="cr_rate != null" >
|
|
|
|
|
+ cr_rate = #{cr_rate,jdbcType=DOUBLE},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="standard != null" >
|
|
|
|
|
- cr_standard = #{standard,jdbcType=INTEGER},
|
|
|
|
|
|
|
+ <if test="cr_standard != null" >
|
|
|
|
|
+ cr_standard = #{cr_standard,jdbcType=INTEGER},
|
|
|
</if>
|
|
</if>
|
|
|
<if test="companyId != null" >
|
|
<if test="companyId != null" >
|
|
|
companyId = #{companyId,jdbcType=INTEGER},
|
|
companyId = #{companyId,jdbcType=INTEGER},
|
|
@@ -115,4 +115,16 @@
|
|
|
<select id="selectByCompanyId" resultMap="BaseResultMap">
|
|
<select id="selectByCompanyId" resultMap="BaseResultMap">
|
|
|
SELECT * FROM Currencys where companyId=#{companyId} ORDER BY CR_ID DESC
|
|
SELECT * FROM Currencys where companyId=#{companyId} ORDER BY CR_ID DESC
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+ <select id="getAll" resultMap="BaseResultMap">
|
|
|
|
|
+ SELECT * FROM Currencys
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="condition != null">
|
|
|
|
|
+ ${condition}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyId != null">
|
|
|
|
|
+ and companyId = #{companyId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ ORDER BY CR_ID DESC
|
|
|
|
|
+ </select>
|
|
|
</mapper>
|
|
</mapper>
|