Commit e066e685 by giaogiao

vip开通

parent c35bfbdd
......@@ -5,7 +5,6 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
......@@ -30,11 +29,11 @@ public class VipOpenParam implements Serializable {
@ApiModelProperty("开通多少年")
private Integer years;
@NotBlank(message = "会员等级id不能为空")
// @NotNull(message = "会员等级id不能为空")
@ApiModelProperty("会员等级id,传入由会员列表接口返回的id")
private Long vipLevelId;
@NotBlank(message = "不能为空")
// @NotBlank(message = "不能为空")
@ApiModelProperty("是否代替他人开通")
private Boolean isReplace;
......
package com.sien.common.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
......@@ -48,6 +47,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import java.math.BigDecimal;
import java.time.Duration;
import java.util.List;
import java.util.concurrent.TimeUnit;
......@@ -221,6 +221,12 @@ public class AppUserServiceImpl extends BaseServiceImpl<AppUserMapper, AppUser>
AppUserQueryVo appUserById = appUserMapper.getAppUserById(jwtToken.getUserId());
DonationRankAndTotal donationRankAndTotal = donationRecordService.getDonationRankAndTotal(jwtToken.getUserId());
if (donationRankAndTotal == null) {
donationRankAndTotal =new DonationRankAndTotal();
donationRankAndTotal.setDrTotal(new BigDecimal("0"));
donationRankAndTotal.setRank(9999L);
}
MyInfoVo myInfoVo = new MyInfoVo();
myInfoVo.setAppUserQueryVo(appUserById);
myInfoVo.setDonationRankAndTotal(donationRankAndTotal);
......
......@@ -168,6 +168,8 @@ public class VipRecordServiceImpl extends BaseServiceImpl<VipRecordMapper, VipRe
vipRecord.setYears(vipOpenParam.getYears());
vipRecord.setPayStatus(0);
vipRecord.setWxMerPayId(outTradeNo);
// // 判断是否为替他人
if (vipOpenParam.getIsReplace()) {
AppUser user = appUserService.getOne(new QueryWrapper<AppUser>().lambda()
......
......@@ -18,13 +18,13 @@ spring-boot-plus:
spring:
datasource:
url: jdbc:mysql://mysql57:3306/Jumeirah?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: 123
url: jdbc:mysql://127.0.0.1:3316/sien?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
username: sien
password: v39uBc6bQ8
# Redis配置
redis:
database: 0
host: redis6
password:
host: 127.0.0.1
password: gmk52Kw3e4SG2r9D
port: 6379
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2019-2029 geekidea(https://github.com/geekidea)
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<configuration>
......
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