This commit is contained in:
邱贞招 2025-02-10 09:23:08 +08:00
parent 47689f80fa
commit 812749b86c
31 changed files with 367 additions and 82 deletions

View File

@ -179,6 +179,20 @@ public class AppUserController extends BaseController {
return toAjax(userService.basicConfig(dto));
}
/**
* 升级多店权限
*/
@Log(title = "升级多店权限", businessType = BusinessType.UPDATE)
@PostMapping("/upgrade")
public AjaxResult upgrade(Long userId)
{
logger.info("升级多店权限【userId={}】", userId);
UserVO user =new UserVO();
user.setUserId(userId);
user.setMultiStore("N");
return toAjax(userService.updateUser(user));
}
/**
* 账变记录
*/

View File

@ -1,5 +1,6 @@
package com.ruoyi.web.controller.system;
import com.alibaba.fastjson2.JSON;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
@ -11,6 +12,7 @@ import com.ruoyi.ss.channel.domain.Channel;
import com.ruoyi.ss.channel.domain.ChannelQuery;
import com.ruoyi.ss.channel.domain.ChannelVO;
import com.ruoyi.ss.channel.service.IChannelService;
import com.ruoyi.ss.userWithdraw.domain.UserWithdraw;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
@ -19,6 +21,8 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import static com.ruoyi.framework.datasource.DynamicDataSourceContextHolder.log;
/**
* 充值渠道Controller
*
@ -30,7 +34,7 @@ import java.util.List;
public class ChannelController extends BaseController
{
@Autowired
private IChannelService smEtChannelService;
private IChannelService channelService;
/**
* 查询充值渠道列表
@ -40,10 +44,21 @@ public class ChannelController extends BaseController
public TableDataInfo list(ChannelQuery smChannel)
{
startPage();
List<ChannelVO> list = smEtChannelService.selectSmChannelList(smChannel);
List<ChannelVO> list = channelService.selectSmChannelList(smChannel);
return getDataTable(list);
}
/**
* 查询充值渠道列表
*/
@PreAuthorize("@ss.hasPermi('system:channel:listByIds')")
@PostMapping("/listByIds")
public AjaxResult listByIds(@RequestBody List<Long> ids)
{
List<ChannelVO> list = channelService.selectByIds(ids);
return success(list);
}
/**
* 导出充值渠道列表
*/
@ -52,7 +67,7 @@ public class ChannelController extends BaseController
@PostMapping("/export")
public void export(HttpServletResponse response, ChannelQuery smChannel)
{
List<ChannelVO> list = smEtChannelService.selectSmChannelList(smChannel);
List<ChannelVO> list = channelService.selectSmChannelList(smChannel);
ExcelUtil<ChannelVO> util = new ExcelUtil<ChannelVO>(ChannelVO.class);
util.exportExcel(response, list, "充值渠道数据");
}
@ -64,7 +79,20 @@ public class ChannelController extends BaseController
@GetMapping(value = "/{channelId}")
public AjaxResult getInfo(@PathVariable("channelId") Long channelId)
{
return success(smEtChannelService.selectChannelByChannelId(channelId));
return success(channelService.selectChannelByChannelId(channelId));
}
/**
* 添加渠道
*/
@PreAuthorize("@ss.hasPermi('system:channel:add')")
@Log(title = "添加渠道", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Channel channel)
{
log.info("【添加渠道】:【{}】", JSON.toJSONString(channel));
return toAjax(channelService.insertSmChannel(channel));
}
/**
@ -86,7 +114,7 @@ public class ChannelController extends BaseController
channel.setPrivateKeyPath(form.getPrivateKeyPath());
channel.setMerchantSerialNumber(form.getMerchantSerialNumber());
channel.setRefundNotifyUrl(form.getRefundNotifyUrl());
return toAjax(smEtChannelService.updateSmChannel(channel));
return toAjax(channelService.updateSmChannel(channel));
}
}

View File

@ -1,9 +1,13 @@
package com.ruoyi.web.controller.system;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.ServiceConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.dto.ModifyBalanceDTO;
import com.ruoyi.common.core.domain.entity.User;
import com.ruoyi.common.utils.ServiceUtil;
import com.ruoyi.ss.changeBalance.service.IChangeBalanceService;
import com.ruoyi.ss.user.domain.UserVO;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
@ -12,6 +16,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.ss.user.domain.UserQuery;
import com.ruoyi.ss.user.service.IUserAssembler;
import com.ruoyi.ss.user.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -36,6 +41,9 @@ public class UserController extends BaseController
@Resource
private IUserAssembler userAssembler;
@Autowired
private IChangeBalanceService changeBalanceService;
/**
* 获取用户列表
*/
@ -168,4 +176,23 @@ public class UserController extends BaseController
}
/**
* 修改余额
* 1. 修改用户余额
* 2. 增加账变记录
* 记录操作人 reapply above
*/
@Log(title = "修改余额", businessType = BusinessType.UPDATE)
@PutMapping("/modifyBalance")
public AjaxResult modifyBalance(@Validated @RequestBody ModifyBalanceDTO dto)
{
User user = eUserService.selectUserById(dto.getUserId());
/* 记录账变 */
int i = changeBalanceService.generateChangeBalance(null, null, dto.getType(),
ServiceConstants.SYSTEM_MODIFY, dto.getAmount(), dto.getUserId(), user.getUserName(), user.getPhonenumber(),user.getUserType());
ServiceUtil.assertion(i == 0, "更新记录账变失败");
return toAjax(i);
}
}

View File

