Преглед на файлове

创建商户添加银行信息

Yangzw преди 8 месеца
родител
ревизия
3b7373762e
променени са 21 файла, в които са добавени 208 реда и са изтрити 455 реда
  1. 6 0
      feifan-module-distri/feifan-module-distri-biz/pom.xml
  2. 13 0
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/shopsettlement/ShopSettlementController.java
  3. 15 0
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/shopsettlement/excelvo/ShopSettlementExcelRespVO.java
  4. 22 0
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/shopsettlement/vo/ShopRespVO.java
  5. 0 146
      feifan-module-distri/feifan-module-distri-biz/src/test/java/cn/newfeifan/mall/module/distri/service/applicationforwithdrawal/ApplicationForWithdrawalServiceImplTest.java
  6. 0 146
      feifan-module-distri/feifan-module-distri-biz/src/test/java/cn/newfeifan/mall/module/distri/service/applicationforwithdrawalchannel/ApplicationForWithdrawalChannelServiceImplTest.java
  7. 0 142
      feifan-module-distri/feifan-module-distri-biz/src/test/java/cn/newfeifan/mall/module/distri/service/ptdailywithdrawal/PtDailyWithdrawalServiceImplTest.java
  8. 5 0
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/order/excelVO/DailyBillOrderRespVO.java
  9. 11 0
      feifan-module-sale/feifan-module-sale-api/src/main/java/cn/newfeifan/mall/module/api/shop/ShopApi.java
  10. 41 0
      feifan-module-sale/feifan-module-sale-api/src/main/java/cn/newfeifan/mall/module/api/shop/dto/ShopDTO.java
  11. 21 0
      feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/api/shop/ShopApiImpl.java
  12. 11 2
      feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/controller/admin/merchant/vo/MerchantSaveReqVO.java
  13. 9 1
      feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/controller/admin/shop/vo/ShopPageReqVO.java
  14. 12 3
      feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/controller/admin/shop/vo/ShopRespVO.java
  15. 12 1
      feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/controller/admin/shop/vo/ShopSaveReqVO.java
  16. 13 3
      feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/dal/dataobject/shop/ShopDO.java
  17. 1 3
      feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/service/merchant/MerchantServiceImpl.java
  18. 3 1
      feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/service/shop/ShopService.java
  19. 7 2
      feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/service/shop/ShopServiceImpl.java
  20. 0 4
      sql/mysql/建空库SQL/14_20240625.sql
  21. 6 1
      sql/mysql/建空库SQL/18_20240717.sql

+ 6 - 0
feifan-module-distri/feifan-module-distri-biz/pom.xml

@@ -118,5 +118,11 @@
             <version>2.0.0-jdk8-snapshot</version>
             <scope>compile</scope>
         </dependency>
+        <dependency>
+            <groupId>cn.newfeifan.sale</groupId>
+            <artifactId>feifan-module-sale-api</artifactId>
+            <version>2.0.0-jdk8-snapshot</version>
+            <scope>compile</scope>
+        </dependency>
     </dependencies>
 </project>

+ 13 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/shopsettlement/ShopSettlementController.java

@@ -1,6 +1,8 @@
 package cn.newfeifan.mall.module.distri.controller.admin.shopsettlement;
 
 import cn.newfeifan.mall.framework.common.pojo.PageResult;
+import cn.newfeifan.mall.module.api.shop.ShopApi;
+import cn.newfeifan.mall.module.api.shop.dto.ShopDTO;
 import cn.newfeifan.mall.module.distri.controller.admin.shopsettlement.excelvo.ShopSettlementExcelRespVO;
 import cn.newfeifan.mall.module.distri.convert.shopsettlement.ShopSettlementConvert;
 import org.springframework.web.bind.annotation.*;
