无人机小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wrj-applet-api/target/classes/mapper/TdMemberMapper.xml

70 lines
2.4 KiB

<?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.wrj.driver.server.mapper.TdMemberMapper">
<select id="queryMember" resultType="com.wrj.driver.server.vo.MemberVo">
select
tm.MEMBER_ID,
tm.MEMBER_NAME,
tm.CAR_TYPE_ID,
tm.PRICE,
tm.DISCOUNT,
tm.DURATION,
tm.SUBJECTS,
tm.UNIT,
tm.DESCRIPTION,
tm.IS_ACTIVE
from
td_member tm
<where>
tm.IS_ACTIVE = '0' and tm.USE_TYPE like '%1%'
<if test="queryDto.memberId !=null">
and tm.MEMBER_ID = #{queryDto.memberId}
</if>
<if test="queryDto.carTypeId !=null">
and tm.CAR_TYPE_ID = #{queryDto.carTypeId}
</if>
<if test="queryDto.subject !=null and queryDto.subject !=''">
and INSTR(tm.SUBJECTS, #{queryDto.subject})
</if>
<if test="queryDto.tenantId !=null ">
and tm.TENANT_ID = #{queryDto.tenantId}
</if>
</where>
order by tm.SHOW_ORDER
</select>
<select id="queryUserMember" resultType="com.wrj.driver.server.vo.MemberVo">
select
tsum.USER_ID,
tsum.END_DATE,
tm.MEMBER_ID,
tm.MEMBER_NAME,
tm.CAR_TYPE_ID,
tm.PRICE,
tm.DISCOUNT,
tm.DURATION,
tm.SUBJECTS,
tm.UNIT,
tm.DESCRIPTION,
tm.IS_ACTIVE
from
td_sys_user_member tsum
left join td_member tm on tsum.MEMBER_ID = tm.MEMBER_ID
<where>
tsum.USER_ID = #{userId} and sysdate() between tsum.START_DATE and tsum.END_DATE
<if test="queryDto.memberId !=null">
and tsum.MEMBER_ID = #{queryDto.memberId}
</if>
<if test="queryDto.carTypeId !=null">
and tm.CAR_TYPE_ID = #{queryDto.carTypeId}
</if>
<if test="queryDto.subject !=null and queryDto.subject !=''">
and INSTR(tm.SUBJECTS, #{queryDto.subject})
</if>
<if test="queryDto.tenantId !=null ">
and tm.TENANT_ID = #{queryDto.tenantId}
</if>
</where>
order by tm.SHOW_ORDER
</select>
</mapper>