parent
c439bace1a
commit
0ec42c16b7
@ -0,0 +1,108 @@ |
|||||||
|
package com.jianshui.invoice.domain; |
||||||
|
|
||||||
|
import com.jianshui.common.annotation.Excel; |
||||||
|
import com.jianshui.common.core.domain.BaseEntity; |
||||||
|
import net.logstash.logback.encoder.org.apache.commons.lang3.builder.ToStringBuilder; |
||||||
|
import net.logstash.logback.encoder.org.apache.commons.lang3.builder.ToStringStyle; |
||||||
|
|
||||||
|
/** |
||||||
|
* 发票URL存储对象 invoice_file |
||||||
|
* |
||||||
|
* @author kk |
||||||
|
* @date 2023-12-04 |
||||||
|
*/ |
||||||
|
public class InvoiceFile extends BaseEntity |
||||||
|
{ |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** 主键id */ |
||||||
|
private String id; |
||||||
|
|
||||||
|
/** 文件id */ |
||||||
|
@Excel(name = "文件id") |
||||||
|
private String fileId; |
||||||
|
|
||||||
|
/** 文件名字 */ |
||||||
|
@Excel(name = "文件名字") |
||||||
|
private String fileName; |
||||||
|
|
||||||
|
/** 文件流 */ |
||||||
|
@Excel(name = "文件流") |
||||||
|
private String fileContent; |
||||||
|
|
||||||
|
/** 创建企业 */ |
||||||
|
@Excel(name = "创建企业") |
||||||
|
private String identity; |
||||||
|
|
||||||
|
/** 税号 */ |
||||||
|
@Excel(name = "税号") |
||||||
|
private String tax; |
||||||
|
|
||||||
|
public void setId(String id) |
||||||
|
{ |
||||||
|
this.id = id; |
||||||
|
} |
||||||
|
|
||||||
|
public String getId() |
||||||
|
{ |
||||||
|
return id; |
||||||
|
} |
||||||
|
public void setFileId(String fileId) |
||||||
|
{ |
||||||
|
this.fileId = fileId; |
||||||
|
} |
||||||
|
|
||||||
|
public String getFileId() |
||||||
|
{ |
||||||
|
return fileId; |
||||||
|
} |
||||||
|
public void setFileName(String fileName) |
||||||
|
{ |
||||||
|
this.fileName = fileName; |
||||||
|
} |
||||||
|
|
||||||
|
public String getFileName() |
||||||
|
{ |
||||||
|
return fileName; |
||||||
|
} |
||||||
|
public void setFileContent(String fileContent) |
||||||
|
{ |
||||||
|
this.fileContent = fileContent; |
||||||
|
} |
||||||
|
|
||||||
|
public String getFileContent() |
||||||
|
{ |
||||||
|
return fileContent; |
||||||
|
} |
||||||
|
public void setIdentity(String identity) |
||||||
|
{ |
||||||
|
this.identity = identity; |
||||||
|
} |
||||||
|
|
||||||
|
public String getIdentity() |
||||||
|
{ |
||||||
|
return identity; |
||||||
|
} |
||||||
|
public void setTax(String tax) |
||||||
|
{ |
||||||
|
this.tax = tax; |
||||||
|
} |
||||||
|
|
||||||
|
public String getTax() |
||||||
|
{ |
||||||
|
return tax; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public String toString() { |
||||||
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) |
||||||
|
.append("id", getId()) |
||||||
|
.append("fileId", getFileId()) |
||||||
|
.append("fileName", getFileName()) |
||||||
|
.append("fileContent", getFileContent()) |
||||||
|
.append("createTime", getCreateTime()) |
||||||
|
.append("identity", getIdentity()) |
||||||
|
.append("tax", getTax()) |
||||||
|
.toString(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,61 @@ |
|||||||
|
package com.jianshui.invoice.mapper; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
import com.jianshui.invoice.domain.InvoiceFile; |
||||||
|
|
||||||
|
/** |
||||||
|
* 发票URL存储Mapper接口 |
||||||
|
* |
||||||
|
* @author kk |
||||||
|
* @date 2023-12-04 |
||||||
|
*/ |
||||||
|
public interface InvoiceFileMapper |
||||||
|
{ |
||||||
|
/** |
||||||
|
* 查询发票URL存储 |
||||||
|
* |
||||||
|
* @param id 发票URL存储主键 |
||||||
|
* @return 发票URL存储 |
||||||
|
*/ |
||||||
|
public InvoiceFile selectInvoiceFileById(String id); |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询发票URL存储列表 |
||||||
|
* |
||||||
|
* @param invoiceFile 发票URL存储 |
||||||
|
* @return 发票URL存储集合 |
||||||
|
*/ |
||||||
|
public List<InvoiceFile> selectInvoiceFileList(InvoiceFile invoiceFile); |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增发票URL存储 |
||||||
|
* |
||||||
|
* @param invoiceFile 发票URL存储 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int insertInvoiceFile(InvoiceFile invoiceFile); |
||||||
|
|
||||||
|
/** |
||||||
|
* 修改发票URL存储 |
||||||
|
* |
||||||
|
* @param invoiceFile 发票URL存储 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int updateInvoiceFile(InvoiceFile invoiceFile); |
||||||
|
|
||||||
|
/** |
||||||
|
* 删除发票URL存储 |
||||||
|
* |
||||||
|
* @param id 发票URL存储主键 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int deleteInvoiceFileById(String id); |
||||||
|
|
||||||
|
/** |
||||||
|
* 批量删除发票URL存储 |
||||||
|
* |
||||||
|
* @param ids 需要删除的数据主键集合 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int deleteInvoiceFileByIds(String[] ids); |
||||||
|
} |
@ -0,0 +1,61 @@ |
|||||||
|
package com.jianshui.invoice.service; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
import com.jianshui.invoice.domain.InvoiceFile; |
||||||
|
|
||||||
|
/** |
||||||
|
* 发票URL存储Service接口 |
||||||
|
* |
||||||
|
* @author kk |
||||||
|
* @date 2023-12-04 |
||||||
|
*/ |
||||||
|
public interface IInvoiceFileService |
||||||
|
{ |
||||||
|
/** |
||||||
|
* 查询发票URL存储 |
||||||
|
* |
||||||
|
* @param id 发票URL存储主键 |
||||||
|
* @return 发票URL存储 |
||||||
|
*/ |
||||||
|
public InvoiceFile selectInvoiceFileById(String id); |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询发票URL存储列表 |
||||||
|
* |
||||||
|
* @param invoiceFile 发票URL存储 |
||||||
|
* @return 发票URL存储集合 |
||||||
|
*/ |
||||||
|
public List<InvoiceFile> selectInvoiceFileList(InvoiceFile invoiceFile); |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增发票URL存储 |
||||||
|
* |
||||||
|
* @param invoiceFile 发票URL存储 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int insertInvoiceFile(InvoiceFile invoiceFile); |
||||||
|
|
||||||
|
/** |
||||||
|
* 修改发票URL存储 |
||||||
|
* |
||||||
|
* @param invoiceFile 发票URL存储 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int updateInvoiceFile(InvoiceFile invoiceFile); |
||||||
|
|
||||||
|
/** |
||||||
|
* 批量删除发票URL存储 |
||||||
|
* |
||||||
|
* @param ids 需要删除的发票URL存储主键集合 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int deleteInvoiceFileByIds(String[] ids); |
||||||
|
|
||||||
|
/** |
||||||
|
* 删除发票URL存储信息 |
||||||
|
* |
||||||
|
* @param id 发票URL存储主键 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int deleteInvoiceFileById(String id); |
||||||
|
} |
@ -0,0 +1,95 @@ |
|||||||
|
package com.jianshui.invoice.service.impl; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
import com.jianshui.common.utils.DateUtils; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
import com.jianshui.invoice.mapper.InvoiceFileMapper; |
||||||
|
import com.jianshui.invoice.domain.InvoiceFile; |
||||||
|
import com.jianshui.invoice.service.IInvoiceFileService; |
||||||
|
|
||||||
|
/** |
||||||
|
* 发票URL存储Service业务层处理 |
||||||
|
* |
||||||
|
* @author kk |
||||||
|
* @date 2023-12-04 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
public class InvoiceFileServiceImpl implements IInvoiceFileService |
||||||
|
{ |
||||||
|
@Autowired |
||||||
|
private InvoiceFileMapper invoiceFileMapper; |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询发票URL存储 |
||||||
|
* |
||||||
|
* @param id 发票URL存储主键 |
||||||
|
* @return 发票URL存储 |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public InvoiceFile selectInvoiceFileById(String id) |
||||||
|
{ |
||||||
|
return invoiceFileMapper.selectInvoiceFileById(id); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询发票URL存储列表 |
||||||
|
* |
||||||
|
* @param invoiceFile 发票URL存储 |
||||||
|
* @return 发票URL存储 |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public List<InvoiceFile> selectInvoiceFileList(InvoiceFile invoiceFile) |
||||||
|
{ |
||||||
|
return invoiceFileMapper.selectInvoiceFileList(invoiceFile); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增发票URL存储 |
||||||
|
* |
||||||
|
* @param invoiceFile 发票URL存储 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public int insertInvoiceFile(InvoiceFile invoiceFile) |
||||||
|
{ |
||||||
|
invoiceFile.setCreateTime(DateUtils.getNowDate()); |
||||||
|
return invoiceFileMapper.insertInvoiceFile(invoiceFile); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 修改发票URL存储 |
||||||
|
* |
||||||
|
* @param invoiceFile 发票URL存储 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public int updateInvoiceFile(InvoiceFile invoiceFile) |
||||||
|
{ |
||||||
|
return invoiceFileMapper.updateInvoiceFile(invoiceFile); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 批量删除发票URL存储 |
||||||
|
* |
||||||
|
* @param ids 需要删除的发票URL存储主键 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public int deleteInvoiceFileByIds(String[] ids) |
||||||
|
{ |
||||||
|
return invoiceFileMapper.deleteInvoiceFileByIds(ids); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 删除发票URL存储信息 |
||||||
|
* |
||||||
|
* @param id 发票URL存储主键 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public int deleteInvoiceFileById(String id) |
||||||
|
{ |
||||||
|
return invoiceFileMapper.deleteInvoiceFileById(id); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,82 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||||
|
<!DOCTYPE mapper |
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||||
|
<mapper namespace="com.jianshui.invoice.mapper.InvoiceFileMapper"> |
||||||
|
|
||||||
|
<resultMap type="InvoiceFile" id="InvoiceFileResult"> |
||||||
|
<result property="id" column="id" /> |
||||||
|
<result property="fileId" column="file_id" /> |
||||||
|
<result property="fileName" column="file_name" /> |
||||||
|
<result property="fileContent" column="file_content" /> |
||||||
|
<result property="createTime" column="create_time" /> |
||||||
|
<result property="identity" column="identity" /> |
||||||
|
<result property="tax" column="tax" /> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
<sql id="selectInvoiceFileVo"> |
||||||
|
select id, file_id, file_name, file_content, create_time, identity, tax from invoice_file |
||||||
|
</sql> |
||||||
|
|
||||||
|
<select id="selectInvoiceFileList" parameterType="InvoiceFile" resultMap="InvoiceFileResult"> |
||||||
|
<include refid="selectInvoiceFileVo"/> |
||||||
|
<where> |
||||||
|
<if test="fileId != null and fileId != ''"> and file_id = #{fileId}</if> |
||||||
|
<if test="fileName != null and fileName != ''"> and file_name = #{fileName}</if> |
||||||
|
<if test="fileContent != null and fileContent != ''"> and file_content = #{fileContent}</if> |
||||||
|
<if test="identity != null and identity != ''"> and identity = #{identity}</if> |
||||||
|
<if test="tax != null and tax != ''"> and tax = #{tax}</if> |
||||||
|
</where> |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="selectInvoiceFileById" parameterType="String" resultMap="InvoiceFileResult"> |
||||||
|
<include refid="selectInvoiceFileVo"/> |
||||||
|
where id = #{id} |
||||||
|
</select> |
||||||
|
|
||||||
|
<insert id="insertInvoiceFile" parameterType="InvoiceFile"> |
||||||
|
insert into invoice_file |
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||||
|
<if test="id != null">id,</if> |
||||||
|
<if test="fileId != null">file_id,</if> |
||||||
|
<if test="fileName != null">file_name,</if> |
||||||
|
<if test="fileContent != null">file_content,</if> |
||||||
|
<if test="createTime != null">create_time,</if> |
||||||
|
<if test="identity != null">identity,</if> |
||||||
|
<if test="tax != null">tax,</if> |
||||||
|
</trim> |
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||||
|
<if test="id != null">#{id},</if> |
||||||
|
<if test="fileId != null">#{fileId},</if> |
||||||
|
<if test="fileName != null">#{fileName},</if> |
||||||
|
<if test="fileContent != null">#{fileContent},</if> |
||||||
|
<if test="createTime != null">#{createTime},</if> |
||||||
|
<if test="identity != null">#{identity},</if> |
||||||
|
<if test="tax != null">#{tax},</if> |
||||||
|
</trim> |
||||||
|
</insert> |
||||||
|
|
||||||
|
<update id="updateInvoiceFile" parameterType="InvoiceFile"> |
||||||
|
update invoice_file |
||||||
|
<trim prefix="SET" suffixOverrides=","> |
||||||
|
<if test="fileId != null">file_id = #{fileId},</if> |
||||||
|
<if test="fileName != null">file_name = #{fileName},</if> |
||||||
|
<if test="fileContent != null">file_content = #{fileContent},</if> |
||||||
|
<if test="createTime != null">create_time = #{createTime},</if> |
||||||
|
<if test="identity != null">identity = #{identity},</if> |
||||||
|
<if test="tax != null">tax = #{tax},</if> |
||||||
|
</trim> |
||||||
|
where id = #{id} |
||||||
|
</update> |
||||||
|
|
||||||
|
<delete id="deleteInvoiceFileById" parameterType="String"> |
||||||
|
delete from invoice_file where id = #{id} |
||||||
|
</delete> |
||||||
|
|
||||||
|
<delete id="deleteInvoiceFileByIds" parameterType="String"> |
||||||
|
delete from invoice_file where id in |
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||||
|
#{id} |
||||||
|
</foreach> |
||||||
|
</delete> |
||||||
|
</mapper> |
Loading…
Reference in new issue