@ -7,6 +7,8 @@ import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.ss.userWithdraw.domain.UserWithdraw;
import com.ruoyi.ss.userWithdraw.domain.UserWithdrawQuery;
import com.ruoyi.ss.userWithdraw.domain.UserWithdrawVO;
import com.ruoyi.ss.userWithdraw.service.IUserWithdrawService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
@ -33,25 +35,25 @@ public class UserWithdrawController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('system:userWithdraw:list')")
@GetMapping("/list")
public TableDataInfo list(UserWithdraw rlUserWithdraw)
public TableDataInfo list(UserWithdrawQuery rlUserWithdraw)
{
startPage();
List<UserWithdraw> list = rlUserWithdrawService.selectRlUserWithdrawList(rlUserWithdraw);
List<UserWithdrawVO> list = rlUserWithdrawService.selectRlUserWithdrawList(rlUserWithdraw);
return getDataTable(list);
}
/**
* 导出用户提现渠道列表
*/
@PreAuthorize("@ss.hasPermi('system:userWithdraw:export')")
@Log(title = "用户提现渠道", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, UserWithdraw rlUserWithdraw)
{
List<UserWithdraw> list = rlUserWithdrawService.selectRlUserWithdrawList(rlUserWithdraw);
ExcelUtil<UserWithdraw> util = new ExcelUtil<UserWithdraw>(UserWithdraw.class);
util.exportExcel(response, list, "用户提现渠道数据");
}
// /**
// * 导出用户提现渠道列表
// */
// @PreAuthorize("@ss.hasPermi('system:userWithdraw:export')")
// @Log(title = "用户提现渠道", businessType = BusinessType.EXPORT)
// @PostMapping("/export")
// public void export(HttpServletResponse response, UserWithdrawQuery rlUserWithdraw)
// {
// List<UserWithdrawVO> list = rlUserWithdrawService.selectRlUserWithdrawList(rlUserWithdraw);
// ExcelUtil<UserWithdraw> util = new ExcelUtil<UserWithdraw>(UserWithdraw.class);
// util.exportExcel(response, list, "用户提现渠道数据");
// }
/**
* 获取用户提现渠道详细信息

View File

@ -834,6 +834,8 @@ public class ServiceConstants {
public static final String PRODUCT_ORDER = "7";
/** 短信扣费 */
public static final String SMS_DEDUCTION = "8";
/** 系统修改 */
public static final String SYSTEM_MODIFY = "9";
/**----------------------------业务类型end----------------------------*/
/**----------------------------订单操作类型start----------------------------*/
@ -1177,6 +1179,20 @@ public class ServiceConstants {
/**----------------------------首页时间范围end----------------------------*/
/**----------------------------多店权限start----------------------------*/
/** 多店权限1-单店N-多店 */
/**
* 多店权限1-单店
*/
public static final String STORE_PERMISSION_SINGLE = "1";
/**
* 多店权限N-多店
*/
public static final String STORE_PERMISSION_MULTIPLE = "N";
/**----------------------------多店权限end----------------------------*/
}

View File

@ -0,0 +1,35 @@
package com.ruoyi.common.core.domain.dto;
import com.ruoyi.common.core.domain.ValidGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
/**
* 修改余额dto
*
* @author qiuzhenzhao
*/
@Data
public class ModifyBalanceDTO {
/** 用户ID */
@ApiModelProperty(value = "用户ID")
@NotNull(message = "用户ID不能为空", groups = {ValidGroup.Update.class})
private Long userId;
@ApiModelProperty(value = "金额")
@NotNull(message = "金额不能为空")
private BigDecimal amount;
@ApiModelProperty(value = "备注")
@NotNull(message = "备注不能为空")
private String remark;
@ApiModelProperty(value = "类型1-加账2-减账")
@NotNull(message = "类型不能为空")
private String type;
}

View File

@ -1,5 +1,6 @@
package com.ruoyi.common.core.domain.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.common.annotation.Excel.Type;
@ -102,6 +103,7 @@ public class User extends BaseEntity
/** 最后登录时间 */
@Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date loginDate;
/** 是否认证0-未认证1-已认证 */
@ -113,8 +115,12 @@ public class User extends BaseEntity
/** 微信openid */
private String wxopenid;
/** 支付渠道 */
public Long payChannel;
// /** 支付渠道 */
// public Long payChannel;
@Excel(name = "自定义渠道ID列表")
@ApiModelProperty("自定义渠道ID列表")
private List<Long> channelIds;
/** 分账比例 */
@NotNull(message = "分账比例不能为空", groups = {ValidGroup.CreatePartner.class})
@ -161,6 +167,9 @@ public class User extends BaseEntity
@ApiModelProperty(value = "app菜单ids")
private List<Long> appMenus;
@ApiModelProperty(value = "多店权限1-单店N-多店")
private String multiStore;
public User() {
}

View File

@ -208,6 +208,10 @@ public enum BusinessType
/**
* 禁用设备
*/
DISABLE
DISABLE,
/**
* 修改余额
*/
MODIFYBALANCE
}

View File

