Commit c06c3ea5 authored by tangtuo's avatar tangtuo

debug

parent 1d97e6ad
......@@ -37,8 +37,8 @@ public class BannerController {
@PostMapping("/create")
@ApiOperation("新建banner")
public ResponseModel<Boolean> create(MultipartFile posterFile, String name, String jumpUrl, Integer sort) throws IOException {
if (posterFile == null || StringUtils.isAnyBlank(name, jumpUrl) || sort == null) {
public ResponseModel<Boolean> create(@RequestPart MultipartFile posterFile, @RequestParam String name, @RequestParam String jumpUrl, @RequestParam Integer sort) throws IOException {
if (posterFile == null || StringUtils.isBlank(name) || sort == null) {
throw GlobalException.newException(ResultCode.VALIDATE_FAILED);
}
String url = obsUtil.putObject(posterFile);
......
......@@ -95,7 +95,8 @@ public class CopyrightApply {
@ApiModelProperty(value = "版权申请后台核验通过时间")
private Date passTime;
@ApiModelProperty(value = "登记状态 0-待审核 1-登记成功 2-审核失败")
// 参考枚举类-com.fzm.common.enums.CopyrightApplyState
@ApiModelProperty(value = "登记状态 -2:待支付 -1:已撤回 0:待核验 2:提交审核 3:已驳回 4:审核成功 5:驳回 6:待审核 7:待终审")
private Integer registerState;
@ApiModelProperty(value = "存证哈希")
......
......@@ -63,7 +63,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
queryWrapper.eq("pay_scene", payScene)
.eq("product_id", productId)
.eq("order_status", orderStatus);
return this.getOne(queryWrapper);
return this.getOne(queryWrapper, false);
}
@Override
......@@ -178,4 +178,5 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
queryWrapper.le("create_date", instant);
return this.list(queryWrapper);
}
}
......@@ -244,7 +244,7 @@ public class WxPayServiceImpl implements WxPayService {
@Override
public Boolean refund(Long orderId, Integer channel) throws IOException, InterruptedException {
Boolean result;
boolean result;
RLock lock = redisson.getLock("refund-" + orderId);
if (!lock.tryLock(10, TimeUnit.SECONDS)) {
throw GlobalException.newException(ResultCode.REFUND_FAILED, "当前订单正在退款中,请勿重复点击");
......@@ -254,6 +254,12 @@ public class WxPayServiceImpl implements WxPayService {
if (order == null || !order.getOrderStatus().equals(OrderStatus.PAYED.getStatus())) {
throw GlobalException.newException(ResultCode.REFUND_FAILED, "当前订单未支付成功");
}
// 订单金额=0的时候,直接返回
if (order.getFee() <= 0) {
// 修改订单状态为退款成功
orderService.updateOrderStatus(orderId, OrderStatus.REFUNDED);
return true;
}
Refund refund = refundService.getByOrderId(orderId);
Long out_refund_no;
if (refund == null) {
......
......@@ -28,7 +28,7 @@
FROM tb_copyright_apply c
INNER JOIN tb_user u ON c.user_id = u.id
<where>
c.register_state != -1
c.register_state not in(-1,-2)
<if test="telephone!= null and telephone != ''">
and u.telephone = #{telephone}
</if>
......
......@@ -20,7 +20,6 @@
LEFT JOIN tb_user d ON a.to_address = d.wallet
LEFT JOIN tb_category e ON b.category_id = e.id
<where>
1=1
<if test="nftHash != null and nftHash != ''">
and a.nft_hash = #{nftHash}
</if>
......@@ -37,6 +36,7 @@
and a.create_date &lt;= #{end}
</if>
</where>
order by a.create_date desc
</select>
<select id="list" resultType="com.fzm.common.entity.vo.NftTransferDetailVo">
SELECT a.id,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment