|
|
@@ -20,7 +20,6 @@
|
|
|
<collection property="requirement" column="id=id" select="selectRequirement" />
|
|
|
</resultMap>
|
|
|
|
|
|
-
|
|
|
<resultMap id="partner_attribute" type="com.jzg.entity.PartnerAttribute">
|
|
|
<result property="id" column="id"/>
|
|
|
<result property="min" column="min"/>
|
|
|
@@ -36,28 +35,66 @@
|
|
|
<result property="taskDays" column="task_days"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <!-- 查询全部规则 -->
|
|
|
<select id="queryAll" resultMap="BaseMapper">
|
|
|
- select id, upgrade, relegation, grade_name, grade, appraise, rel_satisfy,strategy,kh_days,fall_tick,fall_amount,system_code from partner_rule
|
|
|
+ select
|
|
|
+ id, upgrade, relegation, grade_name, grade, appraise, rel_satisfy,
|
|
|
+ strategy,kh_days,fall_tick,fall_amount,system_code
|
|
|
+ from partner_rule
|
|
|
+ <where>
|
|
|
+ AND is_delete = 0
|
|
|
+ </where>
|
|
|
</select>
|
|
|
|
|
|
-
|
|
|
+ <!-- 根据等级查询 -->
|
|
|
<select id="selectByGrade" resultMap="BaseMapper">
|
|
|
- select id, upgrade, relegation, grade_name, grade, appraise, rel_satisfy,strategy,kh_days,fall_tick,fall_amount from partner_rule where grade = #{grade}
|
|
|
+ select
|
|
|
+ id, upgrade, relegation, grade_name, grade, appraise, rel_satisfy,
|
|
|
+ strategy,kh_days,fall_tick,fall_amount
|
|
|
+ from partner_rule
|
|
|
+ <where>
|
|
|
+ AND is_delete = 0
|
|
|
+ <if test="grade != null">
|
|
|
+ AND grade = #{grade}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
</select>
|
|
|
|
|
|
|
|
|
+ <!-- 查询周期 -->
|
|
|
<select id="selectCycle" resultMap="partner_attribute">
|
|
|
- select id,min,max,satisfy,rule_id,requirement,strategy,cycle,type,checked,fixed_days,task_days from partner_attribute where type = 1 and rule_id = #{id}
|
|
|
+ select
|
|
|
+ id,min,max,satisfy,rule_id,requirement,strategy,cycle,type,checked,fixed_days,task_days
|
|
|
+ from partner_attribute
|
|
|
+ <where>
|
|
|
+ AND is_delete = 0
|
|
|
+ AND type = 1
|
|
|
+ AND rule_id = #{id}
|
|
|
+ </where>
|
|
|
</select>
|
|
|
|
|
|
-
|
|
|
+ <!-- 查询策略 -->
|
|
|
<select id="selectStrategy" resultMap="partner_attribute">
|
|
|
- select id,min,max,satisfy,rule_id,requirement,strategy,cycle,type,checked,fixed_days,task_days from partner_attribute where type = 3 and rule_id = #{id}
|
|
|
+ select
|
|
|
+ id,min,max,satisfy,rule_id,requirement,strategy,cycle,type,checked,fixed_days,task_days
|
|
|
+ from partner_attribute
|
|
|
+ <where>
|
|
|
+ AND is_delete = 0
|
|
|
+ AND type = 3
|
|
|
+ AND rule_id = #{id}
|
|
|
+ </where>
|
|
|
</select>
|
|
|
|
|
|
+ <!-- 查询要求 -->
|
|
|
<select id="selectRequirement" resultMap="partner_attribute">
|
|
|
- select id,min,max,satisfy,rule_id,requirement,strategy,cycle,type,checked,fixed_days,task_days from partner_attribute where type = 2 and rule_id = #{id}
|
|
|
+ select
|
|
|
+ id,min,max,satisfy,rule_id,requirement,strategy,cycle,type,checked,fixed_days,task_days
|
|
|
+ from partner_attribute
|
|
|
+ <where>
|
|
|
+ AND is_delete = 0
|
|
|
+ AND type = 2
|
|
|
+ AND rule_id = #{id}
|
|
|
+ </where>
|
|
|
</select>
|
|
|
|
|
|
-
|
|
|
</mapper>
|