| | |
| | | <result property="disease" column="disease"/> |
| | | <result property="zjm" column="zjm"/> |
| | | <result property="companyId" column="company_id"/> |
| | | <result property="province" column="province"/> |
| | | <result property="city" column="city"/> |
| | | <result property="area" column="area"/> |
| | | <result property="recommendId" column="recommend_id"/> |
| | | |
| | | <result property="statu" column="statu"/> |
| | | <result property="birthdayType" column="birthdayType"/> |
| | |
| | | disease, |
| | | is_deal, |
| | | zjm, |
| | | company_id |
| | | company_id, |
| | | province, |
| | | city, |
| | | area, |
| | | recommend_id |
| | | ) |
| | | |
| | | |
| | |
| | | #{disease}, |
| | | #{isDeal}, |
| | | #{zjm}, |
| | | #{companyId} |
| | | #{companyId}, |
| | | #{province}, |
| | | #{city}, |
| | | #{area}, |
| | | #{recommendId} |
| | | ) |
| | | |
| | | </insert> |
| | |
| | | </if> |
| | | <if test="isDeal != null "> |
| | | is_deal = #{isDeal}, |
| | | </if> |
| | | <if test="recommendId != null "> |
| | | recommend_id = #{recommendId}, |
| | | </if> |
| | | <if test="province != null and province !='' "> |
| | | province = #{province}, |
| | | </if> |
| | | <if test="city != null and city !='' "> |
| | | city = #{city}, |
| | | </if> |
| | | <if test="area != null and area !='' "> |
| | | area = #{area}, |
| | | </if> |
| | | |
| | | |
| | |
| | | a.create_distribution_time, |
| | | a.birthdayType, |
| | | a.disease, |
| | | a.is_deal |
| | | a.is_deal, |
| | | a.province, |
| | | a.city, |
| | | a.area, |
| | | a.recommend_id |
| | | </sql> |
| | | <sql id="from"> |
| | | from sys_vip_info a |
| | |
| | | order by ${record.sort} ${record.order} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectVipInfoById" resultType="com.matrix.system.app.vo.VipInfoVo"> |
| | | select |
| | | a.ID id, |
| | | a.photo photo, |
| | | a.PHONE phone, |
| | | a.VIP_NAME vipName, |
| | | a.VIP_NO vipNo, |
| | | c.LEVEL_NAME vipLevel, |
| | | a.POINT_ALL integral, |
| | | e.shop_short_name shopName, |
| | | sum(IFNULL(b.gift_money, 0) + IFNULL(b.real_money, 0)) totalBalance, |
| | | sum(IFNULL(b.gift_money, 0)) giftBalance, |
| | | sum(IFNULL(d.goods_cash, 0) + IFNULL(d.proj_cash, 0) + IFNULL(d.card_cash, 0)) totalShopping |
| | | from sys_vip_info a |
| | | left join money_card_use b on a.ID = b.vip_id and b.status='有效' |
| | | left join sys_vip_level c on a.LEVEL_ID = c.ID |
| | | left join achieve_new d on a.ID = d.vip_id |
| | | left join sys_shop_info e on a.SHOP_ID=e.ID |
| | | where a.ID=#{id} |
| | | </select> |
| | | </mapper> |
| | | |