48 lines
1.8 KiB
XML
48 lines
1.8 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.canteen.core.order.common.mapper.OrderPreBookMapper">
|
|
|
|
<select id="listByParam" resultType="com.bonus.canteen.core.order.common.vo.OrderPreBookVO">
|
|
SELECT
|
|
opb.pre_book_id,
|
|
opb.pre_book_type,
|
|
opb.order_type,
|
|
opb.order_date,
|
|
opb.submit_time,
|
|
opb.cust_id,
|
|
opb.ext_param,
|
|
opb.crby,
|
|
opb.crtime,
|
|
opb.upby,
|
|
opb.uptime,
|
|
ci.nick_name as cust_name,
|
|
ci.cust_num,
|
|
ci.phonenumber as mobile,
|
|
<!-- ci.cust_type,
|
|
ci.org_full_name, -->
|
|
ci.face_url as cust_photo_url,
|
|
ci.psn_type,
|
|
ci.psn_type_name
|
|
FROM order_pre_book opb
|
|
LEFT JOIN sys_user ci ON opb.cust_id = ci.cust_id
|
|
WHERE 1 = 1
|
|
<if test="param.orderDate != null">
|
|
AND opb.order_date = #{param.orderDate}
|
|
</if>
|
|
<if test="param.custSearchInfo != null and param.custSearchInfo != ''">
|
|
AND (
|
|
ci.cust_num = #{param.custSearchInfo}
|
|
OR ci.nick_name = #{param.custSearchInfo,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
|
|
OR ci.phonenumber = #{param.custSearchInfo,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
|
|
<!-- OR ci.mobile_suffix = #{param.custSearchInfo,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler} -->
|
|
)
|
|
</if>
|
|
<if test="param.orgIdList != null and param.orgIdList.size() > 0">
|
|
AND ci.dept_id in
|
|
<foreach collection="param.orgIdList" item="orgId" open="(" close=")" separator=",">
|
|
#{orgId}
|
|
</foreach>
|
|
</if>
|
|
</select>
|
|
</mapper>
|