@ -9,7 +9,8 @@ public enum BusinessType {
ORDER_REFUND("4", "订单退款:"),
WITHDRAW("5", "提现"),
WITHDRAW_FAIL("6", "提现失败"),
SMS_CHARGE("8", "短信扣费");
SMS_CHARGE("8", "短信扣费"),
SYSTEM_MODIFY("9", "管理员加款");
private final String code;
private final String description;

View File

@ -7,7 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="ChangeBalanceVO" id="RlChangeBalanceResult" autoMapping="true"/>
<sql id="selectRlChangeBalanceVo">
select cb.change_id, cb.order_no, cb.out_trade_no, cb.type, cb.bus_type, cb.before_balance, cb.after_balance,
select cb.change_id, cb.order_no, cb.out_trade_no, cb.type, cb.bus_type, cb.before_balance, cb.after_balance,cb.create_by,
cb.amount, cb.owner_name, cb.owner_id, cb.owner_phone, cb.owner_type, cb.create_time, cb.reason from ss_change_balance cb
left join ss_user u on u.user_id = cb.owner_id
</sql>
@ -58,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ownerPhone != null">owner_phone,</if>
<if test="ownerType != null">owner_type,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="reason != null">reason,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@ -73,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ownerPhone != null">#{ownerPhone},</if>
<if test="ownerType != null">#{ownerType},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="reason != null">#{reason},</if>
</trim>
</insert>

View File

@ -18,7 +18,9 @@ import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
import static com.ruoyi.common.constant.ServiceConstants.FLOW_TYPE_DISBURSE;
import static com.ruoyi.common.constant.ServiceConstants.FLOW_TYPE_INCOME;
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
/**
* 余额变动Service业务层处理
@ -144,12 +146,15 @@ public class ChangeBalanceServiceImpl implements IChangeBalanceService
// 获取当前余额
BigDecimal balance = userService.selectUserBalanceById(userId);
String changeType;
// 计算变更后的余额
BigDecimal afterBalance;
if (type.equals(FLOW_TYPE_INCOME)) {
afterBalance = balance.add(payFee);
changeType = "管理员加款:+";
} else {
afterBalance = balance.subtract(payFee);
changeType = "管理员扣款:-";
// 校验余额是否会变成负数
if (afterBalance.compareTo(BigDecimal.ZERO) < 0) {
throw new ServiceException("余额不足");
@ -169,6 +174,7 @@ public class ChangeBalanceServiceImpl implements IChangeBalanceService
rlChangeBalance.setOwnerType(userType);
rlChangeBalance.setOwnerPhone(phone);
rlChangeBalance.setCreateTime(DateUtils.getNowDate());
rlChangeBalance.setCreateBy(getUsername());
// 根据 busType 生成不同的 reason 描述
BigDecimal changeAmount = rlChangeBalance.getAmount();
@ -177,7 +183,10 @@ public class ChangeBalanceServiceImpl implements IChangeBalanceService
if (businessType != null) {
reason = businessType.getDescription() + orderNo;
if (businessType == BusinessType.ORDER_REFUND || businessType == BusinessType.WITHDRAW || businessType == BusinessType.SMS_CHARGE) {
if (businessType == BusinessType.SYSTEM_MODIFY) {
reason = changeType + payFee + "";
}
if (type.equals(FLOW_TYPE_DISBURSE)) {
changeAmount = changeAmount.negate();
}
}

View File

@ -5,8 +5,10 @@ import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.ValidGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NonNull;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
/**
@ -21,6 +23,7 @@ public class Channel extends BaseEntity
private static final long serialVersionUID = 1L;
/** 主键 */
@NotNull(message = "渠道id不能为空", groups = {ValidGroup.Update.class})
private Long channelId;
/** 渠道名称 */
@ -31,13 +34,17 @@ public class Channel extends BaseEntity
@Excel(name = "渠道代码")
private String code;
/** 充值渠道类型1-平台渠道2-商户专属 */
@Excel(name = "充值渠道类型")
private String type;
/** 是否启用 */
@Excel(name = "是否启用")
private Boolean enabled;
/** 成本率% */
@Excel(name = "成本率%")
@Min(value = 0, message = "成本率不允许低于0", groups = {ValidGroup.Update.class})
@Min(value = 0, message = "成本率不允许低于0", groups = {ValidGroup.Update.class, ValidGroup.Create.class})
private BigDecimal costRate;
@ApiModelProperty("渠道图片")

View File

@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sc.channel_id,
sc.name,
sc.code,
sc.type,
sc.enabled,
sc.cost_rate,
sc.picture,
@ -22,13 +23,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sc.private_key_path,
sc.merchant_serial_number,
sc.refund_notify_url,
sc.appid
sc.appid,
sc.create_time
from ss_channel sc
</sql>
<sql id="searchCondition">
<if test="query.name != null and query.name != ''"> and sc.name like concat('%', #{query.name}, '%')</if>
<if test="query.enabled != null "> and sc.enabled = #{query.enabled}</if>
<if test="query.type != null "> and sc.type = #{query.type}</if>
<if test="query.channelIds != null and query.channelIds.size() > 0 ">
and sc.channel_id in
<foreach item="item" collection="query.channelIds" open="(" separator="," close=")">
@ -55,17 +58,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="channelId != null">channel_id,</if>
<if test="name != null">`name`,</if>
<if test="code != null">`code`,</if>
<if test="type != null">type,</if>
<if test="enabled != null">enabled,</if>
<if test="costRate != null">cost_rate,</if>
<if test="picture != null">picture,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="channelId != null">#{channelId},</if>
<if test="name != null">#{name},</if>
<if test="code != null">#{code},</if>
<if test="type != null">#{type},</if>
<if test="enabled != null">#{enabled},</if>
<if test="costRate != null">#{costRate},</if>
<if test="picture != null">#{picture},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
@ -74,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=",">
<if test="data.name != null">name = #{data.name},</if>
<if test="data.code != null">code = #{data.code},</if>
<if test="data.type != null">type = #{data.type},</if>
<if test="data.enabled != null">enabled = #{data.enabled},</if>
<if test="data.costRate != null">cost_rate = #{data.costRate},</if>
<if test="data.picture != null">picture = #{data.picture},</if>

View File

@ -86,4 +86,9 @@ public interface IChannelService
* @return 结果
*/
ChannelVO selectChannelBySerialNumber(String wechatpaySerial);
/**
* 根据id查询
*/
List<ChannelVO> selectByIds(List<Long> ids);
}

View File

@ -1,5 +1,7 @@
package com.ruoyi.ss.channel.service.impl;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.collection.CollectionUtils;
import com.ruoyi.ss.channel.domain.ChannelQuery;
import com.ruoyi.ss.channel.domain.Channel;
import com.ruoyi.ss.channel.domain.ChannelVO;
@ -8,6 +10,7 @@ import com.ruoyi.ss.channel.service.IChannelService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
@ -58,6 +61,7 @@ public class ChannelServiceImpl implements IChannelService
@Override
public int insertSmChannel(Channel channel)
{
channel.setCreateTime(DateUtils.getNowDate());
return rlChannelMapper.insertSmChannel(channel);
}
@ -126,4 +130,14 @@ public class ChannelServiceImpl implements IChannelService
public ChannelVO selectChannelBySerialNumber(String wechatpaySerial) {
return rlChannelMapper.selectChannelBySerialNumber(wechatpaySerial);
}
@Override
public List<ChannelVO> selectByIds(List<Long> ids) {
if (CollectionUtils.isEmptyElement(ids)) {
return Collections.emptyList();
}
ChannelQuery query = new ChannelQuery();
query.setChannelIds(ids);
return this.selectSmChannelList(query);
}
}

