Merge #132 into master from revert-56b85c33-20f063dc

Revert commit "Merge #128 into master from cc_20250512_uploadRentContract

* revert-56b85c33-20f063dc: (1 commits squashed)

  - Revert commit "Merge #128 into master from cc_20250512_uploadRentContract
    
    This reverts change request#128

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/132
This commit is contained in:
正新
2026-05-12 09:56:16 +00:00
parent fcb6fb0770
commit 8caf3b1a6a
325 changed files with 262 additions and 14063 deletions

View File

@@ -231,11 +231,6 @@ public class RedisConstant {
public static final String PHONE_NUMBER= "phone_number_"; public static final String PHONE_NUMBER= "phone_number_";
public static final String ACCESS_TOKEN_CACHE_PREFIX = "liepin:access_token:{0}:{1}";
public static final String TOKEN_CACHE_PREFIX = "liepin:token:{0}:{1}";
public static final String LIE_PIN_EMP_PATH_PREFIX = "liepin:path:{0}:{1}";
/** /**
* MDM 省市区数据缓存 * MDM 省市区数据缓存
*/ */
@@ -357,11 +352,6 @@ public class RedisConstant {
*/ */
public static final String TP_PENALTY_APPLY_IMPORT_LOCK = "tp_penalty_apply_import_lock"; public static final String TP_PENALTY_APPLY_IMPORT_LOCK = "tp_penalty_apply_import_lock";
/**
* 合同导入锁
*/
public static final String CONTRACT_IMPORT_LOCK = "contract_import_lock";
/** /**
* 十二分审批按钮权限id * 十二分审批按钮权限id
*/ */
@@ -370,7 +360,6 @@ public class RedisConstant {
public static final String STANDARD_STORE_PAY_LOCK_KEY = "standard_store_pay_lock_key:{0}"; public static final String STANDARD_STORE_PAY_LOCK_KEY = "standard_store_pay_lock_key:{0}";
/** /**
* 拜访记录导出锁 * 拜访记录导出锁
*/ */

View File

@@ -8,8 +8,7 @@ package com.cool.store.enums;
*/ */
public enum ClaimStatusEnum { public enum ClaimStatusEnum {
TO_BE_CLAIMED(0,"待认领"), TO_BE_CLAIMED(0,"待认领"),
CLAIMED(1,"已认领"), CLAIMED(1,"已认领");
CLAIMED_FAIL(2,"认领失败");
private Integer code; private Integer code;
private String message; private String message;
ClaimStatusEnum(Integer code,String message){ ClaimStatusEnum(Integer code,String message){

View File

@@ -224,12 +224,6 @@ public enum ErrorCodeEnum {
SYSTEM_NAME_NOT__SUPPORT(109018, "请不要使用系统默认店名!", null), SYSTEM_NAME_NOT__SUPPORT(109018, "请不要使用系统默认店名!", null),
BANK_INFO_IS_EXIST(109017, "该区域已存在相同品牌,付款方式的银行信息!", null),
SHOP_REGION_NOT_EXIST(109018, "门店未选择所属大区!", null),
SHOP_FRANCHISE_BRAND_NOT_EXITS(109019, "门店未选择所属品牌!", null),
PAY_TYPE_NOT_EXIST(109020, "付款方式异常!", null),
RECEIVING_BANK_NOT_EXIST(109021, "未查询到该门店对应的收款银行信息", null),
THERE_ARE_SEVERAL_RECEIVING_BANK(109022, "该门店已存在多个收款银行信息!", null),
INSERT_OPENING_OPERATION_PLAN_AUDIT_FALSE(103001,"插入运营方案审核信息失败",null), INSERT_OPENING_OPERATION_PLAN_AUDIT_FALSE(103001,"插入运营方案审核信息失败",null),
INSERT_OPENING_OPERATION_PLAN_FALSE(103002,"插入运营方案失败",null), INSERT_OPENING_OPERATION_PLAN_FALSE(103002,"插入运营方案失败",null),
@@ -326,13 +320,9 @@ public enum ErrorCodeEnum {
STORE_MESSAGE_REVOKE(1610003,"当前门店消息已撤销,请务重复操作",null), STORE_MESSAGE_REVOKE(1610003,"当前门店消息已撤销,请务重复操作",null),
STORE_MESSAGE_HANDLED(1610004,"当前门店消息已处理,无法撤销!",null), STORE_MESSAGE_HANDLED(1610004,"当前门店消息已处理,无法撤销!",null),
MATTER_STORE_OR_USER_IS_NULL(1610005,"当前事项门店或者人员为空,发布失败,请确认!",null), MATTER_STORE_OR_USER_IS_NULL(1610005,"当前事项门店或者人员为空,发布失败,请确认!",null),
CONFIG_NOT_EXIST(1016006,"配置不存在或被禁用,请确认!",null), CONFIG_NOT_EXIST(1610006,"配置不存在或被禁用,请确认!",null),
MESSAGE_NOT_EXIST(1610007,"消息模板不存在或已被删除",null), MESSAGE_NOT_EXIST(1610007,"消息模板不存在或已被删除",null),
MESSAGE_NOT_HANDLED(1610008,"当前消息无需处理,请确认消息处理类型!",null), MESSAGE_NOT_HANDLED(1610008,"当前消息无需处理,请确认消息处理类型!",null),
FILE_ERROR(1610001,"文件解析失败",null),
MESSAGE_PUBLISH(1610009,"您选择通知任务正在发布中,请稍后重试!",null), MESSAGE_PUBLISH(1610009,"您选择通知任务正在发布中,请稍后重试!",null),
NOT_FLAGSHIP_STORE(16100005,"非直营店,无法跳过缴费阶段!",null), NOT_FLAGSHIP_STORE(16100005,"非直营店,无法跳过缴费阶段!",null),
@@ -343,6 +333,7 @@ public enum ErrorCodeEnum {
JOIN_MODE_NOT_ALLOW_OPERATE(1610012,"加盟部人员只能新建加盟店或联营店,请确认!",null), JOIN_MODE_NOT_ALLOW_OPERATE(1610012,"加盟部人员只能新建加盟店或联营店,请确认!",null),
STORE_NOT_FIND(1610013,"门店不存在",null), STORE_NOT_FIND(1610013,"门店不存在",null),
SHOP_NAME_INVALID(1610014, "门店名称包含禁止关键词",null), SHOP_NAME_INVALID(1610014, "门店名称包含禁止关键词",null),
CONTRACT_STAGE_NO_COMPLETE(1610015, "当前阶段无法分配运营顾问!",null),
CONFIG_OPTION_USED(1610015, "配置选项已被店型使用,无法删除", null), CONFIG_OPTION_USED(1610015, "配置选项已被店型使用,无法删除", null),
STORE_TYPE_OPTION_DEFAULT_DUPLICATE(1610016, "同一配置项下只能设置一个默认选项", null), STORE_TYPE_OPTION_DEFAULT_DUPLICATE(1610016, "同一配置项下只能设置一个默认选项", null),
@@ -380,8 +371,6 @@ public enum ErrorCodeEnum {
CONTRACT_STAGE_NO_COMPLETE(1610015, "当前阶段无法分配运营顾问!",null),
//装修 //装修
TEAM_USED(1612001,"该装修团队有门店使用,无法删除,请确认!",null), TEAM_USED(1612001,"该装修团队有门店使用,无法删除,请确认!",null),
CURRENT_BRAND_SORT_NUMBER_EXIST(1612002,"已存在该排序数字!",null), CURRENT_BRAND_SORT_NUMBER_EXIST(1612002,"已存在该排序数字!",null),
@@ -410,7 +399,6 @@ public enum ErrorCodeEnum {
WITHDRAW_APPLY_NOT_EXIST(1621011, "提现申请单不存在!", null), WITHDRAW_APPLY_NOT_EXIST(1621011, "提现申请单不存在!", null),
WITHDRAW_ING(1621012, "提现中,请勿重复分账!", null), WITHDRAW_ING(1621012, "提现中,请勿重复分账!", null),
WALLET_BALANCE_INSUFFICIENT(1621013, "钱包余额不足!", null), WALLET_BALANCE_INSUFFICIENT(1621013, "钱包余额不足!", null),
WALLET_OPEN_ACCOUNT_NO_BALANCE(1621014,"认款失败,该门店钱包余额不足!",null),
@@ -490,7 +478,10 @@ public enum ErrorCodeEnum {
WALLET_PAY_CANNOT_CANCEL(1830020, "该交易无法取消", null), WALLET_PAY_CANNOT_CANCEL(1830020, "该交易无法取消", null),
TOTAL_FEES_NEED_EQUAL(1830021, "分账总金额需与合计缴费金额一致", null), TOTAL_FEES_NEED_EQUAL(1830021, "分账总金额需与合计缴费金额一致", null),
NOT_EXIST_WANG_SHANG_ACCOUNT(1830022, "当前门店未开通网商钱包账户,请先开通!", null), NOT_EXIST_WANG_SHANG_ACCOUNT(1830022, "当前门店未开通网商钱包账户,请先开通!", null),
SIGNER_NOT_EQUAL_LEGAL_PERSON(1840023, "法人与签约人不一致", null), SIGNER_NOT_EQUAL_LEGAL_PERSON(1840022, "法人与签约人不一致", null),
IP_LIMIT(1840000, "IP访问次数超限", null),
CLOSE_UP_CLOSED_DOWN(1840000, "门店已歇业", null), CLOSE_UP_CLOSED_DOWN(1840000, "门店已歇业", null),
CLOSE_UP_ONLY_SUPPORT_OPEN(1840001, "仅支持在营门店发起歇业申请", null), CLOSE_UP_ONLY_SUPPORT_OPEN(1840001, "仅支持在营门店发起歇业申请", null),
@@ -504,40 +495,12 @@ public enum ErrorCodeEnum {
CLOSE_UP_EXIST_OPEN_APPLY(1840009, "该歇业申请单已存在开业申请", null), CLOSE_UP_EXIST_OPEN_APPLY(1840009, "该歇业申请单已存在开业申请", null),
CLOSE_UP_APPROVED(1840010, "该申请单已审批", null), CLOSE_UP_APPROVED(1840010, "该申请单已审批", null),
IP_LIMIT(1840000, "IP访问次数超限", null),
// 考试模块 190xxx
EXAM_QUESTION_NOT_EXIST(190001, "题目不存在", null),
EXAM_PAPER_NOT_EXIST(190002, "试卷不存在", null),
EXAM_INFO_NOT_EXIST(190003, "考试不存在", null),
EXAM_PAPER_STARTED_CANNOT_EDIT(190004, "试卷已开始考试,不可修改", null),
EXAM_NOT_PUBLISHED(190005, "考试未发布", null),
EXAM_ALREADY_ENDED(190006, "考试已结束", null),
EXAM_ATTEMPT_NOT_EXIST(190007, "答卷不存在", null),
EXAM_ATTEMPT_ALREADY_SUBMITTED(190008, "试卷已提交,请勿重复提交", null),
EXAM_ATTEMPT_EXPIRED(190009, "考试时间已到,已自动提交", null),
EXAM_TOKEN_INVALID(190010, "考试链接无效", null),
EXAM_ATTEMPT_IN_PROGRESS(190011, "您有正在进行的考试,请先完成", null),
EXAM_ALREADY_PUBLISHED(190012, "考试已发布,无法重复发布", null),
EXAM_NOT_STARTED(190013, "考试未开始", null),
EXAM_TIME_ENDED(190014, "考试时间已结束", null),
EXAM_IN_PROGRESS_CANNOT_DELETE(190015, "当前考试进行中,请先结束考试", null),
EXAM_COMPLETED(190016, "已完成该考试", null),
BONUS_EXIST_OVERLAP_RULE(1850000, "门店该有效期范围内存在相同类型的启用规则", null), BONUS_EXIST_OVERLAP_RULE(1850000, "门店该有效期范围内存在相同类型的启用规则", null),
BONUS_RULE_NOT_EXIST(1850001, "不存在该奖金发放规则", null), BONUS_RULE_NOT_EXIST(1850001, "不存在该奖金发放规则", null),
BONUS_RULE_NOT_CONFIG(1850002, "奖金规则或分配规则未配置", null), BONUS_RULE_NOT_CONFIG(1850002, "奖金规则或分配规则未配置", null),
BONUS_DISTRIBUTE_RATIO_OVER_100(1850003, "分配规则员工比例之和大于100", null), BONUS_DISTRIBUTE_RATIO_OVER_100(1850003, "分配规则员工比例之和大于100", null),
BONUS_PRODUCT_CONFIG_DUPLICATE(1850004, "奖金规则配置存在重复菜品", null), BONUS_PRODUCT_CONFIG_DUPLICATE(1850004, "奖金规则配置存在重复菜品", null),
BONUS_RULE_CONFIG_ERROR(1850005, "规则配置异常", null), BONUS_RULE_CONFIG_ERROR(1850005, "规则配置异常", null),
//续签
RENEWAL_CONTRACT_NOT_EXIST(1850000,"当前门店没有合同信息",null),
CURRENT_SHOP_EXIST_APPLY(1850002,"当前门店有正在续签的申请",null),
RENEWAL_APPLY_NOT_EXIST(1850003,"续签申请不存在",null),
; ;

View File

@@ -1,32 +0,0 @@
package com.cool.store.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 答卷状态枚举
*/
@Getter
@AllArgsConstructor
public enum ExamAttemptStatusEnum {
IN_PROGRESS(0, "进行中"),
COMPLETED(1, "已完成");
private final Integer code;
private final String desc;
/**
* 是否为进行中状态
*/
public static boolean isInProgress(Integer code) {
return IN_PROGRESS.getCode().equals(code);
}
/**
* 是否为已完成状态
*/
public static boolean isCompleted(Integer code) {
return COMPLETED.getCode().equals(code);
}
}

View File

@@ -1,69 +0,0 @@
package com.cool.store.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 考试信息状态枚举
*/
@Getter
@AllArgsConstructor
public enum ExamInfoStatusEnum {
UN_PUBLISHED(0, "未发布"),
PUBLISHED(1, "已发布"),
ENDED(2, "已结束");
private final Integer code;
private final String desc;
/**
* 根据code获取枚举
*/
public static ExamInfoStatusEnum getByCode(Integer code) {
if (code == null) {
return null;
}
for (ExamInfoStatusEnum statusEnum : values()) {
if (statusEnum.getCode().equals(code)) {
return statusEnum;
}
}
return null;
}
/**
* 是否为未发布状态
*/
public static boolean isUnPublished(Integer code) {
return UN_PUBLISHED.getCode().equals(code);
}
/**
* 是否为已发布状态
*/
public static boolean isPublished(Integer code) {
return PUBLISHED.getCode().equals(code);
}
/**
* 是否为已结束状态
*/
public static boolean isEnded(Integer code) {
return ENDED.getCode().equals(code);
}
/**
* 是否可以发布(只有未发布状态可以发布)
*/
public static boolean canPublish(Integer code) {
return isUnPublished(code);
}
/**
* 是否可以结束(只有已发布状态可以结束)
*/
public static boolean canEnd(Integer code) {
return isPublished(code);
}
}

View File

@@ -27,7 +27,6 @@ public enum FileTypeEnum {
IMPORT_FITMENT_SHOP_STAGE_DATA_ERROR_LIST("OaOldShopStageDataErrorList", "导入装修阶段完成数据错误列表 "), IMPORT_FITMENT_SHOP_STAGE_DATA_ERROR_LIST("OaOldShopStageDataErrorList", "导入装修阶段完成数据错误列表 "),
SELLING_DETAILS_REPORT("sellingDetailsReport", "开店明细报表"), SELLING_DETAILS_REPORT("sellingDetailsReport", "开店明细报表"),
PRE_FRY_QUALIFICATION_APPLY_EXPORT("preFryQualificationApplyExport", "预炸品资质申请导出"), PRE_FRY_QUALIFICATION_APPLY_EXPORT("preFryQualificationApplyExport", "预炸品资质申请导出"),
RECEIVING_BANK_IMPORT("Receiving_Bank_Import", "收款银行配置导入"),
TP_PENALTY_IMPORT("tpPenaltyImport", "十二分惩处申请单导入"), TP_PENALTY_IMPORT("tpPenaltyImport", "十二分惩处申请单导入"),
TP_PENALTY_ERROR_EXPORT("tpPenaltyErrorExport", "十二分惩处申请单导入错误列表"), TP_PENALTY_ERROR_EXPORT("tpPenaltyErrorExport", "十二分惩处申请单导入错误列表"),
VISIT_RECORD_EXPORT("visitRecordExport", "拜访记录列表"), VISIT_RECORD_EXPORT("visitRecordExport", "拜访记录列表"),
@@ -39,8 +38,6 @@ public enum FileTypeEnum {
ADJUSTMENT_ORDER_EXPORT("adjustmentOrderExport", "费用调整单导出"), ADJUSTMENT_ORDER_EXPORT("adjustmentOrderExport", "费用调整单导出"),
EXPENSE_ORDER_EXPORT("expenseOrderExport", "费用单导出"), EXPENSE_ORDER_EXPORT("expenseOrderExport", "费用单导出"),
SPLIT_ORDER_EXPORT("splitOrderExport", "分账单导出"), SPLIT_ORDER_EXPORT("splitOrderExport", "分账单导出"),
CONTRACT_IMPORT("contractImport", "合同导入"),
CONTRACT_ERROR_EXPORT("contractErrorExport", "合同导入错误列表"),
; ;
private String fileType; private String fileType;
private String desc; private String desc;

View File

@@ -104,16 +104,4 @@ public enum FranchiseBrandEnum {
} }
return null; return null;
} }
public static Integer getCodeByDesc(String desc) {
if (StringUtils.isBlank(desc)){
return null;
}
for (FranchiseBrandEnum e : FranchiseBrandEnum.values()) {
if (desc.equals(e.getDesc())) {
return e.getCode();
}
}
return null;
}
} }

View File

@@ -1,25 +0,0 @@
package com.cool.store.enums;
/**
* @Author: WangShuo
* @Date: 2025/06/13/15:08
* @Version 1.0
* @注释:
*/
public enum IsRefundEnum {
NOT_REFUND(0, "未退款"),
REFUND(1, "已退款");
private Integer code;
private String message;
IsRefundEnum(Integer code, String message) {
this.code = code;
this.message = message;
}
public Integer getCode() {
return code;
}
public String getMessage() {
return message;
}
}

View File

@@ -1,31 +0,0 @@
package com.cool.store.enums;
/**
* @Author: WangShuo
* @Date: 2025/06/16/14:08
* @Version 1.0
* @注释:
*/
public enum PayStatusEnum {
WAIT_PAY_45(45,"待支付"),
FEES_HAVE_BEEN_PAID_50(50,"已缴费"),
PAY_FAIL_55(55,"缴费失败"),
CANCELED(60,"已取消");
private Integer code;
private String message;
PayStatusEnum(Integer code, String message) {
this.code = code;
this.message = message;
}
public Integer getCode() {
return code;
}
public String getMessage() {
return message;
}
}

View File

@@ -39,8 +39,6 @@ public enum RocketMqGroupEnum {
STORE_MASTER_ISSUE("store_master_issue", new ArrayList<>(Arrays.asList(RocketMqTagEnum.STORE_MASTER_ISSUE))), STORE_MASTER_ISSUE("store_master_issue", new ArrayList<>(Arrays.asList(RocketMqTagEnum.STORE_MASTER_ISSUE))),
VISIT_RECORD_INVALID("visit_record_invalid", new ArrayList<>(Arrays.asList(RocketMqTagEnum.VISIT_RECORD_INVALID))), VISIT_RECORD_INVALID("visit_record_invalid", new ArrayList<>(Arrays.asList(RocketMqTagEnum.VISIT_RECORD_INVALID))),
TP_PENALTY_APPEAL_OVERDUE("tp_penalty_appeal_overdue", new ArrayList<>(Arrays.asList(RocketMqTagEnum.TP_PENALTY_APPEAL_OVERDUE))), TP_PENALTY_APPEAL_OVERDUE("tp_penalty_appeal_overdue", new ArrayList<>(Arrays.asList(RocketMqTagEnum.TP_PENALTY_APPEAL_OVERDUE))),
EXAM_AUTO_SUBMIT("exam_auto_submit", new ArrayList<>(Arrays.asList(RocketMqTagEnum.EXAM_AUTO_SUBMIT))),
EXAM_AUTO_END("exam_auto_end", new ArrayList<>(Arrays.asList(RocketMqTagEnum.EXAM_AUTO_END))),
CLOSE_UP_APPLY_STORE_UPDATE("close_up_apply_store_update", new ArrayList<>(Arrays.asList(RocketMqTagEnum.CLOSE_UP_APPLY_STORE_UPDATE))), CLOSE_UP_APPLY_STORE_UPDATE("close_up_apply_store_update", new ArrayList<>(Arrays.asList(RocketMqTagEnum.CLOSE_UP_APPLY_STORE_UPDATE))),
CLOSE_UP_PLAN_OPEN_STORE("close_up_plan_open_store", new ArrayList<>(Arrays.asList(RocketMqTagEnum.CLOSE_UP_PLAN_OPEN_STORE))), CLOSE_UP_PLAN_OPEN_STORE("close_up_plan_open_store", new ArrayList<>(Arrays.asList(RocketMqTagEnum.CLOSE_UP_PLAN_OPEN_STORE))),
; ;

View File

@@ -23,8 +23,6 @@ public enum RocketMqTagEnum {
STORE_MASTER_ISSUE("store_master_issue","门店主数据下发"), STORE_MASTER_ISSUE("store_master_issue","门店主数据下发"),
VISIT_RECORD_INVALID("visit_record_invalid", "拜访记录失效"), VISIT_RECORD_INVALID("visit_record_invalid", "拜访记录失效"),
TP_PENALTY_APPEAL_OVERDUE("tp_penalty_appeal_overdue", "十二分惩处单复议逾期"), TP_PENALTY_APPEAL_OVERDUE("tp_penalty_appeal_overdue", "十二分惩处单复议逾期"),
EXAM_AUTO_SUBMIT("exam_auto_submit", "考试自动提交"),
EXAM_AUTO_END("exam_auto_end", "考试自动结束"),
CLOSE_UP_APPLY_STORE_UPDATE("close_up_apply_store_update", "歇业申请修改门店状态"), CLOSE_UP_APPLY_STORE_UPDATE("close_up_apply_store_update", "歇业申请修改门店状态"),
CLOSE_UP_PLAN_OPEN_STORE("close_up_plan_open_store", "歇业申请计划开店"), CLOSE_UP_PLAN_OPEN_STORE("close_up_plan_open_store", "歇业申请计划开店"),
; ;

View File

@@ -1,28 +0,0 @@
package com.cool.store.enums.approval;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 审批结果枚举
*/
@Getter
@AllArgsConstructor
public enum ApprovalResultEnum {
PASS("pass", "通过"),
REJECT("reject", "拒绝"),
;
private final String result;
private final String name;
public static ApprovalResultEnum getByResult(String result) {
for (ApprovalResultEnum value : values()) {
if (value.getResult().equals(result)) {
return value;
}
}
return null;
}
}

View File

@@ -1,8 +1,5 @@
package com.cool.store.enums.point; package com.cool.store.enums.point;
import com.cool.store.utils.StringUtil;
import org.apache.commons.lang3.StringUtils;
/** /**
* @Auther: WangShuo * @Auther: WangShuo
* @Date: 2024/04/29/上午9:45 * @Date: 2024/04/29/上午9:45
@@ -12,7 +9,7 @@ import org.apache.commons.lang3.StringUtils;
public enum PayTypeEnum { public enum PayTypeEnum {
WX_PAY(1,"微信支付"), WX_PAY(1,"微信支付"),
BANK_PAY(2,"银行转账"), BANK_PAY(2,"银行转账"),
ONLINE_PAY(3,"加盟"), ONLINE_PAY(3,"线上支"),
OFFLINE_PAY(4,"线下支付"); OFFLINE_PAY(4,"线下支付");
private Integer code; private Integer code;
@@ -30,16 +27,4 @@ public enum PayTypeEnum {
public String getDesc() { public String getDesc() {
return desc; return desc;
} }
public static Integer getCodeByDesc(String desc){
if (StringUtils.isBlank(desc)){
return null ;
}
for (PayTypeEnum value : PayTypeEnum.values()) {
if(value.getDesc().equals(desc)){
return value.getCode();
}
}
return null;
}
} }

View File

@@ -12,7 +12,6 @@ public enum ShopStageEnum {
SHOP_STAGE_1(1, "选址"), SHOP_STAGE_1(1, "选址"),
SHOP_STAGE_2(2, "筹建"), SHOP_STAGE_2(2, "筹建"),
SHOP_STAGE_3(3, "平台建店"), SHOP_STAGE_3(3, "平台建店"),
SHOP_STAGE_4(4, "开业筹备"),
; ;
//店铺阶段 //店铺阶段

View File

@@ -25,7 +25,7 @@ public enum ShopSubStageEnum {
SHOP_STAGE_9(ShopStageEnum.SHOP_STAGE_2, 90, "设计阶段", 14), SHOP_STAGE_9(ShopStageEnum.SHOP_STAGE_2, 90, "设计阶段", 14),
SHOP_STAGE_11(ShopStageEnum.SHOP_STAGE_2, 110, "施工阶段", 25), SHOP_STAGE_11(ShopStageEnum.SHOP_STAGE_2, 110, "施工阶段", 25),
SHOP_STAGE_12(ShopStageEnum.SHOP_STAGE_2, 120, "装修验收", 27), SHOP_STAGE_12(ShopStageEnum.SHOP_STAGE_2, 120, "装修验收", 27),
SHOP_STAGE_14(ShopStageEnum.SHOP_STAGE_4, 140, "开业运营方案", 28), SHOP_STAGE_14(ShopStageEnum.SHOP_STAGE_2, 140, "开业运营方案", 28),
SHOP_STAGE_15(ShopStageEnum.SHOP_STAGE_2, 150, "建店资料收集", 9), SHOP_STAGE_15(ShopStageEnum.SHOP_STAGE_2, 150, "建店资料收集", 9),
SHOP_STAGE_16(ShopStageEnum.SHOP_STAGE_2, 160, "POS开通", 10), SHOP_STAGE_16(ShopStageEnum.SHOP_STAGE_2, 160, "POS开通", 10),

View File

@@ -84,7 +84,9 @@ public enum ShopSubStageStatusEnum {
SHOP_SUB_STAGE_STATUS_123(ShopSubStageEnum.SHOP_STAGE_12, 1230, "已验收", Boolean.TRUE), SHOP_SUB_STAGE_STATUS_123(ShopSubStageEnum.SHOP_STAGE_12, 1230, "已验收", Boolean.TRUE),
//开业运营方案 //开业运营方案
SHOP_SUB_STAGE_STATUS_140(ShopSubStageEnum.SHOP_STAGE_14, 1400, "督导提交", Boolean.FALSE), SHOP_SUB_STAGE_STATUS_140(ShopSubStageEnum.SHOP_STAGE_14, 1400, "上传", Boolean.FALSE),
SHOP_SUB_STAGE_STATUS_141(ShopSubStageEnum.SHOP_STAGE_14, 1420, "待审核", Boolean.FALSE),
SHOP_SUB_STAGE_STATUS_142(ShopSubStageEnum.SHOP_STAGE_14, 1430,"审核不通过", Boolean.FALSE),
SHOP_SUB_STAGE_STATUS_143(ShopSubStageEnum.SHOP_STAGE_14, 1440, "已完成", Boolean.TRUE), SHOP_SUB_STAGE_STATUS_143(ShopSubStageEnum.SHOP_STAGE_14, 1440, "已完成", Boolean.TRUE),
//平台资料提交 //平台资料提交

View File

@@ -1,55 +0,0 @@
package com.cool.store.enums.renewal;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 续签审批节点枚举
*/
@Getter
@AllArgsConstructor
public enum RenewalNodeEnum {
FRANCHISEE_CONFIRM("10", "加盟商确认"),
OPS_CONSULTANT("20", "运营顾问审核"),
REGION_CONSULTANT("25", "片区顾问审核"),
GROUP_ENGINEERING("30", "集团工程部审核"),
;
private final String code;
private final String name;
public static RenewalNodeEnum getByCode(String code) {
for (RenewalNodeEnum value : values()) {
if (value.getCode().equals(code)) {
return value;
}
}
return null;
}
/**
* 获取下一个审批节点code
*/
public static String getNextNode(String currentCode) {
RenewalNodeEnum current = getByCode(currentCode);
if (current == null) {
return null;
}
switch (current) {
case FRANCHISEE_CONFIRM:
return OPS_CONSULTANT.getCode();
case OPS_CONSULTANT:
return REGION_CONSULTANT.getCode();
case REGION_CONSULTANT:
return GROUP_ENGINEERING.getCode();
default:
return null;
}
}
public static String getNameByCode(String code) {
RenewalNodeEnum e = getByCode(code);
return e != null ? e.getName() : null;
}
}

View File

@@ -1,68 +0,0 @@
package com.cool.store.enums.renewal;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 续签申请状态枚举
*/
@Getter
@AllArgsConstructor
public enum RenewalStatusEnum {
PENDING_FRANCHISEE(10, "待加盟商确认"),
PENDING_OPS(20, "待运营顾问审核"),
PENDING_REGION(25, "待片区顾问审核"),
PENDING_GROUP(30, "待集团工程部审核"),
REJECTED(40, "审批拒绝"),
RENEWAL_ING(50, "续签中"),
COMPLETED(60, "已完成"),
NOT_RENEWED(70, "不续签"),
;
private final Integer status;
private final String name;
public static RenewalStatusEnum getByStatus(Integer status) {
for (RenewalStatusEnum value : values()) {
if (value.getStatus().equals(status)) {
return value;
}
}
return null;
}
public static String getNameByStatus(Integer status) {
RenewalStatusEnum e = getByStatus(status);
return e != null ? e.getName() : null;
}
/**
* 获取下一个审批通过状态
*/
public static Integer getNextPassStatus(Integer status) {
RenewalStatusEnum current = getByStatus(status);
if (current == null) {
throw new IllegalArgumentException("续签申请状态为空");
}
switch (current) {
case PENDING_FRANCHISEE:
return PENDING_OPS.getStatus();
case PENDING_OPS:
return PENDING_REGION.getStatus();
case PENDING_REGION:
return PENDING_GROUP.getStatus();
case PENDING_GROUP:
return COMPLETED.getStatus();
default:
return null;
}
}
public static boolean isApprove(Integer status) {
return PENDING_FRANCHISEE.getStatus().equals(status)
|| PENDING_OPS.getStatus().equals(status)
|| PENDING_REGION.getStatus().equals(status)
|| PENDING_GROUP.getStatus().equals(status);
}
}

View File

@@ -1,8 +1,5 @@
package com.cool.store.enums.wallet; package com.cool.store.enums.wallet;
import java.util.Arrays;
import java.util.List;
/** /**
* @Auther zx_szh * @Auther zx_szh
* @Date 2026/4/9 09:35 * @Date 2026/4/9 09:35
@@ -11,9 +8,7 @@ import java.util.List;
public enum DocStatusEnum { public enum DocStatusEnum {
//10-待充值/20-已充值待认款/30-认款完成/40-分部分账/50-分账完成 //10-待充值/20-已充值待认款/30-认款完成/40-分部分账/50-分账完成
DOC_STATUS_05(5,"待审批"),
DOC_STATUS_1(10,"待充值"), DOC_STATUS_1(10,"待充值"),
DOC_STATUS_15(15,"审批未通过"),
DOC_STATUS_2(20,"已充值待认款"), DOC_STATUS_2(20,"已充值待认款"),
DOC_STATUS_3(30,"认款完成"), DOC_STATUS_3(30,"认款完成"),
DOC_STATUS_4(40,"部分分账"), DOC_STATUS_4(40,"部分分账"),
@@ -37,9 +32,6 @@ public enum DocStatusEnum {
return desc; return desc;
} }
public static List<Integer> getCanDeleteStatus(){
return Arrays.asList(DOC_STATUS_05.getStatus(),DOC_STATUS_1.getStatus(),DOC_STATUS_2.getStatus());
}
public static DocStatusEnum fromStatus(Integer status) { public static DocStatusEnum fromStatus(Integer status) {
for (DocStatusEnum item : values()) { for (DocStatusEnum item : values()) {

View File

@@ -50,9 +50,4 @@ public class GenerateNoUtil {
return SPLIT_ORDER_PREFIX + GenerateNoUtil.generateMillsNoWithRandom(); return SPLIT_ORDER_PREFIX + GenerateNoUtil.generateMillsNoWithRandom();
} }
public static Long generateVersion() {
DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern(DATE_FORMAT_SEC_9);
return Long.valueOf(LocalDateTime.now().format(dateFormatter));
}
} }

View File

@@ -1,42 +0,0 @@
package com.cool.store.utils;
import org.apache.tika.io.IOUtils;
import java.io.InputStream;
import java.net.URL;
import java.util.Base64;
/**
* @Author suzhuhong
* @Date 2025/5/23 17:30
* @Version 1.0
*/
public class OssUtil {
/**
* 公用oss链接转为base64
* @param ossUrl
* @return
*/
public static String convertPublicOssUrlToBase64(String ossUrl) {
try (InputStream in = new URL(ossUrl).openStream()) {
byte[] fileBytes = IOUtils.toByteArray(in);
return Base64.getEncoder().encodeToString(fileBytes);
} catch (Exception e) {
throw new RuntimeException("Failed to convert OSS URL to Base64", e);
}
}
/**
* 获取oss链接文件名
* @param ossUrl
* @return
*/
public static String getUrlName(String ossUrl){
if (StringUtil.isEmpty(ossUrl)){
return "";
}
return ossUrl.substring(ossUrl.lastIndexOf("/") + 1);
}
}

View File

@@ -1,66 +0,0 @@
package com.cool.store.utils;
import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2025/6/11 13:59
* @Version 1.0
*/
public class RealIpUtils {
// 常见代理服务器IP头按优先级排序
private static final List<String> IP_HEADERS = Arrays.asList(
"X-Real-IP",
"X-Forwarded-For",
"Proxy-Client-IP",
"WL-Proxy-Client-IP",
"HTTP_CLIENT_IP",
"HTTP_X_FORWARDED_FOR"
);
/**
* 获取客户端真实IP地址
* @param request HttpServletRequest对象
* @return 可能的最接近客户端的IP地址
*/
public static String getRealClientIp(HttpServletRequest request) {
// 1. 检查所有可能的代理头
for (String header : IP_HEADERS) {
String ip = request.getHeader(header);
if (isValidIp(ip)) {
return getFirstValidIp(ip);
}
}
// 2. 没有代理头时使用remoteAddr
String remoteAddr = request.getRemoteAddr();
// 3. 处理IPv6本地地址
if ("0:0:0:0:0:0:0:1".equals(remoteAddr) || "::1".equals(remoteAddr)) {
return "127.0.0.1";
}
return remoteAddr;
}
private static boolean isValidIp(String ip) {
return ip != null && !ip.isEmpty() && !"unknown".equalsIgnoreCase(ip);
}
private static String getFirstValidIp(String ipChain) {
if (ipChain.contains(",")) {
// 可能有多个IPX-Forwarded-For: client,proxy1,proxy2
String[] ips = ipChain.split(",");
for (String ip : ips) {
String trimmedIp = ip.trim();
if (isValidIp(trimmedIp)) {
return trimmedIp;
}
}
}
return ipChain.trim();
}
}

View File

@@ -19,7 +19,7 @@ import java.text.MessageFormat;
public class RedisConstantUtil { public class RedisConstantUtil {
@Value("${spring.profiles.active}") @Value("${spring.profiles.active}")
private String active; private String active;
@Value("${mybatis.configuration.variables.enterpriseId}") @Value("${mybatis.configuration.variables.enterpriseId}")
private String eid; private String eid;
@@ -115,17 +115,6 @@ public class RedisConstantUtil {
return active + "_" + RedisConstant.GET_AI_MODULE + eid; return active + "_" + RedisConstant.GET_AI_MODULE + eid;
} }
/**
* 获取key的通用方法
* @param prefix
* @param args
* @return
*/
public String getKeyCommonMethod(String prefix,String... args){
return active + "_" + MessageFormat.format(prefix,args) ;
}
public String getPaymentReceiptCode(String today){ public String getPaymentReceiptCode(String today){
return active + "_" + MessageFormat.format(RedisConstant.REDIS_KEY_PREFIX, today); return active + "_" + MessageFormat.format(RedisConstant.REDIS_KEY_PREFIX, today);
} }

View File

@@ -1,113 +0,0 @@
package com.cool.store.utils;
import cn.hutool.core.net.URLEncodeUtil;
import cn.hutool.core.net.url.UrlQuery;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.digest.DigestAlgorithm;
import cn.hutool.crypto.digest.Digester;
import java.nio.charset.StandardCharsets;
import java.util.TreeMap;
/**
* 猎聘薪超人 签名工具类
* @Author suzhuhong
* @Date 2025/5/20 15:53
* @Version 1.0
*/
public class SuperPaySignature {
private static final Digester SHA256 = new Digester(DigestAlgorithm.SHA256);
/**
* 生成请求签名
* @param httpMethod 请求方法大写POST
* @param uri 接口路径 如:/api/v1/order
* @param queryString 原始查询字符串 如name=张三&age=30
* @param appId 应用ID 如1724436445613182976
* @param requestBody 请求体内容
* @param nonce 随机数 如UUID
* @param timestamp 时间戳(毫秒)
* @param secretKey 密钥
* @return 签名值
*/
public static String generateSignature(String httpMethod,
String uri,
String queryString,
String appId,
byte[] requestBody,
String nonce,
long timestamp,
String secretKey) {
// 1. 规范化QueryString
String canonicalizedQuery = canonicalizeQueryString(queryString);
// 2. 计算请求体哈希
String payloadHash = calculatePayloadHash(requestBody);
// 3. 构建签名字符串
String signatureString = buildSignatureString(
httpMethod,
uri,
canonicalizedQuery,
appId,
payloadHash,
nonce,
timestamp,
secretKey);
// 4. 计算SHA256签名
return SHA256.digestHex(signatureString);
}
private static String canonicalizeQueryString(String queryString) {
if (StrUtil.isBlank(queryString)) {
return "";
}
UrlQuery urlQuery = UrlQuery.of(queryString, StandardCharsets.UTF_8);
TreeMap<String, String> sortedParams = new TreeMap<>();
urlQuery.getQueryMap().forEach((k, v) -> {
String encodedKey = URLEncodeUtil.encode(k.toString(), StandardCharsets.UTF_8);
String encodedValue = URLEncodeUtil.encode(v.toString(), StandardCharsets.UTF_8);
sortedParams.put(encodedKey, encodedValue);
});
StringBuilder sb = new StringBuilder();
sortedParams.forEach((k, v) -> {
if (sb.length() > 0) {
sb.append("&");
}
sb.append(k).append("=").append(v);
});
return sb.toString();
}
private static String calculatePayloadHash(byte[] requestBody) {
if (ArrayUtil.isEmpty(requestBody)) {
return "";
}
return SHA256.digestHex(requestBody);
}
private static String buildSignatureString(String httpMethod,
String uri,
String canonicalizedQuery,
String appId,
String payloadHash,
String nonce,
long timestamp,
String secretKey) {
return String.join("\n",
httpMethod.toUpperCase(),
uri,
canonicalizedQuery,
appId,
payloadHash,
nonce,
String.valueOf(timestamp),
secretKey
);
}
}

View File

@@ -1,89 +0,0 @@
package com.cool.store.utils.hire;
import cn.hutool.core.codec.Base64Decoder;
import cn.hutool.core.codec.Base64Encoder;
import cn.hutool.core.util.StrUtil;
import com.cool.store.exception.ServiceException;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.StandardCharsets;
public class XbbAesUtil {
/**
* 算法/加密模式/填充方式
*/
private static final String AES_PKCS5P = "AES/ECB/PKCS5Padding";
/**
* 加密
*
* @param str 需要加密的字符串
* @param key 密钥
* @return
* @throws Exception
*/
public static String encrypt(String str, String key) {
if (StrUtil.isEmpty(key)) {
throw new ServiceException("key不能为空");
}
try {
if (str == null) {
return null;
}
// 判断Key是否为16位
if (key.length() != 16) {
return null;
}
byte[] raw = key.getBytes(StandardCharsets.UTF_8);
SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
// "算法/模式/补码方式"
Cipher cipher = Cipher.getInstance(AES_PKCS5P);
cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
byte[] encrypted = cipher.doFinal(str.getBytes(StandardCharsets.UTF_8));
// 此处使用BASE64做转码功能同时能起到2次加密的作用。
return Base64Encoder.encode(encrypted);
} catch (Exception ex) {
return null;
}
}
/**
* 解密
*
* @param str 需要解密的字符串
* @param key 密钥
* @return
*/
public static String decrypt(String str, String key) {
if (StrUtil.isEmpty(key)) {
throw new ServiceException("key不能为空");
}
try {
if (str == null) {
return null;
}
// 判断Key是否为16位
if (key.length() != 16) {
return null;
}
byte[] raw = key.getBytes(StandardCharsets.UTF_8);
SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
Cipher cipher = Cipher.getInstance(AES_PKCS5P);
cipher.init(Cipher.DECRYPT_MODE, skeySpec);
// 先用base64解密
byte[] encrypted = Base64Decoder.decode(str);
try {
byte[] original = cipher.doFinal(encrypted);
return new String(original, StandardCharsets.UTF_8);
} catch (Exception e) {
return null;
}
} catch (Exception ex) {
return null;
}
}
}

View File

@@ -1,146 +0,0 @@
package com.cool.store.utils.hire;
import cn.hutool.core.net.url.UrlQuery;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.digest.DigestAlgorithm;
import cn.hutool.crypto.digest.Digester;
import java.nio.charset.StandardCharsets;
import java.util.Map;
import java.util.TreeMap;
/**
* 签名信息
*
* @author XBB-OpenAPI
* @since 2025-03-27
*/
public class XbbSignatureInfo {
private String httpMethod;
private String uri;
private String queryString;
private String appId;
private byte[] requestPayload;
private String nonce;
private long timestamp;
private String aesSecretkey;
public static XbbSignatureInfo createGet() {
return new XbbSignatureInfo().setHttpMethod("GET");
}
public static XbbSignatureInfo createPost() {
return new XbbSignatureInfo().setHttpMethod("POST");
}
public String toCanonicalizedQueryString(String queryString) {
if (StrUtil.isBlank(queryString)) {
return "";
}
UrlQuery urlQuery = UrlQuery.of(queryString, StandardCharsets.UTF_8);
Map<CharSequence, CharSequence> queryMap = urlQuery.getQueryMap();
TreeMap<String, String> sortedMap = new TreeMap<>();
queryMap.forEach((k, v) -> sortedMap.put(k.toString(), v.toString()));
return new UrlQuery(sortedMap, true).build(StandardCharsets.UTF_8);
}
public String toPayloadStr() {
if (ArrayUtil.isEmpty(requestPayload)) {
return "";
}
return new Digester(DigestAlgorithm.SHA256).digestHex(requestPayload);
}
public String toSignatureStr() {
return httpMethod + '\n'
+ uri + '\n'
+ toCanonicalizedQueryString(queryString) + '\n'
+ appId + '\n'
+ toPayloadStr() + '\n'
+ nonce + '\n'
+ timestamp + '\n'
+ aesSecretkey;
}
// 生成放在请求头的签名
public String toSignature() {
return new Digester(DigestAlgorithm.SHA256).digestHex(toSignatureStr());
}
// getter setter
public String getAppId() {
return appId;
}
public XbbSignatureInfo setAppId(String appId) {
this.appId = appId;
return this;
}
public String getHttpMethod() {
return httpMethod;
}
public XbbSignatureInfo setHttpMethod(String httpMethod) {
this.httpMethod = httpMethod;
return this;
}
public String getUri() {
return uri;
}
public XbbSignatureInfo setUri(String uri) {
this.uri = uri;
return this;
}
public String getQueryString() {
return queryString;
}
public XbbSignatureInfo setQueryString(String queryString) {
this.queryString = queryString;
return this;
}
public byte[] getRequestPayload() {
return requestPayload;
}
public XbbSignatureInfo setRequestPayload(byte[] requestPayload) {
this.requestPayload = requestPayload;
return this;
}
public String getNonce() {
return nonce;
}
public XbbSignatureInfo setNonce(String nonce) {
this.nonce = nonce;
return this;
}
public long getTimestamp() {
return timestamp;
}
public XbbSignatureInfo setTimestamp(long timestamp) {
this.timestamp = timestamp;
return this;
}
public String getAesSecretkey() {
return aesSecretkey;
}
public XbbSignatureInfo setAesSecretkey(String aesSecretkey) {
this.aesSecretkey = aesSecretkey;
return this;
}
}

View File

@@ -12,10 +12,8 @@ import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example; import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@@ -29,16 +27,8 @@ public class BigRegionDAO {
@Resource @Resource
BigRegionMapper bigRegionMapper; BigRegionMapper bigRegionMapper;
public List<BigRegionDTO> queryAllBigRegion(String keyword, Integer joinBrand,Integer type,Integer enable){ public List<BigRegionDTO> queryAllBigRegion(String keyword, Integer joinBrand,Integer type){
return bigRegionMapper.queryAllBigRegion(keyword, joinBrand,type,enable); return bigRegionMapper.queryAllBigRegion(keyword, joinBrand,type);
}
public Map<Long,BigRegionDO> getMapByRegionIds(List<Long> regionIdList){
if (CollectionUtils.isEmpty(regionIdList)){
return new HashMap<>();
}
List<BigRegionDO> bigRegionDOList = bigRegionMapper.getByRegionIdList(regionIdList);
return bigRegionDOList.stream().collect(Collectors.toMap(BigRegionDO::getRegionId, bigRegionDO -> bigRegionDO));
} }
public BigRegionDO queryOrgInfoByBigRegionAndJoinMode(Long regionId, Integer joinMode){ public BigRegionDO queryOrgInfoByBigRegionAndJoinMode(Long regionId, Integer joinMode){

View File

@@ -8,7 +8,6 @@ import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example; import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@@ -115,8 +114,4 @@ public class LinePayDAO {
} }
return linePayMapper.deleteByShopId(shopIds); return linePayMapper.deleteByShopId(shopIds);
} }
public Integer updateAmountAndPayUserName(Long id, BigDecimal amount, String payUserName, String userId){
return linePayMapper.updateAmountAndPayUserName(id,amount,payUserName,userId);
}
} }

View File

@@ -5,12 +5,10 @@ import com.cool.store.entity.OpeningOperationPlanDO;
import com.cool.store.mapper.OpeningOperationPlanMapper; import com.cool.store.mapper.OpeningOperationPlanMapper;
import com.cool.store.request.PlanListRequest; import com.cool.store.request.PlanListRequest;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@@ -54,11 +52,5 @@ public class OpeningOperationPlanDAO {
return openingOperationPlanMapper.selectByShopId(shopId); return openingOperationPlanMapper.selectByShopId(shopId);
} }
public List<OpeningOperationPlanDO> selectByShopIds( List<Long> shopIds){
if (CollectionUtils.isEmpty(shopIds)){
return new ArrayList<>();
}
return openingOperationPlanMapper.selectByShopIds(shopIds);
}
} }

View File

@@ -1,66 +0,0 @@
package com.cool.store.dao;
import com.cool.store.entity.ReceivingBankDO;
import com.cool.store.mapper.ReceivingBankMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/**
* @Author: WangShuo
* @Date: 2025/06/18/17:34
* @Version 1.0
* @注释:
*/
@Slf4j
@Repository
public class ReceivingBankDAO {
@Resource
private ReceivingBankMapper receivingBankMapper;
public Integer insertSelective(ReceivingBankDO receivingBankDO){
return receivingBankMapper.insertSelective(receivingBankDO);
}
public List<ReceivingBankDO> getByFranchiseBrandAndRegionId(List<String> franchiseBrandList,List<Long> regionIdList){
return receivingBankMapper.getByFranchiseBrandAndRegionId(franchiseBrandList,regionIdList);
}
public Integer updateByPrimaryKeySelective(ReceivingBankDO receivingBankDO){
return receivingBankMapper.updateByPrimaryKeySelective(receivingBankDO);
}
public Integer batchInsert(List<ReceivingBankDO> list){
return receivingBankMapper.batchInsert(list);
}
public List<ReceivingBankDO> queryAll(){
Example example = new Example(ReceivingBankDO.class);
example.createCriteria().andEqualTo("deleted",false);
List<ReceivingBankDO> receivingBankDOS = receivingBankMapper.selectByExample(example);
if (receivingBankDOS == null){
return new ArrayList<>();
}
return receivingBankDOS;
}
public List<ReceivingBankDO> getByRegionAndFranchiseBrandAndPayType(Long regionId,Integer franchiseBrand,Integer payType){
Example example = new Example(ReceivingBankDO.class);
example.createCriteria().andEqualTo("deleted",false)
.andEqualTo("regionId",regionId).andEqualTo("franchiseBrand",franchiseBrand)
.andEqualTo("payType",payType);
List<ReceivingBankDO> receivingBankDOS = receivingBankMapper.selectByExample(example);
return receivingBankDOS;
}
public Integer batchInsertOrUpdate(List<ReceivingBankDO> receivingBankDOList){
if (CollectionUtils.isEmpty(receivingBankDOList)){
log.info("receivingBankDOList is empty");
return 0;
}
return receivingBankMapper.batchInsertOrUpdate(receivingBankDOList);
}
}

View File

@@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollStreamUtil;
import com.cool.store.dto.store.StoreAddressDTO; import com.cool.store.dto.store.StoreAddressDTO;
import com.cool.store.dto.store.StoreExtendSoftOpenDTO; import com.cool.store.dto.store.StoreExtendSoftOpenDTO;
import com.cool.store.dto.store.StoreOrderTimeDTO; import com.cool.store.dto.store.StoreOrderTimeDTO;
import com.cool.store.dto.store.StoreReportDTO;
import com.cool.store.entity.StoreDO; import com.cool.store.entity.StoreDO;
import com.cool.store.enums.StoreStatusEnum; import com.cool.store.enums.StoreStatusEnum;
import com.cool.store.mapper.StoreMapper; import com.cool.store.mapper.StoreMapper;
@@ -20,7 +19,6 @@ import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.*; import java.util.*;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDate;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@@ -104,18 +102,6 @@ public class StoreDao {
return storeMapper.getStoreNumByStoreCodes(storeCodeIds); return storeMapper.getStoreNumByStoreCodes(storeCodeIds);
} }
/**
* 门店状态改为闭店
* @param storeId 门店id
* @param closeReason 闭店原因
* @param closeNature 闭店性质
*/
public void closeStore(String storeId, Integer closeReason, Integer closeNature) {
if (storeMapper.closeStore(storeId) > 0) {
storeMapper.insertOrUpdateCloseInfo(storeId, closeReason, closeNature);
}
}
/** /**
* 新增或编辑最新订货时间 * 新增或编辑最新订货时间
* @param dtoList 门店最新订货时间DTO列表 * @param dtoList 门店最新订货时间DTO列表
@@ -309,49 +295,6 @@ public class StoreDao {
return storeMapper.getPrivateSphereQrCode(storeId); return storeMapper.getPrivateSphereQrCode(storeId);
} }
/**
* 总营业门店数量统计
*/
public Map<Integer, Integer> totalOpenStoreReport(String date, Integer domestic, List<Integer> joinBrandList) {
if (CollectionUtils.isEmpty(joinBrandList)) {
return Collections.emptyMap();
}
List<StoreReportDTO> list = storeMapper.totalOpenStoreReport(date, domestic, joinBrandList);
return CollStreamUtil.toMap(list, StoreReportDTO::getJoinBrand, StoreReportDTO::getNum);
}
/**
* 期初门店数
*/
public Map<Integer, Integer> periodBeginStoreReport(String date, Integer domestic, List<Integer> joinBrandList) {
if (CollectionUtils.isEmpty(joinBrandList)) {
return Collections.emptyMap();
}
List<StoreReportDTO> list = storeMapper.periodBeginStoreReport(date, domestic, joinBrandList);
return CollStreamUtil.toMap(list, StoreReportDTO::getJoinBrand, StoreReportDTO::getNum);
}
/**
* 新开门店数
*/
public Map<Integer, Integer> newOpenStoreReport(String date, Integer domestic, List<Integer> joinBrandList) {
if (CollectionUtils.isEmpty(joinBrandList)) {
return Collections.emptyMap();
}
List<StoreReportDTO> list = storeMapper.newOpenStoreReport(date, domestic, joinBrandList);
return CollStreamUtil.toMap(list, StoreReportDTO::getJoinBrand, StoreReportDTO::getNum);
}
/**
* 闭店门店数
*/
public Map<Integer, Integer> closeStoreReport(String date, Integer domestic, List<Integer> joinBrandList) {
if (CollectionUtils.isEmpty(joinBrandList)) {
return Collections.emptyMap();
}
List<StoreReportDTO> list = storeMapper.closeStoreReport(date, domestic, joinBrandList);
return CollStreamUtil.toMap(list, StoreReportDTO::getJoinBrand, StoreReportDTO::getNum);
}
/** /**
* 批量新增或编辑开始试营业日期 * 批量新增或编辑开始试营业日期
*/ */

View File

@@ -1,49 +0,0 @@
package com.cool.store.dao;
import com.cool.store.entity.ThirdPartyAccountDO;
import com.cool.store.mapper.ThirdPartyAccountMapper;
import com.cool.store.utils.StringUtil;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
/**
* @Author suzhuhong
* @Date 2025/5/26 16:59
* @Version 1.0
*/
@Repository
public class ThirdPartyAccountDAO {
@Resource
ThirdPartyAccountMapper thirdPartyAccountMapper;
/**
* 新增数据
* @param thirdPartyAccountDO
* @return
*/
public int addPushRecord(ThirdPartyAccountDO thirdPartyAccountDO){
return thirdPartyAccountMapper.insertSelective(thirdPartyAccountDO);
}
public ThirdPartyAccountDO getByCodeAndMobile(String shopCode, String mobile){
if (StringUtil.isAnyBlank(shopCode,mobile)){
return null;
}
return thirdPartyAccountMapper.getByCodeAndMobile(shopCode,mobile);
}
public boolean exists(String shopCode, String mobile){
if (StringUtil.isAnyBlank(shopCode,mobile)){
return Boolean.FALSE;
}
return thirdPartyAccountMapper.exists(shopCode,mobile);
}
}

View File

@@ -1,58 +0,0 @@
package com.cool.store.dao;
import com.cool.store.entity.ThirdPartyStoreDO;
import com.cool.store.mapper.ThirdPartyStoreMapper;
import com.cool.store.utils.StringUtil;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
/**
* @Author suzhuhong
* @Date 2025/5/26 16:58
* @Version 1.0
*/
@Repository
public class ThirdPartyStoreDAO {
@Resource
ThirdPartyStoreMapper thirdPartyStoreMapper;
/**
* 新增推送数据记录
* @param thirdPartyStoreDO
* @return
*/
public int addPushRecord(ThirdPartyStoreDO thirdPartyStoreDO){
return thirdPartyStoreMapper.insertSelective(thirdPartyStoreDO);
}
/**
* 通过门店编码查询推送记录
* @param storeCode
* @return
*/
public ThirdPartyStoreDO getByLocalStoreCode(String storeCode){
if (StringUtil.isEmpty(storeCode)){
return null;
}
return thirdPartyStoreMapper.getByLocalStoreCode(storeCode);
}
/**
* 门店是否存在
* @param localStoreCode
* @return
*/
public boolean exists(String localStoreCode){
if (StringUtil.isEmpty(localStoreCode)){
return Boolean.FALSE;
}
return thirdPartyStoreMapper.exists(localStoreCode);
}
}

View File

@@ -1,122 +0,0 @@
package com.cool.store.dao.approval;
import com.cool.store.entity.approval.CommonApprovalLogDO;
import com.cool.store.enums.approval.ApprovalResultEnum;
import com.cool.store.mapper.approval.CommonApprovalLogMapper;
import com.cool.store.utils.GenerateNoUtil;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import static javassist.CtClass.version;
@Repository
public class CommonApprovalLogDAO {
@Resource
private CommonApprovalLogMapper commonApprovalLogMapper;
/**
* 插入单条审批记录(提交场景:加盟商确认)
*/
public int addSubmitRecord(String applicationNo, String handleUserId, String handleUserName, String nodeCode, String nodeName) {
Long version = GenerateNoUtil.generateVersion();
CommonApprovalLogDO record = CommonApprovalLogDO.builder()
.applicationNo(applicationNo)
.version(version)
.nodeCode(nodeCode)
.nodeName(nodeName)
.handleUserId(handleUserId)
.handleUserName(handleUserName)
.result(ApprovalResultEnum.PASS.getResult())
.status("1")
.submitType(0)
.operateTime(new Date())
.deleted(0)
.build();
return commonApprovalLogMapper.insertSelective(record);
}
/**
* 插入待处理审批记录(审批节点)
*/
public int addApproveRecord(String applicationNo, String nodeCode, String nodeName, String handleUserId, String handleUserName,Long version) {
if (version == null){
version = GenerateNoUtil.generateVersion();
}
CommonApprovalLogDO record = CommonApprovalLogDO.builder()
.applicationNo(applicationNo)
.version(version)
.nodeCode(nodeCode)
.nodeName(nodeName)
.handleUserId(handleUserId)
.handleUserName(handleUserName)
.status("2")
.submitType(1)
.operateTime(new Date())
.deleted(0)
.build();
return commonApprovalLogMapper.insertSelective(record);
}
/**
* 批量插入审批记录
*/
public int batchInsertApprovalRecords(List<CommonApprovalLogDO> list) {
if (list == null || list.isEmpty()) {
return 0;
}
return commonApprovalLogMapper.batchInsert(list);
}
public void updateRecord(CommonApprovalLogDO record) {
commonApprovalLogMapper.updateByPrimaryKeySelective(record);
}
/**
* 批量更新审批记录
*/
public int batchUpdateRecords(List<CommonApprovalLogDO> list) {
if (list == null || list.isEmpty()) {
return 0;
}
return commonApprovalLogMapper.batchUpdate(list);
}
public CommonApprovalLogDO getById(Long id) {
return commonApprovalLogMapper.selectByPrimaryKey(id);
}
public List<CommonApprovalLogDO> getByApplicationNo(String applicationNo) {
return commonApprovalLogMapper.getByApplicationNo(applicationNo);
}
/**
* 获取指定申请号和节点的待处理记录
*/
public List<CommonApprovalLogDO> getPendingByApplicationNoAndNodeCode(String applicationNo, String nodeCode) {
Example example = new Example(CommonApprovalLogDO.class);
example.createCriteria()
.andEqualTo("applicationNo", applicationNo)
.andEqualTo("nodeCode", nodeCode)
.andEqualTo("status", "2")
.andEqualTo("deleted", 0);
return commonApprovalLogMapper.selectByExample(example);
}
/**
* 获取指定申请号最新版本号的待处理记录
*/
public List<CommonApprovalLogDO> getLatestPendingRecords(String applicationNo, Integer version) {
Example example = new Example(CommonApprovalLogDO.class);
example.createCriteria()
.andEqualTo("applicationNo", applicationNo)
.andEqualTo("version", version)
.andEqualTo("status", "2")
.andEqualTo("deleted", 0);
return commonApprovalLogMapper.selectByExample(example);
}
}

View File

@@ -1,23 +0,0 @@
package com.cool.store.dao.contract;
import com.cool.store.entity.contract.ContractCostDO;
import com.cool.store.mapper.contract.ContractCostMapper;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.List;
@Repository
public class ContractCostDAO {
@Resource
private ContractCostMapper contractCostMapper;
public int insertSelective(ContractCostDO record) {
return contractCostMapper.insertSelective(record);
}
public List<ContractCostDO> queryByContractNo(String contractNo) {
return contractCostMapper.queryByContractNo(contractNo);
}
}

View File

@@ -1,62 +0,0 @@
package com.cool.store.dao.contract;
import com.cool.store.entity.contract.ContractMasterDO;
import com.cool.store.mapper.contract.ContractMasterMapper;
import com.cool.store.request.contract.ContractMasterQueryRequest;
import com.cool.store.vo.contract.ContractMasterListVO;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.List;
@Repository
public class ContractMasterDAO {
@Resource
private ContractMasterMapper contractMasterMapper;
public int insertSelective(ContractMasterDO record) {
return contractMasterMapper.insertSelective(record);
}
public int updateByPrimaryKeySelective(ContractMasterDO record) {
return contractMasterMapper.updateByPrimaryKeySelective(record);
}
public ContractMasterDO getById(Long id) {
return contractMasterMapper.selectByPrimaryKey(id);
}
public List<ContractMasterListVO> queryContractMasterList(ContractMasterQueryRequest request) {
return contractMasterMapper.queryContractMasterList(request);
}
public List<ContractMasterDO> queryContractsNearExpiry(int days) {
return contractMasterMapper.queryContractsNearExpiry(days);
}
public ContractMasterDO getLatestContractByStoreCode(String storeCode) {
return contractMasterMapper.getLatestContractByStoreCode(storeCode);
}
/**
* 更新续签申请标记乐观锁仅当renewalCreated=0时更新
*/
public int updateRenewalCreated(Long id, Integer renewalCreated) {
Example example = new Example(ContractMasterDO.class);
example.createCriteria()
.andEqualTo("id", id)
.andEqualTo("renewalCreated", 0);
ContractMasterDO update = new ContractMasterDO();
update.setId(id);
update.setRenewalCreated(renewalCreated);
return contractMasterMapper.updateByPrimaryKeySelective(update);
}
public ContractMasterDO getByContractNo(String contractNo) {
Example example = new Example(ContractMasterDO.class);
example.createCriteria().andEqualTo("contractNo", contractNo);
return contractMasterMapper.selectOneByExample(example);
}
}

View File

@@ -1,72 +0,0 @@
package com.cool.store.dao.exam;
import cn.hutool.core.collection.CollStreamUtil;
import com.cool.store.entity.exam.ExamAttemptAnswerDO;
import com.cool.store.mapper.exam.ExamAttemptAnswerMapper;
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.Map;
/**
* 答题记录DAO
*/
@Repository
@RequiredArgsConstructor
public class ExamAttemptAnswerDAO {
private final ExamAttemptAnswerMapper examAttemptAnswerMapper;
public int insertSelective(ExamAttemptAnswerDO record) {
return examAttemptAnswerMapper.insertSelective(record);
}
public int updateByPrimaryKeySelective(ExamAttemptAnswerDO record) {
return examAttemptAnswerMapper.updateByPrimaryKeySelective(record);
}
public ExamAttemptAnswerDO selectByPrimaryKey(Long id) {
return examAttemptAnswerMapper.selectByPrimaryKey(id);
}
public List<ExamAttemptAnswerDO> select(ExamAttemptAnswerDO record) {
return examAttemptAnswerMapper.select(record);
}
public int insertOrUpdate(ExamAttemptAnswerDO record) {
return examAttemptAnswerMapper.insertOrUpdate(record);
}
/**
* 根据答卷ID批量查询答案返回Mapkey: paperQuestionId
*/
public Map<Long, ExamAttemptAnswerDO> getMapByAttemptId(Long attemptId) {
Example example = new Example(ExamAttemptAnswerDO.class);
example.createCriteria().andEqualTo("attemptId", attemptId);
List<ExamAttemptAnswerDO> list = examAttemptAnswerMapper.selectByExample(example);
return CollStreamUtil.toMap(list, ExamAttemptAnswerDO::getPaperQuestionId, v -> v);
}
/**
* 批量插入或更新答案
*/
public void batchInsertOrUpdate(List<ExamAttemptAnswerDO> list) {
if (CollectionUtils.isEmpty(list)) {
return;
}
examAttemptAnswerMapper.batchInsertOrUpdate(list);
}
/**
* 批量更新分数
*/
public void batchUpdateScore(List<ExamAttemptAnswerDO> list) {
if (CollectionUtils.isEmpty(list)) {
return;
}
examAttemptAnswerMapper.batchUpdateScore(list);
}
}

View File

@@ -1,97 +0,0 @@
package com.cool.store.dao.exam;
import cn.hutool.core.collection.CollStreamUtil;
import com.cool.store.entity.exam.ExamAttemptDO;
import com.cool.store.mapper.exam.ExamAttemptMapper;
import lombok.RequiredArgsConstructor;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 答卷DAO
*/
@Repository
@RequiredArgsConstructor
public class ExamAttemptDAO {
private final ExamAttemptMapper examAttemptMapper;
public int insertSelective(ExamAttemptDO record) {
return examAttemptMapper.insertSelective(record);
}
public int updateByPrimaryKeySelective(ExamAttemptDO record) {
return examAttemptMapper.updateByPrimaryKeySelective(record);
}
public ExamAttemptDO selectByPrimaryKey(Long id) {
return examAttemptMapper.selectByPrimaryKey(id);
}
public List<ExamAttemptDO> select(ExamAttemptDO record) {
return examAttemptMapper.select(record);
}
/**
* 更新答卷状态和成绩
*/
public void updateStatusAndScore(Long id, Integer status, Integer submitType, BigDecimal totalScore) {
ExamAttemptDO updateDO = new ExamAttemptDO();
updateDO.setId(id);
updateDO.setStatus(status);
updateDO.setSubmitType(submitType);
updateDO.setTotalScore(totalScore);
updateDO.setEndTime(new Date());
examAttemptMapper.updateByPrimaryKeySelective(updateDO);
}
/**
* 根据考试ID和手机号查询进行中的答卷
*/
public ExamAttemptDO selectInProgressByExamIdAndMobile(Long examId, String mobile) {
Example example = new Example(ExamAttemptDO.class);
example.createCriteria()
.andEqualTo("examId", examId)
.andEqualTo("mobile", mobile)
.andEqualTo("status", 0);
example.setOrderByClause("id desc");
List<ExamAttemptDO> list = examAttemptMapper.selectByExample(example);
return list.isEmpty() ? null : list.get(0);
}
/**
* 根据手机号分页查询答卷列表
*/
public List<ExamAttemptDO> selectByMobile(String mobile) {
Example example = new Example(ExamAttemptDO.class);
example.createCriteria()
.andEqualTo("mobile", mobile);
example.setOrderByClause("id desc");
return examAttemptMapper.selectByExample(example);
}
/**
* 查询参考人数
* @param examInfoIds 考试信息id列表
* @return 考试id->参考人数
*/
public Map<Long, Long> getAttemptCount(List<Long> examInfoIds) {
List<Map<String, Object>> list = examAttemptMapper.getAttemptCount(examInfoIds);
return CollStreamUtil.toMap(list, v -> MapUtils.getLong(v, "exam_id"), v -> MapUtils.getLong(v, "attempt_count"));
}
public boolean existFinishAttempt(String mobile, Long examId) {
Example example = new Example(ExamAttemptDO.class);
example.createCriteria()
.andEqualTo("mobile", mobile)
.andEqualTo("examId", examId)
.andEqualTo("status", 1);
return examAttemptMapper.selectCountByExample(example) > 0;
}
}

View File

@@ -1,112 +0,0 @@
package com.cool.store.dao.exam;
import cn.hutool.core.collection.CollStreamUtil;
import com.cool.store.entity.exam.ExamInfoDO;
import com.cool.store.mapper.exam.ExamInfoMapper;
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.Date;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* 考试信息DAO
*/
@Repository
@RequiredArgsConstructor
public class ExamInfoDAO {
private final ExamInfoMapper examInfoMapper;
public int insertSelective(ExamInfoDO record) {
return examInfoMapper.insertSelective(record);
}
public int updateByPrimaryKeySelective(ExamInfoDO record) {
return examInfoMapper.updateByPrimaryKeySelective(record);
}
public ExamInfoDO selectByPrimaryKey(Long id) {
return examInfoMapper.selectByPrimaryKey(id);
}
public List<ExamInfoDO> select(ExamInfoDO record) {
return examInfoMapper.select(record);
}
public ExamInfoDO selectByToken(String token) {
return examInfoMapper.selectByToken(token);
}
/**
* 条件查询列表
*/
public List<ExamInfoDO> selectList(Integer status) {
Example example = new Example(ExamInfoDO.class);
Example.Criteria criteria = example.createCriteria()
.andEqualTo("deleted", 0);
if (Objects.nonNull(status)) {
criteria.andEqualTo("status", status);
}
example.setOrderByClause("create_time desc");
return examInfoMapper.selectByExample(example);
}
/**
* 更新状态
*/
public void updateStatus(Long id, Integer status) {
ExamInfoDO examInfoDO = new ExamInfoDO();
examInfoDO.setId(id);
examInfoDO.setStatus(status);
examInfoMapper.updateByPrimaryKeySelective(examInfoDO);
}
/**
* 根据ID批量查询
*/
public List<ExamInfoDO> selectByIds(List<Long> ids) {
if (CollectionUtils.isEmpty(ids)) {
return Collections.emptyList();
}
Example example = new Example(ExamInfoDO.class);
example.createCriteria()
.andIn("id", ids)
.andEqualTo("deleted", 0);
return examInfoMapper.selectByExample(example);
}
/**
* 根据ID批量查询返回Map
*/
public Map<Long, ExamInfoDO> getMapByIds(List<Long> ids) {
List<ExamInfoDO> list = selectByIds(ids);
return CollStreamUtil.toMap(list, ExamInfoDO::getId, v -> v);
}
public Map<Long, ExamInfoDO> getMapIncludeDeletedByIds(List<Long> ids) {
if (CollectionUtils.isEmpty(ids)) {
return Collections.emptyMap();
}
Example example = new Example(ExamInfoDO.class);
example.createCriteria()
.andIn("id", ids);
List<ExamInfoDO> list = examInfoMapper.selectByExample(example);
return CollStreamUtil.toMap(list, ExamInfoDO::getId, v -> v);
}
/**
* 根据ID删除逻辑删除
*/
public void deleteById(Long id) {
ExamInfoDO updateDO = new ExamInfoDO();
updateDO.setId(id);
updateDO.setDeleted(1);
examInfoMapper.updateByPrimaryKeySelective(updateDO);
}
}

View File

@@ -1,98 +0,0 @@
package com.cool.store.dao.exam;
import cn.hutool.core.collection.CollStreamUtil;
import com.cool.store.entity.exam.ExamPaperDO;
import com.cool.store.mapper.exam.ExamPaperMapper;
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.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* 试卷DAO
*/
@Repository
@RequiredArgsConstructor
public class ExamPaperDAO {
private final ExamPaperMapper examPaperMapper;
public int insertSelective(ExamPaperDO record) {
return examPaperMapper.insertSelective(record);
}
public int updateByPrimaryKeySelective(ExamPaperDO record) {
return examPaperMapper.updateByPrimaryKeySelective(record);
}
public ExamPaperDO selectByPrimaryKey(Long id) {
return examPaperMapper.selectByPrimaryKey(id);
}
public List<ExamPaperDO> select(ExamPaperDO record) {
return examPaperMapper.select(record);
}
public int selectCount(ExamPaperDO record) {
return examPaperMapper.selectCount(record);
}
/**
* 条件查询列表
*/
public List<ExamPaperDO> selectList(String paperName, Integer enable, Integer startExam) {
Example example = new Example(ExamPaperDO.class);
Example.Criteria criteria = example.createCriteria()
.andEqualTo("deleted", 0);
if (StringUtils.isNotBlank(paperName)) {
criteria.andLike("paperName", "%" + paperName + "%");
}
if (Objects.nonNull(enable)) {
criteria.andEqualTo("enable", enable);
}
if (Objects.nonNull(startExam)) {
criteria.andEqualTo("startExam", startExam);
}
example.setOrderByClause("create_time desc");
return examPaperMapper.selectByExample(example);
}
/**
* 根据ID删除逻辑删除
*/
public void deleteById(Long id) {
ExamPaperDO paperDO = new ExamPaperDO();
paperDO.setId(id);
paperDO.setDeleted(1);
examPaperMapper.updateByPrimaryKeySelective(paperDO);
}
/**
* 更新开始考试状态
*/
public void updateStartExam(Long id, Integer startExam) {
ExamPaperDO paperDO = new ExamPaperDO();
paperDO.setId(id);
paperDO.setStartExam(startExam);
examPaperMapper.updateByPrimaryKeySelective(paperDO);
}
/**
* 根据ID列表批量查询返回Map
*/
public Map<Long, ExamPaperDO> getMapByIds(List<Long> ids) {
if (CollectionUtils.isEmpty(ids)) {
return Collections.emptyMap();
}
Example example = new Example(ExamPaperDO.class);
example.createCriteria().andIn("id", ids);
List<ExamPaperDO> list = examPaperMapper.selectByExample(example);
return CollStreamUtil.toMap(list, ExamPaperDO::getId, v -> v);
}
}

View File

@@ -1,80 +0,0 @@
package com.cool.store.dao.exam;
import com.cool.store.entity.exam.ExamPaperQuestionDO;
import com.cool.store.mapper.exam.ExamPaperQuestionMapper;
import lombok.RequiredArgsConstructor;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
import java.util.List;
/**
* 试卷题目DAO
*/
@Repository
@RequiredArgsConstructor
public class ExamPaperQuestionDAO {
private final ExamPaperQuestionMapper examPaperQuestionMapper;
public int insertSelective(ExamPaperQuestionDO record) {
return examPaperQuestionMapper.insertSelective(record);
}
public int updateByPrimaryKeySelective(ExamPaperQuestionDO record) {
return examPaperQuestionMapper.updateByPrimaryKeySelective(record);
}
public ExamPaperQuestionDO selectByPrimaryKey(Long id) {
return examPaperQuestionMapper.selectByPrimaryKey(id);
}
public List<ExamPaperQuestionDO> select(ExamPaperQuestionDO record) {
return examPaperQuestionMapper.select(record);
}
public int selectCount(ExamPaperQuestionDO record) {
return examPaperQuestionMapper.selectCount(record);
}
/**
* 根据试卷ID查询题目数量
*/
public int countByPaperId(Long paperId) {
Example example = new Example(ExamPaperQuestionDO.class);
example.createCriteria()
.andEqualTo("paperId", paperId)
.andEqualTo("deleted", 0);
return examPaperQuestionMapper.selectCountByExample(example);
}
/**
* 批量插入
*/
public int insertBatch(List<ExamPaperQuestionDO> list) {
if (CollectionUtils.isEmpty(list)) {
return 0;
}
return examPaperQuestionMapper.insertBatch(list);
}
/**
* 根据试卷ID批量删除逻辑删除
*/
public int deleteByPaperId(Long paperId) {
return examPaperQuestionMapper.deleteByPaperId(paperId, new java.util.Date());
}
/**
* 根据试卷ID查询题目列表
*/
public List<ExamPaperQuestionDO> selectByPaperId(Long paperId) {
Example example = new Example(ExamPaperQuestionDO.class);
example.createCriteria()
.andEqualTo("paperId", paperId)
.andEqualTo("deleted", 0);
example.setOrderByClause("id asc");
return examPaperQuestionMapper.selectByExample(example);
}
}

View File

@@ -1,88 +0,0 @@
package com.cool.store.dao.exam;
import cn.hutool.core.collection.CollStreamUtil;
import com.cool.store.entity.exam.ExamQuestionDO;
import com.cool.store.mapper.exam.ExamQuestionMapper;
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.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* 题目DAO
*/
@Repository
@RequiredArgsConstructor
public class ExamQuestionDAO {
private final ExamQuestionMapper examQuestionMapper;
public int insertSelective(ExamQuestionDO record) {
return examQuestionMapper.insertSelective(record);
}
public int updateByPrimaryKeySelective(ExamQuestionDO record) {
return examQuestionMapper.updateByPrimaryKeySelective(record);
}
public ExamQuestionDO selectByPrimaryKey(Long id) {
return examQuestionMapper.selectByPrimaryKey(id);
}
public Map<Long, ExamQuestionDO> getMapByIds(List<Long> ids) {
if (CollectionUtils.isEmpty(ids)){
return Collections.emptyMap();
}
Example example = new Example(ExamQuestionDO.class);
example.createCriteria()
.andIn("id", ids);
List<ExamQuestionDO> list = examQuestionMapper.selectByExample(example);
return CollStreamUtil.toMap(list, ExamQuestionDO::getId, v -> v);
}
public List<ExamQuestionDO> selecList(Integer type, Integer difficulty, String questionStem, Integer enable) {
Example example = new Example(ExamQuestionDO.class);
Example.Criteria criteria = example.createCriteria()
.andEqualTo("deleted", 0);
if (Objects.nonNull(type)) {
criteria.andEqualTo("type", type);
}
if (Objects.nonNull(difficulty)) {
criteria.andEqualTo("difficulty", difficulty);
}
if (StringUtils.isNotBlank(questionStem)) {
criteria.andLike("questionStem", "%" + questionStem + "%");
}
if (Objects.nonNull(enable)) {
criteria.andEqualTo("enable", enable);
}
example.setOrderByClause("create_time desc");
return examQuestionMapper.selectByExample(example);
}
public int selectCount(ExamQuestionDO record) {
return examQuestionMapper.selectCount(record);
}
/**
* 批量逻辑删除
*/
public void batchDeleteByIds(List<Long> ids) {
if (CollectionUtils.isEmpty(ids)) {
return ;
}
Example example = new Example(ExamQuestionDO.class);
example.createCriteria()
.andIn("id", ids)
.andEqualTo("deleted", 0);
ExamQuestionDO updateDO = new ExamQuestionDO();
updateDO.setDeleted(1);
examQuestionMapper.updateByExampleSelective(updateDO, example);
}
}

View File

@@ -1,55 +0,0 @@
package com.cool.store.dao.renewal;
import com.cool.store.entity.renewal.RenewalApplicationDO;
import com.cool.store.mapper.renewal.RenewalApplicationMapper;
import com.cool.store.request.renewal.RenewalApplicationQueryRequest;
import com.cool.store.vo.renewal.RenewalApplicationListVO;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;
@Repository
public class RenewalApplicationDAO {
@Resource
private RenewalApplicationMapper renewalApplicationMapper;
public int insertSelective(RenewalApplicationDO record) {
return renewalApplicationMapper.insertSelective(record);
}
public int updateByPrimaryKeySelective(RenewalApplicationDO record) {
return renewalApplicationMapper.updateByPrimaryKeySelective(record);
}
public RenewalApplicationDO getById(Long id) {
return renewalApplicationMapper.selectByPrimaryKey(id);
}
public List<RenewalApplicationListVO> queryRenewalApplicationList(RenewalApplicationQueryRequest request, List<String> regionIds) {
return renewalApplicationMapper.queryRenewalApplicationList(request, regionIds);
}
public RenewalApplicationDO getByApplicationNo(String applicationNo) {
Example example = new Example(RenewalApplicationDO.class);
example.createCriteria()
.andEqualTo("applicationNo", applicationNo)
.andEqualTo("isDeleted", 0);
return renewalApplicationMapper.selectOneByExample(example);
}
/**
* 查询门店是否有正在进行的续签申请
*/
public boolean existOngoingRecord(String storeCode) {
Example example = new Example(RenewalApplicationDO.class);
example.createCriteria()
.andEqualTo("storeCode", storeCode)
.andEqualTo("isDeleted", 0)
.andNotIn("status", Arrays.asList(40, 60, 70));
return renewalApplicationMapper.selectCountByExample(example) > 0;
}
}

View File

@@ -1,47 +0,0 @@
package com.cool.store.dao.renewal;
import cn.hutool.core.collection.CollStreamUtil;
import com.cool.store.entity.renewal.RenewalApplicationSignerInfoDO;
import com.cool.store.mapper.renewal.RenewalApplicationSignerInfoMapper;
import lombok.RequiredArgsConstructor;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
import java.util.*;
/**
* 续签申请签约人信息快照DAO
*
* @author zx
* @date 2026-04-28
*/
@Repository
@RequiredArgsConstructor
public class RenewalApplicationSignerInfoDAO {
private final RenewalApplicationSignerInfoMapper mapper;
public int insertSelective(RenewalApplicationSignerInfoDO record) {
return mapper.insertSelective(record);
}
public RenewalApplicationSignerInfoDO getByApplicationNo(String applicationNo) {
Example example = new Example(RenewalApplicationSignerInfoDO.class);
example.createCriteria().andEqualTo("applicationNo", applicationNo);
return mapper.selectOneByExample(example);
}
/**
* 批量查询签约人信息
*/
public Map<String, RenewalApplicationSignerInfoDO> getByApplicationNos(Collection<String> applicationNos) {
if (CollectionUtils.isEmpty(applicationNos)) {
return Collections.emptyMap();
}
Example example = new Example(RenewalApplicationSignerInfoDO.class);
example.createCriteria().andIn("applicationNo", applicationNos);
List<RenewalApplicationSignerInfoDO> list = mapper.selectByExample(example);
return CollStreamUtil.toMap(list, RenewalApplicationSignerInfoDO::getApplicationNo, v -> v);
}
}

View File

@@ -1,22 +0,0 @@
package com.cool.store.dao.renewal;
import com.cool.store.entity.renewal.RenewalRenovateApprovalDO;
import com.cool.store.mapper.renewal.RenewalRenovateApprovalMapper;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
@Repository
public class RenewalRenovateApprovalDAO {
@Resource
private RenewalRenovateApprovalMapper renewalRenovateApprovalMapper;
public int insertSelective(RenewalRenovateApprovalDO record) {
return renewalRenovateApprovalMapper.insertSelective(record);
}
public RenewalRenovateApprovalDO getByApplicationNo(String applicationNo) {
return renewalRenovateApprovalMapper.getByApplicationNo(applicationNo);
}
}

View File

@@ -1,33 +0,0 @@
package com.cool.store.dao.store;
import com.alibaba.excel.util.CollectionUtils;
import com.cool.store.entity.store.StoreBusinessReportDO;
import com.cool.store.mapper.store.StoreBusinessReportMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* <p>
* 门店营业数据报表DAO
* </p>
*
* @author wangff
* @since 2026/4/28
*/
@Repository
@RequiredArgsConstructor
public class StoreBusinessReportDAO {
private final StoreBusinessReportMapper storeBusinessReportMapper;
/**
* 批量新增或编辑
*/
public void insertOrUpdateBatch(List<StoreBusinessReportDO> list) {
if (CollectionUtils.isEmpty(list)) {
return;
}
storeBusinessReportMapper.insertOrUpdateBatch(list);
}
}

View File

@@ -15,10 +15,7 @@ public interface BigRegionMapper extends Mapper<BigRegionDO> {
* @param keyword * @param keyword
* @return * @return
*/ */
List<BigRegionDTO> queryAllBigRegion(@Param("keyword") String keyword, List<BigRegionDTO> queryAllBigRegion(@Param("keyword") String keyword, @Param("joinBrand") Integer joinBrand, @Param("type") Integer type);
@Param("joinBrand") Integer joinBrand,
@Param("type") Integer type,
@Param("enable") Integer enable);
/** /**
* 根据所属大区与加盟模式查询新管家信息 * 根据所属大区与加盟模式查询新管家信息
@@ -32,6 +29,4 @@ public interface BigRegionMapper extends Mapper<BigRegionDO> {
List<BigRegionDTO> queryBigRegion(@Param("request") QueryBigRegionRequest queryBigRegionRequest); List<BigRegionDTO> queryBigRegion(@Param("request") QueryBigRegionRequest queryBigRegionRequest);
Integer updateHqtDate(BigRegionDO bigRegionDO); Integer updateHqtDate(BigRegionDO bigRegionDO);
List<BigRegionDO> getByRegionIdList(@Param("list") List<Long> regionIdList);
} }

View File

@@ -29,6 +29,4 @@ public interface FranchiseFeeMapper extends Mapper<FranchiseFeeDO> {
Integer batchUpdateXgjCollectionStatus(@Param("shopIds")List<Long> shopId, @Param("collectionStatus")Integer collectionStatus); Integer batchUpdateXgjCollectionStatus(@Param("shopIds")List<Long> shopId, @Param("collectionStatus")Integer collectionStatus);
Integer batchUpdateXgjCollectionStatusAndXgjFeesPaid( @Param("list") List<FranchiseFeeStageDateDTO> franchiseFeeStageDateDTOList); Integer batchUpdateXgjCollectionStatusAndXgjFeesPaid( @Param("list") List<FranchiseFeeStageDateDTO> franchiseFeeStageDateDTOList);
Integer updatePayType(@Param("shopId") Long shopId, @Param("payType") Integer payType);
} }

View File

@@ -4,7 +4,6 @@ import com.cool.store.entity.LinePayDO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper; import tk.mybatis.mapper.common.Mapper;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
/** /**
@@ -72,7 +71,5 @@ public interface LinePayMapper {
Integer deleteByShopId(@Param("list")List<Long> shopIds); Integer deleteByShopId(@Param("list")List<Long> shopIds);
Integer updateAmountAndPayUserName(@Param("id") Long id, @Param("amount") BigDecimal amount, @Param("payUserName") String payUserName, @Param("userId") String userId);
LinePayDO getLastPay(@Param("shopId") Long shopId); LinePayDO getLastPay(@Param("shopId") Long shopId);
} }

View File

@@ -14,8 +14,6 @@ public interface OpeningOperationPlanMapper extends Mapper<OpeningOperationPlanD
OpeningOperationPlanDO selectByShopId(@Param("shopId") Long shopId); OpeningOperationPlanDO selectByShopId(@Param("shopId") Long shopId);
List<OpeningOperationPlanDO> selectByShopIds(@Param("shopIds") List<Long> shopIds);
Integer updateByShopId(@Param("shopId") Long shopId, @Param("auditId") Long auditId, @Param("resultType") Integer resultType); Integer updateByShopId(@Param("shopId") Long shopId, @Param("auditId") Long auditId, @Param("resultType") Integer resultType);
/** /**

View File

@@ -1,22 +0,0 @@
package com.cool.store.mapper;
import com.cool.store.entity.ReceivingBankDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
/**
* @Author: WangShuo
* @Date: 2025/06/18/17:33
* @Version 1.0
* @注释:
*/
public interface ReceivingBankMapper extends Mapper<ReceivingBankDO> {
List<ReceivingBankDO> getByFranchiseBrandAndRegionId(@Param("franchiseBrandList") List<String> franchiseBrandList,@Param("regionIdList") List<Long> regionIdList);
Integer batchInsert(@Param("list") List<ReceivingBankDO> list);
Integer batchInsertOrUpdate(@Param("list") List<ReceivingBankDO> receivingBankDOList);
}

View File

@@ -4,7 +4,6 @@ import com.cool.store.dto.store.StoreAddressDTO;
import com.cool.store.dto.store.StoreAreaDTO; import com.cool.store.dto.store.StoreAreaDTO;
import com.cool.store.dto.store.StoreExtendSoftOpenDTO; import com.cool.store.dto.store.StoreExtendSoftOpenDTO;
import com.cool.store.dto.store.StoreOrderTimeDTO; import com.cool.store.dto.store.StoreOrderTimeDTO;
import com.cool.store.dto.store.StoreReportDTO;
import com.cool.store.entity.StoreDO; import com.cool.store.entity.StoreDO;
import com.cool.store.response.MiniShopsResponse; import com.cool.store.response.MiniShopsResponse;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@@ -146,21 +145,6 @@ public interface StoreMapper {
*/ */
List<StoreDO> getNoOrderStore(@Param("latestDate") LocalDate latestDate, @Param("businessTypes") List<String> businessTypes, @Param("inBusinessType") Boolean inBusinessType); List<StoreDO> getNoOrderStore(@Param("latestDate") LocalDate latestDate, @Param("businessTypes") List<String> businessTypes, @Param("inBusinessType") Boolean inBusinessType);
/**
* 门店状态改为闭店
* @param storeId 门店id
*/
int closeStore(@Param("storeId") String storeId);
/**
* 根据区域id查询门店列表
* @param regionIds 区域id
* @param keyword 门店名称或门店编码
* @return 门店列表
*/
List<StoreDO> getStoreByRegionIds(@Param("regionIds") List<String> regionIds, @Param("keyword") String keyword);
/** /**
* 根据市统计门店数量 * 根据市统计门店数量
* @param cityNames 市列表 * @param cityNames 市列表
@@ -181,42 +165,20 @@ public interface StoreMapper {
@Param("openStartTime") LocalDate openStartTime, @Param("openStartTime") LocalDate openStartTime,
@Param("openEndTime") LocalDate openEndTime); @Param("openEndTime") LocalDate openEndTime);
/**
* 根据区域id查询门店列表
* @param regionIds 区域id
* @param keyword 门店名称或门店编码
* @return 门店列表
*/
List<StoreDO> getStoreByRegionIds(@Param("regionIds") List<String> regionIds, @Param("keyword") String keyword);
List<StoreAddressDTO> getStoreAddress(@Param("flag") Integer flag, @Param("storeCode") String storeCode); List<StoreAddressDTO> getStoreAddress(@Param("flag") Integer flag, @Param("storeCode") String storeCode);
int batchUpdateAddress(@Param("list") List<StoreDO> storeList); int batchUpdateAddress(@Param("list") List<StoreDO> storeList);
String getPrivateSphereQrCode(@Param("storeId") String storeId); String getPrivateSphereQrCode(@Param("storeId") String storeId);
/**
* 总营业门店数量统计
*/
List<StoreReportDTO> totalOpenStoreReport(@Param("date") String date,
@Param("domestic") Integer domestic,
@Param("joinBrandList") List<Integer> joinBrandList);
/**
* 期初门店数
*/
List<StoreReportDTO> periodBeginStoreReport(@Param("date") String date,
@Param("domestic") Integer domestic,
@Param("joinBrandList") List<Integer> joinBrandList);
/**
* 新开门店数
*/
List<StoreReportDTO> newOpenStoreReport(@Param("date") String date,
@Param("domestic") Integer domestic,
@Param("joinBrandList") List<Integer> joinBrandList);
/**
* 闭店门店数
*/
List<StoreReportDTO> closeStoreReport(@Param("date") String date,
@Param("domestic") Integer domestic,
@Param("joinBrandList") List<Integer> joinBrandList);
/** /**
* 批量新增或编辑开始试营业日期 * 批量新增或编辑开始试营业日期
*/ */

View File

@@ -1,20 +0,0 @@
package com.cool.store.mapper;
import com.cool.store.entity.ThirdPartyAccountDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
public interface ThirdPartyAccountMapper extends Mapper<ThirdPartyAccountDO> {
/**
* 通过门店编码与手机号获取人员是否推送到猎聘
* @param shopCode
* @param mobile
* @return
*/
ThirdPartyAccountDO getByCodeAndMobile(@Param("shopCode") String shopCode, @Param("mobile") String mobile);
boolean exists(@Param("shopCode") String shopCode, @Param("mobile") String mobile);
}

View File

@@ -1,25 +0,0 @@
package com.cool.store.mapper;
import com.cool.store.entity.ThirdPartyStoreDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
public interface ThirdPartyStoreMapper extends Mapper<ThirdPartyStoreDO> {
/**
* 根据门店code查询推送记录
* @param storeCode
* @return
*/
ThirdPartyStoreDO getByLocalStoreCode(@Param("storeCode") String storeCode);
/**
* 门店是否存在
* @param localStoreCode
* @return
*/
boolean exists(@Param("localStoreCode") String localStoreCode);
}

View File

@@ -1,6 +1,5 @@
package com.cool.store.mapper; package com.cool.store.mapper;
import com.cool.store.dto.BigRegionUserDTO;
import com.cool.store.entity.UserAuthMappingDO; import com.cool.store.entity.UserAuthMappingDO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@@ -113,12 +112,4 @@ public interface UserAuthMappingMapper {
List<UserAuthMappingDO> listByUserIdListAndSource(@Param("userIdList") List<String> userIdList, @Param("source") String source); List<UserAuthMappingDO> listByUserIdListAndSource(@Param("userIdList") List<String> userIdList, @Param("source") String source);
List<UserAuthMappingDO> getAllByUserIds(@Param("userIdsByRoleIdList") List<String> userIdsByRoleIdList); List<UserAuthMappingDO> getAllByUserIds(@Param("userIdsByRoleIdList") List<String> userIdsByRoleIdList);
/**
* 查询指定大区 且管辖该大区的指定角色的人
* @param regionIds
* @param roleName
* @return
*/
List<BigRegionUserDTO> getBigRegionByUserId(List<Long> regionIds, String roleName);
} }

View File

@@ -1,25 +0,0 @@
package com.cool.store.mapper.approval;
import com.cool.store.entity.approval.CommonApprovalLogDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface CommonApprovalLogMapper extends Mapper<CommonApprovalLogDO> {
/**
* 根据申请编号查询所有审批记录
*/
List<CommonApprovalLogDO> getByApplicationNo(@Param("applicationNo") String applicationNo);
/**
* 批量插入审批记录
*/
int batchInsert(@Param("list") List<CommonApprovalLogDO> list);
/**
* 批量更新审批记录
*/
int batchUpdate(@Param("list") List<CommonApprovalLogDO> list);
}

View File

@@ -1,15 +0,0 @@
package com.cool.store.mapper.contract;
import com.cool.store.entity.contract.ContractCostDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface ContractCostMapper extends Mapper<ContractCostDO> {
/**
* 根据合同编号查询费用列表
*/
List<ContractCostDO> queryByContractNo(@Param("contractNo") String contractNo);
}

View File

@@ -1,27 +0,0 @@
package com.cool.store.mapper.contract;
import com.cool.store.entity.contract.ContractMasterDO;
import com.cool.store.request.contract.ContractMasterQueryRequest;
import com.cool.store.vo.contract.ContractMasterListVO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface ContractMasterMapper extends Mapper<ContractMasterDO> {
/**
* 查询合同列表(关联门店表)
*/
List<ContractMasterListVO> queryContractMasterList(@Param("request") ContractMasterQueryRequest request);
/**
* 查询即将到期的合同(未生成续签申请)
*/
List<ContractMasterDO> queryContractsNearExpiry(@Param("days") int days);
/**
* 根据门店编码查询最新合同
*/
ContractMasterDO getLatestContractByStoreCode(@Param("storeCode") String storeCode);
}

View File

@@ -1,24 +0,0 @@
package com.cool.store.mapper.exam;
import com.cool.store.entity.exam.ExamAttemptAnswerDO;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface ExamAttemptAnswerMapper extends Mapper<ExamAttemptAnswerDO> {
/**
* 插入或更新答案
*/
int insertOrUpdate(ExamAttemptAnswerDO record);
/**
* 批量插入或更新答案
*/
int batchInsertOrUpdate(List<ExamAttemptAnswerDO> list);
/**
* 批量更新分数
*/
int batchUpdateScore(List<ExamAttemptAnswerDO> list);
}

View File

@@ -1,18 +0,0 @@
package com.cool.store.mapper.exam;
import com.cool.store.entity.exam.ExamAttemptDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
import java.util.Map;
public interface ExamAttemptMapper extends Mapper<ExamAttemptDO> {
/**
* 查询参考人数
* @param examInfoIds 考试信息id列表
* @return 参考人数
*/
List<Map<String, Object>> getAttemptCount(@Param("examInfoIds") List<Long> examInfoIds);
}

View File

@@ -1,12 +0,0 @@
package com.cool.store.mapper.exam;
import com.cool.store.entity.exam.ExamInfoDO;
import tk.mybatis.mapper.common.Mapper;
public interface ExamInfoMapper extends Mapper<ExamInfoDO> {
/**
* 通过token查询考试信息
*/
ExamInfoDO selectByToken(String token);
}

View File

@@ -1,7 +0,0 @@
package com.cool.store.mapper.exam;
import com.cool.store.entity.exam.ExamPaperDO;
import tk.mybatis.mapper.common.Mapper;
public interface ExamPaperMapper extends Mapper<ExamPaperDO> {
}

View File

@@ -1,20 +0,0 @@
package com.cool.store.mapper.exam;
import com.cool.store.entity.exam.ExamPaperQuestionDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface ExamPaperQuestionMapper extends Mapper<ExamPaperQuestionDO> {
/**
* 批量插入试卷题目
*/
int insertBatch(@Param("list") List<ExamPaperQuestionDO> list);
/**
* 根据试卷ID批量删除逻辑删除
*/
int deleteByPaperId(@Param("paperId") Long paperId, @Param("updateTime") java.util.Date updateTime);
}

View File

@@ -1,7 +0,0 @@
package com.cool.store.mapper.exam;
import com.cool.store.entity.exam.ExamQuestionDO;
import tk.mybatis.mapper.common.Mapper;
public interface ExamQuestionMapper extends Mapper<ExamQuestionDO> {
}

View File

@@ -1,18 +0,0 @@
package com.cool.store.mapper.renewal;
import com.cool.store.entity.renewal.RenewalApplicationDO;
import com.cool.store.request.renewal.RenewalApplicationQueryRequest;
import com.cool.store.vo.renewal.RenewalApplicationListVO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface RenewalApplicationMapper extends Mapper<RenewalApplicationDO> {
/**
* 查询续签申请列表(关联门店、签约人表)
*/
List<RenewalApplicationListVO> queryRenewalApplicationList(@Param("request") RenewalApplicationQueryRequest request,
@Param("regionIds") List<String> regionIds);
}

View File

@@ -1,13 +0,0 @@
package com.cool.store.mapper.renewal;
import com.cool.store.entity.renewal.RenewalApplicationSignerInfoDO;
import tk.mybatis.mapper.common.Mapper;
/**
* 续签申请签约人信息快照Mapper
*
* @author zx
* @date 2026-04-28
*/
public interface RenewalApplicationSignerInfoMapper extends Mapper<RenewalApplicationSignerInfoDO> {
}

View File

@@ -1,13 +0,0 @@
package com.cool.store.mapper.renewal;
import com.cool.store.entity.renewal.RenewalRenovateApprovalDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
public interface RenewalRenovateApprovalMapper extends Mapper<RenewalRenovateApprovalDO> {
/**
* 根据申请编号查询翻新信息
*/
RenewalRenovateApprovalDO getByApplicationNo(@Param("applicationNo") String applicationNo);
}

View File

@@ -1,32 +0,0 @@
package com.cool.store.mapper.store;
import com.cool.store.entity.store.StoreBusinessReportDO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author zhangchenbiao
* @date 2026-04-28 06:58
*/
public interface StoreBusinessReportMapper {
/**
*
* 默认插入方法,只会给有值的字段赋值
* 会对传进来的字段做判空处理如果字段为空则使用数据库默认字段或者null
* dateTime:2026-04-28 06:58
*/
int insertSelective(@Param("record") StoreBusinessReportDO record, @Param("enterpriseId") String enterpriseId);
/**
*
* 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的
* dateTime:2026-04-28 06:58
*/
int updateByPrimaryKeySelective(@Param("record") StoreBusinessReportDO record, @Param("enterpriseId") String enterpriseId);
/**
* 批量新增或编辑
*/
void insertOrUpdateBatch(@Param("list") List<StoreBusinessReportDO> list);
}

View File

@@ -97,9 +97,6 @@
<if test="request.expenseSheetType != null and request.expenseSheetType != ''"> <if test="request.expenseSheetType != null and request.expenseSheetType != ''">
and a.expense_sheet_type = #{request.expenseSheetType} and a.expense_sheet_type = #{request.expenseSheetType}
</if> </if>
<if test="request.createUserId != null and request.createUserId != ''">
and a.create_user_id = #{request.createUserId}
</if>
<if test="request.regionIds != null and !request.regionIds.isEmpty()"> <if test="request.regionIds != null and !request.regionIds.isEmpty()">
AND <foreach collection="request.regionIds" item="regionId" separator=" OR " open="(" close=")"> AND <foreach collection="request.regionIds" item="regionId" separator=" OR " open="(" close=")">
b.region_path LIKE CONCAT('%/', #{regionId}, '/%') b.region_path LIKE CONCAT('%/', #{regionId}, '/%')

View File

@@ -45,9 +45,6 @@
<if test="type != null"> <if test="type != null">
and type = #{type} and type = #{type}
</if> </if>
<if test="enable !=null">
and enable_flag = #{enable}
</if>
</where> </where>
order by order by
enable_flag desc, enable_flag desc,
@@ -99,15 +96,4 @@
</otherwise> </otherwise>
</choose> </choose>
</select> </select>
<select id="getByRegionIdList" resultType="com.cool.store.entity.BigRegionDO">
select DISTINCT
group_name as groupName,
region_id as regionId,
region_name as regionName
from `xfsg_big_region`
where region_id in
<foreach item="item" collection="list" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</select>
</mapper> </mapper>

View File

@@ -48,11 +48,6 @@
where shop_id = #{item.shopId} where shop_id = #{item.shopId}
</foreach> </foreach>
</update> </update>
<update id="updatePayType">
update xfsg_franchise_fee
set pay_type = #{payType}
where shop_id = #{shopId}
</update>
<select id="selectByShopId" resultType="com.cool.store.entity.FranchiseFeeDO"> <select id="selectByShopId" resultType="com.cool.store.entity.FranchiseFeeDO">
select * select *

View File

@@ -22,9 +22,7 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" /> <result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" /> <result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
<result column="actual_payment_amount" jdbcType="DECIMAL" property="actualPaymentAmount" /> <result column="annex" jdbcType="VARCHAR" property="annex"/>
<result column="financial_remarks" jdbcType="VARCHAR" property="financialRemarks" />
<result column="annex" jdbcType="VARCHAR" property="annex" />
</resultMap> </resultMap>

View File

@@ -29,14 +29,13 @@
<result column="payment_receipt_code" jdbcType="VARCHAR" property="paymentReceiptCode"/> <result column="payment_receipt_code" jdbcType="VARCHAR" property="paymentReceiptCode"/>
<result column="pay_serial_number" jdbcType="VARCHAR" property="paySerialNumber"/> <result column="pay_serial_number" jdbcType="VARCHAR" property="paySerialNumber"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/> <result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="xgj_fail_reason" jdbcType="VARCHAR" property="xgjFailReason"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id,shop_id, partner_id, line_id, pay_status, pay_type, pay_user_name, pay_account, bank_code, id,shop_id, partner_id, line_id, pay_status, pay_type, pay_user_name, pay_account, bank_code,
bank_name, branch_bank_code, branch_bank_name, pay_time, pay_pic, promise_pic, create_time, bank_name, branch_bank_code, branch_bank_name, pay_time, pay_pic, promise_pic, create_time,
update_time, create_user_id, update_user_id, update_time, create_user_id, update_user_id,
deleted,pay_business_type,amount,combined_field,xgj_claim_status,payment_receipt_code,pay_serial_number, deleted,pay_business_type,amount,combined_field,xgj_claim_status,payment_receipt_code,pay_serial_number,
remark,xgj_fail_reason remark
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select select
@@ -400,7 +399,7 @@
</if> </if>
</select> </select>
<select id="getFranchiseFeePayInfoByShopId" resultType="com.cool.store.entity.LinePayDO"> <select id="getFranchiseFeePayInfoByShopId" resultType="com.cool.store.entity.LinePayDO">
select * from xfsg_line_pay where deleted = 0 and shop_id = #{shopId} and pay_business_type = 1 order by select * from xfsg_line_pay where deleted = 0 and shop_id = #{shopId} and pay_business_type = 1 order by
create_time desc create_time desc
</select> </select>
<select id="getDateHandler" resultType="com.cool.store.entity.LinePayDO"> <select id="getDateHandler" resultType="com.cool.store.entity.LinePayDO">
@@ -457,14 +456,5 @@
</foreach> </foreach>
) and pay_business_type = #{payBusinessType} ) and pay_business_type = #{payBusinessType}
</update> </update>
<update id="updateAmountAndPayUserName">
update xfsg_line_pay
set
amount = #{amount},
pay_user_name = #{payUserName},
update_time = now(),
update_user_id = #{userId}
where id = #{id}
</update>
</mapper> </mapper>

View File

@@ -23,16 +23,11 @@
<result column="deleted" jdbcType="BIT" property="deleted" /> <result column="deleted" jdbcType="BIT" property="deleted" />
<result column="audit_id" jdbcType="BIGINT" property="auditId" /> <result column="audit_id" jdbcType="BIGINT" property="auditId" />
<result column="result_type" jdbcType="TINYINT" property="resultType"/> <result column="result_type" jdbcType="TINYINT" property="resultType"/>
<result column="open_time" jdbcType="TIMESTAMP" property="openTime" />
<result column="first_day_income" jdbcType="VARCHAR" property="firstDayIncome" />
<result column="second_day_income" jdbcType="VARCHAR" property="secondDayIncome" />
<result column="third_day_income" jdbcType="VARCHAR" property="thirdDayIncome" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id,shop_id,plan_source,survey_result,survey_result_url,activity_theme,activity_theme_url, id,shop_id,plan_source,survey_result,survey_result_url,activity_theme,activity_theme_url,
submission_time,submitted_user_id,preparation_user_ids,route_completed,create_time, submission_time,submitted_user_id,preparation_user_ids,route_completed,create_time,
update_time,create_user_id,update_user_id,deleted,audit_id,result_type,open_time, update_time,create_user_id,update_user_id,deleted,audit_id,result_type
first_day_income,second_day_income,third_day_income
</sql> </sql>
<update id="updateByShopId"> <update id="updateByShopId">
update xfsg_opening_operation_plan update xfsg_opening_operation_plan
@@ -49,20 +44,6 @@
and and
deleted = 0 deleted = 0
</select> </select>
<select id="selectByShopIds" resultType="com.cool.store.entity.OpeningOperationPlanDO">
select
<include refid="Base_Column_List"/>
from
xfsg_opening_operation_plan
where deleted = 0
<if test="shopIds != null and shopIds.size() > 0">
and shop_id in
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
#{shopId}
</foreach>
</if>
</select>
<select id="getOpenPlanShopListByCondition" <select id="getOpenPlanShopListByCondition"
resultType="com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO"> resultType="com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO">
select si.id as shopId, si.region_id AS regionId,si.line_id as lineId, si.shop_name as shopName, select si.id as shopId, si.region_id AS regionId,si.line_id as lineId, si.shop_name as shopName,

View File

@@ -1,68 +0,0 @@
<?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">
<!--mybatis-3-mapper.dtd:约束文件的名称限制和检查在当前文件中出现的标签和属性符合mybatis的要求-->
<!--namespace命名空间要有唯一的值要求使用dao接口的权限定名称一个dao接口对应一个mappernamespace指明对应哪个dao接口-->
<mapper namespace="com.cool.store.mapper.ReceivingBankMapper">
<!-- 所有的数据库操作都要写在mapper标签中可以使用特定的标签表示数据库中的特定操作 -->
<resultMap id="BaseResultMap" type="com.cool.store.entity.ReceivingBankDO">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="regionId" column="region_id" jdbcType="BIGINT"/>
<result property="franchiseBrand" column="franchise_brand" jdbcType="INTEGER"/>
<result property="payType" column="pay_type" jdbcType="TINYINT"/>
<result property="payee" column="payee" jdbcType="VARCHAR"/>
<result property="receivingAccount" column="receiving_account" jdbcType="VARCHAR"/>
<result property="bankName" column="bank_name" jdbcType="VARCHAR"/>
<result property="branchBankName" column="branch_bank_name" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="createUser" column="create_user" jdbcType="VARCHAR"/>
<result property="updateUser" column="update_user" jdbcType="VARCHAR"/>
<result property="deleted" column="deleted" jdbcType="TINYINT"/>
</resultMap>
<insert id="batchInsert">
<foreach collection="list" separator=";" item="item">
insert into
xfsg_receiving_bank
(region_id,franchise_brand,pay_type,payee,receiving_account,bank_name,
branch_bank_name,create_time,update_time,create_user,update_user)
values
(#{item.regionId},#{item.franchiseBrand},#{item.payType},#{item.payee},
#{item.receivingAccount},#{item.bankName},#{item.branchBankName},#{item.createTime},
#{item.updateTime},#{item.createUser},#{item.updateUser})
</foreach>
</insert>
<insert id="batchInsertOrUpdate">
<foreach collection="list" item="item" separator=";">
INSERT INTO xfsg_receiving_bank (
region_id, franchise_brand, pay_type, payee, receiving_account,
bank_name, branch_bank_name, create_time, update_time, create_user, update_user
) VALUES (
#{item.regionId}, #{item.franchiseBrand}, #{item.payType},
#{item.payee}, #{item.receivingAccount}, #{item.bankName},
#{item.branchBankName}, #{item.createTime}, #{item.updateTime},
#{item.createUser}, #{item.updateUser}
)
ON DUPLICATE KEY UPDATE
payee = VALUES(payee),
receiving_account = VALUES(receiving_account),
bank_name = VALUES(bank_name),
branch_bank_name = VALUES(branch_bank_name),
update_time = VALUES(update_time),
update_user = VALUES(update_user)
</foreach>
</insert>
<select id="getByFranchiseBrandAndRegionId" resultType="com.cool.store.entity.ReceivingBankDO">
select * from xfsg_receiving_bank
where deleted=0
<if test="franchiseBrandList !=null and franchiseBrandList.size() >0">
<foreach collection="franchiseBrandList" item="item" separator="," open="and franchise_brand in(" close=")">
#{item}
</foreach>
</if>
<if test="regionIdList !=null and regionIdList.size() >0">
<foreach collection="regionIdList" item="item" separator="," open="and region_id in(" close=")">
#{item}
</foreach>
</if>
</select>
</mapper>

View File

@@ -397,12 +397,6 @@
</foreach> </foreach>
) )
</if> </if>
<if test="request.authInvestRegionIds != null and request.authInvestRegionIds.size() > 0">
and a.invest_region_id in
<foreach collection="request.authInvestRegionIds" item="investRegionId" index="index" open="(" separator="," close=")">
#{investRegionId}
</foreach>
</if>
<if test="request.signStageStartTime != null and request.signStageEndTime"> <if test="request.signStageStartTime != null and request.signStageEndTime">
and d.actual_complete_time between #{request.signStageStartTime} and #{request.signStageEndTime} and d.actual_complete_time between #{request.signStageStartTime} and #{request.signStageEndTime}
</if> </if>

View File

@@ -378,23 +378,6 @@
</choose> </choose>
</select> </select>
<select id="getStoreByRegionIds" resultMap="BaseResultMap">
SELECT * FROM store_${enterpriseId}
<where>
is_delete = 'effective' AND store_status != 'closed'
<if test="keyword != null and keyword != ''">
AND (store_name LIKE concat('%', #{keyword}, '%') OR store_num LIKE concat('%', #{keyword}, '%'))
</if>
<if test="regionIds != null and !regionIds.isEmpty()">
AND (
<foreach collection="regionIds" item="regionId" separator=" OR ">
region_path LIKE concat('%/', #{regionId}, '/%')
</foreach>
)
</if>
</where>
</select>
<select id="storeNumStatisticsByAd" resultType="java.util.Map"> <select id="storeNumStatisticsByAd" resultType="java.util.Map">
SELECT YEAR(open_date) year, province, city, COUNT(1) store_num, QUARTER(open_date) quarter SELECT YEAR(open_date) year, province, city, COUNT(1) store_num, QUARTER(open_date) quarter
FROM store_${enterpriseId} FROM store_${enterpriseId}
@@ -422,6 +405,22 @@
</if> </if>
</select> </select>
<select id="getStoreByRegionIds" resultMap="BaseResultMap">
SELECT * FROM store_${enterpriseId}
<where>
is_delete = 'effective' AND store_status != 'closed'
<if test="keyword != null and keyword != ''">
AND (store_name LIKE concat('%', #{keyword}, '%') OR store_num LIKE concat('%', #{keyword}, '%'))
</if>
<if test="regionIds != null and !regionIds.isEmpty()">
AND (
<foreach collection="regionIds" item="regionId" separator=" OR ">
region_path LIKE concat('%/', #{regionId}, '/%')
</foreach>
)
</if>
</where>
</select>
<select id="getStoreAddress" resultType="com.cool.store.dto.store.StoreAddressDTO"> <select id="getStoreAddress" resultType="com.cool.store.dto.store.StoreAddressDTO">
SELECT * FROM store_${enterpriseId} SELECT * FROM store_${enterpriseId}
@@ -467,119 +466,6 @@
WHERE store_id = #{storeId} WHERE store_id = #{storeId}
</select> </select>
<select id="totalOpenStoreReport" resultType="com.cool.store.dto.store.StoreReportDTO">
SELECT join_brand, COUNT(1) num
FROM store_${enterpriseId} a
<where>
a.is_delete = 'effective'
AND a.store_status IN ('open', 'close_up')
<if test="joinBrandList != null and joinBrandList.size() > 0">
AND a.join_brand IN
<foreach collection="joinBrandList" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test="date != null">
AND DATE_FORMAT(a.open_date, CASE WHEN LENGTH(#{date}) = 4 THEN '%Y' ELSE '%Y-%m' END) &lt;= #{date}
</if>
<if test="domestic != null and domestic == 2">
AND LOCATE('_', a.store_num) > 0
</if>
<if test="domestic != null and domestic == 1">
AND LOCATE('_', a.store_num) = 0
</if>
AND NOT EXISTS (
SELECT 1 FROM store_business_report_exclude_${enterpriseId} b WHERE b.type = 1 AND a.store_num = b.store_num
)
</where>
GROUP BY join_brand
</select>
<select id="periodBeginStoreReport" resultType="com.cool.store.dto.store.StoreReportDTO">
SELECT join_brand, COUNT(1) num
FROM store_${enterpriseId} a
<where>
a.is_delete = 'effective'
<if test="joinBrandList != null and joinBrandList.size() > 0">
AND a.join_brand IN
<foreach collection="joinBrandList" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test="date != null">
AND DATE_FORMAT(a.open_date, CASE WHEN LENGTH(#{date}) = 4 THEN '%Y' ELSE '%Y-%m' END) &lt; #{date}
</if>
<if test="domestic != null and domestic == 2">
AND LOCATE('_', a.store_num) > 0
</if>
<if test="domestic != null and domestic == 1">
AND LOCATE('_', a.store_num) = 0
</if>
</where>
GROUP BY join_brand
</select>
<select id="newOpenStoreReport" resultType="com.cool.store.dto.store.StoreReportDTO">
SELECT join_brand, COUNT(1) num
FROM store_${enterpriseId} a
<where>
a.is_delete = 'effective'
AND a.store_status IN ('open', 'close_up', 'closed')
<if test="joinBrandList != null and joinBrandList.size() > 0">
AND a.join_brand IN
<foreach collection="joinBrandList" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test="date != null">
AND DATE_FORMAT(a.open_date, CASE WHEN LENGTH(#{date}) = 4 THEN '%Y' ELSE '%Y-%m' END) = #{date}
</if>
<if test="domestic != null and domestic == 2">
AND LOCATE('_', a.store_num) > 0
</if>
<if test="domestic != null and domestic == 1">
AND LOCATE('_', a.store_num) = 0
</if>
AND NOT EXISTS (
SELECT 1 FROM store_business_report_exclude_${enterpriseId} b WHERE b.type = 1 AND a.store_num = b.store_num
)
</where>
GROUP BY join_brand
</select>
<select id="closeStoreReport" resultType="com.cool.store.dto.store.StoreReportDTO">
SELECT join_brand, COUNT(1) num
FROM store_${enterpriseId} a
<where>
a.is_delete = 'effective'
AND a.store_status = 'closed'
<if test="joinBrandList != null and joinBrandList.size() > 0">
AND a.join_brand IN
<foreach collection="joinBrandList" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test="date != null">
AND DATE_FORMAT(a.close_store_time, CASE WHEN LENGTH(#{date}) = 4 THEN '%Y' ELSE '%Y-%m' END) = #{date}
</if>
<if test="domestic != null and domestic == 2">
AND LOCATE('_', a.store_num) > 0
AND EXISTS (
SELECT 1 FROM store_business_report_exclude_${enterpriseId} b WHERE b.type = 1 AND a.store_num = b.store_num AND b.domestic = 2
)
</if>
<if test="domestic != null and domestic == 1">
AND LOCATE('_', a.store_num) = 0
</if>
AND NOT EXISTS (
SELECT 1 FROM store_business_report_exclude_${enterpriseId} b WHERE b.type = 2 AND a.store_num = b.store_num
)
</where>
GROUP BY join_brand
</select>
<insert id="insertOrUpdateSoftOpenDate"> <insert id="insertOrUpdateSoftOpenDate">
INSERT INTO store_extend_info_${enterpriseId}(store_id, soft_open_date) INSERT INTO store_extend_info_${enterpriseId}(store_id, soft_open_date)
VALUES VALUES

View File

@@ -1,38 +0,0 @@
<?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.ThirdPartyAccountMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.ThirdPartyAccountDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
<result column="local_store_code" jdbcType="VARCHAR" property="localStoreCode" />
<result column="third_party_account_id" jdbcType="VARCHAR" property="thirdPartyAccountId" />
<result column="third_party_store_id" jdbcType="VARCHAR" property="thirdPartyStoreId" />
<result column="account_type" jdbcType="TINYINT" property="accountType" />
<result column="position_id" jdbcType="TINYINT" property="positionId" />
<result column="is_valid" jdbcType="TINYINT" property="isValid" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<select id="getByCodeAndMobile" resultMap="BaseResultMap">
select * from xfsg_third_party_account
where is_valid = 1
<if test="shopCode!=null and shopCode!=''">
and local_store_code = #{shopCode}
</if>
<if test="mobile!=null and mobile!=''">
and mobile = #{mobile}
</if>
</select>
<select id="exists" resultType="boolean">
SELECT COUNT(1) > 0 FROM xfsg_third_party_store
WHERE local_store_code = #{storeCode} and mobile = #{mobile}
</select>
</mapper>

View File

@@ -1,30 +0,0 @@
<?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.ThirdPartyStoreMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.ThirdPartyStoreDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="local_store_code" jdbcType="VARCHAR" property="localStoreCode" />
<result column="third_party_store_url" jdbcType="VARCHAR" property="thirdPartyStoreUrl" />
<result column="third_party_store_id" jdbcType="VARCHAR" property="thirdPartyStoreId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<select id="getByLocalStoreCode" resultMap="BaseResultMap">
select * from xfsg_third_party_store
<where>
<if test="storeCode!=null and storeCode!=''">
and local_store_code = #{storeCode}
</if>
</where>
</select>
<select id="exists" resultType="boolean">
SELECT COUNT(1) > 0 FROM xfsg_third_party_store
WHERE local_store_code = #{localStoreCode}
</select>
</mapper>

View File

@@ -214,32 +214,4 @@
</select> </select>
<select id="getBigRegionByUserId" resultType="com.cool.store.dto.BigRegionUserDTO">
select
b.`name` as name,
b.`mobile` as mobiel ,
e.`name` as regionName,
e.id as regionId
from
`user_auth_mapping_${enterpriseId}` a
left join `enterprise_user_${enterpriseId}` b on a.`user_id` = b.`user_id`
left join `enterprise_user_role_${enterpriseId}` c on a.`user_id` = c.`user_id`
left join `sys_role_${enterpriseId}` d on c.`role_id` = d.`id`
left join `region_${enterpriseId}` e on e.id = a.`mapping_id`
<where>
<if test="regionIds!=null and regionIds.size>0">
and a.`mapping_id` in
<foreach collection="regionIds" item="regionId" open="(" separator="," close=")">
#{regionId}
</foreach>
</if>
<if test="roleName!=null and roleName!=''">
and d.`role_name` = #{roleName}
</if>
</where>
</select>
</mapper> </mapper>

View File

@@ -15,9 +15,7 @@
fail_reason AS failReason, fail_reason AS failReason,
create_user_id AS createUserId, create_user_id AS createUserId,
create_time AS createTime, create_time AS createTime,
update_time AS updateTime, update_time AS updateTime
relate_store_id AS relateStoreId,
remark
FROM zxjp_withdraw_application FROM zxjp_withdraw_application
WHERE 1=1 WHERE 1=1
<if test="request.withdrawNo != null and request.withdrawNo != ''"> <if test="request.withdrawNo != null and request.withdrawNo != ''">

View File

@@ -1,46 +0,0 @@
<?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.approval.CommonApprovalLogMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.approval.CommonApprovalLogDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="application_no" jdbcType="VARCHAR" property="applicationNo" />
<result column="node_code" jdbcType="VARCHAR" property="nodeCode" />
<result column="node_name" jdbcType="VARCHAR" property="nodeName" />
<result column="handle_user_id" jdbcType="VARCHAR" property="handleUserId" />
<result column="handle_user_name" jdbcType="VARCHAR" property="handleUserName" />
<result column="result" jdbcType="VARCHAR" property="result" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="version" jdbcType="INTEGER" property="version" />
<result column="comment" jdbcType="VARCHAR" property="comment" />
<result column="operate_time" jdbcType="TIMESTAMP" property="operateTime" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="deleted" jdbcType="TINYINT" property="deleted" />
</resultMap>
<select id="getByApplicationNo" resultMap="BaseResultMap">
SELECT * FROM zxjp_common_approval_log
WHERE application_no = #{applicationNo}
AND deleted = 0
ORDER BY version ASC, id ASC
</select>
<insert id="batchInsert" parameterType="java.util.List">
INSERT INTO zxjp_common_approval_log (application_no, node_code, node_name, handle_user_id, handle_user_name, result, status, version, comment, operate_time)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.applicationNo}, #{item.nodeCode}, #{item.nodeName}, #{item.handleUserId}, #{item.handleUserName}, #{item.result}, #{item.status}, #{item.version}, #{item.comment}, #{item.operateTime})
</foreach>
</insert>
<update id="batchUpdate" parameterType="java.util.List">
<foreach collection="list" item="item" separator=";">
UPDATE zxjp_common_approval_log
SET status = #{item.status},
comment = #{item.comment},
operate_time = #{item.operateTime}
<if test="item.result != null">, result = #{item.result}</if>
WHERE id = #{item.id}
</foreach>
</update>
</mapper>

View File

@@ -1,27 +0,0 @@
<?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.contract.ContractCostMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.contract.ContractCostDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="contract_no" jdbcType="VARCHAR" property="contractNo" />
<result column="join_fee_amount" jdbcType="DECIMAL" property="joinFeeAmount" />
<result column="join_fee_frequency_years" jdbcType="DECIMAL" property="joinFeeFrequencyYears" />
<result column="join_fee_discount_amount" jdbcType="DECIMAL" property="joinFeeDiscountAmount" />
<result column="join_fee_discount_reason" jdbcType="VARCHAR" property="joinFeeDiscountReason" />
<result column="brand_usage_fee_amount" jdbcType="DECIMAL" property="brandUsageFeeAmount" />
<result column="brand_usage_fee_frequency_years" jdbcType="DECIMAL" property="brandUsageFeeFrequencyYears" />
<result column="brand_management_fee_amount" jdbcType="DECIMAL" property="brandManagementFeeAmount" />
<result column="brand_management_fee_frequency_years" jdbcType="DECIMAL" property="brandManagementFeeFrequencyYears" />
<result column="design_fee_amount" jdbcType="DECIMAL" property="designFeeAmount" />
<result column="system_usage_fee_amount" jdbcType="DECIMAL" property="systemUsageFeeAmount" />
<result column="performance_bond_amount" jdbcType="DECIMAL" property="performanceBondAmount" />
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
</resultMap>
<select id="queryByContractNo" resultMap="BaseResultMap">
SELECT * FROM zxjp_contract_cost
WHERE contract_no = #{contractNo}
ORDER BY id ASC
</select>
</mapper>

View File

@@ -1,74 +0,0 @@
<?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.contract.ContractMasterMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.contract.ContractMasterDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="contract_type" jdbcType="VARCHAR" property="contractType" />
<result column="contract_no" jdbcType="VARCHAR" property="contractNo" />
<result column="store_id" jdbcType="VARCHAR" property="storeId" />
<result column="store_code" jdbcType="VARCHAR" property="storeCode" />
<result column="brand_name" jdbcType="VARCHAR" property="brandName" />
<result column="source" jdbcType="VARCHAR" property="source" />
<result column="sign_form" jdbcType="VARCHAR" property="signForm" />
<result column="contract_years" jdbcType="DECIMAL" property="contractYears" />
<result column="start_date" jdbcType="DATE" property="startDate" />
<result column="end_date" jdbcType="DATE" property="endDate" />
<result column="contract_status" jdbcType="VARCHAR" property="contractStatus" />
<result column="currency" jdbcType="VARCHAR" property="currency" />
<result column="sign_date" jdbcType="DATE" property="signDate" />
<result column="related_contract_no" jdbcType="VARCHAR" property="relatedContractNo" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="renewal_created" jdbcType="TINYINT" property="renewalCreated" />
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
</resultMap>
<select id="queryContractMasterList" resultType="com.cool.store.vo.contract.ContractMasterListVO">
SELECT a.id AS contractId, a.contract_type, a.contract_no, a.store_code, a.brand_name,
a.source, a.sign_form, a.contract_years, a.start_date, a.end_date,
a.contract_status, a.remark, a.related_contract_no, a.create_user_id, a.created_time
<if test="request.storeNameOrCode != null and request.storeNameOrCode != ''">
, c.store_name
</if>
FROM zxjp_contract_master a
<if test="request.storeNameOrCode != null and request.storeNameOrCode != ''">
LEFT JOIN store_${enterpriseId} c ON a.store_code = c.store_num
</if>
<where>
<if test="request.contractNo != null and request.contractNo != ''">
AND a.contract_no LIKE CONCAT('%', #{request.contractNo}, '%')
</if>
<if test="request.storeNameOrCode != null and request.storeNameOrCode != ''">
AND (c.store_name LIKE CONCAT('%', #{request.storeNameOrCode}, '%') OR c.store_num LIKE CONCAT('%', #{request.storeNameOrCode}, '%'))
</if>
<if test="request.endDateStart != null">
AND a.end_date &gt;= #{request.endDateStart}
</if>
<if test="request.endDateEnd != null">
AND a.end_date &lt;= #{request.endDateEnd}
</if>
<if test="request.brandName != null and request.brandName != ''">
AND a.brand_name = #{request.brandName}
</if>
<if test="request.contractType != null and request.contractType != ''">
AND a.contract_type = #{request.contractType}
</if>
</where>
ORDER BY a.created_time DESC
</select>
<select id="queryContractsNearExpiry" resultMap="BaseResultMap">
SELECT * FROM zxjp_contract_master
WHERE end_date BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL #{days} DAY)
AND renewal_created = 0
ORDER BY end_date ASC
</select>
<select id="getLatestContractByStoreCode" resultMap="BaseResultMap">
SELECT * FROM zxjp_contract_master
WHERE store_code = #{storeCode}
ORDER BY end_date DESC
LIMIT 1
</select>
</mapper>

View File

@@ -1,48 +0,0 @@
<?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.exam.ExamAttemptAnswerMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.exam.ExamAttemptAnswerDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="attempt_id" jdbcType="BIGINT" property="attemptId" />
<result column="paper_id" jdbcType="BIGINT" property="paperId" />
<result column="paper_question_id" jdbcType="BIGINT" property="paperQuestionId" />
<result column="answer" jdbcType="VARCHAR" property="answer" />
<result column="score" jdbcType="DECIMAL" property="score" />
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<insert id="insertOrUpdate" parameterType="com.cool.store.entity.exam.ExamAttemptAnswerDO">
INSERT INTO zxjp_exam_attempt_answer (attempt_id, paper_id, paper_question_id, answer, score, create_user_id)
VALUES (#{attemptId}, #{paperId}, #{paperQuestionId}, #{answer}, #{score}, #{createUserId})
ON DUPLICATE KEY UPDATE
answer = #{answer}, score = #{score}
</insert>
<insert id="batchInsertOrUpdate" parameterType="java.util.List">
INSERT INTO zxjp_exam_attempt_answer (attempt_id, paper_id, paper_question_id, answer, score, create_user_id)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.attemptId}, #{item.paperId}, #{item.paperQuestionId}, #{item.answer}, #{item.score}, #{item.createUserId})
</foreach>
ON DUPLICATE KEY UPDATE
answer = VALUES(answer), score = VALUES(score)
</insert>
<update id="batchUpdateScore" parameterType="java.util.List">
UPDATE zxjp_exam_attempt_answer SET
score = CASE id
<foreach collection="list" item="item">
WHEN #{item.id} THEN #{item.score}
</foreach>
END
WHERE id IN
<foreach collection="list" item="item" open="(" separator="," close=")">
#{item.id}
</foreach>
</update>
</mapper>

View File

@@ -1,33 +0,0 @@
<?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.exam.ExamAttemptMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.exam.ExamAttemptDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="exam_id" jdbcType="BIGINT" property="examId" />
<result column="paper_id" jdbcType="BIGINT" property="paperId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
<result column="deadline_time" jdbcType="TIMESTAMP" property="deadlineTime" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="submit_type" jdbcType="INTEGER" property="submitType" />
<result column="total_score" jdbcType="DECIMAL" property="totalScore" />
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<select id="getAttemptCount" resultType="java.util.Map">
SELECT COUNT(1) AS attempt_count, exam_id FROM zxjp_exam_attempt
WHERE exam_id IN
<foreach item="item" collection="examInfoIds" separator="," open="(" close=")">
#{item}
</foreach>
GROUP BY exam_id
</select>
</mapper>

View File

@@ -1,27 +0,0 @@
<?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.exam.ExamInfoMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.exam.ExamInfoDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="paper_id" jdbcType="BIGINT" property="paperId" />
<result column="exam_name" jdbcType="VARCHAR" property="examName" />
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
<result column="duration_minutes" jdbcType="INTEGER" property="durationMinutes" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="entry_token" jdbcType="VARCHAR" property="entryToken" />
<result column="qrcode_url" jdbcType="VARCHAR" property="qrcodeUrl" />
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="deleted" jdbcType="INTEGER" property="deleted" />
</resultMap>
<select id="selectByToken" parameterType="java.lang.String" resultMap="BaseResultMap">
SELECT * FROM zxjp_exam_info
WHERE entry_token = #{token} AND deleted = 0
</select>
</mapper>

View File

@@ -1,19 +0,0 @@
<?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.exam.ExamPaperMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.exam.ExamPaperDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="paper_name" jdbcType="VARCHAR" property="paperName" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="total_score" jdbcType="DECIMAL" property="totalScore" />
<result column="enable" jdbcType="INTEGER" property="enable" />
<result column="start_exam" jdbcType="INTEGER" property="startExam" />
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="deleted" jdbcType="INTEGER" property="deleted" />
</resultMap>
</mapper>

View File

@@ -1,44 +0,0 @@
<?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.exam.ExamPaperQuestionMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.exam.ExamPaperQuestionDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="paper_id" jdbcType="BIGINT" property="paperId" />
<result column="question_id" jdbcType="BIGINT" property="questionId" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="difficulty" jdbcType="INTEGER" property="difficulty" />
<result column="answer" jdbcType="VARCHAR" property="answer" />
<result column="score" jdbcType="DECIMAL" property="score" />
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="deleted" jdbcType="INTEGER" property="deleted" />
<result column="question_stem" jdbcType="LONGVARCHAR" property="questionStem" />
<result column="analysis" jdbcType="LONGVARCHAR" property="analysis" />
<result column="options" jdbcType="LONGVARCHAR" property="options" />
</resultMap>
<!-- 批量插入试卷题目 -->
<insert id="insertBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
INSERT INTO zxjp_exam_paper_question (
paper_id, question_id, type, difficulty, answer, score,
question_stem, analysis, options, deleted, create_user_id, create_time, update_time
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.paperId}, #{item.questionId}, #{item.type}, #{item.difficulty}, #{item.answer}, #{item.score},
#{item.questionStem}, #{item.analysis}, #{item.options}, #{item.deleted}, #{item.createUserId}, #{item.createTime}, #{item.updateTime}
)
</foreach>
</insert>
<!-- 根据试卷ID批量删除逻辑删除 -->
<update id="deleteByPaperId">
UPDATE zxjp_exam_paper_question
SET deleted = 1, update_time = #{updateTime}
WHERE paper_id = #{paperId} AND deleted = 0
</update>
</mapper>

View File

@@ -1,22 +0,0 @@
<?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.exam.ExamQuestionMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.exam.ExamQuestionDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="difficulty" jdbcType="INTEGER" property="difficulty" />
<result column="enable" jdbcType="INTEGER" property="enable" />
<result column="answer" jdbcType="VARCHAR" property="answer" />
<result column="score" jdbcType="DECIMAL" property="score" />
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="deleted" jdbcType="INTEGER" property="deleted" />
<result column="question_stem" jdbcType="LONGVARCHAR" property="questionStem" />
<result column="analysis" jdbcType="LONGVARCHAR" property="analysis" />
<result column="options" jdbcType="LONGVARCHAR" property="options" />
</resultMap>
</mapper>

View File

@@ -1,61 +0,0 @@
<?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.renewal.RenewalApplicationMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.renewal.RenewalApplicationDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="application_no" jdbcType="VARCHAR" property="applicationNo" />
<result column="store_code" jdbcType="VARCHAR" property="storeCode" />
<result column="original_contract_no" jdbcType="VARCHAR" property="originalContractNo" />
<result column="contract_expire_date" jdbcType="DATE" property="contractExpireDate" />
<result column="is_deleted" jdbcType="TINYINT" property="isDeleted" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="other_method" jdbcType="TINYINT" property="otherMethod" />
<result column="is_renovate" jdbcType="TINYINT" property="isRenovate" />
<result column="apply_time" jdbcType="TIMESTAMP" property="applyTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_user_name" jdbcType="VARCHAR" property="createUserName" />
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
</resultMap>
<select id="queryRenewalApplicationList" resultType="com.cool.store.vo.renewal.RenewalApplicationListVO">
SELECT a.id AS renewalId, a.application_no, a.store_code, a.contract_expire_date,
a.is_renovate, a.status, c.join_brand, c.store_name, c.store_address, c.join_brand AS brandName
FROM zxjp_renewal_application a
LEFT JOIN store_${enterpriseId} c ON a.store_code = c.store_num
<where>
a.is_deleted = 0
<if test="request.keyword != null and request.keyword != ''">
AND (c.store_name LIKE CONCAT('%', #{request.keyword}, '%') OR c.store_num LIKE CONCAT('%', #{request.keyword}, '%'))
</if>
<if test="request.regionId != null">
AND c.region_path LIKE CONCAT('%/', #{request.regionId}, '/%')
</if>
<if test="regionIds != null and !regionIds.isEmpty()">
AND <foreach collection="regionIds" item="regionId" separator=" OR " open="(" close=")">
c.region_path LIKE CONCAT('%/', #{regionId}, '/%')
</foreach>
</if>
<if test="request.contractStartDateStart != null">
AND a.contract_expire_date &gt;= #{request.contractStartDateStart}
</if>
<if test="request.contractStartDateEnd != null">
AND a.contract_expire_date &lt;= #{request.contractStartDateEnd}
</if>
<if test="request.contractEndDateStart != null">
AND a.contract_expire_date &gt;= #{request.contractEndDateStart}
</if>
<if test="request.contractEndDateEnd != null">
AND a.contract_expire_date &lt;= #{request.contractEndDateEnd}
</if>
<if test="request.isRenovate != null">
AND a.is_renovate = #{request.isRenovate}
</if>
<if test="request.status != null">
AND a.status = #{request.status}
</if>
</where>
ORDER BY a.created_time DESC
</select>
</mapper>

View File

@@ -1,14 +0,0 @@
<?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.renewal.RenewalApplicationSignerInfoMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.renewal.RenewalApplicationSignerInfoDO">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="application_no" jdbcType="VARCHAR" property="applicationNo"/>
<result column="signer1_name" jdbcType="VARCHAR" property="signer1Name"/>
<result column="signer1_mobile" jdbcType="VARCHAR" property="signer1Mobile"/>
<result column="signer2_name" jdbcType="VARCHAR" property="signer2Name"/>
<result column="signer2_mobile" jdbcType="VARCHAR" property="signer2Mobile"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createdTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updatedTime"/>
</resultMap>
</mapper>

View File

@@ -1,22 +0,0 @@
<?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.renewal.RenewalRenovateApprovalMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.renewal.RenewalRenovateApprovalDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="application_no" jdbcType="VARCHAR" property="applicationNo" />
<result column="shop_area_id" jdbcType="BIGINT" property="shopAreaId" />
<result column="decoration_attributes" jdbcType="VARCHAR" property="decorationAttributes" />
<result column="decoration_level" jdbcType="VARCHAR" property="decorationLevel" />
<result column="decoration_requirement" jdbcType="VARCHAR" property="decorationRequirement" />
<result column="special_instruction" jdbcType="VARCHAR" property="specialInstruction" />
<result column="video_url" jdbcType="VARCHAR" property="videoUrl" />
<result column="shop_front_photo_url" jdbcType="VARCHAR" property="shopFrontPhotoUrl" />
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
</resultMap>
<select id="getByApplicationNo" resultMap="BaseResultMap">
SELECT * FROM zxjp_renewal_renovate_approval
WHERE application_no = #{applicationNo}
</select>
</mapper>

View File

@@ -1,128 +0,0 @@
<?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.StoreBusinessReportMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.store.StoreBusinessReportDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="join_brand" jdbcType="TINYINT" property="joinBrand" />
<result column="domestic" jdbcType="BIT" property="domestic" />
<result column="date" jdbcType="VARCHAR" property="date" />
<result column="open_total_num" jdbcType="INTEGER" property="openTotalNum" />
<result column="period_begin_num" jdbcType="INTEGER" property="periodBeginNum" />
<result column="new_open_num" jdbcType="INTEGER" property="newOpenNum" />
<result column="close_num" jdbcType="INTEGER" property="closeNum" />
<result column="period_end_num" jdbcType="INTEGER" property="periodEndNum" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<sql id="Base_Column_List">
id, join_brand, domestic, date, open_total_num, period_begin_num, new_open_num, close_num,
period_end_num, create_time
</sql>
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
insert into store_business_report_${enterpriseId}
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="record.joinBrand != null">
join_brand,
</if>
<if test="record.domestic != null">
domestic,
</if>
<if test="record.date != null">
date,
</if>
<if test="record.openTotalNum != null">
open_total_num,
</if>
<if test="record.periodBeginNum != null">
period_begin_num,
</if>
<if test="record.newOpenNum != null">
new_open_num,
</if>
<if test="record.closeNum != null">
close_num,
</if>
<if test="record.periodEndNum != null">
period_end_num,
</if>
<if test="record.createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="record.joinBrand != null">
#{record.joinBrand},
</if>
<if test="record.domestic != null">
#{record.domestic},
</if>
<if test="record.date != null">
#{record.date},
</if>
<if test="record.openTotalNum != null">
#{record.openTotalNum},
</if>
<if test="record.periodBeginNum != null">
#{record.periodBeginNum},
</if>
<if test="record.newOpenNum != null">
#{record.newOpenNum},
</if>
<if test="record.closeNum != null">
#{record.closeNum},
</if>
<if test="record.periodEndNum != null">
#{record.periodEndNum},
</if>
<if test="record.createTime != null">
#{record.createTime},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective">
update store_business_report_${enterpriseId}
<set>
<if test="record.joinBrand != null">
join_brand = #{record.joinBrand},
</if>
<if test="record.domestic != null">
domestic = #{record.domestic},
</if>
<if test="record.date != null">
date = #{record.date},
</if>
<if test="record.openTotalNum != null">
open_total_num = #{record.openTotalNum},
</if>
<if test="record.periodBeginNum != null">
period_begin_num = #{record.periodBeginNum},
</if>
<if test="record.newOpenNum != null">
new_open_num = #{record.newOpenNum},
</if>
<if test="record.closeNum != null">
close_num = #{record.closeNum},
</if>
<if test="record.periodEndNum != null">
period_end_num = #{record.periodEndNum},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime},
</if>
</set>
where id = #{record.id}
</update>
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
INSERT INTO store_business_report_${enterpriseId} (join_brand,domestic,date,open_total_num,period_begin_num,new_open_num,close_num,period_end_num) VALUES
<foreach collection="list" item="item" separator=",">
(#{item.joinBrand},#{item.domestic},#{item.date},#{item.openTotalNum},#{item.periodBeginNum},#{item.newOpenNum},#{item.closeNum},#{item.periodEndNum})
</foreach>
ON DUPLICATE KEY UPDATE
domestic = VALUES(domestic),
open_total_num = VALUES(open_total_num),
period_begin_num = VALUES(period_begin_num),
new_open_num = VALUES(new_open_num),
close_num = VALUES(close_num),
period_end_num = VALUES(period_end_num)
</insert>
</mapper>

View File

@@ -1,21 +0,0 @@
package com.cool.store.dto;
import lombok.Data;
/**
* @Auther zx_szh
* @Date 2026/1/7 11:28
* @Version 1.0
*/
@Data
public class BigRegionUserDTO {
private String name;
private String mobile;
private String regionName;
private Long regionId;
}

View File

@@ -1,22 +0,0 @@
package com.cool.store.dto;
import lombok.Data;
import java.util.List;
/**
* @Auther zx_szh
* @Date 2026/1/7 14:01
* @Version 1.0
*/
@Data
public class BigRegionUserListDTO {
private Long regionId;
private String regionName;
private List<UserDTO> specialRoleUserList;
}

View File

@@ -1,43 +0,0 @@
package com.cool.store.dto;
import com.cool.store.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2025/6/19 19:29
* @Version 1.0
*/
@Data
public class ImportReceivingBankDTO {
@ApiModelProperty(value = "品牌")
@Excel(name = "品牌")
private String franchiseBrand;
@ApiModelProperty(value = "大区")
@Excel(name = "大区")
private String regionName;
@ApiModelProperty(value = "付款方式")
@Excel(name = "付款方式")
private String payType;
@ApiModelProperty(value = "收款人")
@Excel(name = "收款人")
private String payee;
@ApiModelProperty(value = "收款账户")
@Excel(name = "收款账户")
private String receivingAccount;
@ApiModelProperty(value = "收款银行")
@Excel(name = "收款银行")
private String bankName;
@ApiModelProperty(value = "收款银行开户行")
@Excel(name = "收款银行开户行")
private String branchBankName;
}

View File

@@ -1,60 +0,0 @@
package com.cool.store.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* @Author: WangShuo
* @Date: 2025/06/19/10:42
* @Version 1.0
* @注释:
*/
@Data
public class ImportReceivingBankErrorDTO {
@ApiModelProperty(value = "品牌")
@ExcelProperty(value = "品牌",order = 1)
@ColumnWidth(30)
private String franchiseBrand;
@ApiModelProperty(value = "大区")
@ExcelProperty(value = "大区",order = 2)
@ColumnWidth(30)
private String regionName;
@ApiModelProperty(value = "付款方式")
@ExcelProperty(value = "付款方式",order = 3)
@ColumnWidth(30)
private String payType;
@ApiModelProperty(value = "收款人")
@ExcelProperty(value = "收款人",order = 4)
@ColumnWidth(30)
private String payee;
@ApiModelProperty(value = "收款账户")
@ExcelProperty(value = "收款账户",order = 5)
@ColumnWidth(30)
private String receivingAccount;
@ApiModelProperty(value = "收款银行")
@ExcelProperty(value = "收款银行",order = 6)
@ColumnWidth(30)
private String bankName;
@ApiModelProperty(value = "收款银行开户行")
@ExcelProperty(value = "收款银行开户行",order = 7)
@ColumnWidth(30)
private String branchBankName;
@ExcelProperty(value = "失败原因",order = 8)
@ColumnWidth(30)
private String errorMsg;
}

View File

@@ -1,27 +0,0 @@
package com.cool.store.dto;
import com.cool.store.annotation.Excel;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2025/11/20 18:56
* @Version 1.0
*/
@Data
public class StoreImageExportDTO {
/**
* 门店编码
*/
@Excel(name = "门店编码")
private String storeCode;
@Excel(name = "门店名称")
private String storeName;
/**
* 图片URLOSS公网地址
*/
@Excel(name = "图片")
private String imageUrl;
}

View File

@@ -1,19 +0,0 @@
package com.cool.store.dto.exam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* 题目答案DTO
*/
@Data
public class ExamAnswerDTO {
@ApiModelProperty(value = "正确答案选项列表,如[\"A\",\"B\"]")
private List<String> options;
@ApiModelProperty(value = "判断题答案true-正确 false-错误")
private Boolean judgment;
}

Some files were not shown because too many files have changed in this diff Show More