@@ -39,6 +41,9 @@ public class ShopSettlementController {
     @Resource
     private ShopSettlementService shopSettlementService;
 
+    @Resource
+    private ShopApi shopApi;
+
     @PostMapping("/create")
     @Operation(summary = "创建订单结算信息表,记录店铺的结算信息")
     @PreAuthorize("@ss.hasPermission('trade:shop-settlement:create')")
@@ -88,6 +93,14 @@ public class ShopSettlementController {
               HttpServletResponse response) throws IOException {
         pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
         List<ShopSettlementExcelRespVO> list = ShopSettlementConvert.INSTANCE.convertList(shopSettlementService.getShopSettlementPage(pageReqVO).getList());
+
+        for (ShopSettlementExcelRespVO shopSettlementExcelRespVO : list) {
+            ShopDTO shop = shopApi.getShop(shopSettlementExcelRespVO.getShopId());
+            shopSettlementExcelRespVO.setAccountName(shop.getAccountName());
+            shopSettlementExcelRespVO.setAccountNumber(shop.getAccountNumber());
+            shopSettlementExcelRespVO.setBankName(shop.getBankName());
+        }
+
         // 导出 Excel
         ExcelUtils.write(response, "订单结算信息表,记录店铺的结算信息.xls", "数据", ShopSettlementExcelRespVO.class,
                         list);

+ 15 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/shopsettlement/excelvo/ShopSettlementExcelRespVO.java

@@ -36,6 +36,21 @@ public class ShopSettlementExcelRespVO {
     @ExcelProperty("转账凭证附件")
     private String attachment;
 
+    @Schema(description = "店铺id")
+    private Long shopId;
+
+    @Schema(description = "账户名称", example = "非繁人")
+    @ExcelProperty("账户名称")
+    private String accountName;
+
+    @Schema(description = "账户号码")
+    @ExcelProperty("账户号码")
+    private String accountNumber;
+
+    @Schema(description = "开户银行", example = "李四")
+    @ExcelProperty("开户银行")
+    private String bankName;
+
     @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
     @ExcelProperty("创建时间")
     private LocalDateTime createTime;

+ 22 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/shopsettlement/vo/ShopRespVO.java

@@ -0,0 +1,22 @@
+package cn.newfeifan.mall.module.distri.controller.admin.shopsettlement.vo;
+
+import lombok.*;
+
+@Data
+public class ShopRespVO {
+
+    private Long id;
+
+    /**
+     * 账户名称
+     */
+    private String accountName;
+    /**
+     * 账户号码
+     */
+    private String accountNumber;
+    /**
+     * 开户银行
+     */
+    private String bankName;
+}

+ 0 - 146
feifan-module-distri/feifan-module-distri-biz/src/test/java/cn/newfeifan/mall/module/distri/service/applicationforwithdrawal/ApplicationForWithdrawalServiceImplTest.java

@@ -1,146 +0,0 @@
-package cn.newfeifan.mall.module.distri.service.applicationforwithdrawal;
-
-import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.Test;
-
-import javax.annotation.Resource;
-
-import cn.newfeifan.mall.framework.test.core.ut.BaseDbUnitTest;
-
-import cn.newfeifan.mall.module.distri.controller.admin.applicationforwithdrawal.vo.*;
-import cn.newfeifan.mall.module.distri.dal.dataobject.applicationforwithdrawal.ApplicationForWithdrawalDO;
-import cn.newfeifan.mall.module.distri.dal.mysql.applicationforwithdrawal.ApplicationForWithdrawalMapper;
-import cn.newfeifan.mall.framework.common.pojo.PageResult;
-
-import org.springframework.context.annotation.Import;
-import static cn.newfeifan.mall.module.distri.enums.ErrorCodeConstants.*;
-import static cn.newfeifan.mall.framework.test.core.util.AssertUtils.*;
-import static cn.newfeifan.mall.framework.test.core.util.RandomUtils.*;
-import static cn.newfeifan.mall.framework.common.util.date.LocalDateTimeUtils.*;
-import static cn.newfeifan.mall.framework.common.util.object.ObjectUtils.*;
-import static org.junit.jupiter.api.Assertions.*;
-
-/**
- * {@link ApplicationForWithdrawalServiceImpl} 的单元测试类
- *
- * @author 非繁人
- */
-@Import(ApplicationForWithdrawalServiceImpl.class)
-public class ApplicationForWithdrawalServiceImplTest extends BaseDbUnitTest {
-
-    @Resource
-    private ApplicationForWithdrawalServiceImpl applicationForWithdrawalService;
-
-    @Resource
-    private ApplicationForWithdrawalMapper applicationForWithdrawalMapper;
-
-    @Test
-    public void testCreateApplicationForWithdrawal_success() {
-        // 准备参数
-        ApplicationForWithdrawalSaveReqVO createReqVO = randomPojo(ApplicationForWithdrawalSaveReqVO.class).setId(null);
-
-        // 调用
-        Long applicationForWithdrawalId = applicationForWithdrawalService.createApplicationForWithdrawal(createReqVO);
-        // 断言
-        assertNotNull(applicationForWithdrawalId);
-        // 校验记录的属性是否正确
-        ApplicationForWithdrawalDO applicationForWithdrawal = applicationForWithdrawalMapper.selectById(applicationForWithdrawalId);
-        assertPojoEquals(createReqVO, applicationForWithdrawal, "id");
-    }
-
-    @Test
-    public void testUpdateApplicationForWithdrawal_success() {
-        // mock 数据
-        ApplicationForWithdrawalDO dbApplicationForWithdrawal = randomPojo(ApplicationForWithdrawalDO.class);
-        applicationForWithdrawalMapper.insert(dbApplicationForWithdrawal);// @Sql: 先插入出一条存在的数据
-        // 准备参数
-        ApplicationForWithdrawalSaveReqVO updateReqVO = randomPojo(ApplicationForWithdrawalSaveReqVO.class, o -> {
-            o.setId(dbApplicationForWithdrawal.getId()); // 设置更新的 ID
-        });
-
-        // 调用
-        applicationForWithdrawalService.updateApplicationForWithdrawal(updateReqVO);
-        // 校验是否更新正确
-        ApplicationForWithdrawalDO applicationForWithdrawal = applicationForWithdrawalMapper.selectById(updateReqVO.getId()); // 获取最新的
-        assertPojoEquals(updateReqVO, applicationForWithdrawal);
-    }
-
-    @Test
-    public void testUpdateApplicationForWithdrawal_notExists() {
-        // 准备参数
-        ApplicationForWithdrawalSaveReqVO updateReqVO = randomPojo(ApplicationForWithdrawalSaveReqVO.class);
-
-        // 调用, 并断言异常
-        assertServiceException(() -> applicationForWithdrawalService.updateApplicationForWithdrawal(updateReqVO), APPLICATION_FOR_WITHDRAWAL_NOT_EXISTS);
-    }
-
-    @Test
-    public void testDeleteApplicationForWithdrawal_success() {
-        // mock 数据
-        ApplicationForWithdrawalDO dbApplicationForWithdrawal = randomPojo(ApplicationForWithdrawalDO.class);
-        applicationForWithdrawalMapper.insert(dbApplicationForWithdrawal);// @Sql: 先插入出一条存在的数据
-        // 准备参数
-        Long id = dbApplicationForWithdrawal.getId();
-
-        // 调用
-        applicationForWithdrawalService.deleteApplicationForWithdrawal(id);
-       // 校验数据不存在了
-       assertNull(applicationForWithdrawalMapper.selectById(id));
-    }
-
-    @Test
-    public void testDeleteApplicationForWithdrawal_notExists() {
-        // 准备参数
-        Long id = randomLongId();
-
-        // 调用, 并断言异常
-        assertServiceException(() -> applicationForWithdrawalService.deleteApplicationForWithdrawal(id), APPLICATION_FOR_WITHDRAWAL_NOT_EXISTS);
-    }
-
-    @Test
-    @Disabled  // TODO 请修改 null 为需要的值,然后删除 @Disabled 注解
-    public void testGetApplicationForWithdrawalPage() {
-       // mock 数据
-       ApplicationForWithdrawalDO dbApplicationForWithdrawal = randomPojo(ApplicationForWithdrawalDO.class, o -> { // 等会查询到
-           o.setUserId(null);
-           o.setWithdrawalType(null);
-           o.setAmount(null);
-           o.setWithdrawalAccount(null);
-           o.setStatus(null);
-           o.setApplicationForWithdrawalChannelId(null);
-           o.setCreateTime(null);
-       });
-       applicationForWithdrawalMapper.insert(dbApplicationForWithdrawal);
-       // 测试 userId 不匹配
-       applicationForWithdrawalMapper.insert(cloneIgnoreId(dbApplicationForWithdrawal, o -> o.setUserId(null)));
-       // 测试 withdrawalType 不匹配
-       applicationForWithdrawalMapper.insert(cloneIgnoreId(dbApplicationForWithdrawal, o -> o.setWithdrawalType(null)));
-       // 测试 amount 不匹配
-       applicationForWithdrawalMapper.insert(cloneIgnoreId(dbApplicationForWithdrawal, o -> o.setAmount(null)));
-       // 测试 withdrawalAccount 不匹配
-       applicationForWithdrawalMapper.insert(cloneIgnoreId(dbApplicationForWithdrawal, o -> o.setWithdrawalAccount(null)));
-       // 测试 status 不匹配
-       applicationForWithdrawalMapper.insert(cloneIgnoreId(dbApplicationForWithdrawal, o -> o.setStatus(null)));
-       // 测试 applicationForWithdrawalChannelId 不匹配
-       applicationForWithdrawalMapper.insert(cloneIgnoreId(dbApplicationForWithdrawal, o -> o.setApplicationForWithdrawalChannelId(null)));
-       // 测试 createTime 不匹配
-       applicationForWithdrawalMapper.insert(cloneIgnoreId(dbApplicationForWithdrawal, o -> o.setCreateTime(null)));
-       // 准备参数
-       ApplicationForWithdrawalPageReqVO reqVO = new ApplicationForWithdrawalPageReqVO();
-       reqVO.setUserId(null);
-       reqVO.setWithdrawalType(null);
-       reqVO.setAmount(null);
-       reqVO.setWithdrawalAccount(null);
-       reqVO.setStatus(null);
-       reqVO.setApplicationForWithdrawalChannelId(null);
-       reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
-
-       // 调用
-       PageResult<ApplicationForWithdrawalDO> pageResult = applicationForWithdrawalService.getApplicationForWithdrawalPage(reqVO);
-       // 断言
-       assertEquals(1, pageResult.getTotal());
-       assertEquals(1, pageResult.getList().size());
-       assertPojoEquals(dbApplicationForWithdrawal, pageResult.getList().get(0));
-    }
-
-}

+ 0 - 146
feifan-module-distri/feifan-module-distri-biz/src/test/java/cn/newfeifan/mall/module/distri/service/applicationforwithdrawalchannel/ApplicationForWithdrawalChannelServiceImplTest.java

@@ -1,146 +0,0 @@
-package cn.newfeifan.mall.module.distri.service.applicationforwithdrawalchannel;
-
-import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.Test;
-
-import javax.annotation.Resource;
-
-import cn.newfeifan.mall.framework.test.core.ut.BaseDbUnitTest;
-
-import cn.newfeifan.mall.module.distri.controller.admin.applicationforwithdrawalchannel.vo.*;
-import cn.newfeifan.mall.module.distri.dal.dataobject.applicationforwithdrawalchannel.ApplicationForWithdrawalChannelDO;
-import cn.newfeifan.mall.module.distri.dal.mysql.applicationforwithdrawalchannel.ApplicationForWithdrawalChannelMapper;
-import cn.newfeifan.mall.framework.common.pojo.PageResult;
-
-import org.springframework.context.annotation.Import;
-import static cn.newfeifan.mall.module.distri.enums.ErrorCodeConstants.*;
-import static cn.newfeifan.mall.framework.test.core.util.AssertUtils.*;
-import static cn.newfeifan.mall.framework.test.core.util.RandomUtils.*;
-import static cn.newfeifan.mall.framework.common.util.date.LocalDateTimeUtils.*;
-import static cn.newfeifan.mall.framework.common.util.object.ObjectUtils.*;
-import static org.junit.jupiter.api.Assertions.*;
-
-/**
- * {@link ApplicationForWithdrawalChannelServiceImpl} 的单元测试类
- *
- * @author 非繁人
- */
-@Import(ApplicationForWithdrawalChannelServiceImpl.class)
-public class ApplicationForWithdrawalChannelServiceImplTest extends BaseDbUnitTest {
-
-    @Resource
-    private ApplicationForWithdrawalChannelServiceImpl applicationForWithdrawalChannelService;
-
-    @Resource
-    private ApplicationForWithdrawalChannelMapper applicationForWithdrawalChannelMapper;
-
-    @Test
-    public void testCreateApplicationForWithdrawalChannel_success() {
-        // 准备参数
-        ApplicationForWithdrawalChannelSaveReqVO createReqVO = randomPojo(ApplicationForWithdrawalChannelSaveReqVO.class).setId(null);
-
-        // 调用
-        Long applicationForWithdrawalChannelId = applicationForWithdrawalChannelService.createApplicationForWithdrawalChannel(createReqVO);
-        // 断言
-        assertNotNull(applicationForWithdrawalChannelId);
-        // 校验记录的属性是否正确
-        ApplicationForWithdrawalChannelDO applicationForWithdrawalChannel = applicationForWithdrawalChannelMapper.selectById(applicationForWithdrawalChannelId);
-        assertPojoEquals(createReqVO, applicationForWithdrawalChannel, "id");
-    }
-
-    @Test
-    public void testUpdateApplicationForWithdrawalChannel_success() {
-        // mock 数据
-        ApplicationForWithdrawalChannelDO dbApplicationForWithdrawalChannel = randomPojo(ApplicationForWithdrawalChannelDO.class);
-        applicationForWithdrawalChannelMapper.insert(dbApplicationForWithdrawalChannel);// @Sql: 先插入出一条存在的数据
-        // 准备参数
-        ApplicationForWithdrawalChannelSaveReqVO updateReqVO = randomPojo(ApplicationForWithdrawalChannelSaveReqVO.class, o -> {
-            o.setId(dbApplicationForWithdrawalChannel.getId()); // 设置更新的 ID
-        });
-
-        // 调用
-        applicationForWithdrawalChannelService.updateApplicationForWithdrawalChannel(updateReqVO);
-        // 校验是否更新正确
-        ApplicationForWithdrawalChannelDO applicationForWithdrawalChannel = applicationForWithdrawalChannelMapper.selectById(updateReqVO.getId()); // 获取最新的
-        assertPojoEquals(updateReqVO, applicationForWithdrawalChannel);
-    }
-
-    @Test
-    public void testUpdateApplicationForWithdrawalChannel_notExists() {
-        // 准备参数
-        ApplicationForWithdrawalChannelSaveReqVO updateReqVO = randomPojo(ApplicationForWithdrawalChannelSaveReqVO.class);
-
-        // 调用, 并断言异常
-        assertServiceException(() -> applicationForWithdrawalChannelService.updateApplicationForWithdrawalChannel(updateReqVO), APPLICATION_FOR_WITHDRAWAL_CHANNEL_NOT_EXISTS);
-    }
-
-    @Test
-    public void testDeleteApplicationForWithdrawalChannel_success() {
-        // mock 数据
-        ApplicationForWithdrawalChannelDO dbApplicationForWithdrawalChannel = randomPojo(ApplicationForWithdrawalChannelDO.class);
-        applicationForWithdrawalChannelMapper.insert(dbApplicationForWithdrawalChannel);// @Sql: 先插入出一条存在的数据
-        // 准备参数
-        Long id = dbApplicationForWithdrawalChannel.getId();
-
-        // 调用
-        applicationForWithdrawalChannelService.deleteApplicationForWithdrawalChannel(id);
-       // 校验数据不存在了
-       assertNull(applicationForWithdrawalChannelMapper.selectById(id));
-    }
-
-    @Test
-    public void testDeleteApplicationForWithdrawalChannel_notExists() {
-        // 准备参数
-        Long id = randomLongId();
-
-        // 调用, 并断言异常
-        assertServiceException(() -> applicationForWithdrawalChannelService.deleteApplicationForWithdrawalChannel(id), APPLICATION_FOR_WITHDRAWAL_CHANNEL_NOT_EXISTS);
-    }
-
-    @Test
-    @Disabled  // TODO 请修改 null 为需要的值,然后删除 @Disabled 注解
-    public void testGetApplicationForWithdrawalChannelPage() {
-       // mock 数据
-       ApplicationForWithdrawalChannelDO dbApplicationForWithdrawalChannel = randomPojo(ApplicationForWithdrawalChannelDO.class, o -> { // 等会查询到
-           o.setWithdrawalType(null);
-           o.setWithdrawalName(null);
-           o.setAmount(null);
-           o.setCount(null);
-           o.setStatus(null);
-           o.setPtDailyWithdrawalId(null);
-           o.setCreateTime(null);
-       });
-       applicationForWithdrawalChannelMapper.insert(dbApplicationForWithdrawalChannel);
-       // 测试 withdrawalType 不匹配
-       applicationForWithdrawalChannelMapper.insert(cloneIgnoreId(dbApplicationForWithdrawalChannel, o -> o.setWithdrawalType(null)));
-       // 测试 withdrawalName 不匹配
-       applicationForWithdrawalChannelMapper.insert(cloneIgnoreId(dbApplicationForWithdrawalChannel, o -> o.setWithdrawalName(null)));
-       // 测试 amount 不匹配
-       applicationForWithdrawalChannelMapper.insert(cloneIgnoreId(dbApplicationForWithdrawalChannel, o -> o.setAmount(null)));
-       // 测试 count 不匹配
-       applicationForWithdrawalChannelMapper.insert(cloneIgnoreId(dbApplicationForWithdrawalChannel, o -> o.setCount(null)));
-       // 测试 status 不匹配
-       applicationForWithdrawalChannelMapper.insert(cloneIgnoreId(dbApplicationForWithdrawalChannel, o -> o.setStatus(null)));
-       // 测试 ptDailyWithdrawalId 不匹配
-       applicationForWithdrawalChannelMapper.insert(cloneIgnoreId(dbApplicationForWithdrawalChannel, o -> o.setPtDailyWithdrawalId(null)));
-       // 测试 createTime 不匹配
-       applicationForWithdrawalChannelMapper.insert(cloneIgnoreId(dbApplicationForWithdrawalChannel, o -> o.setCreateTime(null)));
-       // 准备参数
-       ApplicationForWithdrawalChannelPageReqVO reqVO = new ApplicationForWithdrawalChannelPageReqVO();
-       reqVO.setWithdrawalType(null);
-       reqVO.setWithdrawalName(null);
-       reqVO.setAmount(null);
-       reqVO.setCount(null);
-       reqVO.setStatus(null);
-       reqVO.setPtDailyWithdrawalId(null);
-       reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
-
-       // 调用
-       PageResult<ApplicationForWithdrawalChannelDO> pageResult = applicationForWithdrawalChannelService.getApplicationForWithdrawalChannelPage(reqVO);
-       // 断言
-       assertEquals(1, pageResult.getTotal());
-       assertEquals(1, pageResult.getList().size());
-       assertPojoEquals(dbApplicationForWithdrawalChannel, pageResult.getList().get(0));
-    }
-
-}

+ 0 - 142
feifan-module-distri/feifan-module-distri-biz/src/test/java/cn/newfeifan/mall/module/distri/service/ptdailywithdrawal/PtDailyWithdrawalServiceImplTest.java

@@ -1,142 +0,0 @@
-package cn.newfeifan.mall.module.distri.service.ptdailywithdrawal;
-
-import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.Test;
-
-import javax.annotation.Resource;
-
-import cn.newfeifan.mall.framework.test.core.ut.BaseDbUnitTest;
-
-import cn.newfeifan.mall.module.distri.controller.admin.ptdailywithdrawal.vo.*;
-import cn.newfeifan.mall.module.distri.dal.dataobject.ptdailywithdrawal.PtDailyWithdrawalDO;
-import cn.newfeifan.mall.module.distri.dal.mysql.ptdailywithdrawal.PtDailyWithdrawalMapper;
-import cn.newfeifan.mall.framework.common.pojo.PageResult;
-
-import org.springframework.context.annotation.Import;
-import static cn.newfeifan.mall.module.distri.enums.ErrorCodeConstants.*;
-import static cn.newfeifan.mall.framework.test.core.util.AssertUtils.*;
-import static cn.newfeifan.mall.framework.test.core.util.RandomUtils.*;
-import static cn.newfeifan.mall.framework.common.util.date.LocalDateTimeUtils.*;
-import static cn.newfeifan.mall.framework.common.util.object.ObjectUtils.*;
-import static org.junit.jupiter.api.Assertions.*;
-
-/**
- * {@link PtDailyWithdrawalServiceImpl} 的单元测试类
- *
- * @author 非繁人
- */
-@Import(PtDailyWithdrawalServiceImpl.class)
-public class PtDailyWithdrawalServiceImplTest extends BaseDbUnitTest {
-
-    @Resource
-    private PtDailyWithdrawalServiceImpl ptDailyWithdrawalService;
-
-    @Resource
-    private PtDailyWithdrawalMapper ptDailyWithdrawalMapper;
-
-    @Test
-    public void testCreatePtDailyWithdrawal_success() {
-        // 准备参数
-        PtDailyWithdrawalSaveReqVO createReqVO = randomPojo(PtDailyWithdrawalSaveReqVO.class).setId(null);
-
-        // 调用
-        Long ptDailyWithdrawalId = ptDailyWithdrawalService.createPtDailyWithdrawal(createReqVO);
-        // 断言
-        assertNotNull(ptDailyWithdrawalId);
-        // 校验记录的属性是否正确
-        PtDailyWithdrawalDO ptDailyWithdrawal = ptDailyWithdrawalMapper.selectById(ptDailyWithdrawalId);
-        assertPojoEquals(createReqVO, ptDailyWithdrawal, "id");
-    }
-
-    @Test
-    public void testUpdatePtDailyWithdrawal_success() {
-        // mock 数据
-        PtDailyWithdrawalDO dbPtDailyWithdrawal = randomPojo(PtDailyWithdrawalDO.class);
-        ptDailyWithdrawalMapper.insert(dbPtDailyWithdrawal);// @Sql: 先插入出一条存在的数据
-        // 准备参数
-        PtDailyWithdrawalSaveReqVO updateReqVO = randomPojo(PtDailyWithdrawalSaveReqVO.class, o -> {
-            o.setId(dbPtDailyWithdrawal.getId()); // 设置更新的 ID
-        });
-
-        // 调用
-        ptDailyWithdrawalService.updatePtDailyWithdrawal(updateReqVO);
-        // 校验是否更新正确
-        PtDailyWithdrawalDO ptDailyWithdrawal = ptDailyWithdrawalMapper.selectById(updateReqVO.getId()); // 获取最新的
-        assertPojoEquals(updateReqVO, ptDailyWithdrawal);
-    }
-
-    @Test
-    public void testUpdatePtDailyWithdrawal_notExists() {
-        // 准备参数
-        PtDailyWithdrawalSaveReqVO updateReqVO = randomPojo(PtDailyWithdrawalSaveReqVO.class);
-
-        // 调用, 并断言异常
-        assertServiceException(() -> ptDailyWithdrawalService.updatePtDailyWithdrawal(updateReqVO), PT_DAILY_WITHDRAWAL_NOT_EXISTS);
-    }
-
-    @Test
-    public void testDeletePtDailyWithdrawal_success() {
-        // mock 数据
-        PtDailyWithdrawalDO dbPtDailyWithdrawal = randomPojo(PtDailyWithdrawalDO.class);
-        ptDailyWithdrawalMapper.insert(dbPtDailyWithdrawal);// @Sql: 先插入出一条存在的数据
-        // 准备参数
-        Long id = dbPtDailyWithdrawal.getId();
-
-        // 调用
-        ptDailyWithdrawalService.deletePtDailyWithdrawal(id);
-       // 校验数据不存在了
-       assertNull(ptDailyWithdrawalMapper.selectById(id));
-    }
-
-    @Test
-    public void testDeletePtDailyWithdrawal_notExists() {
-        // 准备参数
-        Long id = randomLongId();
-
-        // 调用, 并断言异常
-        assertServiceException(() -> ptDailyWithdrawalService.deletePtDailyWithdrawal(id), PT_DAILY_WITHDRAWAL_NOT_EXISTS);
-    }
-
-    @Test
-    @Disabled  // TODO 请修改 null 为需要的值,然后删除 @Disabled 注解
-    public void testGetPtDailyWithdrawalPage() {
-       // mock 数据
-       PtDailyWithdrawalDO dbPtDailyWithdrawal = randomPojo(PtDailyWithdrawalDO.class, o -> { // 等会查询到
-           o.setAmount(null);
-           o.setCount(null);
-           o.setStatus(null);
-           o.setStartTime(null);
-           o.setEndTime(null);
-           o.setCreateTime(null);
-       });
-       ptDailyWithdrawalMapper.insert(dbPtDailyWithdrawal);
-       // 测试 amount 不匹配
-       ptDailyWithdrawalMapper.insert(cloneIgnoreId(dbPtDailyWithdrawal, o -> o.setAmount(null)));
-       // 测试 count 不匹配
-       ptDailyWithdrawalMapper.insert(cloneIgnoreId(dbPtDailyWithdrawal, o -> o.setCount(null)));
-       // 测试 status 不匹配
-       ptDailyWithdrawalMapper.insert(cloneIgnoreId(dbPtDailyWithdrawal, o -> o.setStatus(null)));
-       // 测试 startTime 不匹配
-       ptDailyWithdrawalMapper.insert(cloneIgnoreId(dbPtDailyWithdrawal, o -> o.setStartTime(null)));
-       // 测试 endTime 不匹配
-       ptDailyWithdrawalMapper.insert(cloneIgnoreId(dbPtDailyWithdrawal, o -> o.setEndTime(null)));
-       // 测试 createTime 不匹配
-       ptDailyWithdrawalMapper.insert(cloneIgnoreId(dbPtDailyWithdrawal, o -> o.setCreateTime(null)));
-       // 准备参数
-       PtDailyWithdrawalPageReqVO reqVO = new PtDailyWithdrawalPageReqVO();
-       reqVO.setAmount(null);
-       reqVO.setCount(null);
-       reqVO.setStatus(null);
-       reqVO.setStartTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
-       reqVO.setEndTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
-       reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
-
-       // 调用
-       PageResult<PtDailyWithdrawalDO> pageResult = ptDailyWithdrawalService.getPtDailyWithdrawalPage(reqVO);
-       // 断言
-       assertEquals(1, pageResult.getTotal());
-       assertEquals(1, pageResult.getList().size());
-       assertPojoEquals(dbPtDailyWithdrawal, pageResult.getList().get(0));
-    }
-
-}

+ 5 - 0
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/order/excelVO/DailyBillOrderRespVO.java

@@ -42,6 +42,11 @@ public class DailyBillOrderRespVO {
     @ExcelProperty("购买数量")
     private Integer productCount;
 
+    @Schema(description = "收货地址")
+    @ExcelProperty("收货地址")
+    private String receiverDetailAddress;
+
+
     @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
     @ExcelProperty("下单时间")
     private LocalDateTime createTime;

+ 11 - 0
feifan-module-sale/feifan-module-sale-api/src/main/java/cn/newfeifan/mall/module/api/shop/ShopApi.java

@@ -0,0 +1,11 @@
+package cn.newfeifan.mall.module.api.shop;
+
+import cn.newfeifan.mall.module.api.shop.dto.ShopDTO;
+
+/**
+ * 获取店铺接口
+ */
+public interface ShopApi {
+
+    ShopDTO getShop(Long id);
+}

+ 41 - 0
feifan-module-sale/feifan-module-sale-api/src/main/java/cn/newfeifan/mall/module/api/shop/dto/ShopDTO.java

@@ -0,0 +1,41 @@
+package cn.newfeifan.mall.module.api.shop.dto;
+
+import lombok.Data;
+
+@Data
+public class ShopDTO {
+    private Long id;
+    /**
+     * 店铺名称
+     */
+    private String name;
+    /**
+     * 店铺状态
+     */
+    private Integer status;
+    /**
+     * 商户id
+     */
+    private Long merchantId;
+    /**
+     * logo地址
+     */
+    private String logoUrl;
+    /**
+     * 域名
+     */
+    private String website;
+
+    /**
+     * 账户名称
+     */
+    private String accountName;
+    /**
+     * 账户号码
+     */
+    private String accountNumber;
+    /**
+     * 开户银行
+     */
+    private String bankName;
+}

+ 21 - 0
feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/api/shop/ShopApiImpl.java

@@ -0,0 +1,21 @@
+package cn.newfeifan.mall.sale.api.shop;
+
+import cn.newfeifan.mall.framework.common.util.object.BeanUtils;
+import cn.newfeifan.mall.module.api.shop.ShopApi;
+import cn.newfeifan.mall.module.api.shop.dto.ShopDTO;
+import cn.newfeifan.mall.sale.service.shop.ShopService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+@Service
+public class ShopApiImpl implements ShopApi {
+
+    @Resource
+    private ShopService shopService;
+
+    @Override
+    public ShopDTO getShop(Long id) {
+        return BeanUtils.toBean(shopService.getShop(id), ShopDTO.class);
+    }
+}

+ 11 - 2
feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/controller/admin/merchant/vo/MerchantSaveReqVO.java

@@ -2,9 +2,7 @@ package cn.newfeifan.mall.sale.controller.admin.merchant.vo;
 
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.*;
-import java.util.*;
 import javax.validation.constraints.*;
-import org.springframework.format.annotation.DateTimeFormat;
 import java.time.LocalDateTime;
 
 @Schema(description = "管理后台 - 商户新增/修改 Request VO")
@@ -74,6 +72,17 @@ public class MerchantSaveReqVO {
     private Long areaId;
 
 
+    @Schema(description = "账户名称", example = "非繁人")
+    @NotEmpty(message = "账户名称不能为空")
+    private String accountName;
+
+    @Schema(description = "账户号码")
+    @NotEmpty(message = "账户号码不能为空")
+    private String accountNumber;
+
+    @Schema(description = "开户银行", example = "李四")
+    @NotEmpty(message = "开户银行不能为空")
+    private String bankName;
 
 
 }

+ 9 - 1
feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/controller/admin/shop/vo/ShopPageReqVO.java

@@ -1,7 +1,6 @@
 package cn.newfeifan.mall.sale.controller.admin.shop.vo;
 
 import lombok.*;
-import java.util.*;
 import io.swagger.v3.oas.annotations.media.Schema;
 import cn.newfeifan.mall.framework.common.pojo.PageParam;
 import org.springframework.format.annotation.DateTimeFormat;
@@ -31,4 +30,13 @@ public class ShopPageReqVO extends PageParam {
     @Schema(description = "logo地址", example = "https://www.zhongxing.cn")
     private String logoUrl;
 
+    @Schema(description = "账户名称", example = "非繁人")
+    private String accountName;
+
+    @Schema(description = "账户号码")
+    private String accountNumber;
+
+    @Schema(description = "开户银行", example = "李四")
+    private String bankName;
+
 }

+ 12 - 3
feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/controller/admin/shop/vo/ShopRespVO.java

@@ -2,9 +2,6 @@ package cn.newfeifan.mall.sale.controller.admin.shop.vo;
 
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.*;
-import java.util.*;
-import java.util.*;
-import org.springframework.format.annotation.DateTimeFormat;
 import java.time.LocalDateTime;
 import com.alibaba.excel.annotation.*;
 
@@ -45,4 +42,16 @@ public class ShopRespVO {
     @ExcelProperty("最后更新时间")
     private LocalDateTime updateTime;
 
+    @Schema(description = "账户名称", example = "非繁人")
+    @ExcelProperty("账户名称")
+    private String accountName;
+
+    @Schema(description = "账户号码")
+    @ExcelProperty("账户号码")
+    private String accountNumber;
+
+    @Schema(description = "开户银行", example = "李四")
+    @ExcelProperty("开户银行")
+    private String bankName;
+
 }

+ 12 - 1
feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/controller/admin/shop/vo/ShopSaveReqVO.java

@@ -3,7 +3,6 @@ package cn.newfeifan.mall.sale.controller.admin.shop.vo;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.*;
 
-import java.util.*;
 import javax.validation.constraints.*;
 
 @Schema(description = "管理后台 - 店铺新增/修改 Request VO")
@@ -34,5 +33,17 @@ public class ShopSaveReqVO {
     @Schema(description = "域名", example = "https://www.zhongxing.cn")
     private String website;
 
+    @Schema(description = "账户名称", example = "非繁人")
+    @NotNull(message = "账户名称不能为空")
+    private String accountName;
+
+    @Schema(description = "账户号码")
+    @NotNull(message = "账户号码不能为空")
+    private String accountNumber;
+
+    @Schema(description = "开户银行", example = "李四")
+    @NotNull(message = "开户银行不能为空")
+    private String bankName;
+
 
 }

+ 13 - 3
feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/dal/dataobject/shop/ShopDO.java

@@ -2,9 +2,6 @@ package cn.newfeifan.mall.sale.dal.dataobject.shop;
 
 import lombok.*;
 
-import java.util.*;
-import java.time.LocalDateTime;
-import java.time.LocalDateTime;
 
 import com.baomidou.mybatisplus.annotation.*;
 import cn.newfeifan.mall.framework.mybatis.core.dataobject.BaseDO;
@@ -50,4 +47,17 @@ public class ShopDO extends BaseDO {
      */
     private String website;
 
+    /**
+     * 账户名称
+     */
+    private String accountName;
+    /**
+     * 账户号码
+     */
+    private String accountNumber;
+    /**
+     * 开户银行
+     */
+    private String bankName;
+
 }

+ 1 - 3
feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/service/merchant/MerchantServiceImpl.java

@@ -13,7 +13,6 @@ import cn.newfeifan.mall.sale.controller.admin.merchant.vo.MerchantPageReqVO;
 import cn.newfeifan.mall.sale.controller.admin.merchant.vo.MerchantRespVO;
 import cn.newfeifan.mall.sale.controller.admin.merchant.vo.MerchantSaveReqVO;
 import cn.newfeifan.mall.sale.controller.admin.shop.vo.ShopRespVO;
-import cn.newfeifan.mall.sale.controller.admin.shop.vo.ShopSaveReqVO;
 import cn.newfeifan.mall.sale.dal.dataobject.merchant.MerchantDO;
 import cn.newfeifan.mall.sale.dal.mysql.merchant.MerchantMapper;
 import cn.newfeifan.mall.sale.dal.redis.ShopMessage;
@@ -34,7 +33,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
-import java.util.stream.Collectors;
 
 import static cn.newfeifan.mall.framework.common.exception.util.ServiceExceptionUtil.exception;
 import static cn.newfeifan.mall.module.enums.ErrorCodeConstants.MERCHANT_NOT_EXISTS;
@@ -70,7 +68,7 @@ public class MerchantServiceImpl implements MerchantService {
         merchantMapper.insert(merchant);
 
         // 创建一个店铺
-        Long shopId = shopService.createShop(merchant);
+        Long shopId = shopService.createShop(merchant, createReqVO);
         // 创建商户的时候, 根据手机号, 创建一个新的账号
         // 如果这个手机号已经存在, 则提示该手机号已经存在
         AdminUserDO adminUserDO = userMapper.selectByMobile(merchant.getContactNumber());

+ 3 - 1
feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/service/shop/ShopService.java

@@ -3,6 +3,7 @@ package cn.newfeifan.mall.sale.service.shop;
 import javax.validation.*;
 
 import cn.newfeifan.mall.module.system.controller.admin.user.vo.user.UserRespVO;
+import cn.newfeifan.mall.sale.controller.admin.merchant.vo.MerchantSaveReqVO;
 import cn.newfeifan.mall.sale.controller.admin.shop.vo.ShopRespVO;
 import cn.newfeifan.mall.sale.controller.admin.shop.vo.ShopSaveReqVO;
 import cn.newfeifan.mall.sale.dal.dataobject.merchant.MerchantDO;
@@ -32,9 +33,10 @@ public interface ShopService {
      * 创建店铺
      *
      * @param createReqVO 创建信息
+     * @param reqVO
      * @return 编号
      */
-    Long createShop( MerchantDO createReqVO);
+    Long createShop(MerchantDO createReqVO, MerchantSaveReqVO reqVO);
 
 
     /**

+ 7 - 2
feifan-module-sale/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/sale/service/shop/ShopServiceImpl.java

@@ -8,6 +8,7 @@ import cn.newfeifan.mall.module.system.dal.mysql.user.AdminUserMapper;
 import cn.newfeifan.mall.module.system.dal.redis.oauth2.OAuth2AccessTokenRedisDAO;
 import cn.newfeifan.mall.module.system.service.permission.RoleService;
 import cn.newfeifan.mall.module.system.service.user.AdminUserService;
+import cn.newfeifan.mall.sale.controller.admin.merchant.vo.MerchantSaveReqVO;
 import cn.newfeifan.mall.sale.controller.admin.shop.vo.ShopPageReqVO;
 import cn.newfeifan.mall.sale.controller.admin.shop.vo.ShopRespVO;
 import cn.newfeifan.mall.sale.controller.admin.shop.vo.ShopSaveReqVO;
@@ -58,13 +59,17 @@ public class ShopServiceImpl implements ShopService {
     }
 
     @Override
-    public Long createShop(MerchantDO createReqVO) {
+    public Long createShop(MerchantDO createReqVO, MerchantSaveReqVO reqVO) {
         ShopSaveReqVO build = ShopSaveReqVO.builder()
                 .logoUrl("")
                 .status(1)
                 .website(createReqVO.getWebsite())
                 .name(createReqVO.getName())
-                .merchantId(createReqVO.getId()).build();
+                .merchantId(createReqVO.getId())
+                .accountName(reqVO.getAccountName())
+                .accountNumber(reqVO.getAccountNumber())
+                .bankName(reqVO.getBankName())
+                .build();
         ShopDO shop = BeanUtils.toBean(build, ShopDO.class);
         shopMapper.insert(shop);
         return shop.getId();

+ 0 - 4
sql/mysql/建空库SQL/14_20240625.sql

@@ -15,7 +15,3 @@ ALTER TABLE distri_daily_bill
 ALTER TABLE trade_order_item
     ADD COLUMN `computation_bill` bit(1) DEFAULT b'0' COMMENT '是否已经计算每日账单,已计算是1,未计算为0';
 
-ALTER TABLE sale_shop
-    ADD COLUMN `receiving_bank_account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '收款银行账号',
-	ADD COLUMN `receiving_bank_account_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '收款银行名称';
-

+ 6 - 1
sql/mysql/建空库SQL/18_20240717.sql

@@ -52,4 +52,9 @@ CREATE TABLE `distri_pt_daily_withdrawal` (
                                               `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                               `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
                                               PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='平台每日提现记录表';
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='平台每日提现记录表';
+
+ALTER TABLE sale_shop
+    ADD COLUMN `account_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT null COMMENT '账户名称',
+		ADD COLUMN `account_number` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT null COMMENT '账户号码',
+		ADD COLUMN `bank_name` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT null COMMENT '开户银行';