Merge #98 into master from cc_20260408_trans
feat:mock 处理
* cc_20260408_trans: (22 commits squashed)
- feat:分账
- feat:分账接口
- feat:分账单管理
- feat:分账管理
- feat:分账管理
- feat:userIdName
- feat:提现
- feat:调整
- feat:accountName
- feat:accountName
- feat:mock
- feat:关联门店
- feat:待充值待认款
- feat:待充值待认款
- feat:payer_account_no
- feat:payeeAccountName
- feat:payeeAccountNo
- feat:page
- feat:枚举
- feat:接口请求方式调整get->post
- feat:mock 处理
- Merge branch 'master' into cc_20260408_trans
# Conflicts:
#	coolstore-partner-common/src/main/java/com/cool/store/constants/RedisConstant.java
#	coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java
Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/98
This commit is contained in:
@@ -385,6 +385,10 @@ public class RedisConstant {
|
||||
*/
|
||||
public static final String WALLET_ALLOCATION_PAY_LOCK_KEY = "wallet_allocation_pay_lock_key:{0}";
|
||||
|
||||
public static final String WALLET_TRANSFER_LOCK = "wallet_transfer_lock:{0}";
|
||||
|
||||
public static final String WALLET_WITHDRAW_LOCK = "wallet_withdraw_lock:{0}";
|
||||
|
||||
/**
|
||||
* 私域设备SN->绑定二维码地址
|
||||
*/
|
||||
|
||||
@@ -373,16 +373,36 @@ public enum ErrorCodeEnum {
|
||||
|
||||
//装修
|
||||
TEAM_USED(1612001,"该装修团队有门店使用,无法删除,请确认!",null),
|
||||
CURRENT_BRAND_SORT_NUMBER_EXIST(16100007,"已存在该排序数字!",null),
|
||||
CONTRACT_CONFIG_NOT_EXIST(16100008,"合同配置不存在!",null),
|
||||
CURRENT_BRAND_SORT_NUMBER_EXIST(1612002,"已存在该排序数字!",null),
|
||||
CONTRACT_CONFIG_NOT_EXIST(1612003,"合同配置不存在!",null),
|
||||
|
||||
|
||||
WALLET_OPEN_ACCOUNT_FAIL(1620001,"钱包开通失败",null),
|
||||
WALLET_WITH_DRAWER_FAIL(1620002,"提现失败",null),
|
||||
WALLET_API_ERROR(1620003,"{0}",null),
|
||||
MINI_PROGRAM_VERSION_TOO_LOW(1620004,"小程序版本过低,请刷新小程序再操作!",null),
|
||||
CONTRACT_SIGNED(600002, "操作失败,合同签约已完成", null),
|
||||
CONTRACT_SIGNED(1620006, "操作失败,合同签约已完成", null),
|
||||
ZXJP_AMOUNT_INSTRUCTION_IS_BLANK(1620005, "鸡排价格不为10元,请填写原因", null),
|
||||
|
||||
|
||||
//分账
|
||||
TRANS_ID_NOT_NULL(1621001, "分账单ID不能为空!", null),
|
||||
TRANS_NOT_NULL(1621002, "分账单不存在!", null),
|
||||
NOT_SUPPORT_OPERATION(1621003, "当前状态不支持该操作!", null),
|
||||
CHANGE_ID_NOT_NULL(1621004, "调整单ID不能为空!", null),
|
||||
CHANGE_NOT_NULL(1621005, "调整单不存在!", null),
|
||||
TRADE_EXIST(1621006, "部分交易流水号已被使用,请检查!", null),
|
||||
NOT_COMPLETE_TRANS_SHEET(1621007, "存在关联未分账完成的分账单,请完成之后再操作!", null),
|
||||
PENDING_TRANS_AMOUNT(1621008, "分账金额不能大于待分账金额!", null),
|
||||
TRANSFER_ERROR(1621009, "分账异常!", null),
|
||||
TRANSFER_ING(1621010, "分账中,请勿重复分账!", null),
|
||||
WITHDRAW_APPLY_NOT_EXIST(1621011, "提现申请单不存在!", null),
|
||||
WITHDRAW_ING(1621012, "提现中,请勿重复分账!", null),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 171闭店
|
||||
CLOSE_STORE_SUB_STAGE_ERROR(171002, "当前流程状态异常", null),
|
||||
STORE_NOT_EXIST(1710003,"门店不存在!",null),
|
||||
@@ -454,8 +474,10 @@ public enum ErrorCodeEnum {
|
||||
WALLET_RE_PAY_FAIL(1830019, "重新支付异常,请联系管理员", null),
|
||||
WALLET_PAY_CANNOT_CANCEL(1830020, "该交易无法取消", null),
|
||||
TOTAL_FEES_NEED_EQUAL(1830021, "分账总金额需与合计缴费金额一致", null),
|
||||
NOT_EXIST_WANG_SHANG_ACCOUNT(1830022, "当前门店未开通网商钱包账户,请先开通!", null),
|
||||
|
||||
IP_LIMIT(1840000, "IP访问次数超限", null),
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
/**
|
||||
* 费用单类型枚举
|
||||
*/
|
||||
public enum ExpenseSheetTypeEnum {
|
||||
|
||||
EXPENSE_SHEET(1, "费用单"),
|
||||
ADJUSTMENT_SHEET(2, "调整单");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
|
||||
ExpenseSheetTypeEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据code获取枚举
|
||||
*/
|
||||
public static ExpenseSheetTypeEnum getByCode(Integer code) {
|
||||
if (code == null) {
|
||||
return null;
|
||||
}
|
||||
for (ExpenseSheetTypeEnum typeEnum : values()) {
|
||||
if (typeEnum.getCode().equals(code)) {
|
||||
return typeEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.cool.store.enums.fees;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 提现状态枚举类
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WithdrawStatusEnum {
|
||||
|
||||
PAID(1, "已分账"),
|
||||
FAIL(2, "分账失败"),
|
||||
PAYING(3, "分账中"),
|
||||
PENDING(5, "待分账"),
|
||||
;
|
||||
|
||||
private final Integer status;
|
||||
|
||||
private final String desc;
|
||||
|
||||
public static String getDescByStatus(Integer status) {
|
||||
for (WithdrawStatusEnum value : values()) {
|
||||
if (value.status.equals(status)) {
|
||||
return value.desc;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.cool.store.enums.wallet;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/9 09:35
|
||||
* @Version 1.0
|
||||
*/
|
||||
public enum DocStatusEnum {
|
||||
|
||||
//10-待充值/20-已充值待认款/30-认款完成/40-分部分账/50-分账完成
|
||||
DOC_STATUS_1(10,"待充值"),
|
||||
DOC_STATUS_2(20,"已充值待认款"),
|
||||
DOC_STATUS_3(30,"认款完成"),
|
||||
DOC_STATUS_4(40,"部分分账"),
|
||||
DOC_STATUS_5(50,"分账完成"),
|
||||
;
|
||||
|
||||
private final Integer status;
|
||||
|
||||
private final String desc;
|
||||
|
||||
DocStatusEnum(Integer status, String desc) {
|
||||
this.status = status;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.cool.store.enums.wallet;
|
||||
|
||||
import com.cool.store.enums.ExpenseSheetTypeEnum;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/8 16:56
|
||||
* @Version 1.0
|
||||
*/
|
||||
public enum SplitSourceEnum {
|
||||
|
||||
//1-手工新增/2-费用调整单/3-费用单
|
||||
ADD_BY_HAND(1,"手工新增"),
|
||||
FEE_ADJUSTMENT_ORDER(2,"费用调整单"),
|
||||
EXPENSE_LIST(3,"费用单")
|
||||
;
|
||||
|
||||
|
||||
private final Integer status;
|
||||
|
||||
private final String desc;
|
||||
|
||||
SplitSourceEnum(Integer status, String desc) {
|
||||
this.status = status;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static SplitSourceEnum getSplitSourceEnum(Integer expenseSheetType){
|
||||
if (ExpenseSheetTypeEnum.ADJUSTMENT_SHEET.getCode().equals(expenseSheetType)){
|
||||
return FEE_ADJUSTMENT_ORDER;
|
||||
}
|
||||
if (ExpenseSheetTypeEnum.EXPENSE_SHEET.getCode().equals(expenseSheetType)){
|
||||
return EXPENSE_LIST;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.cool.store.enums.wallet;
|
||||
|
||||
import com.cool.store.enums.ExpenseSheetTypeEnum;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/9 19:01
|
||||
* @Version 1.0
|
||||
*/
|
||||
public enum SplitTypeEnum {
|
||||
|
||||
|
||||
//(1-门店付款/2-门店收款/3-公司间结算)
|
||||
ADD_BY_HAND(1,"门店付款"),
|
||||
FEE_ADJUSTMENT_ORDER(2,"门店收款"),
|
||||
EXPENSE_LIST(3,"公司间结算")
|
||||
;
|
||||
|
||||
|
||||
private final Integer status;
|
||||
|
||||
private final String desc;
|
||||
|
||||
SplitTypeEnum(Integer status, String desc) {
|
||||
this.status = status;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.cool.store.enums.wallet;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/13 09:54
|
||||
* @Version 1.0
|
||||
* @desc 交易类型 1-转账 2-提现
|
||||
*/
|
||||
public enum TradeTypeEnum {
|
||||
|
||||
ADD_BY_HAND(1,"转账"),
|
||||
FEE_ADJUSTMENT_ORDER(2,"提现"),
|
||||
;
|
||||
|
||||
private final Integer status;
|
||||
|
||||
private final String desc;
|
||||
|
||||
TradeTypeEnum(Integer status, String desc) {
|
||||
this.status = status;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,6 +17,7 @@ public enum WalletTradeModuleEnum {
|
||||
|
||||
FRANCHISE_PAY("FRANCHISE_PAY", "钱包加盟缴费"),
|
||||
STANDARD_STORE("STANDARD_STORE", "标准店缴费"),
|
||||
TRANSFER("TRANSFER", "分账管理"),
|
||||
;
|
||||
|
||||
private final String module;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.utils;
|
||||
|
||||
import com.cool.store.enums.ExpenseSheetTypeEnum;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
@@ -15,6 +17,11 @@ import static com.cool.store.utils.CoolDateUtils.DATE_FORMAT_SEC_9;
|
||||
*/
|
||||
public class GenerateNoUtil {
|
||||
|
||||
|
||||
private static final String ADJUSTMENT_ORDER_PREFIX = "TZ";
|
||||
private static final String EXPENSE_SHEET_PREFIX = "FY";
|
||||
private static final String SPLIT_ORDER_PREFIX = "FZ";
|
||||
|
||||
/**
|
||||
* 生成编号,yyyyMMddHHmmssSSS+3位随机数
|
||||
*/
|
||||
@@ -22,4 +29,25 @@ public class GenerateNoUtil {
|
||||
DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern(DATE_FORMAT_SEC_9);
|
||||
return LocalDateTime.now().format(dateFormatter) + ((int) (Math.random() * 900) + 100);
|
||||
}
|
||||
|
||||
/**
|
||||
* 单号
|
||||
* @param prefix
|
||||
* @return
|
||||
*/
|
||||
public static String generateNo(String prefix) {
|
||||
return prefix + GenerateNoUtil.generateMillsNoWithRandom();
|
||||
}
|
||||
|
||||
public static String generateAdjustmentNo(Integer expenseSheetType) {
|
||||
if (ExpenseSheetTypeEnum.ADJUSTMENT_SHEET.getCode().equals(expenseSheetType)){
|
||||
return ADJUSTMENT_ORDER_PREFIX + GenerateNoUtil.generateMillsNoWithRandom();
|
||||
}
|
||||
return EXPENSE_SHEET_PREFIX + GenerateNoUtil.generateMillsNoWithRandom();
|
||||
}
|
||||
|
||||
public static String generateSplitNo() {
|
||||
return SPLIT_ORDER_PREFIX + GenerateNoUtil.generateMillsNoWithRandom();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.AdjustmentOrderDO;
|
||||
import com.cool.store.mapper.AdjustmentOrderMapper;
|
||||
import com.cool.store.request.AdjustmentOrderPageRequest;
|
||||
import com.cool.store.response.AdjustmentOrderResponse;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 费用调整单 DAO
|
||||
*/
|
||||
@Repository
|
||||
public class AdjustmentOrderDAO {
|
||||
|
||||
@Resource
|
||||
private AdjustmentOrderMapper AdjustmentOrderMapper;
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
*/
|
||||
public AdjustmentOrderDO getById(Long id) {
|
||||
if (id == null) {
|
||||
return null;
|
||||
}
|
||||
return AdjustmentOrderMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据调整单号查询
|
||||
*/
|
||||
public AdjustmentOrderDO getByAdjustmentNo(String adjustmentNo) {
|
||||
if (StringUtils.isBlank(adjustmentNo)) {
|
||||
return null;
|
||||
}
|
||||
return AdjustmentOrderMapper.getByAdjustmentNo(adjustmentNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据状态查询
|
||||
*/
|
||||
public List<AdjustmentOrderDO> listByStatus(Integer status) {
|
||||
return AdjustmentOrderMapper.listByStatus(status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据关联分账单号查询
|
||||
*/
|
||||
public List<AdjustmentOrderDO> listByRelatedSplitNo(String relatedSplitNo) {
|
||||
if (StringUtils.isBlank(relatedSplitNo)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return AdjustmentOrderMapper.listByRelatedSplitNo(relatedSplitNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据门店ID查询
|
||||
|
||||
*/
|
||||
public List<AdjustmentOrderDO> listByStoreId(String storeId) {
|
||||
if (StringUtils.isBlank(storeId)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return AdjustmentOrderMapper.listByStoreId(storeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
public int insert(AdjustmentOrderDO record) {
|
||||
if (record == null) {
|
||||
return 0;
|
||||
}
|
||||
return AdjustmentOrderMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
public int update(AdjustmentOrderDO record) {
|
||||
if (record == null || record.getId() == null) {
|
||||
return 0;
|
||||
}
|
||||
return AdjustmentOrderMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新状态
|
||||
*/
|
||||
public int batchUpdateStatus(List<Long> ids, Integer status) {
|
||||
if (CollectionUtils.isEmpty(ids) || status == null) {
|
||||
return 0;
|
||||
}
|
||||
return AdjustmentOrderMapper.batchUpdateStatus(ids, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID更新关联分账单号
|
||||
*/
|
||||
public int updateRelatedSplitNo(Long id, String relatedSplitNo) {
|
||||
if (id == null || StringUtils.isBlank(relatedSplitNo)) {
|
||||
return 0;
|
||||
}
|
||||
return AdjustmentOrderMapper.updateRelatedSplitNo(id, relatedSplitNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
public List<AdjustmentOrderResponse> pageQuery(AdjustmentOrderPageRequest request) {
|
||||
return AdjustmentOrderMapper.pageQuery(request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
public int delete(Long id) {
|
||||
if (id == null) {
|
||||
return 0;
|
||||
}
|
||||
return AdjustmentOrderMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.ExpenseMappingDO;
|
||||
import com.cool.store.mapper.ExpenseMappingMapper;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 费用单流水调整单映射表 DAO
|
||||
*/
|
||||
@Repository
|
||||
public class ExpenseMappingDAO {
|
||||
|
||||
@Resource
|
||||
private ExpenseMappingMapper expenseMappingMapper;
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
*/
|
||||
public ExpenseMappingDO getById(Long id) {
|
||||
if (id == null) {
|
||||
return null;
|
||||
}
|
||||
return expenseMappingMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据网商交易流水号查询
|
||||
*/
|
||||
public ExpenseMappingDO getByTradeNo(String trandNo) {
|
||||
if (StringUtils.isBlank(trandNo)) {
|
||||
return null;
|
||||
}
|
||||
return expenseMappingMapper.getByTradeNo(trandNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据费用单号查询
|
||||
*/
|
||||
public ExpenseMappingDO getByRelatedAdjustmentNo(String relatedAdjustmentNo) {
|
||||
if (StringUtils.isBlank(relatedAdjustmentNo)) {
|
||||
return null;
|
||||
}
|
||||
return expenseMappingMapper.getByRelatedAdjustmentNo(relatedAdjustmentNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
public int insert(ExpenseMappingDO record) {
|
||||
if (record == null) {
|
||||
return 0;
|
||||
}
|
||||
return expenseMappingMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
public int update(ExpenseMappingDO record) {
|
||||
if (record == null || record.getId() == null) {
|
||||
return 0;
|
||||
}
|
||||
return expenseMappingMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
public int delete(Long id) {
|
||||
if (id == null) {
|
||||
return 0;
|
||||
}
|
||||
return expenseMappingMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量插入
|
||||
*/
|
||||
public int batchInsert(List<ExpenseMappingDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return 0;
|
||||
}
|
||||
return expenseMappingMapper.batchInsert(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据交易流水号列表批量查询
|
||||
*/
|
||||
public List<ExpenseMappingDO> listByTradeNos(List<String> tradeNos) {
|
||||
if (CollectionUtils.isEmpty(tradeNos)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return expenseMappingMapper.listByTradeNos(tradeNos);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据费用单号查询列表
|
||||
*/
|
||||
public List<ExpenseMappingDO> listByRelatedAdjustmentNo(String relatedAdjustmentNo) {
|
||||
if (StringUtils.isBlank(relatedAdjustmentNo)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return expenseMappingMapper.listByRelatedAdjustmentNo(relatedAdjustmentNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据费用单号列表批量查询
|
||||
*/
|
||||
public List<ExpenseMappingDO> listByRelatedAdjustmentNoList(List<String> relatedAdjustmentNos) {
|
||||
if (CollectionUtils.isEmpty(relatedAdjustmentNos)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return expenseMappingMapper.listByRelatedAdjustmentNoList(relatedAdjustmentNos);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.SplitOrderDO;
|
||||
import com.cool.store.mapper.SplitOrderMapper;
|
||||
import com.cool.store.request.SplitOrderPageRequest;
|
||||
import com.cool.store.response.SplitOrderResponse;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分账主表 DAO
|
||||
*/
|
||||
@Repository
|
||||
public class SplitOrderDAO {
|
||||
|
||||
@Resource
|
||||
private SplitOrderMapper zxjpSplitOrderMapper;
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
*/
|
||||
public SplitOrderDO getById(Long id) {
|
||||
if (id == null) {
|
||||
return null;
|
||||
}
|
||||
return zxjpSplitOrderMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据分账单号查询
|
||||
*/
|
||||
public SplitOrderDO getBySplitNo(String splitNo) {
|
||||
if (StringUtils.isBlank(splitNo)) {
|
||||
return null;
|
||||
}
|
||||
return zxjpSplitOrderMapper.getBySplitNo(splitNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据状态查询
|
||||
*/
|
||||
public List<SplitOrderDO> listByStatus(String status) {
|
||||
return zxjpSplitOrderMapper.listByStatus(status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据关联单据号查询
|
||||
*/
|
||||
public List<SplitOrderDO> listByRelatedDocNo(String relatedDocNo,List<Integer> statusList) {
|
||||
if (StringUtils.isBlank(relatedDocNo)||CollectionUtils.isEmpty(statusList)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return zxjpSplitOrderMapper.listByRelatedDocNo(relatedDocNo,statusList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据门店ID查询
|
||||
*/
|
||||
public List<SplitOrderDO> listByStoreId(String storeId) {
|
||||
if (StringUtils.isBlank(storeId)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return zxjpSplitOrderMapper.listByStoreId(storeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
public int insert(SplitOrderDO record) {
|
||||
if (record == null) {
|
||||
return 0;
|
||||
}
|
||||
return zxjpSplitOrderMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
public int update(SplitOrderDO record) {
|
||||
if (record == null || record.getId() == null) {
|
||||
return 0;
|
||||
}
|
||||
return zxjpSplitOrderMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新状态
|
||||
*/
|
||||
public int batchUpdateStatus(List<Long> ids, String status) {
|
||||
if (CollectionUtils.isEmpty(ids) || StringUtils.isBlank(status)) {
|
||||
return 0;
|
||||
}
|
||||
return zxjpSplitOrderMapper.batchUpdateStatus(ids, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页页查询
|
||||
*/
|
||||
public List<SplitOrderDO> pageQuery(SplitOrderPageRequest request) {
|
||||
return zxjpSplitOrderMapper.pageQuery(request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询(关联门店信息)
|
||||
*/
|
||||
public List<SplitOrderResponse> pageQueryWithStore(SplitOrderPageRequest request) {
|
||||
return zxjpSplitOrderMapper.pageQueryWithStore(request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
public int delete(Long id) {
|
||||
if (id == null) {
|
||||
return 0;
|
||||
}
|
||||
return zxjpSplitOrderMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.dto.wallet.WithdrawApplicationDTO;
|
||||
import com.cool.store.entity.WithdrawApplicationDO;
|
||||
import com.cool.store.mapper.WithdrawApplicationMapper;
|
||||
import com.cool.store.request.WithdrawApplicationPageRequest;
|
||||
import com.cool.store.response.WithdrawApplicationResponse;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 提现申请 DAO
|
||||
*/
|
||||
@Repository
|
||||
public class WithdrawApplicationDAO {
|
||||
|
||||
@Resource
|
||||
private WithdrawApplicationMapper withdrawApplicationMapper;
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
*/
|
||||
public WithdrawApplicationDO getById(Long id) {
|
||||
if (id == null) {
|
||||
return null;
|
||||
}
|
||||
return withdrawApplicationMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入
|
||||
*/
|
||||
public int insert(WithdrawApplicationDO record) {
|
||||
if (record == null) {
|
||||
return 0;
|
||||
}
|
||||
return withdrawApplicationMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
public int update(WithdrawApplicationDO record) {
|
||||
if (record == null || record.getId() == null) {
|
||||
return 0;
|
||||
}
|
||||
return withdrawApplicationMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
public List<WithdrawApplicationDTO> pageQuery(WithdrawApplicationPageRequest request) {
|
||||
return withdrawApplicationMapper.pageQuery(request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据提现单号查询
|
||||
*/
|
||||
public WithdrawApplicationDO getByWithdrawNo(String withdrawNo) {
|
||||
if (withdrawNo == null) {
|
||||
return null;
|
||||
}
|
||||
return withdrawApplicationMapper.selectOne(WithdrawApplicationDO.builder().withdrawNo(withdrawNo).build());
|
||||
}
|
||||
}
|
||||
@@ -67,6 +67,10 @@ public class WalletTradeDAO {
|
||||
return walletTradeMapper.getPayingOrderBatchCode(module, type);
|
||||
}
|
||||
|
||||
public List<WalletTradeDO> transferTradeList(String module, Integer type) {
|
||||
return walletTradeMapper.transferTradeList(module, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据批次号更新支付状态
|
||||
* @param batchCode 批次号
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.AdjustmentOrderDO;
|
||||
import com.cool.store.request.AdjustmentOrderPageRequest;
|
||||
import com.cool.store.response.AdjustmentOrderResponse;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 费用调整单 Mapper
|
||||
*/
|
||||
public interface AdjustmentOrderMapper extends Mapper<AdjustmentOrderDO> {
|
||||
|
||||
/**
|
||||
* 根据调整单号查询
|
||||
*/
|
||||
AdjustmentOrderDO getByAdjustmentNo(@Param("adjustmentNo") String adjustmentNo);
|
||||
|
||||
/**
|
||||
* 根据状态查询
|
||||
*/
|
||||
List<AdjustmentOrderDO> listByStatus(@Param("status") Integer status);
|
||||
|
||||
/**
|
||||
* 根据关联分账单号查询
|
||||
*/
|
||||
List<AdjustmentOrderDO> listByRelatedSplitNo(@Param("relatedSplitNo") String relatedSplitNo);
|
||||
|
||||
/**
|
||||
* 根据门店ID查询
|
||||
*/
|
||||
List<AdjustmentOrderDO> listByStoreId(@Param("storeId") String storeId);
|
||||
|
||||
/**
|
||||
* 批量更新状态
|
||||
*/
|
||||
|
||||
int batchUpdateStatus(@Param("ids") List<Long> ids, @Param("status") Integer status);
|
||||
|
||||
/**
|
||||
* 根据ID更新关联分账单号
|
||||
*/
|
||||
int updateRelatedSplitNo(@Param("id") Long id, @Param("relatedSplitNo") String relatedSplitNo);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
List<AdjustmentOrderResponse> pageQuery(@Param("request") AdjustmentOrderPageRequest request);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.ExpenseMappingDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 费用单流水调整单映射表 Mapper
|
||||
*/
|
||||
public interface ExpenseMappingMapper extends Mapper<ExpenseMappingDO> {
|
||||
|
||||
/**
|
||||
* 根据网商交易流水号查询
|
||||
*/
|
||||
ExpenseMappingDO getByTradeNo(@Param("tradeNo") String tradeNo);
|
||||
|
||||
/**
|
||||
* 根据费用单号查询
|
||||
*/
|
||||
ExpenseMappingDO getByRelatedAdjustmentNo(@Param("relatedAdjustmentNo") String relatedAdjustmentNo);
|
||||
|
||||
/**
|
||||
* 批量插入
|
||||
*/
|
||||
int batchInsert(@Param("list") List<ExpenseMappingDO> list);
|
||||
|
||||
/**
|
||||
* 根据交易流水号列表批量查询
|
||||
*/
|
||||
List<ExpenseMappingDO> listByTradeNos(@Param("tradeNos") List<String> tradeNos);
|
||||
|
||||
/**
|
||||
* 根据费用单号查询列表
|
||||
*/
|
||||
List<ExpenseMappingDO> listByRelatedAdjustmentNo(@Param("relatedAdjustmentNo") String relatedAdjustmentNo);
|
||||
|
||||
/**
|
||||
* 根据费用单号列表批量查询
|
||||
*/
|
||||
List<ExpenseMappingDO> listByRelatedAdjustmentNoList(@Param("relatedAdjustmentNos") List<String> relatedAdjustmentNos);
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.SplitOrderDO;
|
||||
import com.cool.store.request.SplitOrderPageRequest;
|
||||
import com.cool.store.response.SplitOrderResponse;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分账主表 Mapper
|
||||
*/
|
||||
public interface SplitOrderMapper extends Mapper<SplitOrderDO> {
|
||||
|
||||
/**
|
||||
* 根据分账单号查询
|
||||
*/
|
||||
SplitOrderDO getBySplitNo(@Param("splitNo") String splitNo);
|
||||
|
||||
/**
|
||||
* 根据状态查询
|
||||
*/
|
||||
List<SplitOrderDO> listByStatus(@Param("status") String status);
|
||||
|
||||
/**
|
||||
* 根据关联单据号查询
|
||||
*/
|
||||
List<SplitOrderDO> listByRelatedDocNo(@Param("relatedDocNo") String relatedDocNo,
|
||||
@Param("statusList") List<Integer> statusList);
|
||||
|
||||
/**
|
||||
* 根据门店ID查询
|
||||
*/
|
||||
List<SplitOrderDO> listByStoreId(@Param("storeId") String storeId);
|
||||
|
||||
/**
|
||||
* 批量更新状态
|
||||
*/
|
||||
int batchUpdateStatus(@Param("ids") List<Long> ids, @Param("status") String status);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
List<SplitOrderDO> pageQuery(@Param("request") SplitOrderPageRequest request);
|
||||
|
||||
/**
|
||||
* 分页查询(关联门店信息)
|
||||
*/
|
||||
List<SplitOrderResponse> pageQueryWithStore(@Param("request") SplitOrderPageRequest request);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.wallet.WithdrawApplicationDTO;
|
||||
import com.cool.store.entity.WithdrawApplicationDO;
|
||||
import com.cool.store.request.WithdrawApplicationPageRequest;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 提现申请 Mapper
|
||||
*/
|
||||
public interface WithdrawApplicationMapper extends Mapper<WithdrawApplicationDO> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
List<WithdrawApplicationDTO> pageQuery(@Param("request") WithdrawApplicationPageRequest request);
|
||||
}
|
||||
@@ -20,4 +20,6 @@ public interface WalletTradeMapper extends Mapper<WalletTradeDO> {
|
||||
* @return 批次号列表
|
||||
*/
|
||||
List<String> getPayingOrderBatchCode(@Param("module") String module, @Param("type") Integer type);
|
||||
|
||||
List<WalletTradeDO> transferTradeList(@Param("module") String module, @Param("type") Integer type);
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
<?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.AdjustmentOrderMapper">
|
||||
|
||||
<!-- 根据调整单号查询 -->
|
||||
<select id="getByAdjustmentNo" resultType="com.cool.store.entity.AdjustmentOrderDO">
|
||||
select *
|
||||
from zxjp_adjustment_order
|
||||
where adjustment_no = #{adjustmentNo}
|
||||
</select>
|
||||
|
||||
<!-- 根据状态查询 -->
|
||||
<select id="listByStatus" resultType="com.cool.store.entity.AdjustmentOrderDO">
|
||||
select *
|
||||
from zxjp_adjustment_order
|
||||
where status = #{status}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 根据关联分账单号查询 -->
|
||||
<select id="listByRelatedSplitNo" resultType="com.cool.store.entity.AdjustmentOrderDO">
|
||||
select *
|
||||
from zxjp_adjustment_order
|
||||
where related_split_no = #{relatedSplitNo}
|
||||
</select>
|
||||
|
||||
<!-- 根据门店ID查询 -->
|
||||
<select id="listByStoreId" resultType="com.cool.store.entity.AdjustmentOrderDO">
|
||||
select *
|
||||
from zxjp_adjustment_order
|
||||
where store_id = #{storeId}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 批量更新状态 -->
|
||||
<update id="batchUpdateStatus">
|
||||
update zxjp_adjustment_order
|
||||
set status = #{status}
|
||||
where id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 根据ID更新关联分账单号 -->
|
||||
<update id="updateRelatedSplitNo">
|
||||
update zxjp_adjustment_order
|
||||
set related_split_no = #{relatedSplitNo}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="pageQuery" resultType="com.cool.store.response.AdjustmentOrderResponse">
|
||||
select
|
||||
a.*,
|
||||
b.store_name as storeName,
|
||||
b.store_num as storeNum,
|
||||
a.pay_time as payTime
|
||||
from zxjp_adjustment_order a
|
||||
left join store_${enterpriseId} b
|
||||
on a.store_id = b.store_id
|
||||
where a.deleted = 0
|
||||
<if test="request.keyword != null and request.keyword != ''">
|
||||
and (b.store_name like concat('%', #{request.keyword}, '%')
|
||||
or b.store_num like concat('%', #{request.keyword}, '%'))
|
||||
</if>
|
||||
<if test="request.adjustmentNo != null and request.adjustmentNo != ''">
|
||||
and a.adjustment_no like concat('%', #{request.adjustmentNo}, '%')
|
||||
</if>
|
||||
<if test="request.storeId != null and request.storeId != ''">
|
||||
and a.store_id = #{request.storeId}
|
||||
</if>
|
||||
<if test="request.expenseTypeCode != null and request.expenseTypeCode != ''">
|
||||
and a.expense_type_code = #{request.expenseTypeCode}
|
||||
</if>
|
||||
<if test="request.adjustType != null">
|
||||
and a.adjust_type = #{request.adjustType}
|
||||
</if>
|
||||
<if test="request.statusList != null and request.statusList.size() > 0">
|
||||
and a.status in
|
||||
<foreach collection="request.statusList" item="status" open="(" separator="," close=")">
|
||||
#{status}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.adjustReason != null and request.adjustReason != ''">
|
||||
and a.adjust_reason like concat('%', #{request.adjustReason}, '%')
|
||||
</if>
|
||||
<if test="request.businessTypeCode != null and request.businessTypeCode != ''">
|
||||
and a.business_type_code = #{request.businessTypeCode}
|
||||
</if>
|
||||
<if test="request.claimStartTime != null">
|
||||
and a.claim_time >= #{request.claimStartTime}
|
||||
</if>
|
||||
<if test="request.claimEndTime != null">
|
||||
and a.claim_time <= #{request.claimEndTime}
|
||||
</if>
|
||||
<if test="request.expenseSheetType != null and request.expenseSheetType != ''">
|
||||
and a.expense_sheet_type = #{request.expenseSheetType}
|
||||
</if>
|
||||
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?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.ExpenseMappingMapper">
|
||||
|
||||
<!-- 根据网商交易流水号查询 -->
|
||||
<select id="getByTradeNo" resultType="com.cool.store.entity.ExpenseMappingDO">
|
||||
select *
|
||||
from zxjp_expense_mapping
|
||||
where trade_no = #{tradeNo}
|
||||
</select>
|
||||
|
||||
<!-- 根据费用单号查询 -->
|
||||
<select id="getByRelatedAdjustmentNo" resultType="com.cool.store.entity.ExpenseMappingDO">
|
||||
select *
|
||||
from zxjp_expense_mapping
|
||||
where related_adjustment_no = #{relatedAdjustmentNo}
|
||||
</select>
|
||||
|
||||
<!-- 根据交易流水号列表批量查询 -->
|
||||
<select id="listByTradeNos" resultType="com.cool.store.entity.ExpenseMappingDO">
|
||||
select *
|
||||
from zxjp_expense_mapping
|
||||
where trade_no in
|
||||
<foreach collection="tradeNos" item="tradeNo" open="(" separator="," close=")">
|
||||
#{tradeNo}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!-- 根据费用单号查询列表 -->
|
||||
<select id="listByRelatedAdjustmentNo" resultType="com.cool.store.entity.ExpenseMappingDO">
|
||||
select *
|
||||
from zxjp_expense_mapping
|
||||
where related_adjustment_no = #{relatedAdjustmentNo}
|
||||
</select>
|
||||
|
||||
<!-- 根据费用单号列表批量查询 -->
|
||||
<select id="listByRelatedAdjustmentNoList" resultType="com.cool.store.entity.ExpenseMappingDO">
|
||||
select *
|
||||
from zxjp_expense_mapping
|
||||
where related_adjustment_no in
|
||||
<foreach collection="relatedAdjustmentNos" item="relatedAdjustmentNo" open="(" separator="," close=")">
|
||||
#{relatedAdjustmentNo}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!-- 批量插入 -->
|
||||
<insert id="batchInsert" parameterType="java.util.List">
|
||||
insert into zxjp_expense_mapping (related_adjustment_no, trade_no)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.relatedAdjustmentNo}, #{item.tradeNo})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,146 @@
|
||||
<?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.SplitOrderMapper">
|
||||
|
||||
<!-- 根据分账单号查询 -->
|
||||
<select id="getBySplitNo" resultType="com.cool.store.entity.SplitOrderDO">
|
||||
select *
|
||||
from zxjp_split_order
|
||||
where split_no = #{splitNo}
|
||||
</select>
|
||||
|
||||
<!-- 根据状态查询 -->
|
||||
<select id="listByStatus" resultType="com.cool.store.entity.SplitOrderDO">
|
||||
select *
|
||||
from zxjp_split_order
|
||||
where status = #{status}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 根据关联单据号查询 -->
|
||||
<select id="listByRelatedDocNo" resultType="com.cool.store.entity.SplitOrderDO">
|
||||
select *
|
||||
from zxjp_split_order
|
||||
where related_doc_no = #{relatedDocNo}
|
||||
and status in
|
||||
<foreach collection="statusList" item="status" open="(" separator="," close=")">
|
||||
#{status}
|
||||
</foreach>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 根据门店ID查询 -->
|
||||
<select id="listByStoreId" resultType="com.cool.store.entity.SplitOrderDO">
|
||||
select *
|
||||
from zxjp_split_order
|
||||
where related_store_id = #{storeId}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 批量更新状态 -->
|
||||
<update id="batchUpdateStatus">
|
||||
update zxjp_split_order
|
||||
set status = #{status}
|
||||
where id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="pageQuery" resultType="com.cool.store.entity.SplitOrderDO">
|
||||
select *
|
||||
from zxjp_split_order a
|
||||
where deleted = 0
|
||||
<if test="request.splitNo != null and request.splitNo != ''">
|
||||
and split_no like concat('%', #{request.splitNo}, '%')
|
||||
</if>
|
||||
<if test="request.splitType != null">
|
||||
and split_type = #{request.splitType}
|
||||
</if>
|
||||
<if test="request.payerAccountName != null and request.payerAccountName != ''">
|
||||
and payer_account_name like concat('%', #{request.payerAccountName}, '%')
|
||||
</if>
|
||||
<if test="request.payeeAccountName != null and request.payeeAccountName != ''">
|
||||
and payee_account_name like concat('%', #{request.payeeAccountName}, '%')
|
||||
</if>
|
||||
<if test="request.expenseTypeCode != null and request.expenseTypeCode != ''">
|
||||
and expense_type_code = #{request.expenseTypeCode}
|
||||
</if>
|
||||
<if test="request.relatedStoreId != null and request.relatedStoreId != ''">
|
||||
and related_store_id = #{request.relatedStoreId}
|
||||
</if>
|
||||
<if test="request.relatedDocNo != null and request.relatedDocNo != ''">
|
||||
and related_doc_no like concat('%', #{request.relatedDocNo}, '%')
|
||||
</if>
|
||||
<if test="request.status != null and request.status != ''">
|
||||
and status = #{request.status}
|
||||
</if>
|
||||
<if test="request.source != null">
|
||||
and source = #{request.source}
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 分页查询(关联门店信息) -->
|
||||
<select id="pageQueryWithStore" resultType="com.cool.store.response.SplitOrderResponse">
|
||||
SELECT
|
||||
a.id,
|
||||
a.split_no AS splitNo,
|
||||
a.split_type AS splitType,
|
||||
a.related_store_id AS relatedStoreId,
|
||||
b.store_name AS storeName,
|
||||
b.store_num AS storeNum,
|
||||
a.payer_account_name AS payerAccountName,
|
||||
a.payee_account_name AS payeeAccountName,
|
||||
a.payer_account_no AS payerAccountNo,
|
||||
a.payee_account_no AS payeeAccountNo,
|
||||
a.expense_type_code AS expenseTypeCode,
|
||||
a.split_amount AS splitAmount,
|
||||
a.related_doc_no AS relatedDocNo,
|
||||
a.remark,
|
||||
a.status,
|
||||
a.confirmer,
|
||||
a.confirm_time AS confirmTime,
|
||||
a.create_user_id AS createUserId,
|
||||
a.create_time AS createTime,
|
||||
a.source
|
||||
FROM zxjp_split_order a
|
||||
LEFT JOIN store_${enterpriseId} b ON a.related_store_id = b.store_id
|
||||
WHERE a.deleted = 0
|
||||
<if test="request.splitNo != null and request.splitNo != ''">
|
||||
AND a.split_no LIKE CONCAT('%', #{request.splitNo}, '%')
|
||||
</if>
|
||||
<if test="request.splitType != null">
|
||||
AND a.split_type = #{request.splitType}
|
||||
</if>
|
||||
<if test="request.payerAccountName != null and request.payerAccountName != ''">
|
||||
AND a.payer_account_name LIKE CONCAT('%', #{request.payerAccountName}, '%')
|
||||
</if>
|
||||
<if test="request.payeeAccountName != null and request.payeeAccountName != ''">
|
||||
AND a.payee_account_name LIKE CONCAT('%', #{request.payeeAccountName}, '%')
|
||||
</if>
|
||||
<if test="request.expenseTypeCode != null and request.expenseTypeCode != ''">
|
||||
AND a.expense_type_code = #{request.expenseTypeCode}
|
||||
</if>
|
||||
<if test="request.relatedStoreId != null and request.relatedStoreId != ''">
|
||||
AND a.related_store_id = #{request.relatedStoreId}
|
||||
</if>
|
||||
<if test="request.relatedDocNo != null and request.relatedDocNo != ''">
|
||||
AND a.related_doc_no LIKE CONCAT('%', #{request.relatedDocNo}, '%')
|
||||
</if>
|
||||
<if test="request.status != null and request.status != ''">
|
||||
AND a.status = #{request.status}
|
||||
</if>
|
||||
<if test="request.source != null">
|
||||
AND a.source = #{request.source}
|
||||
</if>
|
||||
<if test="request.keyword != null and request.keyword != ''">
|
||||
AND (b.store_name LIKE CONCAT('%', #{request.keyword}, '%') OR b.store_num LIKE CONCAT('%', #{request.keyword}, '%'))
|
||||
</if>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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.WithdrawApplicationMapper">
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="pageQuery" resultType="com.cool.store.dto.wallet.WithdrawApplicationDTO">
|
||||
SELECT
|
||||
id,
|
||||
withdraw_no AS withdrawNo,
|
||||
account_name AS accountName,
|
||||
amount,
|
||||
bank_card_no AS bankCardNo,
|
||||
bank_name AS bankName,
|
||||
status,
|
||||
fail_reason AS failReason,
|
||||
create_user_id AS createUserId,
|
||||
create_time AS createTime,
|
||||
update_time AS updateTime
|
||||
FROM zxjp_withdraw_application
|
||||
WHERE 1=1
|
||||
<if test="request.withdrawNo != null and request.withdrawNo != ''">
|
||||
AND withdraw_no LIKE CONCAT('%', #{request.withdrawNo}, '%')
|
||||
</if>
|
||||
<if test="request.accountName != null and request.accountName != ''">
|
||||
AND account_name LIKE CONCAT('%', #{request.accountName}, '%')
|
||||
</if>
|
||||
<if test="request.startTime != null">
|
||||
AND create_time >= #{request.startTime}
|
||||
</if>
|
||||
<if test="request.endTime != null">
|
||||
AND create_time <= #{request.endTime}
|
||||
</if>
|
||||
<if test="request.status != null">
|
||||
AND status = #{request.status}
|
||||
</if>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -71,4 +71,11 @@
|
||||
WHERE pay_status = 3 AND module = #{module} AND type = #{type} AND batch_code IS NOT NULL
|
||||
GROUP BY batch_code
|
||||
</select>
|
||||
|
||||
<select id="transferTradeList" resultMap="BaseResultMap">
|
||||
SELECT *
|
||||
FROM zxjp_wallet_trade
|
||||
WHERE pay_status = 3 AND module = #{module} AND type = #{type}
|
||||
order by id desc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -18,21 +18,39 @@ public class AccountInfoDTO {
|
||||
@ApiModelProperty(value = "结算卡业务类型 枚举值:1:对公 2:对私", required = true)
|
||||
private Integer accountType;
|
||||
|
||||
@ApiModelProperty(value = "工商类型 1.企业 2.个体工商户 3.自然人", required = true)
|
||||
private Integer businessType;
|
||||
|
||||
@ApiModelProperty(value = "钱包类型 1.平安 2.网商", required = true)
|
||||
private Integer walletType;
|
||||
|
||||
@ApiModelProperty(value = "营业执照号码")
|
||||
private String licenseNo;
|
||||
|
||||
@ApiModelProperty(value = "工商注册名称")
|
||||
private String licenseName;
|
||||
|
||||
@ApiModelProperty(value = "法人姓名")
|
||||
@ApiModelProperty(value = "法人姓名,用于实名认证企业的法人姓名")
|
||||
private String legalName;
|
||||
|
||||
@ApiModelProperty(value = "法人证件号码")
|
||||
private String legalNo;
|
||||
|
||||
@ApiModelProperty(value = "法人联系电话")
|
||||
@ApiModelProperty(value = "法人联系电话(企业与个体户必传)")
|
||||
private String legalPhone;
|
||||
|
||||
@ApiModelProperty(value = "法人银行卡号")
|
||||
private String legalAccountCardNo;
|
||||
|
||||
@ApiModelProperty(value = "法人银行预留手机号")
|
||||
private String legalAccountPhone;
|
||||
|
||||
@ApiModelProperty(value = "法人银行卡开户支行")
|
||||
private String legalBankNo;
|
||||
|
||||
@ApiModelProperty(value = "法人银行卡开户支行名称")
|
||||
private String legalBankName;
|
||||
|
||||
@ApiModelProperty(value = "门店编号", required = true)
|
||||
private String storeSn;
|
||||
|
||||
@@ -54,37 +72,40 @@ public class AccountInfoDTO {
|
||||
@ApiModelProperty(value = "开户支行名称", required = true)
|
||||
private String bankName;
|
||||
|
||||
@ApiModelProperty(value = "支行编号", required = true)
|
||||
@ApiModelProperty(value = "开户支行号", required = true)
|
||||
private String bankNo;
|
||||
|
||||
@ApiModelProperty(value = "总行名称")
|
||||
|
||||
@ApiModelProperty(value = "开户总行名称")
|
||||
private String headBankName;
|
||||
|
||||
@ApiModelProperty(value = "账户状态 1:待提交 2:待鉴权 3:鉴权中 4:开通 5:开通失败", required = true)
|
||||
@ApiModelProperty(value = "账户状态 1-待提交 2-待鉴权 3-鉴权中 4-开通 5-失败", required = true)
|
||||
private Integer accountStatus;
|
||||
|
||||
@ApiModelProperty(value = "账户余额", required = true)
|
||||
@ApiModelProperty(value = "账户总余额", required = true)
|
||||
private String totalAmount;
|
||||
|
||||
@ApiModelProperty(value = "可提现余额", required = true)
|
||||
@ApiModelProperty(value = "冻结金额", required = true)
|
||||
private String freezeAmount;
|
||||
|
||||
@ApiModelProperty(value = "可提现余额(平安账户此字段金额等于账户余额,网商账户充值金额只能用于协议代扣,无法用于提现,所以网商账户可提现余额可能小于账户余额)", required = true)
|
||||
private String withdrawAmount;
|
||||
|
||||
@ApiModelProperty(value = "打标状态 0 未打标 1 已打标", required = true)
|
||||
@ApiModelProperty(value = "打标状态 0-未打标 1-已打标", required = true)
|
||||
private Integer labelingStatus;
|
||||
|
||||
@ApiModelProperty(value = "是否签约人账户 0 否 1 是", required = true)
|
||||
@ApiModelProperty(value = "是否签约人账户 0-否 1-是", required = true)
|
||||
private Integer isLegal;
|
||||
|
||||
@ApiModelProperty("工商类型 1.企业 2.个体工商户 3.小微商户(自然人)")
|
||||
private Integer businessType;
|
||||
|
||||
@ApiModelProperty("钱包类型 1平安 2网商")
|
||||
private Integer walletType;
|
||||
|
||||
@ApiModelProperty("失败原因(仅网商在创建失败或激活失败时返回)")
|
||||
@ApiModelProperty(value = "失败原因(仅网商在创建失败或激活失败时返回)")
|
||||
private String errMsg;
|
||||
|
||||
@ApiModelProperty("crm门店id")
|
||||
@ApiModelProperty(value = "法人和签约人的关系 myself-本人 parent-父母 children-子女 landlord-房东 friend-朋友 bro_and_sister-兄弟姐妹 partner-合伙人 couple-夫妻")
|
||||
private String relation;
|
||||
|
||||
@ApiModelProperty(value = "网商激活短链(平安不返回),调用重新发送后会变")
|
||||
private String activityUrl;
|
||||
|
||||
@ApiModelProperty(value = "crm门店id")
|
||||
private String outStoreId;
|
||||
|
||||
@ApiModelProperty("网商激活短链(平安不返回),调用重新发送后会变")
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.cool.store.dto.wallet;
|
||||
|
||||
import com.cool.store.request.wallet.WalletBasicPageInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 账户分页查询响应
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/11/18 10:12
|
||||
* @Version 1.0
|
||||
@@ -13,8 +15,10 @@ import java.util.List;
|
||||
@Data
|
||||
public class AccountPageDTO {
|
||||
|
||||
@ApiModelProperty("分页数据")
|
||||
private List<AccountInfoDTO> pageData;
|
||||
|
||||
@ApiModelProperty("分页信息")
|
||||
private WalletBasicPageInfo page;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.cool.store.dto.wallet;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/10 14:01
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class AccountTransferDTO {
|
||||
@ApiModelProperty("业务系统付款单号(如 CRM 单号)")
|
||||
private String reqNo;
|
||||
@ApiModelProperty("转账交易编号")
|
||||
private Long tradeId;
|
||||
@ApiModelProperty("金额(元)")
|
||||
private String amount;
|
||||
@ApiModelProperty("交易状态1.成功 2.失败 3.处理中")
|
||||
private Integer tradeStatus;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.cool.store.dto.wallet;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/10 14:17
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class AccountWithdrawerDTO {
|
||||
|
||||
/**
|
||||
* 业务系统付款单号(如 CRM 单号)
|
||||
*/
|
||||
private String reqNo;
|
||||
|
||||
/**
|
||||
* 转账交易标识(营帐通系统)
|
||||
*/
|
||||
private Long tradeId;
|
||||
|
||||
/**
|
||||
* 提现科目
|
||||
*/
|
||||
private Integer feeItemId;
|
||||
|
||||
/**
|
||||
* 提现账户编号
|
||||
*/
|
||||
private String accountNo;
|
||||
|
||||
/**
|
||||
* 金额(元)
|
||||
*/
|
||||
private String amount;
|
||||
|
||||
/**
|
||||
* 交易状态 1-成功 2-失败 3-处理中
|
||||
*/
|
||||
private Integer tradeStatus;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.cool.store.dto.wallet;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/12 16:14
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class WithdrawApplicationDTO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("提现申请单号")
|
||||
private String withdrawNo;
|
||||
|
||||
@ApiModelProperty("提现账户名称")
|
||||
private String accountName;
|
||||
|
||||
@ApiModelProperty("提现金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("到账银行卡号")
|
||||
private String bankCardNo;
|
||||
|
||||
@ApiModelProperty("银行所属银行")
|
||||
private String bankName;
|
||||
|
||||
@ApiModelProperty("状态(1-已分账 2-分账失败 3-分账中 5-待分账)")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("失败原因")
|
||||
private String failReason;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
private String createUserId;
|
||||
|
||||
@ApiModelProperty("创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 费用调整单
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table(name = "zxjp_adjustment_order")
|
||||
public class AdjustmentOrderDO {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("调整单号")
|
||||
@Column(name = "adjustment_no")
|
||||
private String adjustmentNo;
|
||||
|
||||
@ApiModelProperty("门店ID")
|
||||
@Column(name = "store_id")
|
||||
private String storeId;
|
||||
|
||||
@ApiModelProperty("业务类型 字典表")
|
||||
@Column(name = "business_type_code")
|
||||
private String businessTypeCode;
|
||||
|
||||
@ApiModelProperty("费用类型(装修类/采购设备类/设备类)字段表")
|
||||
@Column(name = "expense_type_code")
|
||||
private String expenseTypeCode;
|
||||
|
||||
@ApiModelProperty("调整类型(1-调增 2-调减)")
|
||||
@Column(name = "adjust_type")
|
||||
private Integer adjustType;
|
||||
|
||||
@ApiModelProperty("调整金额")
|
||||
@Column(name = "adjust_amount")
|
||||
private BigDecimal adjustAmount;
|
||||
|
||||
@ApiModelProperty("调整原因")
|
||||
@Column(name = "adjust_reason")
|
||||
private String adjustReason;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Column(name = "remark")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("附件信息")
|
||||
@Column(name = "attachment_info", columnDefinition = "TEXT")
|
||||
private String attachmentInfo;
|
||||
|
||||
@ApiModelProperty("单据状态(10-待充值/20-已充值待认款/30-认款完成/40-分部分账/50-分账完成)")
|
||||
@Column(name = "status")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
@Column(name = "create_user_id")
|
||||
private String createUserId;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("删除 0-未删除 1-删除")
|
||||
@Column(name = "deleted")
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty("已分账金额")
|
||||
@Column(name = "settled_amount", columnDefinition = "decimal(12,2) NOT NULL")
|
||||
private BigDecimal settledAmount;
|
||||
|
||||
@ApiModelProperty("待分账金额")
|
||||
@Column(name = "pending_settlement_amount", columnDefinition = "decimal(12,2) NOT NULL")
|
||||
private BigDecimal pendingSettlementAmount;
|
||||
|
||||
@ApiModelProperty("认领人ID")
|
||||
@Column(name = "claim_user_id", length = 64)
|
||||
private String claimUserId;
|
||||
|
||||
@ApiModelProperty("认领时间")
|
||||
@Column(name = "claim_time")
|
||||
private Date claimTime;
|
||||
|
||||
@ApiModelProperty("费用单类型 1-费用单 2-调整单")
|
||||
@Column(name = "expense_sheet_type")
|
||||
private Integer expenseSheetType;
|
||||
|
||||
@ApiModelProperty("合同附件信息")
|
||||
@Column(name = "contract_attachment_info", columnDefinition = "TEXT")
|
||||
private String contractAttachmentInfo;
|
||||
|
||||
@ApiModelProperty("支付时间")
|
||||
@Column(name = "pay_time")
|
||||
private Date payTime;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* 费用单流水调整单映射表
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table(name = "zxjp_expense_mapping")
|
||||
public class ExpenseMappingDO {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("费用单号")
|
||||
@Column(name = "related_adjustment_no", length = 32)
|
||||
private String relatedAdjustmentNo;
|
||||
|
||||
@ApiModelProperty("网商交易流水号")
|
||||
@Column(name = "trade_no", length = 32)
|
||||
private String tradeNo;
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 分账主表
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table(name = "zxjp_split_order")
|
||||
public class SplitOrderDO {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("分账单号")
|
||||
@Column(name = "split_no")
|
||||
private String splitNo;
|
||||
|
||||
@ApiModelProperty("分账类型(1-门店付款/2-门店收款/3-公司间结算)")
|
||||
@Column(name = "split_type")
|
||||
private Integer splitType;
|
||||
|
||||
@ApiModelProperty("关联门店")
|
||||
@Column(name = "related_store_id")
|
||||
private String relatedStoreId;
|
||||
|
||||
@ApiModelProperty("付款账户名称")
|
||||
@Column(name = "payer_account_name")
|
||||
private String payerAccountName;
|
||||
|
||||
@ApiModelProperty("付款账户")
|
||||
@Column(name = "payer_account_no")
|
||||
private String payerAccountNo;
|
||||
|
||||
@ApiModelProperty("收款账户名称")
|
||||
@Column(name = "payee_account_name")
|
||||
private String payeeAccountName;
|
||||
|
||||
@ApiModelProperty("收款账户")
|
||||
@Column(name = "payee_account_no")
|
||||
private String payeeAccountNo;
|
||||
|
||||
@ApiModelProperty("费用类型(装修类/采购设备类/设备类)字典表")
|
||||
@Column(name = "expense_type_code")
|
||||
private String expenseTypeCode;
|
||||
|
||||
@ApiModelProperty("分账金额")
|
||||
@Column(name = "split_amount")
|
||||
private BigDecimal splitAmount;
|
||||
|
||||
@ApiModelProperty("关联单据号(如费用调整单号)")
|
||||
@Column(name = "related_doc_no")
|
||||
private String relatedDocNo;
|
||||
|
||||
@ApiModelProperty("附件信息")
|
||||
@Column(name = "attachment_info", columnDefinition = "TEXT")
|
||||
private String attachmentInfo;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Column(name = "remark")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("分账失败原因")
|
||||
@Column(name = "fail_reason", length = 256)
|
||||
private String failReason;
|
||||
|
||||
@ApiModelProperty("状态 1-已分账 2-分账失败 3-分账中 5-待分账")
|
||||
@Column(name = "status")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("确认人")
|
||||
@Column(name = "confirmer")
|
||||
private String confirmer;
|
||||
|
||||
@ApiModelProperty("确认时间")
|
||||
@Column(name = "confirm_time")
|
||||
private Date confirmTime;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
@Column(name = "create_user_id")
|
||||
private String createUserId;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("单据来源(1-手工新增/2-费用调整单/3-费用单)")
|
||||
@Column(name = "source")
|
||||
private Integer source;
|
||||
|
||||
@ApiModelProperty("删除 0-未删除 1-删除")
|
||||
@Column(name = "deleted")
|
||||
private Integer deleted;
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 提现申请实体
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@Table(name = "zxjp_withdraw_application")
|
||||
public class WithdrawApplicationDO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 提现申请单号
|
||||
*/
|
||||
@Column(name = "withdraw_no")
|
||||
private String withdrawNo;
|
||||
|
||||
/**
|
||||
* 提现账户名称
|
||||
*/
|
||||
@Column(name = "account_name")
|
||||
private String accountName;
|
||||
|
||||
@Column(name = "account_no")
|
||||
private String accountNo;
|
||||
|
||||
/**
|
||||
* 提现金额
|
||||
*/
|
||||
@Column(name = "amount")
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 到账银行卡号
|
||||
*/
|
||||
@Column(name = "bank_card_no")
|
||||
private String bankCardNo;
|
||||
|
||||
/**
|
||||
* 银行所属银行
|
||||
*/
|
||||
@Column(name = "bank_name")
|
||||
private String bankName;
|
||||
|
||||
/**
|
||||
* 状态(1-已分账 2-分账失败 3-分账中 5-待分账)
|
||||
*/
|
||||
@Column(name = "status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 失败原因
|
||||
*/
|
||||
@Column(name = "fail_reason")
|
||||
private String failReason;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Column(name = "create_user_id")
|
||||
private String createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class AdjustmentOrderPageRequest extends PageBasicInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty("门店名称或者门店编码")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty(value = "费用单据类型 费用单类型 1-费用单 2-调整单")
|
||||
private Integer expenseSheetType;
|
||||
|
||||
@ApiModelProperty("单号")
|
||||
private String adjustmentNo;
|
||||
|
||||
@ApiModelProperty("费用类型")
|
||||
private String expenseTypeCode;
|
||||
|
||||
@ApiModelProperty("调整类型(1-调增 2-调减)")
|
||||
private Integer adjustType;
|
||||
|
||||
@ApiModelProperty("单据状态列表")
|
||||
private List<Integer> statusList;
|
||||
|
||||
@ApiModelProperty("调整原因(模糊查询)")
|
||||
private String adjustReason;
|
||||
|
||||
@ApiModelProperty("业务类型")
|
||||
private String businessTypeCode;
|
||||
|
||||
@ApiModelProperty("认领开始时间")
|
||||
private Date claimStartTime;
|
||||
|
||||
@ApiModelProperty("认领结束时间")
|
||||
private Date claimEndTime;
|
||||
|
||||
private String storeId;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.DecimalMin;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class AdjustmentOrderRequest implements Serializable {
|
||||
|
||||
@ApiModelProperty("主键ID(编辑时必填)")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("门店ID")
|
||||
@NotBlank(message = "门店ID不能为空")
|
||||
private String storeId;
|
||||
|
||||
@ApiModelProperty("业务类型")
|
||||
private String businessTypeCode;
|
||||
|
||||
@ApiModelProperty("费用类型(装修类/采购设备类/设备类)")
|
||||
@NotBlank(message = "费用类型不能为空")
|
||||
private String expenseTypeCode;
|
||||
|
||||
@ApiModelProperty("调整类型(1-调增 2-调减)")
|
||||
private Integer adjustType;
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
@NotNull(message = "金额不能为空")
|
||||
@DecimalMin(value = "0.01", message = "调整金额必须大于0")
|
||||
private BigDecimal adjustAmount;
|
||||
|
||||
@ApiModelProperty("调整原因")
|
||||
@Length(max = 255, message = "调整原因长度不能超过255")
|
||||
private String adjustReason;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Length(max = 255, message = "备注长度不能超过255")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("附件信息")
|
||||
private String attachmentInfo;
|
||||
|
||||
@ApiModelProperty("附件信息")
|
||||
private String contractAttachmentInfo;
|
||||
|
||||
@ApiModelProperty("费用单类型 1-费用单 2-调整单")
|
||||
@NotNull(message = "费用单类型不能为空")
|
||||
private Integer expenseSheetType;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/10 16:37
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class AdjustmentSpecialPageRequest extends PageBasicInfo {
|
||||
|
||||
@ApiModelProperty("费用单据类型 费用单类型 1-费用单 2-调整单")
|
||||
private Integer expenseSheetType;
|
||||
|
||||
@ApiModelProperty("单据状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("业务类型")
|
||||
private String businessTypeCode;
|
||||
|
||||
private String storeId;
|
||||
|
||||
public static AdjustmentOrderPageRequest convert(AdjustmentSpecialPageRequest request){
|
||||
AdjustmentOrderPageRequest adjustmentOrderPageRequest = new AdjustmentOrderPageRequest();
|
||||
adjustmentOrderPageRequest.setExpenseSheetType(request.getExpenseSheetType());
|
||||
adjustmentOrderPageRequest.setStoreId(request.getStoreId());
|
||||
if (request.getStatus()!=null){
|
||||
adjustmentOrderPageRequest.setStatusList(Arrays.asList(request.getStatus()));
|
||||
}
|
||||
adjustmentOrderPageRequest.setBusinessTypeCode(request.getBusinessTypeCode());
|
||||
return adjustmentOrderPageRequest;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.DecimalMin;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 生成分账单请求
|
||||
*/
|
||||
@Data
|
||||
public class GenerateSplitOrderRequest implements Serializable {
|
||||
|
||||
@ApiModelProperty("调整单ID")
|
||||
@NotNull(message = "费用单ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("收款公司名称")
|
||||
@NotBlank(message = "收款公司不能为空")
|
||||
@Length(max = 100, message = "收款公司名称长度不能超过100")
|
||||
private String payeeAccountName;
|
||||
|
||||
@ApiModelProperty("收款账户")
|
||||
@Length(max = 128, message = "收款账户长度不能超过128")
|
||||
private String payeeAccountNo;
|
||||
|
||||
@ApiModelProperty("分账金额")
|
||||
@NotNull(message = "分账金额不能为空")
|
||||
@DecimalMin(value = "0.01", message = "分账金额必须大于0")
|
||||
private BigDecimal splitAmount;
|
||||
|
||||
@ApiModelProperty("附件信息")
|
||||
private String attachmentInfo;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Length(max = 255, message = "备注长度不能超过255")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 认款请求
|
||||
*/
|
||||
@Data
|
||||
public class RecognizePaymentRequest {
|
||||
|
||||
@NotNull(message = "费用调整单ID不能为空")
|
||||
@ApiModelProperty("费用调整单ID")
|
||||
private Long id;
|
||||
|
||||
@NotNull(message = "网商交易流水号列表不能为空")
|
||||
@ApiModelProperty("网商交易流水号列表")
|
||||
private List<String> tradeNos;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class SplitOrderPageRequest extends PageBasicInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty("分账单号 模糊")
|
||||
private String splitNo;
|
||||
|
||||
@ApiModelProperty("分账类型(1-门店付款/2-门店收款/3-公司间结算)")
|
||||
private Integer splitType;
|
||||
|
||||
@ApiModelProperty("付款账户名称 模糊")
|
||||
private String payerAccountName;
|
||||
|
||||
@ApiModelProperty("收款账户名称 模糊")
|
||||
private String payeeAccountName;
|
||||
|
||||
@ApiModelProperty("费用类型")
|
||||
private String expenseTypeCode;
|
||||
|
||||
@ApiModelProperty("关联门店ID")
|
||||
private String relatedStoreId;
|
||||
|
||||
@ApiModelProperty("关联单据号 模糊")
|
||||
private String relatedDocNo;
|
||||
|
||||
@ApiModelProperty("分账状态(待分账/已完成)")
|
||||
private String status;
|
||||
;
|
||||
|
||||
@ApiModelProperty("单据来源(1-手工新增/2-费用调整单/3-费用单)")
|
||||
private Integer source;
|
||||
|
||||
@ApiModelProperty("门店编码/门店名称 关键字搜索")
|
||||
private String keyword;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.validation.constraints.DecimalMin;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class SplitOrderRequest implements Serializable {
|
||||
|
||||
@ApiModelProperty("主键ID(编辑时必填)")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("分账类型(1-门店付款/2-门店收款/3-公司间结算)")
|
||||
@NotNull(message = "分账类型不能为空")
|
||||
private Integer splitType;
|
||||
|
||||
@ApiModelProperty("关联门店")
|
||||
private String relatedStoreId;
|
||||
|
||||
@ApiModelProperty("付款账户名称")
|
||||
@NotBlank(message = "付款账户名称不能为空")
|
||||
@Length(max = 128, message = "付款账户名称长度不能超过128")
|
||||
private String payerAccountName;
|
||||
|
||||
@ApiModelProperty("付款账户账号")
|
||||
private String payerAccountNo;
|
||||
|
||||
@ApiModelProperty("收款账户名称")
|
||||
@NotBlank(message = "收款账户名称不能为空")
|
||||
@Length(max = 128, message = "收款账户名称长度不能超过128")
|
||||
private String payeeAccountName;
|
||||
|
||||
@ApiModelProperty("收款账户")
|
||||
private String payeeAccountNo;
|
||||
|
||||
@ApiModelProperty("费用类型(装修类/采购设备类/设备类)")
|
||||
@NotBlank(message = "费用类型不能为空")
|
||||
private String expenseTypeCode;
|
||||
|
||||
@ApiModelProperty("分账金额")
|
||||
@NotNull(message = "分账金额不能为空")
|
||||
@DecimalMin(value = "0.01", message = "分账金额必须大于0")
|
||||
private BigDecimal splitAmount;
|
||||
|
||||
@ApiModelProperty("关联单据号(如费用调整单号)")
|
||||
private String relatedDocNo;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Length(max = 255, message = "备注长度不能超过255")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("附件信息")
|
||||
private String attachmentInfo;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 提现申请分页查询请求
|
||||
*/
|
||||
@Data
|
||||
public class WithdrawApplicationPageRequest extends PageBasicInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty("提现申请单号 模糊")
|
||||
private String withdrawNo;
|
||||
|
||||
@ApiModelProperty("提现账户名称 模糊")
|
||||
private String accountName;
|
||||
|
||||
@ApiModelProperty("申请开始时间")
|
||||
private Date startTime;
|
||||
|
||||
@ApiModelProperty("申请结束时间")
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty("状态(1-已分账 2-分账失败 3-分账中 5-待分账)")
|
||||
private Integer status;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 提现申请请求
|
||||
*/
|
||||
@Data
|
||||
public class WithdrawApplicationRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value ="提现账户名称", required = true)
|
||||
@NotBlank(message = "提现账户名称不能为空")
|
||||
private String accountName;
|
||||
|
||||
@ApiModelProperty(value ="提现金额", required = true)
|
||||
@NotNull(message = "提现金额不能为空")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty(value ="到账银行卡号", required = true)
|
||||
@NotBlank(message = "到账银行卡号不能为空")
|
||||
private String bankCardNo;
|
||||
|
||||
@ApiModelProperty(value = "银行所属银行", required = true)
|
||||
@NotBlank(message = "银行所属银行不能为空")
|
||||
private String bankName;
|
||||
|
||||
@ApiModelProperty(value = "提现账户", required = true)
|
||||
@NotBlank(message = "提现账户不能为空")
|
||||
private String accountNo;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.cool.store.request.wallet;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/10 14:53
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class AccountDetailRequest {
|
||||
|
||||
private Integer walletType;
|
||||
|
||||
private String accountNo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cool.store.request.wallet;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 账户分页查询请求
|
||||
*/
|
||||
@Data
|
||||
public class AccountPageRequest {
|
||||
|
||||
@ApiModelProperty(value = "由营帐通分配", required = true)
|
||||
private Long orgId;
|
||||
|
||||
@ApiModelProperty(value = "钱包类型 1.平安 2.网商", required = true)
|
||||
private Integer walletType;
|
||||
|
||||
@ApiModelProperty("账户编号")
|
||||
private String accNo;
|
||||
|
||||
@ApiModelProperty("账户名称(模糊查询)")
|
||||
private String accName;
|
||||
|
||||
private WalletBasicPageInfo page;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.request.wallet;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/10 14:04
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class AccountTransferRequest {
|
||||
|
||||
@ApiModelProperty("钱包类型 1.平安 2.网商")
|
||||
private Integer walletType;
|
||||
@ApiModelProperty("业务系统付款单号(如 CRM 单号),业务系统单号")
|
||||
private String reqNo;
|
||||
@ApiModelProperty("费用科目")
|
||||
private Integer feeItemId;
|
||||
@ApiModelProperty("转出账户编号")
|
||||
private String outAccNo;
|
||||
@ApiModelProperty("转入账户编号")
|
||||
private String InAccNo;
|
||||
@ApiModelProperty(" 金额(元)")
|
||||
private String amount;
|
||||
@ApiModelProperty("备注 ,交易摘要")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.cool.store.request.wallet;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/10 14:13
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class AccountWithdrawerRequest {
|
||||
@ApiModelProperty("钱包类型 1.平安 2.网商")
|
||||
private Integer walletType;
|
||||
@ApiModelProperty("账户编号")
|
||||
private String accNo;
|
||||
@ApiModelProperty("业务系统付款单号(如 CRM 单号)")
|
||||
private String reqNo;
|
||||
@ApiModelProperty("提现金额(元)")
|
||||
private String amount;
|
||||
@ApiModelProperty("提现备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.cool.store.request.wallet;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/13 10:47
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ConfirmRechargeRequest {
|
||||
|
||||
@ApiModelProperty("费用单-调整单ID")
|
||||
private Long id;
|
||||
@ApiModelProperty("其他附件")
|
||||
private String attachmentInfo;
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.cool.store.request.wallet;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/12 16:20
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ConfirmWithdrawRequest {
|
||||
|
||||
@ApiModelProperty("提现单ID")
|
||||
private Long withdrawId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.cool.store.request.wallet;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/10 16:05
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class CoolAccountPageRequest extends PageBasicInfo {
|
||||
|
||||
@ApiModelProperty(value = "钱包类型 1.平安 2.网商", required = true)
|
||||
private Integer walletType;
|
||||
|
||||
@ApiModelProperty("账户编号")
|
||||
private String accNo;
|
||||
|
||||
@ApiModelProperty("账户名称(模糊查询)")
|
||||
private String accName;
|
||||
}
|
||||
@@ -24,6 +24,8 @@ public class CoolTradeRecodePageRequest extends PageBasicInfo {
|
||||
private String storeKeyword;
|
||||
@ApiModelProperty(value = "费用科目",required = true)
|
||||
private Integer feeItemId;
|
||||
@ApiModelProperty(value = "组织ID",required = false,hidden = true)
|
||||
private Long orgId;
|
||||
|
||||
public TradeRecodePageRequest convertToTradeRecodePageRequest() {
|
||||
TradeRecodePageRequest target = new TradeRecodePageRequest();
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.cool.store.request.wallet;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/12 14:26
|
||||
* @Version 1.0
|
||||
* 只查询充值数据
|
||||
*/
|
||||
@Data
|
||||
public class CoolTradeRecodeRequest extends PageBasicInfo {
|
||||
|
||||
@ApiModelProperty(value = "交易开始时间YYYY-MM-DD HH:MM:SS",required = true)
|
||||
private String beginDate;
|
||||
@ApiModelProperty(value = "交易结束时间YYYY-MM-DD HH:MM:SS",required = true)
|
||||
private String endDate;
|
||||
@ApiModelProperty(value = "钱包类型 1.平安 2.网商 不传默认-2",required = false)
|
||||
private Integer walletType = 2;
|
||||
@ApiModelProperty(value = "费用科目",required = false)
|
||||
private Integer feeItemId;
|
||||
@ApiModelProperty(value = "门店Id",required = true)
|
||||
private String storeId;
|
||||
|
||||
public TradeRecodePageRequest convertToTradeRecodePageRequest() {
|
||||
TradeRecodePageRequest target = new TradeRecodePageRequest();
|
||||
target.setBeginDate(this.getBeginDate());
|
||||
target.setEndDate(this.getEndDate());
|
||||
target.setWalletType(this.getWalletType());
|
||||
target.setFeeItemId(this.getFeeItemId());
|
||||
target.setCurrentPage(this.getPageNum());
|
||||
target.setPageSize(this.getPageSize());
|
||||
return target;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.cool.store.request.wallet;
|
||||
|
||||
import com.cool.store.dto.wallet.AccountInfoDTO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/10 15:46
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class OrgAccountDTO {
|
||||
|
||||
private WalletBasicPageInfo page;
|
||||
|
||||
private List<AccountInfoDTO> pageData;
|
||||
}
|
||||
@@ -27,6 +27,10 @@ public class TradeRecodePageRequest {
|
||||
private Integer currentPage;
|
||||
@ApiModelProperty(value = "每页数量",required = true)
|
||||
private Integer pageSize;
|
||||
@ApiModelProperty(value = "账户",required = false)
|
||||
private String accountNo;
|
||||
@ApiModelProperty(value = "组织ID",required = false)
|
||||
private Long orgId;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import com.cool.store.annotation.DictField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class AdjustmentOrderResponse implements Serializable {
|
||||
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("调整单号")
|
||||
private String adjustmentNo;
|
||||
|
||||
@ApiModelProperty("门店ID")
|
||||
private String storeId;
|
||||
|
||||
@ApiModelProperty("门店名称")
|
||||
private String storeName;
|
||||
|
||||
@ApiModelProperty("门店编码")
|
||||
private String storeNum;
|
||||
|
||||
@ApiModelProperty("业务类型")
|
||||
private String businessTypeCode;
|
||||
|
||||
@ApiModelProperty("业务类型名称")
|
||||
@DictField(sourceField="businessTypeCode")
|
||||
private String businessTypeName;
|
||||
|
||||
@ApiModelProperty("费用类型")
|
||||
private String expenseTypeCode;
|
||||
|
||||
@ApiModelProperty("费用类型名称")
|
||||
@DictField(sourceField= "expenseTypeCode")
|
||||
private String expenseTypeName;
|
||||
|
||||
@ApiModelProperty("调整类型(1-调增 2-调减)")
|
||||
private Integer adjustType;
|
||||
|
||||
@ApiModelProperty("调整金额")
|
||||
private BigDecimal adjustAmount;
|
||||
|
||||
@ApiModelProperty("调整原因")
|
||||
private String adjustReason;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("附件信息")
|
||||
private String attachmentInfo;
|
||||
|
||||
@ApiModelProperty("单据状态(10-待充值/20-已充值待认款/30-认款完成/40-分部分账/50-分账完成)")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
private String createUserId;
|
||||
|
||||
@ApiModelProperty("创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("已分账金额")
|
||||
private BigDecimal settledAmount;
|
||||
|
||||
@ApiModelProperty("待分账金额")
|
||||
private BigDecimal pendingSettlementAmount;
|
||||
|
||||
@ApiModelProperty("认领人ID")
|
||||
private String claimUserId;
|
||||
|
||||
@ApiModelProperty("认领人姓名")
|
||||
private String claimUserName;
|
||||
|
||||
@ApiModelProperty("认领时间")
|
||||
private Date claimTime;
|
||||
|
||||
@ApiModelProperty("费用单类型 1-费用单 2-调整单")
|
||||
private Integer expenseSheetType;
|
||||
|
||||
@ApiModelProperty("合同附件信息")
|
||||
private String contractAttachmentInfo;
|
||||
|
||||
@ApiModelProperty("关联银行流水号")
|
||||
private List<String> tradeNoList;
|
||||
|
||||
@ApiModelProperty("支付时间")
|
||||
private Date payTime;
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class SplitOrderResponse implements Serializable {
|
||||
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("分账单号")
|
||||
private String splitNo;
|
||||
|
||||
@ApiModelProperty("分账类型(1-门店付款/2-门店收款/3-公司间结算)")
|
||||
private Integer splitType;
|
||||
|
||||
@ApiModelProperty("关联门店")
|
||||
private String relatedStoreId;
|
||||
|
||||
@ApiModelProperty("门店名称")
|
||||
private String storeName;
|
||||
|
||||
@ApiModelProperty("门店编码")
|
||||
private String storeNum;
|
||||
|
||||
@ApiModelProperty("付款账户名称")
|
||||
private String payerAccountName;
|
||||
|
||||
@ApiModelProperty("付款账户")
|
||||
private String payerAccountNo;
|
||||
|
||||
@ApiModelProperty("收款账户")
|
||||
private String payeeAccountNo;
|
||||
|
||||
@ApiModelProperty("分账失败原因")
|
||||
private String failReason;
|
||||
|
||||
@ApiModelProperty("收款账户名称")
|
||||
private String payeeAccountName;
|
||||
|
||||
@ApiModelProperty("费用类型")
|
||||
private String expenseTypeCode;
|
||||
|
||||
@ApiModelProperty("分账金额")
|
||||
private BigDecimal splitAmount;
|
||||
|
||||
@ApiModelProperty("关联单据号(如费用调整单号)")
|
||||
private String relatedDocNo;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("状态(待分账/已完成)")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("确认人")
|
||||
private String confirmer;
|
||||
|
||||
@ApiModelProperty("确认人姓名")
|
||||
private String confirmerName;
|
||||
|
||||
@ApiModelProperty("确认时间")
|
||||
private Date confirmTime;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
private String createUserId;
|
||||
|
||||
@ApiModelProperty("创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("单据来源(1-手工新增/2-费用调整单/3-费用单)")
|
||||
private Integer source;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 提现申请响应
|
||||
*/
|
||||
@Data
|
||||
public class WithdrawApplicationResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("提现申请单号")
|
||||
private String withdrawNo;
|
||||
|
||||
@ApiModelProperty("提现账户名称")
|
||||
private String accountName;
|
||||
|
||||
@ApiModelProperty("提现金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("到账银行卡号")
|
||||
private String bankCardNo;
|
||||
|
||||
@ApiModelProperty("银行所属银行")
|
||||
private String bankName;
|
||||
|
||||
@ApiModelProperty("状态(1-已分账 2-分账失败 3-分账中 5-待分账)")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("失败原因")
|
||||
private String failReason;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
private String createUserId;
|
||||
|
||||
@ApiModelProperty("创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.request.wallet.ConfirmRechargeRequest;
|
||||
import com.cool.store.response.AdjustmentOrderResponse;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 费用调整单 Service
|
||||
*/
|
||||
public interface AdjustmentOrderService {
|
||||
|
||||
/**
|
||||
* 新增费用调整单
|
||||
* @param request 调整单请求
|
||||
* @return 是否成功
|
||||
*/
|
||||
Boolean add(AdjustmentOrderRequest request);
|
||||
|
||||
/**
|
||||
* 编辑费用调整单
|
||||
* @param request 调整单请求
|
||||
* @return 是否成功
|
||||
*/
|
||||
Boolean update(AdjustmentOrderRequest request);
|
||||
|
||||
/**
|
||||
* 删除费用调整单
|
||||
* @param id 调整单ID
|
||||
* @return 是否成功
|
||||
*/
|
||||
Boolean delete(Long id);
|
||||
|
||||
/**
|
||||
* 根据ID查询费用调整单详情
|
||||
* @param id 调整单ID
|
||||
* @return 调整单详情
|
||||
*/
|
||||
AdjustmentOrderResponse getById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询费用调整单
|
||||
* @param request 分页查询请求
|
||||
* @return 分页结果
|
||||
*/
|
||||
PageInfo<AdjustmentOrderResponse> page(AdjustmentOrderPageRequest request);
|
||||
|
||||
PageInfo<AdjustmentOrderResponse> getSpecialStatusData(AdjustmentSpecialPageRequest request);
|
||||
|
||||
|
||||
/**
|
||||
* 生成分账单
|
||||
* @param request 生成分账单请求
|
||||
* @return 分账单号
|
||||
*/
|
||||
String generateSplitOrder(GenerateSplitOrderRequest request);
|
||||
|
||||
/**
|
||||
* 认款
|
||||
* @param request 认款请求
|
||||
* @return 是否成功
|
||||
*/
|
||||
Boolean recognizePayment(RecognizePaymentRequest request, LoginUserInfo userInfo);
|
||||
|
||||
/**
|
||||
* 计算金额
|
||||
* @param id
|
||||
* @param transferAmount
|
||||
* @return
|
||||
*/
|
||||
Boolean calculateAmount(Long id ,String transferAmount);
|
||||
|
||||
/**
|
||||
* 确认充值
|
||||
* @return
|
||||
*/
|
||||
Boolean confirmRecharge(ConfirmRechargeRequest request);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dto.wallet.TradeRecordDTO;
|
||||
import com.cool.store.entity.wallet.WalletTradeDO;
|
||||
import com.cool.store.request.SplitOrderPageRequest;
|
||||
import com.cool.store.request.SplitOrderRequest;
|
||||
import com.cool.store.request.wallet.BillDetailRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.SplitOrderResponse;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分账主表 Service
|
||||
*/
|
||||
public interface SplitOrderService {
|
||||
|
||||
/**
|
||||
* 新增分账单
|
||||
* @param request 分账单请求
|
||||
* @return 是否成功
|
||||
*/
|
||||
Boolean add(SplitOrderRequest request);
|
||||
|
||||
/**
|
||||
* 编辑分账单
|
||||
* @param request 分账单请求
|
||||
* @return 是否成功
|
||||
*/
|
||||
Boolean update(SplitOrderRequest request);
|
||||
|
||||
/**
|
||||
* 删除分账单
|
||||
* @param id 分账单ID
|
||||
* @return 是否成功
|
||||
*/
|
||||
Boolean delete(Long id);
|
||||
|
||||
/**
|
||||
* 根据ID查询分账单详情
|
||||
* @param id 分账单ID
|
||||
* @return 分账单详情
|
||||
*/
|
||||
SplitOrderResponse getById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询分账单
|
||||
* @param request 分页查询请求
|
||||
* @return 分页结果
|
||||
*/
|
||||
PageInfo<SplitOrderResponse> page(SplitOrderPageRequest request);
|
||||
|
||||
/**
|
||||
* 批量更新状态
|
||||
* @param ids 分账单ID列表
|
||||
* @param status 目标状态
|
||||
* @return 是否成功
|
||||
*/
|
||||
Boolean batchUpdateStatus(List<Long> ids, String status);
|
||||
|
||||
/**
|
||||
* 确认分账
|
||||
* @param id 分账单ID
|
||||
* @return 是否成功
|
||||
*/
|
||||
Boolean confirmSplitOrder(Long id, LoginUserInfo userInfo);
|
||||
|
||||
TradeRecordDTO getBillDetail(Long id);
|
||||
|
||||
/**
|
||||
* 更新数据
|
||||
* @param walletTradeDO
|
||||
*/
|
||||
Boolean updateWalletTrade(WalletTradeDO walletTradeDO);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dao.wallet.WalletTradeDAO;
|
||||
import com.cool.store.dto.wallet.WithdrawApplicationDTO;
|
||||
import com.cool.store.entity.wallet.WalletTradeDO;
|
||||
import com.cool.store.request.WithdrawApplicationPageRequest;
|
||||
import com.cool.store.request.WithdrawApplicationRequest;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
/**
|
||||
* 提现申请 Service
|
||||
*/
|
||||
public interface WithdrawApplicationService {
|
||||
|
||||
/**
|
||||
* 分页查询提现申请
|
||||
*/
|
||||
PageInfo<WithdrawApplicationDTO> page(WithdrawApplicationPageRequest request);
|
||||
|
||||
/**
|
||||
* 新增提现申请
|
||||
*/
|
||||
Boolean add(WithdrawApplicationRequest request);
|
||||
|
||||
Boolean confirmWithdraw(Long id);
|
||||
|
||||
Boolean updateTrade(WalletTradeDO walletTradeDO);
|
||||
|
||||
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.cool.store.service.fees;
|
||||
|
||||
import com.cool.store.dto.wallet.AccountTransferDTO;
|
||||
import com.cool.store.request.fees.WalletCancelPayRequest;
|
||||
import com.cool.store.request.fees.WalletPayRequest;
|
||||
import com.cool.store.request.fees.WalletRepayRequest;
|
||||
import com.cool.store.vo.fees.WalletPayInfoVO;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -57,4 +59,16 @@ public interface WalletPayInfoService {
|
||||
* @param walletPayInfoId 支付信息
|
||||
*/
|
||||
void rePushReceipt(Long walletPayInfoId);
|
||||
|
||||
/**
|
||||
* 账户间转账
|
||||
* @param expenseType
|
||||
* @param amount
|
||||
* @param inAccNo
|
||||
* @param outAccNo
|
||||
* @param payNo
|
||||
* @param remark
|
||||
* @return
|
||||
*/
|
||||
AccountTransferDTO accountPay(String expenseType, BigDecimal amount, String inAccNo, String outAccNo, String payNo, String remark);
|
||||
}
|
||||
|
||||
@@ -14,9 +14,10 @@ import com.cool.store.dao.fees.ShopAllocationInfoDAO;
|
||||
import com.cool.store.dao.fees.WalletPayInfoDAO;
|
||||
import com.cool.store.dao.wallet.WalletTradeDAO;
|
||||
import com.cool.store.dto.wallet.AccountInfoDTO;
|
||||
import com.cool.store.dto.wallet.AccountTransferDTO;
|
||||
import com.cool.store.dto.wallet.BatchTransferDTO;
|
||||
import com.cool.store.request.wallet.BatchTransferQueryRequest;
|
||||
import com.cool.store.request.wallet.BatchTransferRequest;
|
||||
import com.cool.store.enums.wechat.WalletTypeEnum;
|
||||
import com.cool.store.request.wallet.*;
|
||||
import com.cool.store.dto.wallet.TransferDTO;
|
||||
import com.cool.store.entity.FranchiseFeeDO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
@@ -35,8 +36,6 @@ import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.fees.WalletCancelPayRequest;
|
||||
import com.cool.store.request.fees.WalletPayRequest;
|
||||
import com.cool.store.request.fees.WalletRepayRequest;
|
||||
import com.cool.store.request.wallet.OutStoreIdRequest;
|
||||
import com.cool.store.request.wallet.TransferRequest;
|
||||
import com.cool.store.request.xgj.ReceiptRequest;
|
||||
import com.cool.store.service.PushService;
|
||||
import com.cool.store.service.fees.WalletPayInfoService;
|
||||
@@ -374,4 +373,20 @@ public class WalletPayInfoServiceImpl implements WalletPayInfoService {
|
||||
request.setRemark(feeItem.getDesc());
|
||||
return walletApiService.transfer(request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccountTransferDTO accountPay(String expenseType, BigDecimal amount, String inAccNo, String outAccNo,String payNo, String remark) {
|
||||
WalletFeeItemEnum feeItem = WalletFeeItemEnum.getByExpenseType(expenseType);
|
||||
if (Objects.isNull(feeItem)) {
|
||||
throw new ServiceException(ErrorCodeEnum.NONSUPPORT_EXPENSE_TYPE);
|
||||
}
|
||||
AccountTransferRequest request = new AccountTransferRequest();
|
||||
request.setReqNo(payNo);
|
||||
request.setInAccNo(inAccNo);
|
||||
request.setOutAccNo(outAccNo);
|
||||
request.setRemark(remark);
|
||||
request.setAmount(amount.toPlainString());
|
||||
request.setWalletType(WalletTypeEnum.ONLINE_BANK.getType());
|
||||
return walletApiService.accountTransfer(request);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,440 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.wallet.AccountInfoDTO;
|
||||
import com.cool.store.entity.AdjustmentOrderDO;
|
||||
import com.cool.store.entity.ExpenseMappingDO;
|
||||
import com.cool.store.entity.SplitOrderDO;
|
||||
import com.cool.store.entity.StoreDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.ExpenseSheetTypeEnum;
|
||||
import com.cool.store.enums.wallet.DocStatusEnum;
|
||||
import com.cool.store.enums.wallet.SplitSourceEnum;
|
||||
import com.cool.store.enums.wallet.SplitTypeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.request.wallet.ConfirmRechargeRequest;
|
||||
import com.cool.store.request.wallet.OutStoreIdRequest;
|
||||
import com.cool.store.response.AdjustmentOrderResponse;
|
||||
import com.cool.store.service.AdjustmentOrderService;
|
||||
import com.cool.store.service.dict.impl.DictService;
|
||||
import com.cool.store.service.wallet.WalletApiService;
|
||||
import com.cool.store.utils.GenerateNoUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static com.cool.store.enums.fees.AllocationPayStatusEnum.*;
|
||||
import static com.cool.store.enums.wallet.DocStatusEnum.*;
|
||||
|
||||
/**
|
||||
* 费用调整单 Service 实现类
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class AdjustmentOrderServiceImpl implements AdjustmentOrderService {
|
||||
|
||||
@Resource
|
||||
private AdjustmentOrderDAO adjustmentOrderDAO;
|
||||
|
||||
@Resource
|
||||
private SplitOrderDAO splitOrderDAO;
|
||||
|
||||
@Resource
|
||||
private StoreDao storeDao;
|
||||
|
||||
@Resource
|
||||
private ExpenseMappingDAO expenseMappingDAO;
|
||||
|
||||
@Resource
|
||||
WalletApiService walletApiService;
|
||||
|
||||
@Resource
|
||||
EnterpriseUserDAO enterpriseUserDAO;
|
||||
|
||||
@Resource
|
||||
DictService dictService;
|
||||
|
||||
private static final String ADJUSTMENT_ORDER_PREFIX = "TZ";
|
||||
private static final String EXPENSE_SHEET_PREFIX = "FY";
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean add(AdjustmentOrderRequest request) {
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
|
||||
// 校验门店是否存在
|
||||
StoreDO store = storeDao.getByStoreId(request.getStoreId());
|
||||
if (store == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.STORE_IS_EXIST);
|
||||
}
|
||||
|
||||
AdjustmentOrderDO adjustmentOrder = AdjustmentOrderDO.builder()
|
||||
.adjustmentNo(GenerateNoUtil.generateAdjustmentNo(request.getExpenseSheetType()))
|
||||
.storeId(request.getStoreId())
|
||||
.businessTypeCode(request.getBusinessTypeCode())
|
||||
.expenseTypeCode(request.getExpenseTypeCode())
|
||||
.adjustType(request.getAdjustType())
|
||||
.adjustAmount(request.getAdjustAmount())
|
||||
.adjustReason(request.getAdjustReason())
|
||||
.remark(request.getRemark())
|
||||
.attachmentInfo(request.getAttachmentInfo())
|
||||
.contractAttachmentInfo(request.getContractAttachmentInfo())
|
||||
.expenseSheetType(request.getExpenseSheetType())
|
||||
.settledAmount(new BigDecimal("0"))
|
||||
.pendingSettlementAmount(request.getAdjustAmount())
|
||||
.status(DOC_STATUS_1.getStatus())
|
||||
.createUserId(userId)
|
||||
.createTime(new Date())
|
||||
.build();
|
||||
|
||||
int result = adjustmentOrderDAO.insert(adjustmentOrder);
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean update(AdjustmentOrderRequest request) {
|
||||
if (request.getId() == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.CHANGE_ID_NOT_NULL);
|
||||
}
|
||||
|
||||
AdjustmentOrderDO existing = adjustmentOrderDAO.getById(request.getId());
|
||||
if (existing == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.CHANGE_NOT_NULL);
|
||||
}
|
||||
|
||||
// 只有待确认缴费状态才能编辑
|
||||
if (!DOC_STATUS_1.getStatus().equals(existing.getStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_SUPPORT_OPERATION);
|
||||
}
|
||||
|
||||
AdjustmentOrderDO update = AdjustmentOrderDO.builder()
|
||||
.id(request.getId())
|
||||
.storeId(request.getStoreId())
|
||||
.businessTypeCode(request.getBusinessTypeCode())
|
||||
.expenseTypeCode(request.getExpenseTypeCode())
|
||||
.adjustType(request.getAdjustType())
|
||||
.adjustAmount(request.getAdjustAmount())
|
||||
.adjustReason(request.getAdjustReason())
|
||||
.remark(request.getRemark())
|
||||
.expenseSheetType(request.getExpenseSheetType())
|
||||
.settledAmount(new BigDecimal("0"))
|
||||
.pendingSettlementAmount(request.getAdjustAmount())
|
||||
.contractAttachmentInfo(request.getContractAttachmentInfo())
|
||||
.attachmentInfo(request.getAttachmentInfo())
|
||||
.build();
|
||||
|
||||
int result = adjustmentOrderDAO.update(update);
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean delete(Long id) {
|
||||
if (id == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.CHANGE_ID_NOT_NULL);
|
||||
}
|
||||
|
||||
AdjustmentOrderDO existing = adjustmentOrderDAO.getById(id);
|
||||
if (existing == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.CHANGE_NOT_NULL);
|
||||
}
|
||||
|
||||
// 只有待确认缴费状态才能删除
|
||||
if (!DOC_STATUS_1.getStatus().equals(existing.getStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_SUPPORT_OPERATION);
|
||||
}
|
||||
existing.setDeleted(1);
|
||||
adjustmentOrderDAO.update(existing);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdjustmentOrderResponse getById(Long id) {
|
||||
if (id == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdjustmentOrderDO adjustmentOrder = adjustmentOrderDAO.getById(id);
|
||||
if (adjustmentOrder == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return buildResponse(adjustmentOrder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<AdjustmentOrderResponse> page(AdjustmentOrderPageRequest request) {
|
||||
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||
List<AdjustmentOrderResponse> list = adjustmentOrderDAO.pageQuery(request);
|
||||
|
||||
dictService.fillDictField(list);
|
||||
// 批量查询交易流水号
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
List<String> adjustmentNos = list.stream()
|
||||
.map(AdjustmentOrderResponse::getAdjustmentNo)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<ExpenseMappingDO> expenseMappings = expenseMappingDAO.listByRelatedAdjustmentNoList(adjustmentNos);
|
||||
|
||||
// 按调整单号分组
|
||||
Map<String, List<String>> tradeNoMap = expenseMappings.stream()
|
||||
.collect(Collectors.groupingBy(
|
||||
ExpenseMappingDO::getRelatedAdjustmentNo,
|
||||
Collectors.mapping(ExpenseMappingDO::getTradeNo, Collectors.toList())
|
||||
));
|
||||
|
||||
Set<String> userIdList = list.stream()
|
||||
.filter(x -> StringUtils.isNotBlank(x.getClaimUserId()) || StringUtils.isNotBlank(x.getCreateUserId()))
|
||||
.flatMap(x -> Stream.of(x.getClaimUserId(), x.getCreateUserId()))
|
||||
.filter(StringUtils::isNotBlank)
|
||||
.collect(Collectors.toSet());
|
||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(new ArrayList<>(userIdList));
|
||||
|
||||
// 填充交易流水号
|
||||
list.forEach(response -> {
|
||||
List<String> tradeNos = tradeNoMap.get(response.getAdjustmentNo());
|
||||
if (CollectionUtils.isNotEmpty(tradeNos)) {
|
||||
response.setTradeNoList(tradeNos);
|
||||
}
|
||||
if (StringUtils.isNotBlank(response.getClaimUserId())){
|
||||
response.setClaimUserName(userNameMap.get(response.getClaimUserId()));
|
||||
}
|
||||
if (StringUtils.isNotEmpty(response.getCreateUserId())){
|
||||
response.setCreateUserName(userNameMap.get(response.getCreateUserId()));
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return new PageInfo<>(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<AdjustmentOrderResponse> getSpecialStatusData(AdjustmentSpecialPageRequest request) {
|
||||
AdjustmentOrderPageRequest convert = AdjustmentSpecialPageRequest.convert(request);
|
||||
//只查询指定的状态
|
||||
List<Integer> statusList = convert.getStatusList();
|
||||
List<Integer> list = Arrays.asList(DOC_STATUS_4.getStatus(), DOC_STATUS_3.getStatus());
|
||||
if (CollectionUtils.isEmpty(statusList)){
|
||||
statusList = list;
|
||||
}else {
|
||||
statusList.addAll(list);
|
||||
}
|
||||
convert.setStatusList(statusList);
|
||||
return page(convert);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String generateSplitOrder(GenerateSplitOrderRequest request) {
|
||||
if (request.getId() == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.CHANGE_ID_NOT_NULL);
|
||||
}
|
||||
|
||||
AdjustmentOrderDO adjustmentOrder = adjustmentOrderDAO.getById(request.getId());
|
||||
if (adjustmentOrder == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.CHANGE_NOT_NULL);
|
||||
}
|
||||
|
||||
List<SplitOrderDO> splitOrderDOS = splitOrderDAO.listByRelatedDocNo(adjustmentOrder.getAdjustmentNo(), Arrays.asList(UNPAID.getStatus(), PAYING.getStatus()));
|
||||
if (CollectionUtils.isNotEmpty(splitOrderDOS)){
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_COMPLETE_TRANS_SHEET);
|
||||
}
|
||||
|
||||
//分账金额不能大雨待分账金额
|
||||
if (adjustmentOrder.getPendingSettlementAmount().compareTo(request.getSplitAmount())<0){
|
||||
throw new ServiceException(ErrorCodeEnum.PENDING_TRANS_AMOUNT);
|
||||
}
|
||||
|
||||
// 只有认款完成状态才能生成分账单
|
||||
if (!DOC_STATUS_3.getStatus().equals(adjustmentOrder.getStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_SUPPORT_OPERATION);
|
||||
}
|
||||
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
String splitNo = GenerateNoUtil.generateSplitNo();
|
||||
|
||||
// 查询门店信息
|
||||
StoreDO store = storeDao.getByStoreId(adjustmentOrder.getStoreId());
|
||||
if (store == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.STORE_IS_EXIST);
|
||||
}
|
||||
SplitSourceEnum splitSourceEnum = SplitSourceEnum.getSplitSourceEnum(adjustmentOrder.getExpenseSheetType());
|
||||
Integer source = null;
|
||||
if (splitSourceEnum!=null){
|
||||
source = splitSourceEnum.getStatus();
|
||||
}
|
||||
OutStoreIdRequest outStoreIdRequest = new OutStoreIdRequest();
|
||||
outStoreIdRequest.setOutStoreId(adjustmentOrder.getStoreId());
|
||||
List<AccountInfoDTO> accountInfoList = walletApiService.getAccountInfo(outStoreIdRequest);
|
||||
|
||||
if (CollectionUtils.isEmpty(accountInfoList)){
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_EXIST_WANG_SHANG_ACCOUNT);
|
||||
}
|
||||
|
||||
AccountInfoDTO accountInfoDTO = accountInfoList.get(0);
|
||||
|
||||
// 生成分账单
|
||||
SplitOrderDO splitOrder = SplitOrderDO.builder()
|
||||
.splitNo(splitNo)
|
||||
.splitType(SplitTypeEnum.ADD_BY_HAND.getStatus())
|
||||
.relatedStoreId(adjustmentOrder.getStoreId())
|
||||
.payerAccountName(accountInfoDTO.getAccountName())
|
||||
.payerAccountNo(accountInfoDTO.getAccountNo())
|
||||
.payeeAccountName(request.getPayeeAccountName())
|
||||
.payeeAccountNo(request.getPayeeAccountNo())
|
||||
.expenseTypeCode(adjustmentOrder.getExpenseTypeCode())
|
||||
.splitAmount(request.getSplitAmount())
|
||||
.relatedDocNo(adjustmentOrder.getAdjustmentNo())
|
||||
.attachmentInfo(request.getAttachmentInfo())
|
||||
.remark(request.getRemark())
|
||||
.status(UNPAID.getStatus())
|
||||
.createUserId(userId)
|
||||
.createTime(new Date())
|
||||
.source(source)
|
||||
.build();
|
||||
|
||||
splitOrderDAO.insert(splitOrder);
|
||||
return splitNo;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean recognizePayment(RecognizePaymentRequest request, LoginUserInfo userInfo) {
|
||||
if (request.getId() == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.CHANGE_ID_NOT_NULL);
|
||||
}
|
||||
|
||||
if (CollectionUtils.isEmpty(request.getTradeNos())) {
|
||||
throw new ServiceException(ErrorCodeEnum.ERROR_MESSAGE, "交易流水号列表不能为空");
|
||||
}
|
||||
|
||||
// 查询费用调整单
|
||||
AdjustmentOrderDO adjustmentOrder = adjustmentOrderDAO.getById(request.getId());
|
||||
if (adjustmentOrder == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.CHANGE_NOT_NULL);
|
||||
}
|
||||
|
||||
// 只有待充值待认款状态才能进行认款操作
|
||||
if (!(DOC_STATUS_2.getStatus().equals(adjustmentOrder.getStatus())||DOC_STATUS_1.getStatus().equals(adjustmentOrder.getStatus()))) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_SUPPORT_OPERATION);
|
||||
}
|
||||
|
||||
// 查询交易流水号是否已被使用
|
||||
List<ExpenseMappingDO> existingMappings = expenseMappingDAO.listByTradeNos(request.getTradeNos());
|
||||
if (CollectionUtils.isNotEmpty(existingMappings)) {
|
||||
throw new ServiceException(ErrorCodeEnum.TRADE_EXIST);
|
||||
}
|
||||
|
||||
// 批量插入映射记录
|
||||
List<ExpenseMappingDO> mappingList = request.getTradeNos().stream()
|
||||
.map(tradeNo -> ExpenseMappingDO.builder()
|
||||
.relatedAdjustmentNo(adjustmentOrder.getAdjustmentNo())
|
||||
.tradeNo(tradeNo)
|
||||
.build())
|
||||
.collect(Collectors.toList());
|
||||
|
||||
expenseMappingDAO.batchInsert(mappingList);
|
||||
|
||||
// 更新费用调整单状态为认款完成
|
||||
AdjustmentOrderDO update = AdjustmentOrderDO.builder()
|
||||
.id(request.getId())
|
||||
.status(DOC_STATUS_3.getStatus())
|
||||
.claimTime(new Date())
|
||||
.claimUserId(userInfo.getUserId())
|
||||
.build();
|
||||
|
||||
adjustmentOrderDAO.update(update);
|
||||
|
||||
log.info("费用调整单认款成功,单号:{},交易流水号:{}",
|
||||
adjustmentOrder.getAdjustmentNo(), request.getTradeNos());
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean calculateAmount(Long id, String transferAmount) {
|
||||
AdjustmentOrderDO adjustmentOrderDO = adjustmentOrderDAO.getById(id);
|
||||
if (adjustmentOrderDO==null){
|
||||
log.info("calculateAmount:费用单/费用调整单为空");
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
BigDecimal amount = new BigDecimal(transferAmount);
|
||||
adjustmentOrderDO.setSettledAmount(adjustmentOrderDO.getSettledAmount().add(amount));
|
||||
adjustmentOrderDO.setPendingSettlementAmount(adjustmentOrderDO.getPendingSettlementAmount().subtract(amount));
|
||||
if (adjustmentOrderDO.getPendingSettlementAmount().compareTo(new BigDecimal("0"))<=0){
|
||||
adjustmentOrderDO.setStatus(DOC_STATUS_5.getStatus());
|
||||
}
|
||||
if (adjustmentOrderDO.getPendingSettlementAmount().compareTo(new BigDecimal("0"))>0){
|
||||
adjustmentOrderDO.setStatus(DOC_STATUS_4.getStatus());
|
||||
}
|
||||
adjustmentOrderDAO.update(adjustmentOrderDO);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean confirmRecharge(ConfirmRechargeRequest request) {
|
||||
AdjustmentOrderDO adjustmentOrderDO = adjustmentOrderDAO.getById(request.getId());
|
||||
if (adjustmentOrderDO==null){
|
||||
throw new ServiceException(ErrorCodeEnum.CHANGE_NOT_NULL);
|
||||
}
|
||||
adjustmentOrderDO.setAttachmentInfo(request.getAttachmentInfo());
|
||||
adjustmentOrderDO.setRemark(request.getRemark());
|
||||
adjustmentOrderDO.setStatus(DOC_STATUS_2.getStatus());
|
||||
adjustmentOrderDO.setPayTime(new Date());
|
||||
adjustmentOrderDAO.update(adjustmentOrderDO);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建响应对象
|
||||
*/
|
||||
private AdjustmentOrderResponse buildResponse(AdjustmentOrderDO adjustmentOrder) {
|
||||
AdjustmentOrderResponse response = new AdjustmentOrderResponse();
|
||||
response.setId(adjustmentOrder.getId());
|
||||
response.setAdjustmentNo(adjustmentOrder.getAdjustmentNo());
|
||||
response.setStoreId(adjustmentOrder.getStoreId());
|
||||
response.setBusinessTypeCode(adjustmentOrder.getBusinessTypeCode());
|
||||
response.setExpenseTypeCode(adjustmentOrder.getExpenseTypeCode());
|
||||
response.setAdjustType(adjustmentOrder.getAdjustType());
|
||||
response.setAdjustAmount(adjustmentOrder.getAdjustAmount());
|
||||
response.setAdjustReason(adjustmentOrder.getAdjustReason());
|
||||
response.setRemark(adjustmentOrder.getRemark());
|
||||
response.setAttachmentInfo(adjustmentOrder.getAttachmentInfo());
|
||||
response.setStatus(adjustmentOrder.getStatus());
|
||||
response.setCreateUserId(adjustmentOrder.getCreateUserId());
|
||||
response.setCreateTime(adjustmentOrder.getCreateTime());
|
||||
response.setSettledAmount(adjustmentOrder.getSettledAmount());
|
||||
response.setPendingSettlementAmount(adjustmentOrder.getPendingSettlementAmount());
|
||||
response.setClaimUserId(adjustmentOrder.getClaimUserId());
|
||||
response.setClaimTime(adjustmentOrder.getClaimTime());
|
||||
response.setContractAttachmentInfo(adjustmentOrder.getContractAttachmentInfo());
|
||||
response.setPayTime(adjustmentOrder.getPayTime());
|
||||
|
||||
// 设置门店信息
|
||||
if (StringUtils.isNotBlank(adjustmentOrder.getStoreId())) {
|
||||
StoreDO store = storeDao.getByStoreId(adjustmentOrder.getStoreId());
|
||||
if (store != null) {
|
||||
response.setStoreName(store.getStoreName());
|
||||
response.setStoreNum(store.getStoreNum());
|
||||
}
|
||||
}
|
||||
dictService.fillDictField(response);
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,335 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.constants.RedisConstant;
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.SplitOrderDAO;
|
||||
import com.cool.store.dao.StoreDao;
|
||||
import com.cool.store.dao.AdjustmentOrderDAO;
|
||||
import com.cool.store.dao.wallet.WalletTradeDAO;
|
||||
import com.cool.store.dto.wallet.AccountTransferDTO;
|
||||
import com.cool.store.dto.wallet.TradeRecordDTO;
|
||||
import com.cool.store.entity.SplitOrderDO;
|
||||
import com.cool.store.entity.StoreDO;
|
||||
import com.cool.store.entity.AdjustmentOrderDO;
|
||||
import com.cool.store.entity.wallet.WalletTradeDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.fees.AllocationPayStatusEnum;
|
||||
import com.cool.store.enums.wallet.SplitSourceEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.SplitOrderPageRequest;
|
||||
import com.cool.store.request.SplitOrderRequest;
|
||||
import com.cool.store.request.wallet.BillDetailRequest;
|
||||
import com.cool.store.response.SplitOrderResponse;
|
||||
import com.cool.store.service.AdjustmentOrderService;
|
||||
import com.cool.store.service.SplitOrderService;
|
||||
import com.cool.store.service.fees.WalletPayInfoService;
|
||||
import com.cool.store.service.wallet.WalletApiService;
|
||||
import com.cool.store.service.wallet.WalletService;
|
||||
import com.cool.store.utils.GenerateNoUtil;
|
||||
import com.cool.store.utils.RedisUtil;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.cool.store.enums.wallet.WalletTradeModuleEnum.STANDARD_STORE;
|
||||
import static com.cool.store.enums.wallet.WalletTradeModuleEnum.TRANSFER;
|
||||
|
||||
/**
|
||||
* 分账主表 Service 实现类
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class SplitOrderServiceImpl implements SplitOrderService {
|
||||
|
||||
@Resource
|
||||
private SplitOrderDAO splitOrderDAO;
|
||||
|
||||
@Resource
|
||||
private StoreDao storeDao;
|
||||
|
||||
@Resource
|
||||
private AdjustmentOrderDAO adjustmentOrderDAO;
|
||||
|
||||
@Resource
|
||||
AdjustmentOrderService adjustmentOrderService;
|
||||
|
||||
@Resource
|
||||
WalletPayInfoService walletPayInfoService;
|
||||
|
||||
@Resource
|
||||
WalletTradeDAO walletTradeDAO;
|
||||
|
||||
@Resource
|
||||
RedisUtil redisUtil;
|
||||
|
||||
@Resource
|
||||
WalletApiService walletApiService;
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean add(SplitOrderRequest request) {
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
|
||||
SplitOrderDO splitOrder = SplitOrderDO.builder()
|
||||
.splitNo(GenerateNoUtil.generateSplitNo())
|
||||
.splitType(request.getSplitType())
|
||||
.relatedStoreId(request.getRelatedStoreId())
|
||||
.payerAccountName(request.getPayerAccountName())
|
||||
.payerAccountNo(request.getPayerAccountNo())
|
||||
.payeeAccountName(request.getPayeeAccountName())
|
||||
.payeeAccountNo(request.getPayeeAccountNo())
|
||||
.expenseTypeCode(request.getExpenseTypeCode())
|
||||
.splitAmount(request.getSplitAmount())
|
||||
.relatedDocNo(request.getRelatedDocNo())
|
||||
.remark(request.getRemark())
|
||||
.status(AllocationPayStatusEnum.UNPAID.getStatus())
|
||||
.createUserId(userId)
|
||||
.createTime(new Date())
|
||||
.attachmentInfo(request.getAttachmentInfo())
|
||||
.source(SplitSourceEnum.ADD_BY_HAND.getStatus())
|
||||
.build();
|
||||
|
||||
int result = splitOrderDAO.insert(splitOrder);
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean update(SplitOrderRequest request) {
|
||||
if (request.getId() == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.TRANS_ID_NOT_NULL);
|
||||
}
|
||||
|
||||
SplitOrderDO existing = splitOrderDAO.getById(request.getId());
|
||||
if (existing == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.TRANS_NOT_NULL);
|
||||
}
|
||||
|
||||
// 只有待分账状态才能编辑
|
||||
if (!AllocationPayStatusEnum.UNPAID.getStatus().equals(existing.getStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_SUPPORT_OPERATION);
|
||||
}
|
||||
|
||||
SplitOrderDO update = SplitOrderDO.builder()
|
||||
.id(request.getId())
|
||||
.splitType(request.getSplitType())
|
||||
.relatedStoreId(request.getRelatedStoreId())
|
||||
.payerAccountName(request.getPayerAccountName())
|
||||
.payeeAccountNo(request.getPayerAccountNo())
|
||||
.payeeAccountName(request.getPayeeAccountName())
|
||||
.payeeAccountNo(request.getPayeeAccountNo())
|
||||
.expenseTypeCode(request.getExpenseTypeCode())
|
||||
.splitAmount(request.getSplitAmount())
|
||||
.relatedDocNo(request.getRelatedDocNo())
|
||||
.attachmentInfo(request.getAttachmentInfo())
|
||||
.remark(request.getRemark())
|
||||
.build();
|
||||
|
||||
int result = splitOrderDAO.update(update);
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean delete(Long id) {
|
||||
if (id == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.TRANS_ID_NOT_NULL);
|
||||
}
|
||||
|
||||
SplitOrderDO existing = splitOrderDAO.getById(id);
|
||||
if (existing == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.TRANS_NOT_NULL);
|
||||
}
|
||||
|
||||
// 只有待分账状态才能删除
|
||||
if (!AllocationPayStatusEnum.UNPAID.getStatus().equals(existing.getStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_SUPPORT_OPERATION);
|
||||
}
|
||||
|
||||
int result = splitOrderDAO.delete(id);
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SplitOrderResponse getById(Long id) {
|
||||
if (id == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
SplitOrderDO splitOrder = splitOrderDAO.getById(id);
|
||||
if (splitOrder == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return buildResponse(splitOrder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<SplitOrderResponse> page(SplitOrderPageRequest request) {
|
||||
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||
List<SplitOrderResponse> responses = splitOrderDAO.pageQueryWithStore(request);
|
||||
return new PageInfo<>(responses);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean batchUpdateStatus(List<Long> ids, String status) {
|
||||
if (CollectionUtils.isEmpty(ids) || StringUtils.isBlank(status)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int result = splitOrderDAO.batchUpdateStatus(ids, status);
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean confirmSplitOrder(Long id, LoginUserInfo userInfo) {
|
||||
if (id == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.TRANS_ID_NOT_NULL);
|
||||
}
|
||||
//分账单锁
|
||||
String lockKey = MessageFormat.format(RedisConstant.WALLET_TRANSFER_LOCK, id);
|
||||
boolean lock = redisUtil.tryLock(lockKey, id.toString(), 1,TimeUnit.SECONDS);
|
||||
if (!lock) {
|
||||
throw new ServiceException(ErrorCodeEnum.TRANSFER_ING);
|
||||
}
|
||||
SplitOrderDO existing = splitOrderDAO.getById(id);
|
||||
if (existing == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.TRANS_NOT_NULL);
|
||||
}
|
||||
// 只有待分账状态才能确认
|
||||
if (!AllocationPayStatusEnum.UNPAID.getStatus().equals(existing.getStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_SUPPORT_OPERATION);
|
||||
}
|
||||
|
||||
//营帐通完成分账 String expenseType, BigDecimal amount, String inAccNo, String outAccNo, String payNo, String remark
|
||||
AccountTransferDTO accountTransferDTO ;
|
||||
try {
|
||||
accountTransferDTO = walletPayInfoService.accountPay(existing.getExpenseTypeCode(), existing.getSplitAmount(),
|
||||
existing.getPayeeAccountNo(), existing.getPayerAccountNo(), existing.getSplitNo(), existing.getRemark());
|
||||
|
||||
}catch (Exception e){
|
||||
//分账失败 释放锁
|
||||
redisUtil.unlock(lockKey);
|
||||
throw new ServiceException(ErrorCodeEnum.TRANSFER_ERROR);
|
||||
}
|
||||
existing.setConfirmer(userInfo.getUserId());
|
||||
existing.setStatus(accountTransferDTO.getTradeStatus());
|
||||
existing.setConfirmTime(new Date());
|
||||
int result = splitOrderDAO.update(existing);
|
||||
|
||||
WalletTradeDO walletTradeDO = new WalletTradeDO();
|
||||
walletTradeDO.setPayStatus(accountTransferDTO.getTradeStatus());
|
||||
walletTradeDO.setModule(TRANSFER.getModule());
|
||||
walletTradeDO.setRemark(existing.getRemark());
|
||||
walletTradeDO.setPayAmount(new BigDecimal(accountTransferDTO.getAmount()));
|
||||
walletTradeDO.setPayTime(new Date());
|
||||
walletTradeDO.setPayNo(existing.getSplitNo());
|
||||
walletTradeDO.setTradeId(String.valueOf(accountTransferDTO.getTradeId()));
|
||||
walletTradeDO.setType(1);
|
||||
walletTradeDAO.insertSelective(walletTradeDO);
|
||||
//如果是分账完成 需要变更单据已分账金额
|
||||
if (AllocationPayStatusEnum.PAID.getStatus().equals(accountTransferDTO.getTradeStatus())){
|
||||
log.info("confirmSplitOrder 分账完成分账单ID:{}",id);
|
||||
adjustmentOrderService.calculateAmount(id,accountTransferDTO.getAmount());
|
||||
}
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TradeRecordDTO getBillDetail(Long id) {
|
||||
SplitOrderDO splitOrder = splitOrderDAO.getById(id);
|
||||
if (splitOrder==null){
|
||||
throw new ServiceException(ErrorCodeEnum.TRANS_NOT_NULL);
|
||||
}
|
||||
String splitNo = splitOrder.getSplitNo();
|
||||
WalletTradeDO walletTrade = walletTradeDAO.getByPayNo(splitNo);
|
||||
if (walletTrade==null){
|
||||
return null;
|
||||
}
|
||||
BillDetailRequest request = new BillDetailRequest();
|
||||
request.setTradeId(Long.valueOf(walletTrade.getTradeId()));
|
||||
return walletApiService.getBillDetail(request);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean updateWalletTrade(WalletTradeDO walletTradeDO) {
|
||||
log.info("updateWalletTrade:{}", JSONObject.toJSONString(walletTradeDO));
|
||||
if (walletTradeDO==null||StringUtils.isEmpty(walletTradeDO.getTradeId())){
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
SplitOrderDO split = splitOrderDAO.getBySplitNo(walletTradeDO.getPayNo());
|
||||
//通过tradeId查询支付状态
|
||||
BillDetailRequest billDetailRequest = new BillDetailRequest();
|
||||
billDetailRequest.setTradeId(Long.valueOf(walletTradeDO.getTradeId()));
|
||||
TradeRecordDTO billDetail = walletApiService.getBillDetail(billDetailRequest);
|
||||
//修改状态
|
||||
walletTradeDO.setPayStatus(billDetail.getTradeStatus());
|
||||
walletTradeDAO.updateByPrimaryKeySelective(walletTradeDO);
|
||||
split.setStatus(billDetail.getTradeStatus());
|
||||
split.setFailReason(billDetail.getErrMsg());
|
||||
splitOrderDAO.update(split);
|
||||
if (AllocationPayStatusEnum.PAID.getStatus().equals(billDetail.getTradeStatus())){
|
||||
log.info("confirmSplitOrder 分账完成分账单ID:{}",split.getId());
|
||||
adjustmentOrderService.calculateAmount(split.getId(),billDetail.getAmount());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 构建响应对象
|
||||
*/
|
||||
private SplitOrderResponse buildResponse(SplitOrderDO splitOrder) {
|
||||
SplitOrderResponse response = new SplitOrderResponse();
|
||||
response.setId(splitOrder.getId());
|
||||
response.setSplitNo(splitOrder.getSplitNo());
|
||||
response.setSplitType(splitOrder.getSplitType());
|
||||
response.setRelatedStoreId(splitOrder.getRelatedStoreId());
|
||||
response.setPayerAccountName(splitOrder.getPayerAccountName());
|
||||
response.setPayeeAccountNo(splitOrder.getPayeeAccountNo());
|
||||
response.setPayerAccountNo(splitOrder.getPayerAccountNo());
|
||||
response.setPayeeAccountName(splitOrder.getPayeeAccountName());
|
||||
response.setExpenseTypeCode(splitOrder.getExpenseTypeCode());
|
||||
response.setSplitAmount(splitOrder.getSplitAmount());
|
||||
response.setRelatedDocNo(splitOrder.getRelatedDocNo());
|
||||
response.setRemark(splitOrder.getRemark());
|
||||
response.setStatus(splitOrder.getStatus());
|
||||
response.setConfirmer(splitOrder.getConfirmer());
|
||||
response.setConfirmTime(splitOrder.getConfirmTime());
|
||||
response.setCreateUserId(splitOrder.getCreateUserId());
|
||||
response.setCreateTime(splitOrder.getCreateTime());
|
||||
response.setSource(splitOrder.getSource());
|
||||
|
||||
// 设置门店信息
|
||||
if (StringUtils.isNotBlank(splitOrder.getRelatedStoreId())) {
|
||||
StoreDO store = storeDao.getByStoreId(splitOrder.getRelatedStoreId());
|
||||
if (store != null) {
|
||||
response.setStoreName(store.getStoreName());
|
||||
response.setStoreNum(store.getStoreNum());
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.RedisConstant;
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.WithdrawApplicationDAO;
|
||||
import com.cool.store.dao.wallet.WalletTradeDAO;
|
||||
import com.cool.store.dto.wallet.AccountWithdrawerDTO;
|
||||
import com.cool.store.dto.wallet.TradeRecordDTO;
|
||||
import com.cool.store.dto.wallet.WithdrawApplicationDTO;
|
||||
import com.cool.store.entity.WithdrawApplicationDO;
|
||||
import com.cool.store.entity.wallet.WalletTradeDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.fees.AllocationPayStatusEnum;
|
||||
import com.cool.store.enums.wallet.TradeTypeEnum;
|
||||
import com.cool.store.enums.wechat.WalletTypeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.WithdrawApplicationPageRequest;
|
||||
import com.cool.store.request.WithdrawApplicationRequest;
|
||||
import com.cool.store.request.wallet.AccountWithdrawerRequest;
|
||||
import com.cool.store.request.wallet.BillDetailRequest;
|
||||
import com.cool.store.service.WithdrawApplicationService;
|
||||
import com.cool.store.service.wallet.WalletApiService;
|
||||
import com.cool.store.utils.GenerateNoUtil;
|
||||
import com.cool.store.utils.RedisUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static com.cool.store.enums.wallet.WalletTradeModuleEnum.STANDARD_STORE;
|
||||
import static com.cool.store.enums.wallet.WalletTradeModuleEnum.TRANSFER;
|
||||
|
||||
/**
|
||||
* 提现申请 Service 实现类
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class WithdrawApplicationServiceImpl implements WithdrawApplicationService {
|
||||
|
||||
@Resource
|
||||
private WithdrawApplicationDAO withdrawApplicationDAO;
|
||||
|
||||
@Resource
|
||||
RedisUtil redisUtil;
|
||||
|
||||
@Resource
|
||||
WalletApiService walletApiService;
|
||||
|
||||
@Resource
|
||||
WalletTradeDAO walletTradeDAO;
|
||||
|
||||
private static final String WITHDRAW_ORDER_PREFIX = "TX";
|
||||
|
||||
@Override
|
||||
public PageInfo<WithdrawApplicationDTO> page(WithdrawApplicationPageRequest request) {
|
||||
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||
List<WithdrawApplicationDTO> responses = withdrawApplicationDAO.pageQuery(request);
|
||||
return new PageInfo<>(responses);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean add(WithdrawApplicationRequest request) {
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
String withdrawNo = GenerateNoUtil.generateNo(WITHDRAW_ORDER_PREFIX);
|
||||
|
||||
WithdrawApplicationDO withdrawApplication = WithdrawApplicationDO.builder()
|
||||
.withdrawNo(withdrawNo)
|
||||
.accountName(request.getAccountName())
|
||||
.accountNo(request.getAccountNo())
|
||||
.amount(request.getAmount())
|
||||
.bankCardNo(request.getBankCardNo())
|
||||
.bankName(request.getBankName())
|
||||
.status(AllocationPayStatusEnum.UNPAID.getStatus())
|
||||
.createUserId(userId)
|
||||
.createTime(new Date())
|
||||
.updateTime(new Date())
|
||||
.build();
|
||||
|
||||
int result = withdrawApplicationDAO.insert(withdrawApplication);
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean confirmWithdraw(Long id) {
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
String lockKey = MessageFormat.format(RedisConstant.WALLET_WITHDRAW_LOCK, id);
|
||||
boolean lock = redisUtil.tryLock(lockKey, id.toString(), 1, TimeUnit.SECONDS);
|
||||
if (!lock) {
|
||||
throw new ServiceException(ErrorCodeEnum.TRANSFER_ING);
|
||||
}
|
||||
WithdrawApplicationDO withdrawApplicationDO = withdrawApplicationDAO.getById(id);
|
||||
if (Objects.isNull(withdrawApplicationDO)){
|
||||
throw new ServiceException(ErrorCodeEnum.WITHDRAW_APPLY_NOT_EXIST);
|
||||
}
|
||||
if (!AllocationPayStatusEnum.UNPAID.getStatus().equals(withdrawApplicationDO.getStatus())){
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_SUPPORT_OPERATION);
|
||||
}
|
||||
//开始提现
|
||||
AccountWithdrawerRequest request = new AccountWithdrawerRequest();
|
||||
request.setAccNo(withdrawApplicationDO.getAccountNo());
|
||||
request.setAmount(withdrawApplicationDO.getAmount().toPlainString());
|
||||
request.setReqNo(withdrawApplicationDO.getWithdrawNo());
|
||||
request.setWalletType(WalletTypeEnum.ONLINE_BANK.getType());
|
||||
//AccountWithdrawerDTO accountWithdrawerDTO = walletApiService.accountWithdrawer(request);
|
||||
AccountWithdrawerDTO accountWithdrawerDTO = new AccountWithdrawerDTO();
|
||||
accountWithdrawerDTO.setTradeId(11222L);
|
||||
accountWithdrawerDTO.setAmount("100");
|
||||
accountWithdrawerDTO.setTradeStatus(1);
|
||||
|
||||
withdrawApplicationDO.setStatus(accountWithdrawerDTO.getTradeStatus());
|
||||
withdrawApplicationDAO.update(withdrawApplicationDO);
|
||||
//保存交易单
|
||||
WalletTradeDO walletTrade = new WalletTradeDO();
|
||||
//支付中 通过查询详情获取是否是否支付成功
|
||||
walletTrade.setPayStatus(AllocationPayStatusEnum.PAYING.getStatus());
|
||||
walletTrade.setModule(TRANSFER.getModule());
|
||||
walletTrade.setPayNo(withdrawApplicationDO.getWithdrawNo());
|
||||
walletTrade.setTradeId(String.valueOf(accountWithdrawerDTO.getTradeId()));
|
||||
walletTrade.setType(TradeTypeEnum.FEE_ADJUSTMENT_ORDER.getStatus());
|
||||
walletTrade.setPayUserName(user.getName());
|
||||
walletTrade.setPayAmount(new BigDecimal(accountWithdrawerDTO.getAmount()));
|
||||
walletTrade.setPayStatus(accountWithdrawerDTO.getTradeStatus());
|
||||
walletTrade.setPayTime(new Date());
|
||||
walletTrade.setCreateTime(new Date());
|
||||
walletTradeDAO.insertSelective(walletTrade);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean updateTrade(WalletTradeDO walletTradeDO) {
|
||||
log.info("confirmWithdraw_updateTrade:{}", JSONObject.toJSONString(walletTradeDO));
|
||||
WithdrawApplicationDO withdraw = withdrawApplicationDAO.getByWithdrawNo(walletTradeDO.getPayNo());
|
||||
if (Objects.isNull(withdraw)){
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
try {
|
||||
//查询详情
|
||||
BillDetailRequest billDetailRequest = new BillDetailRequest();
|
||||
billDetailRequest.setTradeId(Long.valueOf(walletTradeDO.getTradeId()));
|
||||
TradeRecordDTO billDetail = walletApiService.getBillDetail(billDetailRequest);
|
||||
withdraw.setFailReason(billDetail.getErrMsg());
|
||||
withdraw.setStatus(billDetail.getTradeStatus());
|
||||
withdrawApplicationDAO.update(withdraw);
|
||||
walletTradeDO.setPayStatus(billDetail.getTradeStatus());
|
||||
walletTradeDAO.updateByPrimaryKeySelective(walletTradeDO);
|
||||
}catch (Exception e){
|
||||
log.info("confirmWithdraw_error:{}",e.getMessage());
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -548,7 +548,7 @@ public class PreAllocationRecordServiceImpl implements PreAllocationRecordServic
|
||||
Map<String, WalletAllocationDTO> allocationConfigMap = walletAllocationConfigDAO
|
||||
.selectByExpenseTypeList(FranchiseBrandEnum.ZXJP.getCode(), null)
|
||||
.stream()
|
||||
.collect(Collectors.toMap(WalletAllocationDTO::getExpenseType, Function.identity()));
|
||||
.collect(Collectors.toMap(WalletAllocationDTO::getExpenseType, Function.identity(),(existing, replacement) -> existing));
|
||||
|
||||
// 获取订单实际费用明细
|
||||
List<ExpenseTypeAmountDTO> actualExpenseList = storeOrderOptionSnapshotDAO
|
||||
|
||||
@@ -282,4 +282,24 @@ public class WalletApiService {
|
||||
public BatchTransferDTO queryBatchTransfer(BatchTransferQueryRequest request) {
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl + "/open/crm/trans/v1/queryBatchTransfer", request, BatchTransferDTO.class);
|
||||
}
|
||||
|
||||
public AccountTransferDTO accountTransfer(AccountTransferRequest request){
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl + "/open/crm/trans/v1/accountTransfer", request, AccountTransferDTO.class);
|
||||
}
|
||||
|
||||
public OrgAccountDTO findOrgAccount(AccountPageRequest request){
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl + "/open/crm/base/v1/findOrgAccount", request, OrgAccountDTO.class);
|
||||
}
|
||||
|
||||
public AccountWithdrawerDTO accountWithdrawer(AccountWithdrawerRequest request){
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl + "/open/crm/trans/v1/accountWithdrawer", request, AccountWithdrawerDTO.class);
|
||||
}
|
||||
|
||||
public AccountInfoDTO getAccountByAccNo(AccountDetailRequest request){
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl + "/open/crm/trans/v1/getAccountByAccNo", request, AccountInfoDTO.class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -163,9 +163,16 @@ public interface WalletService {
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
PageInfo<TradeRecordDTO> getTradeRecordList(CoolTradeRecodePageRequest request);
|
||||
PageInfo<TradeRecordDTO> getTradeRecordList(CoolTradeRecodePageRequest request,Boolean orgFlag);
|
||||
|
||||
|
||||
/**
|
||||
* 查询充值的数据
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
PageInfo<TradeRecordDTO> getRechargeTradeRecordList(CoolTradeRecodeRequest request);
|
||||
|
||||
/**
|
||||
* 通过门店Code 查询存量客户开通基本信息
|
||||
* @param storeCode
|
||||
@@ -202,4 +209,6 @@ public interface WalletService {
|
||||
* 网商充值账户查询
|
||||
*/
|
||||
WsPayAccountDTO wsPayAccountQuery(StoreShopRequest request);
|
||||
|
||||
PageInfo<AccountInfoDTO> getOrgAccountInfoList(CoolAccountPageRequest request);
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,79 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.AdjustmentOrderResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.AdjustmentOrderService;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 费用调整单 Controller
|
||||
*/
|
||||
@RequestMapping("/pc/adjustmentOrder")
|
||||
@RestController
|
||||
@Api(tags = "费用调整单管理")
|
||||
@Slf4j
|
||||
public class AdjustmentOrderController {
|
||||
|
||||
@Resource
|
||||
private AdjustmentOrderService adjustmentOrderService;
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("新增费用调整单")
|
||||
public ResponseResult<Boolean> add(@Valid @RequestBody AdjustmentOrderRequest request) {
|
||||
return ResponseResult.success(adjustmentOrderService.add(request));
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("编辑费用调整单")
|
||||
public ResponseResult<Boolean> update(@Valid @RequestBody AdjustmentOrderRequest request) {
|
||||
return ResponseResult.success(adjustmentOrderService.update(request));
|
||||
}
|
||||
|
||||
@PostMapping("/recognizePayment")
|
||||
@ApiOperation("认领")
|
||||
public ResponseResult<Boolean> recognizePayment(@Valid @RequestBody RecognizePaymentRequest request) {
|
||||
return ResponseResult.success(adjustmentOrderService.recognizePayment(request, CurrentUserHolder.getUser()));
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation("删除费用调整单")
|
||||
public ResponseResult<Boolean> delete(@ApiParam("调整单ID") @RequestParam Long id) {
|
||||
return ResponseResult.success(adjustmentOrderService.delete(id));
|
||||
}
|
||||
|
||||
@GetMapping("/getById")
|
||||
@ApiOperation("根据ID查询费用调整单详情")
|
||||
public ResponseResult<AdjustmentOrderResponse> getById(@ApiParam("调整单ID") @RequestParam Long id) {
|
||||
return ResponseResult.success(adjustmentOrderService.getById(id));
|
||||
}
|
||||
|
||||
@PostMapping("/page")
|
||||
@ApiOperation("分页查询费用调整单")
|
||||
public ResponseResult<PageInfo<AdjustmentOrderResponse>> page(@RequestBody AdjustmentOrderPageRequest request) {
|
||||
return ResponseResult.success(adjustmentOrderService.page(request));
|
||||
}
|
||||
|
||||
@PostMapping("/getSpecialStatusData")
|
||||
@ApiOperation("选择关联费用单费用调整单列表")
|
||||
public ResponseResult<PageInfo<AdjustmentOrderResponse>> getSpecialStatusData(@RequestBody AdjustmentSpecialPageRequest request) {
|
||||
return ResponseResult.success(adjustmentOrderService.getSpecialStatusData(request));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/generateSplitOrder")
|
||||
@ApiOperation("生成分账单")
|
||||
public ResponseResult<String> generateSplitOrder(@Valid @RequestBody GenerateSplitOrderRequest request) {
|
||||
return ResponseResult.success(adjustmentOrderService.generateSplitOrder(request));
|
||||
}
|
||||
}
|
||||
@@ -845,6 +845,27 @@ public class PCTestController {
|
||||
return ResponseResult.success(accountList);
|
||||
}
|
||||
|
||||
@ApiOperation("账户分账接口")
|
||||
@PostMapping("/accountTransfer")
|
||||
public ResponseResult<AccountTransferDTO> accountTransfer(@RequestBody AccountTransferRequest request) {
|
||||
AccountTransferDTO accountList = walletApiService.accountTransfer(request);
|
||||
return ResponseResult.success(accountList);
|
||||
}
|
||||
|
||||
@ApiOperation("组织账户查询接口")
|
||||
@PostMapping("/findOrgAccount")
|
||||
public ResponseResult<OrgAccountDTO> findOrgAccount(@RequestBody AccountPageRequest request) {
|
||||
OrgAccountDTO accountList = walletApiService.findOrgAccount(request);
|
||||
return ResponseResult.success(accountList);
|
||||
}
|
||||
|
||||
@ApiOperation("账户提现接口")
|
||||
@PostMapping("/accountWithdrawer")
|
||||
public ResponseResult<AccountWithdrawerDTO> accountWithdrawer(@RequestBody AccountWithdrawerRequest request) {
|
||||
AccountWithdrawerDTO accountList = walletApiService.accountWithdrawer(request);
|
||||
return ResponseResult.success(accountList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Value("${cool.api.rsa.private.key}")
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.dto.wallet.TradeRecordDTO;
|
||||
import com.cool.store.job.XxlJobHandler;
|
||||
import com.cool.store.request.SplitOrderPageRequest;
|
||||
import com.cool.store.request.SplitOrderRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.SplitOrderResponse;
|
||||
import com.cool.store.service.SplitOrderService;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分账主表 Controller
|
||||
*/
|
||||
@RequestMapping("/pc/splitOrder")
|
||||
@RestController
|
||||
@Api(tags = "分账单管理")
|
||||
@Slf4j
|
||||
public class SplitOrderController {
|
||||
|
||||
@Resource
|
||||
private SplitOrderService splitOrderService;
|
||||
|
||||
@Resource
|
||||
private XxlJobHandler xxlJobHandler;
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("新增分账单")
|
||||
public ResponseResult<Boolean> add(@Valid @RequestBody SplitOrderRequest request) {
|
||||
return ResponseResult.success(splitOrderService.add(request));
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("编辑分账单")
|
||||
public ResponseResult<Boolean> update(@Valid @RequestBody SplitOrderRequest request) {
|
||||
return ResponseResult.success(splitOrderService.update(request));
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation("删除分账单")
|
||||
public ResponseResult<Boolean> delete(@ApiParam("分账单ID") @RequestParam Long id) {
|
||||
return ResponseResult.success(splitOrderService.delete(id));
|
||||
}
|
||||
|
||||
@GetMapping("/getById")
|
||||
@ApiOperation("根据ID查询分账单详情")
|
||||
public ResponseResult<SplitOrderResponse> getById(@ApiParam("分账单ID") @RequestParam Long id) {
|
||||
return ResponseResult.success(splitOrderService.getById(id));
|
||||
}
|
||||
|
||||
@PostMapping("/page")
|
||||
@ApiOperation("分页查询分账单")
|
||||
public ResponseResult<PageInfo<SplitOrderResponse>> page(@RequestBody SplitOrderPageRequest request) {
|
||||
return ResponseResult.success(splitOrderService.page(request));
|
||||
}
|
||||
|
||||
@PostMapping("/batchUpdateStatus")
|
||||
@ApiOperation("批量更新状态")
|
||||
public ResponseResult<Boolean> batchUpdateStatus(
|
||||
@ApiParam("分账单ID列表") @RequestParam List<Long> ids,
|
||||
@ApiParam("目标状态") @RequestParam String status) {
|
||||
return ResponseResult.success(splitOrderService.batchUpdateStatus(ids, status));
|
||||
}
|
||||
|
||||
@PostMapping("/confirmSplitOrder")
|
||||
@ApiOperation("确认分账")
|
||||
public ResponseResult<Boolean> confirmSplitOrder(@ApiParam("分账单ID") @RequestParam Long id) {
|
||||
return ResponseResult.success(splitOrderService.confirmSplitOrder(id, CurrentUserHolder.getUser()));
|
||||
}
|
||||
|
||||
@ApiOperation("交易付款详情")
|
||||
@GetMapping("/billDetail")
|
||||
public ResponseResult<TradeRecordDTO> getBillDetail( @RequestParam Long id) {
|
||||
return ResponseResult.success(splitOrderService.getBillDetail(id));
|
||||
}
|
||||
|
||||
@ApiOperation("刷新分账单状态")
|
||||
@GetMapping("/refreshStatus")
|
||||
public ResponseResult<Boolean> refreshStatus() {
|
||||
xxlJobHandler.transfer();
|
||||
return ResponseResult.success(Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,7 @@ public class WalletController {
|
||||
@ApiOperation("分页查询所有流水列表 支持条件查询")
|
||||
@PostMapping("/getTradeRecordList")
|
||||
public ResponseResult<PageInfo<TradeRecordDTO>> getTradeRecordList(@RequestBody CoolTradeRecodePageRequest request) {
|
||||
return ResponseResult.success(walletService.getTradeRecordList(request));
|
||||
return ResponseResult.success(walletService.getTradeRecordList(request,Boolean.FALSE));
|
||||
}
|
||||
|
||||
@ApiOperation("账户流水")
|
||||
@@ -68,4 +68,23 @@ public class WalletController {
|
||||
public ResponseResult<TradeRecordDTO> getBillDetail(BillDetailRequest request) {
|
||||
return ResponseResult.success(walletService.getBillDetail(request));
|
||||
}
|
||||
|
||||
@ApiOperation("查询收款账户 支持条件查询")
|
||||
@PostMapping("/getOrgAccountInfoList")
|
||||
public ResponseResult<PageInfo<AccountInfoDTO>> getOrgAccountInfoList(@RequestBody CoolAccountPageRequest request) {
|
||||
return ResponseResult.success(walletService.getOrgAccountInfoList(request));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询门店充值流水列表 支持条件查询")
|
||||
@PostMapping("/getRechargeTradeRecordList")
|
||||
public ResponseResult<PageInfo<TradeRecordDTO>> getRechargeTradeRecordList(@RequestBody CoolTradeRecodeRequest request) {
|
||||
return ResponseResult.success(walletService.getRechargeTradeRecordList(request));
|
||||
}
|
||||
|
||||
@ApiOperation("分页立规组织下所有账号流水列表 支持条件查询")
|
||||
@PostMapping("/getLiGuiTradeRecordList")
|
||||
public ResponseResult<PageInfo<TradeRecordDTO>> getLiGuiTradeRecordList(@RequestBody CoolTradeRecodePageRequest request) {
|
||||
return ResponseResult.success(walletService.getTradeRecordList(request,Boolean.TRUE));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.dto.wallet.WithdrawApplicationDTO;
|
||||
import com.cool.store.request.WithdrawApplicationPageRequest;
|
||||
import com.cool.store.request.WithdrawApplicationRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.WithdrawApplicationResponse;
|
||||
import com.cool.store.service.WithdrawApplicationService;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 提现申请 Controller
|
||||
*/
|
||||
@RequestMapping("/pc/withdrawApplication")
|
||||
@RestController
|
||||
@Api(tags = "提现申请管理")
|
||||
@Slf4j
|
||||
public class WithdrawApplicationController {
|
||||
|
||||
@Resource
|
||||
private WithdrawApplicationService withdrawApplicationService;
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("新增提现申请")
|
||||
public ResponseResult<Boolean> add(@Valid @RequestBody WithdrawApplicationRequest request) {
|
||||
return ResponseResult.success(withdrawApplicationService.add(request));
|
||||
}
|
||||
|
||||
@PostMapping("/page")
|
||||
@ApiOperation("分页查询提现申请")
|
||||
public ResponseResult<PageInfo<WithdrawApplicationDTO>> page(@RequestBody WithdrawApplicationPageRequest request) {
|
||||
return ResponseResult.success(withdrawApplicationService.page(request));
|
||||
}
|
||||
|
||||
@PostMapping("/confirmWithdraw")
|
||||
@ApiOperation("确认提现")
|
||||
public ResponseResult<Boolean> confirmWithdraw(@RequestParam Long id) {
|
||||
return ResponseResult.success(withdrawApplicationService.confirmWithdraw(id));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.cool.store.controller.webc;
|
||||
|
||||
import com.cool.store.request.AdjustmentOrderPageRequest;
|
||||
import com.cool.store.request.wallet.ConfirmRechargeRequest;
|
||||
import com.cool.store.response.AdjustmentOrderResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.AdjustmentOrderService;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 费用调整单
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/12 16:03
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RequestMapping("/mini/adjustmentOrder")
|
||||
@RestController
|
||||
@Api(tags = "Mini费用调整单管理")
|
||||
@Slf4j
|
||||
public class MiniAdjustmentOrderController {
|
||||
|
||||
@Resource
|
||||
private AdjustmentOrderService adjustmentOrderService;
|
||||
|
||||
@GetMapping("/getById")
|
||||
@ApiOperation("根据ID查询费用调整单详情")
|
||||
public ResponseResult<AdjustmentOrderResponse> getById(@ApiParam("调整单ID") @RequestParam Long id) {
|
||||
return ResponseResult.success(adjustmentOrderService.getById(id));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/confirmRecharge")
|
||||
@ApiOperation("确认已充值")
|
||||
public ResponseResult<Boolean> confirmRecharge(@RequestBody ConfirmRechargeRequest request) {
|
||||
return ResponseResult.success(adjustmentOrderService.confirmRecharge(request));
|
||||
}
|
||||
|
||||
@PostMapping("/page")
|
||||
@ApiOperation("分页查询费用调整单")
|
||||
public ResponseResult<PageInfo<AdjustmentOrderResponse>> page(@RequestBody AdjustmentOrderPageRequest request) {
|
||||
return ResponseResult.success(adjustmentOrderService.page(request));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import com.cool.store.dto.*;
|
||||
import com.cool.store.dto.store.StoreOrderTimeDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.entity.tp.TpApplyFormDO;
|
||||
import com.cool.store.entity.wallet.WalletTradeDO;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.enums.tp.TpFormStatusEnum;
|
||||
import com.cool.store.enums.close.CloseTypeEnum;
|
||||
@@ -134,6 +135,10 @@ public class XxlJobHandler {
|
||||
WalletTradeDAO walletTradeDAO;
|
||||
@Resource
|
||||
PreAllocationRecordService preAllocationRecordService;
|
||||
@Resource
|
||||
SplitOrderService splitOrderService;
|
||||
@Resource
|
||||
WithdrawApplicationService withdrawApplicationService;
|
||||
|
||||
|
||||
/**
|
||||
@@ -672,4 +677,56 @@ public class XxlJobHandler {
|
||||
}
|
||||
log.info("------end batchTransferStandardStore------");
|
||||
}
|
||||
|
||||
@XxlJob("transfer")
|
||||
public void transfer() {
|
||||
MDCUtils.put(CommonConstants.REQUEST_ID, UUID.randomUUID().toString());
|
||||
log.info("------start transfer------");
|
||||
boolean hasNext = true;
|
||||
int pageNum = 1;
|
||||
int pageSize = CommonConstants.BATCH_SIZE;
|
||||
while (hasNext) {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
List<WalletTradeDO> walletTradeDOS = walletTradeDAO.transferTradeList(WalletTradeModuleEnum.STANDARD_STORE.getModule(), 1);
|
||||
hasNext = walletTradeDOS.size() >= pageSize;
|
||||
if (CollectionUtils.isEmpty(walletTradeDOS)) {
|
||||
break;
|
||||
}
|
||||
for (WalletTradeDO walletTradeDO : walletTradeDOS) {
|
||||
try {
|
||||
splitOrderService.updateWalletTrade(walletTradeDO);
|
||||
} catch (Exception e) {
|
||||
log.error("钱包转账分账支付状态查询失败, transfer:{}", walletTradeDO.getTradeId(), e);
|
||||
}
|
||||
}
|
||||
pageNum++;
|
||||
}
|
||||
log.info("------end transfer------");
|
||||
}
|
||||
|
||||
@XxlJob("withdrawUpdate")
|
||||
public void withdrawUpdate() {
|
||||
MDCUtils.put(CommonConstants.REQUEST_ID, UUID.randomUUID().toString());
|
||||
log.info("------start withdrawUpdate------");
|
||||
boolean hasNext = true;
|
||||
int pageNum = 1;
|
||||
int pageSize = CommonConstants.BATCH_SIZE;
|
||||
while (hasNext) {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
List<WalletTradeDO> walletTradeDOS = walletTradeDAO.transferTradeList(WalletTradeModuleEnum.STANDARD_STORE.getModule(), 2);
|
||||
hasNext = walletTradeDOS.size() >= pageSize;
|
||||
if (CollectionUtils.isEmpty(walletTradeDOS)) {
|
||||
break;
|
||||
}
|
||||
for (WalletTradeDO walletTradeDO : walletTradeDOS) {
|
||||
try {
|
||||
withdrawApplicationService.updateTrade(walletTradeDO);
|
||||
} catch (Exception e) {
|
||||
log.error("钱包提现支付状态查询失败, withdrawUpdate:{}", walletTradeDO.getTradeId(), e);
|
||||
}
|
||||
}
|
||||
pageNum++;
|
||||
}
|
||||
log.info("------end withdrawUpdate------");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,3 +176,4 @@ wallet.api.yzt.key=360155690205317
|
||||
cool.api.rsa.private.key=MIIEpQIBAAKCAQEA0erPAWesjkp9J4htmfCyqKS9npmT9dW3KqWTfb4c7x/QBUtKuokWOO0XikHd4bGUa9kl+twSv/5A3kYz1B9eg6wRuDJoads+G5U7rVQjzdoUtLaf3lNXkuSehl4uHUPQfNa6vcmvzraXPxJjEpYzj9WZh7uJqq2oSgw42H1qdbFCXSaE5BwsOb+2vZXjzh4RO10Sy3Qb1UqGsoZoxVzrtDeEctCjrecFyQr96L2UtYa4NTxSTfu4rgObrwIOMvqqnLsXEzK/rd6kIHYjkZYQCOa48AedWp2YKQ7Ldclj+VMLnXvl42J9exVkbs++8k3P5sI9fdZX4Ey2RBjnSoAo/QIDAQABAoIBACbBGi8I+CE77M+13wAu4RkD8xL7CQc3ic2ojGqIRPi7r5CuphD6mpzvXqtyfhd7DKr9h8bAxwBlnQ28ObjVgsI96/aM7dxvMs/uVPpqwIJyWuTDG5A05EPVC9REQnC6Mp09mnPL7rZz3Mfy6dIGY2YQWfwmWiPl1B45k+wZ+WPZPI0JVnvRzM881kf4aAhEAt08i9VoihylwVAjWIPmLuhf6ZcqI5q8iUsjfO22wZJsudVTCA/dsJdNxv+1RDKeYnSLJL79cZQcodqEhFqTy6vnn2dMsaHH7dpphU27barxUjeL482SR7kFfMqEXn5sltRn/3ep+3sf4Ph2vMtoZeECgYEA6gXzEtT9ZOeAMp4BRGmfNZ0TQLprPPVSwudz/uUBE4j/vyhfXkh9p7hqwyoxN+Z8b65yINvx8yP6hge6ek/MyAwBCZyfIRxZAPZu1eEGoYKl391ubFt2EIVqrN2DtAvzHMr5B/E2VHBq6AJm/rERFX5oKsg6zHS9tPLhgGnWVd0CgYEA5aFWOrtiqZJlp1MHQ4OeWBJatBSynkORdxCW7ic0CKbkYus0NSz1SsvskpbnfEXNB53x98qJxRhSopg/DC4m7XqxjSf9lY3HH4Y/9907olj33yGAnLWC88GivVndt577u/XhYRCk33vOQ3GoibEdjnpMOkWmOfwYG/FsRWWQvaECgYEA1N2siEisZIgel+wZAv2AD+hchtgKi1wqd5bIb+Yl4HsRBfPXK4+MnG6mzfcm5c4FCiEHNtRZc+waCKgm+vJzNtOUbgXEyP1cCAAgOPOCcI7CCqsDshRPhB+XNL4Y+kCUVnBZrNu/q3bGB1uIC8tL2t0sKx4OPcNCe8EhVQjwKRECgYEA4uothdhKRPtwDIsVsHfN74Yjr7SMVay7gIcaPrjqyGnzYnS+oJWOx50AaFNK6Rko5JAF3jF9NxE0B4yfMPAic6Y88hpEkpcJ4HMPn2Y1WdbFCu/WYgVUJICCys6VNLCcXj85umtyIY38Y9VbEMW/SV49GZBeFQqy4FoP/fvBrkECgYEAnfjTDYwgdmJdsUqyNzAocwcJXG2rVtYc7Txrl0TltcwuJmgoSywdzyOP2R9+NZsfoxWDzG0/yr15ApMvUcnnTwHN/8bGQ9SLatFLKqS4EtdwDKKS1JvNbs7V1myQGpt7jbShZOI0e6Fs4xP8ujxsLeGgiq9mZrS9UdRj5XKDoVM=
|
||||
cool.api.rsa.public.key=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0erPAWesjkp9J4htmfCyqKS9npmT9dW3KqWTfb4c7x/QBUtKuokWOO0XikHd4bGUa9kl+twSv/5A3kYz1B9eg6wRuDJoads+G5U7rVQjzdoUtLaf3lNXkuSehl4uHUPQfNa6vcmvzraXPxJjEpYzj9WZh7uJqq2oSgw42H1qdbFCXSaE5BwsOb+2vZXjzh4RO10Sy3Qb1UqGsoZoxVzrtDeEctCjrecFyQr96L2UtYa4NTxSTfu4rgObrwIOMvqqnLsXEzK/rd6kIHYjkZYQCOa48AedWp2YKQ7Ldclj+VMLnXvl42J9exVkbs++8k3P5sI9fdZX4Ey2RBjnSoAo/QIDAQAB
|
||||
wallet.api.rsa.public.key=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvU5WUX5MaZhS4MRfZ5OeqmSxTgjNi64SEwTiDYS++DRHRFTEguk1g5AbiW3l9eEdATeVk0WX+T6ZIIa2do3bQOKhlMtRwWMWQIucjGa7ySOCuicvnCD2HAQ2EThfqQdSpAW5UpcyodrhcyUkuevBA4fQQ06k9lB4FjqWtao2+aYFIPFPu8Wu28KI/9QIMLI02Q1YY3duJ67QW4EM4I2oS0t3sWJeZtIJPRHFWW1EaLJz2FdbJJq+z6D2p++9pmkHsvdnktUUO+nPL3PCLtxGYxEwr/AqTYR/1yXfkVWe3nHXc+qvRt967X1hDHC+gEPJItr7kUk3pQTGBv9kNu75DwIDAQAB
|
||||
wallet.org.id=140732221567301
|
||||
@@ -153,6 +153,7 @@ wallet.api.yzt.key=360155690205317
|
||||
cool.api.rsa.private.key=MIIEpQIBAAKCAQEA0erPAWesjkp9J4htmfCyqKS9npmT9dW3KqWTfb4c7x/QBUtKuokWOO0XikHd4bGUa9kl+twSv/5A3kYz1B9eg6wRuDJoads+G5U7rVQjzdoUtLaf3lNXkuSehl4uHUPQfNa6vcmvzraXPxJjEpYzj9WZh7uJqq2oSgw42H1qdbFCXSaE5BwsOb+2vZXjzh4RO10Sy3Qb1UqGsoZoxVzrtDeEctCjrecFyQr96L2UtYa4NTxSTfu4rgObrwIOMvqqnLsXEzK/rd6kIHYjkZYQCOa48AedWp2YKQ7Ldclj+VMLnXvl42J9exVkbs++8k3P5sI9fdZX4Ey2RBjnSoAo/QIDAQABAoIBACbBGi8I+CE77M+13wAu4RkD8xL7CQc3ic2ojGqIRPi7r5CuphD6mpzvXqtyfhd7DKr9h8bAxwBlnQ28ObjVgsI96/aM7dxvMs/uVPpqwIJyWuTDG5A05EPVC9REQnC6Mp09mnPL7rZz3Mfy6dIGY2YQWfwmWiPl1B45k+wZ+WPZPI0JVnvRzM881kf4aAhEAt08i9VoihylwVAjWIPmLuhf6ZcqI5q8iUsjfO22wZJsudVTCA/dsJdNxv+1RDKeYnSLJL79cZQcodqEhFqTy6vnn2dMsaHH7dpphU27barxUjeL482SR7kFfMqEXn5sltRn/3ep+3sf4Ph2vMtoZeECgYEA6gXzEtT9ZOeAMp4BRGmfNZ0TQLprPPVSwudz/uUBE4j/vyhfXkh9p7hqwyoxN+Z8b65yINvx8yP6hge6ek/MyAwBCZyfIRxZAPZu1eEGoYKl391ubFt2EIVqrN2DtAvzHMr5B/E2VHBq6AJm/rERFX5oKsg6zHS9tPLhgGnWVd0CgYEA5aFWOrtiqZJlp1MHQ4OeWBJatBSynkORdxCW7ic0CKbkYus0NSz1SsvskpbnfEXNB53x98qJxRhSopg/DC4m7XqxjSf9lY3HH4Y/9907olj33yGAnLWC88GivVndt577u/XhYRCk33vOQ3GoibEdjnpMOkWmOfwYG/FsRWWQvaECgYEA1N2siEisZIgel+wZAv2AD+hchtgKi1wqd5bIb+Yl4HsRBfPXK4+MnG6mzfcm5c4FCiEHNtRZc+waCKgm+vJzNtOUbgXEyP1cCAAgOPOCcI7CCqsDshRPhB+XNL4Y+kCUVnBZrNu/q3bGB1uIC8tL2t0sKx4OPcNCe8EhVQjwKRECgYEA4uothdhKRPtwDIsVsHfN74Yjr7SMVay7gIcaPrjqyGnzYnS+oJWOx50AaFNK6Rko5JAF3jF9NxE0B4yfMPAic6Y88hpEkpcJ4HMPn2Y1WdbFCu/WYgVUJICCys6VNLCcXj85umtyIY38Y9VbEMW/SV49GZBeFQqy4FoP/fvBrkECgYEAnfjTDYwgdmJdsUqyNzAocwcJXG2rVtYc7Txrl0TltcwuJmgoSywdzyOP2R9+NZsfoxWDzG0/yr15ApMvUcnnTwHN/8bGQ9SLatFLKqS4EtdwDKKS1JvNbs7V1myQGpt7jbShZOI0e6Fs4xP8ujxsLeGgiq9mZrS9UdRj5XKDoVM=
|
||||
cool.api.rsa.public.key=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0erPAWesjkp9J4htmfCyqKS9npmT9dW3KqWTfb4c7x/QBUtKuokWOO0XikHd4bGUa9kl+twSv/5A3kYz1B9eg6wRuDJoads+G5U7rVQjzdoUtLaf3lNXkuSehl4uHUPQfNa6vcmvzraXPxJjEpYzj9WZh7uJqq2oSgw42H1qdbFCXSaE5BwsOb+2vZXjzh4RO10Sy3Qb1UqGsoZoxVzrtDeEctCjrecFyQr96L2UtYa4NTxSTfu4rgObrwIOMvqqnLsXEzK/rd6kIHYjkZYQCOa48AedWp2YKQ7Ldclj+VMLnXvl42J9exVkbs++8k3P5sI9fdZX4Ey2RBjnSoAo/QIDAQAB
|
||||
wallet.api.rsa.public.key=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvU5WUX5MaZhS4MRfZ5OeqmSxTgjNi64SEwTiDYS++DRHRFTEguk1g5AbiW3l9eEdATeVk0WX+T6ZIIa2do3bQOKhlMtRwWMWQIucjGa7ySOCuicvnCD2HAQ2EThfqQdSpAW5UpcyodrhcyUkuevBA4fQQ06k9lB4FjqWtao2+aYFIPFPu8Wu28KI/9QIMLI02Q1YY3duJ67QW4EM4I2oS0t3sWJeZtIJPRHFWW1EaLJz2FdbJJq+z6D2p++9pmkHsvdnktUUO+nPL3PCLtxGYxEwr/AqTYR/1yXfkVWe3nHXc+qvRt967X1hDHC+gEPJItr7kUk3pQTGBv9kNu75DwIDAQAB
|
||||
wallet.org.id=140732221567301
|
||||
|
||||
huoMa.token.url = https://www.huoMayunping.com/api/SAASLogin/merchant
|
||||
huoMa.id.url = https://www.huomayunping.com/api/reportCenter/executeSql
|
||||
|
||||
@@ -171,3 +171,4 @@ wallet.api.yzt.key=375393764171845
|
||||
cool.api.rsa.private.key=MIIEoQIBAAKCAQEAleyT39qxm9Vi4d3f/pF4yI3EATtLlP870dFfk5Rwj1MEM4OVTUeoBrld5GwTARQYzuyZETTZPh9taFCVtLFVsQv4waTqDf/7vnfBbvrTZ2mvZv6H/M6BTQnTx5UmOIP1RsA933ce7v/hmG/DlMaHU3JVC840Ae1q7uJZ2yA6+r6aAGdTGMSH4oQ+U9omJOJbgbuti9DsBuGDDKZ1uMhrWW/l4El5y2Qdu/71wIQuI08kPegmuGl4+FLRJ2OnoGsp+BRXKpFbN0fq0YwPQhjzSHsKg64qimmzRRr5Ewd+4w1/27dJ6mopQd4zvf7+VQ4wEZgATTe/hjBw1njOOBD/WQIDAQABAoIBACSFU0ZSEzbXRbWoo0JzdF1Cb28vXwuGGy/S1XnxTHQVcG4ODSYcoPk2WYFltEFsgFiTuPvAiHUCGdgx3S39jtbIiEm/nwZXB5+Ps46RykKkM4ae1UiHk2bNUIoLMprMxkh8VvYjIeVtbqp/+0A4FkoFDWOJURDxIT3c5K+ky8k9mKz59SiOkNoiayPQTEjzZPgKSsT64286PGmE9v4BlpyxQ1bLXeZaQGAkQ7YVtU5XJgbMM86hgmFlTcHVMGeMoQvJTfcsLlRg8ucX/zzBTHR7fZP6i5OJl5CYLbzHbTyHN9KRYDYv066SvbGLNa+4NO2cY+L6NehiwAkkFxSGKkMCgYEAoVgEjOqLyL1CpeaW7ckWQSbcae0a6J61b6meCkRaKrwcWi7ut9OfmvkCae2qsMsHQlitFM8blrnhtJxMt3EhWKYHI1seZto6YR0mzEEz5IVM3OStIZN7RY4Fg6AyB0C5Gure3GgGHaSs5J8AbCpJyLjTWuOdcnThgHHe4Mw2dGsCgYEA7eF0TpAbdYn8xjqNEgeRSSXYpwtRQ1zrpH0b1KQBxx/fvoZPzWG0SYIi6eYV5bxV5EDnCKlXXFD3ztMfThPFUGt8hHAG6CKpsiVNvYDVhAzXN18JQJtRQRO/4S0f42C8os87ToL1nlM83c8hegrsGO+JnoTzKf8KkpYqTNrvrEsCf1HuYGEuuc02TqHwdrRJaQOsuEESJpf6ACiz+Y09KIyK+drR+mdfD62ixZcFGaitcQJABaSLh3cC7ZrJxCtjR4u8w+MwYj/Ykcy/APS4J6HkDyQc+84RFog7lpFAyCbmtxj0LDfAm1pyRVnTZGOJFe7X7Hw7GbkFoX2YVZXSHdUCgYEA6rCuYPxIOxSicKg/mfQhYLuYHmZKDF3WlnhgRtBweJZ31q8IeKbWild8PqukGv5O910ZEzCPYiL3+fPNROi4mPkS5k7oYYohRgMLydUb0qYghx6aMEWMStpDStOMTHaaZT5zUqhdz5Br0qKScqfn+0oIyn58sYhQVAMXRLAUGjUCgYAYiuiTme9S9gSt1pZrDbPxXlbVm6PjlkP/OKrmBj5gq8iYeKzmYKp66UKFo6ZeeRcKiXLWdQS0i0rKBPux8kmfIwbrfbuYAVGE0GmUdEMNsBQvEjxpwo3afyB5F70tdnm4EBo0qeqJxuBK8DLpBFka2yfzEo/3Z6i0X/XqIwq/7A==
|
||||
cool.api.rsa.public.key=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAleyT39qxm9Vi4d3f/pF4yI3EATtLlP870dFfk5Rwj1MEM4OVTUeoBrld5GwTARQYzuyZETTZPh9taFCVtLFVsQv4waTqDf/7vnfBbvrTZ2mvZv6H/M6BTQnTx5UmOIP1RsA933ce7v/hmG/DlMaHU3JVC840Ae1q7uJZ2yA6+r6aAGdTGMSH4oQ+U9omJOJbgbuti9DsBuGDDKZ1uMhrWW/l4El5y2Qdu/71wIQuI08kPegmuGl4+FLRJ2OnoGsp+BRXKpFbN0fq0YwPQhjzSHsKg64qimmzRRr5Ewd+4w1/27dJ6mopQd4zvf7+VQ4wEZgATTe/hjBw1njOOBD/WQIDAQAB
|
||||
wallet.api.rsa.public.key=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvU5WUX5MaZhS4MRfZ5OeqmSxTgjNi64SEwTiDYS++DRHRFTEguk1g5AbiW3l9eEdATeVk0WX+T6ZIIa2do3bQOKhlMtRwWMWQIucjGa7ySOCuicvnCD2HAQ2EThfqQdSpAW5UpcyodrhcyUkuevBA4fQQ06k9lB4FjqWtao2+aYFIPFPu8Wu28KI/9QIMLI02Q1YY3duJ67QW4EM4I2oS0t3sWJeZtIJPRHFWW1EaLJz2FdbJJq+z6D2p++9pmkHsvdnktUUO+nPL3PCLtxGYxEwr/AqTYR/1yXfkVWe3nHXc+qvRt967X1hDHC+gEPJItr7kUk3pQTGBv9kNu75DwIDAQAB
|
||||
wallet.org.id=420289242456261
|
||||
@@ -171,6 +171,7 @@ huoMa.franchise.stores.password = Huoma@123456.
|
||||
huoMa.restaurant.stores.account = 15167817007
|
||||
huoMa.restaurant.stores.password = Huoma@123456.
|
||||
|
||||
wallet.org.id=140732221567301
|
||||
wallet.url=https://api.dev.wenmatech.com:443
|
||||
wallet.api.yzt.key=360155690205317
|
||||
cool.api.rsa.private.key=MIIEpQIBAAKCAQEA0erPAWesjkp9J4htmfCyqKS9npmT9dW3KqWTfb4c7x/QBUtKuokWOO0XikHd4bGUa9kl+twSv/5A3kYz1B9eg6wRuDJoads+G5U7rVQjzdoUtLaf3lNXkuSehl4uHUPQfNa6vcmvzraXPxJjEpYzj9WZh7uJqq2oSgw42H1qdbFCXSaE5BwsOb+2vZXjzh4RO10Sy3Qb1UqGsoZoxVzrtDeEctCjrecFyQr96L2UtYa4NTxSTfu4rgObrwIOMvqqnLsXEzK/rd6kIHYjkZYQCOa48AedWp2YKQ7Ldclj+VMLnXvl42J9exVkbs++8k3P5sI9fdZX4Ey2RBjnSoAo/QIDAQABAoIBACbBGi8I+CE77M+13wAu4RkD8xL7CQc3ic2ojGqIRPi7r5CuphD6mpzvXqtyfhd7DKr9h8bAxwBlnQ28ObjVgsI96/aM7dxvMs/uVPpqwIJyWuTDG5A05EPVC9REQnC6Mp09mnPL7rZz3Mfy6dIGY2YQWfwmWiPl1B45k+wZ+WPZPI0JVnvRzM881kf4aAhEAt08i9VoihylwVAjWIPmLuhf6ZcqI5q8iUsjfO22wZJsudVTCA/dsJdNxv+1RDKeYnSLJL79cZQcodqEhFqTy6vnn2dMsaHH7dpphU27barxUjeL482SR7kFfMqEXn5sltRn/3ep+3sf4Ph2vMtoZeECgYEA6gXzEtT9ZOeAMp4BRGmfNZ0TQLprPPVSwudz/uUBE4j/vyhfXkh9p7hqwyoxN+Z8b65yINvx8yP6hge6ek/MyAwBCZyfIRxZAPZu1eEGoYKl391ubFt2EIVqrN2DtAvzHMr5B/E2VHBq6AJm/rERFX5oKsg6zHS9tPLhgGnWVd0CgYEA5aFWOrtiqZJlp1MHQ4OeWBJatBSynkORdxCW7ic0CKbkYus0NSz1SsvskpbnfEXNB53x98qJxRhSopg/DC4m7XqxjSf9lY3HH4Y/9907olj33yGAnLWC88GivVndt577u/XhYRCk33vOQ3GoibEdjnpMOkWmOfwYG/FsRWWQvaECgYEA1N2siEisZIgel+wZAv2AD+hchtgKi1wqd5bIb+Yl4HsRBfPXK4+MnG6mzfcm5c4FCiEHNtRZc+waCKgm+vJzNtOUbgXEyP1cCAAgOPOCcI7CCqsDshRPhB+XNL4Y+kCUVnBZrNu/q3bGB1uIC8tL2t0sKx4OPcNCe8EhVQjwKRECgYEA4uothdhKRPtwDIsVsHfN74Yjr7SMVay7gIcaPrjqyGnzYnS+oJWOx50AaFNK6Rko5JAF3jF9NxE0B4yfMPAic6Y88hpEkpcJ4HMPn2Y1WdbFCu/WYgVUJICCys6VNLCcXj85umtyIY38Y9VbEMW/SV49GZBeFQqy4FoP/fvBrkECgYEAnfjTDYwgdmJdsUqyNzAocwcJXG2rVtYc7Txrl0TltcwuJmgoSywdzyOP2R9+NZsfoxWDzG0/yr15ApMvUcnnTwHN/8bGQ9SLatFLKqS4EtdwDKKS1JvNbs7V1myQGpt7jbShZOI0e6Fs4xP8ujxsLeGgiq9mZrS9UdRj5XKDoVM=
|
||||
|
||||
Reference in New Issue
Block a user