From 35c5447197f7a2341f21ecc2555d0b5ed4c7513a Mon Sep 17 00:00:00 2001 From: 李林 <z1292839451@163.com> Date: 星期四, 20 七月 2023 16:08:02 +0800 Subject: [PATCH] 修改实体类的字段 --- standard-server/src/main/resources/mapper/SpecificationsMapper.xml | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/standard-server/src/main/resources/mapper/SpecificationsMapper.xml b/standard-server/src/main/resources/mapper/SpecificationsMapper.xml index f5a4457..0942946 100644 --- a/standard-server/src/main/resources/mapper/SpecificationsMapper.xml +++ b/standard-server/src/main/resources/mapper/SpecificationsMapper.xml @@ -2,22 +2,22 @@ <!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> </select> + + <select id="selectSNameSNName" resultType="Map"> + select m.num,m.supplier,m.name m_name,m.location,m.batch,m.reel_number,concat(s.name,'/',sn.name) ss_name,s.voltage_level,s.cross_section,s.number_of_cores,s.instruct from material m,specifications s,serial_number sn + where m.specifications_id = s.id + and s.serial_id = sn.id + and m.id = #{materialId} + order by s.create_time desc + limit 1 + </select> </mapper> -- Gitblit v1.9.3