2 文件已重命名
3个文件已添加
28个文件已修改
File was renamed from ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/domain/AuctionGoods.java |
| | |
| | | package com.ruoyi.auction.domain; |
| | | package com.ruoyi.system.api.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
File was renamed from ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/domain/AuctionSalesroom.java |
| | |
| | | package com.ruoyi.auction.domain; |
| | | package com.ruoyi.system.api.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @ApiModelProperty(value = "删除标志(0代表存在 1代表删除)") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | |
| | | |
| | | @ApiModelProperty(value = "支付方式 1=微信 2=支付宝") |
| | | private PaymentMethodEnum paymentMethod; |
| | | |
New file |
| | |
| | | package com.ruoyi.system.api.domain.dto; |
| | | |
| | | import com.ruoyi.common.core.enums.AuctionOrderTypeEnum; |
| | | import com.ruoyi.common.core.enums.PaymentMethodEnum; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class MemberAuctionSalesroomBondDTO { |
| | | @ApiModelProperty(value = "会员id") |
| | | private Long memberId; |
| | | |
| | | @ApiModelProperty(value = "拍卖会id") |
| | | private Long auctionSalesroomId; |
| | | |
| | | @ApiModelProperty(value = "保证金类型1=普通拍品 2=拍卖会拍品") |
| | | private Integer bondType; |
| | | |
| | | @ApiModelProperty(value = "拍卖商品id") |
| | | private Long auctionGoodsId; |
| | | |
| | | @ApiModelProperty(value = "支付方式 1=微信 2=支付宝") |
| | | private Integer paymentMethod; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "拍卖场编号") |
| | | private String salesroomNO; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.api.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PayInfoDTO { |
| | | |
| | | @ApiModelProperty(value = "会员id") |
| | | private Long memberId; |
| | | |
| | | @ApiModelProperty(value = "1 支付宝支付,2 微信支付") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "订单编号") |
| | | private String orderNO; |
| | | |
| | | @ApiModelProperty(value = "题目") |
| | | private String subject; |
| | | |
| | | @ApiModelProperty(value = "内容") |
| | | private String body; |
| | | |
| | | @ApiModelProperty(value = "微信支付的用户openid") |
| | | private String openId; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.api.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PayInfoVO { |
| | | |
| | | @ApiModelProperty(value = "会员id") |
| | | private Long memberId; |
| | | |
| | | @ApiModelProperty(value = "1 支付宝支付,2 微信支付") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "订单编号") |
| | | private String orderNO; |
| | | |
| | | @ApiModelProperty(value = "题目") |
| | | private String subject; |
| | | |
| | | @ApiModelProperty(value = "内容") |
| | | private String body; |
| | | } |
| | |
| | | package com.ruoyi.system.api.feignClient; |
| | | |
| | | import com.ruoyi.common.core.constant.SecurityConstants; |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.AuctionGoods; |
| | | import com.ruoyi.system.api.domain.AuctionSalesroom; |
| | | import com.ruoyi.system.api.domain.GoodsFlavorType; |
| | | import com.ruoyi.system.api.domain.OrderAuctionBond; |
| | | import com.ruoyi.system.api.factory.AuctionFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestHeader; |
| | | |
| | | @FeignClient(contextId = "auctionClient", value = ServiceNameConstants.RUOYI_AUCTION, fallbackFactory = AuctionFallbackFactory.class) |
| | | public interface AuctionClient { |
| | | @PostMapping("/forepart/auction-salesroom/getAuctionSalesroomOne") |
| | | R<AuctionSalesroom> getauctionSalesroomOne(@RequestBody Long auctionSalesroomId, |
| | | @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | |
| | | @PostMapping("/forepart/auction-goods/getAuctionGoodsOne") |
| | | R<AuctionGoods> getauctionGoodsOne(@RequestBody Long auctionGoodsId, |
| | | @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.Order; |
| | | import com.ruoyi.system.api.domain.OrderAuctionBond; |
| | | import com.ruoyi.system.api.domain.dto.MemberAuctionSalesroomDTO; |
| | | import com.ruoyi.system.api.domain.dto.OrderAuctionBondDTO; |
| | | import com.ruoyi.system.api.domain.dto.OrderDTO; |
| | | import com.ruoyi.system.api.domain.dto.RefundDTO; |
| | | import com.ruoyi.system.api.domain.dto.*; |
| | | import com.ruoyi.system.api.domain.vo.PayInfoVO; |
| | | import com.ruoyi.system.api.factory.OrderFallbackFactory; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | @PostMapping("/inner/pay/refund-batch") |
| | | R<Map<String, Object>> refund(@RequestBody List<RefundDTO> refundDTOS, |
| | | @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | |
| | | @PostMapping("/order-auction-bond/SaveOrderAuctionBond") |
| | | R<PayInfoVO> SaveOrderAuctionBond(@RequestBody MemberAuctionSalesroomBondDTO memberAuctionSalesroomBondDTO, |
| | | @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | } |
| | |
| | | package com.ruoyi.auction.controller.forepart; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.ruoyi.auction.service.IAuctionGoodsService; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.annotation.InnerAuth; |
| | | import com.ruoyi.system.api.domain.AuctionGoods; |
| | | import com.ruoyi.system.api.domain.AuctionSalesroom; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RequestMapping("/forepart/auction-goods") |
| | | public class ForepartAuctionGoodsController { |
| | | |
| | | @Resource |
| | | private IAuctionGoodsService iAuctionGoodsService; |
| | | |
| | | @InnerAuth |
| | | @PostMapping("/getAuctionGoodsOne") |
| | | @ResponseBody |
| | | public R<AuctionGoods> getAuctionGoodsOne(@RequestBody Long auctionSalesroomId) { |
| | | AuctionGoods auctionGoods=iAuctionGoodsService.getById(auctionSalesroomId); |
| | | return R.ok(auctionGoods); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import com.ruoyi.auction.controller.forepart.dto.AuctionSalesroomGoodsDTO; |
| | | import com.ruoyi.auction.controller.forepart.dto.ForepartAuctionBidRecordDTO; |
| | | import com.ruoyi.common.security.annotation.InnerAuth; |
| | | import com.ruoyi.system.api.domain.GoodsFlavorType; |
| | | import com.ruoyi.system.api.domain.dto.MemberAuctionSalesroomBondDTO; |
| | | import com.ruoyi.system.api.domain.dto.MemberAuctionSalesroomDTO; |
| | | import com.ruoyi.auction.controller.forepart.vo.ForepartAuctionSalesroomVO; |
| | | import com.ruoyi.auction.controller.forepart.vo.MemberAuctionSalesroomInfoVO; |
| | | import com.ruoyi.auction.controller.forepart.vo.MemberAuctionSalesroomVO; |
| | | import com.ruoyi.auction.domain.AuctionSalesroom; |
| | | import com.ruoyi.system.api.domain.AuctionSalesroom; |
| | | import com.ruoyi.auction.service.IAuctionSalesroomService; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.system.api.domain.AppMiniLoginVO; |
| | | import com.ruoyi.system.api.domain.dto.AppMiniLoginDTO; |
| | | import com.ruoyi.system.api.domain.vo.PayInfoVO; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import javax.annotation.Resource; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | @Resource |
| | | private IAuctionSalesroomService iAuctionSalesroomService; |
| | | |
| | | @InnerAuth |
| | | @PostMapping("/getAuctionSalesroomOne") |
| | | @ResponseBody |
| | | public R<AuctionSalesroom> getauctionSalesroomOne(@RequestBody Long auctionSalesroomId) { |
| | | AuctionSalesroom auctionSalesroomOne=iAuctionSalesroomService.getById(auctionSalesroomId); |
| | | return R.ok(auctionSalesroomOne); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 拍卖大屏获取拍卖信息 |
| | |
| | | @RequestMapping("/SaveSignUpNow") |
| | | @ResponseBody |
| | | @ApiOperation(value = "用户端拍卖立即报名") |
| | | public R<MemberAuctionSalesroomVO> SaveSignUpNow(@RequestBody MemberAuctionSalesroomDTO MemberAuctionSalesroomDTO) { |
| | | return R.ok(iAuctionSalesroomService.getMemberAuctionSalesroomSweep(MemberAuctionSalesroomDTO)); |
| | | public R<PayInfoVO> SaveSignUpNow(@RequestBody MemberAuctionSalesroomBondDTO memberAuctionSalesroomBondDTO) { |
| | | return R.ok( iAuctionSalesroomService.SaveSignUpNow(memberAuctionSalesroomBondDTO)); |
| | | } |
| | | |
| | | } |
| | |
| | | @RequestMapping("/auctionSalesroomStart") |
| | | @ResponseBody |
| | | @ApiOperation(value = "拍卖师端拍卖场立即开始") |
| | | public R<T> auctionSalesroomStart(@RequestBody AuctionSalesroomGoodsDTO ationSalesroomGoodsDTO) { |
| | | public R auctionSalesroomStart(@RequestBody AuctionSalesroomGoodsDTO ationSalesroomGoodsDTO) { |
| | | iAuctionSalesroomGoodsService.auctionSalesroomStart(ationSalesroomGoodsDTO); |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping("/auctionSalesroomEnd") |
| | | @ResponseBody |
| | | @ApiOperation(value = "拍卖师端拍卖场立即结束") |
| | | public R<T> auctionSalesroomEnd(@RequestBody AuctionSalesroomGoodsDTO ationSalesroomGoodsDTO) { |
| | | public R auctionSalesroomEnd(@RequestBody AuctionSalesroomGoodsDTO ationSalesroomGoodsDTO) { |
| | | iAuctionSalesroomGoodsService.auctionSalesroomEnd(ationSalesroomGoodsDTO); |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping("/auctionSalesroomGoodsStart") |
| | | @ResponseBody |
| | | @ApiOperation(value = "拍卖师端拍卖场下一个立即开始") |
| | | public R<T> auctionSalesroomGoodsStart(@RequestBody AuctionSalesroomGoodsDTO auctionSalesroomGoodsDTO) { |
| | | public R auctionSalesroomGoodsStart(@RequestBody AuctionSalesroomGoodsDTO auctionSalesroomGoodsDTO) { |
| | | iAuctionSalesroomGoodsService.auctionSalesroomGoodsStart(auctionSalesroomGoodsDTO); |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping("/auctionSalesroomGoodsEnd") |
| | | @ResponseBody |
| | | @ApiOperation(value = "拍卖师端拍卖场下一个立即结束") |
| | | public R<T> auctionSalesroomGoodsEnd(@RequestBody AuctionSalesroomGoodsDTO auctionSalesroomGoodsDTO) { |
| | | public R auctionSalesroomGoodsEnd(@RequestBody AuctionSalesroomGoodsDTO auctionSalesroomGoodsDTO) { |
| | | iAuctionSalesroomGoodsService.auctionSalesroomGoodsStart(auctionSalesroomGoodsDTO); |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping("/addVoid") |
| | | @ResponseBody |
| | | @ApiOperation(value = "拍卖师端添加拍卖会视频播放") |
| | | public R<T> addVoid(@RequestBody ForepartAuctionVideo orepartAuctionVideo) { |
| | | public R addVoid(@RequestBody ForepartAuctionVideo orepartAuctionVideo) { |
| | | iAuctionVideoService.addVoid(orepartAuctionVideo); |
| | | return R.ok(); |
| | | |
| | |
| | | package com.ruoyi.auction.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.auction.domain.AuctionGoods; |
| | | import com.ruoyi.system.api.domain.AuctionGoods; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.system.api.domain.dto.MemberAuctionSalesroomDTO; |
| | | import com.ruoyi.auction.domain.AuctionSalesroom; |
| | | import com.ruoyi.system.api.domain.AuctionSalesroom; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | import com.ruoyi.auction.controller.management.dto.AuctionGoodsDTO; |
| | | import com.ruoyi.auction.controller.management.dto.AuctionGoodsQuery; |
| | | import com.ruoyi.auction.controller.management.vo.AuctionGoodsVO; |
| | | import com.ruoyi.auction.domain.AuctionGoods; |
| | | import com.ruoyi.system.api.domain.AuctionGoods; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | |
| | | /** |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.auction.controller.forepart.dto.AuctionSalesroomGoodsDTO; |
| | | import com.ruoyi.auction.controller.forepart.dto.ForepartAuctionBidRecordDTO; |
| | | import com.ruoyi.system.api.domain.dto.MemberAuctionSalesroomBondDTO; |
| | | import com.ruoyi.system.api.domain.dto.MemberAuctionSalesroomDTO; |
| | | import com.ruoyi.auction.controller.forepart.vo.ForepartAuctionSalesroomVO; |
| | | import com.ruoyi.auction.controller.forepart.vo.MemberAuctionSalesroomInfoVO; |
| | | import com.ruoyi.auction.controller.forepart.vo.MemberAuctionSalesroomVO; |
| | | import com.ruoyi.auction.domain.AuctionSalesroom; |
| | | import com.ruoyi.system.api.domain.AuctionSalesroom; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.system.api.domain.AppMiniLoginVO; |
| | | import com.ruoyi.system.api.domain.dto.AppMiniLoginDTO; |
| | | import com.ruoyi.system.api.domain.vo.PayInfoVO; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | /** |
| | |
| | | MemberAuctionSalesroomInfoVO getMemberAuctionSalesroomInfo( MemberAuctionSalesroomDTO memberAuctionSalesroomDTO); |
| | | |
| | | MemberAuctionSalesroomVO getMemberAuctionSalesroomSweep( MemberAuctionSalesroomDTO MemberAuctionSalesroomDTO); |
| | | |
| | | PayInfoVO SaveSignUpNow(MemberAuctionSalesroomBondDTO memberAuctionSalesroomBondDTO); |
| | | } |
| | |
| | | import com.ruoyi.auction.controller.management.vo.AuctionBidRecordVO; |
| | | import com.ruoyi.auction.controller.management.vo.AuctionGoodsVO; |
| | | import com.ruoyi.auction.domain.AuctionBidRecord; |
| | | import com.ruoyi.auction.domain.AuctionGoods; |
| | | import com.ruoyi.system.api.domain.AuctionGoods; |
| | | import com.ruoyi.auction.mapper.AuctionGoodsMapper; |
| | | import com.ruoyi.auction.service.IAuctionBidRecordService; |
| | | import com.ruoyi.auction.service.IAuctionGoodsService; |
| | |
| | | import com.ruoyi.auction.controller.forepart.dto.OrderDTO; |
| | | import com.ruoyi.auction.controller.forepart.vo.*; |
| | | import com.ruoyi.auction.domain.AuctionBidRecord; |
| | | import com.ruoyi.auction.domain.AuctionSalesroom; |
| | | import com.ruoyi.system.api.domain.AuctionSalesroom; |
| | | import com.ruoyi.auction.domain.AuctionSalesroomGoods; |
| | | import com.ruoyi.auction.mapper.AuctionSalesroomGoodsMapper; |
| | | import com.ruoyi.auction.service.IAuctionBidRecordService; |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.auction.controller.forepart.dto.AuctionSalesroomGoodsDTO; |
| | | import com.ruoyi.auction.controller.forepart.dto.ForepartAuctionBidRecordDTO; |
| | | import com.ruoyi.system.api.domain.OrderAuctionBond; |
| | | import com.ruoyi.system.api.domain.*; |
| | | import com.ruoyi.system.api.domain.dto.MemberAuctionSalesroomBondDTO; |
| | | import com.ruoyi.system.api.domain.dto.MemberAuctionSalesroomDTO; |
| | | import com.ruoyi.auction.controller.forepart.vo.ForepartAuctionSalesroomGoodsVO; |
| | | import com.ruoyi.auction.controller.forepart.vo.ForepartAuctionSalesroomVO; |
| | |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.auction.util.HttpUtils; |
| | | import com.ruoyi.system.api.domain.AppMiniLoginVO; |
| | | import com.ruoyi.system.api.domain.GoodsSku; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import com.ruoyi.system.api.domain.dto.AppMiniLoginDTO; |
| | | import com.ruoyi.system.api.domain.vo.PayInfoVO; |
| | | import com.ruoyi.system.api.feignClient.GoodsSkuClient; |
| | | import com.ruoyi.system.api.feignClient.OrderClient; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | |
| | | return memberAuctionSalesroomVO; |
| | | } |
| | | |
| | | @Override |
| | | public PayInfoVO SaveSignUpNow(MemberAuctionSalesroomBondDTO memberAuctionSalesroomBondDTO) { |
| | | return orderClient.SaveOrderAuctionBond(memberAuctionSalesroomBondDTO,SecurityConstants.INNER).getData(); |
| | | } |
| | | |
| | | |
| | | public static String getAccessTokenByWX() throws Exception { |
| | | String host = ACCESS_TOKEN_HOST + "?appid=" + WX_APPID + "&secret=" + WX_SECRET + "&grant_type=client_credential"; |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.auction.mapper.AuctionSalesroomMapper"> |
| | | |
| | | <select id="pageMemberAuctionSalesroomList" resultType="com.ruoyi.auction.domain.AuctionSalesroom"> |
| | | <select id="pageMemberAuctionSalesroomList" resultType="com.ruoyi.system.api.domain.AuctionSalesroom"> |
| | | SELECT * FROM t_auction_salesroom ta |
| | | WHERE ta.del_flag = 0 |
| | | <if test="param.salesroomName!=null and param.salesroomName != ''"> |
| | |
| | | @RequestMapping("/updateMembeid") |
| | | @ResponseBody |
| | | @ApiOperation(value = "修改用户信息") |
| | | public R<T> updateMembeid(@RequestBody MemberDTO memberDTO) { |
| | | public R updateMembeid(@RequestBody MemberDTO memberDTO) { |
| | | iMemberService.updateMembeid(memberDTO); |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping("/authentificationMembe") |
| | | @ResponseBody |
| | | @ApiOperation(value = "用户认证") |
| | | public R<T> authentificationMembe(@RequestBody MemberDTO memberDTO) { |
| | | public R authentificationMembe(@RequestBody MemberDTO memberDTO) { |
| | | iMemberService.authentificationMembe(memberDTO); |
| | | return R.ok(); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.constant.SecurityConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.enums.AuctionOrderTypeEnum; |
| | | import com.ruoyi.common.core.enums.BondStatusEnum; |
| | | import com.ruoyi.common.core.enums.PaymentMethodEnum; |
| | | import com.ruoyi.common.security.annotation.InnerAuth; |
| | | import com.ruoyi.order.util.OrderUtil; |
| | | import com.ruoyi.system.api.domain.AuctionGoods; |
| | | import com.ruoyi.system.api.domain.AuctionSalesroom; |
| | | import com.ruoyi.system.api.domain.OrderAuctionBond; |
| | | import com.ruoyi.order.service.IOrderAuctionBondService; |
| | | import com.ruoyi.system.api.domain.dto.MemberAuctionSalesroomBondDTO; |
| | | import com.ruoyi.system.api.domain.dto.MemberAuctionSalesroomDTO; |
| | | import com.ruoyi.system.api.domain.dto.OrderAuctionBondDTO; |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.ruoyi.system.api.domain.vo.PayInfoVO; |
| | | import com.ruoyi.system.api.feignClient.AuctionClient; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | LambdaQueryWrapper<OrderAuctionBond> wrapper= Wrappers.lambdaQuery(); |
| | | wrapper.eq(OrderAuctionBond::getMemberId,memberAuctionSalesroomDTO.getMemberId()); |
| | | wrapper.eq(OrderAuctionBond::getAuctionSalesroomId,memberAuctionSalesroomDTO.getAuctionSalesroomId()); |
| | | wrapper.eq(OrderAuctionBond::getBoundStatus,2); |
| | | wrapper.eq(OrderAuctionBond::getDelFlag,0); |
| | | List<OrderAuctionBond> list = iOrderAuctionBondService.list(wrapper); |
| | | return R.ok(list); |
| | | |
| | | } |
| | | |
| | | @InnerAuth |
| | | @PostMapping("/SaveOrderAuctionBond") |
| | | @ResponseBody |
| | | public R<PayInfoVO> SaveOrderAuctionBond(@RequestBody MemberAuctionSalesroomBondDTO memberAuctionSalesroomBondDTO) { |
| | | return R.ok(iOrderAuctionBondService.SaveOrderAuctionBond(memberAuctionSalesroomBondDTO)); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.order.service.IPaylogService; |
| | | import com.ruoyi.order.service.impl.PaylogServiceImpl; |
| | | import com.ruoyi.order.util.DateUtil; |
| | | import com.ruoyi.order.util.SinataUtil; |
| | | import com.ruoyi.order.util.alipay.config.AlipayConfig; |
| | | import com.ruoyi.order.util.alipay.util.PayDemoActivity; |
| | | import com.ruoyi.order.util.tencent.common.Configure; |
| | | import com.ruoyi.order.util.tencent.common.Signature; |
| | | import com.ruoyi.order.util.tencent.common.XMLParser; |
| | | import com.ruoyi.order.util.tencent.protocol.AppPayReqData; |
| | | import com.ruoyi.order.util.tencent.protocol.UnifiedorderReqData; |
| | | import com.ruoyi.system.api.domain.dto.PayInfoDTO; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import java.util.Map; |
| | | import javax.annotation.Resource; |
| | |
| | | @ResponseBody |
| | | @RequestMapping("/getPayInfo") |
| | | @ApiOperation(value = "获取支付信息") |
| | | public R<Map<String, Object>> getPayInfo(Integer uid, Integer type, String subject, String body, String orderID, |
| | | HttpServletRequest request) { |
| | | public R<Map<String, Object>> getPayInfo(PayInfoDTO payInfoDTO, |
| | | HttpServletRequest request) { |
| | | try { |
| | | return paylogServiceImpl.getPayInfo(uid, type, subject, body, orderID,request); |
| | | return paylogServiceImpl.getPayInfo(Integer.valueOf(payInfoDTO.getMemberId().intValue()), payInfoDTO.getType(), payInfoDTO.getSubject(), payInfoDTO.getBody(), payInfoDTO.getOrderNO(), payInfoDTO.getOpenId(),request); |
| | | } catch (Exception e) { |
| | | return R.fail("获取异常"); |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.OrderAuctionBond; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.system.api.domain.dto.MemberAuctionSalesroomBondDTO; |
| | | import com.ruoyi.system.api.domain.dto.OrderAuctionBondDTO; |
| | | import com.ruoyi.system.api.domain.vo.PayInfoVO; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface IOrderAuctionBondService extends IService<OrderAuctionBond> { |
| | | R<T> getOrderAuctionBond(OrderAuctionBondDTO orderAuctionBondDTO); |
| | | PayInfoVO SaveOrderAuctionBond(@RequestBody MemberAuctionSalesroomBondDTO memberAuctionSalesroomBondDTO); |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | public interface IPaylogService extends IService<Paylog> { |
| | | |
| | | R<Map<String, Object>> getPayInfo(Integer uid, Integer type, String subject, String body, String orderID, |
| | | R<Map<String, Object>> getPayInfo(Integer uid, Integer type, String subject, String body, String orderID,String openId, |
| | | HttpServletRequest request); |
| | | |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.constant.SecurityConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.enums.AuctionOrderTypeEnum; |
| | | import com.ruoyi.common.core.enums.BondStatusEnum; |
| | | import com.ruoyi.common.core.enums.PaymentMethodEnum; |
| | | import com.ruoyi.order.util.OrderUtil; |
| | | import com.ruoyi.system.api.domain.AuctionGoods; |
| | | import com.ruoyi.system.api.domain.AuctionSalesroom; |
| | | import com.ruoyi.system.api.domain.OrderAuctionBond; |
| | | import com.ruoyi.order.domain.pojo.Paylog; |
| | | import com.ruoyi.order.mapper.OrderAuctionBondMapper; |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.order.service.IPaylogService; |
| | | import com.ruoyi.order.util.SinataUtil; |
| | | import com.ruoyi.system.api.domain.dto.MemberAuctionSalesroomBondDTO; |
| | | import com.ruoyi.system.api.domain.dto.OrderAuctionBondDTO; |
| | | import com.ruoyi.system.api.domain.vo.PayInfoVO; |
| | | import com.ruoyi.system.api.feignClient.AuctionClient; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private PaylogServiceImpl paylogServiceImpl; |
| | | |
| | | |
| | | @Resource |
| | | private AuctionClient auctionClient; |
| | | |
| | | |
| | | @Override |
| | | public R<T> getOrderAuctionBond(OrderAuctionBondDTO orderAuctionBondDTO) { |
| | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public PayInfoVO SaveOrderAuctionBond(MemberAuctionSalesroomBondDTO memberAuctionSalesroomBondDTO) { |
| | | PayInfoVO payInfoVO = new PayInfoVO(); |
| | | if (memberAuctionSalesroomBondDTO.getBondType() == 2) { |
| | | AuctionSalesroom data = auctionClient.getauctionSalesroomOne(memberAuctionSalesroomBondDTO.getAuctionSalesroomId(), SecurityConstants.INNER).getData(); |
| | | if (data.getBound().intValue() == 0) { |
| | | OrderAuctionBond orderAuctionBond = new OrderAuctionBond(); |
| | | orderAuctionBond.setOrderNo(OrderUtil.getOrderNoForPrefix("BO")); |
| | | orderAuctionBond.setAuctionSalesroomId(memberAuctionSalesroomBondDTO.getAuctionSalesroomId()); |
| | | orderAuctionBond.setMemberId(memberAuctionSalesroomBondDTO.getMemberId()); |
| | | orderAuctionBond.setBond(data.getBound()); |
| | | orderAuctionBond.setBoundStatus(BondStatusEnum.PAID); |
| | | orderAuctionBond.setBondType(AuctionOrderTypeEnum.AUCTION_ITEMS); |
| | | iOrderAuctionBondService.save(orderAuctionBond); |
| | | payInfoVO.setOrderNO(orderAuctionBond.getOrderNo()); |
| | | payInfoVO.setType(0); |
| | | payInfoVO.setSubject("保证金"); |
| | | payInfoVO.setMemberId(memberAuctionSalesroomBondDTO.getMemberId()); |
| | | payInfoVO.setBody("保证金"); |
| | | } else { |
| | | OrderAuctionBond orderAuctionBond = new OrderAuctionBond(); |
| | | orderAuctionBond.setOrderNo(OrderUtil.getOrderNoForPrefix("BO")); |
| | | orderAuctionBond.setAuctionSalesroomId(memberAuctionSalesroomBondDTO.getAuctionSalesroomId()); |
| | | orderAuctionBond.setMemberId(memberAuctionSalesroomBondDTO.getMemberId()); |
| | | orderAuctionBond.setBond(data.getBound()); |
| | | orderAuctionBond.setBoundStatus(BondStatusEnum.TO_PLAY); |
| | | orderAuctionBond.setBondType(AuctionOrderTypeEnum.AUCTION_ITEMS); |
| | | if (memberAuctionSalesroomBondDTO.getPaymentMethod() == 1) { |
| | | orderAuctionBond.setPaymentMethod(PaymentMethodEnum.WECHAT); |
| | | } else { |
| | | orderAuctionBond.setPaymentMethod(PaymentMethodEnum.ALIPAY); |
| | | } |
| | | |
| | | iOrderAuctionBondService.save(orderAuctionBond); |
| | | |
| | | payInfoVO.setOrderNO(orderAuctionBond.getOrderNo()); |
| | | if (memberAuctionSalesroomBondDTO.getPaymentMethod() == 1) { |
| | | payInfoVO.setType(2); |
| | | } else { |
| | | payInfoVO.setType(1); |
| | | } |
| | | payInfoVO.setSubject("保证金"); |
| | | payInfoVO.setMemberId(memberAuctionSalesroomBondDTO.getMemberId()); |
| | | payInfoVO.setBody("保证金"); |
| | | } |
| | | } else { |
| | | AuctionGoods data = auctionClient.getauctionGoodsOne(memberAuctionSalesroomBondDTO.getAuctionGoodsId(), SecurityConstants.INNER).getData(); |
| | | if (data.getBond().intValue() == 0) { |
| | | OrderAuctionBond orderAuctionBond = new OrderAuctionBond(); |
| | | orderAuctionBond.setOrderNo(OrderUtil.getOrderNoForPrefix("BO")); |
| | | orderAuctionBond.setAuctionSalesroomId(memberAuctionSalesroomBondDTO.getAuctionSalesroomId()); |
| | | orderAuctionBond.setMemberId(memberAuctionSalesroomBondDTO.getMemberId()); |
| | | orderAuctionBond.setBond(data.getBond()); |
| | | orderAuctionBond.setBoundStatus(BondStatusEnum.PAID); |
| | | orderAuctionBond.setBondType(AuctionOrderTypeEnum.AUCTION_ITEMS); |
| | | iOrderAuctionBondService.save(orderAuctionBond); |
| | | payInfoVO.setOrderNO(orderAuctionBond.getOrderNo()); |
| | | payInfoVO.setType(0); |
| | | payInfoVO.setSubject("保证金"); |
| | | payInfoVO.setMemberId(memberAuctionSalesroomBondDTO.getMemberId()); |
| | | payInfoVO.setBody("保证金"); |
| | | } else { |
| | | OrderAuctionBond orderAuctionBond = new OrderAuctionBond(); |
| | | orderAuctionBond.setOrderNo(OrderUtil.getOrderNoForPrefix("BO")); |
| | | orderAuctionBond.setAuctionSalesroomId(memberAuctionSalesroomBondDTO.getAuctionSalesroomId()); |
| | | orderAuctionBond.setMemberId(memberAuctionSalesroomBondDTO.getMemberId()); |
| | | orderAuctionBond.setBond(data.getBond()); |
| | | orderAuctionBond.setBoundStatus(BondStatusEnum.TO_PLAY); |
| | | orderAuctionBond.setBondType(AuctionOrderTypeEnum.AUCTION_ITEMS); |
| | | if (memberAuctionSalesroomBondDTO.getPaymentMethod() == 1) { |
| | | orderAuctionBond.setPaymentMethod(PaymentMethodEnum.WECHAT); |
| | | } else { |
| | | orderAuctionBond.setPaymentMethod(PaymentMethodEnum.ALIPAY); |
| | | } |
| | | iOrderAuctionBondService.save(orderAuctionBond); |
| | | payInfoVO.setOrderNO(orderAuctionBond.getOrderNo()); |
| | | if (memberAuctionSalesroomBondDTO.getPaymentMethod() == 1) { |
| | | payInfoVO.setType(2); |
| | | } else { |
| | | payInfoVO.setType(1); |
| | | } |
| | | payInfoVO.setSubject("保证金"); |
| | | payInfoVO.setMemberId(memberAuctionSalesroomBondDTO.getMemberId()); |
| | | payInfoVO.setBody("保证金"); |
| | | } |
| | | } |
| | | return payInfoVO; |
| | | } |
| | | } |
| | |
| | | private IPaylogService iPaylogService; |
| | | |
| | | @Override |
| | | public R<Map<String, Object>> getPayInfo(Integer uid, Integer type, String subject, String body, String orderID, |
| | | HttpServletRequest request) { |
| | | public R<Map<String, Object>> getPayInfo(Integer uid, Integer type, String subject, String body, String orderNO,String openId, HttpServletRequest request) { |
| | | Double price = 0.0; |
| | | |
| | | try { |
| | | if(judgeContainsStr(orderID)){ |
| | | if(judgeContainsStr(orderNO)){ |
| | | price= Double.valueOf(1); |
| | | body = "商品支付"; |
| | | subject = "商品支付"; |
| | | body = body; |
| | | subject = subject; |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | if (type == 1) { |
| | | // 支付宝预下单 |
| | | return paylogServiceImpl.alipay("1", subject, body, price, request); |
| | | return paylogServiceImpl.alipay(orderNO, subject, body, price, request); |
| | | } else { |
| | | // 微信预下单 |
| | | return paylogServiceImpl.wxpay(1, "1", body, price, request); |
| | | return paylogServiceImpl.wxpay(2, orderNO, body,openId, price, request); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | * @param request |
| | | * @return |
| | | */ |
| | | public static R<Map<String, Object>> wxpay(Integer apptype, String outTradeNo, String body, Double price, |
| | | public static R<Map<String, Object>> wxpay(Integer apptype, String outTradeNo, String body,String openId, Double price, |
| | | HttpServletRequest request) { |
| | | // 获取预支付接口返回参数 |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | Map<String, Object> appPayMap = new HashMap<String, Object>(); |
| | | try { |
| | | // 构建接口请求参数 |
| | | UnifiedorderReqData unifiedorderReqData = new UnifiedorderReqData(apptype, outTradeNo, body, price, |
| | | Configure.wx_notify_url); |
| | | UnifiedorderReqData unifiedorderReqData = new UnifiedorderReqData(outTradeNo, body, price, Configure.wx_notify_url, |
| | | "JSAPI", openId); |
| | | // 请求接口获取返回接口 |
| | | String result = requestUnifiedorderService(apptype, unifiedorderReqData); |
| | | String result = requestUnifiedorderService(2, unifiedorderReqData); |
| | | System.out.println(result); |
| | | System.out.println("WxpayController.createOrder__result:\n" + result); |
| | | // 获取预支付接口返回参数 |
| | |
| | | (String) map.get("prepay_id"), unifiedorderReqData.getNonce_str()); |
| | | |
| | | // 对获取预支付返回接口参数进行封装(生成支付订单接口数据) |
| | | appPayMap.put("appid", appPay.getAppid());// 公众账号ID |
| | | appPayMap.put("appid", appPay.getAppid());// 小程序ID |
| | | appPayMap.put("nonceStr", appPay.getNoncestr());// 随机字符串(32位) |
| | | appPayMap.put("package", appPay.get_package());// 扩展字段(暂填写固定值Sign=WXPay) |
| | | appPayMap.put("partnerId", appPay.getPartnerid());// 商户号 |
| | |
| | | //HTTPS证书的本地路径 |
| | | private static String certLocalPath; |
| | | static{//从服务器相对路径中获取 |
| | | certLocalPath = Configure.class.getClassLoader().getResource("").getPath() + "com/tencent/common/cert/apiclient_cert.p12"; |
| | | certLocalPath = Configure.class.getClassLoader().getResource("").getPath() + "com/ruoyi/order/util/tencent/common/cert/apiclient_cert.p12"; |
| | | } |
| | | |
| | | //HTTPS证书密码,默认密码等于商户号MCHID |
| | |
| | | //HTTPS证书的本地路径 |
| | | private static String certLocalPath_2; |
| | | static{//从服务器相对路径中获取 |
| | | certLocalPath_2 = Configure.class.getClassLoader().getResource("").getPath() + "com/tencent/common/cert_2/apiclient_cert.p12"; |
| | | certLocalPath_2 = Configure.class.getClassLoader().getResource("").getPath() + "com/ruoyi/order/util/tencent/common/cert_2/apiclient_cert.p12"; |
| | | } |
| | | |
| | | //HTTPS证书密码,默认密码等于商户号MCHID |
| | |
| | | * @param notify_url 通知地址 |
| | | * @throws IllegalAccessException |
| | | */ |
| | | public UnifiedorderReqData(String out_trade_no, String body, Double total_fee, String notify_url,String trade_type,String openid) throws IllegalAccessException{ |
| | | /* public UnifiedorderReqData(String out_trade_no, String body, Double total_fee, String notify_url,String trade_type,String openid) throws IllegalAccessException{ |
| | | |
| | | //appID与商户号 |
| | | this.appid = Configure.getGappid(); |
| | |
| | | |
| | | // setNotify_url(notify_url);// 通知地址 |
| | | this.notify_url = notify_url; |
| | | /*trade_type 交易类型JSAPI--公众号支付、NATIVE--原生扫码支付、APP--app支付,统一下单接口trade_type的传参可参考这里 |
| | | MICROPAY--刷卡支付,刷卡支付有单独的支付接口,不调用统一下单接口*/ |
| | | *//*trade_type 交易类型JSAPI--公众号支付、NATIVE--原生扫码支付、APP--app支付,统一下单接口trade_type的传参可参考这里 |
| | | MICROPAY--刷卡支付,刷卡支付有单独的支付接口,不调用统一下单接口*//* |
| | | |
| | | this.trade_type = trade_type; |
| | | this.openid = openid; |
| | |
| | | this.sign = Signature.getSign(1,toMap()); |
| | | |
| | | } |
| | | |
| | | */ |
| | | /** |
| | | * 预支付请求需要的参数(获取微信统一下单-必填参数)(小程序) |
| | | * 公众账号ID appid (内置) |
| | |
| | | * @param notify_url 通知地址 |
| | | * @throws IllegalAccessException |
| | | */ |
| | | public UnifiedorderReqData(String out_trade_no, Double total_fee, String notify_url,String trade_type,String openid) throws IllegalAccessException{ |
| | | public UnifiedorderReqData(String out_trade_no, String body, Double total_fee, String notify_url,String trade_type,String openid) throws IllegalAccessException{ |
| | | |
| | | //appID与商户号 |
| | | this.appid = Configure.getXappid(); |
| | |
| | | |
| | | |
| | | // setBody(body);// 商品描述 |
| | | this.body = "小程序支付"; |
| | | this.body = body; |
| | | |
| | | // setOut_trade_no(out_trade_no);// 商户订单号 |
| | | this.out_trade_no = out_trade_no; |
| | |
| | | |
| | | public BaseService(Integer apptype,String api) throws ClassNotFoundException, IllegalAccessException, InstantiationException { |
| | | apiURL = api; |
| | | |
| | | if (apptype.equals(2)) {//微信小程序和公众号的 |
| | | Class<?> c = Class.forName(Configure.HttpsRequestClassName_2); |
| | | serviceRequest = (IServiceRequest) c.newInstance(); |
| | |
| | | private static WXPayConfigImpl INSTANCE; |
| | | |
| | | private WXPayConfigImpl() throws Exception{ |
| | | String certPath = WXPayConfigImpl.class.getClassLoader().getResource("").getPath() + "com/tencent/common/cert/apiclient_cert.p12"; |
| | | String certPath = WXPayConfigImpl.class.getClassLoader().getResource("").getPath() + "com/ruoyi/order/util/tencent/common/cert/apiclient_cert.p12"; |
| | | File file = new File(certPath); |
| | | InputStream certStream = new FileInputStream(file); |
| | | this.certData = new byte[(int) file.length()]; |
| | |
| | | # 微信支付分配的商户号ID(微信支付商户号) |
| | | mchID = 1600685974 |
| | | |
| | | # 公众号的商户号 |
| | | GmchID = 1600685974 |
| | | # 小程序的商户号 |
| | | XmchID = 1600685974 |
| | | |
| | | # 应用对应的密钥(商户平台开发设置) |
| | | key = E10ADC3949BA59ABBE56E057F20F883E |
| | |
| | | # 微信回调地址 |
| | | wx_notify_url = http://116.63.172.131:8088/api/pay/wxpay/notify |
| | | |
| | | # 没有公众号支付所以没有后面的参数配置 |
| | | # 公众号对应的密钥(商户平台开发设置) |
| | | key_2 = ZTlyynxl24490918687091970bianhao |
| | | |
| | | # 公众号的APPID |
| | | GappID = wx742b6a65ca132418 |
| | | #公众号的appSecret |
| | | appSecret = 1baf1d22f695f3a9aa9f59934bcc94fe |
| | | # 小程序的APPID |
| | | XappID = wx742b6a65ca132418 |
| | | |
| | | |