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