38 lines
1.5 KiB
XML
38 lines
1.5 KiB
XML
|
|
<?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="com.bonus.core.menu.mapper.MenuRecipeMapper">
|
||
|
|
|
||
|
|
<resultMap type="com.bonus.core.marketing.vo.MktEffectiveUserVO" id="mktEffectiveUserVO">
|
||
|
|
<result property="effId" column="eff_id"/>
|
||
|
|
<result property="userType" column="user_type"/>
|
||
|
|
<!-- <result property="orgId" column="org_id"/>-->
|
||
|
|
<!-- <result property="psnType" column="psn_type"/>-->
|
||
|
|
<collection property="orgIdList" ofType="Long">
|
||
|
|
<result property="orgId" column="org_id"/>
|
||
|
|
</collection>
|
||
|
|
<collection property="psnTypeList" ofType="Integer">
|
||
|
|
<result property="psnType" column="psn_type"/>
|
||
|
|
</collection>
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<select id="selectOrgAndPsnByCustLimitId" parameterType="com.bonus.domain.CustInfo" resultType="com.bonus.domain.CustInfo">
|
||
|
|
select org_id, psn_type
|
||
|
|
from cust_info
|
||
|
|
where cust_id = #{custId} and cust_state = 1
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<!-- 获取指定类型的生效范围详情 -->
|
||
|
|
<select id="selectAllUserEff" resultMap="mktEffectiveUserVO">
|
||
|
|
select me.eff_id,
|
||
|
|
me.user_type,
|
||
|
|
med.org_id,
|
||
|
|
med.psn_type
|
||
|
|
from mkt_effective me
|
||
|
|
left join mkt_effective_detail med on me.eff_id = med.eff_id
|
||
|
|
where me.eff_type = #{effType}
|
||
|
|
and me.del_flag = #{delFlag}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
</mapper>
|