佣金账户
This commit is contained in:
78
doc/sql/pending/user_commission.sql
Normal file
78
doc/sql/pending/user_commission.sql
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
DROP TABLE IF EXISTS user_commission;
|
||||||
|
create table user_commission
|
||||||
|
(
|
||||||
|
id int8 not null primary key,
|
||||||
|
amount decimal(14, 2) default 0,
|
||||||
|
version int4 default 1,
|
||||||
|
create_user int8,
|
||||||
|
create_dept int8,
|
||||||
|
create_time timestamp(6),
|
||||||
|
update_user int8,
|
||||||
|
update_time timestamp(6),
|
||||||
|
status int4 default 1,
|
||||||
|
is_deleted int4 default 0
|
||||||
|
);
|
||||||
|
alter table user_commission
|
||||||
|
owner to yicha1lu;
|
||||||
|
|
||||||
|
comment on table user_commission is '用户佣金表';
|
||||||
|
comment on column user_commission.id is '主键';
|
||||||
|
comment on column user_commission.amount is '佣金金额';
|
||||||
|
comment on column user_commission.version is '版本号';
|
||||||
|
comment on column user_commission.create_user is '创建人';
|
||||||
|
comment on column user_commission.create_dept is '创建部门';
|
||||||
|
comment on column user_commission.create_time is '创建时间';
|
||||||
|
comment on column user_commission.update_user is '修改人';
|
||||||
|
comment on column user_commission.update_time is '修改时间';
|
||||||
|
comment on column user_commission.status is '状态';
|
||||||
|
comment on column user_commission.is_deleted is '是否已删除';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS user_commission_log;
|
||||||
|
create table user_commission_log
|
||||||
|
(
|
||||||
|
id int8 not null primary key,
|
||||||
|
user_id int8,
|
||||||
|
amount decimal(14, 2) default 0,
|
||||||
|
last_amount decimal(14, 2) default 0, -- 上一笔金额
|
||||||
|
source_type varchar(256), -- 业务类型
|
||||||
|
source_id int8,
|
||||||
|
source_detail text,
|
||||||
|
type int4 default 1,
|
||||||
|
is_complete int4 default 0, -- 0-未完成 1-已完成
|
||||||
|
statistical_date timestamp(6),
|
||||||
|
remark text,
|
||||||
|
create_user int8,
|
||||||
|
create_dept int8,
|
||||||
|
create_time timestamp(6),
|
||||||
|
update_user int8,
|
||||||
|
update_time timestamp(6),
|
||||||
|
status int4 default 1,
|
||||||
|
is_deleted int4 default 0
|
||||||
|
);
|
||||||
|
comment on table user_commission_log is '用户佣金流水表';
|
||||||
|
comment on column user_commission_log.id is '主键';
|
||||||
|
comment on column user_commission_log.user_id is '用户id';
|
||||||
|
comment on column user_commission_log.amount is '金额';
|
||||||
|
comment on column user_commission_log.last_amount is '上一笔金额';
|
||||||
|
comment on column user_commission_log.source_type is '业务类型';
|
||||||
|
comment on column user_commission_log.source_id is '来源id';
|
||||||
|
comment on column user_commission_log.source_detail is '来源详情';
|
||||||
|
comment on column user_commission_log.type is '消费类型 1-收入 2-支出';
|
||||||
|
comment on column user_commission_log.statistical_date is '统计时间';
|
||||||
|
comment on column user_commission_log.is_complete is '是否完成 0-未完成 1-已完成';
|
||||||
|
comment on column user_commission_log.remark is '备注';
|
||||||
|
comment on column user_commission_log.create_user is '创建人';
|
||||||
|
comment on column user_commission_log.create_dept is '创建部门';
|
||||||
|
comment on column user_commission_log.create_time is '创建时间';
|
||||||
|
comment on column user_commission_log.update_user is '修改人';
|
||||||
|
comment on column user_commission_log.update_time is '修改时间';
|
||||||
|
comment on column user_commission_log.status is '状态';
|
||||||
|
comment on column user_commission_log.is_deleted is '是否已删除';
|
||||||
|
|
||||||
|
create index idx_ucl_uid
|
||||||
|
on user_commission_log (is_complete, user_id, type, statistical_date, create_time DESC);
|
||||||
|
|
||||||
|
alter table user_commission_log
|
||||||
|
owner to yicha1lu;
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
package org.springblade.modules.market.controller;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
|
||||||
|
import org.springblade.core.mp.support.Condition;
|
||||||
|
import org.springblade.core.mp.support.Query;
|
||||||
|
import org.springblade.core.tool.api.R;
|
||||||
|
import org.springblade.core.tool.utils.Func;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.springblade.modules.market.pojo.entity.MarketUserCommissionEntity;
|
||||||
|
import org.springblade.modules.market.pojo.vo.MarketUserCommissionVO;
|
||||||
|
import org.springblade.modules.market.wrapper.MarketUserCommissionWrapper;
|
||||||
|
import org.springblade.modules.market.service.IMarketUserCommissionService;
|
||||||
|
import org.springblade.core.boot.ctrl.BladeController;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金表 控制器
|
||||||
|
*
|
||||||
|
* @author BladeX
|
||||||
|
* @since 2026-02-14
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@AllArgsConstructor
|
||||||
|
@RequestMapping("/market/benefit-commission")
|
||||||
|
@Tag(name = "用户佣金表", description = "用户佣金表接口")
|
||||||
|
public class MarketUserCommissionController extends BladeController {
|
||||||
|
|
||||||
|
private final IMarketUserCommissionService userCommissionService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金表 详情
|
||||||
|
*/
|
||||||
|
@GetMapping("/detail")
|
||||||
|
@ApiOperationSupport(order = 1)
|
||||||
|
@Operation(summary = "详情", description = "传入userCommission")
|
||||||
|
public R<MarketUserCommissionVO> detail(MarketUserCommissionEntity userCommission) {
|
||||||
|
MarketUserCommissionEntity detail = userCommissionService.getOne(Condition.getQueryWrapper(userCommission));
|
||||||
|
return R.data(MarketUserCommissionWrapper.build().entityVO(detail));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 用户佣金表 分页
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
@ApiOperationSupport(order = 2)
|
||||||
|
@Operation(summary = "分页", description = "传入userCommission")
|
||||||
|
public R<IPage<MarketUserCommissionVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> userCommission, Query query) {
|
||||||
|
IPage<MarketUserCommissionEntity> pages = userCommissionService.page(Condition.getPage(query), Condition.getQueryWrapper(userCommission, MarketUserCommissionEntity.class));
|
||||||
|
return R.data(MarketUserCommissionWrapper.build().pageVO(pages));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金表 自定义分页
|
||||||
|
*/
|
||||||
|
@GetMapping("/page")
|
||||||
|
@ApiOperationSupport(order = 3)
|
||||||
|
@Operation(summary = "分页", description = "传入userCommission")
|
||||||
|
public R<IPage<MarketUserCommissionVO>> page(MarketUserCommissionVO userCommission, Query query) {
|
||||||
|
IPage<MarketUserCommissionVO> pages = userCommissionService.selectUserCommissionPage(Condition.getPage(query), userCommission);
|
||||||
|
return R.data(pages);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金表 新增
|
||||||
|
*/
|
||||||
|
@PostMapping("/save")
|
||||||
|
@ApiOperationSupport(order = 4)
|
||||||
|
@Operation(summary = "新增", description = "传入userCommission")
|
||||||
|
public R save(@Valid @RequestBody MarketUserCommissionEntity userCommission) {
|
||||||
|
return R.status(userCommissionService.save(userCommission));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金表 修改
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
@ApiOperationSupport(order = 5)
|
||||||
|
@Operation(summary = "修改", description = "传入userCommission")
|
||||||
|
public R update(@Valid @RequestBody MarketUserCommissionEntity userCommission) {
|
||||||
|
return R.status(userCommissionService.updateById(userCommission));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金表 新增或修改
|
||||||
|
*/
|
||||||
|
@PostMapping("/submit")
|
||||||
|
@ApiOperationSupport(order = 6)
|
||||||
|
@Operation(summary = "新增或修改", description = "传入userCommission")
|
||||||
|
public R submit(@Valid @RequestBody MarketUserCommissionEntity userCommission) {
|
||||||
|
return R.status(userCommissionService.saveOrUpdate(userCommission));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金表 删除
|
||||||
|
*/
|
||||||
|
@PostMapping("/remove")
|
||||||
|
@ApiOperationSupport(order = 7)
|
||||||
|
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||||
|
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||||
|
return R.status(userCommissionService.deleteLogic(Func.toLongList(ids)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
package org.springblade.modules.market.controller;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
|
import org.springblade.core.mp.support.Condition;
|
||||||
|
import org.springblade.core.mp.support.Query;
|
||||||
|
import org.springblade.core.tool.api.R;
|
||||||
|
import org.springblade.core.tool.utils.Func;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.springblade.modules.market.pojo.entity.MarketUserCommissionLogEntity;
|
||||||
|
import org.springblade.modules.market.pojo.vo.MarketUserCommissionLogVO;
|
||||||
|
import org.springblade.modules.market.wrapper.MarketUserCommissionLogWrapper;
|
||||||
|
import org.springblade.modules.market.service.IMarketUserCommissionLogService;
|
||||||
|
import org.springblade.core.boot.ctrl.BladeController;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金流水表 控制器
|
||||||
|
*
|
||||||
|
* @author BladeX
|
||||||
|
* @since 2026-02-14
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@AllArgsConstructor
|
||||||
|
@RequestMapping("/market/benefit-commission-log")
|
||||||
|
@Tag(name = "用户佣金流水表", description = "用户佣金流水表接口")
|
||||||
|
public class MarketUserCommissionLogController extends BladeController {
|
||||||
|
|
||||||
|
private final IMarketUserCommissionLogService userCommissionLogService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金流水表 详情
|
||||||
|
*/
|
||||||
|
@GetMapping("/detail")
|
||||||
|
@ApiOperationSupport(order = 1)
|
||||||
|
@Operation(summary = "详情", description = "传入userCommissionLog")
|
||||||
|
public R<MarketUserCommissionLogVO> detail(MarketUserCommissionLogEntity userCommissionLog) {
|
||||||
|
MarketUserCommissionLogEntity detail = userCommissionLogService.getOne(Condition.getQueryWrapper(userCommissionLog));
|
||||||
|
return R.data(MarketUserCommissionLogWrapper.build().entityVO(detail));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 用户佣金流水表 分页
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
@ApiOperationSupport(order = 2)
|
||||||
|
@Operation(summary = "分页", description = "传入userCommissionLog")
|
||||||
|
public R<IPage<MarketUserCommissionLogVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> userCommissionLog, Query query) {
|
||||||
|
IPage<MarketUserCommissionLogEntity> pages = userCommissionLogService.page(Condition.getPage(query), Condition.getQueryWrapper(userCommissionLog, MarketUserCommissionLogEntity.class));
|
||||||
|
return R.data(MarketUserCommissionLogWrapper.build().pageVO(pages));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金流水表 自定义分页
|
||||||
|
*/
|
||||||
|
@GetMapping("/page")
|
||||||
|
@ApiOperationSupport(order = 3)
|
||||||
|
@Operation(summary = "分页", description = "传入userCommissionLog")
|
||||||
|
public R<IPage<MarketUserCommissionLogVO>> page(MarketUserCommissionLogVO userCommissionLog, Query query) {
|
||||||
|
IPage<MarketUserCommissionLogVO> pages = userCommissionLogService.selectUserCommissionLogPage(Condition.getPage(query), userCommissionLog);
|
||||||
|
return R.data(pages);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金流水表 新增
|
||||||
|
*/
|
||||||
|
@PostMapping("/save")
|
||||||
|
@ApiOperationSupport(order = 4)
|
||||||
|
@Operation(summary = "新增", description = "传入userCommissionLog")
|
||||||
|
public R save(@Valid @RequestBody MarketUserCommissionLogEntity userCommissionLog) {
|
||||||
|
return R.status(userCommissionLogService.save(userCommissionLog));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金流水表 修改
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
@ApiOperationSupport(order = 5)
|
||||||
|
@Operation(summary = "修改", description = "传入userCommissionLog")
|
||||||
|
public R update(@Valid @RequestBody MarketUserCommissionLogEntity userCommissionLog) {
|
||||||
|
return R.status(userCommissionLogService.updateById(userCommissionLog));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金流水表 新增或修改
|
||||||
|
*/
|
||||||
|
@PostMapping("/submit")
|
||||||
|
@ApiOperationSupport(order = 6)
|
||||||
|
@Operation(summary = "新增或修改", description = "传入userCommissionLog")
|
||||||
|
public R submit(@Valid @RequestBody MarketUserCommissionLogEntity userCommissionLog) {
|
||||||
|
return R.status(userCommissionLogService.saveOrUpdate(userCommissionLog));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金流水表 删除
|
||||||
|
*/
|
||||||
|
@PostMapping("/remove")
|
||||||
|
@ApiOperationSupport(order = 7)
|
||||||
|
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||||
|
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||||
|
return R.status(userCommissionLogService.deleteLogic(Func.toLongList(ids)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
/**
|
||||||
|
* BladeX Commercial License Agreement
|
||||||
|
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||||
|
* <p>
|
||||||
|
* Use of this software is governed by the Commercial License Agreement
|
||||||
|
* obtained after purchasing a license from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 1. This software is for development use only under a valid license
|
||||||
|
* from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 2. Redistribution of this software's source code to any third party
|
||||||
|
* without a commercial license is strictly prohibited.
|
||||||
|
* <p>
|
||||||
|
* 3. Licensees may copyright their own code but cannot use segments
|
||||||
|
* from this software for such purposes. Copyright of this software
|
||||||
|
* remains with BladeX.
|
||||||
|
* <p>
|
||||||
|
* Using this software signifies agreement to this License, and the software
|
||||||
|
* must not be used for illegal purposes.
|
||||||
|
* <p>
|
||||||
|
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||||
|
* not liable for any claims arising from secondary or illegal development.
|
||||||
|
* <p>
|
||||||
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
|
*/
|
||||||
|
package org.springblade.modules.market.mapper;
|
||||||
|
|
||||||
|
import org.springblade.modules.market.pojo.entity.MarketUserCommissionLogEntity;
|
||||||
|
import org.springblade.modules.market.pojo.vo.MarketUserCommissionLogVO;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金流水表 Mapper 接口
|
||||||
|
*
|
||||||
|
* @author BladeX
|
||||||
|
* @since 2026-02-14
|
||||||
|
*/
|
||||||
|
public interface MarketUserCommissionLogMapper extends BaseMapper<MarketUserCommissionLogEntity> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义分页
|
||||||
|
*
|
||||||
|
* @param page 分页参数
|
||||||
|
* @param userCommissionLog 查询参数
|
||||||
|
* @return List<UserCommissionLogVO>
|
||||||
|
*/
|
||||||
|
List<MarketUserCommissionLogVO> selectUserCommissionLogPage(IPage page, MarketUserCommissionLogVO userCommissionLog);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
<?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="org.springblade.modules.market.mapper.MarketUserCommissionLogMapper">
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="userCommissionLogResultMap" type="org.springblade.modules.market.pojo.entity.MarketUserCommissionLogEntity">
|
||||||
|
<result column="id" property="id"/>
|
||||||
|
<result column="user_id" property="userId"/>
|
||||||
|
<result column="amount" property="amount"/>
|
||||||
|
<result column="last_amount" property="lastAmount"/>
|
||||||
|
<result column="source_type" property="sourceType"/>
|
||||||
|
<result column="source_id" property="sourceId"/>
|
||||||
|
<result column="source_detail" property="sourceDetail"/>
|
||||||
|
<result column="type" property="type"/>
|
||||||
|
<result column="is_complete" property="isComplete"/>
|
||||||
|
<result column="statistical_date" property="statisticalDate"/>
|
||||||
|
<result column="remark" property="remark"/>
|
||||||
|
<result column="create_user" property="createUser"/>
|
||||||
|
<result column="create_dept" property="createDept"/>
|
||||||
|
<result column="create_time" property="createTime"/>
|
||||||
|
<result column="update_user" property="updateUser"/>
|
||||||
|
<result column="update_time" property="updateTime"/>
|
||||||
|
<result column="status" property="status"/>
|
||||||
|
<result column="is_deleted" property="isDeleted"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectUserCommissionLogPage" resultMap="userCommissionLogResultMap">
|
||||||
|
select * from user_commission_log where is_deleted = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
/**
|
||||||
|
* BladeX Commercial License Agreement
|
||||||
|
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||||
|
* <p>
|
||||||
|
* Use of this software is governed by the Commercial License Agreement
|
||||||
|
* obtained after purchasing a license from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 1. This software is for development use only under a valid license
|
||||||
|
* from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 2. Redistribution of this software's source code to any third party
|
||||||
|
* without a commercial license is strictly prohibited.
|
||||||
|
* <p>
|
||||||
|
* 3. Licensees may copyright their own code but cannot use segments
|
||||||
|
* from this software for such purposes. Copyright of this software
|
||||||
|
* remains with BladeX.
|
||||||
|
* <p>
|
||||||
|
* Using this software signifies agreement to this License, and the software
|
||||||
|
* must not be used for illegal purposes.
|
||||||
|
* <p>
|
||||||
|
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||||
|
* not liable for any claims arising from secondary or illegal development.
|
||||||
|
* <p>
|
||||||
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
|
*/
|
||||||
|
package org.springblade.modules.market.mapper;
|
||||||
|
|
||||||
|
import org.springblade.modules.market.pojo.entity.MarketUserCommissionEntity;
|
||||||
|
import org.springblade.modules.market.pojo.vo.MarketUserCommissionVO;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金表 Mapper 接口
|
||||||
|
*
|
||||||
|
* @author BladeX
|
||||||
|
* @since 2026-02-14
|
||||||
|
*/
|
||||||
|
public interface MarketUserCommissionMapper extends BaseMapper<MarketUserCommissionEntity> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义分页
|
||||||
|
*
|
||||||
|
* @param page 分页参数
|
||||||
|
* @param userCommission 查询参数
|
||||||
|
* @return List<UserCommissionVO>
|
||||||
|
*/
|
||||||
|
List<MarketUserCommissionVO> selectUserCommissionPage(IPage page, MarketUserCommissionVO userCommission);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<?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="org.springblade.modules.market.mapper.MarketUserCommissionMapper">
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="userCommissionResultMap" type="org.springblade.modules.market.pojo.entity.MarketUserCommissionEntity">
|
||||||
|
<result column="id" property="id"/>
|
||||||
|
<result column="amount" property="amount"/>
|
||||||
|
<result column="version" property="version"/>
|
||||||
|
<result column="create_user" property="createUser"/>
|
||||||
|
<result column="create_dept" property="createDept"/>
|
||||||
|
<result column="create_time" property="createTime"/>
|
||||||
|
<result column="update_user" property="updateUser"/>
|
||||||
|
<result column="update_time" property="updateTime"/>
|
||||||
|
<result column="status" property="status"/>
|
||||||
|
<result column="is_deleted" property="isDeleted"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectUserCommissionPage" resultMap="userCommissionResultMap">
|
||||||
|
select * from user_commission where is_deleted = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/**
|
||||||
|
* BladeX Commercial License Agreement
|
||||||
|
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||||
|
* <p>
|
||||||
|
* Use of this software is governed by the Commercial License Agreement
|
||||||
|
* obtained after purchasing a license from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 1. This software is for development use only under a valid license
|
||||||
|
* from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 2. Redistribution of this software's source code to any third party
|
||||||
|
* without a commercial license is strictly prohibited.
|
||||||
|
* <p>
|
||||||
|
* 3. Licensees may copyright their own code but cannot use segments
|
||||||
|
* from this software for such purposes. Copyright of this software
|
||||||
|
* remains with BladeX.
|
||||||
|
* <p>
|
||||||
|
* Using this software signifies agreement to this License, and the software
|
||||||
|
* must not be used for illegal purposes.
|
||||||
|
* <p>
|
||||||
|
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||||
|
* not liable for any claims arising from secondary or illegal development.
|
||||||
|
* <p>
|
||||||
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
|
*/
|
||||||
|
package org.springblade.modules.market.pojo.dto;
|
||||||
|
|
||||||
|
import org.springblade.modules.market.pojo.entity.MarketUserCommissionEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金表 数据传输对象实体类
|
||||||
|
*
|
||||||
|
* @author BladeX
|
||||||
|
* @since 2026-02-14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class MarketUserCommissionDTO extends MarketUserCommissionEntity {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/**
|
||||||
|
* BladeX Commercial License Agreement
|
||||||
|
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||||
|
* <p>
|
||||||
|
* Use of this software is governed by the Commercial License Agreement
|
||||||
|
* obtained after purchasing a license from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 1. This software is for development use only under a valid license
|
||||||
|
* from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 2. Redistribution of this software's source code to any third party
|
||||||
|
* without a commercial license is strictly prohibited.
|
||||||
|
* <p>
|
||||||
|
* 3. Licensees may copyright their own code but cannot use segments
|
||||||
|
* from this software for such purposes. Copyright of this software
|
||||||
|
* remains with BladeX.
|
||||||
|
* <p>
|
||||||
|
* Using this software signifies agreement to this License, and the software
|
||||||
|
* must not be used for illegal purposes.
|
||||||
|
* <p>
|
||||||
|
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||||
|
* not liable for any claims arising from secondary or illegal development.
|
||||||
|
* <p>
|
||||||
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
|
*/
|
||||||
|
package org.springblade.modules.market.pojo.dto;
|
||||||
|
|
||||||
|
import org.springblade.modules.market.pojo.entity.MarketUserCommissionLogEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金流水表 数据传输对象实体类
|
||||||
|
*
|
||||||
|
* @author BladeX
|
||||||
|
* @since 2026-02-14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class MarketUserCommissionLogDTO extends MarketUserCommissionLogEntity {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
/**
|
||||||
|
* BladeX Commercial License Agreement
|
||||||
|
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||||
|
* <p>
|
||||||
|
* Use of this software is governed by the Commercial License Agreement
|
||||||
|
* obtained after purchasing a license from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 1. This software is for development use only under a valid license
|
||||||
|
* from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 2. Redistribution of this software's source code to any third party
|
||||||
|
* without a commercial license is strictly prohibited.
|
||||||
|
* <p>
|
||||||
|
* 3. Licensees may copyright their own code but cannot use segments
|
||||||
|
* from this software for such purposes. Copyright of this software
|
||||||
|
* remains with BladeX.
|
||||||
|
* <p>
|
||||||
|
* Using this software signifies agreement to this License, and the software
|
||||||
|
* must not be used for illegal purposes.
|
||||||
|
* <p>
|
||||||
|
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||||
|
* not liable for any claims arising from secondary or illegal development.
|
||||||
|
* <p>
|
||||||
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
|
*/
|
||||||
|
package org.springblade.modules.market.pojo.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.springblade.core.tenant.mp.TenantEntity;
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金表 实体类
|
||||||
|
*
|
||||||
|
* @author BladeX
|
||||||
|
* @since 2026-02-14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("user_commission")
|
||||||
|
@Schema(description = "UserCommission对象")
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class MarketUserCommissionEntity extends TenantEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 佣金金额
|
||||||
|
*/
|
||||||
|
@Schema(description = "佣金金额")
|
||||||
|
private BigDecimal amount;
|
||||||
|
/**
|
||||||
|
* 版本号
|
||||||
|
*/
|
||||||
|
@Schema(description = "版本号")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
/**
|
||||||
|
* BladeX Commercial License Agreement
|
||||||
|
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||||
|
* <p>
|
||||||
|
* Use of this software is governed by the Commercial License Agreement
|
||||||
|
* obtained after purchasing a license from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 1. This software is for development use only under a valid license
|
||||||
|
* from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 2. Redistribution of this software's source code to any third party
|
||||||
|
* without a commercial license is strictly prohibited.
|
||||||
|
* <p>
|
||||||
|
* 3. Licensees may copyright their own code but cannot use segments
|
||||||
|
* from this software for such purposes. Copyright of this software
|
||||||
|
* remains with BladeX.
|
||||||
|
* <p>
|
||||||
|
* Using this software signifies agreement to this License, and the software
|
||||||
|
* must not be used for illegal purposes.
|
||||||
|
* <p>
|
||||||
|
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||||
|
* not liable for any claims arising from secondary or illegal development.
|
||||||
|
* <p>
|
||||||
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
|
*/
|
||||||
|
package org.springblade.modules.market.pojo.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.springblade.core.tenant.mp.TenantEntity;
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金流水表 实体类
|
||||||
|
*
|
||||||
|
* @author BladeX
|
||||||
|
* @since 2026-02-14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("user_commission_log")
|
||||||
|
@Schema(description = "UserCommissionLog对象")
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class MarketUserCommissionLogEntity extends TenantEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户id")
|
||||||
|
private Long userId;
|
||||||
|
/**
|
||||||
|
* 金额
|
||||||
|
*/
|
||||||
|
@Schema(description = "金额")
|
||||||
|
private BigDecimal amount;
|
||||||
|
/**
|
||||||
|
* 上一笔金额
|
||||||
|
*/
|
||||||
|
@Schema(description = "上一笔金额")
|
||||||
|
private BigDecimal lastAmount;
|
||||||
|
/**
|
||||||
|
* 业务类型
|
||||||
|
*/
|
||||||
|
@Schema(description = "业务类型")
|
||||||
|
private String sourceType;
|
||||||
|
/**
|
||||||
|
* 来源id
|
||||||
|
*/
|
||||||
|
@Schema(description = "来源id")
|
||||||
|
private Long sourceId;
|
||||||
|
/**
|
||||||
|
* 来源详情
|
||||||
|
*/
|
||||||
|
@Schema(description = "来源详情")
|
||||||
|
private String sourceDetail;
|
||||||
|
/**
|
||||||
|
* 消费类型 1-收入 2-支出
|
||||||
|
*/
|
||||||
|
@Schema(description = "消费类型 1-收入 2-支出")
|
||||||
|
private Integer type;
|
||||||
|
/**
|
||||||
|
* 是否完成 0-未完成 1-已完成
|
||||||
|
*/
|
||||||
|
@Schema(description = "是否完成 0-未完成 1-已完成")
|
||||||
|
private Integer isComplete;
|
||||||
|
/**
|
||||||
|
* 统计时间
|
||||||
|
*/
|
||||||
|
@Schema(description = "统计时间")
|
||||||
|
private Date statisticalDate;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/**
|
||||||
|
* BladeX Commercial License Agreement
|
||||||
|
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||||
|
* <p>
|
||||||
|
* Use of this software is governed by the Commercial License Agreement
|
||||||
|
* obtained after purchasing a license from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 1. This software is for development use only under a valid license
|
||||||
|
* from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 2. Redistribution of this software's source code to any third party
|
||||||
|
* without a commercial license is strictly prohibited.
|
||||||
|
* <p>
|
||||||
|
* 3. Licensees may copyright their own code but cannot use segments
|
||||||
|
* from this software for such purposes. Copyright of this software
|
||||||
|
* remains with BladeX.
|
||||||
|
* <p>
|
||||||
|
* Using this software signifies agreement to this License, and the software
|
||||||
|
* must not be used for illegal purposes.
|
||||||
|
* <p>
|
||||||
|
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||||
|
* not liable for any claims arising from secondary or illegal development.
|
||||||
|
* <p>
|
||||||
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
|
*/
|
||||||
|
package org.springblade.modules.market.pojo.vo;
|
||||||
|
|
||||||
|
import org.springblade.modules.market.pojo.entity.MarketUserCommissionLogEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金流水表 视图实体类
|
||||||
|
*
|
||||||
|
* @author BladeX
|
||||||
|
* @since 2026-02-14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class MarketUserCommissionLogVO extends MarketUserCommissionLogEntity {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/**
|
||||||
|
* BladeX Commercial License Agreement
|
||||||
|
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||||
|
* <p>
|
||||||
|
* Use of this software is governed by the Commercial License Agreement
|
||||||
|
* obtained after purchasing a license from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 1. This software is for development use only under a valid license
|
||||||
|
* from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 2. Redistribution of this software's source code to any third party
|
||||||
|
* without a commercial license is strictly prohibited.
|
||||||
|
* <p>
|
||||||
|
* 3. Licensees may copyright their own code but cannot use segments
|
||||||
|
* from this software for such purposes. Copyright of this software
|
||||||
|
* remains with BladeX.
|
||||||
|
* <p>
|
||||||
|
* Using this software signifies agreement to this License, and the software
|
||||||
|
* must not be used for illegal purposes.
|
||||||
|
* <p>
|
||||||
|
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||||
|
* not liable for any claims arising from secondary or illegal development.
|
||||||
|
* <p>
|
||||||
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
|
*/
|
||||||
|
package org.springblade.modules.market.pojo.vo;
|
||||||
|
|
||||||
|
import org.springblade.modules.market.pojo.entity.MarketUserCommissionEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金表 视图实体类
|
||||||
|
*
|
||||||
|
* @author BladeX
|
||||||
|
* @since 2026-02-14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class MarketUserCommissionVO extends MarketUserCommissionEntity {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
/**
|
||||||
|
* BladeX Commercial License Agreement
|
||||||
|
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||||
|
* <p>
|
||||||
|
* Use of this software is governed by the Commercial License Agreement
|
||||||
|
* obtained after purchasing a license from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 1. This software is for development use only under a valid license
|
||||||
|
* from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 2. Redistribution of this software's source code to any third party
|
||||||
|
* without a commercial license is strictly prohibited.
|
||||||
|
* <p>
|
||||||
|
* 3. Licensees may copyright their own code but cannot use segments
|
||||||
|
* from this software for such purposes. Copyright of this software
|
||||||
|
* remains with BladeX.
|
||||||
|
* <p>
|
||||||
|
* Using this software signifies agreement to this License, and the software
|
||||||
|
* must not be used for illegal purposes.
|
||||||
|
* <p>
|
||||||
|
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||||
|
* not liable for any claims arising from secondary or illegal development.
|
||||||
|
* <p>
|
||||||
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
|
*/
|
||||||
|
package org.springblade.modules.market.service;
|
||||||
|
|
||||||
|
import org.springblade.modules.market.pojo.entity.MarketUserCommissionLogEntity;
|
||||||
|
import org.springblade.modules.market.pojo.vo.MarketUserCommissionLogVO;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.springblade.core.mp.base.BaseService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金流水表 服务类
|
||||||
|
*
|
||||||
|
* @author BladeX
|
||||||
|
* @since 2026-02-14
|
||||||
|
*/
|
||||||
|
public interface IMarketUserCommissionLogService extends BaseService<MarketUserCommissionLogEntity> {
|
||||||
|
/**
|
||||||
|
* 自定义分页
|
||||||
|
*
|
||||||
|
* @param page 分页参数
|
||||||
|
* @param userCommissionLog 查询参数
|
||||||
|
* @return IPage<UserCommissionLogVO>
|
||||||
|
*/
|
||||||
|
IPage<MarketUserCommissionLogVO> selectUserCommissionLogPage(IPage<MarketUserCommissionLogVO> page, MarketUserCommissionLogVO userCommissionLog);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
/**
|
||||||
|
* BladeX Commercial License Agreement
|
||||||
|
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||||
|
* <p>
|
||||||
|
* Use of this software is governed by the Commercial License Agreement
|
||||||
|
* obtained after purchasing a license from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 1. This software is for development use only under a valid license
|
||||||
|
* from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 2. Redistribution of this software's source code to any third party
|
||||||
|
* without a commercial license is strictly prohibited.
|
||||||
|
* <p>
|
||||||
|
* 3. Licensees may copyright their own code but cannot use segments
|
||||||
|
* from this software for such purposes. Copyright of this software
|
||||||
|
* remains with BladeX.
|
||||||
|
* <p>
|
||||||
|
* Using this software signifies agreement to this License, and the software
|
||||||
|
* must not be used for illegal purposes.
|
||||||
|
* <p>
|
||||||
|
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||||
|
* not liable for any claims arising from secondary or illegal development.
|
||||||
|
* <p>
|
||||||
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
|
*/
|
||||||
|
package org.springblade.modules.market.service;
|
||||||
|
|
||||||
|
import org.springblade.modules.market.pojo.entity.MarketUserCommissionEntity;
|
||||||
|
import org.springblade.modules.market.pojo.vo.MarketUserCommissionVO;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.springblade.core.mp.base.BaseService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金表 服务类
|
||||||
|
*
|
||||||
|
* @author BladeX
|
||||||
|
* @since 2026-02-14
|
||||||
|
*/
|
||||||
|
public interface IMarketUserCommissionService extends BaseService<MarketUserCommissionEntity> {
|
||||||
|
/**
|
||||||
|
* 自定义分页
|
||||||
|
*
|
||||||
|
* @param page 分页参数
|
||||||
|
* @param userCommission 查询参数
|
||||||
|
* @return IPage<UserCommissionVO>
|
||||||
|
*/
|
||||||
|
IPage<MarketUserCommissionVO> selectUserCommissionPage(IPage<MarketUserCommissionVO> page, MarketUserCommissionVO userCommission);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
/**
|
||||||
|
* BladeX Commercial License Agreement
|
||||||
|
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||||
|
* <p>
|
||||||
|
* Use of this software is governed by the Commercial License Agreement
|
||||||
|
* obtained after purchasing a license from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 1. This software is for development use only under a valid license
|
||||||
|
* from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 2. Redistribution of this software's source code to any third party
|
||||||
|
* without a commercial license is strictly prohibited.
|
||||||
|
* <p>
|
||||||
|
* 3. Licensees may copyright their own code but cannot use segments
|
||||||
|
* from this software for such purposes. Copyright of this software
|
||||||
|
* remains with BladeX.
|
||||||
|
* <p>
|
||||||
|
* Using this software signifies agreement to this License, and the software
|
||||||
|
* must not be used for illegal purposes.
|
||||||
|
* <p>
|
||||||
|
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||||
|
* not liable for any claims arising from secondary or illegal development.
|
||||||
|
* <p>
|
||||||
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
|
*/
|
||||||
|
package org.springblade.modules.market.service.impl;
|
||||||
|
|
||||||
|
import org.springblade.modules.market.pojo.entity.MarketUserCommissionLogEntity;
|
||||||
|
import org.springblade.modules.market.pojo.vo.MarketUserCommissionLogVO;
|
||||||
|
import org.springblade.modules.market.mapper.MarketUserCommissionLogMapper;
|
||||||
|
import org.springblade.modules.market.service.IMarketUserCommissionLogService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金流水表 服务实现类
|
||||||
|
*
|
||||||
|
* @author BladeX
|
||||||
|
* @since 2026-02-14
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class MarketUserCommissionLogServiceImpl extends BaseServiceImpl<MarketUserCommissionLogMapper, MarketUserCommissionLogEntity> implements IMarketUserCommissionLogService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<MarketUserCommissionLogVO> selectUserCommissionLogPage(IPage<MarketUserCommissionLogVO> page, MarketUserCommissionLogVO userCommissionLog) {
|
||||||
|
return page.setRecords(baseMapper.selectUserCommissionLogPage(page, userCommissionLog));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
/**
|
||||||
|
* BladeX Commercial License Agreement
|
||||||
|
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||||
|
* <p>
|
||||||
|
* Use of this software is governed by the Commercial License Agreement
|
||||||
|
* obtained after purchasing a license from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 1. This software is for development use only under a valid license
|
||||||
|
* from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 2. Redistribution of this software's source code to any third party
|
||||||
|
* without a commercial license is strictly prohibited.
|
||||||
|
* <p>
|
||||||
|
* 3. Licensees may copyright their own code but cannot use segments
|
||||||
|
* from this software for such purposes. Copyright of this software
|
||||||
|
* remains with BladeX.
|
||||||
|
* <p>
|
||||||
|
* Using this software signifies agreement to this License, and the software
|
||||||
|
* must not be used for illegal purposes.
|
||||||
|
* <p>
|
||||||
|
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||||
|
* not liable for any claims arising from secondary or illegal development.
|
||||||
|
* <p>
|
||||||
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
|
*/
|
||||||
|
package org.springblade.modules.market.service.impl;
|
||||||
|
|
||||||
|
import org.springblade.modules.market.pojo.entity.MarketUserCommissionEntity;
|
||||||
|
import org.springblade.modules.market.pojo.vo.MarketUserCommissionVO;
|
||||||
|
import org.springblade.modules.market.mapper.MarketUserCommissionMapper;
|
||||||
|
import org.springblade.modules.market.service.IMarketUserCommissionService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金表 服务实现类
|
||||||
|
*
|
||||||
|
* @author BladeX
|
||||||
|
* @since 2026-02-14
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class MarketUserCommissionServiceImpl extends BaseServiceImpl<MarketUserCommissionMapper, MarketUserCommissionEntity> implements IMarketUserCommissionService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<MarketUserCommissionVO> selectUserCommissionPage(IPage<MarketUserCommissionVO> page, MarketUserCommissionVO userCommission) {
|
||||||
|
return page.setRecords(baseMapper.selectUserCommissionPage(page, userCommission));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
/**
|
||||||
|
* BladeX Commercial License Agreement
|
||||||
|
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||||
|
* <p>
|
||||||
|
* Use of this software is governed by the Commercial License Agreement
|
||||||
|
* obtained after purchasing a license from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 1. This software is for development use only under a valid license
|
||||||
|
* from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 2. Redistribution of this software's source code to any third party
|
||||||
|
* without a commercial license is strictly prohibited.
|
||||||
|
* <p>
|
||||||
|
* 3. Licensees may copyright their own code but cannot use segments
|
||||||
|
* from this software for such purposes. Copyright of this software
|
||||||
|
* remains with BladeX.
|
||||||
|
* <p>
|
||||||
|
* Using this software signifies agreement to this License, and the software
|
||||||
|
* must not be used for illegal purposes.
|
||||||
|
* <p>
|
||||||
|
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||||
|
* not liable for any claims arising from secondary or illegal development.
|
||||||
|
* <p>
|
||||||
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
|
*/
|
||||||
|
package org.springblade.modules.market.wrapper;
|
||||||
|
|
||||||
|
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||||
|
import org.springblade.core.tool.utils.BeanUtil;
|
||||||
|
import org.springblade.modules.market.pojo.entity.MarketUserCommissionLogEntity;
|
||||||
|
import org.springblade.modules.market.pojo.vo.MarketUserCommissionLogVO;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金流水表 包装类,返回视图层所需的字段
|
||||||
|
*
|
||||||
|
* @author BladeX
|
||||||
|
* @since 2026-02-14
|
||||||
|
*/
|
||||||
|
public class MarketUserCommissionLogWrapper extends BaseEntityWrapper<MarketUserCommissionLogEntity, MarketUserCommissionLogVO> {
|
||||||
|
|
||||||
|
public static MarketUserCommissionLogWrapper build() {
|
||||||
|
return new MarketUserCommissionLogWrapper();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MarketUserCommissionLogVO entityVO(MarketUserCommissionLogEntity userCommissionLog) {
|
||||||
|
MarketUserCommissionLogVO userCommissionLogVO = Objects.requireNonNull(BeanUtil.copyProperties(userCommissionLog, MarketUserCommissionLogVO.class));
|
||||||
|
|
||||||
|
//User createUser = UserCache.getUser(userCommissionLog.getCreateUser());
|
||||||
|
//User updateUser = UserCache.getUser(userCommissionLog.getUpdateUser());
|
||||||
|
//userCommissionLogVO.setCreateUserName(createUser.getName());
|
||||||
|
//userCommissionLogVO.setUpdateUserName(updateUser.getName());
|
||||||
|
|
||||||
|
return userCommissionLogVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
/**
|
||||||
|
* BladeX Commercial License Agreement
|
||||||
|
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||||
|
* <p>
|
||||||
|
* Use of this software is governed by the Commercial License Agreement
|
||||||
|
* obtained after purchasing a license from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 1. This software is for development use only under a valid license
|
||||||
|
* from BladeX.
|
||||||
|
* <p>
|
||||||
|
* 2. Redistribution of this software's source code to any third party
|
||||||
|
* without a commercial license is strictly prohibited.
|
||||||
|
* <p>
|
||||||
|
* 3. Licensees may copyright their own code but cannot use segments
|
||||||
|
* from this software for such purposes. Copyright of this software
|
||||||
|
* remains with BladeX.
|
||||||
|
* <p>
|
||||||
|
* Using this software signifies agreement to this License, and the software
|
||||||
|
* must not be used for illegal purposes.
|
||||||
|
* <p>
|
||||||
|
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||||
|
* not liable for any claims arising from secondary or illegal development.
|
||||||
|
* <p>
|
||||||
|
* Author: Chill Zhuang (bladejava@qq.com)
|
||||||
|
*/
|
||||||
|
package org.springblade.modules.market.wrapper;
|
||||||
|
|
||||||
|
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||||
|
import org.springblade.core.tool.utils.BeanUtil;
|
||||||
|
import org.springblade.modules.market.pojo.entity.MarketUserCommissionEntity;
|
||||||
|
import org.springblade.modules.market.pojo.vo.MarketUserCommissionVO;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户佣金表 包装类,返回视图层所需的字段
|
||||||
|
*
|
||||||
|
* @author BladeX
|
||||||
|
* @since 2026-02-14
|
||||||
|
*/
|
||||||
|
public class MarketUserCommissionWrapper extends BaseEntityWrapper<MarketUserCommissionEntity, MarketUserCommissionVO> {
|
||||||
|
|
||||||
|
public static MarketUserCommissionWrapper build() {
|
||||||
|
return new MarketUserCommissionWrapper();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MarketUserCommissionVO entityVO(MarketUserCommissionEntity userCommission) {
|
||||||
|
MarketUserCommissionVO userCommissionVO = Objects.requireNonNull(BeanUtil.copyProperties(userCommission, MarketUserCommissionVO.class));
|
||||||
|
|
||||||
|
//User createUser = UserCache.getUser(userCommission.getCreateUser());
|
||||||
|
//User updateUser = UserCache.getUser(userCommission.getUpdateUser());
|
||||||
|
//userCommissionVO.setCreateUserName(createUser.getName());
|
||||||
|
//userCommissionVO.setUpdateUserName(updateUser.getName());
|
||||||
|
|
||||||
|
return userCommissionVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user