zhuo
9 天以前 af61da8b525487eb12813762bc7480bcf8c9b65b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?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.inspect.mapper.WarehouseHistoryMapper">
 
    <select id="getUserNameById" resultType="java.lang.String">
        select name from user where id = #{userId}
    </select>
    <select id="getHistoryListBySampleId" resultType="com.ruoyi.inspect.dto.HistoryDto">
        select wh.*,u.name createUserName from warehouse_history wh
        left join user u on u.id = wh.create_user
        where wh.ins_sample_id = #{sampleId}
        order by wh.id desc
    </select>
</mapper>