This commit is contained in:
mashuai 2024-09-20 16:10:13 +08:00
parent 5bd67628a8
commit 4f81e40d57
2 changed files with 35 additions and 13 deletions

View File

@ -1,8 +1,10 @@
package com.bonus.base.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import lombok.Data;
@ -74,5 +76,24 @@ public class TbBdDeviceRecord implements Serializable {
@ApiModelProperty(value="工程id")
private Long proId;
/**
* 审核人
*/
@ApiModelProperty(value="审核人id")
private Long auditUser;
/**
* 审核人
*/
@ApiModelProperty(value="审核人姓名")
private String auditUserName;
/**
* 审核时间
*/
@ApiModelProperty(value="审核时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date auditTime;
private static final long serialVersionUID = 1L;
}

View File

@ -196,19 +196,7 @@
</foreach>
</delete>
<!--by syruan on 2024-09-11-->
<select id="getAll" resultMap="BaseResultMap">
select
tbdr.id, tbdr.record_id, tbdr.dev_name, tbdr.dev_code, tbdr.unit_name, tbdr.area_name, tbdr.dev_user, tbdr.dev_user_phone,
tbr.audit_user as auditUser, tbr.audit_time as auditTime, su.nick_name as auditUserName
from tb_bd_device_record tbdr
left join tb_bd_record tbr on tbdr.record_id = tbr.id
left join sys_user su on tbr.audit_user = su.user_id
where
<if test="recordId != null">
tbdr.record_id = #{recordId}
</if>
</select>
<select id="selectByName" resultType="com.bonus.base.domain.TbBdDeviceRecord">
select
@ -258,4 +246,17 @@
and a.dev_code like concat('%',#{devCode},'%')
</if>
</select>
<select id="getAll" resultType="com.bonus.base.domain.TbBdDeviceRecord">
select
tbdr.id, tbdr.record_id, tbdr.dev_name, tbdr.dev_code, tbdr.unit_name, tbdr.area_name, tbdr.dev_user, tbdr.dev_user_phone,
tbr.audit_user as auditUser, tbr.audit_time as auditTime, su.nick_name as auditUserName
from tb_bd_device_record tbdr
left join tb_bd_record tbr on tbdr.record_id = tbr.id
left join sys_user su on tbr.audit_user = su.user_id
where
<if test="recordId != null">
tbdr.record_id = #{recordId}
</if>
</select>
</mapper>