View File

@ -8,6 +8,8 @@ import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ServiceUtil;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.collection.CollectionUtils;
import com.ruoyi.ss.channelWithdraw.domain.ChannelWithdrawVO;
import com.ruoyi.ss.channelWithdraw.service.ChannelWithdrawService;
import com.ruoyi.ss.device.domain.Device;
import com.ruoyi.ss.device.domain.DeviceBO;
import com.ruoyi.ss.device.domain.DeviceCountVO;
@ -46,6 +48,8 @@ import com.ruoyi.ss.toilet.domain.ToiletVO;
import com.ruoyi.ss.toilet.service.IToiletService;
import com.ruoyi.ss.user.domain.UserVO;
import com.ruoyi.ss.user.service.IUserService;
import com.ruoyi.ss.userWithdraw.domain.UserWithdraw;
import com.ruoyi.ss.userWithdraw.service.IUserWithdrawService;
import com.ruoyi.system.iot.domain.IotDeviceInfo;
import com.ruoyi.system.iot.domain.response.CommandResponse;
import com.ruoyi.system.iot.enums.IotHttpStatus;
@ -128,6 +132,12 @@ public class DeviceServiceImpl implements DeviceService
@Autowired
private DeviceBindRecordService deviceBindRecordService;
@Autowired
private IUserWithdrawService userWithdrawService;
@Autowired
private ChannelWithdrawService channelWithdrawService;
/**
* 查询设备
*
@ -1358,11 +1368,14 @@ public class DeviceServiceImpl implements DeviceService
int updateCount = deviceMapper.bind(device.getDeviceId(), storeId, userId);
ServiceUtil.assertion(updateCount != 1, "当前设备信息已变更,请刷新后重试");
// 将用户更新变成商户
// 将用户更新变成商户并将全局的配置加入用户提现渠道中
UserVO userVO = userService.selectUserById(userId);
if(!userVO.getUserType().equals(USER_TYPE_MERCHANT)){
int i = userService.becomeMch(userId);
ServiceUtil.assertion(i != 1, "更新商户失败");
// 全局的配置加入用户提现渠道中
userWithdrawalChannel(userVO.getUserId());
}
// 记录绑定记录
@ -1375,6 +1388,30 @@ public class DeviceServiceImpl implements DeviceService
return Boolean.TRUE;
}
private void userWithdrawalChannel(Long userId) {
List<ChannelWithdrawVO> channelWithdrawVOS = channelWithdrawService.selectAllChannelWithdrawList();
int i1 = userWithdrawService.deleteRlUserWithdrawByUserChannelId(userId);
createUserWithdrawal(userId, channelWithdrawVOS);
}
private void createUserWithdrawal(Long userId, List<ChannelWithdrawVO> channelWithdrawVOS) {
for (ChannelWithdrawVO channelWithdrawVO : channelWithdrawVOS) {
UserWithdraw rlUserWithdraw = new UserWithdraw();
rlUserWithdraw.setHandlingChargeType(channelWithdrawVO.getHandlingChargeType());
rlUserWithdraw.setWithdrawHandlingCharge(channelWithdrawVO.getWithdrawHandlingCharge());
rlUserWithdraw.setUserId(userId);
rlUserWithdraw.setChannelId(channelWithdrawVO.getChannelId());
rlUserWithdraw.setIsOpen(true);
rlUserWithdraw.setMaxAmount(channelWithdrawVO.getMaxAmount());
rlUserWithdraw.setMinAmount(channelWithdrawVO.getMinAmount());
rlUserWithdraw.setName(channelWithdrawVO.getName());
rlUserWithdraw.setPicture(channelWithdrawVO.getPicture());
rlUserWithdraw.setIsNeedCode(channelWithdrawVO.getIsNeedCode());
int i = userWithdrawService.insertRlUserWithdraw(rlUserWithdraw);
ServiceUtil.assertion(i==0,"创建用户提现渠道失败userId:"+ userId);
}
}
/**
* 根据mac号查询数据
* @param mac

View File

@ -125,6 +125,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''"> and o.status = #{status}</if>
<if test="payChannel != null"> and o.pay_channel = #{payChannel}</if>
<if test="storeId != null"> and o.store_id = #{storeId}</if>
<if test="roomId != null"> and o.room_id = #{roomId}</if>
<if test="equipmentId != null"> and o.equipment_id = #{equipmentId}</if>
<if test="storeName != null and storeName != ''"> and o.store_name = #{storeName}</if>
<if test="merchantId != null"> and o.merchant_id = #{merchantId}</if>
<if test="originalOrderNo != null and originalOrderNo != ''"> and o.original_order_no = #{originalOrderNo}</if>
@ -273,7 +275,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectSoldNum" resultType="java.lang.Integer">
select count(1) from ss_order where status = 2 and room_id = #{roomId}
select count(1) from ss_order where status in (1,2,3,4,7,8,9) and room_id = #{roomId}
</select>
<select id="selectReservedTimes" resultType="ReservedTimePeriod">

View File

@ -120,11 +120,11 @@ public class OrderConverterImpl implements IOrderConverter {
ServiceUtil.assertion(merchantVO == null, "商户不存在");
ServiceUtil.assertion(merchantVO.getServiceFeeProportion() == null, "商户【"+merchantVO.getUserName()+"】的平台服务费未配置");
ServiceUtil.assertion(merchantVO.getPayChannel() == null, "商户【"+merchantVO.getUserName()+"】的支付渠道未配置");
ServiceUtil.assertion(merchantVO.getChannelIds() == null || merchantVO.getChannelIds().isEmpty(), "商户【"+merchantVO.getUserName()+"】的支付渠道未配置");
// 支付渠道
ChannelVO channelVO = channelService.selectChannelByChannelId(merchantVO.getPayChannel());
ServiceUtil.assertion(channelVO == null, "支付渠道不存在");
List<ChannelVO> channelVO = channelService.selectByIds(merchantVO.getChannelIds());
ServiceUtil.assertion(channelVO == null || channelVO.isEmpty(), "支付渠道不存在");
// 套餐
FeeRuleVO eFeeRuleVO = feeRuleService.selectEFeeRuleByRuleId(order.getRuleId());
@ -138,7 +138,7 @@ public class OrderConverterImpl implements IOrderConverter {
orderBO.setParams(order);
orderBO.setFeeRule(eFeeRuleVO);
orderBO.setMerchant(merchantVO);
orderBO.setChannel(channelVO);
orderBO.setChannel(channelVO.get(0));
orderBO.setStore(eStoreVO);
orderBO.setGate(gate);
orderBO.setUser(eUserVO);
@ -180,10 +180,10 @@ public class OrderConverterImpl implements IOrderConverter {
ServiceUtil.assertion(merchantVO == null, "商户不存在");
ServiceUtil.assertion(merchantVO.getServiceFeeProportion() == null, "商户【"+merchantVO.getUserName()+"】的平台服务费未配置");
ServiceUtil.assertion(merchantVO.getPayChannel() == null, "商户【"+merchantVO.getUserName()+"】的支付渠道未配置");
ServiceUtil.assertion(merchantVO.getChannelIds() == null || merchantVO.getChannelIds().isEmpty(), "商户【"+merchantVO.getUserName()+"】的支付渠道未配置");
// 支付渠道
ChannelVO channelVO = channelService.selectChannelByChannelId(merchantVO.getPayChannel());
List<ChannelVO> channelVO = channelService.selectByIds(merchantVO.getChannelIds());
ServiceUtil.assertion(channelVO == null, "支付渠道不存在");
// 套餐
@ -204,7 +204,7 @@ public class OrderConverterImpl implements IOrderConverter {
orderBO.setStore(eStoreVO);
orderBO.setGate(gate);
orderBO.setUser(eUserVO);
orderBO.setChannel(channelVO);
orderBO.setChannel(channelVO.get(0));
orderBO.setOriginalOrder(originalOrder);
orderBO.setType(order.getType());
orderBO.setReType(ServiceConstants.ORDER_TYPE_REORDER);
@ -261,10 +261,10 @@ public class OrderConverterImpl implements IOrderConverter {
ServiceUtil.assertion(merchantVO == null, "商户不存在");
ServiceUtil.assertion(merchantVO.getServiceFeeProportion() == null, "商户【"+merchantVO.getUserName()+"】的平台服务费未配置");
ServiceUtil.assertion(merchantVO.getPayChannel() == null, "商户【"+merchantVO.getUserName()+"】的支付渠道未配置");
ServiceUtil.assertion(merchantVO.getChannelIds() == null || merchantVO.getChannelIds().isEmpty(), "商户【"+merchantVO.getUserName()+"】的支付渠道未配置");
// 支付渠道
ChannelVO channelVO = channelService.selectChannelByChannelId(merchantVO.getPayChannel());
List<ChannelVO> channelVO = channelService.selectByIds(merchantVO.getChannelIds());
ServiceUtil.assertion(channelVO == null, "支付渠道不存在");
// 用户
@ -283,7 +283,7 @@ public class OrderConverterImpl implements IOrderConverter {
orderBO.setProduct(eProductVO);
orderBO.setRoom(eRoomVO);
orderBO.setMerchant(merchantVO);
orderBO.setChannel(channelVO);
orderBO.setChannel(channelVO.get(0));
orderBO.setStore(eStoreVO);
orderBO.setUser(eUserVO);
orderBO.setType(ServiceConstants.ORDER_TYPE_CONTAINER);

View File

@ -106,7 +106,11 @@ public class WxPayService implements IWxPayService {
// 创建订单
UserVO merchant = asUserService.selectUserById(order.getMerchant().getUserId());
try {
Long payChannel = merchant.getPayChannel();
// todo 支付渠道修改
// 1. 先判断商户是否有对应的专属支付渠道
// 如果有直接获取该商户的第一个支付渠道
// 没有则去获取平台的渠道默认使用第一个
Long payChannel =null;
ServiceUtil.assertion(ObjectUtil.isNull(payChannel), "用户【"+merchant.getUserName()+"】没有配置支付渠道");
ChannelVO channelVO = order.getChannel();

View File

@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
r.refund_result,
r.merchant_id,
r.oper_time,
p.amount
p.amount as payFee
from ss_refund r
left join ss_pay_bill p on p.pay_id = r.pay_id
left join ss_user m on m.user_id = r.merchant_id

View File

@ -20,6 +20,10 @@ public class RoomVO extends Room {
@ApiModelProperty("已售数量")
private Integer soldNum;
/* 总营收 */
@ApiModelProperty("总营收")
private BigDecimal totalIncome;
/* 最低价格套餐对象 */
@ApiModelProperty("最低价格套餐对象")
private FeeRuleVO bottomPriceFeeRule;
@ -35,9 +39,6 @@ public class RoomVO extends Room {
@ApiModelProperty("设施列表")
private List<EquipmentVO> equipmentList;
// @ApiModelProperty("类型1-房间2-设施")
// private String viewType = "1";
@ApiModelProperty("sn")
private String sn;

View File

@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
r.deleted,
r.rule_ids,
r.wifi,
r.password,
r.wifi_password,
r.equ_type,
r.create_time
from ss_room r
@ -135,7 +135,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deleted != null">deleted,</if>
<if test="ruleIds != null">rule_ids,</if>
<if test="wifi != null">wifi,</if>
<if test="wifiPassword != null">password,</if>
<if test="wifiPassword != null">wifi_password,</if>
<if test="equType != null">equ_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@ -180,7 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="data.deleted != null">deleted = #{data.deleted},</if>
<if test="data.ruleIds != null">rule_ids = #{data.ruleIds,typeHandler=com.ruoyi.system.mapper.typehandler.LongSplitListTypeHandler},</if>
<if test="data.wifi != null">wifi = #{data.wifi},</if>
<if test="data.wifiPassword != null">password = #{data.wifiPassword},</if>
<if test="data.wifiPassword != null">wifi_password = #{data.wifiPassword},</if>
<if test="data.equType != null">equ_type = #{data.equType},</if>
</sql>

View File

@ -11,10 +11,12 @@ import com.ruoyi.ss.equipment.domain.EquipmentVO;
import com.ruoyi.ss.equipment.service.IEquipmentService;
import com.ruoyi.ss.feeRule.domain.FeeRuleVO;
import com.ruoyi.ss.feeRule.service.IFeeRuleService;
import com.ruoyi.ss.order.domain.OrderQuery;
import com.ruoyi.ss.order.domain.vo.ReservedTimePeriod;
import com.ruoyi.ss.order.service.IOrderService;
import com.ruoyi.ss.room.domain.RoomVO;
import com.ruoyi.ss.room.service.IRoomAssembler;
import com.ruoyi.ss.store.domain.StoreVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -22,7 +24,7 @@ import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import static com.ruoyi.common.constant.ServiceConstants.ROOM_TYPE2_PRIVATE_ROOM;
import static com.ruoyi.common.constant.ServiceConstants.*;
/**
* @author qzz
@ -107,6 +109,24 @@ public class RoomAssemblerImpl implements IRoomAssembler {
room.setFeeRules(feeRuleVOS);
room.setBillingMode(feeRuleVOS.get(0).getMode());
}
// 总营收 总订单数
setIncome(room);
}
private void setIncome(RoomVO vo) {
OrderQuery orderQuery = new OrderQuery();
if(vo.getType2().equals(ServiceConstants.ROOM_TYPE2_PRIVATE_ROOM)){
orderQuery.setRoomId(vo.getRoomId());
}else{
orderQuery.setEquipmentId(vo.getRoomId());
}
String[] statusList = {"1", "2", "3", "4", "7", "8", "9"};
orderQuery.setStatusList(statusList);
BigDecimal totalRevenue = orderService.getOrderFee(orderQuery);
vo.setTotalIncome(totalRevenue);// 总营收
// 已售数
int soldNum = orderService.selectSoldNum(vo.getRoomId());
vo.setSoldNum(soldNum);
}
/**

View File

@ -30,6 +30,7 @@ import com.ruoyi.ss.toilet.domain.ToiletQuery;
import com.ruoyi.ss.toilet.domain.ToiletVO;
import com.ruoyi.ss.toilet.service.IToiletAssembler;
import com.ruoyi.ss.toilet.service.IToiletService;
import com.ruoyi.ss.user.domain.UserVO;
import com.ruoyi.ss.user.service.IUserService;
import com.ruoyi.system.service.ISysConfigService;
import lombok.extern.slf4j.Slf4j;
@ -178,6 +179,12 @@ public class StoreServiceImpl implements IStoreService
if(merchantId == null){
merchantId = getUserId();
}
// 校验权限
UserVO userVO = userService.selectUserById(merchantId);
if(STORE_PERMISSION_SINGLE.equals(userVO.getMultiStore())){
int i = storeMapper.selectCount(merchantId);
ServiceUtil.assertion(i > 0, "您已经有一个店铺,不能再创建,请先升级多店权限再操作");
}
eStore.setMerchantId(merchantId);
setCityId(eStore);
Boolean execute = transactionTemplate.execute(e -> {

View File

@ -5,9 +5,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.ss.user.mapper.UserMapper">
<resultMap type="UserVO" id="EUserResult" autoMapping="true" >
<result property="appMenus"
column="app_menus"
typeHandler="com.ruoyi.system.mapper.typehandler.LongSplitListTypeHandler"/>
<result property="appMenus" column="app_menus" typeHandler="com.ruoyi.system.mapper.typehandler.LongSplitListTypeHandler"/>
<result property="channelIds" column="channel_ids" typeHandler="com.ruoyi.system.mapper.typehandler.LongSplitListTypeHandler"/>
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
</resultMap>
@ -21,20 +20,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectUserVo">
select u.user_id, u.user_name, u.real_name, u.id_card, u.nick_name, u.email, u.avatar,u.user_type,u.pay_channel,u.merchant_id,u.dividend_proportion,u.app_menus,
select u.user_id, u.user_name, u.real_name, u.id_card, u.nick_name, u.email, u.avatar,u.user_type,u.channel_ids,u.merchant_id,u.dividend_proportion,u.app_menus,
u.phonenumber, u.password, u.sex, u.status,u.service_fee_proportion,u.clean_duration, u.clean_notice,u.ago_cancel,u.penalty, u.before_time,
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.wxopenid,u.is_authentication,u.store_id,u.device_admin,
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,u.balance
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,u.balance,multi_store
from ss_user u
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on r.role_id = ur.role_id
</sql>
<sql id="selectUserVo2">
select u.user_id, u.user_name, u.real_name, u.id_card, u.nick_name, u.email, u.avatar,u.user_type,u.pay_channel,u.merchant_id,u.dividend_proportion,u.app_menus,
select u.user_id, u.user_name, u.real_name, u.id_card, u.nick_name, u.email, u.avatar,u.user_type,u.channel_ids,u.merchant_id,u.dividend_proportion,u.app_menus,
u.phonenumber, u.password, u.sex, u.status, u.service_fee_proportion,u.clean_duration, u.clean_notice,u.ago_cancel,u.penalty, u.before_time,
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.wxopenid,u.is_authentication,u.store_id,u.device_admin,
u.balance
u.balance,u.multi_store
from ss_user u
</sql>
@ -52,7 +51,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
u.clean_notice,
u.ago_cancel,
u.penalty,
u.pay_channel,
u.merchant_id,
u.store_id,
s.name as storeName,
@ -158,7 +156,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
u.nick_name,
u.email,
u.avatar,
u.service_fee_proportion,pay_channel,merchant_id,
u.service_fee_proportion,
u.channel_ids,
u.merchant_id,
u.clean_duration,
u.clean_notice,
u.ago_cancel,
@ -186,8 +186,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
u.create_time,
u.remark,u.wxopenid,
u.is_authentication,
u.pay_channel,
u.dividend_proportion
u.channel_ids,
u.dividend_proportion,
u.multi_store
from ss_user u
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on r.role_id = ur.role_id
@ -197,7 +198,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectAppUserById" parameterType="Long" resultMap="EUserResult">
select u.user_id, u.user_name, u.real_name, u.id_card, u.nick_name, u.email, u.avatar,u.service_fee_proportion,u.clean_duration, u.clean_notice,u.ago_cancel,u.penalty,u.app_menus,
u.phonenumber, u.password, u.sex, u.status,u.user_type,u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time,u.balance,u.before_time,u.device_admin,u.before_time,
u.remark,u.wxopenid,u.is_authentication,u.pay_channel,ub.balance
u.remark,u.wxopenid,u.is_authentication,u.channel_ids,ub.balance
from ss_user u
left join ss_user_balance ub on ub.user_id = u.user_id
where u.user_id = #{userId}
@ -209,7 +210,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="myAccountInfoByUserId" parameterType="Long" resultMap="EUserResult">
select u.user_id, u.user_name, u.real_name, u.id_card, u.nick_name, u.email, u.avatar,
u.phonenumber, u.password, u.sex, u.status,u.user_type,u.service_fee_proportion,u.clean_duration, u.clean_notice,u.ago_cancel,u.penalty,u.before_time,
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.wxopenid,u.is_authentication,u.pay_channel,u.device_admin,u.app_menus,
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.wxopenid,u.is_authentication,u.channel_ids,u.device_admin,u.app_menus,
ub.balance
from ss_user u
left join ss_user_balance ub on ub.user_id = u.user_id
@ -387,7 +388,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="wxopenid != null">wxopenid = #{wxopenid},</if>
<if test="payChannel != null">pay_channel = #{payChannel},</if>
<if test="channelIds != null">channel_ids = #{channelIds,typeHandler=com.ruoyi.system.mapper.typehandler.StringSplitListTypeHandler},</if>
<if test="serviceFeeProportion != null">service_fee_proportion = #{serviceFeeProportion},</if>
<if test="dividendProportion != null">dividend_proportion = #{dividendProportion},</if>
<if test="merchantId != null">merchant_id = #{merchantId},</if>
@ -398,6 +399,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="appMenus != null">app_menus = #{appMenus,typeHandler=com.ruoyi.system.mapper.typehandler.LongSplitListTypeHandler},</if>
<if test="beforeTime != null">before_time = #{beforeTime},</if>
<if test="storeId != null">store_id = #{storeId},</if>
<if test="multiStore != null">multi_store = #{multiStore},</if>
update_time = sysdate()
</set>
where user_id = #{userId}

View File

@ -4,4 +4,7 @@ import lombok.Data;
@Data
public class UserWithdrawQuery extends UserWithdraw {
/** 用户名 */
private String userName;
}

