分销修改

This commit is contained in:
张松
2025-10-28 14:43:55 +08:00
parent ff32ec71c1
commit 0ef7e2643e
5 changed files with 99 additions and 80 deletions

View File

@@ -6,6 +6,7 @@ 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.market.vo.MkDistributionWithdrawFlowVO;
import com.czg.utils.MyQueryWrapper;
import com.czg.utils.PageUtil;
import com.mybatisflex.core.paginate.Page;
@@ -48,19 +49,19 @@ public class MkDistributionWithdrawFlowServiceImpl extends ServiceImpl<MkDistrib
if (StrUtil.isNotBlank(key)){
queryWrapper.and(and -> {
and.or(or -> {
or.like(ShopUser::getId, key);
or.like(UserInfo::getId, key);
});
and.or(or -> {
or.like(ShopUser::getNickName, key);
or.like(UserInfo::getNickName, key);
});
and.or(or -> {
or.like(ShopUser::getPhone, key);
or.like(UserInfo::getPhone, key);
});
});
}
Page<MkDistributionWithdrawFlow> page = page(PageUtil.buildPage(), queryWrapper);
Page<MkDistributionWithdrawFlowVO> page = pageAs(PageUtil.buildPage(), queryWrapper, MkDistributionWithdrawFlowVO.class);
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)")));