分销修改

This commit is contained in:
张松
2025-10-28 14:22:05 +08:00
parent 5b518f674b
commit ff32ec71c1
4 changed files with 28 additions and 9 deletions

View File

@@ -325,9 +325,9 @@ public abstract class BaseWx {
return jsonObject.getString("refund_id");
}
String genCode(int shopId, int id, String path) {
public String genCode(String path, String scene) {
Map<String, Object> params = Map.of(
"scene", "id=" + id + "&shopId=" + shopId,
"scene", scene,
"page", path,
"width", 430
);

View File

@@ -1,9 +1,11 @@
package com.czg.service.market.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import com.czg.account.entity.ShopUser;
import com.czg.account.entity.UserInfo;
import com.czg.account.service.ShopUserService;
import com.czg.constant.TableValueConstant;
import com.czg.utils.MyQueryWrapper;
import com.czg.utils.PageUtil;
import com.mybatisflex.core.paginate.Page;
@@ -16,6 +18,7 @@ import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.Map;
/**
* 提现记录表 服务层实现。
@@ -34,7 +37,7 @@ public class MkDistributionWithdrawFlowServiceImpl extends ServiceImpl<MkDistrib
}
@Override
public Page<MkDistributionWithdrawFlow> withdrawPageInfo(Long userId, LocalDateTime startTime, LocalDateTime endTime, String key) {
public Map<String, Object> withdrawPageInfo(Long userId, LocalDateTime startTime, LocalDateTime endTime, String key) {
QueryWrapper queryWrapper = new MyQueryWrapper()
.selectAll(MkDistributionWithdrawFlow.class)
.leftJoin(UserInfo.class).on(UserInfo::getId, MkDistributionWithdrawFlow::getUserId)
@@ -57,6 +60,10 @@ public class MkDistributionWithdrawFlowServiceImpl extends ServiceImpl<MkDistrib
});
});
}
return page(PageUtil.buildPage(), queryWrapper);
Page<MkDistributionWithdrawFlow> page = page(PageUtil.buildPage(), queryWrapper);
Map<String, Object> map = BeanUtil.beanToMap(page);
map.put("pending", getOne(new QueryWrapper().eq(MkDistributionWithdrawFlow::getStatus, TableValueConstant.DistributionWithdrawFlow.Status.PENDING.getCode()).select("sum(amount)")));
map.put("finish", getOne(new QueryWrapper().eq(MkDistributionWithdrawFlow::getStatus, TableValueConstant.DistributionWithdrawFlow.Status.FINISH.getCode()).select("sum(amount)")));
return map;
}
}