物资厂家接口优化

This commit is contained in:
sxu 2024-11-06 14:54:42 +08:00
parent de40e77d78
commit da4123c8ce
3 changed files with 1 additions and 54 deletions

View File

@ -29,11 +29,6 @@ public class BmFileInfo extends BaseEntity
@ApiModelProperty(value = "任务类型")
private Long taskType;
/** 任务id */
@Excel(name = "任务id")
@ApiModelProperty(value = "任务id")
private Long taskId;
/** 模块id */
@Excel(name = "模块id")
@ApiModelProperty(value = "模块id")
@ -54,10 +49,4 @@ public class BmFileInfo extends BaseEntity
@ApiModelProperty(value = "文件类型")
private Long fileType;
/** 数据字典 */
@Excel(name = "数据字典")
@ApiModelProperty(value = "数据字典")
private Long dicId;
}

View File

@ -1,30 +0,0 @@
//package com.bonus.material.basic.domain;
//
//import com.bonus.common.core.annotation.Excel;
//import com.bonus.common.core.web.domain.BaseEntity;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.Data;
//
///**
// * @Author ma_sh
// * @create 2024/10/14 15:29
// */
//@Data
//public class BmUnitType extends BaseEntity {
//
// private Integer isAll;
//
// @ApiModelProperty(value = "主键id")
// private Long typeId;
//
// @ApiModelProperty(value = "单位类型名称")
// @Excel(name = "单位类型")
// private String typeName;
//
// @ApiModelProperty(value = "单位类型")
// private String dictType;
//
// /** 删除标志0代表存在 2代表删除 */
// private String delFlag;
//
//}

View File

@ -6,30 +6,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="com.bonus.material.basic.domain.BmFileInfo" id="BmFileInfoResult">
<result property="id" column="id" />
<result property="taskType" column="task_type" />
<result property="taskId" column="task_id" />
<result property="modelId" column="model_id" />
<result property="name" column="name" />
<result property="url" column="url" />
<result property="fileType" column="file_type" />
<result property="dicId" column="dic_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectBmFileInfoVo">
select id, task_type, task_id, model_id, name, url, file_type, dic_id, create_by, create_time from bm_file_info
select id, task_type, model_id, name, url, file_type, create_by, create_time from bm_file_info
</sql>
<select id="selectBmFileInfoList" parameterType="com.bonus.material.basic.domain.BmFileInfo" resultMap="BmFileInfoResult">
<include refid="selectBmFileInfoVo"/>
<where>
<if test="taskType != null "> and task_type = #{taskType}</if>
<if test="taskId != null "> and task_id = #{taskId}</if>
<if test="modelId != null "> and model_id = #{modelId}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="url != null and url != ''"> and url = #{url}</if>
<if test="fileType != null "> and file_type = #{fileType}</if>
<if test="dicId != null "> and dic_id = #{dicId}</if>
</where>
</select>
@ -42,23 +38,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into bm_file_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="taskType != null">task_type,</if>
<if test="taskId != null">task_id,</if>
<if test="modelId != null">model_id,</if>
<if test="name != null">name,</if>
<if test="url != null">url,</if>
<if test="fileType != null">file_type,</if>
<if test="dicId != null">dic_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskType != null">#{taskType},</if>
<if test="taskId != null">#{taskId},</if>
<if test="modelId != null">#{modelId},</if>
<if test="name != null">#{name},</if>
<if test="url != null">#{url},</if>
<if test="fileType != null">#{fileType},</if>
<if test="dicId != null">#{dicId},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
@ -68,12 +60,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update bm_file_info
<trim prefix="SET" suffixOverrides=",">
<if test="taskType != null">task_type = #{taskType},</if>
<if test="taskId != null">task_id = #{taskId},</if>
<if test="modelId != null">model_id = #{modelId},</if>
<if test="name != null">name = #{name},</if>
<if test="url != null">url = #{url},</if>
<if test="fileType != null">file_type = #{fileType},</if>
<if test="dicId != null">dic_id = #{dicId},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
@ -95,10 +85,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from bm_file_info
<where>
<if test="taskType != null "> and task_type = #{taskType}</if>
<if test="taskId != null "> and task_id = #{taskId}</if>
<if test="modelId != null "> and model_id = #{modelId}</if>
<if test="fileType != null "> and file_type = #{fileType}</if>
<if test="dicId != null "> and dic_id = #{dicId}</if>
</where>
</delete>
</mapper>