View File

@ -1,8 +1,13 @@
package com.ruoyi.ss.userWithdraw.domain;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
@Data
public class UserWithdrawVO extends UserWithdraw {
/** 用户名 */
@Excel(name = "用户名")
private String userName;
}

View File

@ -1,6 +1,8 @@
package com.ruoyi.ss.userWithdraw.mapper;
import com.ruoyi.ss.userWithdraw.domain.UserWithdraw;
import com.ruoyi.ss.userWithdraw.domain.UserWithdrawQuery;
import com.ruoyi.ss.userWithdraw.domain.UserWithdrawVO;
import java.util.List;
@ -26,7 +28,7 @@ public interface UserWithdrawMapper
* @param rlUserWithdraw 用户提现渠道
* @return 用户提现渠道集合
*/
public List<UserWithdraw> selectRlUserWithdrawList(UserWithdraw rlUserWithdraw);
public List<UserWithdrawVO> selectRlUserWithdrawList(UserWithdrawQuery rlUserWithdraw);
/**
* 新增用户提现渠道

View File

@ -9,36 +9,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectRlUserWithdrawVo">
select user_channel_id, user_id, channel_id, name, handling_charge_type, withdraw_handling_charge,
min_amount, max_amount, create_time, is_open, picture, collection_code, is_need_code, type, is_auto
from ss_user_withdraw
select
uw.user_channel_id,
uw.user_id,
u.user_name,
uw.channel_id,
uw.name,
uw.handling_charge_type,
uw.withdraw_handling_charge,
uw.min_amount,
uw.max_amount,
uw.create_time,
uw.is_open,
uw.picture,
uw.collection_code,
uw.is_need_code,
uw.type,
uw.is_auto
from ss_user_withdraw uw
left join ss_user u on u.user_id = uw.user_id
</sql>
<select id="selectRlUserWithdrawList" parameterType="UserWithdraw" resultMap="RlUserWithdrawResult">
<select id="selectRlUserWithdrawList" parameterType="UserWithdrawQuery" resultMap="RlUserWithdrawResult">
<include refid="selectRlUserWithdrawVo"/>
<where>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="channelId != null "> and channel_id = #{channelId}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="handlingChargeType != null and handlingChargeType != ''"> and handling_charge_type = #{handlingChargeType}</if>
<if test="withdrawHandlingCharge != null "> and withdraw_handling_charge = #{withdrawHandlingCharge}</if>
<if test="minAmount != null "> and min_amount = #{minAmount}</if>
<if test="maxAmount != null "> and max_amount = #{maxAmount}</if>
<if test="isOpen != null and isOpen != ''"> and is_open = #{isOpen}</if>
<if test="isAuto != null and isAuto != ''"> and is_auto = #{isAuto}</if>
<if test="isNeedCode != null and isNeedCode != ''"> and is_need_code = #{isNeedCode}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="userId != null "> and uw.user_id = #{userId}</if>
<if test="channelId != null "> and uw.channel_id = #{channelId}</if>
<if test="name != null and name != ''"> and uw.name like concat('%', #{name}, '%')</if>
<if test="userName != null and userName != ''"> and u.user_name like concat('%', #{userName}, '%')</if>
<if test="handlingChargeType != null and handlingChargeType != ''"> and uw.handling_charge_type = #{handlingChargeType}</if>
<if test="withdrawHandlingCharge != null "> and uw.withdraw_handling_charge = #{withdrawHandlingCharge}</if>
<if test="minAmount != null "> and uw.min_amount = #{minAmount}</if>
<if test="maxAmount != null "> and uw.max_amount = #{maxAmount}</if>
<if test="isOpen != null and isOpen != ''"> and uw.is_open = #{isOpen}</if>
<if test="isAuto != null and isAuto != ''"> and uw.is_auto = #{isAuto}</if>
<if test="isNeedCode != null and isNeedCode != ''"> and uw.is_need_code = #{isNeedCode}</if>
<if test="type != null and type != ''"> and uw.type = #{type}</if>
</where>
</select>
<select id="selectRlUserWithdrawByUserChannelId" parameterType="Long" resultMap="RlUserWithdrawResult">
<include refid="selectRlUserWithdrawVo"/>
where user_channel_id = #{userChannelId}
where uw.user_channel_id = #{userChannelId}
</select>
<select id="selectRlUserWithdrawListByUserId" parameterType="Long" resultMap="RlUserWithdrawResult">
<include refid="selectRlUserWithdrawVo"/>
where user_id = #{userId}
where uw.user_id = #{userId}
</select>
<insert id="insertRlUserWithdraw" parameterType="UserWithdraw">

View File

@ -1,6 +1,8 @@
package com.ruoyi.ss.userWithdraw.service;
import com.ruoyi.ss.userWithdraw.domain.UserWithdraw;
import com.ruoyi.ss.userWithdraw.domain.UserWithdrawQuery;
import com.ruoyi.ss.userWithdraw.domain.UserWithdrawVO;
import java.util.List;
@ -26,7 +28,7 @@ public interface IUserWithdrawService
* @param rlUserWithdraw 用户提现渠道
* @return 用户提现渠道集合
*/
public List<UserWithdraw> selectRlUserWithdrawList(UserWithdraw rlUserWithdraw);
public List<UserWithdrawVO> selectRlUserWithdrawList(UserWithdrawQuery rlUserWithdraw);
/**
* 根据userId查询用户提现渠道列表

View File

@ -2,6 +2,8 @@ package com.ruoyi.ss.userWithdraw.service.impl;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.ss.userWithdraw.domain.UserWithdraw;
import com.ruoyi.ss.userWithdraw.domain.UserWithdrawQuery;
import com.ruoyi.ss.userWithdraw.domain.UserWithdrawVO;
import com.ruoyi.ss.userWithdraw.mapper.UserWithdrawMapper;
import com.ruoyi.ss.userWithdraw.service.IUserWithdrawService;
import org.springframework.stereotype.Service;
@ -40,7 +42,7 @@ public class UserWithdrawServiceImpl implements IUserWithdrawService
* @return 用户提现渠道
*/
@Override
public List<UserWithdraw> selectRlUserWithdrawList(UserWithdraw rlUserWithdraw)
public List<UserWithdrawVO> selectRlUserWithdrawList(UserWithdrawQuery rlUserWithdraw)
{
return userWithdrawMapper.selectRlUserWithdrawList(rlUserWithdraw);
}