Forráskód Böngészése

退款申请删除 缴费记录已删除的对应账单

huangpeng 4 hónapja
szülő
commit
aad0caefcb

+ 4 - 0
zhsw-common/src/main/java/com/rongwei/zhsw/system/dao/SwBillManagementPaidDao.java

@@ -4,6 +4,9 @@ package com.rongwei.zhsw.system.dao;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.rongwe.zhsw.system.domain.SwBillManagementPaidDo;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * 账单管理(按年分表)(已缴,退款)(SwBillManagementPaid)表数据库访问层
@@ -15,5 +18,6 @@ import org.apache.ibatis.annotations.Mapper;
 public interface SwBillManagementPaidDao extends BaseMapper<SwBillManagementPaidDo> {
 
 
+    void deleteByIds(@Param("idList") List<String> idList);
 }
 

+ 3 - 1
zhsw-common/src/main/java/com/rongwei/zhsw/system/service/SwBillManagementPaidService.java

@@ -3,6 +3,8 @@ package com.rongwei.zhsw.system.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.rongwe.zhsw.system.domain.SwBillManagementPaidDo;
 
+import java.util.List;
+
 /**
  * 账单管理(按年分表)(已缴,退款)(SwBillManagementPaid)表服务接口
  *
@@ -12,5 +14,5 @@ import com.rongwe.zhsw.system.domain.SwBillManagementPaidDo;
 public interface SwBillManagementPaidService extends IService<SwBillManagementPaidDo> {
 
 
-
+    void deleteByIds(List<String> ids);
 }

+ 11 - 0
zhsw-common/src/main/java/com/rongwei/zhsw/system/service/impl/SwBillManagementPaidServiceImpl.java

@@ -4,8 +4,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.rongwe.zhsw.system.domain.SwBillManagementPaidDo;
 import com.rongwei.zhsw.system.dao.SwBillManagementPaidDao;
 import com.rongwei.zhsw.system.service.SwBillManagementPaidService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 
 /**
  * 账单管理(按年分表)(已缴,退款)(SwBillManagementPaid)表服务实现类
@@ -16,4 +19,12 @@ import org.springframework.stereotype.Service;
 @Service
 public class SwBillManagementPaidServiceImpl  extends ServiceImpl<SwBillManagementPaidDao, SwBillManagementPaidDo> implements SwBillManagementPaidService {
 
+
+    @Autowired
+    SwBillManagementPaidDao swBillManagementPaidDao;
+
+    @Override
+    public void deleteByIds(List<String> ids) {
+        swBillManagementPaidDao.deleteByIds(ids);
+    }
 }

+ 1 - 1
zhsw-common/src/main/java/com/rongwei/zhsw/system/service/impl/SwRefundRequestRecordServiceImpl.java

@@ -171,7 +171,7 @@ public class SwRefundRequestRecordServiceImpl extends ServiceImpl<SwRefundReques
                 }
 
                 swBillManagementUnpaidService.saveBatch(unpaidDoList,200);
-                swBillManagementPaidService.getBaseMapper().selectBatchIds(paidIds);
+                swBillManagementPaidService.deleteByIds(paidIds);
             }
 
 

+ 17 - 0
zhsw-common/src/main/resources/mybatis/zhsw/SwBillManagementPaidDao.xml

@@ -0,0 +1,17 @@
+<?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.rongwei.zhsw.system.dao.SwBillManagementPaidDao">
+
+    <delete id="deleteByIds">
+        <if test="idList != null and idList.size() > 0">
+            <foreach collection="idList" item="id" separator=";" >
+        delete from sw_bill_management_paid where ID = #{id}
+
+        </foreach>
+    </if>
+    </delete>
+
+
+</mapper>