|
@@ -1,86 +1,125 @@
|
|
|
<?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.ym.mec.biz.dal.dao.MemberFeeSettingDao">
|
|
|
-
|
|
|
- <resultMap type="com.ym.mec.biz.dal.entity.MemberFeeSetting" id="MemberFeeSetting">
|
|
|
+
|
|
|
+ <resultMap type="com.ym.mec.biz.dal.entity.MemberFeeSetting"
|
|
|
+ id="MemberFeeSetting">
|
|
|
<result column="id_" property="id" />
|
|
|
<result column="current_day_fee_" property="currentDayFee" />
|
|
|
+ <result column="group_purchase_day_fee_" property="groupPurchaseDayFee" />
|
|
|
<result column="original_day_fee_" property="originalDayFee" />
|
|
|
<result column="current_month_fee_" property="currentMonthFee" />
|
|
|
+ <result column="group_purchase_month_fee_" property="groupPurchaseMonthFee" />
|
|
|
<result column="original_month_fee_" property="originalMonthFee" />
|
|
|
+ <result column="current_quarterly_fee_" property="currentQuarterlyFee" />
|
|
|
+ <result column="group_purchase_quarterly_fee_" property="groupPurchaseQuarterlyFee" />
|
|
|
+ <result column="original_quarterly_fee_" property="originalQuarterlyFee" />
|
|
|
<result column="current_half_year_fee_" property="currentHalfYearFee" />
|
|
|
+ <result column="group_purchase_half_year_fee_" property="groupPurchaseHalfYearFee" />
|
|
|
<result column="original_half_year_fee_" property="originalHalfYearFee" />
|
|
|
<result column="current_year_fee_" property="currentYearFee" />
|
|
|
+ <result column="group_purchase_year_fee_" property="groupPurchaseYearFee" />
|
|
|
<result column="original_year_fee_" property="originalYearFee" />
|
|
|
</resultMap>
|
|
|
-
|
|
|
+
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
|
- <select id="get" resultMap="MemberFeeSetting" >
|
|
|
- SELECT * FROM member_fee_setting WHERE id_ = #{id}
|
|
|
+ <select id="get" resultMap="MemberFeeSetting">
|
|
|
+ SELECT * FROM
|
|
|
+ member_fee_setting WHERE id_ = #{id}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<!-- 全查询 -->
|
|
|
<select id="findAll" resultMap="MemberFeeSetting">
|
|
|
- SELECT * FROM member_fee_setting ORDER BY id_
|
|
|
+ SELECT * FROM member_fee_setting
|
|
|
+ ORDER BY id_
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
|
- <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.MemberFeeSetting" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
- INSERT INTO member_fee_setting (current_day_fee_,original_day_fee_,current_month_fee_,original_month_fee_,current_half_year_fee_,original_half_year_fee_,current_year_fee_,original_year_fee_)
|
|
|
- VALUES(#{currentDayFee},#{originalDayFee},#{currentMonthFee},#{originalMonthFee},#{currentHalfYearFee},#{originalHalfYearFee},#{currentYearFee},#{originalYearFee})
|
|
|
+ <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.MemberFeeSetting"
|
|
|
+ useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
+ <!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval
|
|
|
+ AS ID FROM DUAL </selectKey> -->
|
|
|
+ INSERT INTO member_fee_setting
|
|
|
+ (id_,current_day_fee_,group_purchase_day_fee_,original_day_fee_,current_month_fee_,group_purchase_month_fee_,original_month_fee_,current_quarterly_fee_,group_purchase_quarterly_fee_,original_quarterly_fee_,current_half_year_fee_,group_purchase_half_year_fee_,original_half_year_fee_,current_year_fee_,group_purchase_year_fee_,original_year_fee_)
|
|
|
+ VALUES(#{id},#{currentDayFee},#{groupPurchaseDayFee},#{originalDayFee},#{currentMonthFee},#{groupPurchaseMonthFee},#{originalMonthFee},#{currentQuarterlyFee},#{groupPurchaseQuarterlyFee},#{originalQuarterlyFee},#{currentHalfYearFee},#{groupPurchaseHalfYearFee},#{originalHalfYearFee},#{currentYearFee},#{groupPurchaseYearFee},#{originalYearFee})
|
|
|
</insert>
|
|
|
-
|
|
|
+
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
|
<update id="update" parameterType="com.ym.mec.biz.dal.entity.MemberFeeSetting">
|
|
|
- UPDATE member_fee_setting <set>
|
|
|
- <if test="originalHalfYearFee != null">
|
|
|
- original_half_year_fee_ = #{originalHalfYearFee},
|
|
|
- </if>
|
|
|
- <if test="originalDayFee != null">
|
|
|
- original_day_fee_ = #{originalDayFee},
|
|
|
- </if>
|
|
|
- <if test="currentHalfYearFee != null">
|
|
|
- current_half_year_fee_ = #{currentHalfYearFee},
|
|
|
- </if>
|
|
|
- <if test="currentMonthFee != null">
|
|
|
- current_month_fee_ = #{currentMonthFee},
|
|
|
- </if>
|
|
|
- <if test="currentDayFee != null">
|
|
|
- current_day_fee_ = #{currentDayFee},
|
|
|
- </if>
|
|
|
- <if test="originalMonthFee != null">
|
|
|
- original_month_fee_ = #{originalMonthFee},
|
|
|
- </if>
|
|
|
- <if test="originalYearFee != null">
|
|
|
- original_year_fee_ = #{originalYearFee},
|
|
|
- </if>
|
|
|
- <if test="currentYearFee != null">
|
|
|
- current_year_fee_ = #{currentYearFee},
|
|
|
- </if>
|
|
|
- </set> WHERE id_ = #{id}
|
|
|
+ UPDATE member_fee_setting
|
|
|
+ <set>
|
|
|
+ <if test="originalHalfYearFee != null">
|
|
|
+ original_half_year_fee_ = #{originalHalfYearFee},
|
|
|
+ </if>
|
|
|
+ <if test="originalQuarterlyFee != null">
|
|
|
+ original_quarterly_fee_ = #{originalQuarterlyFee},
|
|
|
+ </if>
|
|
|
+ <if test="originalDayFee != null">
|
|
|
+ original_day_fee_ = #{originalDayFee},
|
|
|
+ </if>
|
|
|
+ <if test="id != null">
|
|
|
+ id_ = #{id},
|
|
|
+ </if>
|
|
|
+ <if test="currentHalfYearFee != null">
|
|
|
+ current_half_year_fee_ = #{currentHalfYearFee},
|
|
|
+ </if>
|
|
|
+ <if test="currentQuarterlyFee != null">
|
|
|
+ current_quarterly_fee_ = #{currentQuarterlyFee},
|
|
|
+ </if>
|
|
|
+ <if test="currentDayFee != null">
|
|
|
+ current_day_fee_ = #{currentDayFee},
|
|
|
+ </if>
|
|
|
+ <if test="groupPurchaseQuarterlyFee != null">
|
|
|
+ group_purchase_quarterly_fee_ = #{groupPurchaseQuarterlyFee},
|
|
|
+ </if>
|
|
|
+ <if test="groupPurchaseHalfYearFee != null">
|
|
|
+ group_purchase_half_year_fee_ = #{groupPurchaseHalfYearFee},
|
|
|
+ </if>
|
|
|
+ <if test="currentYearFee != null">
|
|
|
+ current_year_fee_ = #{currentYearFee},
|
|
|
+ </if>
|
|
|
+ <if test="groupPurchaseDayFee != null">
|
|
|
+ group_purchase_day_fee_ = #{groupPurchaseDayFee},
|
|
|
+ </if>
|
|
|
+ <if test="groupPurchaseMonthFee != null">
|
|
|
+ group_purchase_month_fee_ = #{groupPurchaseMonthFee},
|
|
|
+ </if>
|
|
|
+ <if test="groupPurchaseYearFee != null">
|
|
|
+ group_purchase_year_fee_ = #{groupPurchaseYearFee},
|
|
|
+ </if>
|
|
|
+ <if test="currentMonthFee != null">
|
|
|
+ current_month_fee_ = #{currentMonthFee},
|
|
|
+ </if>
|
|
|
+ <if test="originalMonthFee != null">
|
|
|
+ original_month_fee_ = #{originalMonthFee},
|
|
|
+ </if>
|
|
|
+ <if test="originalYearFee != null">
|
|
|
+ original_year_fee_ = #{originalYearFee},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ WHERE id_ = #{id}
|
|
|
</update>
|
|
|
-
|
|
|
- <!-- 根据主键删除一条记录 -->
|
|
|
- <delete id="delete" >
|
|
|
- DELETE FROM member_fee_setting WHERE id_ = #{id}
|
|
|
- </delete>
|
|
|
-
|
|
|
+
|
|
|
<!-- 分页查询 -->
|
|
|
- <select id="queryPage" resultMap="MemberFeeSetting" parameterType="map">
|
|
|
- SELECT * FROM member_fee_setting ORDER BY id_ <include refid="global.limit"/>
|
|
|
+ <select id="queryPage" resultMap="MemberFeeSetting"
|
|
|
+ parameterType="map">
|
|
|
+ SELECT * FROM member_fee_setting ORDER BY id_
|
|
|
+ <include refid="global.limit" />
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<!-- 查询当前表的总记录数 -->
|
|
|
<select id="queryCount" resultType="int">
|
|
|
- SELECT COUNT(*) FROM member_fee_setting
|
|
|
+ SELECT COUNT(*) FROM
|
|
|
+ member_fee_setting
|
|
|
</select>
|
|
|
- <select id="findByRankIdAndOrganId" resultMap="MemberFeeSetting">
|
|
|
- SELECT mfs.* FROM member_rank_organization_fee_mapper mro
|
|
|
- LEFT JOIN member_fee_setting mfs ON mfs.id_ = mro.member_fee_setting_id_
|
|
|
- WHERE mro.member_rank_setting_id_ = #{rankId} AND mro.organ_id_ = #{organId}
|
|
|
+
|
|
|
+ <select id="findByRankIdAndOrganId" resultMap="MemberFeeSetting">
|
|
|
+ SELECT mfs.* FROM
|
|
|
+ member_rank_organization_fee_mapper mro
|
|
|
+ LEFT JOIN member_fee_setting
|
|
|
+ mfs ON mfs.id_ = mro.member_fee_setting_id_
|
|
|
+ WHERE
|
|
|
+ mro.member_rank_setting_id_ = #{rankId} AND mro.organ_id_ = #{organId}
|
|
|
</select>
|
|
|
</mapper>
|