<?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.ruoyi.stock.mapper.ManufacturerMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.ruoyi.stock.pojo.Manufacturer">
|
<id column="id" property="id" />
|
<result column="name" property="name" />
|
<result column="taxpayer_identification_num" property="taxpayerIdentificationNum" />
|
<result column="company_address" property="companyAddress" />
|
<result column="type" property="type" />
|
<result column="company_phone" property="companyPhone" />
|
<result column="bank_account_name" property="bankAccountName" />
|
<result column="bank_account_num" property="bankAccountNum" />
|
<result column="contact_user_name" property="contactUserName" />
|
<result column="contact_user_phone" property="contactUserPhone" />
|
<result column="maintain_user_id" property="maintainUserId" />
|
<result column="maintain_time" property="maintainTime" />
|
<result column="create_time" property="createTime" />
|
<result column="create_user" property="createUser" />
|
<result column="update_time" property="updateTime" />
|
<result column="update_user" property="updateUser" />
|
<result column="tenant_id" property="tenantId" />
|
<result column="is_white" property="isWhite" />
|
</resultMap>
|
|
<select id="manufacturerListPage" resultType="com.ruoyi.stock.dto.ManufacturerDto">
|
SELECT
|
T1.id,
|
T1.name,
|
T1.taxpayer_identification_num,
|
T1.company_address,
|
T1.company_phone,
|
T1.bank_account_name,
|
T1.bank_account_num,
|
T1.contact_user_name,
|
T1.contact_user_phone,
|
T1.maintain_user_id,
|
T1.maintain_time,
|
T1.create_time,
|
T1.create_user,
|
T1.update_time,
|
T1.update_user,
|
T1.tenant_id,
|
T1.is_white,
|
T2.nick_name AS maintainUserName,
|
T1.type
|
FROM manufacturer T1
|
LEFT JOIN sys_user T2 ON T1.maintain_user_id = T2.user_id
|
<where>
|
<if test="manufacturerDto.name != null and manufacturerDto.name != '' ">
|
AND T1.name LIKE CONCAT('%',#{manufacturerDto.name},'%')
|
</if>
|
<if test="manufacturerDto.isWhite != null">
|
AND T1.is_white = #{manufacturerDto.isWhite}
|
</if>
|
</where>
|
order by T1.create_time desc
|
</select>
|
|
<select id="manufacturerExportList" resultType="com.ruoyi.stock.execl.ManufacturerExcelDto">
|
SELECT
|
T1.id,
|
T1.name,
|
T1.type,
|
T1.taxpayer_identification_num,
|
T1.company_address,
|
T1.company_phone,
|
T1.bank_account_name,
|
T1.bank_account_num,
|
T1.contact_user_name,
|
T1.contact_user_phone,
|
T1.maintain_user_id,
|
T1.maintain_time,
|
T1.create_time,
|
T1.create_user,
|
T1.update_time,
|
T1.update_user,
|
T1.tenant_id,
|
T1.is_white,
|
T2.nick_name AS maintainUserName
|
FROM manufacturer T1
|
LEFT JOIN sys_user T2 ON T1.maintain_user_id = T2.user_id
|
<where>
|
<if test="manufacturerDto.name != null and manufacturerDto.name != '' ">
|
AND T1.name LIKE CONCAT('%',#{manufacturerDto.name},'%')
|
</if>
|
<if test="manufacturerDto.isWhite != null">
|
AND T1.is_white = #{manufacturerDto.isWhite}
|
</if>
|
</where>
|
</select>
|
</mapper>
|