Merge remote-tracking branch 'origin/dev' into dev
| | |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.security.annotation.RequiresPermissions; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.wechat.pay.contrib.apache.httpclient.auth.PrivateKeySigner; |
| | | import com.wechat.pay.contrib.apache.httpclient.util.PemUtil; |
| | | import com.wechat.pay.java.core.exception.MalformedMessageException; |
| | |
| | | return franchiseeService.updateBatchById(list) ? R.ok() : R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 设置加盟商操作密码 |
| | | * |
| | | */ |
| | | @ApiOperation(value = "设置加盟商操作密码【202506】", tags = {"后台-加盟商管理"}) |
| | | @PutMapping(value = "/setPayPassword") |
| | | public R<String> setPayPassword(@RequestParam(value = "payPassword") String payPassword) { |
| | | Long userid = tokenService.getLoginUser().getUserid(); |
| | | SysUser sysUser = sysUserService.getById(userid); |
| | | if(Objects.isNull(sysUser.getFranchiseeId())){ |
| | | return R.fail("加盟商信息不存在!"); |
| | | } |
| | | Franchisee franchisee = franchiseeService.getById(sysUser.getFranchiseeId()); |
| | | franchisee.setPayPassword(SecurityUtils.encryptPassword(payPassword)); |
| | | return franchiseeService.updateById(franchisee) ? R.ok() : R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 设置加盟商操作密码 |
| | | * |
| | | */ |
| | | @ApiOperation(value = "加盟商余额扣除撤回【202506】", tags = {"后台-加盟商管理"}) |
| | | @PutMapping(value = "/balanceWithdraw") |
| | | public R<String> balanceWithdraw(@RequestParam(value = "id") Integer id, |
| | | @RequestParam(value = "payPassword") String payPassword) { |
| | | |
| | | TFranchiseeBalanceChange balanceChange = balanceChangeService.getById(id); |
| | | |
| | | Franchisee franchisee = franchiseeService.getById(balanceChange.getFranchiseeId()); |
| | | |
| | | if(!SecurityUtils.matchesPassword(payPassword, franchisee.getPayPassword())){ |
| | | return R.fail("密码错误!"); |
| | | } |
| | | |
| | | franchisee.setBalance(franchisee.getBalance().add(balanceChange.getAmount())); |
| | | franchiseeService.updateById(franchisee); |
| | | |
| | | // 删除操作记录 |
| | | balanceChangeService.removeById(id); |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("余额") |
| | | @TableField("balance") |
| | | private BigDecimal balance; |
| | | @ApiModelProperty("操作密码") |
| | | @TableField("payPassword") |
| | | private String payPassword; |
| | | @TableField(exist = false) |
| | | private String siteStr; |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户提现流程 |
| | | * </p> |
| | | * |
| | | * @author hjl |
| | | * @since 2024-07-09 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("t_withdraw_record") |
| | | @ApiModel(value = "WithdrawRecord对象", description = "用户提现流程表") |
| | | public class WithdrawRecord { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("提现记录id") |
| | | @TableField(value = "withdraw_id") |
| | | private String withdrawId; |
| | | |
| | | @ApiModelProperty("订单id") |
| | | @TableField("orderId") |
| | | private String orderId; |
| | | |
| | | @ApiModelProperty("用户id") |
| | | @TableField("userId") |
| | | private Integer userId; |
| | | @ApiModelProperty("类型 1=提现申请 2=平台审核 3=用户确认 4=提现成功") |
| | | @TableField("withdrawType") |
| | | private Integer withdrawType; |
| | | @ApiModelProperty("创建时间") |
| | | @TableField("createTime") |
| | | private Date createTime; |
| | | @ApiModelProperty("审核结果 1=通过 0=拒绝") |
| | | @TableField("auditStatus") |
| | | private Integer auditStatus; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.order.entity.WithdrawDetail; |
| | | import com.ruoyi.order.entity.WithdrawRecord; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户提现流程记录表 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author hjl |
| | | * @since 2024-07-09 |
| | | */ |
| | | @Mapper |
| | | public interface WithdrawRecordMapper extends BaseMapper<WithdrawRecord> { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.order.entity.WithdrawDetail; |
| | | import com.ruoyi.order.entity.WithdrawRecord; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户提现申请记录表 服务类 |
| | | * </p> |
| | | * |
| | | * @author hjl |
| | | * @since 2024-07-09 |
| | | */ |
| | | public interface WithdrawRecordService extends IService<WithdrawRecord> { |
| | | |
| | | /** |
| | | * 保存提现申请记录 |
| | | * |
| | | * @param withdrawId |
| | | * @param orderId |
| | | * @param userId |
| | | * @param withdrawType |
| | | * @param auditStatus |
| | | */ |
| | | void saveWithdrawRecord(String withdrawId, String orderId, Integer userId, Integer withdrawType, Integer auditStatus); |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.order.entity.WithdrawDetail; |
| | | import com.ruoyi.order.entity.WithdrawRecord; |
| | | import com.ruoyi.order.mapper.WithdrawDetailMapper; |
| | | import com.ruoyi.order.mapper.WithdrawRecordMapper; |
| | | import com.ruoyi.order.service.WithdrawDetailService; |
| | | import com.ruoyi.order.service.WithdrawRecordService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户提现申请记录表 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author hjl |
| | | * @since 2024-07-09 |
| | | */ |
| | | @Service |
| | | public class WithdrawRecordServiceImpl extends ServiceImpl<WithdrawRecordMapper, WithdrawRecord> implements WithdrawRecordService { |
| | | |
| | | |
| | | @Override |
| | | public void saveWithdrawRecord(String withdrawId, String orderId, Integer userId, Integer withdrawType, Integer auditStatus) { |
| | | WithdrawRecord withdrawRecord = new WithdrawRecord(); |
| | | withdrawRecord.setWithdrawId(withdrawId); |
| | | withdrawRecord.setOrderId(orderId); |
| | | withdrawRecord.setUserId(userId); |
| | | withdrawRecord.setWithdrawType(withdrawType); |
| | | withdrawRecord.setAuditStatus(auditStatus); |
| | | withdrawRecord.setCreateTime(new Date()); |
| | | this.save(withdrawRecord); |
| | | } |
| | | } |
| | |
| | | </select> |
| | | |
| | | <select id="queryPage" resultMap="BaseResultMap"> |
| | | select * |
| | | select |
| | | o.id, |
| | | o.city, |
| | | o.order_number, |
| | | o.site_id, |
| | | o.site_name, |
| | | o.serve_id, |
| | | o.serve_name, |
| | | o.serve_price, |
| | | o.user_id, |
| | | o.reservation_name, |
| | | o.reservation_phone, |
| | | o.reservation_address, |
| | | o.time, |
| | | o.server_id, |
| | | o.server_name, |
| | | o.server_phone, |
| | | o.reservation_remark, |
| | | o.order_money, |
| | | o.state, |
| | | o.createBy, |
| | | o.updateBy, |
| | | o.createTime, |
| | | o.updateTime, |
| | | o.is_delete, |
| | | o.accept_time, |
| | | o.type, |
| | | o.longitude, |
| | | o.latitude, |
| | | o.arrive_time, |
| | | o.complete_time |
| | | o.is_withdrawal, |
| | | o.subsidy, |
| | | o.address, |
| | | o.top_sort, |
| | | o.cancel_reason, |
| | | o.out_batch_no, |
| | | o.remark, |
| | | o.package_info, |
| | | o.msg_count, |
| | | o.province_code, |
| | | o.provice_code, |
| | | o.area_code, |
| | | o.print_count, |
| | | o.fake, |
| | | o.city_code, |
| | | o.is_reinvest, |
| | | o.is_evaluate |
| | | |
| | | from t_order o |
| | | <where> |
| | | o.is_delete = 0 |
| | |
| | | |
| | | |
| | | <select id="queryPage1" resultMap="BaseResultMap"> |
| | | select * |
| | | select |
| | | o.id, |
| | | o.city, |
| | | o.order_number, |
| | | o.site_id, |
| | | o.site_name, |
| | | o.serve_id, |
| | | o.serve_name, |
| | | o.serve_price, |
| | | o.user_id, |
| | | o.reservation_name, |
| | | o.reservation_phone, |
| | | o.reservation_address, |
| | | o.time, |
| | | o.server_id, |
| | | o.server_name, |
| | | o.server_phone, |
| | | o.reservation_remark, |
| | | o.order_money, |
| | | o.state, |
| | | o.createBy, |
| | | o.updateBy, |
| | | o.createTime, |
| | | o.updateTime, |
| | | o.is_delete, |
| | | o.accept_time, |
| | | o.type, |
| | | o.longitude, |
| | | o.latitude, |
| | | o.arrive_time, |
| | | o.complete_time |
| | | o.is_withdrawal, |
| | | o.subsidy, |
| | | o.address, |
| | | o.top_sort, |
| | | o.cancel_reason, |
| | | o.out_batch_no, |
| | | o.remark, |
| | | o.package_info, |
| | | o.msg_count, |
| | | o.province_code, |
| | | o.provice_code, |
| | | o.area_code, |
| | | o.print_count, |
| | | o.fake, |
| | | o.city_code, |
| | | o.is_reinvest, |
| | | o.is_evaluate |
| | | from t_order o |
| | | <where> |
| | | o.is_delete = 0 |
| | |
| | | </select> |
| | | |
| | | <select id="exportList" resultMap="BaseResultMap"> |
| | | select * |
| | | select |
| | | o.id, |
| | | o.city, |
| | | o.order_number, |
| | | o.site_id, |
| | | o.site_name, |
| | | o.serve_id, |
| | | o.serve_name, |
| | | o.serve_price, |
| | | o.user_id, |
| | | o.reservation_name, |
| | | o.reservation_phone, |
| | | o.reservation_address, |
| | | o.time, |
| | | o.server_id, |
| | | o.server_name, |
| | | o.server_phone, |
| | | o.reservation_remark, |
| | | o.order_money, |
| | | o.state, |
| | | o.createBy, |
| | | o.updateBy, |
| | | o.createTime, |
| | | o.updateTime, |
| | | o.is_delete, |
| | | o.accept_time, |
| | | o.type, |
| | | o.longitude, |
| | | o.latitude, |
| | | o.arrive_time, |
| | | o.complete_time |
| | | o.is_withdrawal, |
| | | o.subsidy, |
| | | o.address, |
| | | o.top_sort, |
| | | o.cancel_reason, |
| | | o.out_batch_no, |
| | | o.remark, |
| | | o.package_info, |
| | | o.msg_count, |
| | | o.province_code, |
| | | o.provice_code, |
| | | o.area_code, |
| | | o.print_count, |
| | | o.fake, |
| | | o.city_code, |
| | | o.is_reinvest, |
| | | o.is_evaluate |
| | | from t_order o |
| | | <where> |
| | | o.is_delete = 0 |
| | |
| | | </select> |
| | | |
| | | <select id="orderListWorker" resultMap="BaseResultMap"> |
| | | select o.* |
| | | select |
| | | o.id, |
| | | o.city, |
| | | o.order_number, |
| | | o.site_id, |
| | | o.site_name, |
| | | o.serve_id, |
| | | o.serve_name, |
| | | o.serve_price, |
| | | o.user_id, |
| | | o.reservation_name, |
| | | o.reservation_phone, |
| | | o.reservation_address, |
| | | o.time, |
| | | o.server_id, |
| | | o.server_name, |
| | | o.server_phone, |
| | | o.reservation_remark, |
| | | o.order_money, |
| | | o.state, |
| | | o.createBy, |
| | | o.updateBy, |
| | | o.createTime, |
| | | o.updateTime, |
| | | o.is_delete, |
| | | o.accept_time, |
| | | o.type, |
| | | o.longitude, |
| | | o.latitude, |
| | | o.arrive_time, |
| | | o.complete_time |
| | | o.is_withdrawal, |
| | | o.subsidy, |
| | | o.address, |
| | | o.top_sort, |
| | | o.cancel_reason, |
| | | o.out_batch_no, |
| | | o.remark, |
| | | o.package_info, |
| | | o.msg_count, |
| | | o.province_code, |
| | | o.provice_code, |
| | | o.area_code, |
| | | o.print_count, |
| | | o.fake, |
| | | o.city_code, |
| | | o.is_reinvest, |
| | | o.is_evaluate |
| | | from t_order o |
| | | <where> |
| | | o.is_delete = 0 |
| | |
| | | </select> |
| | | |
| | | <select id="withdrawPage1" resultMap="voMap"> |
| | | SELECT * |
| | | SELECT |
| | | w.id, |
| | | w.user_id, |
| | | w.user_no, |
| | | w.nick_name, |
| | | w.user_phone, |
| | | w.apply_for_time, |
| | | w.apply_for_money, |
| | | w.state, |
| | | w.opinion, |
| | | w.createBy, |
| | | w.updateBy, |
| | | w.createTime, |
| | | w.updateTime, |
| | | w.is_delete, |
| | | w.order_id |
| | | FROM t_withdraw w |
| | | left join t_order o on w.order_id = o.id |
| | | <where> |
| | |
| | | |
| | | |
| | | <select id="withdrawList1" resultMap="voMap"> |
| | | SELECT * |
| | | SELECT |
| | | w.id, |
| | | w.user_id, |
| | | w.user_no, |
| | | w.nick_name, |
| | | w.user_phone, |
| | | w.apply_for_time, |
| | | w.apply_for_money, |
| | | w.state, |
| | | w.opinion, |
| | | w.createBy, |
| | | w.updateBy, |
| | | w.createTime, |
| | | w.updateTime, |
| | | w.is_delete, |
| | | w.order_id |
| | | FROM t_withdraw w |
| | | left join t_order o on w.order_id = o.id |
| | | <where> |