wu
2024-08-02 928fa3682fcd0bcb59e3ca3da8770ecbb06cf315
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?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.mes.shelfrack.mapper.ShelfRackMapper">
 
    <resultMap id="ShelfRackResultMap" type="com.mes.shelfrack.entity.request.RawUsageAndShelfRack">
        <result property="number" column="number"/>
        <result property="rawType" column="raw_type"/>
        <result property="rawWidth" column="raw_width"/>
        <result property="rawHeight" column="raw_height"/>
        <result property="rawThickness" column="raw_thickness"/>
        <result property="enableState" column="enable_state"/>
        <result property="pieces" column="pieces"/>
        <result property="createTime" column="createTime"  />
        <result property="batchId" column="batch_id"/>
    </resultMap>
    <select id="selectshelf_rack" resultMap="ShelfRackResultMap">
    <![CDATA[
        SELECT a.number, b.raw_type, b.raw_width, b.raw_height, b.raw_thickness, a.enable_state, b.pieces,
               b.batch_id,DATE_FORMAT(b.create_time, '%Y-%m-%d %H:%i:%s') as createTime
        FROM shelf_rack AS a
                 LEFT JOIN raw_usage AS b ON a.raw_package_id = b.id
        ]]>
</select>
 
</mapper>