|
|
@@ -56,7 +56,7 @@
|
|
|
|
|
|
<!-- 通用查询列 -->
|
|
|
<sql id="Base_Column_List_list">
|
|
|
- item_id, integral_type, integral, cp_id, cp_id_from, acc_date, flg_valid, user_id, remarks
|
|
|
+ tmii.item_id, tmii.integral_type, tmii.integral, tmii.cp_id, tmii.cp_id_from, tmii.acc_date, tmii.flg_valid, tmii.user_id, tmii.remarks
|
|
|
</sql>
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
@@ -76,28 +76,28 @@
|
|
|
<sql id="Condition_list">
|
|
|
<where>
|
|
|
<if test="integralType != null and integralType != ''">
|
|
|
- AND integral_type = #{integralType}
|
|
|
+ AND tmii.integral_type = #{integralType}
|
|
|
</if>
|
|
|
<if test="integral != null">
|
|
|
- AND integral = #{integral}
|
|
|
+ AND tmii.integral = #{integral}
|
|
|
</if>
|
|
|
<if test="cpId != null">
|
|
|
- AND cp_id = #{cpId}
|
|
|
+ AND tmii.cp_id = #{cpId}
|
|
|
</if>
|
|
|
<if test="cpIdFrom != null">
|
|
|
- AND cp_id_from = #{cpIdFrom}
|
|
|
+ AND tmii.cp_id_from = #{cpIdFrom}
|
|
|
</if>
|
|
|
<if test="accDate != null">
|
|
|
- AND acc_date = #{accDate}
|
|
|
+ AND tmii.acc_date = #{accDate}
|
|
|
</if>
|
|
|
<if test="flgValid != null">
|
|
|
- AND flg_valid = #{flgValid}
|
|
|
+ AND tmii.flg_valid = #{flgValid}
|
|
|
</if>
|
|
|
<if test="userId != null and userId != ''">
|
|
|
- AND user_id = #{userId}
|
|
|
+ AND tmii.user_id = #{userId}
|
|
|
</if>
|
|
|
<if test="remarks != null and remarks != ''">
|
|
|
- AND remarks = #{remarks}
|
|
|
+ AND tmii.remarks = #{remarks}
|
|
|
</if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
@@ -114,7 +114,13 @@
|
|
|
<select id="selectByCond" resultMap="BaseResultMap_list">
|
|
|
SELECT
|
|
|
<include refid="Base_Column_List_list"/>
|
|
|
- FROM dkic_a.t_mst_integral_item
|
|
|
+ , sys.f_get_name_i18n(tdk.kind_name_i18n, #{i18n}) as "integralTypeName"
|
|
|
+ , twu.user_name as "userName"
|
|
|
+ FROM dkic_a.t_mst_integral_item tmii
|
|
|
+ left JOIN sys.t_data_kind tdk
|
|
|
+ on tmii.integral_type = tdk.kind_code
|
|
|
+ left JOIN dkic_a.t_wx_user twu
|
|
|
+ on tmii.user_id = twu.user_id
|
|
|
<include refid="Condition_list"/>
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
limit #{end} offset #{start}
|
|
|
@@ -125,7 +131,7 @@
|
|
|
<select id="countByCond" resultType="Long">
|
|
|
SELECT
|
|
|
count(1)
|
|
|
- FROM dkic_a.t_mst_integral_item
|
|
|
+ FROM dkic_a.t_mst_integral_item as tmii
|
|
|
<include refid="Condition_list"/>
|
|
|
</select>
|
|
|
|