diff --git a/jianshui-platform/src/main/java/com/jianshui/platform/mapper/InvoiceDeliveryMapper.java b/jianshui-platform/src/main/java/com/jianshui/platform/mapper/InvoiceDeliveryMapper.java index a8f275f..5d6968d 100644 --- a/jianshui-platform/src/main/java/com/jianshui/platform/mapper/InvoiceDeliveryMapper.java +++ b/jianshui-platform/src/main/java/com/jianshui/platform/mapper/InvoiceDeliveryMapper.java @@ -1,22 +1,63 @@ package com.jianshui.platform.mapper; + import com.jianshui.platform.domain.InvoiceDelivery; -import com.jianshui.platform.dto.InvoiceDeliveryDTO; -import org.apache.ibatis.annotations.Mapper; + +import java.util.List; /** - * @Author: xinzge - * @Description: 发票交付持久层 - * @CreateTime: 2023-06-06 14:33 - * @Version: 1.0 - **/ -@Mapper -public interface InvoiceDeliveryMapper { + * 发票交付Mapper接口 + * + * @author jianshui + * @date 2023-06-06 + */ +public interface InvoiceDeliveryMapper +{ + /** + * 查询发票交付 + * + * @param id 发票交付主键 + * @return 发票交付 + */ + public InvoiceDelivery selectInvoiceDeliveryById(Long id); + + /** + * 查询发票交付列表 + * + * @param invoiceDelivery 发票交付 + * @return 发票交付集合 + */ + public List selectInvoiceDeliveryList(InvoiceDelivery invoiceDelivery); + + /** + * 新增发票交付 + * + * @param invoiceDelivery 发票交付 + * @return 结果 + */ + public int insertInvoiceDelivery(InvoiceDelivery invoiceDelivery); + + /** + * 修改发票交付 + * + * @param invoiceDelivery 发票交付 + * @return 结果 + */ + public int updateInvoiceDelivery(InvoiceDelivery invoiceDelivery); + + /** + * 删除发票交付 + * + * @param id 发票交付主键 + * @return 结果 + */ + public int deleteInvoiceDeliveryById(Long id); /** - * 功能描述: 新增发票交付 - * @param invoiceDelivery 发票交付信息 - * @return : void + * 批量删除发票交付 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 */ - void insertInvoiceDelivery(InvoiceDelivery invoiceDelivery); + public int deleteInvoiceDeliveryByIds(Long[] ids); } diff --git a/jianshui-platform/src/main/java/com/jianshui/platform/service/impl/InvoiceDeliveryServiceImpl.java b/jianshui-platform/src/main/java/com/jianshui/platform/service/impl/InvoiceDeliveryServiceImpl.java index e482e15..e82590d 100644 --- a/jianshui-platform/src/main/java/com/jianshui/platform/service/impl/InvoiceDeliveryServiceImpl.java +++ b/jianshui-platform/src/main/java/com/jianshui/platform/service/impl/InvoiceDeliveryServiceImpl.java @@ -122,23 +122,23 @@ public class InvoiceDeliveryServiceImpl implements InvoiceDeliveryService { //将数据存入业务表 invoiceDeliveryMapper.insertInvoiceDelivery(invoiceDelivery); } else { + //封装实体类 + BeanUtils.copyProperties(invoiceDeliveryDTO, invoiceDelivery); + invoiceDelivery.setJflx(dto.getJflx()); + invoiceDelivery.setFphm(dto.getFphm()); + invoiceDelivery.setGmflxdh(dto.getGmflxdh()); + invoiceDelivery.setGmfyx(dto.getGmfyx()); + invoiceDelivery.setStatus("1"); + invoiceDelivery.setType("1"); + invoiceDelivery.setClerk(sysUser.getUserId()); + invoiceDelivery.setCreateTime(new Date()); + //将数据存入业务表 + invoiceDeliveryMapper.insertInvoiceDelivery(invoiceDelivery); return new HXResponse(msg); } } catch (Exception e) { e.printStackTrace(); log.error("【金四服务类】【金财数科】【申请红字信息表】API请求异常,外部报文返回code非0000。错误信息:{}", e.getMessage()); - //封装实体类 - BeanUtils.copyProperties(invoiceDeliveryDTO, invoiceDelivery); - invoiceDelivery.setJflx(dto.getJflx()); - invoiceDelivery.setFphm(dto.getFphm()); - invoiceDelivery.setGmflxdh(dto.getGmflxdh()); - invoiceDelivery.setGmfyx(dto.getGmfyx()); - invoiceDelivery.setStatus("1"); - invoiceDelivery.setType("1"); - invoiceDelivery.setClerk(sysUser.getUserId()); - invoiceDelivery.setCreateTime(new Date()); - //将数据存入业务表 - invoiceDeliveryMapper.insertInvoiceDelivery(invoiceDelivery); return new HXResponse("发票支付接口异常"); } } diff --git a/jianshui-platform/src/main/resources/com/jianshui/platform/mapper/InvoiceDeliveryMapper.xml b/jianshui-platform/src/main/resources/com/jianshui/platform/mapper/InvoiceDeliveryMapper.xml index 10ec39d..9ca368e 100644 --- a/jianshui-platform/src/main/resources/com/jianshui/platform/mapper/InvoiceDeliveryMapper.xml +++ b/jianshui-platform/src/main/resources/com/jianshui/platform/mapper/InvoiceDeliveryMapper.xml @@ -1,11 +1,109 @@ +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + + + + + + + + + + + + + + + + - - insert into invoice_delivery(bsrysfzjhm,dqbm,jflx,fphm,gmflxdh,gmfyx,nsrsbh) - values (#{bsrysfzjhm},#{dqbm},#{jflx},#{fphm},#{gmflxdh},#{gmfyx},#{nsrsbh}) + + select id, bsrysfzjhm, dqbm, jflx, fphm, gmflxdh, gmfyx, nsrsbh, status, type, clerk, create_time, remark from invoice_delivery + + + + + + + + insert into invoice_delivery + + bsrysfzjhm, + dqbm, + jflx, + fphm, + gmflxdh, + gmfyx, + nsrsbh, + status, + type, + clerk, + create_time, + remark, + + + #{bsrysfzjhm}, + #{dqbm}, + #{jflx}, + #{fphm}, + #{gmflxdh}, + #{gmfyx}, + #{nsrsbh}, + #{status}, + #{type}, + #{clerk}, + #{createTime}, + #{remark}, + + + + update invoice_delivery + + bsrysfzjhm = #{bsrysfzjhm}, + dqbm = #{dqbm}, + jflx = #{jflx}, + fphm = #{fphm}, + gmflxdh = #{gmflxdh}, + gmfyx = #{gmfyx}, + nsrsbh = #{nsrsbh}, + status = #{status}, + type = #{type}, + clerk = #{clerk}, + create_time = #{createTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from invoice_delivery where id = #{id} + + + + delete from invoice_delivery where id in + + #{id} + + \ No newline at end of file