| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="feeDiscountServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存费用折扣信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveFeeDiscountInfo" parameterType="Map"> |
| | | insert into fee_discount( |
| | |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询费用折扣信息 add by wuxw 2018-07-03 --> |
| | | <select id="getFeeDiscountInfo" parameterType="Map" resultType="Map"> |
| | | select t.discount_name,t.discount_name discountName,t.discount_desc,t.discount_desc |
| | | discountDesc,t.discount_type,t.discount_type discountType,t.status_cd,t.status_cd |
| | | discountDesc,t.discount_type,t.discount_type discountType,td.name discountTypeName,t.status_cd,t.status_cd |
| | | statusCd,t.discount_id,t.discount_id discountId,t.community_id,t.community_id communityId,t.rule_id,t.rule_id |
| | | ruleId,t.create_time createTime,fdr.rule_name ruleName,fdr.bean_impl beanImpl |
| | | from fee_discount t |
| | | left join fee_discount_rule fdr on t.rule_id = fdr.rule_id and fdr.status_cd = '0' |
| | | where 1 =1 |
| | | left join t_dict td on td.status_cd = t.discount_type and td.table_name = 'fee_discount' |
| | | and table_columns = 'discount_type' |
| | | where 1 = 1 |
| | | <if test="discountName !=null and discountName != ''"> |
| | | and t.discount_name= #{discountName} |
| | | and t.discount_name like '%${discountName}%' |
| | | </if> |
| | | <if test="ruleName !=null and ruleName != ''"> |
| | | and fdr.rule_name like '%${ruleName}%' |
| | | </if> |
| | | <if test="discountDesc !=null and discountDesc != ''"> |
| | | and t.discount_desc= #{discountDesc} |
| | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改费用折扣信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateFeeDiscountInfo" parameterType="Map"> |
| | |
| | | <if test="discountId !=null and discountId != ''"> |
| | | and t.discount_id= #{discountId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询费用折扣数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryFeeDiscountsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from fee_discount t |
| | | where 1 =1 |
| | | left join fee_discount_rule fdr on t.rule_id = fdr.rule_id and fdr.status_cd = '0' |
| | | where 1 = 1 |
| | | <if test="discountName !=null and discountName != ''"> |
| | | and t.discount_name= #{discountName} |
| | | and t.discount_name like '%${discountName}%' |
| | | </if> |
| | | <if test="ruleName !=null and ruleName != ''"> |
| | | and fdr.rule_name like '%${ruleName}%' |
| | | </if> |
| | | <if test="discountDesc !=null and discountDesc != ''"> |
| | | and t.discount_desc= #{discountDesc} |
| | |
| | | <if test="ruleId !=null and ruleId != ''"> |
| | | and t.rule_id= #{ruleId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |