feat(shop): 添加店铺运行模式、借呗支付和封面图功能

- 在ShopDTO、ShopEntity和SearchShopQuery中添加mode、balanceEnable和coverImg字段
- 修改ShopServiceImpl的getShopListByCorpid方法,过滤mode为4的店铺
- 更新数据库表结构,添加mode、balance_enable和cover_img字段
This commit is contained in:
dzq 2025-06-12 16:14:57 +08:00
parent 84157ed63e
commit 2c4ccc4dfd
5 changed files with 39 additions and 1 deletions

View File

@ -43,6 +43,18 @@ public class ShopEntity extends BaseEntity<ShopEntity> {
@TableField("belong_type")
private Integer belongType;
@ApiModelProperty("运行模式0-支付模式 1-审批模式 2-借还模式 3-会员模式 4-耗材模式)")
@TableField("mode")
private Integer mode;
@ApiModelProperty("借呗支付1-正常使用 0-禁止使用)")
@TableField("balance_enable")
private Integer balanceEnable;
@ApiModelProperty("封面图URL")
@TableField("cover_img")
private String coverImg;
@Override
public Serializable pkVal() {
return this.shopId;

View File

@ -53,6 +53,7 @@ public class ShopServiceImpl extends ServiceImpl<ShopMapper, ShopEntity> impleme
public List<ShopEntity> getShopListByCorpid(String corpid) {
QueryWrapper<ShopEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("corpid", corpid)
.ne("mode", 4)
.eq("deleted", 0);
return this.list(queryWrapper);
}

View File

@ -31,4 +31,13 @@ public class ShopDTO {
@ExcelColumn(name = "归属类型0-借还柜 1-固资通)")
private Integer belongType;
@ExcelColumn(name = "运行模式0-支付模式 1-审批模式 2-借还模式 3-会员模式 4-耗材模式)")
private Integer mode;
@ExcelColumn(name = "借呗支付1-正常使用 0-禁止使用)")
private Integer balanceEnable;
@ExcelColumn(name = "封面图URL")
private String coverImg;
}

View File

@ -17,6 +17,8 @@ public class SearchShopQuery<T> extends AbstractPageQuery<T> {
private Date endTime;
private String corpid;
private Integer belongType;
private Integer mode;
private Integer balanceEnable;
@Override
public QueryWrapper<T> addQueryCondition() {
@ -27,6 +29,8 @@ public class SearchShopQuery<T> extends AbstractPageQuery<T> {
.eq(StrUtil.isNotEmpty(enable), "enable", enable)
.eq(StrUtil.isNotEmpty(corpid), "corpid", corpid)
.eq(belongType != null, "belong_type", belongType)
.eq(mode != null, "mode", mode)
.eq(balanceEnable != null, "balance_enable", balanceEnable)
.between(startTime != null && endTime != null, "create_time", startTime, endTime);
this.timeRangeColumn = "create_time";

View File

@ -8,4 +8,16 @@ AFTER `corpid`;
ALTER TABLE `return_approval`
ADD COLUMN `audit_userid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '审批人企业UserID'
AFTER `corpid`;
AFTER `corpid`;
ALTER TABLE `shop`
ADD COLUMN `mode` TINYINT NOT NULL DEFAULT 0 COMMENT '运行模式0-支付模式 1-审批模式 2-借还模式 3-会员模式 4-耗材模式)'
AFTER `belong_type`;
ALTER TABLE `shop`
ADD COLUMN `balance_enable` TINYINT NOT NULL DEFAULT 1 COMMENT '借呗支付1-正常使用 0-禁止使用)'
AFTER `mode`;
ALTER TABLE `shop`
ADD COLUMN `cover_img` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '封面图URL'
AFTER `balance_enable`;