|
@@ -16,8 +16,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="integralProportion" column="integral_proportion" />
|
|
<result property="integralProportion" column="integral_proportion" />
|
|
<result property="datePickerTime" column="date_picker_time" />
|
|
<result property="datePickerTime" column="date_picker_time" />
|
|
<result property="integralTermSetting" column="integral_term_setting" />
|
|
<result property="integralTermSetting" column="integral_term_setting" />
|
|
|
|
+ <result property="integralEmptyTime" column="integral_empty_time" />
|
|
<result property="ruleTerms" column="rule_terms" />
|
|
<result property="ruleTerms" column="rule_terms" />
|
|
<result property="grade" column="grade" />
|
|
<result property="grade" column="grade" />
|
|
|
|
+ <result property="gradeName" column="grade_name" />
|
|
<result property="oilName" column="oil_name" />
|
|
<result property="oilName" column="oil_name" />
|
|
<result property="saleAmt" column="sale_amt" />
|
|
<result property="saleAmt" column="sale_amt" />
|
|
<result property="integral" column="integral" />
|
|
<result property="integral" column="integral" />
|
|
@@ -28,12 +30,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="integralFlag" column="integral_flag" />
|
|
<result property="integralFlag" column="integral_flag" />
|
|
|
|
+ <result property="image1" column="image1" />
|
|
|
|
+ <result property="image2" column="image2" />
|
|
|
|
+ <result property="image3" column="image3" />
|
|
|
|
+ <result property="image4" column="image4" />
|
|
|
|
+ <result property="image5" column="image5" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectIntegralRuleVo">
|
|
<sql id="selectIntegralRuleVo">
|
|
- select id, station_id,d.dept_name as station_name, rule_type, term_date_manage, empty_date, integral_activity,
|
|
|
|
|
|
+ select id, station_id,d.dept_name as station_name, term_date_manage, empty_date, integral_activity,
|
|
date_picker, integral_proportion,date_picker_time,integral_term_setting,r.create_by,r.create_time,
|
|
date_picker, integral_proportion,date_picker_time,integral_term_setting,r.create_by,r.create_time,
|
|
- r.update_by,r.update_time,d.integral_flag
|
|
|
|
|
|
+ r.update_by,r.update_time,d.integral_flag,r.image1,r.image2,r.image3,r.image4,r.image5,r.integral_empty_time
|
|
from integral_rule r join sys_dept d on r.station_id =d.dept_id
|
|
from integral_rule r join sys_dept d on r.station_id =d.dept_id
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
@@ -42,7 +49,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<where>
|
|
<where>
|
|
<if test="stationId != null "> and station_id = #{stationId}</if>
|
|
<if test="stationId != null "> and station_id = #{stationId}</if>
|
|
<if test="stationName != null and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
|
|
<if test="stationName != null and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
|
|
- <if test="ruleType != null and ruleType != ''"> and rule_type = #{ruleType}</if>
|
|
|
|
<if test="termDateManage != null and termDateManage != ''"> and term_date_manage = #{termDateManage}</if>
|
|
<if test="termDateManage != null and termDateManage != ''"> and term_date_manage = #{termDateManage}</if>
|
|
<if test="emptyDate != null "> and empty_date = #{emptyDate}</if>
|
|
<if test="emptyDate != null "> and empty_date = #{emptyDate}</if>
|
|
<if test="integralActivity != null and integralActivity != ''"> and integral_activity = #{integralActivity}</if>
|
|
<if test="integralActivity != null and integralActivity != ''"> and integral_activity = #{integralActivity}</if>
|
|
@@ -71,7 +77,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="stationId != null">station_id,</if>
|
|
<if test="stationId != null">station_id,</if>
|
|
<if test="stationName != null">station_name,</if>
|
|
<if test="stationName != null">station_name,</if>
|
|
- <if test="ruleType != null">rule_type,</if>
|
|
|
|
<if test="termDateManage != null">term_date_manage,</if>
|
|
<if test="termDateManage != null">term_date_manage,</if>
|
|
<if test="emptyDate != null">empty_date,</if>
|
|
<if test="emptyDate != null">empty_date,</if>
|
|
<if test="integralActivity != null">integral_activity,</if>
|
|
<if test="integralActivity != null">integral_activity,</if>
|
|
@@ -79,15 +84,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="integralProportion != null">integral_proportion,</if>
|
|
<if test="integralProportion != null">integral_proportion,</if>
|
|
<if test="datePickerTime != null">date_picker_time,</if>
|
|
<if test="datePickerTime != null">date_picker_time,</if>
|
|
<if test="integralTermSetting != null">integral_term_setting,</if>
|
|
<if test="integralTermSetting != null">integral_term_setting,</if>
|
|
|
|
+ <if test="integralEmptyTime != null">integral_empty_time,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
+ <if test="image1 != null">image1,</if>
|
|
|
|
+ <if test="image2 != null">image2,</if>
|
|
|
|
+ <if test="image3 != null">image3,</if>
|
|
|
|
+ <if test="image4 != null">image4,</if>
|
|
|
|
+ <if test="image4 != null">image5,</if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="stationId != null">#{stationId},</if>
|
|
<if test="stationId != null">#{stationId},</if>
|
|
<if test="stationName != null">#{stationName},</if>
|
|
<if test="stationName != null">#{stationName},</if>
|
|
- <if test="ruleType != null">#{ruleType},</if>
|
|
|
|
<if test="termDateManage != null">#{termDateManage},</if>
|
|
<if test="termDateManage != null">#{termDateManage},</if>
|
|
<if test="emptyDate != null">#{emptyDate},</if>
|
|
<if test="emptyDate != null">#{emptyDate},</if>
|
|
<if test="integralActivity != null">#{integralActivity},</if>
|
|
<if test="integralActivity != null">#{integralActivity},</if>
|
|
@@ -95,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="integralProportion != null">#{integralProportion},</if>
|
|
<if test="integralProportion != null">#{integralProportion},</if>
|
|
<if test="datePickerTime != null">#{datePickerTime},</if>
|
|
<if test="datePickerTime != null">#{datePickerTime},</if>
|
|
<if test="integralTermSetting != null">#{integralTermSetting},</if>
|
|
<if test="integralTermSetting != null">#{integralTermSetting},</if>
|
|
|
|
+ <if test="integralEmptyTime != null">#{integralEmptyTime},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
@@ -107,7 +118,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="stationId != null">station_id = #{stationId},</if>
|
|
<if test="stationId != null">station_id = #{stationId},</if>
|
|
<if test="stationName != null">station_name = #{stationName},</if>
|
|
<if test="stationName != null">station_name = #{stationName},</if>
|
|
- <if test="ruleType != null">rule_type = #{ruleType},</if>
|
|
|
|
<if test="termDateManage != null">term_date_manage = #{termDateManage},</if>
|
|
<if test="termDateManage != null">term_date_manage = #{termDateManage},</if>
|
|
<if test="emptyDate != null">empty_date = #{emptyDate},</if>
|
|
<if test="emptyDate != null">empty_date = #{emptyDate},</if>
|
|
<if test="integralActivity != null">integral_activity = #{integralActivity},</if>
|
|
<if test="integralActivity != null">integral_activity = #{integralActivity},</if>
|
|
@@ -115,6 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="integralProportion != null">integral_proportion = #{integralProportion},</if>
|
|
<if test="integralProportion != null">integral_proportion = #{integralProportion},</if>
|
|
<if test="datePickerTime != null "> date_picker_time = #{datePickerTime},</if>
|
|
<if test="datePickerTime != null "> date_picker_time = #{datePickerTime},</if>
|
|
<if test="integralTermSetting != null "> integral_term_setting = #{integralTermSetting},</if>
|
|
<if test="integralTermSetting != null "> integral_term_setting = #{integralTermSetting},</if>
|
|
|
|
+ <if test="integralEmptyTime != null"> integral_empty_time=#{integralEmptyTime},</if>
|
|
<if test="createBy != null "> create_by = #{createBy},</if>
|
|
<if test="createBy != null "> create_by = #{createBy},</if>
|
|
<if test="createTime != null "> create_time = #{createTime},</if>
|
|
<if test="createTime != null "> create_time = #{createTime},</if>
|
|
<if test="updateBy != null "> update_by = #{updateBy},</if>
|
|
<if test="updateBy != null "> update_by = #{updateBy},</if>
|
|
@@ -138,7 +149,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<where>
|
|
<where>
|
|
<if test="stationId != null "> and station_id = #{stationId}</if>
|
|
<if test="stationId != null "> and station_id = #{stationId}</if>
|
|
<if test="stationName != null and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
|
|
<if test="stationName != null and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
|
|
- <if test="ruleType != null and ruleType != ''"> and rule_type = #{ruleType}</if>
|
|
|
|
<if test="termDateManage != null and termDateManage != ''"> and term_date_manage = #{termDateManage}</if>
|
|
<if test="termDateManage != null and termDateManage != ''"> and term_date_manage = #{termDateManage}</if>
|
|
<if test="emptyDate != null "> and empty_date = #{emptyDate}</if>
|
|
<if test="emptyDate != null "> and empty_date = #{emptyDate}</if>
|
|
<if test="integralActivity != null and integralActivity != ''"> and integral_activity = #{integralActivity}</if>
|
|
<if test="integralActivity != null and integralActivity != ''"> and integral_activity = #{integralActivity}</if>
|
|
@@ -146,6 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="integralProportion != null and integralProportion != ''"> and integral_proportion = #{integralProportion}</if>
|
|
<if test="integralProportion != null and integralProportion != ''"> and integral_proportion = #{integralProportion}</if>
|
|
<if test="datePickerTime != null and datePickerTime != ''"> and date_picker_time = #{datePickerTime}</if>
|
|
<if test="datePickerTime != null and datePickerTime != ''"> and date_picker_time = #{datePickerTime}</if>
|
|
<if test="integralTermSetting != null and integralTermSetting != ''"> and integral_term_setting = #{integralTermSetting}</if>
|
|
<if test="integralTermSetting != null and integralTermSetting != ''"> and integral_term_setting = #{integralTermSetting}</if>
|
|
|
|
+ <if test="integralEmptyTime != null and integralEmptyTime != ''"> and integral_empty_time = #{integralEmptyTime}</if>
|
|
<if test="stationIdList != null ">
|
|
<if test="stationIdList != null ">
|
|
and station_id in
|
|
and station_id in
|
|
<foreach item="item" index="index" collection="stationIdList"
|
|
<foreach item="item" index="index" collection="stationIdList"
|
|
@@ -158,16 +169,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="listRuleInfo" parameterType="IntegralRule" resultMap="IntegralRuleResult">
|
|
<select id="listRuleInfo" parameterType="IntegralRule" resultMap="IntegralRuleResult">
|
|
- SELECT a.station_id,d.dept_name as station_name,a.term_date_manage,a.integral_activity,empty_date,date_picker,integral_proportion,
|
|
|
|
- b.rule_type,rule_terms,grade,
|
|
|
|
- oil_name,sale_amt,integral,oil_type,c.integral_flag
|
|
|
|
|
|
+ SELECT a.station_id,d.dept_name as station_name,a.term_date_manage,a.integral_activity,empty_date,date_picker,integral_proportion,s.grade as grade_name,
|
|
|
|
+ b.rule_type,rule_terms,b.grade,b.oil_name,b.sale_amt,b.integral,b.oil_type,c.integral_flag,a.integral_empty_time
|
|
from integral_rule a
|
|
from integral_rule a
|
|
join integral_rule_detail b on a.id =b.parent_id
|
|
join integral_rule_detail b on a.id =b.parent_id
|
|
join station_pay c on a.station_id =c.station_id
|
|
join station_pay c on a.station_id =c.station_id
|
|
join sys_dept d on a.station_id =d.dept_id
|
|
join sys_dept d on a.station_id =d.dept_id
|
|
|
|
+ left join customer_grade_setting s on s.id = b.grade
|
|
<where>
|
|
<where>
|
|
<if test="stationId != null "> and a.station_id = #{stationId}</if>
|
|
<if test="stationId != null "> and a.station_id = #{stationId}</if>
|
|
- <if test="stationName != null and stationName != ''"> and a.station_name like concat('%', #{stationName}, '%')</if>
|
|
|
|
|
|
+ <if test="stationName != null and stationName != ''"> and d.dept_name like concat('%', #{stationName}, '%')</if>
|
|
<if test="stationIdList != null ">
|
|
<if test="stationIdList != null ">
|
|
and a.station_id in
|
|
and a.station_id in
|
|
<foreach item="item" index="index" collection="stationIdList"
|
|
<foreach item="item" index="index" collection="stationIdList"
|
|
@@ -176,6 +187,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
|
|
+ order by b.oil_name desc
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
</mapper>
|
|
</mapper>
|