From 31b1691a7fa40f065290b61d67525a6f670bf7b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE?= <8605635+zhang3064194730@user.noreply.gitee.com> Date: Mon, 7 Apr 2025 09:40:35 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E8=B4=A6?= =?UTF-8?q?=E5=8D=95=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/czg/controller/admin/ShopVendorController.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cash-api/product-server/src/main/java/com/czg/controller/admin/ShopVendorController.java b/cash-api/product-server/src/main/java/com/czg/controller/admin/ShopVendorController.java index 25350ea0..993f5a35 100644 --- a/cash-api/product-server/src/main/java/com/czg/controller/admin/ShopVendorController.java +++ b/cash-api/product-server/src/main/java/com/czg/controller/admin/ShopVendorController.java @@ -110,7 +110,7 @@ public class ShopVendorController { * @return 统计信息 */ @GetMapping("summary") - @OperationLog("供应商账单-统计") +// @OperationLog("供应商账单-统计") public CzgResult summary() { return CzgResult.success(shopVendorService.summary(StpKit.USER.getShopId())); } @@ -120,7 +120,7 @@ public class ShopVendorController { * @return 账单列表 */ @GetMapping("/bill") - @OperationLog("供应商账单-列表") +// @OperationLog("供应商账单-列表") public CzgResult> bill() { return CzgResult.success(shopVendorService.billList(StpKit.USER.getShopId())); } @@ -130,7 +130,7 @@ public class ShopVendorController { * @return 记录list */ @GetMapping("/bill/record") - @OperationLog("供应商账单-列表") +// @OperationLog("供应商账单-列表") public CzgResult> bill(@RequestParam Integer vendorId) { return CzgResult.success(shopVendorService.billRecord(StpKit.USER.getShopId(), vendorId)); } @@ -141,7 +141,7 @@ public class ShopVendorController { * @return 记录list */ @PostMapping("/bill/pay") - @OperationLog("供应商账单-付款") +// @OperationLog("供应商账单-付款") public CzgResult pay(@RequestBody @Validated ShopVendorBillPayDTO payDTO) { return CzgResult.success(shopVendorService.pay(StpKit.USER.getShopId(), payDTO)); } @@ -152,7 +152,7 @@ public class ShopVendorController { * @return 记录list */ @GetMapping("/bill/pay/record") - @OperationLog("供应商账单-付款记录") +// @OperationLog("供应商账单-付款记录") public CzgResult> payRecord(@RequestParam Long flowId) { return CzgResult.success(shopVendorService.payRecord(StpKit.USER.getShopId(), flowId)); } From 1b2551dfb19fae4000e79729dd7dd30c3c25ed14 Mon Sep 17 00:00:00 2001 From: Tankaikai Date: Mon, 7 Apr 2025 09:47:36 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=BA=97=E9=93=BA=E4=B8=BB=E8=A1=A8?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=8F=98=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/czg/account/entity/ShopInfo.java | 99 ++++++++++++------- 1 file changed, 62 insertions(+), 37 deletions(-) diff --git a/cash-common/cash-common-service/src/main/java/com/czg/account/entity/ShopInfo.java b/cash-common/cash-common-service/src/main/java/com/czg/account/entity/ShopInfo.java index 75f702ab..641d53d4 100644 --- a/cash-common/cash-common-service/src/main/java/com/czg/account/entity/ShopInfo.java +++ b/cash-common/cash-common-service/src/main/java/com/czg/account/entity/ShopInfo.java @@ -38,7 +38,7 @@ public class ShopInfo implements Serializable { /** * 主店id */ - private Integer mainId; + private Long mainId; /** * 店铺口号 @@ -90,7 +90,7 @@ public class ShopInfo implements Serializable { */ private String detail; /** - * 注册类型 + * 注册类型(经营模式) * 快餐版 先付 munchies * 餐饮版 先付/后付 restaurant */ @@ -187,46 +187,11 @@ public class ShopInfo implements Serializable { */ private String address; - /** - * 是否允许会员自定义金额 1 允许 0 不允许 - */ - private Integer isCustomAmount; - - /** - * 是否开启退款密码 1 启用 0 禁用 - */ - private Integer isReturnPwd; - - /** - * 是否开启会员充值密码 1 启用 0 禁用 - */ - private Integer isMemberInPwd; - - /** - * 是否开启会员退款密码 1 启用 0 禁用 - */ - private Integer isMemberReturnPwd; - - /** - * 是否免除桌位费 0否1是 - */ - private Integer isTableFee; - - /** - * 是否开启会员余额支付 - */ - private Integer isAccountPay; - /** * 桌位费 */ private BigDecimal tableFee; - /** - * 是否启用会员价 0否1是 - */ - private Integer isMemberPrice; - /** * 就餐模式 堂食 dine-in 外带 take-out */ @@ -272,4 +237,64 @@ public class ShopInfo implements Serializable { */ private String taxAmount; + /** + * 是否启用商品同步 1-是 0-否 + */ + @Column(ignore = true) + private Integer isEnableProdSync; + /** + * 是否启用会员同步 1-是 0-否 + */ + @Column(ignore = true) + private Integer isEnableVipSync; + /** + * 是否启用耗材同步 1-是 0-否 + */ + @Column(ignore = true) + private Integer isEnableConsSync; + /** + * 是否允许账号登录 1-是 0-否 + */ + @Column(ignore = true) + private Integer isAllowAccountLogin; + /** + * 是否允许会员自定义金额 1-允许 0-不允许 + */ + @Column(ignore = true) + private Integer isCustomAmount; + /** + * 是否开启退款密码 1-启用 0-禁用 + */ + @Column(ignore = true) + private Integer isReturnPwd; + /** + * 是否开启会员充值密码 1-启用 0-禁用 + */ + @Column(ignore = true) + private Integer isMemberInPwd; + /** + * 是否开启会员退款密码 1-启用 0-禁用 + */ + @Column(ignore = true) + private Integer isMemberReturnPwd; + /** + * 是否免除桌位费 1-是 0-否 + */ + @Column(ignore = true) + private Integer isTableFee; + /** + * 是否启用会员价 1-是 0-否 + */ + @Column(ignore = true) + private Integer isMemberPrice; + /** + * 是否允许会员余额支付 1-是 0-否 + */ + @Column(ignore = true) + private Integer isAccountPay; + /** + * 是否主店 1-是 0-否 + */ + @Column(ignore = true) + private Integer isHeadShop; } From b45a2bd82f0123ad1524525ff9fe287dfd21324a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE?= <8605635+zhang3064194730@user.noreply.gitee.com> Date: Mon, 7 Apr 2025 10:05:00 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/SyncNoticeController.java | 72 ++++++++++++++++++ .../com/czg/account/dto/SyncNoticeDTO.java | 64 ++++++++++++++++ .../com/czg/account/entity/SyncNotice.java | 73 +++++++++++++++++++ .../account/service/SyncNoticeService.java | 31 ++++++++ .../czg/product/dto/SyncNoticeReadDTO.java | 18 +++++ .../account/mapper/SyncNoticeMapper.java | 14 ++++ .../service/impl/SyncNoticeServiceImpl.java | 68 +++++++++++++++++ .../resources/mapper/SyncNoticeMapper.xml | 7 ++ 8 files changed, 347 insertions(+) create mode 100644 cash-api/account-server/src/main/java/com/czg/controller/admin/SyncNoticeController.java create mode 100644 cash-common/cash-common-service/src/main/java/com/czg/account/dto/SyncNoticeDTO.java create mode 100644 cash-common/cash-common-service/src/main/java/com/czg/account/entity/SyncNotice.java create mode 100644 cash-common/cash-common-service/src/main/java/com/czg/account/service/SyncNoticeService.java create mode 100644 cash-common/cash-common-service/src/main/java/com/czg/product/dto/SyncNoticeReadDTO.java create mode 100644 cash-service/account-service/src/main/java/com/czg/service/account/mapper/SyncNoticeMapper.java create mode 100644 cash-service/account-service/src/main/java/com/czg/service/account/service/impl/SyncNoticeServiceImpl.java create mode 100644 cash-service/account-service/src/main/resources/mapper/SyncNoticeMapper.xml diff --git a/cash-api/account-server/src/main/java/com/czg/controller/admin/SyncNoticeController.java b/cash-api/account-server/src/main/java/com/czg/controller/admin/SyncNoticeController.java new file mode 100644 index 00000000..c3cd60e5 --- /dev/null +++ b/cash-api/account-server/src/main/java/com/czg/controller/admin/SyncNoticeController.java @@ -0,0 +1,72 @@ +package com.czg.controller.admin; + +import com.czg.account.entity.SyncNotice; +import com.czg.account.service.SyncNoticeService; +import com.czg.product.dto.SyncNoticeReadDTO; +import com.czg.resp.CzgResult; +import com.czg.sa.StpKit; +import com.mybatisflex.core.paginate.Page; +import com.mybatisflex.core.query.QueryWrapper; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +/** + * @author Administrator + */ +@RestController +@RequestMapping("/admin/syncNotice") +public class SyncNoticeController { + @Resource + private SyncNoticeService syncNoticeService; + + /** + * 通知消息列表 + * @param name 名称 + * @param startTime 起始时间 + * @param endTime 结束时间 + * @param type 0-商品 1-耗材 + * @param isRead 0-未读 1-已读 + * @return 分页数据 + */ + @GetMapping + public CzgResult> page(@RequestParam(required = false) String name, @RequestParam(required = false) String startTime, + @RequestParam(required = false) String endTime, @RequestParam(required = false) Integer type, + @RequestParam(required = false) Integer isRead) { + return CzgResult.success(syncNoticeService.pageInfo(StpKit.USER.getShopId(), name, startTime, endTime, type, isRead)); + } + + /** + * 详情 + * @param id id + * @return 详细信息 + */ + @GetMapping("/detail") + public CzgResult detail(@RequestParam Long id) { + return CzgResult.success(syncNoticeService.getOne(new QueryWrapper().eq(SyncNotice::getShopId, StpKit.USER.getShopId()).eq(SyncNotice::getId, id))); + } + + + /** + * 已读消息 + * @return 是否成功 + */ + @PutMapping("/read") + public CzgResult read(@RequestBody @Validated SyncNoticeReadDTO syncNoticeReadDTO) { + return CzgResult.success(syncNoticeService.read(StpKit.USER.getShopId(), syncNoticeReadDTO)); + } + + + /** + * 消息统计 + * @return 消息记录数 + */ + @PutMapping("/count") + public CzgResult count(@RequestParam Integer isRead) { + QueryWrapper queryWrapper = new QueryWrapper().eq(SyncNotice::getShopId, StpKit.USER.getShopId()); + queryWrapper.eq(SyncNotice::getIsRead, isRead); + return CzgResult.success(syncNoticeService.count(queryWrapper)); + } + +} diff --git a/cash-common/cash-common-service/src/main/java/com/czg/account/dto/SyncNoticeDTO.java b/cash-common/cash-common-service/src/main/java/com/czg/account/dto/SyncNoticeDTO.java new file mode 100644 index 00000000..37d4e843 --- /dev/null +++ b/cash-common/cash-common-service/src/main/java/com/czg/account/dto/SyncNoticeDTO.java @@ -0,0 +1,64 @@ + +package com.czg.account.dto; + +import java.io.Serializable; +import java.time.LocalDateTime; +import com.alibaba.fastjson2.annotation.JSONField; +import java.io.Serial; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 实体类。 + * + * @author zs + * @since 2025-04-07 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class SyncNoticeDTO implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + private Long id; + + /** + * 商品名称或耗材名称 + */ + private String name; + + /** + * 来源id + */ + private Long sourceId; + + /** + * 操作用户id + */ + private Long sysUserId; + + /** + * 通知类型 0 商品变动 1 耗材变动 + */ + private Integer type; + + /** + * 是否已读,1已读 + */ + private Integer isRead; + + /** + * 店铺id + */ + private Long shopId; + + /** + * 创建时间 + */ + @JSONField(format = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + +} diff --git a/cash-common/cash-common-service/src/main/java/com/czg/account/entity/SyncNotice.java b/cash-common/cash-common-service/src/main/java/com/czg/account/entity/SyncNotice.java new file mode 100644 index 00000000..2d888957 --- /dev/null +++ b/cash-common/cash-common-service/src/main/java/com/czg/account/entity/SyncNotice.java @@ -0,0 +1,73 @@ +package com.czg.account.entity; + +import com.mybatisflex.annotation.Column; +import com.mybatisflex.annotation.Id; +import com.mybatisflex.annotation.KeyType; +import com.mybatisflex.annotation.Table; +import java.io.Serializable; +import java.time.LocalDateTime; + +import java.io.Serial; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 实体类。 + * + * @author zs + * @since 2025-04-07 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@Table("tb_sync_notice") +public class SyncNotice implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + @Id(keyType = KeyType.Auto) + private Long id; + + /** + * 商品名称或耗材名称 + */ + private String name; + + /** + * 来源id + */ + private Long sourceId; + + /** + * 操作用户id + */ + private Long sysUserId; + + /** + * 通知类型 0 商品变动 1 耗材变动 + */ + private Integer type; + + /** + * 是否已读,1已读 + */ + private Integer isRead; + + /** + * 店铺id + */ + private Long shopId; + + /** + * 创建时间 + */ + @Column(onInsertValue = "now()") + private LocalDateTime createTime; + private LocalDateTime readTime; + +} diff --git a/cash-common/cash-common-service/src/main/java/com/czg/account/service/SyncNoticeService.java b/cash-common/cash-common-service/src/main/java/com/czg/account/service/SyncNoticeService.java new file mode 100644 index 00000000..268bf1ee --- /dev/null +++ b/cash-common/cash-common-service/src/main/java/com/czg/account/service/SyncNoticeService.java @@ -0,0 +1,31 @@ +package com.czg.account.service; + +import com.czg.product.dto.SyncNoticeReadDTO; +import com.mybatisflex.core.paginate.Page; +import com.mybatisflex.core.service.IService; +import com.czg.account.entity.SyncNotice; + +import java.util.List; + +/** + * 服务层。 + * + * @author zs + * @since 2025-04-07 + */ +public interface SyncNoticeService extends IService { + /** + * 添加消息 + * @param shopId 店铺id + * @param sysUserId 操作用户id + * @param name 商品/耗材名称 + * @param id 商品/耗材id + * @param type 0-商品 1-耗材 + */ + void addNotice(Long shopId, Long sysUserId, String name, Long id, Integer type); + + Page pageInfo(Long shopId, String name, String startTime, String endTime, Integer type, Integer isRead); + + Boolean read(Long shopId, SyncNoticeReadDTO syncNoticeReadDTO); + +} diff --git a/cash-common/cash-common-service/src/main/java/com/czg/product/dto/SyncNoticeReadDTO.java b/cash-common/cash-common-service/src/main/java/com/czg/product/dto/SyncNoticeReadDTO.java new file mode 100644 index 00000000..89838a2a --- /dev/null +++ b/cash-common/cash-common-service/src/main/java/com/czg/product/dto/SyncNoticeReadDTO.java @@ -0,0 +1,18 @@ +package com.czg.product.dto; + +import jakarta.validation.constraints.NotEmpty; +import lombok.Data; + +import java.util.List; + +/** + * @author Administrator + */ +@Data +public class SyncNoticeReadDTO { + /** + * 消息id + */ + @NotEmpty + private List noticeIdList; +} diff --git a/cash-service/account-service/src/main/java/com/czg/service/account/mapper/SyncNoticeMapper.java b/cash-service/account-service/src/main/java/com/czg/service/account/mapper/SyncNoticeMapper.java new file mode 100644 index 00000000..4912daa7 --- /dev/null +++ b/cash-service/account-service/src/main/java/com/czg/service/account/mapper/SyncNoticeMapper.java @@ -0,0 +1,14 @@ +package com.czg.service.account.mapper; + +import com.mybatisflex.core.BaseMapper; +import com.czg.account.entity.SyncNotice; + +/** + * 映射层。 + * + * @author zs + * @since 2025-04-07 + */ +public interface SyncNoticeMapper extends BaseMapper { + +} diff --git a/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/SyncNoticeServiceImpl.java b/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/SyncNoticeServiceImpl.java new file mode 100644 index 00000000..7f0a4788 --- /dev/null +++ b/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/SyncNoticeServiceImpl.java @@ -0,0 +1,68 @@ +package com.czg.service.account.service.impl; + +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.StrUtil; +import com.czg.product.dto.SyncNoticeReadDTO; +import com.czg.utils.PageUtil; +import com.mybatisflex.core.paginate.Page; +import com.mybatisflex.core.query.QueryWrapper; +import com.mybatisflex.spring.service.impl.ServiceImpl; +import com.czg.account.entity.SyncNotice; +import com.czg.account.service.SyncNoticeService; +import com.czg.service.account.mapper.SyncNoticeMapper; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 服务层实现。 + * + * @author zs + * @since 2025-04-07 + */ +@Service +public class SyncNoticeServiceImpl extends ServiceImpl implements SyncNoticeService { + + @Override + public void addNotice(Long shopId, Long sysUserId, String name, Long id, Integer type) { + SyncNotice syncNotice = new SyncNotice(); + syncNotice.setShopId(shopId); + syncNotice.setSysUserId(sysUserId); + syncNotice.setName(name); + syncNotice.setSourceId(id); + syncNotice.setType(type); + save(syncNotice); + } + + @Override + public Page pageInfo(Long shopId, String name, String startTime, String endTime, Integer type, Integer isRead) { + QueryWrapper queryWrapper = new QueryWrapper().eq(SyncNotice::getShopId, shopId); + if (StrUtil.isNotBlank(name)) { + queryWrapper.like(SyncNotice::getName, name); + } + + if (StrUtil.isNotBlank(startTime)) { + queryWrapper.ge(SyncNotice::getCreateTime, startTime); + } + + if (StrUtil.isNotBlank(endTime)) { + queryWrapper.le(SyncNotice::getCreateTime, endTime); + } + queryWrapper.eq(SyncNotice::getType, type); + queryWrapper.eq(SyncNotice::getIsRead, isRead); + queryWrapper.orderBy(SyncNotice::getCreateTime, false); + return page(PageUtil.buildPage(), queryWrapper); + } + + @Override + public Boolean read(Long shopId, SyncNoticeReadDTO syncNoticeReadDTO) { + List listed = list(new QueryWrapper().eq(SyncNotice::getShopId, shopId).in(SyncNotice::getId, syncNoticeReadDTO.getNoticeIdList())); + listed.forEach(item -> { + if (item.getIsRead() == 0) { + item.setIsRead(1); + item.setReadTime(DateUtil.date().toLocalDateTime()); + } + }); + return updateBatch(listed); + } +} diff --git a/cash-service/account-service/src/main/resources/mapper/SyncNoticeMapper.xml b/cash-service/account-service/src/main/resources/mapper/SyncNoticeMapper.xml new file mode 100644 index 00000000..e8cb7db0 --- /dev/null +++ b/cash-service/account-service/src/main/resources/mapper/SyncNoticeMapper.xml @@ -0,0 +1,7 @@ + + + + + From 772c947808e0b965b95a75b3e05c86ade91629ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE?= <8605635+zhang3064194730@user.noreply.gitee.com> Date: Mon, 7 Apr 2025 10:13:33 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/SyncNoticeController.java | 1 + .../admin/ShopVendorController.java | 8 +++---- .../product/service/ShopVendorService.java | 4 ++-- .../product/mapper/ConsStockFlowMapper.java | 2 +- .../product/mapper/ShopVendorMapper.java | 2 +- .../service/impl/ShopVendorServiceImpl.java | 8 +++---- .../resources/mapper/ConsStockFlowMapper.xml | 21 +++++++++++-------- .../resources/mapper/ShopVendorMapper.xml | 17 ++++++++------- 8 files changed, 35 insertions(+), 28 deletions(-) diff --git a/cash-api/account-server/src/main/java/com/czg/controller/admin/SyncNoticeController.java b/cash-api/account-server/src/main/java/com/czg/controller/admin/SyncNoticeController.java index c3cd60e5..ee0e6674 100644 --- a/cash-api/account-server/src/main/java/com/czg/controller/admin/SyncNoticeController.java +++ b/cash-api/account-server/src/main/java/com/czg/controller/admin/SyncNoticeController.java @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; /** + * 通知中心-同步消息 * @author Administrator */ @RestController diff --git a/cash-api/product-server/src/main/java/com/czg/controller/admin/ShopVendorController.java b/cash-api/product-server/src/main/java/com/czg/controller/admin/ShopVendorController.java index 993f5a35..95f7f7f4 100644 --- a/cash-api/product-server/src/main/java/com/czg/controller/admin/ShopVendorController.java +++ b/cash-api/product-server/src/main/java/com/czg/controller/admin/ShopVendorController.java @@ -121,8 +121,8 @@ public class ShopVendorController { */ @GetMapping("/bill") // @OperationLog("供应商账单-列表") - public CzgResult> bill() { - return CzgResult.success(shopVendorService.billList(StpKit.USER.getShopId())); + public CzgResult> bill(@RequestParam(required = false) String key) { + return CzgResult.success(shopVendorService.billList(StpKit.USER.getShopId(), key)); } /** @@ -131,8 +131,8 @@ public class ShopVendorController { */ @GetMapping("/bill/record") // @OperationLog("供应商账单-列表") - public CzgResult> bill(@RequestParam Integer vendorId) { - return CzgResult.success(shopVendorService.billRecord(StpKit.USER.getShopId(), vendorId)); + public CzgResult> bill(@RequestParam Integer vendorId, @RequestParam(required = false) String key) { + return CzgResult.success(shopVendorService.billRecord(StpKit.USER.getShopId(), vendorId, key)); } diff --git a/cash-common/cash-common-service/src/main/java/com/czg/product/service/ShopVendorService.java b/cash-common/cash-common-service/src/main/java/com/czg/product/service/ShopVendorService.java index 493d86aa..3ca516bf 100644 --- a/cash-common/cash-common-service/src/main/java/com/czg/product/service/ShopVendorService.java +++ b/cash-common/cash-common-service/src/main/java/com/czg/product/service/ShopVendorService.java @@ -70,7 +70,7 @@ public interface ShopVendorService extends IService { * @param shopId 店铺id * @return 账单 */ - Page billList(Long shopId); + Page billList(Long shopId, String key); /** * 账单记录明细 @@ -79,7 +79,7 @@ public interface ShopVendorService extends IService { * @param vendorId 供应商id * @return 分页 */ - Page billRecord(Long shopId, Integer vendorId); + Page billRecord(Long shopId, Integer vendorId, String key); /** * 账单付款 diff --git a/cash-service/product-service/src/main/java/com/czg/service/product/mapper/ConsStockFlowMapper.java b/cash-service/product-service/src/main/java/com/czg/service/product/mapper/ConsStockFlowMapper.java index 490a9a67..5ea8a4d1 100644 --- a/cash-service/product-service/src/main/java/com/czg/service/product/mapper/ConsStockFlowMapper.java +++ b/cash-service/product-service/src/main/java/com/czg/service/product/mapper/ConsStockFlowMapper.java @@ -21,7 +21,7 @@ import java.util.List; public interface ConsStockFlowMapper extends BaseMapper { ConsStatisticsVo getConsStatistics(ConsInfoParam param); - List selectByVendorId(@Param("shopId") Long shopId, @Param("vendorId") Integer vendorId); + List selectByVendorId(@Param("shopId") Long shopId, @Param("vendorId") Integer vendorId, @Param("key") String key); List selectUnPaid(@Param("shopId") Long shopId, @Param("vendorIds") @NotEmpty List vendorIds); } diff --git a/cash-service/product-service/src/main/java/com/czg/service/product/mapper/ShopVendorMapper.java b/cash-service/product-service/src/main/java/com/czg/service/product/mapper/ShopVendorMapper.java index 07234afa..cbf2dc2d 100644 --- a/cash-service/product-service/src/main/java/com/czg/service/product/mapper/ShopVendorMapper.java +++ b/cash-service/product-service/src/main/java/com/czg/service/product/mapper/ShopVendorMapper.java @@ -21,5 +21,5 @@ public interface ShopVendorMapper extends BaseMapper { ShopVendorSummaryVO summary(@Param("shopId") Long shopId); - List bill(@Param("shopId") Long shopId); + List bill(@Param("shopId") Long shopId, @Param("key") String key); } diff --git a/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ShopVendorServiceImpl.java b/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ShopVendorServiceImpl.java index 92ef6de2..62fe82c3 100644 --- a/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ShopVendorServiceImpl.java +++ b/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ShopVendorServiceImpl.java @@ -122,15 +122,15 @@ public class ShopVendorServiceImpl extends ServiceImpl billList(Long shopId) { + public Page billList(Long shopId, String key) { PageHelper.startPage(PageUtil.buildPageHelp()); - return PageUtil.convert(new PageInfo<>(mapper.bill(shopId))); + return PageUtil.convert(new PageInfo<>(mapper.bill(shopId, key))); } @Override - public Page billRecord(Long shopId, Integer vendorId) { + public Page billRecord(Long shopId, Integer vendorId, String key) { PageHelper.startPage(PageUtil.buildPageHelp()); - return PageUtil.convert(new PageInfo<>(consStockFlowMapper.selectByVendorId(shopId, vendorId))); + return PageUtil.convert(new PageInfo<>(consStockFlowMapper.selectByVendorId(shopId, vendorId, key))); } @Override diff --git a/cash-service/product-service/src/main/resources/mapper/ConsStockFlowMapper.xml b/cash-service/product-service/src/main/resources/mapper/ConsStockFlowMapper.xml index ad05381b..cb5b52c2 100644 --- a/cash-service/product-service/src/main/resources/mapper/ConsStockFlowMapper.xml +++ b/cash-service/product-service/src/main/resources/mapper/ConsStockFlowMapper.xml @@ -37,17 +37,20 @@