<?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.stylefeng.guns.modular.system.dao.DispatchMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.Dispatch">
|
<id column="id" property="id"/>
|
<result column="insertTime" property="insertTime"/>
|
<result column="name" property="name"/>
|
<result column="companyId" property="companyId"/>
|
<result column="franchiseeId" property="franchiseeId"/>
|
<result column="phone" property="phone"/>
|
<result column="account" property="account"/>
|
<result column="password" property="password"/>
|
<result column="insertUserId" property="insertUserId"/>
|
<result column="state" property="state"/>
|
<result column="pushOrder" property="pushOrder"/>
|
</resultMap>
|
|
|
<select id="queryByAccount" resultType="Dispatch">
|
select
|
id as id,
|
insertTime as insertTime,
|
`name` as `name`,
|
companyId as companyId,
|
franchiseeId as franchiseeId,
|
phone as phone,
|
account as account,
|
password as password,
|
insertUserId as insertUserId,
|
state as state,
|
pushOrder as pushOrder
|
from t_dispatch where state != 3 and account = #{account}
|
</select>
|
|
|
<select id="queryDispatchs" resultType="Dispatch">
|
select
|
id as id,
|
insertTime as insertTime,
|
`name` as `name`,
|
companyId as companyId,
|
franchiseeId as franchiseeId,
|
phone as phone,
|
account as account,
|
password as password,
|
insertUserId as insertUserId,
|
state as state,
|
pushOrder as pushOrder
|
from t_dispatch where state != 3
|
<if test="null != companyId">
|
and if(franchiseeId is null or franchiseeId = 0, companyId = #{companyId}, franchiseeId = #{companyId})
|
</if>
|
<if test="null != pushOrder">
|
and pushOrder = #{pushOrder}
|
</if>
|
</select>
|
</mapper>
|