88e030b7
王彪总
init project
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
<?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="feeComboMemberV1ServiceDaoImpl">
<!-- 保存套餐成员信息 add by wuxw 2018-07-03 -->
<insert id="saveFeeComboMemberInfo" parameterType="Map">
insert into fee_combo_member(config_id, combo_id, community_id, member_id)
values (#{configId}, #{comboId}, #{communityId}, #{memberId})
</insert>
<!-- 查询套餐成员信息 add by wuxw 2018-07-03 -->
<select id="getFeeComboMemberInfo" parameterType="Map" resultType="Map">
select t.member_id,t.member_id memberId,pfc.fee_type_cd,pfc.fee_type_cd
feeTypeCd,pfc.computing_formula,pfc.computing_formula
computingFormula,pfc.additional_amount,pfc.additional_amount additionalAmount,pfc.status_cd,pfc.status_cd
statusCd,pfc.square_price,pfc.square_price squarePrice,pfc.is_default,pfc.is_default
isDefault,pfc.config_id,pfc.config_id
configId,pfc.fee_flag,pfc.fee_flag feeFlag,pfc.fee_name,pfc.fee_name feeName,pfc.start_time,pfc.start_time
startTime,pfc.end_time,pfc.end_time endTime,pfc.community_id,pfc.community_id communityId,pfc.b_id,pfc.b_id bId,
td1.name feeTypeCdName,td2.name feeFlagName,pfc.bill_type billType,pfc.bill_type,td3.name billTypeName,
pfc.payment_cd,pfc.payment_cycle,pfc.payment_cd paymentCd,pfc.payment_cycle paymentCycle,
pfc.computing_formula_text,pfc.computing_formula_text computingFormulaText
from fee_combo_member t, pay_fee_config pfc,t_dict td1,t_dict td2,t_dict td3
where 1 =1
and t.config_id = pfc.config_id
and pfc.fee_type_cd = td1.status_cd
and td1.table_name = 'pay_fee_config'
and td1.table_columns = 'fee_type_cd'
and pfc.fee_flag = td2.status_cd
and td2.table_name = 'pay_fee_config'
and td2.table_columns = 'fee_flag'
and pfc.bill_type = td3.status_cd
and td3.table_name = 'pay_fee_config'
and td3.table_columns = 'bill_type'
<if test="configId !=null and configId != ''">
and t.config_id= #{configId}
</if>
<if test="comboId !=null and comboId != ''">
and t.combo_id= #{comboId}
</if>
<if test="statusCd !=null and statusCd != ''">
and t.status_cd= #{statusCd}
</if>
<if test="communityId !=null and communityId != ''">
and t.community_id= #{communityId}
</if>
<if test="memberId !=null and memberId != ''">
and t.member_id= #{memberId}
</if>
order by t.create_time desc
<if test="page != -1 and page != null ">
limit #{page}, #{row}
</if>
</select>
<!-- 修改套餐成员信息 add by wuxw 2018-07-03 -->
<update id="updateFeeComboMemberInfo" parameterType="Map">
update fee_combo_member t set t.status_cd = #{statusCd}
<if test="newBId != null and newBId != ''">
,t.b_id = #{newBId}
</if>
<if test="configId !=null and configId != ''">
, t.config_id= #{configId}
</if>
<if test="communityId !=null and communityId != ''">
, t.community_id= #{communityId}
</if>
where 1=1
<if test="comboId !=null and comboId != ''">
and t.combo_id= #{comboId}
</if>
<if test="memberId !=null and memberId != ''">
and t.member_id= #{memberId}
</if>
</update>
<!-- 查询套餐成员数量 add by wuxw 2018-07-03 -->
<select id="queryFeeComboMembersCount" parameterType="Map" resultType="Map">
select count(1) count
from fee_combo_member t, pay_fee_config pfc,t_dict td1,t_dict td2,t_dict td3
where 1 =1
and t.config_id = pfc.config_id
and pfc.fee_type_cd = td1.status_cd
and td1.table_name = 'pay_fee_config'
and td1.table_columns = 'fee_type_cd'
and pfc.fee_flag = td2.status_cd
and td2.table_name = 'pay_fee_config'
and td2.table_columns = 'fee_flag'
and pfc.bill_type = td3.status_cd
and td3.table_name = 'pay_fee_config'
and td3.table_columns = 'bill_type'
<if test="configId !=null and configId != ''">
and t.config_id= #{configId}
</if>
<if test="comboId !=null and comboId != ''">
and t.combo_id= #{comboId}
</if>
<if test="statusCd !=null and statusCd != ''">
and t.status_cd= #{statusCd}
</if>
<if test="communityId !=null and communityId != ''">
and t.community_id= #{communityId}
</if>
<if test="memberId !=null and memberId != ''">
and t.member_id= #{memberId}
</if>
</select>
</mapper>
|