Merge #52 into master from cc_20260121_store_type
Merge branch 'cc_20260126_pingan_wallet' into cc_20260121_store_type
* cc_20260121_store_type: (100 commits squashed)
- Merge branch 'master' into cc_20251208_visit
- feat:订单列表
- feat:订单列表
- fix:拜访记录导出
- feat:列表处理
- Merge branch 'cc_20251208_visit' into cc_20260121_store_type
# Conflicts:
#	coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java
- feat:标准店接口处理
- feat:标准店接口处理
- feat:标准店接口处理
- feat:标准店接口处理
- feat:标准店接口处理
- fix:加盟缴费调整
- feat:标准店接口处理
- fix:加盟缴费调整
- Merge branch 'cc_20260126_pingan_wallet' into cc_20260121_store_type
# Conflicts:
#	coolstore-partner-model/src/main/java/com/cool/store/dto/wallet/BatchTransferDTO.java
#	coolstore-partner-model/src/main/java/com/cool/store/request/wallet/BatchTransferRequest.java
- feat:冲突解决
- feat:接口处理
- feat:shopInfo
- fix:PC缴费信息列表过滤已完成缴费信息
- fix:测试接口修改
- Merge branch 'refs/heads/cc_20260126_pingan_wallet' into cc_20260121_store_type
- fix:测试接口修改
- feat:接口
- feat:接口调整
- feat:注释调整
- feat:key 调整
- feat:订单ID
- feat:日志打印
- feat:选择标准店型
- feat:useStandardStore
- feat:标准店没有缴费阶段
- feat:标准店没有缴费阶段
- feat:标准店没有缴费阶段
- feat:标准店没有缴费阶段
- feat:阶段调整
- fix:修复加盟缴费流程流转错误
- feat:费用类型ID
- feat:锁释放
- feat:分账状态
- fix:加盟签约合同数据补充
- feat:排序
- feat:选项单位
- feat:选项单位
- feat:选项单位
- feat:选项单位
- feat:option_unit
- feat:option_unit
- feat:更新调整
- feat:视频非必填
- feat:optionUnit
- fix:转义
- Merge branch 'master' into cc_20260126_pingan_wallet
# Conflicts:
#	coolstore-partner-common/src/main/java/com/cool/store/constants/RedisConstant.java
- feat:同一配置项下只能设置一个默认选项
- feat:数量支持小数,新增首次订货字段
- fix:提交及修改校验合计缴费金额和分账总金额是否相同
- feat:queryPage
- feat:defaultQuantity 改为 BigDecimal
- feat:defaultQuantity 改为 BigDecimal
- feat:门店预约到店
- feat:门店预约到店 取消预约
- feat:门店预约到店 手机号
- feat:添加原价
- feat:添加原价
- feat:添加原价
- feat:字典表 remark
- Merge branch 'master' into cc_20260121_store_type
# Conflicts:
#	coolstore-partner-common/src/main/java/com/cool/store/constants/RedisConstant.java
#	coolstore-partner-common/src/main/java/com/cool/store/enums/FileTypeEnum.java
#	coolstore-partner-model/src/main/java/com/cool/store/vo/dict/DictColumnSimpleVO.java
#	coolstore-partner-service/src/main/java/com/cool/store/service/ExportRealizeService.java
#	coolstore-partner-service/src/main/java/com/cool/store/service/ExportService.java
#	coolstore-partner-service/src/main/java/com/cool/store/service/impl/ExportRealizeServiceImpl.java
#	coolstore-partner-service/src/main/java/com/cool/store/service/impl/ExportServiceImpl.java
#	coolstore-partner-web/src/main/java/com/cool/store/controller/webb/ExportController.java
- feat:字典表 remark
- feat:服务人员手机号
- feat:价格计算调整店型优惠价*默认数量 + 原价 *(选择数量-默认数量)
- fix:补充钱包账单推送新管家流程
- fix:账单推送钱包支付类型payWay由1改为2
- feat:同一配置项下只能设置一个默认选项 限制去掉
- fix:平安钱包分账信息改为非必填
- feat:同一配置项只能选择一个选项 限制去掉
- feat:心愿单
- feat:心愿单
- feat:心愿单接口调整
- feat:心愿单接口调整
- feat:心愿单接口调整
- feat:批量更新数据
- feat:查询店型已配置的选项绑定 新增顶部预览图
- feat:查询店型已配置的选项绑定 新增顶部预览图
- feat:查询店型已配置的选项绑定 新增顶部预览图
- feat:配置大类
- feat:配置大类
- feat:价格优化
- feat:阶段审批处理
- fix:删除设计费-立规
- feat:配置大项 配置项接口改造
- feat:配置大项 配置项接口改造
- feat:handleAudit
- feat:新增code
- feat:categoryId
- feat:心愿单接口更新
- feat:心愿单接口更新
- feat:心愿单接口更新
- feat:心愿单接口更新
- feat:心愿单接口更新
- Merge branch 'cc_20260126_pingan_wallet' into cc_20260121_store_type
# Conflicts:
#	coolstore-partner-common/src/main/java/com/cool/store/constants/RedisConstant.java
- Merge branch 'master' into cc_20260121_store_type
# Conflicts:
#	coolstore-partner-service/src/main/java/com/cool/store/service/impl/SignFranchiseServiceImpl.java
Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/52
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.common;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.cool.store.constants;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 字典表常量池
|
||||
@@ -13,4 +16,21 @@ public class DictConstants {
|
||||
* 装修设计要求-统一装修设计
|
||||
*/
|
||||
public static final String DECORATION_REQUIREMENT_UNIFORM = "decoration_requirement_uniform";
|
||||
|
||||
/**
|
||||
* 加盟费-费用类型
|
||||
*/
|
||||
public static final String EXPENSE_TYPE = "expense_type";
|
||||
|
||||
/**
|
||||
* 平安钱包默认分账费用类型字典项code
|
||||
*/
|
||||
public static final List<String> PING_AN_DEFAULT_ALLOCATION_EXPENSE_TYPE_CODES = Arrays.asList(
|
||||
"expense_franchise_fee",
|
||||
"expense_management_fee",
|
||||
"expense_brand_usage_fee",
|
||||
"expense_design_fee_group",
|
||||
// "expense_design_fee_lg",
|
||||
"expense_earnest_money"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -346,7 +346,9 @@ public class RedisConstant {
|
||||
* 十二分导入锁
|
||||
*/
|
||||
public static final String TP_PENALTY_APPLY_IMPORT_LOCK = "tp_penalty_apply_import_lock";
|
||||
|
||||
|
||||
public static final String STANDARD_STORE_PAY_LOCK_KEY = "standard_store_pay_lock_key:{0}";
|
||||
|
||||
/**
|
||||
* 拜访记录导出锁
|
||||
*/
|
||||
@@ -361,4 +363,14 @@ public class RedisConstant {
|
||||
* 我的铺位导出锁
|
||||
*/
|
||||
public static final String MY_POINT_EXPORT_LOCK = "my_point_export_lock";
|
||||
|
||||
/**
|
||||
* 钱包分账公司配置-招商分部
|
||||
*/
|
||||
public static final String WALLET_ALLOCATION_CONFIG_INVEST_DIVISION = "wallet_invest_allocation_id";
|
||||
|
||||
/**
|
||||
* 钱包分账支付锁
|
||||
*/
|
||||
public static final String WALLET_ALLOCATION_PAY_LOCK_KEY = "wallet_allocation_pay_lock_key:{0}";
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ public enum AuditTypeEnum {
|
||||
BUILDINFORMATION(15,"建店资料信息"),
|
||||
JINg_DONG_WAI_MAI(16,"京东外卖"),
|
||||
OPENING_ACCEPTANCE(17,"开业验收"),
|
||||
STANDARD_STORE(18,"标准店"),
|
||||
;
|
||||
|
||||
private Integer code;
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 业务模块枚举
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BusinessModuleEnum {
|
||||
WALLET_ALLOCATION_CONFIG("WALLET_ALLOCATION_CONFIG", "分账配置"),
|
||||
PAYEE_BANK_CONFIG("PAYEE_BANK_CONFIG", "收款银行配置"),
|
||||
FEE_STANDARD_CONFIG("FEE_STANDARD_CONFIG", "加盟费用标准收费额配置"),
|
||||
;
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
public static BusinessModuleEnum getByCode(String code) {
|
||||
for (BusinessModuleEnum e : BusinessModuleEnum.values()) {
|
||||
if (e.getCode().equals(code)) {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,9 +334,38 @@ public enum ErrorCodeEnum {
|
||||
STORE_NOT_FIND(1610013,"门店不存在",null),
|
||||
SHOP_NAME_INVALID(1610014, "门店名称包含禁止关键词",null),
|
||||
CONTRACT_STAGE_NO_COMPLETE(1610015, "当前阶段无法分配运营顾问!",null),
|
||||
|
||||
CONFIG_OPTION_USED(1610015, "配置选项已被店型使用,无法删除", null),
|
||||
STORE_TYPE_OPTION_DEFAULT_DUPLICATE(1610016, "同一配置项下只能设置一个默认选项", null),
|
||||
STORE_TYPE_MUST_DISABLE_BEFORE_DELETE(1610017, "店型已启用,无法删除,请先停用", null),
|
||||
STORE_ORDER_ITEM_CODE_DUPLICATE(1610018, "同一配置项只能选择一个选项", null),
|
||||
CONFIG_OPTION_NAME_EXIST(1610019, "配置选项名称已存在", null),
|
||||
THE_OPTION_IS_NOT_PART_OF_THIS_STORE_TYPE(1610022, "选项不属于该店型", null),
|
||||
THE_QUANTITY_MUST_BE_GREATER_THAN_0(1610020, "数量必须大于0", null),
|
||||
THE_NUMBER_OF_OPTIONS_IS_NOT_MODIFIABLE(1610021, "该选项数量不可修改", null),
|
||||
SHOP_HAS_UNFINISHED_ORDER(1610023, "当前门店存在未结束订单,无法新建", null),
|
||||
SHOP_HAS_PAID_ORDER(1610024, "当前门店已支付完成,不支持新建订单", null),
|
||||
ORDER_PAYING_CANT_ADJUST(1610025,"订单支付中,无法调整", null),
|
||||
ORDER_AMOUNT_NOT_DIFF(1610025,"分账明细与订单金额不相等,请确认!", null),
|
||||
CODE_EXIST(1610026,"存在相同的编码,请确认!", null),
|
||||
|
||||
|
||||
STORE_ORDER_NOT_FOUND(1610100, "订单不存在", null),
|
||||
STORE_ORDER_STATUS_INVALID(1610101, "订单状态不合法", null),
|
||||
STORE_ORDER_UPDATE_FORBIDDEN(1610102, "当前订单状态不允许修改", null),
|
||||
STORE_ORDER_WITHDRAW_FORBIDDEN(1610103, "当前订单状态不允许撤回", null),
|
||||
STORE_ORDER_CANCEL_FORBIDDEN(1610104, "当前订单状态不允许作废", null),
|
||||
CURRENT_STORE_TYPE_EXIST(1610105, "当前店型已存在", null),
|
||||
CURRENT_STORE_TYPE_NOT_EXIST(1610106, "当前店型不存在", null),
|
||||
PAY_FAIL(1610107, "支付失败", null),
|
||||
DUPLICATE_PAYMENTS(1610108, "订单支付中,请勿重复支付!", null),
|
||||
CURRENT_ORDER_NOT_SUPPORT(1610109, "当前订单状态不支持审批!", null),
|
||||
|
||||
|
||||
|
||||
//装修
|
||||
TEAM_USED(1612001,"该装修团队有门店使用,无法删除,请确认!",null),
|
||||
CURRENT_BRAND_SORT_NUMBER_EXIST(16100007,"当前品牌已存在该排序数字!",null),
|
||||
CURRENT_BRAND_SORT_NUMBER_EXIST(16100007,"已存在该排序数字!",null),
|
||||
CONTRACT_CONFIG_NOT_EXIST(16100008,"合同配置不存在!",null),
|
||||
|
||||
WALLET_OPEN_ACCOUNT_FAIL(1620001,"钱包开通失败",null),
|
||||
@@ -393,6 +422,30 @@ public enum ErrorCodeEnum {
|
||||
VISIT_RECORD_COMPLETE(1820005, "已完成拜访", null),
|
||||
EXPORT_TASK_LIMIT(1830006, "导出任务数量达上限,请稍后再试", null),
|
||||
CITY_PLANNING_EXISTS(1820001, "同年份同季度同省市已存在规划,不能重复添加", null),
|
||||
|
||||
WALLET_INVEST_TYPE_EXISTS(1830000, "同品牌同费用仅能存在分部或全部", null),
|
||||
WALLET_UNIQUE_KEY_EXISTS(1830001, "该加盟品牌、招商分部、费用类型已存在", null),
|
||||
BANK_CONFIG_INVEST_TYPE_EXISTS(1830002, "同品牌同付款方式只能配置全部或分部其中一种", null),
|
||||
BANK_CONFIG_UNIQUE_KEY_EXISTS(1830003, "该加盟品牌、招商分部、付款方式配置已存在", null),
|
||||
FEE_STANDARD_UNIQUE_KEY_EXISTS(1830003, "该加盟品牌、费用类型配置已存在", null),
|
||||
NO_PAYMENT_METHOD_IS_SET(1830004, "未设置支付方式", null),
|
||||
FRANCHISE_FEE_PAY_TYPE_ERROR(1830005,"缴款方式已选择,不可更改!",null),
|
||||
EXIST_PAY_INFO(1830006, "存在缴款,无法修改分账信息", null),
|
||||
PAY_TYPE_UNEQUAL_TO_PING_AN_WALLET(1830007, "支付方式不为平安钱包支付", null),
|
||||
NONSUPPORT_EXPENSE_TYPE(1830008, "不支持的费用类型", null),
|
||||
EXPENSE_TYPE_HAS_PAID(1830009, "{0}已完成支付", null),
|
||||
EXPENSE_CHANGED(1830010, "费用发生变化,请刷新页面后重试", null),
|
||||
THERE_IS_NO_PAYMENT_INFORMATION(1830011, "不存在缴费信息", null),
|
||||
THE_USER_IS_PAYING_UNABLE_UPDATE(1830012, "用户缴费中,无法编辑", null),
|
||||
THE_USER_IS_PAYING(1830018, "用户缴费中,请稍后再试", null),
|
||||
ALLOCATION_CONFIG_NOT_EXIST(1830013, "不存在分账配置信息", null),
|
||||
NOT_EXIST_CALLBACK_RESOLVE(1830014, "不存在回调处理策略", null),
|
||||
NOT_EXIST_PING_AN_ACCOUNT(1830015, "不存在平安账户,请开通", null),
|
||||
NOT_ENOUGH_BALANCE(1830016, "账户余额不足", null),
|
||||
WALLET_TRANS_FAIL(1830017, "钱包交易失败", null),
|
||||
WALLET_RE_PAY_FAIL(1830019, "重新支付异常,请联系管理员", null),
|
||||
WALLET_PAY_CANNOT_CANCEL(1830020, "该交易无法取消", null),
|
||||
TOTAL_FEES_NEED_EQUAL(1830021, "分账总金额需与合计缴费金额一致", null),
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ public enum FileTypeEnum {
|
||||
TP_PENALTY_IMPORT("tpPenaltyImport", "十二分惩处申请单导入"),
|
||||
TP_PENALTY_ERROR_EXPORT("tpPenaltyErrorExport", "十二分惩处申请单导入错误列表"),
|
||||
VISIT_RECORD_EXPORT("visitRecordExport", "拜访记录列表"),
|
||||
ORDER_RECORD_EXPORT("orderRecordExport", "订单记录列表"),
|
||||
POINT_EXPORT("pointExport", "铺位管理列表"),
|
||||
MY_POINT_EXPORT("myPointExport", "我的铺位管理列表"),
|
||||
;
|
||||
|
||||
@@ -10,7 +10,9 @@ public enum StoreTypeEnum {
|
||||
//:0-无展示门店、1-餐厅店、2-普通门店
|
||||
NO_SHOW_STORE(0, "无展示门店"),
|
||||
RESTAURANT_STORE(1, "餐厅店"),
|
||||
ORDINARY_STORE(2, "普通门店");
|
||||
ORDINARY_STORE(2, "普通门店"),
|
||||
X_STORE(3, "X店型"),
|
||||
Z_STORE(4, "Z店型");
|
||||
private Integer code;
|
||||
private String message;
|
||||
StoreTypeEnum(Integer code, String message) {
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.cool.store.enums.dict;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/1/22 16:24
|
||||
* @Version 1.0
|
||||
*/
|
||||
public enum DictTableEnum {
|
||||
|
||||
|
||||
STANDARD_STORE_TYPE_CONFIG_TYPE("standard_store_type_config_type","标准店型配置类型"),
|
||||
STANDARD_STORE_TYPE_CONFIG_COLUMN("standard_store_type_config_column","标准店型配置项"),
|
||||
|
||||
;
|
||||
|
||||
private String code;
|
||||
|
||||
private String message;
|
||||
|
||||
DictTableEnum(String code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.cool.store.enums.fees;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 平安钱包缴费转账状态枚举类
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/2/3
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum AllocationPayStatusEnum {
|
||||
|
||||
PAID(1, "已支付"),
|
||||
FAIL(2, "支付失败"),
|
||||
PAYING(3, "支付中"),
|
||||
CANCEL(4, "已取消")
|
||||
;
|
||||
|
||||
private final Integer status;
|
||||
|
||||
private final String desc;
|
||||
|
||||
public static String getDescByStatus(Integer status) {
|
||||
for (AllocationPayStatusEnum value : values()) {
|
||||
if (value.status.equals(status)) {
|
||||
return value.desc;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.cool.store.enums.fees;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 支付方式枚举类
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/1/29
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum PayTypeEnum {
|
||||
|
||||
OFFLINE(1, "线下支付"),
|
||||
PING_AN(2, "平安钱包支付"),
|
||||
;
|
||||
|
||||
private final Integer type;
|
||||
|
||||
private final String desc;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.cool.store.enums.fees;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 钱包转账费用科目枚举类
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/1/30
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WalletFeeItemEnum {
|
||||
FRANCHISE_FEE(310, "expense_franchise_fee", "加盟费"),
|
||||
MANAGEMENT_FEE(311, "expense_management_fee", "管理费(年)"),
|
||||
BRAND_USAGE_FEE(312, "expense_brand_usage_fee", "品牌使用费(年)"),
|
||||
DESIGN_FEE_GROUP(313, "expense_design_fee_group", "设计费-集团"),
|
||||
// DESIGN_FEE_LG(314, "expense_design_fee_lg", "设计费-立规"),
|
||||
EARNEST_MONEY(315, "expense_earnest_money", "保证金"),
|
||||
EXPENSE_DECORATION_MONEY(316, "expense_decoration_money", "装修费"),
|
||||
EXPENSE_EQUIPMENT_MONEY(317, "expense_equipment_money", "设备费"),
|
||||
;
|
||||
|
||||
private final Integer feeItemId;
|
||||
|
||||
private final String expenseType;
|
||||
|
||||
private final String desc;
|
||||
|
||||
public static WalletFeeItemEnum getByExpenseType(String expenseType) {
|
||||
for (WalletFeeItemEnum value : WalletFeeItemEnum.values()) {
|
||||
if (value.expenseType.equals(expenseType)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static WalletFeeItemEnum getByFeeItemId(Integer feeItemId) {
|
||||
for (WalletFeeItemEnum value : WalletFeeItemEnum.values()) {
|
||||
if (value.feeItemId.equals(feeItemId)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.cool.store.enums.order;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Getter
|
||||
public enum StoreOrderStatusEnum {
|
||||
|
||||
DRAFT(0, "草稿"),
|
||||
WAIT_CONFIRM(5, "待立规确认"),
|
||||
INVEST_MANAGER_CONFIRM(7, "待招商经理确认"),
|
||||
FINANCIAL_CONFIRM(8, "待财务确认"),
|
||||
WAIT_ADJUST(10, "待调整"),
|
||||
WAIT_PAY(15, "待支付"),
|
||||
PAID(20, "已支付"),
|
||||
PAY_FAIL(22, "支付失败"),
|
||||
CLOSED(25, "已关闭");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
|
||||
StoreOrderStatusEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
private static final Map<Integer, StoreOrderStatusEnum> MAP = Arrays.stream(values())
|
||||
.collect(Collectors.toMap(StoreOrderStatusEnum::getCode, Function.identity(), (a, b) -> a));
|
||||
|
||||
public static StoreOrderStatusEnum of(Integer code) {
|
||||
return MAP.get(code);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 可撤回阶段
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
public static boolean canWithdraw(Integer code) {
|
||||
return WAIT_CONFIRM.getCode().equals(code) || WAIT_PAY.getCode().equals(code)||INVEST_MANAGER_CONFIRM.getCode().equals(code);
|
||||
}
|
||||
|
||||
/**
|
||||
* 待审核状态
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
public static boolean approve(Integer code) {
|
||||
return WAIT_CONFIRM.getCode().equals(code) || INVEST_MANAGER_CONFIRM.getCode().equals(code);
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,8 @@ public enum ShopSubStageEnum {
|
||||
|
||||
SHOP_STAGE_6(ShopStageEnum.SHOP_STAGE_2, 260, "开通门店平安钱包", 1),
|
||||
SHOP_STAGE_27(ShopStageEnum.SHOP_STAGE_2, 270, "开业验收", 1),
|
||||
SHOP_STAGE_28(ShopStageEnum.SHOP_STAGE_2, 280, "选择标准店型", 1),
|
||||
|
||||
|
||||
SHOP_STAGE_30(ShopStageEnum.SHOP_STAGE_2, 300, "开业日期报备", 1),
|
||||
|
||||
@@ -68,11 +70,19 @@ public enum ShopSubStageEnum {
|
||||
this.planCompleteDays = planCompleteDays;
|
||||
}
|
||||
|
||||
public static Integer getTotalStageIsLocationAndPreparation() {
|
||||
public static Integer getTotalStageIsLocationAndPreparation(Integer useStandardStore) {
|
||||
int total = 0;
|
||||
for (ShopSubStageEnum shopStageEnum : ShopSubStageEnum.values()) {
|
||||
if (shopStageEnum.getShopStageEnum().getShopStage().equals(ShopStageEnum.SHOP_STAGE_1.getShopStage())
|
||||
|| shopStageEnum.getShopStageEnum().getShopStage().equals(ShopStageEnum.SHOP_STAGE_2.getShopStage())) {
|
||||
//如果不是标准店 且是SHOP_STAGE_28 直接continue
|
||||
if (useStandardStore==0&&shopStageEnum.getShopSubStage().equals(SHOP_STAGE_28.getShopSubStage())){
|
||||
continue;
|
||||
}
|
||||
//是标准店 没有缴费阶段
|
||||
if (useStandardStore==1&&shopStageEnum.getShopSubStage().equals(SHOP_STAGE_8.getShopSubStage())){
|
||||
continue;
|
||||
}
|
||||
total++;
|
||||
}
|
||||
}
|
||||
@@ -110,20 +120,16 @@ public enum ShopSubStageEnum {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public ShopSubStageStatusEnum getInitStatus() {
|
||||
public ShopSubStageStatusEnum getInitStatus(Integer userStrandard) {
|
||||
switch (this) {
|
||||
case SHOP_STAGE_1:
|
||||
return ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_10;
|
||||
case SHOP_STAGE_5:
|
||||
return ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_50;
|
||||
// case SHOP_STAGE_6:
|
||||
// return ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_60;
|
||||
// case SHOP_STAGE_7:
|
||||
// return ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70;
|
||||
case SHOP_STAGE_6:
|
||||
case SHOP_STAGE_2:
|
||||
case SHOP_STAGE_3:
|
||||
case SHOP_STAGE_4:
|
||||
case SHOP_STAGE_7:
|
||||
case SHOP_STAGE_8:
|
||||
case SHOP_STAGE_8_5:
|
||||
case SHOP_STAGE_8_6:
|
||||
@@ -145,6 +151,20 @@ public enum ShopSubStageEnum {
|
||||
case SHOP_STAGE_27:
|
||||
case SHOP_STAGE_30:
|
||||
return ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00;
|
||||
case SHOP_STAGE_7:
|
||||
if (userStrandard==1){
|
||||
//是标准店 不需要单独缴费 统一收款
|
||||
return null;
|
||||
}else {
|
||||
return ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00;
|
||||
}
|
||||
case SHOP_STAGE_28:
|
||||
if (userStrandard==1){
|
||||
//是标准店 需要选择店型 其他情况不需要选择店型
|
||||
return ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -166,6 +166,16 @@ public enum ShopSubStageStatusEnum {
|
||||
SHOP_SUB_STAGE_STATUS_274(ShopSubStageEnum.SHOP_STAGE_27, 2740,"待整改", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_276(ShopSubStageEnum.SHOP_STAGE_27, 2760,"已完成", Boolean.TRUE),
|
||||
|
||||
|
||||
SHOP_SUB_STAGE_STATUS_280(ShopSubStageEnum.SHOP_STAGE_28, 2800, "待选购", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_281(ShopSubStageEnum.SHOP_STAGE_28, 2810, "待立规审批", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_281_5(ShopSubStageEnum.SHOP_STAGE_28, 2815, "待招商经理审批", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_282(ShopSubStageEnum.SHOP_STAGE_28, 2820, "待财务确认", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_283(ShopSubStageEnum.SHOP_STAGE_28, 2830, "审批拒绝", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_284(ShopSubStageEnum.SHOP_STAGE_28, 2840, "待缴费", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_285(ShopSubStageEnum.SHOP_STAGE_28, 2850, "已完成", Boolean.TRUE),
|
||||
|
||||
|
||||
//开业日期报备
|
||||
SHOP_SUB_STAGE_STATUS_300(ShopSubStageEnum.SHOP_STAGE_30, 3000, "待填写", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_310(ShopSubStageEnum.SHOP_STAGE_30, 3010, "待开业确认", Boolean.FALSE),
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.cool.store.enums.visit;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 预约到店状态
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum StoreVisitReservationStatusEnum {
|
||||
|
||||
WAIT_CONFIRM(10, "待确认"),
|
||||
WAIT_VISIT(20, "待看店"),
|
||||
ARRIVED(30, "已到店"),
|
||||
CANCELED(40, "已取消");
|
||||
|
||||
private final Integer status;
|
||||
private final String desc;
|
||||
|
||||
public static boolean isValid(Integer status) {
|
||||
if (status == null) {
|
||||
return false;
|
||||
}
|
||||
for (StoreVisitReservationStatusEnum value : values()) {
|
||||
if (value.status.equals(status)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.cool.store.enums.wallet;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 钱包交易业务模块枚举类
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/2/4
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WalletTradeModuleEnum {
|
||||
|
||||
FRANCHISE_PAY("FRANCHISE_PAY", "钱包加盟缴费"),
|
||||
STANDARD_STORE("STANDARD_STORE", "标准店缴费"),
|
||||
;
|
||||
|
||||
private final String module;
|
||||
|
||||
private final String desc;
|
||||
|
||||
public static WalletTradeModuleEnum getByModule(String module) {
|
||||
for (WalletTradeModuleEnum value : WalletTradeModuleEnum.values()) {
|
||||
if (value.getModule().equals(module)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -22,4 +22,12 @@ public class CommonUtil {
|
||||
} catch (Exception ignored) {}
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
public static BigDecimal addAll(String... value) {
|
||||
BigDecimal total = new BigDecimal(0);
|
||||
for (String v : value) {
|
||||
total = total.add(convertToBig(v));
|
||||
}
|
||||
return total;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.cool.store.utils;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
import static com.cool.store.utils.CoolDateUtils.DATE_FORMAT_SEC_9;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 编号生成工具栏
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/2/5
|
||||
*/
|
||||
public class GenerateNoUtil {
|
||||
|
||||
/**
|
||||
* 生成编号,yyyyMMddHHmmssSSS+3位随机数
|
||||
*/
|
||||
public static String generateMillsNoWithRandom() {
|
||||
DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern(DATE_FORMAT_SEC_9);
|
||||
return LocalDateTime.now().format(dateFormatter) + ((int) (Math.random() * 900) + 100);
|
||||
}
|
||||
}
|
||||
@@ -175,4 +175,24 @@ public class RedisUtil {
|
||||
public Long increment(String key) {
|
||||
return redisTemplate.boundValueOps(key).increment(1L);
|
||||
}
|
||||
|
||||
/**
|
||||
* 尝试获取分布式锁
|
||||
* @param key 锁的key
|
||||
* @param value 请求标识,通常是UUID
|
||||
* @param expireTime 超时时间
|
||||
* @param timeUnit 时间单位
|
||||
* @return 是否获取成功
|
||||
*/
|
||||
public Boolean tryLock(String key, String value, long expireTime, TimeUnit timeUnit) {
|
||||
return redisTemplate.opsForValue().setIfAbsent(key, value, expireTime, timeUnit);
|
||||
}
|
||||
|
||||
/**
|
||||
* 释放锁
|
||||
* @param key 锁的key
|
||||
*/
|
||||
public void unlock(String key) {
|
||||
redisTemplate.delete(key);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,4 +42,17 @@ public class FranchiseFeeDAO {
|
||||
}
|
||||
return franchiseFeeMapper.batchUpdateXgjCollectionStatusAndXgjFeesPaid(franchiseFeeStageDateDTOList);
|
||||
}
|
||||
|
||||
public Boolean updatePayType(Long shopId, Integer payType) {
|
||||
if (shopId == null || payType == null){
|
||||
return false;
|
||||
}
|
||||
Example example = new Example(FranchiseFeeDO.class);
|
||||
example.createCriteria().andEqualTo("shopId", shopId);
|
||||
return franchiseFeeMapper.updateByExampleSelective(FranchiseFeeDO.builder().payType(payType).build(), example) > 0;
|
||||
}
|
||||
|
||||
public FranchiseFeeDO selectByShopId(Long shopId) {
|
||||
return franchiseFeeMapper.selectByShopId(shopId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dto.BuildStageDTO;
|
||||
import com.cool.store.dto.PlatformBuildStageDTO;
|
||||
import com.cool.store.dto.Preparation.ScheduleDTO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.enums.FranchiseBrandEnum;
|
||||
@@ -41,11 +42,11 @@ public class ShopStageInfoDAO {
|
||||
|
||||
/**
|
||||
* 初始化店铺阶段信息
|
||||
* @param lineId
|
||||
* @param lineInfoDO
|
||||
* @param shopInfoList
|
||||
* @return flag =true:表示意向加盟节点完成正常初始化。false:表示意向加盟节点未完成新建分店阶段都为未开始-100。
|
||||
*/
|
||||
public Integer initShopStageInfo(Long lineId, List<ShopInfoDO> shopInfoList, Boolean flag) {
|
||||
public Integer initShopStageInfo(LineInfoDO lineInfoDO, List<ShopInfoDO> shopInfoList, Boolean flag) {
|
||||
if (CollectionUtils.isEmpty(shopInfoList)) {
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
@@ -58,28 +59,27 @@ public class ShopStageInfoDAO {
|
||||
// 三明治跳过营帐通开通
|
||||
continue;
|
||||
}
|
||||
// TODO: 临时跳过
|
||||
if (shopSubStageEnum.equals(ShopSubStageEnum.SHOP_STAGE_6)) {
|
||||
continue;
|
||||
}
|
||||
ShopStageInfoDO shopStageInfo = new ShopStageInfoDO();
|
||||
shopStageInfo.setLineId(lineId);
|
||||
shopStageInfo.setLineId(lineInfoDO.getId());
|
||||
shopStageInfo.setShopId(shopId);
|
||||
ShopStageEnum shopStageEnum = shopSubStageEnum.getShopStageEnum();
|
||||
shopStageInfo.setShopStage(shopStageEnum.getShopStage());
|
||||
shopStageInfo.setShopSubStage(shopSubStageEnum.getShopSubStage());
|
||||
ShopSubStageStatusEnum initStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00;
|
||||
if (flag) {
|
||||
initStatus = shopSubStageEnum.getInitStatus();
|
||||
initStatus = shopSubStageEnum.getInitStatus(lineInfoDO.getUseStandardStore());
|
||||
}
|
||||
//标准店和普通店
|
||||
if (initStatus == null){
|
||||
continue;
|
||||
}
|
||||
shopStageInfo.setShopSubStageStatus(initStatus.getShopSubStageStatus());
|
||||
shopStageInfo.setRemark(shopSubStageEnum.getShopSubStageName() + CommonConstants.PATH_BAR + shopSubStageEnum.getInitStatus().getShopSubStageStatusName());
|
||||
shopStageInfo.setRemark(shopSubStageEnum.getShopSubStageName() + CommonConstants.PATH_BAR + initStatus.getShopSubStageStatusName());
|
||||
shopStageInfo.setIsTerminated(Boolean.FALSE);
|
||||
shopStageInfo.setPlanCompleteTime(shopSubStageEnum.getPlanCompleteTime(selectStartDate));
|
||||
addShopStageList.add(shopStageInfo);
|
||||
}
|
||||
}
|
||||
//发送短信
|
||||
return shopStageInfoMapper.batchInsert(addShopStageList);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.cool.store.dao.config;
|
||||
|
||||
import com.cool.store.entity.config.ConfigItemCategoryDO;
|
||||
import com.cool.store.mapper.config.ConfigItemCategoryMapper;
|
||||
import com.cool.store.vo.config.ConfigItemBaseInfoVO;
|
||||
import com.cool.store.vo.config.ConfigItemCategoryBaseInfoVO;
|
||||
import com.cool.store.vo.config.ConfigItemCategoryVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class ConfigItemCategoryDAO {
|
||||
|
||||
private final ConfigItemCategoryMapper configItemCategoryMapper;
|
||||
|
||||
public boolean insertSelective(ConfigItemCategoryDO entity) {
|
||||
return configItemCategoryMapper.insertSelective(entity) > 0;
|
||||
}
|
||||
|
||||
public boolean updateSelective(ConfigItemCategoryDO entity) {
|
||||
return configItemCategoryMapper.updateByPrimaryKeySelective(entity) > 0;
|
||||
}
|
||||
|
||||
public ConfigItemCategoryDO getById(Long id) {
|
||||
return configItemCategoryMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<ConfigItemCategoryVO> queryByCondition(String categoryName, Integer status) {
|
||||
return configItemCategoryMapper.queryByCondition(categoryName, status);
|
||||
}
|
||||
|
||||
public List<ConfigItemCategoryBaseInfoVO> queryAllList() {
|
||||
return configItemCategoryMapper.queryAllActiveList();
|
||||
}
|
||||
|
||||
public Map<String,String> queryAllListMap() {
|
||||
List<ConfigItemCategoryBaseInfoVO> configItemBaseInfoVOS = configItemCategoryMapper.queryAllActiveList();
|
||||
if (CollectionUtils.isEmpty(configItemBaseInfoVOS)){
|
||||
return new HashMap<>();
|
||||
}
|
||||
return configItemCategoryMapper.queryAllActiveList().stream()
|
||||
.filter(v -> StringUtils.isNotBlank(v.getCategoryCode()))
|
||||
.collect(Collectors.toMap(ConfigItemCategoryBaseInfoVO::getCategoryCode, ConfigItemCategoryBaseInfoVO::getCategoryName, (a, b) -> a));
|
||||
}
|
||||
|
||||
public boolean softDeleteByIds(List<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return false;
|
||||
}
|
||||
ConfigItemCategoryDO update = new ConfigItemCategoryDO();
|
||||
update.setIsDeleted(1);
|
||||
Example example = new Example(ConfigItemCategoryDO.class);
|
||||
example.createCriteria().andIn("id", ids).andEqualTo("isDeleted", 0);
|
||||
return configItemCategoryMapper.updateByExampleSelective(update, example) > 0;
|
||||
}
|
||||
|
||||
public Map<String,String> nameMap(List<String> codeList) {
|
||||
if (CollectionUtils.isEmpty(codeList)) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
Example example = new Example(ConfigItemCategoryDO.class);
|
||||
example.createCriteria().andIn("categoryCode", codeList).andEqualTo("isDeleted", 0);
|
||||
return configItemCategoryMapper.selectByExample( example).stream()
|
||||
.filter(v -> StringUtils.isNotBlank(v.getCategoryCode()))
|
||||
.collect(Collectors.toMap(ConfigItemCategoryDO::getCategoryCode, ConfigItemCategoryDO::getCategoryName, (a, b) -> a));
|
||||
}
|
||||
|
||||
|
||||
public boolean existsCode(Integer code, Long excludeId) {
|
||||
if (code == null) {
|
||||
return false;
|
||||
}
|
||||
Example example = new Example(ConfigItemCategoryDO.class);
|
||||
Example.Criteria criteria = example.createCriteria().andEqualTo("sortNo", code).andEqualTo("isDeleted", 0);
|
||||
if (excludeId != null) {
|
||||
criteria.andNotEqualTo("id", excludeId);
|
||||
}
|
||||
return configItemCategoryMapper.selectCountByExample(example) > 0;
|
||||
}
|
||||
|
||||
public boolean existsSortNo(Integer sortNo, Long excludeId) {
|
||||
if (sortNo == null) {
|
||||
return false;
|
||||
}
|
||||
Example example = new Example(ConfigItemCategoryDO.class);
|
||||
Example.Criteria criteria = example.createCriteria().andEqualTo("sortNo", sortNo).andEqualTo("isDeleted", 0);
|
||||
if (excludeId != null) {
|
||||
criteria.andNotEqualTo("id", excludeId);
|
||||
}
|
||||
return configItemCategoryMapper.selectCountByExample(example) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.cool.store.dao.config;
|
||||
|
||||
import com.cool.store.entity.config.ConfigItemCategoryDO;
|
||||
import com.cool.store.entity.config.ConfigItemDO;
|
||||
import com.cool.store.mapper.config.ConfigItemMapper;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import com.cool.store.vo.config.ConfigItemBaseInfoVO;
|
||||
import com.cool.store.vo.config.ConfigItemVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class ConfigItemDAO {
|
||||
|
||||
private final ConfigItemMapper configItemMapper;
|
||||
|
||||
public boolean insertSelective(ConfigItemDO entity) {
|
||||
return configItemMapper.insertSelective(entity) > 0;
|
||||
}
|
||||
|
||||
public boolean updateSelective(ConfigItemDO entity) {
|
||||
return configItemMapper.updateByPrimaryKeySelective(entity) > 0;
|
||||
}
|
||||
|
||||
public ConfigItemDO getById(Long id) {
|
||||
return configItemMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<ConfigItemVO> queryByCondition(String itemName, String itemCode, Long categoryId, Integer status) {
|
||||
return configItemMapper.queryByCondition(itemName, itemCode, categoryId, status);
|
||||
}
|
||||
|
||||
public Map<String, String> queryAllActiveMap() {
|
||||
List<ConfigItemBaseInfoVO> configItemBaseInfoVOS = configItemMapper.queryAllActiveList();
|
||||
if (CollectionUtils.isEmpty(configItemBaseInfoVOS)){
|
||||
return new HashMap<>();
|
||||
}
|
||||
return configItemBaseInfoVOS.stream()
|
||||
.filter(v -> StringUtils.isNotBlank(v.getItemCode()))
|
||||
.collect(Collectors.toMap(ConfigItemBaseInfoVO::getItemCode, ConfigItemBaseInfoVO::getItemName, (a, b) -> a));
|
||||
}
|
||||
|
||||
public boolean softDeleteByIds(List<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return false;
|
||||
}
|
||||
ConfigItemDO update = new ConfigItemDO();
|
||||
update.setIsDeleted(1);
|
||||
Example example = new Example(ConfigItemDO.class);
|
||||
example.createCriteria().andIn("id", ids).andEqualTo("isDeleted", 0);
|
||||
return configItemMapper.updateByExampleSelective(update, example) > 0;
|
||||
}
|
||||
|
||||
|
||||
public boolean existsItemCode(String code, Long excludeId) {
|
||||
if (StringUtil.isEmpty(code)) {
|
||||
return false;
|
||||
}
|
||||
Example example = new Example(ConfigItemDO.class);
|
||||
Example.Criteria criteria = example.createCriteria().andEqualTo("sortNo", code).andEqualTo("isDeleted", 0);
|
||||
if (excludeId != null) {
|
||||
criteria.andNotEqualTo("id", excludeId);
|
||||
}
|
||||
return configItemMapper.selectCountByExample(example) > 0;
|
||||
}
|
||||
|
||||
public boolean existsSortNo(Integer sortNo, Long excludeId) {
|
||||
if (sortNo == null) {
|
||||
return false;
|
||||
}
|
||||
Example example = new Example(ConfigItemDO.class);
|
||||
Example.Criteria criteria = example.createCriteria().andEqualTo("sortNo", sortNo).andEqualTo("isDeleted", 0);
|
||||
if (excludeId != null) {
|
||||
criteria.andNotEqualTo("id", excludeId);
|
||||
}
|
||||
return configItemMapper.selectCountByExample(example) > 0;
|
||||
}
|
||||
|
||||
public int countByCategoryIds(List<Long> categoryIds) {
|
||||
if (CollectionUtils.isEmpty(categoryIds)) {
|
||||
return 0;
|
||||
}
|
||||
return configItemMapper.countByCategoryIds(categoryIds);
|
||||
}
|
||||
|
||||
public Map<String,String> nameMap(List<String> codeList) {
|
||||
if (CollectionUtils.isEmpty(codeList)) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
Example example = new Example(ConfigItemDO.class);
|
||||
example.createCriteria().andIn("itemCode", codeList).andEqualTo("isDeleted", 0);
|
||||
return configItemMapper.selectByExample( example).stream()
|
||||
.filter(v -> StringUtils.isNotBlank(v.getItemCode()))
|
||||
.collect(Collectors.toMap(ConfigItemDO::getItemCode, ConfigItemDO::getItemName, (a, b) -> a));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.cool.store.dao.config;
|
||||
|
||||
import com.cool.store.entity.config.ConfigOptionDO;
|
||||
import com.cool.store.mapper.config.ConfigOptionMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 配置选项 DAO
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class ConfigOptionDAO {
|
||||
private final ConfigOptionMapper configOptionMapper;
|
||||
|
||||
public boolean insertSelective(ConfigOptionDO option) {
|
||||
return configOptionMapper.insertSelective(option) > 0;
|
||||
}
|
||||
|
||||
public boolean updateSelective(ConfigOptionDO option) {
|
||||
return configOptionMapper.updateByPrimaryKeySelective(option) > 0;
|
||||
}
|
||||
|
||||
public ConfigOptionDO getById(Long id) {
|
||||
return configOptionMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public boolean deleteByIds(List<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return false;
|
||||
}
|
||||
Example example = new Example(ConfigOptionDO.class);
|
||||
example.createCriteria().andIn("id", ids);
|
||||
return configOptionMapper.deleteByExample(example) > 0;
|
||||
}
|
||||
|
||||
public List<ConfigOptionDO> query(String categoryCode, String itemCode, Integer active, String optionName) {
|
||||
Example example = new Example(ConfigOptionDO.class);
|
||||
Example.Criteria criteria = example.createCriteria();
|
||||
if (Objects.nonNull(categoryCode)) {
|
||||
criteria.andEqualTo("categoryCode", categoryCode);
|
||||
}
|
||||
if (Objects.nonNull(itemCode)) {
|
||||
criteria.andEqualTo("itemCode", itemCode);
|
||||
}
|
||||
if (Objects.nonNull(active)) {
|
||||
criteria.andEqualTo("active", active);
|
||||
}
|
||||
if (Objects.nonNull(optionName) && !optionName.trim().isEmpty()) {
|
||||
criteria.andLike("optionName", "%" + optionName.trim() + "%");
|
||||
}
|
||||
example.setOrderByClause("sort_order ASC");
|
||||
return configOptionMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public List<ConfigOptionDO> listActiveByIds(List<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return configOptionMapper.listActiveByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验排序是否已存在(全局唯一,不区分类型/配置项)
|
||||
* @param sortOrder 排序值
|
||||
* @param excludeId 排除自身ID(新增传 null;修改传当前ID)
|
||||
*/
|
||||
public boolean existsSortOrder(Integer sortOrder, Long excludeId) {
|
||||
if (sortOrder == null) {
|
||||
return false;
|
||||
}
|
||||
Example example = new Example(ConfigOptionDO.class);
|
||||
Example.Criteria criteria = example.createCriteria()
|
||||
.andEqualTo("sortOrder", sortOrder);
|
||||
criteria.andEqualTo("active", 1);
|
||||
if (excludeId != null) {
|
||||
criteria.andNotEqualTo("id", excludeId);
|
||||
}
|
||||
return configOptionMapper.selectCountByExample(example) > 0;
|
||||
}
|
||||
|
||||
public boolean existsOptionName(String optionName, Long excludeId) {
|
||||
if (optionName == null || optionName.trim().isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
Example example = new Example(ConfigOptionDO.class);
|
||||
Example.Criteria criteria = example.createCriteria()
|
||||
.andEqualTo("optionName", optionName.trim());
|
||||
criteria.andEqualTo("active", 1);
|
||||
if (excludeId != null) {
|
||||
criteria.andNotEqualTo("id", excludeId);
|
||||
}
|
||||
return configOptionMapper.selectCountByExample(example) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.cool.store.dao.fees;
|
||||
|
||||
import cn.hutool.core.collection.CollStreamUtil;
|
||||
import com.cool.store.entity.fees.FeeStandardConfigDO;
|
||||
import com.cool.store.mapper.fees.FeeStandardConfigMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 加盟费用标准收费额配置DAO
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class FeeStandardConfigDAO {
|
||||
|
||||
private final FeeStandardConfigMapper feeStandardConfigMapper;
|
||||
|
||||
public FeeStandardConfigDO selectByPrimaryKey(Long id) {
|
||||
return feeStandardConfigMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public void insertSelective(FeeStandardConfigDO config) {
|
||||
feeStandardConfigMapper.insertSelective(config);
|
||||
}
|
||||
|
||||
public void updateByPrimaryKeySelective(FeeStandardConfigDO config) {
|
||||
feeStandardConfigMapper.updateByPrimaryKeySelective(config);
|
||||
}
|
||||
|
||||
public boolean existJoinBrandAndExpenseType(Integer joinBrand, String expenseType, Long excludeId) {
|
||||
Example example = new Example(FeeStandardConfigDO.class);
|
||||
Example.Criteria criteria = example.createCriteria()
|
||||
.andEqualTo("joinBrand", joinBrand)
|
||||
.andEqualTo("expenseType", expenseType);
|
||||
if (Objects.nonNull(excludeId)) {
|
||||
criteria.andNotEqualTo("id", excludeId);
|
||||
}
|
||||
return feeStandardConfigMapper.selectCountByExample(example) > 0;
|
||||
}
|
||||
|
||||
public List<FeeStandardConfigDO> selectByCondition(Integer joinBrand, String expenseType) {
|
||||
Example example = new Example(FeeStandardConfigDO.class);
|
||||
Example.Criteria criteria = example.createCriteria();
|
||||
if (joinBrand != null) {
|
||||
criteria.andEqualTo("joinBrand", joinBrand);
|
||||
}
|
||||
if (StringUtils.isNotBlank(expenseType)) {
|
||||
criteria.andEqualTo("expenseType", expenseType.trim());
|
||||
}
|
||||
example.setOrderByClause("create_time DESC");
|
||||
return feeStandardConfigMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据品牌查询费用标准收费额配置映射
|
||||
* @param joinBrand 品牌
|
||||
* @return 费用类型 -> 收费额配置
|
||||
*/
|
||||
public Map<String, FeeStandardConfigDO> getStandardConfigMap(Integer joinBrand) {
|
||||
FeeStandardConfigDO configDO = new FeeStandardConfigDO();
|
||||
configDO.setJoinBrand(joinBrand);
|
||||
List<FeeStandardConfigDO> list = feeStandardConfigMapper.select(configDO);
|
||||
return CollStreamUtil.toMap(list, FeeStandardConfigDO::getExpenseType, v -> v);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.cool.store.dao.fees;
|
||||
|
||||
import com.cool.store.entity.fees.PayeeBankConfigDO;
|
||||
import com.cool.store.mapper.fees.PayeeBankConfigMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 线下收款银行配置DAO
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class PayeeBankConfigDAO {
|
||||
private final PayeeBankConfigMapper payeeBankConfigMapper;
|
||||
|
||||
public void insertSelective(PayeeBankConfigDO config) {
|
||||
payeeBankConfigMapper.insertSelective(config);
|
||||
}
|
||||
|
||||
public void updateByPrimaryKeySelective(PayeeBankConfigDO config) {
|
||||
payeeBankConfigMapper.updateByPrimaryKeySelective(config);
|
||||
}
|
||||
|
||||
public PayeeBankConfigDO selectByPrimaryKey(Long id) {
|
||||
return payeeBankConfigMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public boolean existUniqueKey(Integer joinBrand, Long investDivisionId, Integer payType, Long excludeId) {
|
||||
Example example = new Example(PayeeBankConfigDO.class);
|
||||
Example.Criteria criteria = example.createCriteria()
|
||||
.andEqualTo("joinBrand", joinBrand)
|
||||
.andEqualTo("investDivisionId", investDivisionId)
|
||||
.andEqualTo("payType", payType);
|
||||
if (Objects.nonNull(excludeId)) {
|
||||
criteria.andNotEqualTo("id", excludeId);
|
||||
}
|
||||
return payeeBankConfigMapper.selectCountByExample(example) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 同品牌同支付方式:只能存在“全部(0)”或“分部”其中一种
|
||||
*/
|
||||
public boolean existOtherInvestType(Integer joinBrand, Integer payType, Long investDivisionId, Long excludeId) {
|
||||
Example example = new Example(PayeeBankConfigDO.class);
|
||||
Example.Criteria criteria = example.createCriteria()
|
||||
.andEqualTo("joinBrand", joinBrand)
|
||||
.andEqualTo("payType", payType);
|
||||
if (Long.valueOf(0).equals(investDivisionId)) {
|
||||
criteria.andNotEqualTo("investDivisionId", 0L);
|
||||
} else {
|
||||
criteria.andEqualTo("investDivisionId", 0L);
|
||||
}
|
||||
if (Objects.nonNull(excludeId)) {
|
||||
criteria.andNotEqualTo("id", excludeId);
|
||||
}
|
||||
return payeeBankConfigMapper.selectCountByExample(example) > 0;
|
||||
}
|
||||
|
||||
public List<PayeeBankConfigDO> selectByCondition(Integer joinBrand, Long investDivisionId, Integer payType) {
|
||||
Example example = new Example(PayeeBankConfigDO.class);
|
||||
Example.Criteria criteria = example.createCriteria();
|
||||
if (joinBrand != null) {
|
||||
criteria.andEqualTo("joinBrand", joinBrand);
|
||||
}
|
||||
if (investDivisionId != null) {
|
||||
criteria.andEqualTo("investDivisionId", investDivisionId);
|
||||
}
|
||||
if (payType != null) {
|
||||
criteria.andEqualTo("payType", payType);
|
||||
}
|
||||
example.setOrderByClause("create_time DESC");
|
||||
return payeeBankConfigMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据加盟品牌、加盟分部、支付方式查询配置
|
||||
* @param joinBrand 加盟品牌
|
||||
* @param investDivisionId 加盟分部
|
||||
* @param payType 支付方式
|
||||
* @return 配置
|
||||
*/
|
||||
public PayeeBankConfigDO getByUniqueKey(Integer joinBrand, Long investDivisionId, Integer payType) {
|
||||
Example example = new Example(PayeeBankConfigDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("joinBrand", joinBrand)
|
||||
.andIn("investDivisionId", Arrays.asList(investDivisionId, 0L))
|
||||
.andEqualTo("payType", payType);
|
||||
return payeeBankConfigMapper.selectOneByExample(example);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.cool.store.dao.fees;
|
||||
|
||||
import com.cool.store.entity.fees.ShopAllocationInfoDO;
|
||||
import com.cool.store.enums.fees.AllocationPayStatusEnum;
|
||||
import com.cool.store.mapper.fees.ShopAllocationInfoMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 门店平安钱包分账信息DAO
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/1/29
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class ShopAllocationInfoDAO {
|
||||
private final ShopAllocationInfoMapper shopAllocationInfoMapper;
|
||||
|
||||
public List<ShopAllocationInfoDO> getByShopId(Long shopId) {
|
||||
ShopAllocationInfoDO info = new ShopAllocationInfoDO();
|
||||
info.setShopId(shopId);
|
||||
return shopAllocationInfoMapper.select(info);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增
|
||||
*/
|
||||
public void insertBatch(List<ShopAllocationInfoDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
shopAllocationInfoMapper.insertBatch(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新
|
||||
*/
|
||||
public void updateBatch(List<ShopAllocationInfoDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
shopAllocationInfoMapper.updateBatch(list);
|
||||
}
|
||||
|
||||
public void insertOrUpdateBatch(List<ShopAllocationInfoDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
for (ShopAllocationInfoDO shopAllocationInfoDO : list) {
|
||||
if (Objects.isNull(shopAllocationInfoDO.getStatus())) {
|
||||
shopAllocationInfoDO.setStatus(AllocationPayStatusEnum.PAYING.getStatus());
|
||||
}
|
||||
}
|
||||
shopAllocationInfoMapper.insertOrUpdateBatch(list);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.cool.store.dao.fees;
|
||||
|
||||
import cn.hutool.core.collection.CollStreamUtil;
|
||||
import com.cool.store.entity.fees.WalletAllocationCompanyDO;
|
||||
import com.cool.store.mapper.fees.WalletAllocationCompanyMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 平安钱包分账公司配置DAO
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class WalletAllocationCompanyDAO {
|
||||
private final WalletAllocationCompanyMapper walletAllocationCompanyMapper;
|
||||
|
||||
public void insertSelective(WalletAllocationCompanyDO company) {
|
||||
walletAllocationCompanyMapper.insertSelective(company);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增
|
||||
*/
|
||||
public void insertBatch(List<WalletAllocationCompanyDO> list) {
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
walletAllocationCompanyMapper.insertBatch(list);
|
||||
}
|
||||
}
|
||||
|
||||
public void updateByPrimaryKeySelective(WalletAllocationCompanyDO company) {
|
||||
walletAllocationCompanyMapper.updateByPrimaryKeySelective(company);
|
||||
}
|
||||
|
||||
public WalletAllocationCompanyDO selectByPrimaryKey(Long id) {
|
||||
return walletAllocationCompanyMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public void deleteByPrimaryKey(Long id) {
|
||||
walletAllocationCompanyMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据分账配置id查询公司列表
|
||||
*/
|
||||
public List<WalletAllocationCompanyDO> selectByConfigId(Long configId) {
|
||||
Example example = new Example(WalletAllocationCompanyDO.class);
|
||||
example.createCriteria().andEqualTo("configId", configId);
|
||||
return walletAllocationCompanyMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据配置id列表查询收款公司映射
|
||||
*/
|
||||
public Map<Long, List<WalletAllocationCompanyDO>> selectGroupByConfigIds(List<Long> configIds) {
|
||||
if (CollectionUtils.isEmpty(configIds)) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
Example example = new Example(WalletAllocationCompanyDO.class);
|
||||
example.createCriteria().andIn("configId", configIds);
|
||||
List<WalletAllocationCompanyDO> list = walletAllocationCompanyMapper.selectByExample(example);
|
||||
return CollStreamUtil.groupByKey(list, WalletAllocationCompanyDO::getConfigId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据收款公司code查询(用于分页查询条件)
|
||||
*/
|
||||
public List<WalletAllocationCompanyDO> selectByPayeeCode(String payeeCode) {
|
||||
Example example = new Example(WalletAllocationCompanyDO.class);
|
||||
example.createCriteria().andEqualTo("payeeCode", payeeCode);
|
||||
return walletAllocationCompanyMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据配置id删除
|
||||
*/
|
||||
public void deleteByConfigId(Long configId) {
|
||||
WalletAllocationCompanyDO companyDO = new WalletAllocationCompanyDO();
|
||||
companyDO.setConfigId(configId);
|
||||
walletAllocationCompanyMapper.delete(companyDO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.cool.store.dao.fees;
|
||||
|
||||
import com.cool.store.entity.fees.WalletAllocationConfigDO;
|
||||
import com.cool.store.mapper.fees.WalletAllocationConfigMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 平安钱包分账配置DAO
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class WalletAllocationConfigDAO {
|
||||
private final WalletAllocationConfigMapper walletAllocationConfigMapper;
|
||||
|
||||
public void insertSelective(WalletAllocationConfigDO config) {
|
||||
walletAllocationConfigMapper.insertSelective(config);
|
||||
}
|
||||
|
||||
public void updateByPrimaryKeySelective(WalletAllocationConfigDO config) {
|
||||
walletAllocationConfigMapper.updateByPrimaryKeySelective(config);
|
||||
}
|
||||
|
||||
public WalletAllocationConfigDO selectByPrimaryKey(Long id) {
|
||||
return walletAllocationConfigMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据加盟品牌、招商分部、费用类型查询
|
||||
*/
|
||||
public Boolean existUniqueKey(Integer joinBrand, Long investDivisionId, String expenseType, Long excludeId) {
|
||||
Example example = new Example(WalletAllocationConfigDO.class);
|
||||
Example.Criteria criteria = example.createCriteria()
|
||||
.andEqualTo("joinBrand", joinBrand)
|
||||
.andEqualTo("investDivisionId", investDivisionId)
|
||||
.andEqualTo("expenseType", expenseType);
|
||||
if (Objects.nonNull(excludeId)) {
|
||||
criteria.andNotEqualTo("id", excludeId);
|
||||
}
|
||||
return walletAllocationConfigMapper.selectCountByExample(example) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据加盟品牌、招商分部查询
|
||||
* @param joinBrand 家门品牌
|
||||
* @param investDivisionId 招商分部id
|
||||
* @return 配置列表
|
||||
*/
|
||||
public List<WalletAllocationConfigDO> selectByBrandAndInvest(Integer joinBrand, Long investDivisionId) {
|
||||
Example example = new Example(WalletAllocationConfigDO.class);
|
||||
Example.Criteria criteria = example.createCriteria()
|
||||
.andEqualTo("joinBrand", joinBrand)
|
||||
.andIn("investDivisionId", Arrays.asList(investDivisionId, 0L));
|
||||
return walletAllocationConfigMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
public List<WalletAllocationConfigDO> selectByCondition(Integer joinBrand, Long investDivisionId, Integer expenseType, List<Long> configIds) {
|
||||
Example example = new Example(WalletAllocationConfigDO.class);
|
||||
Example.Criteria criteria = example.createCriteria();
|
||||
if (joinBrand != null) {
|
||||
criteria.andEqualTo("joinBrand", joinBrand);
|
||||
}
|
||||
if (investDivisionId != null) {
|
||||
criteria.andEqualTo("investDivisionId", investDivisionId);
|
||||
}
|
||||
if (expenseType != null) {
|
||||
criteria.andEqualTo("expenseType", expenseType);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(configIds)) {
|
||||
criteria.andIn("id", configIds);
|
||||
}
|
||||
example.setOrderByClause("create_time DESC");
|
||||
return walletAllocationConfigMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否存在其他分部类型
|
||||
*/
|
||||
public boolean existOtherInvestType(Integer joinBrand, String expenseType, Long investDivisionId, Long excludeId) {
|
||||
Example example = new Example(WalletAllocationConfigDO.class);
|
||||
Example.Criteria criteria = example.createCriteria()
|
||||
.andEqualTo("joinBrand", joinBrand)
|
||||
.andEqualTo("expenseType", expenseType);
|
||||
if (Long.valueOf(0).equals(investDivisionId)) {
|
||||
criteria.andNotEqualTo("investDivisionId", 0);
|
||||
} else {
|
||||
criteria.andEqualTo("investDivisionId", 0);
|
||||
}
|
||||
if (Objects.nonNull(excludeId)) {
|
||||
criteria.andNotEqualTo("id", excludeId);
|
||||
}
|
||||
return walletAllocationConfigMapper.selectCountByExample(example) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.cool.store.dao.fees;
|
||||
|
||||
import com.cool.store.entity.fees.WalletPayInfoDO;
|
||||
import com.cool.store.enums.fees.AllocationPayStatusEnum;
|
||||
import com.cool.store.mapper.fees.WalletPayInfoMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 钱包加盟缴费信息DAO
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/1/30
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class WalletPayInfoDAO {
|
||||
private final WalletPayInfoMapper walletPayInfoMapper;
|
||||
|
||||
/**
|
||||
* 是否存在缴费信息
|
||||
* @param shopId 门店id
|
||||
* @return 是否存在
|
||||
*/
|
||||
public boolean existPayInfo(Long shopId) {
|
||||
Example example = new Example(WalletPayInfoDO.class);
|
||||
example.createCriteria().andEqualTo("shopId", shopId);
|
||||
return walletPayInfoMapper.selectCountByExample(example) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增
|
||||
*/
|
||||
public void insertBatch(List<WalletPayInfoDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
walletPayInfoMapper.insertBatch(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据payNo编辑
|
||||
*/
|
||||
public void updateByPayNo(WalletPayInfoDO walletPayInfoDO) {
|
||||
Example example = new Example(WalletPayInfoDO.class);
|
||||
example.createCriteria().andEqualTo("payNo", walletPayInfoDO.getPayNo());
|
||||
walletPayInfoMapper.updateByExampleSelective(walletPayInfoDO, example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据门店id查询
|
||||
*/
|
||||
public List<WalletPayInfoDO> getByShopId(Long shopId, String module, Integer payStatus) {
|
||||
Example example = new Example(WalletPayInfoDO.class);
|
||||
Example.Criteria criteria = example.createCriteria()
|
||||
.andEqualTo("shopId", shopId)
|
||||
.andEqualTo("module", module);
|
||||
if (Objects.nonNull(payStatus)) {
|
||||
criteria.andEqualTo("payStatus", payStatus);
|
||||
}
|
||||
example.setOrderByClause("create_time DESC");
|
||||
return walletPayInfoMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据门店查询已支付
|
||||
*/
|
||||
public List<WalletPayInfoDO> getPaidByShopId(Long shopId, String module) {
|
||||
Example example = new Example(WalletPayInfoDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("shopId", shopId)
|
||||
.andEqualTo("module", module)
|
||||
.andEqualTo("payStatus", AllocationPayStatusEnum.PAID.getStatus());
|
||||
example.setOrderByClause("create_time ASC");
|
||||
return walletPayInfoMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public WalletPayInfoDO getById(Long id) {
|
||||
return walletPayInfoMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据付款单号查询
|
||||
*/
|
||||
public WalletPayInfoDO getByPayNo(String payNo) {
|
||||
Example example = new Example(WalletPayInfoDO.class);
|
||||
example.createCriteria().andEqualTo("payNo", payNo);
|
||||
return walletPayInfoMapper.selectOneByExample(example);
|
||||
}
|
||||
|
||||
public List<WalletPayInfoDO> getByPayNoList(List<String> payNoList) {
|
||||
Example example = new Example(WalletPayInfoDO.class);
|
||||
example.createCriteria().andIn("payNo", payNoList);
|
||||
return walletPayInfoMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public void updateByPrimaryKeySelective(WalletPayInfoDO walletPayInfoDO) {
|
||||
walletPayInfoMapper.updateByPrimaryKeySelective(walletPayInfoDO);
|
||||
}
|
||||
|
||||
public boolean updateBatchByPayNo(List<WalletPayInfoDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return false;
|
||||
}
|
||||
return walletPayInfoMapper.updateBatchByPayNo(list) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据付款单号修改认领状态
|
||||
* @param payNo 付款单号
|
||||
* @param claimStatus 认领状态 0未认领1已认领
|
||||
* @return 是否成功
|
||||
*/
|
||||
public void updateClaimStatusByPayNo(String payNo, Integer claimStatus) {
|
||||
Example example = new Example(WalletPayInfoDO.class);
|
||||
example.createCriteria().andEqualTo("payNo", payNo);
|
||||
WalletPayInfoDO walletPayInfoDO = new WalletPayInfoDO();
|
||||
walletPayInfoDO.setClaimStatus(claimStatus);
|
||||
walletPayInfoMapper.updateByExampleSelective(walletPayInfoDO, example);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.cool.store.dao.modify;
|
||||
|
||||
import com.cool.store.entity.modify.ModifyRecordDO;
|
||||
import com.cool.store.enums.BusinessModuleEnum;
|
||||
import com.cool.store.mapper.modify.ModifyRecordMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务修改记录DAO
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class ModifyRecordDAO {
|
||||
private final ModifyRecordMapper modifyRecordMapper;
|
||||
|
||||
/**
|
||||
* 新增修改记录
|
||||
* @param module 业务模块
|
||||
* @param businessId 业务id
|
||||
* @param updateUserId 更新人id
|
||||
*/
|
||||
public void insertRecord(BusinessModuleEnum module, Long businessId, String updateUserId) {
|
||||
ModifyRecordDO modifyRecord = new ModifyRecordDO(null, module.getCode(), businessId, updateUserId, null);
|
||||
modifyRecordMapper.insertSelective(modifyRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据模块及业务id查询
|
||||
* @param module 模块code
|
||||
* @param businessId 业务id
|
||||
* @return 记录列表
|
||||
*/
|
||||
public List<ModifyRecordDO> getListByBusinessId(String module, Long businessId) {
|
||||
Example example = new Example(ModifyRecordDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("module", module)
|
||||
.andEqualTo("businessId", businessId);
|
||||
example.setOrderByClause("update_time desc");
|
||||
return modifyRecordMapper.selectByExample(example);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.cool.store.dao.order;
|
||||
|
||||
import com.cool.store.entity.order.PreAllocationRecordDO;
|
||||
import com.cool.store.mapper.order.PreAllocationRecordMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class PreAllocationRecordDAO {
|
||||
|
||||
private final PreAllocationRecordMapper preAllocationRecordMapper;
|
||||
|
||||
public boolean insertSelective(PreAllocationRecordDO record) {
|
||||
return preAllocationRecordMapper.insertSelective(record) > 0;
|
||||
}
|
||||
|
||||
public PreAllocationRecordDO getById(Long id) {
|
||||
return preAllocationRecordMapper.getById(id);
|
||||
}
|
||||
|
||||
public List<PreAllocationRecordDO> queryPageByOrderId(Long orderId) {
|
||||
return preAllocationRecordMapper.queryPageByOrderId(orderId);
|
||||
}
|
||||
|
||||
public List<PreAllocationRecordDO> queryPageByShopId(Long shopId) {
|
||||
return preAllocationRecordMapper.queryPageByShopId(shopId);
|
||||
}
|
||||
|
||||
public List<PreAllocationRecordDO> queryPageByPayNo(String payNo) {
|
||||
return preAllocationRecordMapper.queryPageByPayNo(payNo);
|
||||
}
|
||||
|
||||
public boolean updateStatus(Long id, Integer status) {
|
||||
return preAllocationRecordMapper.updateStatus(id, status) > 0;
|
||||
}
|
||||
|
||||
public boolean deleteByShopId(Long shopId) {
|
||||
return preAllocationRecordMapper.deleteByShopId(shopId) > 0;
|
||||
}
|
||||
|
||||
public boolean insertBatch(List<PreAllocationRecordDO> list) {
|
||||
return preAllocationRecordMapper.insertBatch(list) > 0;
|
||||
}
|
||||
|
||||
public boolean updateBatch(List<PreAllocationRecordDO> list) {
|
||||
return preAllocationRecordMapper.updateBatch(list) > 0;
|
||||
}
|
||||
|
||||
public boolean updateByOrderId(Long orderId) {
|
||||
return preAllocationRecordMapper.updateByOrderId(orderId) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.cool.store.dao.order;
|
||||
|
||||
import com.cool.store.entity.order.StoreOrderDO;
|
||||
import com.cool.store.mapper.order.StoreOrderMapper;
|
||||
import com.cool.store.request.order.PCStoreOrderQueryRequest;
|
||||
import com.cool.store.vo.order.PCStoreOrderListVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class StoreOrderDAO {
|
||||
|
||||
private final StoreOrderMapper storeOrderMapper;
|
||||
|
||||
public boolean insertSelective(StoreOrderDO order) {
|
||||
return storeOrderMapper.insertSelective(order) > 0;
|
||||
}
|
||||
|
||||
public StoreOrderDO getById(Long id) {
|
||||
return storeOrderMapper.getById(id);
|
||||
}
|
||||
|
||||
public List<StoreOrderDO> queryPage(Long shopId, Integer status) {
|
||||
return storeOrderMapper.queryPage(shopId, status);
|
||||
}
|
||||
|
||||
public List<StoreOrderDO> queryPageByLineId(Long lineId, Integer status) {
|
||||
return storeOrderMapper.queryPageByLineId(lineId, status);
|
||||
}
|
||||
|
||||
public List<PCStoreOrderListVO> queryPCPage(PCStoreOrderQueryRequest request) {
|
||||
return storeOrderMapper.queryPCPage(request);
|
||||
}
|
||||
|
||||
public Long count(PCStoreOrderQueryRequest request) {
|
||||
return storeOrderMapper.count(request);
|
||||
}
|
||||
|
||||
public boolean updateSelective(StoreOrderDO order) {
|
||||
return storeOrderMapper.updateByPrimaryKeySelective(order) > 0;
|
||||
}
|
||||
|
||||
public boolean existsUnfinishedOrder(Long shopId, List<Integer> statuses) {
|
||||
if (shopId == null || statuses == null || statuses.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
return storeOrderMapper.countByShopIdAndStatusIn(shopId, statuses) > 0;
|
||||
}
|
||||
|
||||
public boolean existsPaidOrder(Long shopId, Integer status) {
|
||||
if (shopId == null || status == null) {
|
||||
return false;
|
||||
}
|
||||
return storeOrderMapper.countByShopIdAndStatus(shopId, status) > 0;
|
||||
}
|
||||
|
||||
public StoreOrderDO getLatestByShopIdAndStatus(Long shopId, Integer status) {
|
||||
if (shopId == null || status == null) {
|
||||
return null;
|
||||
}
|
||||
return storeOrderMapper.getLatestDraftByShopId(shopId, status);
|
||||
}
|
||||
|
||||
public StoreOrderDO getLatestOrderByShopId(Long shopId) {
|
||||
if (shopId == null ) {
|
||||
return null;
|
||||
}
|
||||
return storeOrderMapper.getLatestOrderByShopId(shopId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.cool.store.dao.order;
|
||||
|
||||
import com.cool.store.entity.order.StoreOrderOptionSnapshotDO;
|
||||
import com.cool.store.mapper.order.StoreOrderOptionSnapshotMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class StoreOrderOptionSnapshotDAO {
|
||||
|
||||
private final StoreOrderOptionSnapshotMapper mapper;
|
||||
|
||||
public boolean insertBatch(List<StoreOrderOptionSnapshotDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return false;
|
||||
}
|
||||
return mapper.insertBatch(list) > 0;
|
||||
}
|
||||
|
||||
public List<StoreOrderOptionSnapshotDO> listByOrderId(Long orderId) {
|
||||
if (orderId == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return mapper.listByOrderId(orderId);
|
||||
}
|
||||
|
||||
public boolean deleteByOrderId(Long orderId) {
|
||||
if (orderId == null) {
|
||||
return false;
|
||||
}
|
||||
return mapper.deleteByOrderId(orderId) > 0;
|
||||
}
|
||||
|
||||
public boolean updateSelective(StoreOrderOptionSnapshotDO snapshotDO) {
|
||||
if (snapshotDO == null || snapshotDO.getId() == null) {
|
||||
return false;
|
||||
}
|
||||
return mapper.updateByPrimaryKeySelective(snapshotDO) > 0;
|
||||
}
|
||||
|
||||
public void batchUpdateQuantityAndAmount(@Param("list") List<StoreOrderOptionSnapshotDO> list){
|
||||
if (CollectionUtils.isEmpty(list)){
|
||||
return;
|
||||
}
|
||||
mapper.batchUpdateQuantityAndAmount(list);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.cool.store.dao.order;
|
||||
|
||||
import com.cool.store.entity.order.StoreWishlistDO;
|
||||
import com.cool.store.mapper.order.StoreWishlistMapper;
|
||||
import com.cool.store.vo.order.MiniStoreWishlistListVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class StoreWishlistDAO {
|
||||
|
||||
private final StoreWishlistMapper mapper;
|
||||
|
||||
public boolean insertBatch(List<StoreWishlistDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return false;
|
||||
}
|
||||
return mapper.insertBatch(list) > 0;
|
||||
}
|
||||
|
||||
public boolean softDeleteByLineIdAndStoreTypeAndVersion(Long lineId, Long storeTypeId, String versionNo) {
|
||||
if (lineId == null || storeTypeId == null || versionNo == null) {
|
||||
return false;
|
||||
}
|
||||
return mapper.softDeleteByLineIdAndStoreTypeAndVersion(lineId, storeTypeId, versionNo) > 0;
|
||||
}
|
||||
|
||||
public StoreWishlistDO getById(Long id) {
|
||||
if (id == null) {
|
||||
return null;
|
||||
}
|
||||
return mapper.getById(id);
|
||||
}
|
||||
|
||||
public List<StoreWishlistDO> listByLineIdAndStoreTypeAndVersion(Long lineId, Long storeTypeId, String versionNo) {
|
||||
if (lineId == null || storeTypeId == null || versionNo == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return mapper.listByLineIdAndStoreTypeAndVersion(lineId, storeTypeId, versionNo);
|
||||
}
|
||||
|
||||
public List<MiniStoreWishlistListVO> listByLineId(Long lineId, Long storeTypeId) {
|
||||
if (lineId == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return mapper.listByLineId(lineId, storeTypeId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.cool.store.dao.store;
|
||||
|
||||
import com.cool.store.entity.store.StoreTypeDO;
|
||||
import com.cool.store.mapper.store.StoreTypeMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店型 DAO
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class StoreTypeDAO {
|
||||
private final StoreTypeMapper storeTypeMapper;
|
||||
|
||||
/** 新增 */
|
||||
public boolean insertSelective(StoreTypeDO storeTypeDO) {
|
||||
return storeTypeMapper.insertSelective(storeTypeDO) > 0;
|
||||
}
|
||||
|
||||
/** 编辑 */
|
||||
public boolean updateSelective(StoreTypeDO storeTypeDO) {
|
||||
return storeTypeMapper.updateByPrimaryKeySelective(storeTypeDO) > 0;
|
||||
}
|
||||
|
||||
/** 根据主键查询 */
|
||||
public StoreTypeDO getById(Long id) {
|
||||
return storeTypeMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
/** 根据编码查询 */
|
||||
public StoreTypeDO getByCode(String code) {
|
||||
return storeTypeMapper.selectOne(StoreTypeDO.builder().storeTypeCode(code).build());
|
||||
}
|
||||
|
||||
/** 批量删除(物理删除,谨慎使用) */
|
||||
public boolean deleteByIds(List<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return false;
|
||||
}
|
||||
Example example = new Example(StoreTypeDO.class);
|
||||
example.createCriteria().andIn("id", ids);
|
||||
return storeTypeMapper.deleteByExample(example) > 0;
|
||||
}
|
||||
|
||||
public List<StoreTypeDO> selectByIds(List<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
Example example = new Example(StoreTypeDO.class);
|
||||
example.createCriteria().andIn("id", ids);
|
||||
return storeTypeMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 软删除:deleted=true
|
||||
*/
|
||||
public boolean softDeleteByIds(List<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return false;
|
||||
}
|
||||
StoreTypeDO update = new StoreTypeDO();
|
||||
update.setDeleted(true);
|
||||
Example example = new Example(StoreTypeDO.class);
|
||||
example.createCriteria().andIn("id", ids);
|
||||
return storeTypeMapper.updateByExampleSelective(update, example) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用/停用
|
||||
*/
|
||||
public boolean updateActiveById(Long id, Boolean active) {
|
||||
if (id == null) {
|
||||
return false;
|
||||
}
|
||||
StoreTypeDO update = new StoreTypeDO();
|
||||
update.setId(id);
|
||||
update.setActive(active);
|
||||
return storeTypeMapper.updateByPrimaryKeySelective(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页/条件查询
|
||||
* @param keyword 名称/编码模糊
|
||||
* @param active 是否启用
|
||||
* @param brand 品牌精准
|
||||
*/
|
||||
public List<StoreTypeDO> queryByCondition(String keyword, Boolean active, String brand) {
|
||||
return storeTypeMapper.queryByCondition(keyword, active, brand);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据门店类型查询启用的店型
|
||||
*/
|
||||
public List<StoreTypeDO> listActiveByStoreType(Integer storeType) {
|
||||
return storeTypeMapper.listByStoreType(storeType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验排序是否已存在(全局唯一)
|
||||
*/
|
||||
public boolean existsSortOrder(Integer sortOrder, Long excludeId) {
|
||||
if (sortOrder == null) {
|
||||
return false;
|
||||
}
|
||||
Example example = new Example(StoreTypeDO.class);
|
||||
Example.Criteria criteria = example.createCriteria().andEqualTo("sortOrder", sortOrder);
|
||||
criteria.andEqualTo("deleted", 1);
|
||||
if (excludeId != null) {
|
||||
criteria.andNotEqualTo("id", excludeId);
|
||||
}
|
||||
return storeTypeMapper.selectCountByExample(example) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.cool.store.dao.store;
|
||||
|
||||
import com.cool.store.entity.CloseStoreAuditRecordDO;
|
||||
import com.cool.store.entity.store.StoreTypeDO;
|
||||
import com.cool.store.entity.store.StoreTypeOptionDO;
|
||||
import com.cool.store.enums.close.CloseStoreAuditStatusEnum;
|
||||
import com.cool.store.mapper.store.StoreTypeOptionMapper;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 店型-选项 DAO
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class StoreTypeOptionDAO {
|
||||
private final StoreTypeOptionMapper mapper;
|
||||
|
||||
public boolean insertBatchSelective(List<StoreTypeOptionDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return false;
|
||||
}
|
||||
return mapper.insertBatch(list) > 0;
|
||||
}
|
||||
|
||||
public boolean deleteByStoreTypeId(Long storeTypeId) {
|
||||
return mapper.delete(StoreTypeOptionDO.builder().storeTypeId(storeTypeId).build()) > 0;
|
||||
}
|
||||
|
||||
public Integer softDeleteByStoreTypeId(List<Long> storeTypeIds){
|
||||
Example example = new Example(StoreTypeOptionDO.class);
|
||||
StoreTypeOptionDO update = new StoreTypeOptionDO();
|
||||
update.setVisible(1);
|
||||
example.createCriteria()
|
||||
.andIn("storeTypeId", storeTypeIds);
|
||||
return mapper.updateByExampleSelective(update,example);
|
||||
}
|
||||
|
||||
public List<StoreTypeOptionDO> listByStoreTypeId(Long storeTypeId) {
|
||||
return mapper.select(StoreTypeOptionDO.builder().storeTypeId(storeTypeId).build());
|
||||
}
|
||||
|
||||
public List<StoreTypeOptionDO> query(Long storeTypeId, String itemCode) {
|
||||
Example example = new Example(StoreTypeOptionDO.class);
|
||||
Example.Criteria criteria = example.createCriteria();
|
||||
if (Objects.nonNull(storeTypeId)) {
|
||||
criteria.andEqualTo("storeTypeId", storeTypeId);
|
||||
}
|
||||
if (Objects.nonNull(itemCode)) {
|
||||
criteria.andEqualTo("itemCode", itemCode);
|
||||
}
|
||||
return mapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public int countByOptionId(Long optionId) {
|
||||
if (optionId == null) {
|
||||
return 0;
|
||||
}
|
||||
Example example = new Example(StoreTypeOptionDO.class);
|
||||
example.createCriteria().andEqualTo("optionId", optionId).andEqualTo("visible",0);
|
||||
return mapper.selectCountByExample(example);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.cool.store.dao.visit;
|
||||
|
||||
import com.cool.store.entity.visit.StoreVisitReservationDO;
|
||||
import com.cool.store.mapper.visit.StoreVisitReservationMapper;
|
||||
import com.cool.store.request.visit.StoreVisitReservationAdminQueryRequest;
|
||||
import com.cool.store.vo.visit.StoreVisitReservationVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class StoreVisitReservationDAO {
|
||||
|
||||
private final StoreVisitReservationMapper storeVisitReservationMapper;
|
||||
|
||||
public Boolean insertSelective(StoreVisitReservationDO reservationDO) {
|
||||
return storeVisitReservationMapper.insertSelective(reservationDO) > 0;
|
||||
}
|
||||
|
||||
public Boolean updateSelective(StoreVisitReservationDO reservationDO) {
|
||||
return storeVisitReservationMapper.updateByPrimaryKeySelective(reservationDO) > 0;
|
||||
}
|
||||
|
||||
public StoreVisitReservationDO getById(Long id) {
|
||||
return storeVisitReservationMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<StoreVisitReservationDO> listByMobile(String mobile,Integer status) {
|
||||
Example example = new Example(StoreVisitReservationDO.class);
|
||||
Example.Criteria criteria = example.createCriteria()
|
||||
.andEqualTo("deleted", 0);
|
||||
if (StringUtils.isNotBlank(mobile)) {
|
||||
criteria.andEqualTo("mobile", mobile);
|
||||
}
|
||||
if (status!=null){
|
||||
criteria.andEqualTo("status",status);
|
||||
}
|
||||
example.setOrderByClause("create_time DESC");
|
||||
return storeVisitReservationMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public List<StoreVisitReservationVO> adminPage(StoreVisitReservationAdminQueryRequest request) {
|
||||
return storeVisitReservationMapper.adminPage(request);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.cool.store.dao.wallet;
|
||||
|
||||
import com.cool.store.entity.wallet.WalletTradeDO;
|
||||
import com.cool.store.mapper.wallet.WalletTradeMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 钱包交易单DAO
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/2/4
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class WalletTradeDAO {
|
||||
private final WalletTradeMapper walletTradeMapper;
|
||||
|
||||
public void insertSelective(WalletTradeDO walletTradeDO) {
|
||||
walletTradeMapper.insertSelective(walletTradeDO);
|
||||
}
|
||||
|
||||
public void insertBatch(List<WalletTradeDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
walletTradeMapper.insertBatch(list);
|
||||
}
|
||||
|
||||
public WalletTradeDO getByPayNo(String payNo) {
|
||||
Example example = new Example(WalletTradeDO.class);
|
||||
example.createCriteria().andEqualTo("payNo", payNo);
|
||||
return walletTradeMapper.selectOneByExample(example);
|
||||
}
|
||||
|
||||
public void updateByPrimaryKeySelective(WalletTradeDO walletTradeDO) {
|
||||
walletTradeMapper.updateByPrimaryKeySelective(walletTradeDO);
|
||||
}
|
||||
|
||||
public boolean updateByPayNo(WalletTradeDO record) {
|
||||
if (record == null || record.getPayNo() == null) {
|
||||
return false;
|
||||
}
|
||||
return walletTradeMapper.updateByPayNo(record) > 0;
|
||||
}
|
||||
|
||||
public boolean updateBatchByPayNo(List<WalletTradeDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return false;
|
||||
}
|
||||
return walletTradeMapper.updateBatchByPayNo(list) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cool.store.mapper.config;
|
||||
|
||||
import com.cool.store.entity.config.ConfigItemCategoryDO;
|
||||
import com.cool.store.vo.config.ConfigItemBaseInfoVO;
|
||||
import com.cool.store.vo.config.ConfigItemCategoryBaseInfoVO;
|
||||
import com.cool.store.vo.config.ConfigItemCategoryVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ConfigItemCategoryMapper extends Mapper<ConfigItemCategoryDO> {
|
||||
|
||||
List<ConfigItemCategoryVO> queryByCondition(@Param("categoryName") String categoryName,
|
||||
@Param("status") Integer status);
|
||||
|
||||
List<ConfigItemCategoryBaseInfoVO> queryAllActiveList();
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.cool.store.mapper.config;
|
||||
|
||||
import com.cool.store.entity.config.ConfigItemDO;
|
||||
import com.cool.store.vo.config.ConfigItemBaseInfoVO;
|
||||
import com.cool.store.vo.config.ConfigItemCategoryBaseInfoVO;
|
||||
import com.cool.store.vo.config.ConfigItemVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ConfigItemMapper extends Mapper<ConfigItemDO> {
|
||||
|
||||
List<ConfigItemVO> queryByCondition(@Param("itemName") String itemName,
|
||||
@Param("itemCode") String itemCode,
|
||||
@Param("categoryId") Long categoryId,
|
||||
@Param("status") Integer status);
|
||||
|
||||
List<ConfigItemBaseInfoVO> queryAllActiveList();
|
||||
|
||||
int countByCategoryIds(@Param("categoryIds") List<Long> categoryIds);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.cool.store.mapper.config;
|
||||
|
||||
import com.cool.store.entity.config.ConfigOptionDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ConfigOptionMapper extends Mapper<ConfigOptionDO> {
|
||||
|
||||
List<ConfigOptionDO> listActiveByIds(@Param("ids") List<Long> ids);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.cool.store.mapper.fees;
|
||||
|
||||
import com.cool.store.entity.fees.FeeStandardConfigDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface FeeStandardConfigMapper extends Mapper<FeeStandardConfigDO> {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.cool.store.mapper.fees;
|
||||
|
||||
import com.cool.store.entity.fees.PayeeBankConfigDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface PayeeBankConfigMapper extends Mapper<PayeeBankConfigDO> {
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.cool.store.mapper.fees;
|
||||
|
||||
import com.cool.store.entity.fees.ShopAllocationInfoDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ShopAllocationInfoMapper extends Mapper<ShopAllocationInfoDO> {
|
||||
/**
|
||||
* 批量新增
|
||||
*/
|
||||
void insertBatch(List<ShopAllocationInfoDO> list);
|
||||
|
||||
/**
|
||||
* 批量更新
|
||||
*/
|
||||
void updateBatch(List<ShopAllocationInfoDO> list);
|
||||
|
||||
void insertOrUpdateBatch(List<ShopAllocationInfoDO> list);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.cool.store.mapper.fees;
|
||||
|
||||
import com.cool.store.entity.fees.WalletAllocationCompanyDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface WalletAllocationCompanyMapper extends Mapper<WalletAllocationCompanyDO> {
|
||||
|
||||
/**
|
||||
* 批量新增
|
||||
*/
|
||||
void insertBatch(List<WalletAllocationCompanyDO> list);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.cool.store.mapper.fees;
|
||||
|
||||
import com.cool.store.entity.fees.WalletAllocationConfigDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface WalletAllocationConfigMapper extends Mapper<WalletAllocationConfigDO> {
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.cool.store.mapper.fees;
|
||||
|
||||
import com.cool.store.entity.fees.WalletPayInfoDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface WalletPayInfoMapper extends Mapper<WalletPayInfoDO> {
|
||||
void insertBatch(List<WalletPayInfoDO> list);
|
||||
|
||||
int updateByPayNo(WalletPayInfoDO record);
|
||||
|
||||
int updateBatchByPayNo(@Param("list") List<WalletPayInfoDO> list);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.cool.store.mapper.modify;
|
||||
|
||||
import com.cool.store.entity.modify.ModifyRecordDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface ModifyRecordMapper extends Mapper<ModifyRecordDO> {
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.mapper.order;
|
||||
|
||||
import com.cool.store.entity.order.PreAllocationRecordDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PreAllocationRecordMapper extends Mapper<PreAllocationRecordDO> {
|
||||
|
||||
PreAllocationRecordDO getById(@Param("id") Long id);
|
||||
|
||||
List<PreAllocationRecordDO> queryPageByOrderId(@Param("orderId") Long orderId);
|
||||
|
||||
List<PreAllocationRecordDO> queryPageByShopId(@Param("shopId") Long shopId);
|
||||
|
||||
List<PreAllocationRecordDO> queryPageByPayNo(@Param("payNo") String payNo);
|
||||
|
||||
int updateStatus(@Param("id") Long id, @Param("status") Integer status);
|
||||
|
||||
int deleteByShopId(@Param("shopId") Long shopId);
|
||||
|
||||
int insertBatch(@Param("list") List<PreAllocationRecordDO> list);
|
||||
|
||||
int updateBatch(@Param("list") List<PreAllocationRecordDO> list);
|
||||
|
||||
int updateByOrderId(Long orderId);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.cool.store.mapper.order;
|
||||
|
||||
import com.cool.store.entity.order.StoreOrderDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import com.cool.store.request.order.PCStoreOrderQueryRequest;
|
||||
import com.cool.store.vo.order.PCStoreOrderListVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface StoreOrderMapper extends Mapper<StoreOrderDO> {
|
||||
|
||||
List<StoreOrderDO> queryPage(@Param("shopId") Long shopId,
|
||||
@Param("status") Integer status);
|
||||
|
||||
List<PCStoreOrderListVO> queryPCPage(PCStoreOrderQueryRequest request);
|
||||
|
||||
Long count(PCStoreOrderQueryRequest request);
|
||||
|
||||
List<StoreOrderDO> queryPageByLineId(@Param("lineId") Long lineId,
|
||||
@Param("status") Integer status);
|
||||
|
||||
StoreOrderDO getById(@Param("id") Long id);
|
||||
|
||||
StoreOrderDO getLatestDraftByShopId(@Param("shopId") Long shopId,
|
||||
@Param("status") Integer status);
|
||||
|
||||
/**
|
||||
* 获取当前门店 最新的订单 除了已关闭的
|
||||
* @param shopId
|
||||
* @return
|
||||
*/
|
||||
StoreOrderDO getLatestOrderByShopId(@Param("shopId") Long shopId);
|
||||
|
||||
int countByShopIdAndStatusIn(@Param("shopId") Long shopId,
|
||||
@Param("statuses") List<Integer> statuses);
|
||||
|
||||
int countByShopIdAndStatus(@Param("shopId") Long shopId,
|
||||
@Param("status") Integer status);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cool.store.mapper.order;
|
||||
|
||||
import com.cool.store.entity.order.StoreOrderOptionSnapshotDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface StoreOrderOptionSnapshotMapper extends Mapper<StoreOrderOptionSnapshotDO> {
|
||||
|
||||
int insertBatch(@Param("list") List<StoreOrderOptionSnapshotDO> list);
|
||||
|
||||
List<StoreOrderOptionSnapshotDO> listByOrderId(@Param("orderId") Long orderId);
|
||||
|
||||
int deleteByOrderId(@Param("orderId") Long orderId);
|
||||
|
||||
void batchUpdateQuantityAndAmount(@Param("list") List<StoreOrderOptionSnapshotDO> list);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cool.store.mapper.order;
|
||||
|
||||
import com.cool.store.entity.order.StoreWishlistDO;
|
||||
import com.cool.store.vo.order.MiniStoreWishlistListVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface StoreWishlistMapper extends Mapper<StoreWishlistDO> {
|
||||
|
||||
int insertBatch(@Param("list") List<StoreWishlistDO> list);
|
||||
|
||||
int softDeleteByLineIdAndStoreTypeAndVersion(@Param("lineId") Long lineId,
|
||||
@Param("storeTypeId") Long storeTypeId,
|
||||
@Param("versionNo") String versionNo);
|
||||
|
||||
StoreWishlistDO getById(@Param("id") Long id);
|
||||
|
||||
List<StoreWishlistDO> listByLineIdAndStoreTypeAndVersion(@Param("lineId") Long lineId,
|
||||
@Param("storeTypeId") Long storeTypeId,
|
||||
@Param("versionNo") String versionNo);
|
||||
|
||||
List<MiniStoreWishlistListVO> listByLineId(@Param("lineId") Long lineId,
|
||||
@Param("storeTypeId") Long storeTypeId);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.cool.store.mapper.store;
|
||||
|
||||
import com.cool.store.entity.store.StoreTypeDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface StoreTypeMapper extends Mapper<StoreTypeDO> {
|
||||
|
||||
List<StoreTypeDO> queryByCondition(@Param("keyword") String keyword,
|
||||
@Param("active") Boolean active,
|
||||
@Param("brand") String brand);
|
||||
|
||||
List<StoreTypeDO> listByStoreType(@Param("storeType") Integer storeType);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.cool.store.mapper.store;
|
||||
|
||||
import com.cool.store.entity.store.StoreTypeOptionDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface StoreTypeOptionMapper extends Mapper<StoreTypeOptionDO> {
|
||||
|
||||
/**
|
||||
* 批量新增
|
||||
*/
|
||||
int insertBatch(@Param("list") List<StoreTypeOptionDO> list);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.cool.store.mapper.visit;
|
||||
|
||||
import com.cool.store.entity.visit.StoreVisitReservationDO;
|
||||
import com.cool.store.request.visit.StoreVisitReservationAdminQueryRequest;
|
||||
import com.cool.store.vo.visit.StoreVisitReservationVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface StoreVisitReservationMapper extends Mapper<StoreVisitReservationDO> {
|
||||
|
||||
List<StoreVisitReservationVO> adminPage(@Param("request") StoreVisitReservationAdminQueryRequest request);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.cool.store.mapper.wallet;
|
||||
|
||||
import com.cool.store.entity.wallet.WalletTradeDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface WalletTradeMapper extends Mapper<WalletTradeDO> {
|
||||
void insertBatch(List<WalletTradeDO> list);
|
||||
|
||||
int updateByPayNo(WalletTradeDO record);
|
||||
|
||||
int updateBatchByPayNo(@Param("list") List<WalletTradeDO> list);
|
||||
}
|
||||
@@ -134,6 +134,9 @@
|
||||
<if test="param.franchiseBrand != null">
|
||||
franchise_brand,
|
||||
</if>
|
||||
<if test="param.useStandardStore != null">
|
||||
use_standard_store,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="param.id != null and param.id != ''">
|
||||
@@ -230,7 +233,10 @@
|
||||
#{param.partnerNum},
|
||||
</if>
|
||||
<if test="param.franchiseBrand != null">
|
||||
#{param.franchiseBrand}
|
||||
#{param.franchiseBrand},
|
||||
</if>
|
||||
<if test="param.useStandardStore != null">
|
||||
#{param.useStandardStore}
|
||||
</if>
|
||||
</trim>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
@@ -326,7 +332,10 @@
|
||||
partner_num = #{param.partnerNum},
|
||||
</if>
|
||||
<if test="param.franchiseBrand != null">
|
||||
franchise_brand = #{param.franchiseBrand}
|
||||
franchise_brand = #{param.franchiseBrand},
|
||||
</if>
|
||||
<if test="param.useStandardStore != null">
|
||||
use_standard_store = #{param.useStandardStore}
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -58,11 +58,11 @@
|
||||
<insert id="batchAddShop" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
insert into xfsg_shop_info(region_id, line_id, partner_id, shop_name,
|
||||
store_num,supervisor_user_id,create_time,join_mode,franchise_brand,
|
||||
development_manager,want_shop_area_id,investment_manager,store_id,invest_region_id) values
|
||||
development_manager,want_shop_area_id,investment_manager,store_id,invest_region_id,use_standard_store) values
|
||||
<foreach collection="shopInfoList" item="shop" separator=",">
|
||||
(#{shop.regionId}, #{shop.lineId}, #{shop.partnerId}, #{shop.shopName},
|
||||
#{shop.storeNum},#{shop.supervisorUserId},#{shop.createTime},#{shop.joinMode},#{shop.franchiseBrand},#{shop.developmentManager},
|
||||
#{shop.wantShopAreaId},#{shop.investmentManager},#{shop.storeId},#{shop.investRegionId})
|
||||
#{shop.wantShopAreaId},#{shop.investmentManager},#{shop.storeId},#{shop.investRegionId},#{shop.useStandardStore})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
@@ -318,7 +318,8 @@
|
||||
a.detail_address as shopAddress,
|
||||
a.manager_region_id as managerRegionId,
|
||||
a.store_id as storeId,
|
||||
a.invest_region_id as investRegionId
|
||||
a.invest_region_id as investRegionId,
|
||||
a.use_standard_store as useStandardStore
|
||||
from xfsg_shop_info a left join xfsg_line_info b on a.line_id = b.id
|
||||
<if test="request.contractStartTime !=null and request.contractEndTime != null">
|
||||
left join xfsg_sign_franchise c on a.id = c.shop_id
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<?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.cool.store.mapper.config.ConfigItemCategoryMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.config.ConfigItemCategoryDO">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="category_code" property="categoryCode" jdbcType="VARCHAR"/>
|
||||
<result column="category_name" property="categoryName" jdbcType="VARCHAR"/>
|
||||
<result column="sort_no" property="sortNo" jdbcType="INTEGER"/>
|
||||
<result column="image_url" property="imageUrl" jdbcType="VARCHAR"/>
|
||||
<result column="video_url" property="videoUrl" jdbcType="VARCHAR"/>
|
||||
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||
<result column="is_deleted" property="isDeleted" jdbcType="INTEGER"/>
|
||||
<result column="remark" property="remark" jdbcType="VARCHAR"/>
|
||||
<result column="created_user_id" property="createdUserId" jdbcType="VARCHAR"/>
|
||||
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="updated_user_id" property="updatedUserId" jdbcType="VARCHAR"/>
|
||||
<result column="updated_time" property="updatedTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="CategoryVOResultMap" type="com.cool.store.vo.config.ConfigItemCategoryVO">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="category_code" property="categoryCode" jdbcType="VARCHAR"/>
|
||||
<result column="category_name" property="categoryName" jdbcType="VARCHAR"/>
|
||||
<result column="sort_no" property="sortNo" jdbcType="INTEGER"/>
|
||||
<result column="image_url" property="imageUrl" jdbcType="VARCHAR"/>
|
||||
<result column="video_url" property="videoUrl" jdbcType="VARCHAR"/>
|
||||
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||
<result column="remark" property="remark" jdbcType="VARCHAR"/>
|
||||
<result column="created_user_id" property="createdUserId" jdbcType="VARCHAR"/>
|
||||
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="updated_user_id" property="updatedUserId" jdbcType="VARCHAR"/>
|
||||
<result column="updated_time" property="updatedTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, category_code, category_name, sort_no, image_url, video_url,
|
||||
status, is_deleted, remark, created_user_id, created_time, updated_user_id, updated_time
|
||||
</sql>
|
||||
|
||||
<select id="queryByCondition" resultMap="CategoryVOResultMap">
|
||||
SELECT id, category_code, category_name, sort_no, image_url, video_url,
|
||||
status, remark, created_user_id, created_time, updated_user_id, updated_time
|
||||
FROM zxjp_cfg_item_category
|
||||
WHERE is_deleted = 0
|
||||
<if test="categoryName != null and categoryName != ''">
|
||||
AND category_name LIKE CONCAT('%', #{categoryName}, '%')
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
ORDER BY sort_no ASC, id DESC
|
||||
</select>
|
||||
|
||||
<select id="queryAllActiveList" resultType="com.cool.store.vo.config.ConfigItemCategoryBaseInfoVO">
|
||||
SELECT category_code, category_name
|
||||
FROM zxjp_cfg_item_category
|
||||
WHERE is_deleted = 0 AND status = 1 ORDER BY sort_no ASC, id DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?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.cool.store.mapper.config.ConfigItemMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.config.ConfigItemDO">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="item_code" property="itemCode" jdbcType="VARCHAR"/>
|
||||
<result column="item_name" property="itemName" jdbcType="VARCHAR"/>
|
||||
<result column="category_id" property="categoryId" jdbcType="BIGINT"/>
|
||||
<result column="sort_no" property="sortNo" jdbcType="INTEGER"/>
|
||||
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||
<result column="is_deleted" property="isDeleted" jdbcType="INTEGER"/>
|
||||
<result column="remark" property="remark" jdbcType="VARCHAR"/>
|
||||
<result column="created_user_id" property="createdUserId" jdbcType="VARCHAR"/>
|
||||
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="updated_user_id" property="updatedUserId" jdbcType="VARCHAR"/>
|
||||
<result column="updated_time" property="updatedTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ItemVOResultMap" type="com.cool.store.vo.config.ConfigItemVO">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="item_code" property="itemCode" jdbcType="VARCHAR"/>
|
||||
<result column="item_name" property="itemName" jdbcType="VARCHAR"/>
|
||||
<result column="category_id" property="categoryId" jdbcType="BIGINT"/>
|
||||
<result column="category_code" property="categoryCode" jdbcType="VARCHAR"/>
|
||||
<result column="category_name" property="categoryName" jdbcType="VARCHAR"/>
|
||||
<result column="sort_no" property="sortNo" jdbcType="INTEGER"/>
|
||||
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||
<result column="remark" property="remark" jdbcType="VARCHAR"/>
|
||||
<result column="created_user_id" property="createdUserId" jdbcType="VARCHAR"/>
|
||||
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="updated_user_id" property="updatedUserId" jdbcType="VARCHAR"/>
|
||||
<result column="updated_time" property="updatedTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="queryByCondition" resultMap="ItemVOResultMap">
|
||||
SELECT i.id,
|
||||
i.item_code,
|
||||
i.item_name,
|
||||
i.category_id,
|
||||
c.category_code,
|
||||
c.category_name,
|
||||
i.sort_no,
|
||||
i.status,
|
||||
i.remark,
|
||||
i.created_user_id,
|
||||
i.created_time,
|
||||
i.updated_user_id,
|
||||
i.updated_time
|
||||
FROM zxjp_cfg_item i
|
||||
LEFT JOIN zxjp_cfg_item_category c ON i.category_id = c.id AND c.is_deleted = 0
|
||||
WHERE i.is_deleted = 0
|
||||
<if test="itemName != null and itemName != ''">
|
||||
AND i.item_name LIKE CONCAT('%', #{itemName}, '%')
|
||||
</if>
|
||||
<if test="itemCode != null and itemCode != ''">
|
||||
AND i.item_code = #{itemCode}
|
||||
</if>
|
||||
<if test="categoryId != null">
|
||||
AND i.category_id = #{categoryId}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND i.status = #{status}
|
||||
</if>
|
||||
ORDER BY i.sort_no ASC, i.id DESC
|
||||
</select>
|
||||
|
||||
<select id="queryAllActiveList" resultType="com.cool.store.vo.config.ConfigItemBaseInfoVO">
|
||||
SELECT item_code, item_name
|
||||
FROM zxjp_cfg_item
|
||||
WHERE is_deleted = 0 AND status = 1 ORDER BY sort_no ASC, id DESC
|
||||
</select>
|
||||
|
||||
<select id="countByCategoryIds" resultType="java.lang.Integer">
|
||||
SELECT COUNT(1)
|
||||
FROM zxjp_cfg_item
|
||||
WHERE is_deleted = 0
|
||||
AND category_id IN
|
||||
<foreach collection="categoryIds" item="categoryId" open="(" separator="," close=")">
|
||||
#{categoryId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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.cool.store.mapper.config.ConfigOptionMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.config.ConfigOptionDO">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="category_code" property="categoryCode" jdbcType="VARCHAR"/>
|
||||
<result column="item_code" property="itemCode" jdbcType="VARCHAR"/>
|
||||
<result column="option_code" property="optionCode" jdbcType="VARCHAR"/>
|
||||
<result column="option_name" property="optionName" jdbcType="VARCHAR"/>
|
||||
<result column="option_description" property="optionDescription" jdbcType="VARCHAR"/>
|
||||
<result column="option_unit" property="optionUnit" jdbcType="VARCHAR"/>
|
||||
<result column="option_price" property="optionPrice" jdbcType="DECIMAL"/>
|
||||
<result column="original_option_price" property="originalOptionPrice" jdbcType="DECIMAL"/>
|
||||
<result column="image_url" property="imageUrl" jdbcType="VARCHAR"/>
|
||||
<result column="video_url" property="videoUrl" jdbcType="VARCHAR"/>
|
||||
<result column="is_active" property="active" jdbcType="BOOLEAN"/>
|
||||
<result column="sort_order" property="sortOrder" jdbcType="INTEGER"/>
|
||||
<result column="option_remark" property="optionRemark" jdbcType="VARCHAR"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, category_code, item_code, option_code, option_name, option_description,
|
||||
option_price, original_option_price, image_url, video_url,
|
||||
is_active, sort_order, option_remark,
|
||||
create_time, update_time, option_unit
|
||||
</sql>
|
||||
|
||||
<select id="listActiveByIds" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM zxjp_config_option
|
||||
WHERE is_active = 1
|
||||
AND id IN
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
ORDER BY sort_order ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?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.cool.store.mapper.fees.FeeStandardConfigMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.fees.FeeStandardConfigDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="join_brand" jdbcType="TINYINT" property="joinBrand" />
|
||||
<result column="expense_type" jdbcType="VARCHAR" property="expenseType" />
|
||||
<result column="amount" jdbcType="DECIMAL" property="amount" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?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.cool.store.mapper.fees.PayeeBankConfigMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.fees.PayeeBankConfigDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="join_brand" jdbcType="BIT" property="joinBrand" />
|
||||
<result column="invest_division_id" jdbcType="BIGINT" property="investDivisionId" />
|
||||
<result column="pay_type" jdbcType="BIT" property="payType" />
|
||||
<result column="payee_name" jdbcType="VARCHAR" property="payeeName" />
|
||||
<result column="payee_code" jdbcType="VARCHAR" property="payeeCode" />
|
||||
<result column="payee_bank" jdbcType="VARCHAR" property="payeeBank" />
|
||||
<result column="payee_bank_branch" jdbcType="VARCHAR" property="payeeBankBranch" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,98 @@
|
||||
<?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.cool.store.mapper.fees.ShopAllocationInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.fees.ShopAllocationInfoDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
|
||||
<result column="expense_type" jdbcType="VARCHAR" property="expenseType" />
|
||||
<result column="payee_name" jdbcType="VARCHAR" property="payeeName" />
|
||||
<result column="payee_code" jdbcType="VARCHAR" property="payeeCode" />
|
||||
<result column="amount" jdbcType="DECIMAL" property="amount" />
|
||||
<result column="status" jdbcType="TINYINT" property="status" />
|
||||
<result column="fail_reason" jdbcType="VARCHAR" property="failReason" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 批量新增 -->
|
||||
<insert id="insertBatch" parameterType="java.util.List">
|
||||
INSERT INTO zxjp_fees_shop_allocation_info (shop_id, expense_type, payee_name, payee_code, amount, status, fail_reason, create_user_id, update_user_id)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.shopId}, #{item.expenseType}, #{item.payeeName}, #{item.payeeCode}, #{item.amount}, #{item.status}, #{item.failReason}, #{item.createUserId}, #{item.updateUserId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 批量更新 -->
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
UPDATE zxjp_fees_shop_allocation_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<trim prefix="shop_id = CASE" suffix="END,">
|
||||
<foreach collection="list" item="item">
|
||||
WHEN id = #{item.id} THEN #{item.shopId}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="expense_type = CASE" suffix="END,">
|
||||
<foreach collection="list" item="item">
|
||||
WHEN id = #{item.id} THEN #{item.expenseType}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="payee_name = CASE" suffix="END,">
|
||||
<foreach collection="list" item="item">
|
||||
WHEN id = #{item.id} THEN #{item.payeeName}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="payee_code = CASE" suffix="END,">
|
||||
<foreach collection="list" item="item">
|
||||
WHEN id = #{item.id} THEN #{item.payeeCode}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="amount = CASE" suffix="END,">
|
||||
<foreach collection="list" item="item">
|
||||
WHEN id = #{item.id} THEN #{item.amount}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="status = CASE" suffix="END,">
|
||||
<foreach collection="list" item="item">
|
||||
WHEN id = #{item.id} THEN #{item.status}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="fail_reason = CASE" suffix="END,">
|
||||
<foreach collection="list" item="item">
|
||||
WHEN id = #{item.id} THEN #{item.failReason}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="update_user_id = CASE" suffix="END,">
|
||||
<foreach collection="list" item="item">
|
||||
WHEN id = #{item.id} THEN #{item.updateUserId}
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
WHERE id IN
|
||||
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<insert id="insertOrUpdateBatch" parameterType="java.util.List">
|
||||
INSERT INTO zxjp_fees_shop_allocation_info
|
||||
(id, shop_id, expense_type, payee_name, payee_code, amount, status, fail_reason, create_user_id, update_user_id)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id}, #{item.shopId}, #{item.expenseType}, #{item.payeeName}, #{item.payeeCode}, #{item.amount}, #{item.status}, #{item.failReason}, #{item.createUserId}, #{item.updateUserId})
|
||||
</foreach>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
expense_type = VALUES(expense_type),
|
||||
payee_name = VALUES(payee_name),
|
||||
payee_code = VALUES(payee_code),
|
||||
amount = VALUES(amount),
|
||||
status = VALUES(status),
|
||||
fail_reason = VALUES(fail_reason),
|
||||
update_user_id = VALUES(update_user_id)
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?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.cool.store.mapper.fees.WalletAllocationCompanyMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.fees.WalletAllocationCompanyDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="config_id" jdbcType="BIGINT" property="configId"/>
|
||||
<result column="payee_name" jdbcType="VARCHAR" property="payeeName"/>
|
||||
<result column="payee_code" jdbcType="VARCHAR" property="payeeCode"/>
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertBatch" parameterType="java.util.List">
|
||||
INSERT INTO zxjp_fees_wallet_allocation_company (config_id, payee_name, payee_code, create_user_id)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.configId}, #{item.payeeName}, #{item.payeeCode}, #{item.createUserId})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?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.cool.store.mapper.fees.WalletAllocationConfigMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.fees.WalletAllocationConfigDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="join_brand" jdbcType="TINYINT" property="joinBrand" />
|
||||
<result column="invest_division_id" jdbcType="BIGINT" property="investDivisionId" />
|
||||
<result column="expense_type" jdbcType="VARCHAR" property="expenseType" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,70 @@
|
||||
<?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.cool.store.mapper.fees.WalletPayInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.fees.WalletPayInfoDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
|
||||
<result column="pay_no" jdbcType="VARCHAR" property="payNo" />
|
||||
<result column="pay_user_name" jdbcType="VARCHAR" property="payUserName" />
|
||||
<result column="pay_amount" jdbcType="DECIMAL" property="payAmount" />
|
||||
<result column="trade_id" jdbcType="VARCHAR" property="tradeId" />
|
||||
<result column="pay_status" jdbcType="BIT" property="payStatus" />
|
||||
<result column="pay_time" jdbcType="TIMESTAMP" property="payTime" />
|
||||
<result column="claim_status" jdbcType="BIT" property="claimStatus" />
|
||||
<result column="expense_types" jdbcType="VARCHAR" property="expenseTypes" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertBatch" parameterType="java.util.List">
|
||||
INSERT INTO zxjp_fees_wallet_pay_info (shop_id, module, pay_no, pay_user_name, pay_amount, trade_id, pay_status, pay_time, claim_status, expense_types, remark, create_user_id)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.shopId}, #{item.module}, #{item.payNo}, #{item.payUserName}, #{item.payAmount}, #{item.tradeId}, #{item.payStatus}, #{item.payTime}, #{item.claimStatus}, #{item.expenseTypes}, #{item.remark}, #{item.createUserId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPayNo" parameterType="com.cool.store.entity.fees.WalletPayInfoDO">
|
||||
UPDATE zxjp_fees_wallet_pay_info
|
||||
<set>
|
||||
<if test="shopId != null">shop_id = #{shopId},</if>
|
||||
<if test="module != null">module = #{module},</if>
|
||||
<if test="payUserName != null">pay_user_name = #{payUserName},</if>
|
||||
<if test="payAmount != null">pay_amount = #{payAmount},</if>
|
||||
<if test="tradeId != null">trade_id = #{tradeId},</if>
|
||||
<if test="payStatus != null">pay_status = #{payStatus},</if>
|
||||
<if test="payTime != null">pay_time = #{payTime},</if>
|
||||
<if test="claimStatus != null">claim_status = #{claimStatus},</if>
|
||||
<if test="expenseTypes != null">expense_types = #{expenseTypes},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createUserId != null">create_user_id = #{createUserId},</if>
|
||||
create_time = create_time
|
||||
</set>
|
||||
WHERE pay_no = #{payNo}
|
||||
</update>
|
||||
|
||||
<update id="updateBatchByPayNo">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
UPDATE zxjp_fees_wallet_pay_info
|
||||
<set>
|
||||
<if test="item.shopId != null">shop_id = #{item.shopId},</if>
|
||||
<if test="item.module != null">module = #{item.module},</if>
|
||||
<if test="item.payUserName != null">pay_user_name = #{item.payUserName},</if>
|
||||
<if test="item.payAmount != null">pay_amount = #{item.payAmount},</if>
|
||||
<if test="item.tradeId != null">trade_id = #{item.tradeId},</if>
|
||||
<if test="item.payStatus != null">pay_status = #{item.payStatus},</if>
|
||||
<if test="item.payTime != null">pay_time = #{item.payTime},</if>
|
||||
<if test="item.claimStatus != null">claim_status = #{item.claimStatus},</if>
|
||||
<if test="item.expenseTypes != null">expense_types = #{item.expenseTypes},</if>
|
||||
<if test="item.remark != null">remark = #{item.remark},</if>
|
||||
<if test="item.createUserId != null">create_user_id = #{item.createUserId},</if>
|
||||
create_time = create_time
|
||||
</set>
|
||||
WHERE pay_no = #{item.payNo}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?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.cool.store.mapper.modify.ModifyRecordMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.modify.ModifyRecordDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="module" jdbcType="VARCHAR" property="module" />
|
||||
<result column="business_id" jdbcType="BIGINT" property="businessId" />
|
||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,95 @@
|
||||
<?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.cool.store.mapper.order.PreAllocationRecordMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.order.PreAllocationRecordDO">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="order_id" property="orderId" jdbcType="BIGINT"/>
|
||||
<result column="shop_id" property="shopId" jdbcType="BIGINT"/>
|
||||
<result column="pay_no" property="payNo" jdbcType="VARCHAR"/>
|
||||
<result column="expense_type" property="expenseType" jdbcType="VARCHAR"/>
|
||||
<result column="payee_name" property="payeeName" jdbcType="VARCHAR"/>
|
||||
<result column="payee_code" property="payeeCode" jdbcType="VARCHAR"/>
|
||||
<result column="pay_amount" property="payAmount" jdbcType="DECIMAL"/>
|
||||
<result column="allocation_status" property="allocationStatus" jdbcType="INTEGER"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, order_id, shop_id, pay_no, expense_type, payee_name, payee_code,
|
||||
pay_amount, allocation_status, create_time, update_time
|
||||
</sql>
|
||||
|
||||
<select id="getById" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM zxjp_pre_allocation_record
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="queryPageByOrderId" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM zxjp_pre_allocation_record
|
||||
WHERE order_id = #{orderId}
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="queryPageByShopId" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM zxjp_pre_allocation_record
|
||||
WHERE shop_id = #{shopId}
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="queryPageByPayNo" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM zxjp_pre_allocation_record
|
||||
WHERE pay_no = #{payNo}
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<update id="updateStatus">
|
||||
UPDATE zxjp_pre_allocation_record
|
||||
SET allocation_status = #{status},
|
||||
update_time = NOW()
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteByShopId">
|
||||
DELETE FROM zxjp_pre_allocation_record WHERE shop_id = #{shopId}
|
||||
</delete>
|
||||
|
||||
<insert id="insertBatch">
|
||||
INSERT INTO zxjp_pre_allocation_record
|
||||
(order_id,shop_id,pay_no,expense_type,payee_name,payee_code,pay_amount,allocation_status,create_time)
|
||||
VALUES
|
||||
<foreach collection="list" item="i" separator=",">
|
||||
(#{i.orderId},#{i.shopId},#{i.payNo},#{i.expenseType},#{i.payeeName},#{i.payeeCode},
|
||||
#{i.payAmount},#{i.allocationStatus},NOW())
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateBatch">
|
||||
<foreach collection="list" item="i" separator=";">
|
||||
UPDATE zxjp_pre_allocation_record
|
||||
SET pay_no = #{i.payNo},
|
||||
allocation_status = #{i.allocationStatus},
|
||||
update_time = NOW()
|
||||
WHERE id = #{i.id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="updateByOrderId">
|
||||
<foreach collection="list" item="i" separator=";">
|
||||
UPDATE zxjp_pre_allocation_record
|
||||
SET pay_no = #{i.payNo},
|
||||
allocation_status = #{i.allocationStatus},
|
||||
update_time = NOW()
|
||||
where order_id = #{orderId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,221 @@
|
||||
<?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.cool.store.mapper.order.StoreOrderMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.order.StoreOrderDO">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="order_no" property="orderNo" jdbcType="VARCHAR"/>
|
||||
<result column="shop_id" property="shopId" jdbcType="BIGINT"/>
|
||||
<result column="line_id" property="lineId" jdbcType="BIGINT"/>
|
||||
<result column="partner_name" property="partnerName" jdbcType="VARCHAR"/>
|
||||
<result column="partner_mobile" property="partnerMobile" jdbcType="VARCHAR"/>
|
||||
<result column="investment_manager" property="investmentManager" jdbcType="VARCHAR"/>
|
||||
<result column="store_type_id" property="storeTypeId" jdbcType="BIGINT"/>
|
||||
<result column="store_type_code" property="storeTypeCode" jdbcType="VARCHAR"/>
|
||||
<result column="store_type_name" property="storeTypeName" jdbcType="VARCHAR"/>
|
||||
<result column="store_type" property="storeType" jdbcType="INTEGER"/>
|
||||
<result column="brand" property="brand" jdbcType="VARCHAR"/>
|
||||
<result column="franchise_fee" property="franchiseFee" jdbcType="DECIMAL"/>
|
||||
<result column="original_franchise_fee" property="originalFranchiseFee" jdbcType="DECIMAL"/>
|
||||
<result column="brand_usage_fee" property="brandUsageFee" jdbcType="DECIMAL"/>
|
||||
<result column="original_brand_usage_fee" property="originalBrandUsageFee" jdbcType="DECIMAL"/>
|
||||
<result column="management_fee" property="managementFee" jdbcType="DECIMAL"/>
|
||||
<result column="original_management_fee" property="originalManagementFee" jdbcType="DECIMAL"/>
|
||||
<result column="system_usage_fee" property="systemUsageFee" jdbcType="DECIMAL"/>
|
||||
<result column="original_system_usage_fee" property="originalSystemUsageFee" jdbcType="DECIMAL"/>
|
||||
<result column="first_order_fee" property="firstOrderFee" jdbcType="DECIMAL"/>
|
||||
<result column="contract_deposit" property="contractDeposit" jdbcType="DECIMAL"/>
|
||||
<result column="original_contract_deposit" property="originalContractDeposit" jdbcType="DECIMAL"/>
|
||||
<result column="design_fee" property="designFee" jdbcType="DECIMAL"/>
|
||||
<result column="original_design_fee" property="originalDesignFee" jdbcType="DECIMAL"/>
|
||||
<result column="store_fixed_amount" property="storeFixedAmount" jdbcType="DECIMAL"/>
|
||||
<result column="option_amount" property="optionAmount" jdbcType="DECIMAL"/>
|
||||
<result column="total_amount" property="totalAmount" jdbcType="DECIMAL"/>
|
||||
<result column="paid_amount" property="paidAmount" jdbcType="DECIMAL"/>
|
||||
<result column="unpaid_amount" property="unpaidAmount" jdbcType="DECIMAL"/>
|
||||
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, order_no, shop_id, line_id, partner_name, partner_mobile, investment_manager,
|
||||
store_type_id, store_type_code, store_type_name, store_type, brand,
|
||||
franchise_fee, original_franchise_fee,
|
||||
brand_usage_fee, original_brand_usage_fee,
|
||||
management_fee, original_management_fee,
|
||||
system_usage_fee, original_system_usage_fee,
|
||||
contract_deposit, original_contract_deposit,
|
||||
design_fee, original_design_fee,
|
||||
first_order_fee,
|
||||
store_fixed_amount, option_amount, total_amount, paid_amount, unpaid_amount,
|
||||
status, create_time, update_time
|
||||
</sql>
|
||||
|
||||
<select id="getById" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM zxjp_store_order
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="queryPage" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM zxjp_store_order
|
||||
<where>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
<if test="shopId != null">AND</if>
|
||||
status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="queryPageByLineId" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM zxjp_store_order
|
||||
<where>
|
||||
<if test="lineId != null">
|
||||
line_id = #{lineId}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
<if test="lineId != null">AND</if>
|
||||
status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="countByShopIdAndStatusIn" resultType="int">
|
||||
SELECT COUNT(1)
|
||||
FROM zxjp_store_order
|
||||
WHERE shop_id = #{shopId}
|
||||
AND status IN
|
||||
<foreach collection="statuses" item="st" open="(" separator="," close=")">
|
||||
#{st}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="countByShopIdAndStatus" resultType="int">
|
||||
SELECT COUNT(1)
|
||||
FROM zxjp_store_order
|
||||
WHERE shop_id = #{shopId}
|
||||
AND status = #{status}
|
||||
</select>
|
||||
|
||||
<select id="getLatestDraftByShopId" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM zxjp_store_order
|
||||
WHERE shop_id = #{shopId}
|
||||
AND status = #{status}
|
||||
ORDER BY update_time DESC, create_time DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="getLatestOrderByShopId" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM zxjp_store_order
|
||||
WHERE shop_id = #{shopId}
|
||||
AND status != 25
|
||||
ORDER BY update_time DESC, create_time DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="queryPCPage" resultType="com.cool.store.vo.order.PCStoreOrderListVO">
|
||||
SELECT
|
||||
a.id AS orderId,
|
||||
a.order_no AS orderNo,
|
||||
a.store_type AS storeType,
|
||||
a.brand AS brand,
|
||||
a.store_type_name AS name,
|
||||
a.total_amount AS totalAmount,
|
||||
a.paid_amount AS paidAmount,
|
||||
a.unpaid_amount AS unpaidAmount,
|
||||
a.store_fixed_amount as storeFixedAmount,
|
||||
a.status AS status,
|
||||
a.create_time AS orderTime,
|
||||
c.username AS partnerName,
|
||||
c.mobile AS partnerMobile,
|
||||
b.shop_code as shopCode,
|
||||
b.shop_name as shopName
|
||||
FROM zxjp_store_order a
|
||||
LEFT JOIN xfsg_shop_info b ON a.shop_id = b.id
|
||||
LEFT JOIN xfsg_line_info c ON a.line_id = c.id
|
||||
<where>
|
||||
<if test="orderNo != null and orderNo != ''">
|
||||
AND a.order_no LIKE CONCAT('%', #{orderNo}, '%')
|
||||
</if>
|
||||
<if test="partnerName != null and partnerName != ''">
|
||||
AND c.username LIKE CONCAT('%', #{partnerName}, '%')
|
||||
</if>
|
||||
<if test="partnerMobile != null and partnerMobile != ''">
|
||||
AND c.mobile LIKE CONCAT('%', #{partnerMobile}, '%')
|
||||
</if>
|
||||
<if test="brand != null and brand != ''">
|
||||
AND a.brand = #{brand}
|
||||
</if>
|
||||
<if test="storeTypeId != null">
|
||||
AND a.store_type_id = #{storeTypeId}
|
||||
</if>
|
||||
<if test="orderTimeStart != null">
|
||||
AND a.create_time >= #{orderTimeStart}
|
||||
</if>
|
||||
<if test="orderTimeEnd != null">
|
||||
AND a.create_time <= #{orderTimeEnd}
|
||||
</if>
|
||||
<if test="payTimeStart != null">
|
||||
AND a.pay_time >= #{payTimeStart}
|
||||
</if>
|
||||
<if test="payTimeEnd != null">
|
||||
AND a.pay_time <= #{payTimeEnd}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND a.status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="count" resultType="java.lang.Long">
|
||||
SELECT
|
||||
count(1)
|
||||
FROM zxjp_store_order a
|
||||
LEFT JOIN xfsg_shop_info b ON a.shop_id = b.id
|
||||
LEFT JOIN xfsg_line_info c ON a.line_id = c.id
|
||||
<where>
|
||||
<if test="orderNo != null and orderNo != ''">
|
||||
AND a.order_no LIKE CONCAT('%', #{orderNo}, '%')
|
||||
</if>
|
||||
<if test="partnerName != null and partnerName != ''">
|
||||
AND c.username LIKE CONCAT('%', #{partnerName}, '%')
|
||||
</if>
|
||||
<if test="partnerMobile != null and partnerMobile != ''">
|
||||
AND c.mobile LIKE CONCAT('%', #{partnerMobile}, '%')
|
||||
</if>
|
||||
<if test="brand != null and brand != ''">
|
||||
AND a.brand = #{brand}
|
||||
</if>
|
||||
<if test="storeTypeId != null">
|
||||
AND a.store_type_id = #{storeTypeId}
|
||||
</if>
|
||||
<if test="orderTimeStart != null">
|
||||
AND a.create_time >= #{orderTimeStart}
|
||||
</if>
|
||||
<if test="orderTimeEnd != null">
|
||||
AND a.create_time <= #{orderTimeEnd}
|
||||
</if>
|
||||
<if test="payTimeStart != null">
|
||||
AND a.pay_time >= #{payTimeStart}
|
||||
</if>
|
||||
<if test="payTimeEnd != null">
|
||||
AND a.pay_time <= #{payTimeEnd}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND a.status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,106 @@
|
||||
<?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.cool.store.mapper.order.StoreOrderOptionSnapshotMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.order.StoreOrderOptionSnapshotDO">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="order_id" property="orderId" jdbcType="BIGINT"/>
|
||||
<result column="shop_id" property="shopId" jdbcType="BIGINT"/>
|
||||
<result column="store_type_id" property="storeTypeId" jdbcType="BIGINT"/>
|
||||
<result column="option_id" property="optionId" jdbcType="BIGINT"/>
|
||||
<result column="category_code" property="categoryCode" jdbcType="VARCHAR"/>
|
||||
<result column="item_code" property="itemCode" jdbcType="VARCHAR"/>
|
||||
<result column="option_code" property="optionCode" jdbcType="VARCHAR"/>
|
||||
<result column="option_unit" property="optionUnit" jdbcType="VARCHAR"/>
|
||||
<result column="option_name" property="optionName" jdbcType="VARCHAR"/>
|
||||
<result column="option_price" property="optionPrice" jdbcType="DECIMAL"/>
|
||||
<result column="original_option_price" property="originalOptionPrice" jdbcType="DECIMAL"/>
|
||||
<result column="option_remark" property="optionRemark" jdbcType="VARCHAR"/>
|
||||
<result column="image_url" property="imageUrl" jdbcType="VARCHAR"/>
|
||||
<result column="video_url" property="videoUrl" jdbcType="VARCHAR"/>
|
||||
<result column="quantity" property="quantity" jdbcType="INTEGER"/>
|
||||
<result column="amount" property="amount" jdbcType="DECIMAL"/>
|
||||
<result column="original_amount" property="originalAmount" jdbcType="DECIMAL"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, order_id, shop_id, store_type_id, option_id, category_code, item_code,
|
||||
option_code, option_name, option_price, original_option_price, option_remark, image_url, video_url,
|
||||
quantity, amount, original_amount, create_time, option_unit
|
||||
</sql>
|
||||
|
||||
<insert id="insertBatch">
|
||||
INSERT INTO zxjp_store_order_option_snapshot
|
||||
(order_id, shop_id, store_type_id, option_id, category_code, item_code,
|
||||
option_code, option_name, option_price, original_option_price, option_remark, image_url, video_url,
|
||||
quantity, amount, original_amount, create_time, option_unit)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.orderId}, #{item.shopId}, #{item.storeTypeId}, #{item.optionId},
|
||||
#{item.categoryCode}, #{item.itemCode}, #{item.optionCode}, #{item.optionName},
|
||||
#{item.optionPrice}, #{item.originalOptionPrice}, #{item.optionRemark}, #{item.imageUrl}, #{item.videoUrl},
|
||||
#{item.quantity}, #{item.amount}, #{item.originalAmount}, NOW(), #{item.optionUnit})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="listByOrderId" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
a.id,
|
||||
a.order_id,
|
||||
a.shop_id,
|
||||
a.store_type_id,
|
||||
a.option_id,
|
||||
a.category_code,
|
||||
a.item_code,
|
||||
a.option_code,
|
||||
a.option_name,
|
||||
a.option_price,
|
||||
a.original_option_price,
|
||||
a.option_remark,
|
||||
a.image_url,
|
||||
a.video_url,
|
||||
a.quantity,
|
||||
a.amount,
|
||||
a.original_amount,
|
||||
a.create_time,
|
||||
a.option_unit
|
||||
FROM zxjp_store_order_option_snapshot a left join
|
||||
sys_dict_column_5558ce7a3aa84e3590392fcaa8697ffb b on a.category_code = b.column_code
|
||||
WHERE order_id = #{orderId}
|
||||
ORDER BY b.id asc,a.id ASC
|
||||
</select>
|
||||
|
||||
<delete id="deleteByOrderId">
|
||||
DELETE FROM zxjp_store_order_option_snapshot
|
||||
WHERE order_id = #{orderId}
|
||||
</delete>
|
||||
|
||||
<update id="batchUpdateQuantityAndAmount" parameterType="java.util.List">
|
||||
UPDATE zxjp_store_order_option_snapshot
|
||||
SET
|
||||
quantity = CASE id
|
||||
<foreach collection="list" item="item" separator=" ">
|
||||
WHEN #{item.id} THEN #{item.quantity}
|
||||
</foreach>
|
||||
ELSE quantity
|
||||
END,
|
||||
amount = CASE id
|
||||
<foreach collection="list" item="item" separator=" ">
|
||||
WHEN #{item.id} THEN #{item.amount}
|
||||
</foreach>
|
||||
ELSE amount
|
||||
END,
|
||||
original_amount = CASE id
|
||||
<foreach collection="list" item="item" separator=" ">
|
||||
WHEN #{item.id} THEN #{item.originalAmount}
|
||||
</foreach>
|
||||
ELSE original_amount
|
||||
END
|
||||
WHERE id IN
|
||||
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?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.cool.store.mapper.order.StoreWishlistMapper">
|
||||
|
||||
<insert id="insertBatch">
|
||||
INSERT INTO zxjp_store_wishlist
|
||||
(line_id, store_type_id, option_id, quantity, total_amount, version_no, deleted, create_time, update_time)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.lineId}, #{item.storeTypeId}, #{item.optionId}, #{item.quantity}, #{item.totalAmount}, #{item.versionNo}, 0, NOW(), NOW())
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="softDeleteByLineIdAndStoreTypeAndVersion">
|
||||
UPDATE zxjp_store_wishlist
|
||||
SET deleted = 1,
|
||||
update_time = NOW()
|
||||
WHERE line_id = #{lineId}
|
||||
AND store_type_id = #{storeTypeId}
|
||||
AND version_no = #{versionNo}
|
||||
AND deleted = 0
|
||||
</update>
|
||||
|
||||
<select id="getById" resultType="com.cool.store.entity.order.StoreWishlistDO">
|
||||
SELECT id, line_id, store_type_id, option_id, quantity, total_amount, version_no, deleted, create_time, update_time
|
||||
FROM zxjp_store_wishlist
|
||||
WHERE id = #{id}
|
||||
AND deleted = 0
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="listByLineIdAndStoreTypeAndVersion" resultType="com.cool.store.entity.order.StoreWishlistDO">
|
||||
SELECT id, line_id, store_type_id, option_id, quantity, total_amount, version_no, deleted, create_time, update_time
|
||||
FROM zxjp_store_wishlist
|
||||
WHERE line_id = #{lineId}
|
||||
AND store_type_id = #{storeTypeId}
|
||||
AND version_no = #{versionNo}
|
||||
AND deleted = 0
|
||||
ORDER BY id ASC
|
||||
</select>
|
||||
|
||||
<select id="listByLineId" resultType="com.cool.store.vo.order.MiniStoreWishlistListVO">
|
||||
SELECT
|
||||
w.store_type_id AS storeTypeId,
|
||||
st.brand AS brand,
|
||||
st.store_type_name AS storeTypeName,
|
||||
st.store_type AS storeType,
|
||||
st.image_url AS imageUrl,
|
||||
MIN(w.create_time) AS createTime,
|
||||
MAX(w.total_amount) AS totalAmount,
|
||||
w.version_no AS versionNo
|
||||
FROM zxjp_store_wishlist w
|
||||
LEFT JOIN zxjp_store_type st ON st.id = w.store_type_id
|
||||
WHERE w.line_id = #{lineId}
|
||||
AND w.deleted = 0
|
||||
<if test="storeTypeId != null">
|
||||
AND w.store_type_id = #{storeTypeId}
|
||||
</if>
|
||||
GROUP BY w.version_no
|
||||
ORDER BY w.create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,74 @@
|
||||
<?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.cool.store.mapper.store.StoreTypeMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.store.StoreTypeDO">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="store_type_code" property="storeTypeCode" jdbcType="VARCHAR"/>
|
||||
<result column="store_type_name" property="storeTypeName" jdbcType="VARCHAR"/>
|
||||
<result column="brand" property="brand" jdbcType="VARCHAR"/>
|
||||
<result column="store_type" property="storeType" jdbcType="INTEGER"/>
|
||||
<result column="description" property="description" jdbcType="VARCHAR"/>
|
||||
<result column="image_url" property="imageUrl" jdbcType="VARCHAR"/>
|
||||
<result column="video_url" property="videoUrl" jdbcType="VARCHAR"/>
|
||||
<result column="vr_video_url" property="vrVideoUrl" jdbcType="VARCHAR"/>
|
||||
<result column="franchise_fee" property="franchiseFee" jdbcType="DECIMAL"/>
|
||||
<result column="original_franchise_fee" property="originalFranchiseFee" jdbcType="DECIMAL"/>
|
||||
<result column="brand_usage_fee" property="brandUsageFee" jdbcType="DECIMAL"/>
|
||||
<result column="original_brand_usage_fee" property="originalBrandUsageFee" jdbcType="DECIMAL"/>
|
||||
<result column="management_fee" property="managementFee" jdbcType="DECIMAL"/>
|
||||
<result column="original_management_fee" property="originalManagementFee" jdbcType="DECIMAL"/>
|
||||
<result column="system_usage_fee" property="systemUsageFee" jdbcType="DECIMAL"/>
|
||||
<result column="original_system_usage_fee" property="originalSystemUsageFee" jdbcType="DECIMAL"/>
|
||||
<result column="contract_deposit" property="contractDeposit" jdbcType="DECIMAL"/>
|
||||
<result column="original_contract_deposit" property="originalContractDeposit" jdbcType="DECIMAL"/>
|
||||
<result column="design_fee" property="designFee" jdbcType="DECIMAL"/>
|
||||
<result column="original_design_fee" property="originalDesignFee" jdbcType="DECIMAL"/>
|
||||
<result column="first_order_fee" property="firstOrderFee" jdbcType="DECIMAL"/>
|
||||
<result column="sort_order" property="sortOrder" jdbcType="INTEGER"/>
|
||||
<result column="is_active" property="active" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, store_type_code, store_type_name, brand, store_type, description,
|
||||
image_url, video_url, vr_video_url,
|
||||
franchise_fee, original_franchise_fee,
|
||||
brand_usage_fee, original_brand_usage_fee,
|
||||
management_fee, original_management_fee,
|
||||
system_usage_fee, original_system_usage_fee,
|
||||
contract_deposit, original_contract_deposit,
|
||||
design_fee, original_design_fee,
|
||||
first_order_fee, sort_order,
|
||||
is_active, deleted, create_time, update_time
|
||||
</sql>
|
||||
|
||||
<select id="queryByCondition" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM zxjp_store_type
|
||||
WHERE deleted = 0
|
||||
<if test="active != null">
|
||||
AND is_active = #{active}
|
||||
</if>
|
||||
<if test="brand != null and brand != ''">
|
||||
AND brand = #{brand}
|
||||
</if>
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (store_type_name LIKE CONCAT('%', #{keyword}, '%')
|
||||
OR store_type_code LIKE CONCAT('%', #{keyword}, '%'))
|
||||
</if>
|
||||
ORDER BY sort_order ASC, create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="listByStoreType" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM zxjp_store_type
|
||||
WHERE deleted = 0
|
||||
AND is_active = 1
|
||||
AND store_type = #{storeType}
|
||||
ORDER BY sort_order ASC, create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?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.cool.store.mapper.store.StoreTypeOptionMapper">
|
||||
|
||||
<insert id="insertBatch">
|
||||
INSERT INTO zxjp_store_type_option
|
||||
(
|
||||
store_type_id,
|
||||
option_id,
|
||||
category_code,
|
||||
item_code,
|
||||
is_default,
|
||||
default_quantity,
|
||||
allow_quantity_edit,
|
||||
sort_order,
|
||||
option_price,
|
||||
top_preview_image,
|
||||
create_time,
|
||||
update_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.storeTypeId},
|
||||
#{item.optionId},
|
||||
#{item.categoryCode},
|
||||
#{item.itemCode},
|
||||
#{item.isDefault},
|
||||
#{item.defaultQuantity},
|
||||
#{item.allowQuantityEdit},
|
||||
#{item.sortOrder},
|
||||
#{item.optionPrice},
|
||||
#{item.topPreviewImage},
|
||||
NOW(),
|
||||
NOW()
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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.cool.store.mapper.visit.StoreVisitReservationMapper">
|
||||
|
||||
<select id="adminPage" resultType="com.cool.store.vo.visit.StoreVisitReservationVO">
|
||||
SELECT
|
||||
id,
|
||||
intent_city_id AS intentCityId,
|
||||
contact_name AS contactName,
|
||||
mobile,
|
||||
visit_time AS visitTime,
|
||||
status,
|
||||
remark,
|
||||
cancel_reason AS cancelReason,
|
||||
current_follow_user AS currentFollowUser,
|
||||
service_user_id AS serviceUserId,
|
||||
create_time AS createTime
|
||||
FROM zxjp_store_visit_reservation
|
||||
<where>
|
||||
deleted = 0
|
||||
<if test="request.status != null">
|
||||
AND status = #{request.status}
|
||||
</if>
|
||||
<if test="request.contactName != null and request.contactName != ''">
|
||||
AND contact_name LIKE CONCAT('%', #{request.contactName}, '%')
|
||||
</if>
|
||||
<if test="request.mobile != null and request.mobile != ''">
|
||||
AND mobile LIKE CONCAT('%', #{request.mobile}, '%')
|
||||
</if>
|
||||
<if test="request.serviceUserId != null and request.serviceUserId != ''">
|
||||
AND service_user_id = #{request.serviceUserId}
|
||||
</if>
|
||||
<if test="request.visitStartTime != null">
|
||||
AND visit_time <![CDATA[ >= ]]> #{request.visitStartTime}
|
||||
</if>
|
||||
<if test="request.visitEndTime != null">
|
||||
AND visit_time <![CDATA[ <= ]]> #{request.visitEndTime}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,66 @@
|
||||
<?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.cool.store.mapper.wallet.WalletTradeMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.wallet.WalletTradeDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="module" jdbcType="VARCHAR" property="module" />
|
||||
<result column="pay_no" jdbcType="VARCHAR" property="payNo" />
|
||||
<result column="trade_id" jdbcType="VARCHAR" property="tradeId" />
|
||||
<result column="type" jdbcType="BIT" property="type" />
|
||||
<result column="pay_user_name" jdbcType="VARCHAR" property="payUserName" />
|
||||
<result column="pay_amount" jdbcType="DECIMAL" property="payAmount" />
|
||||
<result column="pay_status" jdbcType="BIT" property="payStatus" />
|
||||
<result column="pay_time" jdbcType="TIMESTAMP" property="payTime" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 批量新增 -->
|
||||
<insert id="insertBatch" parameterType="java.util.List">
|
||||
INSERT INTO zxjp_wallet_trade (module, pay_no, trade_id, type, pay_user_name, pay_amount, pay_status, pay_time, remark, create_user_id)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.module}, #{item.payNo}, #{item.tradeId}, #{item.type}, #{item.payUserName}, #{item.payAmount}, #{item.payStatus}, #{item.payTime}, #{item.remark}, #{item.createUserId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPayNo" parameterType="com.cool.store.entity.wallet.WalletTradeDO">
|
||||
UPDATE zxjp_wallet_trade
|
||||
<set>
|
||||
<if test="module != null">module = #{module},</if>
|
||||
<if test="tradeId != null">trade_id = #{tradeId},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="payUserName != null">pay_user_name = #{payUserName},</if>
|
||||
<if test="payAmount != null">pay_amount = #{payAmount},</if>
|
||||
<if test="payStatus != null">pay_status = #{payStatus},</if>
|
||||
<if test="payTime != null">pay_time = #{payTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createUserId != null">create_user_id = #{createUserId},</if>
|
||||
create_time = create_time
|
||||
</set>
|
||||
WHERE pay_no = #{payNo}
|
||||
</update>
|
||||
|
||||
<update id="updateBatchByPayNo">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
UPDATE zxjp_wallet_trade
|
||||
<set>
|
||||
<if test="item.module != null">module = #{item.module},</if>
|
||||
<if test="item.tradeId != null">trade_id = #{item.tradeId},</if>
|
||||
<if test="item.type != null">type = #{item.type},</if>
|
||||
<if test="item.payUserName != null">pay_user_name = #{item.payUserName},</if>
|
||||
<if test="item.payAmount != null">pay_amount = #{item.payAmount},</if>
|
||||
<if test="item.payStatus != null">pay_status = #{item.payStatus},</if>
|
||||
<if test="item.payTime != null">pay_time = #{item.payTime},</if>
|
||||
<if test="item.remark != null">remark = #{item.remark},</if>
|
||||
<if test="item.createUserId != null">create_user_id = #{item.createUserId},</if>
|
||||
create_time = create_time
|
||||
</set>
|
||||
WHERE pay_no = #{item.payNo}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -2,6 +2,7 @@ package com.cool.store.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.cool.store.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@@ -58,4 +58,6 @@ public class PreparationDTO {
|
||||
private String storeId;
|
||||
|
||||
private Long investRegionId;
|
||||
|
||||
private Integer useStandardStore;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.cool.store.dto.standardStore;
|
||||
|
||||
import com.cool.store.dto.region.BigRegionDTO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/2/6 16:31
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class StoreOrderDTO {
|
||||
@ApiModelProperty("订单ID")
|
||||
private Long orderId;
|
||||
@ApiModelProperty("订单编号")
|
||||
private String orderNo;
|
||||
@ApiModelProperty("加盟商名字")
|
||||
private String partnerName;
|
||||
@ApiModelProperty("加盟商手机号")
|
||||
private String partnerMobile;
|
||||
@ApiModelProperty("品牌")
|
||||
private String brand;
|
||||
@ApiModelProperty("品牌名称")
|
||||
private String brandName;
|
||||
@ApiModelProperty("门店类型")
|
||||
private String storeType;
|
||||
@ApiModelProperty("门店类型名称")
|
||||
private String storeTypeName;
|
||||
@ApiModelProperty("店型名称")
|
||||
private String name;
|
||||
@ApiModelProperty("订单总额")
|
||||
private BigDecimal totalAmount;
|
||||
@ApiModelProperty("下单时间")
|
||||
private Date orderTime;
|
||||
@ApiModelProperty("加盟类费用总额")
|
||||
private BigDecimal storeFixedAmount;
|
||||
@ApiModelProperty("已支付金额")
|
||||
private BigDecimal paidAmount;
|
||||
@ApiModelProperty("未支付金额")
|
||||
private BigDecimal unpaidAmount;
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.cool.store.dto.wallet;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/2/5 13:54
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class BatchTransferDTO {
|
||||
|
||||
@ApiModelProperty("交易状态1.成功 2.失败 3.处理中")
|
||||
private Integer tradeStatus;
|
||||
|
||||
@ApiModelProperty("批量转账数据")
|
||||
private List<TransDataRequest> transArray;
|
||||
|
||||
@Data
|
||||
public static class TransDataRequest {
|
||||
|
||||
@ApiModelProperty("业务系统付款单号(如 CRM 单号),业务系统单号")
|
||||
private String reqNo;
|
||||
@ApiModelProperty("费用科目")
|
||||
private Integer feeItemId;
|
||||
@ApiModelProperty("公司编号")
|
||||
private String companyCode;
|
||||
@ApiModelProperty("公司编号绑定多个账户时,必传")
|
||||
private String companyAccountCode;
|
||||
@ApiModelProperty("金额(元)")
|
||||
private String amount;
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
@ApiModelProperty("交易流水id")
|
||||
private String tradeId;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,7 +19,4 @@ public class CompanyDTO {
|
||||
@ApiModelProperty(value = "公司名称")
|
||||
private String companyName;
|
||||
|
||||
@ApiModelProperty(value = "公司账户")
|
||||
private String companyAccountNo;
|
||||
|
||||
}
|
||||
|
||||
@@ -76,4 +76,11 @@ public class FranchiseFeeDO {
|
||||
@ApiModelProperty("收银费(系统费)")
|
||||
private String cashierFee;
|
||||
|
||||
@Column(name = "pay_type")
|
||||
@ApiModelProperty("付款方式 1线下支付 2平安钱包支付")
|
||||
private Integer payType;
|
||||
|
||||
@Column(name = "is_refund")
|
||||
@ApiModelProperty("是否退款,0否1是")
|
||||
private Integer isRefund;
|
||||
}
|
||||
|
||||
@@ -178,6 +178,10 @@ public class LineInfoDO {
|
||||
|
||||
@Column(name = "join_mode")
|
||||
private Integer joinMode;
|
||||
|
||||
@Column(name = "franchise_brand")
|
||||
private String franchiseBrand;
|
||||
|
||||
@Column(name = "use_standard_store")
|
||||
private Integer useStandardStore;
|
||||
}
|
||||
@@ -168,6 +168,9 @@ public class ShopInfoDO {
|
||||
@Column(name = "operations_consultant")
|
||||
private String operationsConsultant;
|
||||
|
||||
@Column(name = "use_standard_store")
|
||||
private Integer useStandardStore;
|
||||
|
||||
@Column(name = "plan_open_date")
|
||||
private Date planOpenDate;
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.cool.store.entity.config;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Table(name = "zxjp_cfg_item_category")
|
||||
public class ConfigItemCategoryDO implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@Column(name = "category_code")
|
||||
private String categoryCode;
|
||||
|
||||
@Column(name = "category_name")
|
||||
private String categoryName;
|
||||
|
||||
@Column(name = "sort_no")
|
||||
private Integer sortNo;
|
||||
|
||||
@Column(name = "image_url")
|
||||
private String imageUrl;
|
||||
|
||||
@Column(name = "video_url")
|
||||
private String videoUrl;
|
||||
|
||||
@Column(name = "status")
|
||||
private Integer status;
|
||||
|
||||
@Column(name = "is_deleted")
|
||||
private Integer isDeleted;
|
||||
|
||||
@Column(name = "remark")
|
||||
private String remark;
|
||||
|
||||
@Column(name = "created_user_id")
|
||||
private String createdUserId;
|
||||
|
||||
@Column(name = "created_time")
|
||||
private Date createdTime;
|
||||
|
||||
@Column(name = "updated_user_id")
|
||||
private String updatedUserId;
|
||||
|
||||
@Column(name = "updated_time")
|
||||
private Date updatedTime;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.cool.store.entity.config;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Table(name = "zxjp_cfg_item")
|
||||
public class ConfigItemDO implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@Column(name = "item_code")
|
||||
private String itemCode;
|
||||
|
||||
@Column(name = "item_name")
|
||||
private String itemName;
|
||||
|
||||
@Column(name = "category_id")
|
||||
private Long categoryId;
|
||||
|
||||
@Column(name = "sort_no")
|
||||
private Integer sortNo;
|
||||
|
||||
@Column(name = "status")
|
||||
private Integer status;
|
||||
|
||||
@Column(name = "is_deleted")
|
||||
private Integer isDeleted;
|
||||
|
||||
@Column(name = "remark")
|
||||
private String remark;
|
||||
|
||||
@Column(name = "created_user_id")
|
||||
private String createdUserId;
|
||||
|
||||
@Column(name = "created_time")
|
||||
private Date createdTime;
|
||||
|
||||
@Column(name = "updated_user_id")
|
||||
private String updatedUserId;
|
||||
|
||||
@Column(name = "updated_time")
|
||||
private Date updatedTime;
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.cool.store.entity.config;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 选项模板表
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table(name = "zxjp_config_option")
|
||||
public class ConfigOptionDO implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@Column(name = "category_code")
|
||||
private String categoryCode;
|
||||
|
||||
@Column(name = "item_code")
|
||||
private String itemCode;
|
||||
|
||||
@Column(name = "option_code")
|
||||
private String optionCode;
|
||||
|
||||
@Column(name = "option_name")
|
||||
private String optionName;
|
||||
|
||||
@Column(name = "option_description")
|
||||
private String optionDescription;
|
||||
|
||||
@Column(name = "option_price")
|
||||
private BigDecimal optionPrice;
|
||||
|
||||
@Column(name = "original_option_price")
|
||||
private BigDecimal originalOptionPrice;
|
||||
|
||||
@Column(name = "option_unit")
|
||||
private String optionUnit;
|
||||
|
||||
@Column(name = "image_url")
|
||||
private String imageUrl;
|
||||
|
||||
@Column(name = "video_url")
|
||||
private String videoUrl;
|
||||
|
||||
@Column(name = "is_active")
|
||||
private Boolean active;
|
||||
|
||||
@Column(name = "sort_order")
|
||||
private Integer sortOrder;
|
||||
|
||||
@Column(name = "option_remark")
|
||||
private String optionRemark;
|
||||
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.cool.store.entity.fees;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* 加盟费用标准收费额配置
|
||||
*/
|
||||
@Table(name = "zxjp_fees_fee_standard_config")
|
||||
@Data
|
||||
public class FeeStandardConfigDO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 加盟品牌:1-正新鸡排,2-正新三明治,3-正烧记,4-大鼓米线,5-串小妹,6-茂掌柜
|
||||
*/
|
||||
@Column(name = "join_brand")
|
||||
private Integer joinBrand;
|
||||
|
||||
/**
|
||||
* 费用类型
|
||||
*/
|
||||
@Column(name = "expense_type")
|
||||
private String expenseType;
|
||||
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@Column(name = "create_user_id")
|
||||
private String createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.cool.store.entity.fees;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* 线下收款银行配置
|
||||
*/
|
||||
@Table(name = "zxjp_fees_payee_bank_config")
|
||||
@Data
|
||||
public class PayeeBankConfigDO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 加盟品牌:1-正新鸡排,2-正新三明治,3-正烧记,4-大鼓米线,5-串小妹,6-茂掌柜
|
||||
*/
|
||||
@Column(name = "join_brand")
|
||||
private Integer joinBrand;
|
||||
|
||||
/**
|
||||
* 招商分部id,0全部
|
||||
*/
|
||||
@Column(name = "invest_division_id")
|
||||
private Long investDivisionId;
|
||||
|
||||
/**
|
||||
* 付款方式,同缴纳加盟费支付方式
|
||||
*/
|
||||
@Column(name = "pay_type")
|
||||
private Integer payType;
|
||||
|
||||
/**
|
||||
* 收款公司名称
|
||||
*/
|
||||
@Column(name = "payee_name")
|
||||
private String payeeName;
|
||||
|
||||
/**
|
||||
* 收款公司code
|
||||
*/
|
||||
@Column(name = "payee_code")
|
||||
private String payeeCode;
|
||||
|
||||
/**
|
||||
* 收款账户
|
||||
*/
|
||||
@Column(name = "payee_account")
|
||||
private String payeeAccount;
|
||||
|
||||
/**
|
||||
* 收款银行
|
||||
*/
|
||||
@Column(name = "payee_bank")
|
||||
private String payeeBank;
|
||||
|
||||
/**
|
||||
* 收款银行开户行
|
||||
*/
|
||||
@Column(name = "payee_bank_branch")
|
||||
private String payeeBankBranch;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@Column(name = "create_user_id")
|
||||
private String createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.cool.store.entity.fees;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* 门店平安钱包分账信息
|
||||
*/
|
||||
@Table(name = "zxjp_fees_shop_allocation_info")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class ShopAllocationInfoDO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 门店id
|
||||
*/
|
||||
@Column(name = "shop_id")
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 费用类型
|
||||
*/
|
||||
@Column(name = "expense_type")
|
||||
private String expenseType;
|
||||
|
||||
/**
|
||||
* 收款公司名称
|
||||
*/
|
||||
@Column(name = "payee_name")
|
||||
private String payeeName;
|
||||
|
||||
/**
|
||||
* 收款公司code
|
||||
*/
|
||||
@Column(name = "payee_code")
|
||||
private String payeeCode;
|
||||
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 分账状态,1已分账 2分账失败 3待分账
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 分账失败原因
|
||||
*/
|
||||
@Column(name = "fail_reason")
|
||||
private String failReason;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@Column(name = "create_user_id")
|
||||
private String createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
@Column(name = "update_user_id")
|
||||
private String updateUserId;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.cool.store.entity.fees;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* 平安钱包分账公司配置
|
||||
*/
|
||||
@Table(name = "zxjp_fees_wallet_allocation_company")
|
||||
@Data
|
||||
public class WalletAllocationCompanyDO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 分账公司配置id
|
||||
*/
|
||||
@Column(name = "config_id")
|
||||
private Long configId;
|
||||
|
||||
/**
|
||||
* 收款公司名称
|
||||
*/
|
||||
@Column(name = "payee_name")
|
||||
private String payeeName;
|
||||
|
||||
/**
|
||||
* 收款公司code
|
||||
*/
|
||||
@Column(name = "payee_code")
|
||||
private String payeeCode;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@Column(name = "create_user_id")
|
||||
private String createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.cool.store.entity.fees;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* 平安钱包分账配置
|
||||
*/
|
||||
@Table(name = "zxjp_fees_wallet_allocation_config")
|
||||
@Data
|
||||
public class WalletAllocationConfigDO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 加盟品牌:1-正新鸡排,2-正新三明治,3-正烧记,4-大鼓米线,5-串小妹,6-茂掌柜
|
||||
*/
|
||||
@Column(name = "join_brand")
|
||||
private Integer joinBrand;
|
||||
|
||||
/**
|
||||
* 招商分部id,0全部
|
||||
*/
|
||||
@Column(name = "invest_division_id")
|
||||
private Long investDivisionId;
|
||||
|
||||
/**
|
||||
* 费用类型
|
||||
*/
|
||||
@Column(name = "expense_type")
|
||||
private String expenseType;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@Column(name = "create_user_id")
|
||||
private String createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
package com.cool.store.entity.fees;
|
||||
|
||||
import com.cool.store.entity.wallet.WalletTradeDO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* 钱包加盟缴费信息
|
||||
*/
|
||||
@Table(name = "zxjp_fees_wallet_pay_info")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class WalletPayInfoDO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 门店id
|
||||
*/
|
||||
@Column(name = "shop_id")
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 业务模块
|
||||
*/
|
||||
@Column(name = "module")
|
||||
private String module;
|
||||
|
||||
/**
|
||||
* 付款单号
|
||||
*/
|
||||
@Column(name = "pay_no")
|
||||
private String payNo;
|
||||
|
||||
/**
|
||||
* 付款人
|
||||
*/
|
||||
@Column(name = "pay_user_name")
|
||||
private String payUserName;
|
||||
|
||||
/**
|
||||
* 付款金额
|
||||
*/
|
||||
@Column(name = "pay_amount")
|
||||
private BigDecimal payAmount;
|
||||
|
||||
/**
|
||||
* 交易流水号
|
||||
*/
|
||||
@Column(name = "trade_id")
|
||||
private String tradeId;
|
||||
|
||||
/**
|
||||
* 付款状态,1已支付、2支付失败 3支付中
|
||||
*/
|
||||
@Column(name = "pay_status")
|
||||
private Integer payStatus;
|
||||
|
||||
/**
|
||||
* 支付时间
|
||||
*/
|
||||
@Column(name = "pay_time")
|
||||
private Date payTime;
|
||||
|
||||
/**
|
||||
* 认领状态0-待认领,1-已认领
|
||||
*/
|
||||
@Column(name = "claim_status")
|
||||
private Integer claimStatus;
|
||||
|
||||
/**
|
||||
* 费用类型列表
|
||||
*/
|
||||
@Column(name = "expense_types")
|
||||
private String expenseTypes;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@Column(name = "create_user_id")
|
||||
private String createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
public WalletPayInfoDO(String module, Long shopId, String payNo, String payUserName, BigDecimal payAmount, String expenseType, String createUserId, String tradeId) {
|
||||
this.shopId = shopId;
|
||||
this.payNo = payNo;
|
||||
this.payUserName = payUserName;
|
||||
this.payAmount = payAmount;
|
||||
this.payTime = new Date();
|
||||
this.claimStatus = 0;
|
||||
this.expenseTypes = expenseType;
|
||||
this.createUserId = createUserId;
|
||||
this.module = module;
|
||||
this.tradeId = tradeId;
|
||||
}
|
||||
|
||||
public WalletTradeDO convertToTradeDO(String module) {
|
||||
WalletTradeDO walletTradeDO = new WalletTradeDO();
|
||||
walletTradeDO.setModule(module);
|
||||
walletTradeDO.setPayNo(this.payNo);
|
||||
walletTradeDO.setTradeId(this.tradeId);
|
||||
walletTradeDO.setType(1);
|
||||
walletTradeDO.setPayUserName(this.payUserName);
|
||||
walletTradeDO.setPayAmount(this.payAmount);
|
||||
walletTradeDO.setPayStatus(this.payStatus);
|
||||
walletTradeDO.setPayTime(this.payTime);
|
||||
walletTradeDO.setRemark(this.remark);
|
||||
walletTradeDO.setCreateUserId(this.createUserId);
|
||||
return walletTradeDO;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.cool.store.entity.modify;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* 业务修改记录
|
||||
*/
|
||||
@Table(name = "zxjp_modify_record")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ModifyRecordDO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 模块
|
||||
*/
|
||||
private String module;
|
||||
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
@Column(name = "business_id")
|
||||
private Long businessId;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
@Column(name = "update_user_id")
|
||||
private String updateUserId;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.cool.store.entity.order;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 预分账明细表
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table(name = "zxjp_pre_allocation_record")
|
||||
public class PreAllocationRecordDO implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@Column(name = "order_id")
|
||||
private Long orderId;
|
||||
|
||||
@Column(name = "shop_id")
|
||||
private Long shopId;
|
||||
|
||||
@Column(name = "pay_no")
|
||||
private String payNo;
|
||||
|
||||
@Column(name = "expense_type")
|
||||
private String expenseType;
|
||||
|
||||
@Column(name = "payee_name")
|
||||
private String payeeName;
|
||||
|
||||
@Column(name = "payee_code")
|
||||
private String payeeCode;
|
||||
|
||||
@Column(name = "pay_amount")
|
||||
private BigDecimal payAmount;
|
||||
|
||||
@Column(name = "allocation_status")
|
||||
private Integer allocationStatus;
|
||||
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
package com.cool.store.entity.order;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table(name = "zxjp_store_order")
|
||||
public class StoreOrderDO {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@Column(name = "order_no")
|
||||
private String orderNo;
|
||||
|
||||
@Column(name = "shop_id")
|
||||
private Long shopId;
|
||||
|
||||
@Column(name = "line_id")
|
||||
private Long lineId;
|
||||
|
||||
@Column(name = "partner_name")
|
||||
private String partnerName;
|
||||
|
||||
@Column(name = "partner_mobile")
|
||||
private String partnerMobile;
|
||||
|
||||
@Column(name = "investment_manager")
|
||||
private String investmentManager;
|
||||
|
||||
@Column(name = "store_type_id")
|
||||
private Long storeTypeId;
|
||||
|
||||
@Column(name = "store_type_code")
|
||||
private String storeTypeCode;
|
||||
|
||||
@Column(name = "store_type_name")
|
||||
private String storeTypeName;
|
||||
|
||||
@Column(name = "store_type")
|
||||
private Integer storeType;
|
||||
|
||||
@Column(name = "brand")
|
||||
private String brand;
|
||||
|
||||
@Column(name = "franchise_fee")
|
||||
private BigDecimal franchiseFee;
|
||||
|
||||
@Column(name = "original_franchise_fee")
|
||||
private BigDecimal originalFranchiseFee;
|
||||
|
||||
@Column(name = "brand_usage_fee")
|
||||
private BigDecimal brandUsageFee;
|
||||
|
||||
@Column(name = "original_brand_usage_fee")
|
||||
private BigDecimal originalBrandUsageFee;
|
||||
|
||||
@Column(name = "management_fee")
|
||||
private BigDecimal managementFee;
|
||||
|
||||
@Column(name = "original_management_fee")
|
||||
private BigDecimal originalManagementFee;
|
||||
|
||||
@Column(name = "system_usage_fee")
|
||||
private BigDecimal systemUsageFee;
|
||||
|
||||
@Column(name = "original_system_usage_fee")
|
||||
private BigDecimal originalSystemUsageFee;
|
||||
|
||||
@Column(name = "contract_deposit")
|
||||
private BigDecimal contractDeposit;
|
||||
|
||||
@Column(name = "original_contract_deposit")
|
||||
private BigDecimal originalContractDeposit;
|
||||
|
||||
@Column(name = "design_fee")
|
||||
private BigDecimal designFee;
|
||||
|
||||
@Column(name = "original_design_fee")
|
||||
private BigDecimal originalDesignFee;
|
||||
|
||||
@Column(name = "first_order_fee")
|
||||
private BigDecimal firstOrderFee;
|
||||
|
||||
@Column(name = "store_fixed_amount")
|
||||
private BigDecimal storeFixedAmount;
|
||||
|
||||
@Column(name = "original_store_fixed_amount")
|
||||
private BigDecimal originalStoreFixedAmount;
|
||||
|
||||
@Column(name = "option_amount")
|
||||
private BigDecimal optionAmount;
|
||||
|
||||
@Column(name = "original_option_amount")
|
||||
private BigDecimal originalOptionAmount;
|
||||
|
||||
@Column(name = "total_amount")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
@Column(name = "original_total_amount")
|
||||
private BigDecimal originalTotalAmount;
|
||||
|
||||
@Column(name = "paid_amount")
|
||||
private BigDecimal paidAmount;
|
||||
|
||||
@Column(name = "unpaid_amount")
|
||||
private BigDecimal unpaidAmount;
|
||||
|
||||
@Column(name = "status")
|
||||
private Integer status;
|
||||
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
@Column(name = "pay_time")
|
||||
private Date payTime;
|
||||
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.cool.store.entity.order;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table(name = "zxjp_store_order_option_snapshot")
|
||||
public class StoreOrderOptionSnapshotDO {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@Column(name = "order_id")
|
||||
private Long orderId;
|
||||
|
||||
@Column(name = "shop_id")
|
||||
private Long shopId;
|
||||
|
||||
@Column(name = "store_type_id")
|
||||
private Long storeTypeId;
|
||||
|
||||
@Column(name = "option_id")
|
||||
private Long optionId;
|
||||
|
||||
@Column(name = "category_code")
|
||||
private String categoryCode;
|
||||
|
||||
@Column(name = "item_code")
|
||||
private String itemCode;
|
||||
|
||||
@Column(name = "option_code")
|
||||
private String optionCode;
|
||||
|
||||
@Column(name = "option_name")
|
||||
private String optionName;
|
||||
|
||||
@Column(name = "option_price")
|
||||
private BigDecimal optionPrice;
|
||||
|
||||
@Column(name = "original_option_price")
|
||||
private BigDecimal originalOptionPrice;
|
||||
|
||||
@Column(name = "option_remark")
|
||||
private String optionRemark;
|
||||
|
||||
@Column(name = "image_url")
|
||||
private String imageUrl;
|
||||
|
||||
@Column(name = "video_url")
|
||||
private String videoUrl;
|
||||
|
||||
@Column(name = "quantity")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Column(name = "amount")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Column(name = "original_amount")
|
||||
private BigDecimal originalAmount;
|
||||
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
@Column(name = "option_unit")
|
||||
private String optionUnit;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.cool.store.entity.order;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table(name = "zxjp_store_wishlist")
|
||||
public class StoreWishlistDO {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@Column(name = "line_id")
|
||||
private Long lineId;
|
||||
|
||||
@Column(name = "store_type_id")
|
||||
private Long storeTypeId;
|
||||
|
||||
@Column(name = "option_id")
|
||||
private Long optionId;
|
||||
|
||||
@Column(name = "quantity")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Column(name = "total_amount")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
@Column(name = "version_no")
|
||||
private String versionNo;
|
||||
|
||||
@Column(name = "deleted")
|
||||
private Integer deleted;
|
||||
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user