XiaoRuby
2023-07-19 4fae0a3d70ce519502c8ef17f327daffbe9a44aa
standard-server/src/main/resources/mapper/SpecificationsMapper.xml
@@ -2,20 +2,11 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yuanchu.limslaboratory.mapper.SpecificationsMapper">
    <resultMap id="listSpecificationsInformationMap" type="com.yuanchu.limslaboratory.vo.ListSpecificationsInformation">
        <result property="id" column="id"/>
        <result property="name" column="name"/>
        <result property="updateTime" column="update_time"/>
        <result property="username" column="username"/>
        <result property="vel" column="vel"/>
        <result property="spe_state" column="spe_state"/>
    </resultMap>
    <select id="listSpecificationsInformation" resultMap="listSpecificationsInformationMap">
        SELECT s.`id`,s.`name`,s.`update_time`,u.`name` username,s.`vel`,s.`spe_state`
    <select id="listSpecificationsInformation" resultType="map">
        SELECT s.`id`,s.`name`,DATE_FORMAT(s.`update_time`, '%Y-%m-%d %H:%i') updateTime,u.`name` username,s.`vel`,s.`spe_state`
        FROM specifications s,`user` u
        WHERE s.`user_id` = u.`id`
            AND s.`number` = #{serialNumberId}
            AND s.`serial_id` = #{serialNumberId}
        <if test="specificationsName != null">
            AND s.`name` = #{specificationsName}
        </if>