From 9210503b9e6bdc51bfc28903222584e737ed7780 Mon Sep 17 00:00:00 2001 From: zuowenwen Date: Wed, 3 Nov 2021 11:35:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=20XML=20?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=9B=B4=E6=96=B0=20-ZWW?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/oss/dao/FileAssociateDao.java | 81 ++++++++++++ .../modules/oss/vo/FileAssociateData.java | 28 +++++ .../resources/mapper/oss/FileAssociateDao.xml | 118 ++++++++++++++++++ 3 files changed, 227 insertions(+) create mode 100644 src/main/java/com/gaotao/modules/oss/dao/FileAssociateDao.java create mode 100644 src/main/java/com/gaotao/modules/oss/vo/FileAssociateData.java create mode 100644 src/main/resources/mapper/oss/FileAssociateDao.xml diff --git a/src/main/java/com/gaotao/modules/oss/dao/FileAssociateDao.java b/src/main/java/com/gaotao/modules/oss/dao/FileAssociateDao.java new file mode 100644 index 0000000..56df374 --- /dev/null +++ b/src/main/java/com/gaotao/modules/oss/dao/FileAssociateDao.java @@ -0,0 +1,81 @@ +package com.gaotao.modules.oss.dao; + +import com.gaotao.modules.oss.vo.FileAssociateData; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface FileAssociateDao { + + /** + * @Method deleteFileAssociate + * @Description: 删除文件关联信息 + * @author zuowenwen + * @Version 1.0 + * @param fileAssociateData + * @return int + * @throws + * @date 2021/11/2 14:24 + */ + int deleteFileAssociate(FileAssociateData fileAssociateData); + + /** + * @Method insert + * @Description: 新增文件关联信息 + * @author zuowenwen + * @Version 1.0 + * @param fileAssociateData + * @return int + * @throws + * @date 2021/11/2 14:27 + */ + int insert(FileAssociateData fileAssociateData); + + /** + * @Method insertSelective + * @Description: 新增文件关联信息 + * @author zuowenwen + * @Version 1.0 + * @param fileAssociateData + * @return int + * @throws + * @date 2021/11/2 14:27 + */ + int insertSelective(FileAssociateData fileAssociateData); + + /** + * @Method getFileAssociateData + * @Description: 获取文件关联信息 + * @author zuowenwen + * @Version 1.0 + * @param fileAssociateData + * @return FileAssociateData + * @throws + * @date 2021/11/2 14:28 + */ + FileAssociateData getFileAssociateData(FileAssociateData fileAssociateData); + + /** + * @Method updateSelective + * @Description: 更改文件关联信息 + * @author zuowenwen + * @Version 1.0 + * @param fileAssociateData + * @return int + * @throws + * @date 2021/11/2 14:30 + */ + int updateSelective(FileAssociateData fileAssociateData); + + /** + * @Method update + * @Description: 更改文件关联信息 + * @author zuowenwen + * @Version 1.0 + * @param fileAssociateData + * @return int + * @throws + * @date 2021/11/2 14:30 + */ + int update(FileAssociateData fileAssociateData); + +} \ No newline at end of file diff --git a/src/main/java/com/gaotao/modules/oss/vo/FileAssociateData.java b/src/main/java/com/gaotao/modules/oss/vo/FileAssociateData.java new file mode 100644 index 0000000..8eba574 --- /dev/null +++ b/src/main/java/com/gaotao/modules/oss/vo/FileAssociateData.java @@ -0,0 +1,28 @@ +package com.gaotao.modules.oss.vo; +import lombok.Data; + +/** + * @Description + * @Author ZuoWen + * @Date 2021-11-02 + */ + +@Data +public class FileAssociateData { + + + /** 主键id */ + private Integer id; + /** 工厂编码 */ + private String site; + /** 文件记录id */ + private Integer sysOssId; + /** 类型 */ + private String type; + /** 关联字段1 */ + private String associatedField1; + /** 关联字段2 */ + private String associatedField2; + /** 关联字段3 */ + private String associatedField3; +} diff --git a/src/main/resources/mapper/oss/FileAssociateDao.xml b/src/main/resources/mapper/oss/FileAssociateDao.xml new file mode 100644 index 0000000..913100c --- /dev/null +++ b/src/main/resources/mapper/oss/FileAssociateDao.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + id, site, sys_oss_id, "type", associated_field1, associated_field2, associated_field3 + + + + + + delete from file_associate + where id = #{id,jdbcType=INTEGER} + + + + insert into file_associate (site, sys_oss_id, "type", + associated_field1, associated_field2, associated_field3 + ) + values (#{site,jdbcType=VARCHAR}, #{sysOssId,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, + #{associatedField1,jdbcType=VARCHAR}, #{associatedField2,jdbcType=VARCHAR}, #{associatedField3,jdbcType=VARCHAR} + ) + + + + insert into file_associate + + + site, + + + sys_oss_id, + + + "type", + + + associated_field1, + + + associated_field2, + + + associated_field3, + + + + + #{site,jdbcType=VARCHAR}, + + + #{sysOssId,jdbcType=INTEGER}, + + + #{type,jdbcType=VARCHAR}, + + + #{associatedField1,jdbcType=VARCHAR}, + + + #{associatedField2,jdbcType=VARCHAR}, + + + #{associatedField3,jdbcType=VARCHAR}, + + + + + + update file_associate + + + site = #{site,jdbcType=VARCHAR}, + + + sys_oss_id = #{sysOssId,jdbcType=INTEGER}, + + + "type" = #{type,jdbcType=VARCHAR}, + + + associated_field1 = #{associatedField1,jdbcType=VARCHAR}, + + + associated_field2 = #{associatedField2,jdbcType=VARCHAR}, + + + associated_field3 = #{associatedField3,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + + update file_associate + set site = #{site,jdbcType=VARCHAR}, + sys_oss_id = #{sysOssId,jdbcType=INTEGER}, + "type" = #{type,jdbcType=VARCHAR}, + associated_field1 = #{associatedField1,jdbcType=VARCHAR}, + associated_field2 = #{associatedField2,jdbcType=VARCHAR}, + associated_field3 = #{associatedField3,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + \ No newline at end of file