Commit 46661c89 authored by jiaorz's avatar jiaorz

Merge remote-tracking branch 'origin/base-modify' into base-modify

parents e803dac5 d713dd25
...@@ -3,6 +3,8 @@ package com.github.wxiaoqi.security.admin.dto; ...@@ -3,6 +3,8 @@ package com.github.wxiaoqi.security.admin.dto;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.persistence.Column;
/** /**
* 用户会员 * 用户会员
...@@ -57,7 +59,12 @@ public class UserMemberDTO { ...@@ -57,7 +59,12 @@ public class UserMemberDTO {
@ApiModelProperty(value = "购买次数") @ApiModelProperty(value = "购买次数")
private Integer buyCount; private Integer buyCount;
/**
* 有效期;0代表永久
*/
@Column(name = "valid_time")
@ApiModelProperty(value = "有效期;0代表永久")
private Long validTime;
} }
...@@ -40,4 +40,7 @@ public class WalletCathListDTO { ...@@ -40,4 +40,7 @@ public class WalletCathListDTO {
@ApiModelProperty(value = "审核日期") @ApiModelProperty(value = "审核日期")
private Long finishTime; private Long finishTime;
@ApiModelProperty("单号")
private String cono;
} }
...@@ -29,6 +29,9 @@ public class WalletCathSumDto { ...@@ -29,6 +29,9 @@ public class WalletCathSumDto {
//钱包id //钱包id
private Integer walletId; private Integer walletId;
//钱包版本
private Integer version;
......
...@@ -133,6 +133,8 @@ public class BaseUserMember implements Serializable { ...@@ -133,6 +133,8 @@ public class BaseUserMember implements Serializable {
@ApiModelProperty(value = "是否删除;0-正常;1-删除") @ApiModelProperty(value = "是否删除;0-正常;1-删除")
private Integer isDel; private Integer isDel;
@Column(name = "recent_recharge") @Column(name = "recent_recharge")
private Long recentRecharge; private Long recentRecharge;
......
...@@ -2,15 +2,15 @@ package com.github.wxiaoqi.security.admin.entity; ...@@ -2,15 +2,15 @@ package com.github.wxiaoqi.security.admin.entity;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*; import javax.persistence.*;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
/** /**
* 钱包提现表 * 钱包提现表
* *
* @author zjw * @author zjw
* @email 18178966185@163.com * @email 18178966185@163.com
* @date 2019-07-11 14:14:54 * @date 2019-07-11 14:14:54
...@@ -18,102 +18,109 @@ import lombok.Data; ...@@ -18,102 +18,109 @@ import lombok.Data;
@Data @Data
@Table(name = "my_wallet_cath") @Table(name = "my_wallet_cath")
public class MyWalletCath implements Serializable { public class MyWalletCath implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键ID * 主键ID
*/ */
@Id @Id
@GeneratedValue(generator = "JDBC") @GeneratedValue(generator = "JDBC")
@ApiModelProperty("主键ID") @ApiModelProperty("主键ID")
private Long id; private Long id;
/** /**
* 用户iD * 用户iD
*/ */
@Column(name = "user_id") @Column(name = "user_id")
@ApiModelProperty(value = "用户iD") @ApiModelProperty(value = "用户iD")
private Integer userId; private Integer userId;
/** /**
* 提现类别,第三方提现类别(0-微信,1-支付宝,2-银行卡) * 提现类别,第三方提现类别(0-微信,1-支付宝,2-银行卡)
*/ */
@Column(name = "cath_type") @Column(name = "cath_type")
@ApiModelProperty(value = "提现类别,第三方提现类别(0-微信,1-支付宝,2-银行卡)") @ApiModelProperty(value = "提现类别,第三方提现类别(0-微信,1-支付宝,2-银行卡)")
private Integer cathType; private Integer cathType;
/**
* 商户订单号
*/
@Column(name = "account_number") @Column(name = "account_number")
@ApiModelProperty(value = "用户账号") @ApiModelProperty(value = "用户账号")
private String accountNumber; private String accountNumber;
/** /**
* 第三方订单号:如微信,支付宝,银行卡等 * 第三方订单号:如微信,支付宝,银行卡等
*/ */
@Column(name = "cono") @Column(name = "cono")
@ApiModelProperty(value = "第三方订单号:如微信,支付宝,银行卡等") @ApiModelProperty(value = "第三方订单号:如微信,支付宝,银行卡等")
private String cono; private String cono;
/** /**
* 提现金额 * 提现金额
*/ */
@Column(name = "balance") @Column(name = "balance")
@ApiModelProperty(value = "当前钱包余额") @ApiModelProperty(value = "当前钱包余额")
private BigDecimal balance; private BigDecimal balance;
/** /**
* 提现金额 * 提现金额
*/ */
@Column(name = "amount") @Column(name = "amount")
@ApiModelProperty(value = "提现金额") @ApiModelProperty(value = "提现金额")
private BigDecimal amount; private BigDecimal amount;
/** /**
* 到账金额 * 到账金额
*/ */
@Column(name = "real_amount") @Column(name = "real_amount")
@ApiModelProperty(value = "到账金额") @ApiModelProperty(value = "到账金额")
private BigDecimal realAmount; private BigDecimal realAmount;
/** /**
* 手续费 * 手续费
*/ */
@Column(name = "commission") @Column(name = "commission")
@ApiModelProperty(value = "手续费") @ApiModelProperty(value = "手续费")
private BigDecimal commission; private BigDecimal commission;
/** /**
* 订单状态:0-未提现,待审核,1-已审核 * 订单状态:0-未提现,待审核,1-已审核
*/ */
@Column(name = "stauts") @Column(name = "stauts")
@ApiModelProperty(value = "订单状态:0-未提现,待审核,1-已审核") @ApiModelProperty(value = "订单状态:0-未提现,待审核,1-已审核")
private Integer stauts; private Integer stauts;
/**
* 提现日期 /**
* 失败原因
*/
@Column(name = "reason")
@ApiModelProperty(value = "失败原因")
private String reason;
/**
* 提现日期
*/ */
@Column(name = "crt_time") @Column(name = "crt_time")
@ApiModelProperty(value = "提现日期", hidden = true ) @ApiModelProperty(value = "提现日期", hidden = true)
private Long crtTime; private Long crtTime;
/** /**
* 审核日期 * 审核日期
*/ */
@Column(name = "finish_time") @Column(name = "finish_time")
@ApiModelProperty(value = "审核日期") @ApiModelProperty(value = "审核日期")
private Long finishTime; private Long finishTime;
/** /**
* 操作者ID * 操作者ID
*/ */
@Column(name = "upd_user") @Column(name = "upd_user")
@ApiModelProperty(value = "操作者ID") @ApiModelProperty(value = "操作者ID")
private String updUser; private String updUser;
} }
...@@ -37,4 +37,7 @@ public class WalletCathAdminVo { ...@@ -37,4 +37,7 @@ public class WalletCathAdminVo {
@ApiModelProperty(value = "审核日期") @ApiModelProperty(value = "审核日期")
private Long finishTime; private Long finishTime;
@ApiModelProperty("单号")
private String cono;
} }
...@@ -29,4 +29,10 @@ public class WalletCathDetailVo { ...@@ -29,4 +29,10 @@ public class WalletCathDetailVo {
*/ */
@ApiModelProperty(value = "审核日期") @ApiModelProperty(value = "审核日期")
private Long finishTime; private Long finishTime;
@ApiModelProperty(value = "帐号")
private String accountNumber;
@ApiModelProperty("审核失败原因")
private String reason;
} }
...@@ -236,6 +236,12 @@ ...@@ -236,6 +236,12 @@
<version>2.0-SNAPSHOT</version> <version>2.0-SNAPSHOT</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>com.xxfc.platform</groupId>
<artifactId>xx-app-api</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
<finalName>ace-admin</finalName> <finalName>ace-admin</finalName>
......
...@@ -140,7 +140,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> { ...@@ -140,7 +140,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
return ObjectRestResponse.succ(flag); return ObjectRestResponse.succ(flag);
} }
//设置密码type 1-设置密码;2-设置密码 //设置密码type 1-设置密码;2-修改密码
public ObjectRestResponse setPwd(Integer userId,String phone,String mobilecod,String password,Integer type){ public ObjectRestResponse setPwd(Integer userId,String phone,String mobilecod,String password,Integer type){
if (StringUtils.isBlank(phone)||StringUtils.isBlank(mobilecod)||StringUtils.isBlank(password)){ if (StringUtils.isBlank(phone)||StringUtils.isBlank(mobilecod)||StringUtils.isBlank(password)){
return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE, "参数为空"); return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE, "参数为空");
...@@ -156,7 +156,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> { ...@@ -156,7 +156,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
if (myWallet==null){ if (myWallet==null){
return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE, "钱包不存在"); return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE, "钱包不存在");
} }
if(type==1||StringUtils.isNotBlank(myWallet.getPayPassword())){ if(type==1&&StringUtils.isNotBlank(myWallet.getPayPassword())){
return ObjectRestResponse.createFailedResult(ResultCode.EXIST_CODE, "密码已存在"); return ObjectRestResponse.createFailedResult(ResultCode.EXIST_CODE, "密码已存在");
} }
password=new BCryptPasswordEncoder(UserConstant.PW_ENCORDER_SALT).encode(password); password=new BCryptPasswordEncoder(UserConstant.PW_ENCORDER_SALT).encode(password);
...@@ -189,13 +189,13 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> { ...@@ -189,13 +189,13 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
myWallet.setUserId(userId); myWallet.setUserId(userId);
myWallet = selectOne(myWallet); myWallet = selectOne(myWallet);
if (myWallet==null){ if (myWallet==null){
return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE, "钱包不存在"); return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "钱包不存在");
} }
if (amount.compareTo(myWallet.getBalance())>0){ if (amount.compareTo(myWallet.getBalance())>0){
return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE, "提现金额不能大于钱包金额"); return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "提现金额不能大于钱包金额");
} }
if (StringUtils.isNotBlank(password)&&!encoder.matches(password,myWallet.getPayPassword())){ if (StringUtils.isNotBlank(password)&&!encoder.matches(password,myWallet.getPayPassword())){
return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE, "支付密码错误"); return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "支付密码错误");
} }
WithDrawRuleVo ruleVo=configFeign.getWithDrawRule(); WithDrawRuleVo ruleVo=configFeign.getWithDrawRule();
BigDecimal proceduReates=BigDecimal.ZERO; BigDecimal proceduReates=BigDecimal.ZERO;
...@@ -214,7 +214,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> { ...@@ -214,7 +214,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
//每日次数 //每日次数
Integer maxNumberOfDay=ruleVo.getMaxNumberOfDay()==null?0:ruleVo.getMaxNumberOfDay(); Integer maxNumberOfDay=ruleVo.getMaxNumberOfDay()==null?0:ruleVo.getMaxNumberOfDay();
//查询当日次数和金额 //查询当日次数和金额
sumDto=myWalletCathBiz.sumCathAmount(1); sumDto=myWalletCathBiz.sumCathAmount(userId,1);
BigDecimal ramount=amount.add(sumDto.getSumAmount()); BigDecimal ramount=amount.add(sumDto.getSumAmount());
if (amountOfDay.compareTo(BigDecimal.ZERO)>0&&ramount.compareTo(amountOfDay)>0){ if (amountOfDay.compareTo(BigDecimal.ZERO)>0&&ramount.compareTo(amountOfDay)>0){
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "提现金额超过日额度"+amountOfDay+"元"); return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "提现金额超过日额度"+amountOfDay+"元");
...@@ -230,7 +230,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> { ...@@ -230,7 +230,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
Integer maxNumberOfMonth=ruleVo.getMaxNumberOfMonth(); Integer maxNumberOfMonth=ruleVo.getMaxNumberOfMonth();
//查询当月次数和金额 //查询当月次数和金额
sumDto=myWalletCathBiz.sumCathAmount(2); sumDto=myWalletCathBiz.sumCathAmount(userId,2);
BigDecimal yamount=amount.add(sumDto.getSumAmount()); BigDecimal yamount=amount.add(sumDto.getSumAmount());
if (amountOfMonth.compareTo(BigDecimal.ZERO)>0&&yamount.compareTo(amountOfMonth)>0){ if (amountOfMonth.compareTo(BigDecimal.ZERO)>0&&yamount.compareTo(amountOfMonth)>0){
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "提现金额超过月额度"+amountOfMonth+"元"); return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "提现金额超过月额度"+amountOfMonth+"元");
...@@ -244,6 +244,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> { ...@@ -244,6 +244,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
sumDto.setBalance(myWallet.getBalance()); sumDto.setBalance(myWallet.getBalance());
sumDto.setProceduReates(proceduReates); sumDto.setProceduReates(proceduReates);
sumDto.setWalletId(myWallet.getId()); sumDto.setWalletId(myWallet.getId());
sumDto.setVersion(myWallet.getVersion());
return ObjectRestResponse.succ(sumDto); return ObjectRestResponse.succ(sumDto);
} }
...@@ -270,16 +271,17 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> { ...@@ -270,16 +271,17 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
if (restResponse.getStatus()!=ResultCode.SUCCESS_CODE){ if (restResponse.getStatus()!=ResultCode.SUCCESS_CODE){
return restResponse; return restResponse;
} }
WalletCathSumDto sumDto=JSONUtil.toBean( restResponse.getData().toString(),WalletCathSumDto.class); String data=JSONObject.toJSONString(restResponse.getData());
WalletCathSumDto sumDto=JSONUtil.toBean( data,WalletCathSumDto.class);
if (sumDto==null){ if (sumDto==null){
return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE, "参数不能为空"); return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE, "参数不能为空");
} }
BigDecimal commission=amount.divide(sumDto.getProceduReates()).multiply(new BigDecimal("100")).setScale(2, RoundingMode.HALF_UP); BigDecimal commission=amount.multiply(sumDto.getProceduReates()).divide(new BigDecimal("100")).setScale(2, RoundingMode.HALF_UP);
BigDecimal balnece=sumDto.getBalance(); BigDecimal balnece=sumDto.getBalance();
//到账金额 //到账金额
BigDecimal realAmount=balnece.subtract(commission); BigDecimal realAmount=amount;
if (amount.compareTo(realAmount)>0){ if (amount.compareTo(realAmount)>0){
realAmount=amount; realAmount=balnece.subtract(commission);
} }
log.info("-----提现申请-----proceduReates==="+sumDto.getProceduReates()+"----commission===="+commission+"---realAmount==="+realAmount); log.info("-----提现申请-----proceduReates==="+sumDto.getProceduReates()+"----commission===="+commission+"---realAmount==="+realAmount);
//添加账号 //添加账号
...@@ -302,22 +304,24 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> { ...@@ -302,22 +304,24 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
myWallet.setUserId(userId); myWallet.setUserId(userId);
myWallet.setBalance(balnece); myWallet.setBalance(balnece);
myWallet.setWithdrawals(withdrawals); myWallet.setWithdrawals(withdrawals);
myWallet.setVersion(sumDto.getVersion());
mapper.updMyWater(myWallet); mapper.updMyWater(myWallet);
return ObjectRestResponse.succ(); return ObjectRestResponse.succ(walletCath.getId());
} }
//提现审核 //提现审核
public ObjectRestResponse verifyCath(Integer cathId,String cono){ public ObjectRestResponse verifyCath(Integer cathId,String cono,String reason,Integer status){
if (StringUtils.isBlank(cono)||cathId==null||cathId==0){ if ((status==1&&StringUtils.isBlank(cono))||(status==2&&StringUtils.isBlank(reason))||cathId==null||cathId==0){
return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE, "参数不能为空"); return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE, "参数不能为空");
} }
MyWalletCath cath=myWalletCathBiz.selectById(cathId); MyWalletCath cath=myWalletCathBiz.selectById(cathId);
if (cath==null){ if (cath==null){
return ObjectRestResponse.createFailedResult(ResultCode.NOTEXIST_CODE, "提现记录不存在"); return ObjectRestResponse.createFailedResult(ResultCode.NOTEXIST_CODE, "提现记录不存在");
} }
cath.setStauts(1); cath.setStauts(status);
cath.setCono(cono); cath.setCono(cono);
cath.setReason(reason);
cath.setFinishTime(System.currentTimeMillis()); cath.setFinishTime(System.currentTimeMillis());
int num=myWalletCathBiz.updateSelectiveByIdRe(cath); int num=myWalletCathBiz.updateSelectiveByIdRe(cath);
if (num>0){ if (num>0){
...@@ -326,23 +330,34 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> { ...@@ -326,23 +330,34 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
wallet.setUserId(userId); wallet.setUserId(userId);
wallet=selectOne(wallet); wallet=selectOne(wallet);
if (wallet!=null){ if (wallet!=null){
//当时钱包的余额
BigDecimal balance=cath.getBalance(); BigDecimal balance=cath.getBalance();
BigDecimal realAmount=cath.getRealAmount(); BigDecimal realAmount=cath.getRealAmount();
BigDecimal commission=cath.getCommission(); BigDecimal commission=cath.getCommission();
MyWalletDetail detail=new MyWalletDetail(); if (status==1){
detail.setUserId(userId); MyWalletDetail detail=new MyWalletDetail();
detail.setItype(1); detail.setUserId(userId);
detail.setCono(cathId); detail.setItype(1);
detail.setBalance(balance); detail.setCono(cathId);
detail.setAmount(realAmount); detail.setBalance(balance);
detail.setSource(10); detail.setAmount(realAmount);
myWalletDetailBiz.insertSelective(detail); detail.setSource(10);
detail.setId(null); myWalletDetailBiz.insertSelective(detail);
detail.setSource(13); detail.setId(null);
balance=balance.subtract(realAmount).setScale(2, RoundingMode.HALF_UP); detail.setSource(13);
detail.setBalance(balance); balance=balance.subtract(realAmount).setScale(2, RoundingMode.HALF_UP);
detail.setAmount(commission); detail.setBalance(balance);
myWalletDetailBiz.insertSelective(detail); detail.setAmount(commission);
myWalletDetailBiz.insertSelective(detail);
}else {
BigDecimal amount=realAmount.add(commission);
balance=wallet.getBalance().add(amount);
BigDecimal withdrawals=wallet.getWithdrawals().subtract(amount);
wallet.setBalance(balance);
wallet.setWithdrawals(withdrawals);
mapper.updMyWater(wallet);
}
} }
} }
return ObjectRestResponse.succ(); return ObjectRestResponse.succ();
......
...@@ -12,7 +12,6 @@ import com.github.wxiaoqi.security.admin.vo.WalletCathPageVo; ...@@ -12,7 +12,6 @@ import com.github.wxiaoqi.security.admin.vo.WalletCathPageVo;
import com.github.wxiaoqi.security.admin.vo.WalletCathVo; import com.github.wxiaoqi.security.admin.vo.WalletCathVo;
import com.github.wxiaoqi.security.common.biz.BaseBiz; import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.vo.PageDataVO; import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.google.common.collect.Maps;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -40,7 +39,9 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> { ...@@ -40,7 +39,9 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> {
Example example = new Example(MyWalletCath.class); Example example = new Example(MyWalletCath.class);
Example.Criteria criteria = example.createCriteria(); Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("stauts", state); if (Objects.nonNull(state)) {
criteria.andEqualTo("stauts", state);
}
criteria.andEqualTo("userId", userId); criteria.andEqualTo("userId", userId);
example.setOrderByClause("crt_time DESC"); example.setOrderByClause("crt_time DESC");
PageDataVO<MyWalletCath> walletCathPage = PageDataVO.pageInfo(pageNo, pageSize, () -> mapper.selectByExample(example)); PageDataVO<MyWalletCath> walletCathPage = PageDataVO.pageInfo(pageNo, pageSize, () -> mapper.selectByExample(example));
...@@ -122,7 +123,7 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> { ...@@ -122,7 +123,7 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> {
return userIdAndPersonalConsumptionMap; return userIdAndPersonalConsumptionMap;
} }
public WalletCathSumDto sumCathAmount(Integer type){ public WalletCathSumDto sumCathAmount(Integer userId,Integer type){
return mapper.sumCathAmount(type); return mapper.sumCathAmount(userId,type);
} }
} }
package com.github.wxiaoqi.security.admin.config;
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* xxl-job config
*
* @author xuxueli 2017-04-28
*/
@Slf4j
@Configuration
public class XxlJobConfig {
@Value("${xxl.job.admin.addresses}")
private String adminAddresses;
@Value("${xxl.job.executor.appname}")
private String appName;
@Value("${xxl.job.executor.ip}")
private String ip;
@Value("${xxl.job.executor.port}")
private int port;
@Value("${xxl.job.accessToken}")
private String accessToken;
@Value("${xxl.job.executor.logpath}")
private String logPath;
@Value("${xxl.job.executor.logretentiondays}")
private int logRetentionDays;
@Bean(initMethod = "start", destroyMethod = "destroy")
public XxlJobSpringExecutor xxlJobExecutor() {
log.info(">>>>>>>>>>> xxl-job config init.");
XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
xxlJobSpringExecutor.setAppName(appName);
xxlJobSpringExecutor.setIp(ip);
xxlJobSpringExecutor.setPort(port);
xxlJobSpringExecutor.setAccessToken(accessToken);
xxlJobSpringExecutor.setLogPath(logPath);
xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
return xxlJobSpringExecutor;
}
/**
* 针对多网卡、容器内部署等情况,可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP;
*
* 1、引入依赖:
* <dependency>
* <groupId>org.springframework.cloud</groupId>
* <artifactId>spring-cloud-commons</artifactId>
* <version>${version}</version>
* </dependency>
*
* 2、配置文件,或者容器启动变量
* spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
*
* 3、获取IP
* String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
*/
}
\ No newline at end of file
package com.github.wxiaoqi.security.admin.jobhandler;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
/**
* 跨平台Http任务
*
* @author xuxueli 2018-09-16 03:48:34
*/
@JobHandler(value = "walletHandler")
@Component
@Slf4j
public class RentDepositJobHandler extends IJobHandler {
@Override
public ReturnT<String> execute(String var1) throws Exception {
try {
ReturnT returnT = new ReturnT(){{
setCode(100);
setMsg("成功");
}};
return returnT;
} catch (Exception e) {
XxlJobLogger.log(e);
return FAIL;
} finally {
}
}
}
\ No newline at end of file
...@@ -29,5 +29,5 @@ public interface MyWalletCathMapper extends Mapper<MyWalletCath> { ...@@ -29,5 +29,5 @@ public interface MyWalletCathMapper extends Mapper<MyWalletCath> {
* @param type 1-日;2-月 * @param type 1-日;2-月
* @return * @return
*/ */
WalletCathSumDto sumCathAmount(@Param("type") int type); WalletCathSumDto sumCathAmount(@Param("userId") Integer userId,@Param("type") int type);
} }
...@@ -51,7 +51,7 @@ public class MyWalletController { ...@@ -51,7 +51,7 @@ public class MyWalletController {
} }
@GetMapping @GetMapping("/checkCode")
@ApiOperation("检查验证码") @ApiOperation("检查验证码")
public ObjectRestResponse checkCode( public ObjectRestResponse checkCode(
@RequestParam(value = "phone",defaultValue = "")String phone, @RequestParam(value = "phone",defaultValue = "")String phone,
...@@ -105,23 +105,14 @@ public class MyWalletController { ...@@ -105,23 +105,14 @@ public class MyWalletController {
public ObjectRestResponse applyCath(@RequestBody ApplyCathVo applyCathVo, HttpServletRequest request){ public ObjectRestResponse applyCath(@RequestBody ApplyCathVo applyCathVo, HttpServletRequest request){
try { try {
Integer userId=Integer.parseInt(userAuthUtil.getInfoFromToken(userAuthConfig.getToken(request)).getId()); Integer userId=Integer.parseInt(userAuthUtil.getInfoFromToken(userAuthConfig.getToken(request)).getId());
applyCathVo.setUserId(userId);
return myWalletBiz.applyCath(applyCathVo); return myWalletBiz.applyCath(applyCathVo);
}catch (Exception e) { }catch (Exception e) {
throw new BaseException(e); throw new BaseException(e);
} }
} }
@PostMapping("/verifyCath")
@ApiOperation("提现审核")
public ObjectRestResponse verifyCath(
@RequestParam(value = "cathId",defaultValue = "0") Integer cathId,
@RequestParam(value = "cono",defaultValue = "") String cono){
try {
return myWalletBiz.verifyCath(cathId,cono);
}catch (Exception e) {
throw new BaseException(e);
}
}
@GetMapping("/txAlipayList") @GetMapping("/txAlipayList")
@ApiOperation("获取支付账号列表") @ApiOperation("获取支付账号列表")
...@@ -134,13 +125,4 @@ public class MyWalletController { ...@@ -134,13 +125,4 @@ public class MyWalletController {
} }
} }
} }
...@@ -35,7 +35,7 @@ public class WalletCathController { ...@@ -35,7 +35,7 @@ public class WalletCathController {
@ApiOperation("提现记录列表") @ApiOperation("提现记录列表")
@GetMapping("/page") @GetMapping("/page")
public ObjectRestResponse<WalletCathPageVo> findWatchCatchByWithdrawalState(@RequestParam("state") Integer state, public ObjectRestResponse<WalletCathPageVo> findWatchCatchByWithdrawalState(@RequestParam(value = "state",required = false) Integer state,
@RequestParam("pageNo") Integer pageNo, @RequestParam("pageNo") Integer pageNo,
@RequestParam("pageSize") Integer pageSize, @RequestParam("pageSize") Integer pageSize,
HttpServletRequest request) { HttpServletRequest request) {
......
package com.github.wxiaoqi.security.admin.rest.admin; package com.github.wxiaoqi.security.admin.rest.admin;
import com.github.wxiaoqi.security.admin.biz.MyWalletBiz;
import com.github.wxiaoqi.security.admin.biz.MyWalletCathBiz; import com.github.wxiaoqi.security.admin.biz.MyWalletCathBiz;
import com.github.wxiaoqi.security.admin.dto.WalletCathFindDTO; import com.github.wxiaoqi.security.admin.dto.WalletCathFindDTO;
import com.github.wxiaoqi.security.admin.vo.WalletCathAdminVo; import com.github.wxiaoqi.security.admin.vo.WalletCathAdminVo;
import com.github.wxiaoqi.security.common.exception.BaseException;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.vo.PageDataVO; import com.github.wxiaoqi.security.common.vo.PageDataVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/** /**
* @author libin * @author libin
...@@ -23,11 +24,26 @@ public class WalletCathAdminController { ...@@ -23,11 +24,26 @@ public class WalletCathAdminController {
@Autowired @Autowired
private MyWalletCathBiz myWalletCathBiz; private MyWalletCathBiz myWalletCathBiz;
@Autowired
private MyWalletBiz myWalletBiz;
@GetMapping("/page") @GetMapping("/page")
public ObjectRestResponse<PageDataVO<WalletCathAdminVo>> listWalletCathWithPage(WalletCathFindDTO walletCathFindDTO){ public ObjectRestResponse<PageDataVO<WalletCathAdminVo>> listWalletCathWithPage(WalletCathFindDTO walletCathFindDTO){
PageDataVO<WalletCathAdminVo> walletCathAdminVoPage = myWalletCathBiz.listWalletCathWithPage(walletCathFindDTO); PageDataVO<WalletCathAdminVo> walletCathAdminVoPage = myWalletCathBiz.listWalletCathWithPage(walletCathFindDTO);
return ObjectRestResponse.succ(walletCathAdminVoPage); return ObjectRestResponse.succ(walletCathAdminVoPage);
} }
@PostMapping("/verifyCath")
@ApiOperation("提现审核")
public ObjectRestResponse verifyCath(
@RequestParam(value = "cathId",defaultValue = "0") Integer cathId,
@RequestParam(value = "cono",defaultValue = "") String cono,
@RequestParam(value = "reason",defaultValue = "") String reason,
@RequestParam(value = "status",defaultValue = "1") Integer status){
try {
return myWalletBiz.verifyCath(cathId,cono,reason,status);
}catch (Exception e) {
throw new BaseException(e);
}
}
} }
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
wc.cath_type AS `cathType`, wc.cath_type AS `cathType`,
wc.stauts, wc.stauts,
wc.crt_time AS `crtTime`, wc.crt_time AS `crtTime`,
wc.finish_time AS `finishTime` wc.finish_time AS `finishTime`,
wc.cono
FROM FROM
(SELECT * FROM `my_wallet_cath` <if test="state != null"> (SELECT * FROM `my_wallet_cath` <if test="state != null">
WHERE `stauts`=#{state} WHERE `stauts`=#{state}
...@@ -38,7 +39,7 @@ ...@@ -38,7 +39,7 @@
<select id="sumCathAmount" resultType="com.github.wxiaoqi.security.admin.dto.WalletCathSumDto"> <select id="sumCathAmount" resultType="com.github.wxiaoqi.security.admin.dto.WalletCathSumDto">
select IFNULL(SUM(amount),0) as sumAmount,COUNT(*) as `number` from my_wallet_cath select IFNULL(SUM(amount),0) as sumAmount,COUNT(*) as `number` from my_wallet_cath
<where> <where>
user_id=#{userId} and stauts in(0,1)
<choose> <choose>
<when test="type ==1 "> <when test="type ==1 ">
AND date_format(from_unixtime(crt_time/1000),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d') AND date_format(from_unixtime(crt_time/1000),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d')
......
...@@ -102,4 +102,20 @@ public class ActivityPopularize implements Serializable { ...@@ -102,4 +102,20 @@ public class ActivityPopularize implements Serializable {
@ApiModelProperty(value = "活动结束时间") @ApiModelProperty(value = "活动结束时间")
@JSONField(serializeUsing= ToStringSerializer.class) @JSONField(serializeUsing= ToStringSerializer.class)
private Long endTime; private Long endTime;
/**
* 人数限制 -1--无限制
*/
@Column(name = "num_limit")
@ApiModelProperty(value = "人数限制 -1--无限制")
private Integer numLimit;
/**
* 当前状态 1--上架 2--下架
*/
@Column(name = "status")
@ApiModelProperty(value = "当前状态 1--上架 2--下架")
private Integer status;
} }
...@@ -5,6 +5,8 @@ import com.github.pagehelper.PageInfo; ...@@ -5,6 +5,8 @@ import com.github.pagehelper.PageInfo;
import com.github.wxiaoqi.security.common.biz.BaseBiz; import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.xxfc.platform.activity.entity.ActivityList; import com.xxfc.platform.activity.entity.ActivityList;
import com.xxfc.platform.activity.entity.ActivityManagement; import com.xxfc.platform.activity.entity.ActivityManagement;
import com.xxfc.platform.activity.entity.ActivityPopularize;
import com.xxfc.platform.activity.entity.ActivityRule;
import com.xxfc.platform.activity.mapper.ActivityManagementMapper; import com.xxfc.platform.activity.mapper.ActivityManagementMapper;
import com.xxfc.platform.activity.vo.ActivityManagementQuery; import com.xxfc.platform.activity.vo.ActivityManagementQuery;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -26,6 +28,11 @@ public class ActivityManagementBiz extends BaseBiz<ActivityManagementMapper, Act ...@@ -26,6 +28,11 @@ public class ActivityManagementBiz extends BaseBiz<ActivityManagementMapper, Act
@Autowired @Autowired
private ActivityListBiz activityListBiz; private ActivityListBiz activityListBiz;
@Autowired
private ActivityPopularizeBiz activityPopularizeBiz;
@Autowired
private ActivityRuleBiz activityRuleBiz;
/** /**
* 查询所有活动 * 查询所有活动
* @return * @return
...@@ -83,5 +90,22 @@ public class ActivityManagementBiz extends BaseBiz<ActivityManagementMapper, Act ...@@ -83,5 +90,22 @@ public class ActivityManagementBiz extends BaseBiz<ActivityManagementMapper, Act
ActivityList activityList= new ActivityList(); ActivityList activityList= new ActivityList();
BeanUtilsBean.getInstance().copyProperties(activityList,activityManagement); BeanUtilsBean.getInstance().copyProperties(activityList,activityManagement);
activityListBiz.updateSelectiveByIdRe(activityList); activityListBiz.updateSelectiveByIdRe(activityList);
if (activityList.getType()==1) {
ActivityRule activityRule = new ActivityRule();
// activityRule.setStartTime(activityList.getStartTime());
// activityRule.setEndTime(activityList.getEndTime());
activityRule.setStatus(activityList.getStatus());
activityRule.setNumber(activityList.getNumLimit());
activityRuleBiz.updateSelectiveByIdRe(activityRule);
}
if (activityList.getType()==2) {
ActivityPopularize activityPopularize = new ActivityPopularize();
activityPopularize.setStartTime(activityList.getStartTime());
activityPopularize.setEndTime(activityList.getEndTime());
activityPopularize.setStatus(activityList.getStatus());
activityPopularize.setNumLimit(activityList.getNumLimit());
activityPopularizeBiz.updateSelectiveByIdRe(activityPopularize);
}
} }
} }
package com.xxfc.platform.app.entity; package com.xxfc.platform.app.entity;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.*; import javax.persistence.*;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -94,7 +95,7 @@ public class AppVersion implements Serializable { ...@@ -94,7 +95,7 @@ public class AppVersion implements Serializable {
*/ */
@Column(name = "crt_time") @Column(name = "crt_time")
@ApiModelProperty(value = "版本上传时间", hidden = true ) @ApiModelProperty(value = "版本上传时间", hidden = true )
private Long crtTime; private BigInteger crtTime;
/** /**
* 是否删除;0-正常;1-删除 * 是否删除;0-正常;1-删除
......
...@@ -17,6 +17,6 @@ public interface ConfigFeign { ...@@ -17,6 +17,6 @@ public interface ConfigFeign {
@RequestMapping(value = "/cofig/app/unauth/types",method = RequestMethod.GET) @RequestMapping(value = "/cofig/app/unauth/types",method = RequestMethod.GET)
ObjectRestResponse<Cofig> getAllByType(String types); ObjectRestResponse<Cofig> getAllByType(String types);
@GetMapping("/app/unauth/withdraw_rule") @GetMapping("/cofig/app/unauth/withdraw_rule")
WithDrawRuleVo getWithDrawRule(); WithDrawRuleVo getWithDrawRule();
} }
...@@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo; ...@@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken; import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import com.github.wxiaoqi.security.common.constant.RestCode; import com.github.wxiaoqi.security.common.constant.RestCode;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.EntityUtils;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.util.process.SystemConfig; import com.github.wxiaoqi.security.common.util.process.SystemConfig;
import com.xxfc.platform.app.vo.appVersionQuery; import com.xxfc.platform.app.vo.appVersionQuery;
import com.xxfc.platform.vehicle.common.RestResponse; import com.xxfc.platform.vehicle.common.RestResponse;
import com.xxfc.platform.vehicle.constant.RedisKey; import com.xxfc.platform.vehicle.constant.RedisKey;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.session.RowBounds; import org.apache.ibatis.session.RowBounds;
...@@ -38,6 +41,7 @@ import tk.mybatis.mapper.weekend.WeekendSqls; ...@@ -38,6 +41,7 @@ import tk.mybatis.mapper.weekend.WeekendSqls;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.math.BigInteger;
import java.util.List; import java.util.List;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
...@@ -49,6 +53,7 @@ import java.util.concurrent.TimeUnit; ...@@ -49,6 +53,7 @@ import java.util.concurrent.TimeUnit;
* @date 2019-06-24 10:34:00 * @date 2019-06-24 10:34:00
*/ */
@Service @Service
@Slf4j
public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> { public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
@Value("${app.uploadPath}") @Value("${app.uploadPath}")
...@@ -59,6 +64,7 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> { ...@@ -59,6 +64,7 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
private RedisTemplate redisTemplate; private RedisTemplate redisTemplate;
public static final DateTimeFormatter DEFAULT_DATE_TIME_FORMATTER = DateTimeFormat.forPattern("yyyy-MM-dd"); public static final DateTimeFormatter DEFAULT_DATE_TIME_FORMATTER = DateTimeFormat.forPattern("yyyy-MM-dd");
private AppVersion entity;
public ObjectRestResponse getVersion(String version,Integer type){ public ObjectRestResponse getVersion(String version,Integer type){
...@@ -125,9 +131,12 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> { ...@@ -125,9 +131,12 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
*/ */
public ResponseEntity<byte[]> downloadInstallationPackage(String realFileRelPath) throws Exception{ public ResponseEntity<byte[]> downloadInstallationPackage(String realFileRelPath) throws Exception{
String filePath = uploadPath + realFileRelPath; String filePath = uploadPath + realFileRelPath;
File file = new File(filePath);//新建一个文件 //新建一个文件
HttpHeaders headers = new HttpHeaders();//http头信息 File file = new File(filePath);
String downloadFileName = new String(file.getName());//设置编码 //http头信息
HttpHeaders headers = new HttpHeaders();
//设置编码
String downloadFileName = new String(file.getName());
headers.setContentDispositionFormData("attachment", downloadFileName); headers.setContentDispositionFormData("attachment", downloadFileName);
headers.setContentType(MediaType.APPLICATION_OCTET_STREAM); headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED); return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);
...@@ -137,11 +146,14 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> { ...@@ -137,11 +146,14 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
* 添加版本信息 * 添加版本信息
* @param appVersion * @param appVersion
*/ */
@Transactional @Transactional(rollbackFor = Exception.class)
public void insertAppVersion(AppVersion appVersion) { public void insertAppVersion(AppVersion appVersion) {
appVersion.setDownloadSwitch(0); if ( appVersion.getDownloadSwitch()==null){
appVersion.setDownloadSwitch(1);
}
insertSelective(appVersion); insertSelective(appVersion);
} }
public AppVersion get(Integer id) { public AppVersion get(Integer id) {
if (id==null) { if (id==null) {
throw new IllegalArgumentException("Parameter is null"); throw new IllegalArgumentException("Parameter is null");
...@@ -164,17 +176,21 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> { ...@@ -164,17 +176,21 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
*/ */
public void remove(Integer id) { public void remove(Integer id) {
AppVersion appVersion = new AppVersion(); AppVersion appVersion = new AppVersion();
appVersion.setId(id);
appVersion.setIsDel(1); appVersion.setIsDel(1);
Example example = Example.builder(AppVersion.class) mapper.updateByPrimaryKeySelective(appVersion);
.where(WeekendSqls.<AppVersion>custom().andEqualTo(AppVersion::getId,id)) // mapper.updateByExampleSelective(appVersion,example);
.build();
mapper.updateByExampleSelective(appVersion,example);
} }
public PageInfo<AppVersion> getAll(appVersionQuery query) { public PageInfo<AppVersion> getAll(appVersionQuery query) {
PageHelper.startPage(query.getPage(),query.getLimit()); PageHelper.startPage(query.getPage(),query.getLimit());
List<AppVersion> appVersionList = mapper.getAllByquery(query); List<AppVersion> appVersionList = mapper.getAllByquery(query);
return PageInfo.of(appVersionList); return PageInfo.of(appVersionList);
}
@Override
public int insertSelectiveRe(AppVersion entity) {
entity.setCrtTime(BigInteger.valueOf(System.currentTimeMillis()));
return mapper.insertSelective(entity);
} }
} }
\ No newline at end of file
...@@ -39,7 +39,7 @@ public class CofigBiz extends BaseBiz<CofigMapper,Cofig> { ...@@ -39,7 +39,7 @@ public class CofigBiz extends BaseBiz<CofigMapper,Cofig> {
* @param cofig * @param cofig
* @return * @return
*/ */
@CacheClear(pre = "app:withdrawrule:",key = "config{1}") @CacheClear(pre = "app:withdrawrule{1.type}")
public int updateConfig(Cofig cofig) { public int updateConfig(Cofig cofig) {
EntityUtils.setUpdatedInfo(cofig); EntityUtils.setUpdatedInfo(cofig);
return mapper.updateByPrimaryKeySelective(cofig); return mapper.updateByPrimaryKeySelective(cofig);
......
...@@ -20,7 +20,7 @@ import org.springframework.data.redis.serializer.StringRedisSerializer; ...@@ -20,7 +20,7 @@ import org.springframework.data.redis.serializer.StringRedisSerializer;
public class RedisConfiguration { public class RedisConfiguration {
@Bean @Bean
public RedisTemplate<String, Object> customRedisTemplate(RedisConnectionFactory factory) { public RedisTemplate<String, Object> configRedisTemplate(RedisConnectionFactory factory) {
RedisTemplate redisTemplate = new RedisTemplate(); RedisTemplate redisTemplate = new RedisTemplate();
redisTemplate.setConnectionFactory(factory); redisTemplate.setConnectionFactory(factory);
RedisSerializer<String> stringSerializer = new StringRedisSerializer(); RedisSerializer<String> stringSerializer = new StringRedisSerializer();
......
...@@ -40,7 +40,16 @@ public class CofigController extends BaseController<CofigBiz,Cofig> { ...@@ -40,7 +40,16 @@ public class CofigController extends BaseController<CofigBiz,Cofig> {
} }
@GetMapping("/app/unauth/withdraw_rule") @GetMapping("/app/unauth/withdraw_rule")
@IgnoreUserToken
public WithDrawRuleVo getWithDrawRule(){ public WithDrawRuleVo getWithDrawRule(){
return baseBiz.getWithDrawRule(); return baseBiz.getWithDrawRule();
} }
@GetMapping("/app/unauth/wallet_rule")
@IgnoreUserToken
public ObjectRestResponse getWalletRule(){
return ObjectRestResponse.succ(baseBiz.getWithDrawRule());
}
} }
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<select id="getAllByquery" parameterType="com.xxfc.platform.app.vo.appVersionQuery" <select id="getAllByquery" parameterType="com.xxfc.platform.app.vo.appVersionQuery"
resultType="com.xxfc.platform.app.entity.AppVersion"> resultType="com.xxfc.platform.app.entity.AppVersion">
select * from app_version select * from app_version
where 1=1 where is_del=0
<if test="versionName !=null and versionName != ''"> <if test="versionName !=null and versionName != ''">
and version_name like concat('%',#{versionName},'%') and version_name like concat('%',#{versionName},'%')
</if> </if>
...@@ -19,6 +19,6 @@ ...@@ -19,6 +19,6 @@
<if test="content != null and content != ''"> <if test="content != null and content != ''">
and content like concat('%',#{content},'%') and content like concat('%',#{content},'%')
</if> </if>
order by crt_time desc
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -135,6 +135,13 @@ ...@@ -135,6 +135,13 @@
<artifactId>spring-boot-starter-data-mongodb</artifactId> <artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency> </dependency>
<!-- 分布式锁 -->
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-boot-starter</artifactId>
<version>3.11.0</version>
</dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
...@@ -85,5 +85,12 @@ ...@@ -85,5 +85,12 @@
<artifactId>beetl</artifactId> <artifactId>beetl</artifactId>
<version>2.9.3</version> <version>2.9.3</version>
</dependency> </dependency>
<!-- xxl-job-core -->
<dependency>
<groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId>
<version>2.0.2</version>
</dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
...@@ -3,12 +3,23 @@ package com.xxfc.platform.order.entity; ...@@ -3,12 +3,23 @@ package com.xxfc.platform.order.entity;
import lombok.Data; import lombok.Data;
import javax.persistence.Column; import javax.persistence.Column;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date; import java.util.Date;
@Data @Data
public class DailyOrderStatistics { public class DailyOrderStatistics {
@Column() @Column(name = "one_day")
private Date oneDay; private System oneDay;
@Column(name = "total_orders")
private BigInteger totalOrders;
@Column(name = "actual_total_income")
private BigDecimal actualTotalIncome;
} }
...@@ -77,12 +77,24 @@ public class OrderRefund implements Serializable { ...@@ -77,12 +77,24 @@ public class OrderRefund implements Serializable {
@ApiModelProperty(value = "退款说明") @ApiModelProperty(value = "退款说明")
private String refundDesc; private String refundDesc;
/** /**
* 创建时间 * 创建时间
*/ */
@Column(name = "crt_time") @Column(name = "crt_time")
@ApiModelProperty(value = "创建时间", hidden = true ) @ApiModelProperty(value = "创建时间", hidden = true )
private Long crtTime; private Long crtTime;
/**
* 创建时间
*/
@Column(name = "original_refund_amount")
@ApiModelProperty(value = "原来要退款的金额", hidden = true )
private BigDecimal originalRefundAmount;
/**
* 创建时间
*/
@Column(name = "deduct_amount")
@ApiModelProperty(value = "扣除的金额", hidden = true )
private BigDecimal deductAmount;
} }
...@@ -26,13 +26,6 @@ ...@@ -26,13 +26,6 @@
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<!-- xxl-job-core -->
<dependency>
<groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId>
<version>2.0.2</version>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId> <artifactId>spring-boot-starter-amqp</artifactId>
......
...@@ -335,18 +335,20 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> { ...@@ -335,18 +335,20 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
private void rentRefundProcess(BaseOrder baseOrder, BigDecimal depositAmount, Long timeLag, String dicParentKey) { private void rentRefundProcess(BaseOrder baseOrder, BigDecimal depositAmount, Long timeLag, String dicParentKey) {
//计算退款金额 //计算退款金额
// 1、押金 + 租金(规则扣除) // 1、押金 + 租金(规则扣除)
//BigDecimal refundGoodsAmount = baseOrder.getGoodsAmount(); BigDecimal originalRefundAmount = BigDecimal.ZERO.add(baseOrder.getGoodsAmount().subtract(baseOrder.getCouponAmount()));
StringBuilder refundDescBuilder = new StringBuilder("取消订单退款:"); StringBuilder refundDescBuilder = new StringBuilder("取消订单退款:");
if(null == depositAmount) { if(null == depositAmount) {
depositAmount = BigDecimal.ZERO; depositAmount = BigDecimal.ZERO;
} }
//商品价格 - 优惠券减免的价格 //商品价格 - 优惠券减免的价格
BigDecimal refundGoodsAmount = calculateRefund(baseOrder.getGoodsAmount().subtract(baseOrder.getCouponAmount()), timeLag, dicParentKey, refundDescBuilder); BigDecimal refundGoodsAmount = calculateRefund(originalRefundAmount, timeLag, dicParentKey, refundDescBuilder);
//退款金额 //退款金额
BigDecimal refundAmount = depositAmount.add(refundGoodsAmount); BigDecimal refundAmount = depositAmount.add(refundGoodsAmount);
originalRefundAmount = depositAmount.add(originalRefundAmount);
//退款子流程: 订单基础,退款描述,退款金额 //退款子流程: 订单基础,退款描述,退款金额
refundSubProcess(baseOrder, refundDescBuilder.toString(), refundAmount, RefundTypeEnum.ORDER_FUND.getCode(), RefundStatusEnum.ALL.getCode()); refundSubProcess(baseOrder, refundDescBuilder.toString(), originalRefundAmount, refundAmount, RefundTypeEnum.ORDER_FUND.getCode(), RefundStatusEnum.ALL.getCode());
} }
public BigDecimal calculateRefund(BigDecimal goodsAmount, Long timeLag, String dicParentKey, StringBuilder refundDescBuilder) { public BigDecimal calculateRefund(BigDecimal goodsAmount, Long timeLag, String dicParentKey, StringBuilder refundDescBuilder) {
...@@ -390,7 +392,7 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> { ...@@ -390,7 +392,7 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
* @param refundType * @param refundType
* @param refundStatus * @param refundStatus
*/ */
public void refundSubProcess(BaseOrder baseOrder, String refundDesc, BigDecimal refundAmount, Integer refundType, Integer refundStatus) { public void refundSubProcess(BaseOrder baseOrder, String refundDesc, BigDecimal originalRefundAmount, BigDecimal refundAmount, Integer refundType, Integer refundStatus) {
String refundTradeNo = null; String refundTradeNo = null;
//0 小于 退款金额 //0 小于 退款金额
if(BigDecimal.ZERO.compareTo(refundAmount) < 0) { if(BigDecimal.ZERO.compareTo(refundAmount) < 0) {
...@@ -404,7 +406,7 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> { ...@@ -404,7 +406,7 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
} }
//记录订单退款记录 //记录订单退款记录
Integer flag = addOrderRefund(baseOrder.getId(), refundDesc, refundAmount, refundTradeNo, refundType); Integer flag = addOrderRefund(baseOrder.getId(), refundDesc, originalRefundAmount, refundAmount, refundTradeNo, refundType);
//更新订单的退款状态和退款时间 //更新订单的退款状态和退款时间
if(SYS_TRUE.equals(flag) && null != refundStatus) { if(SYS_TRUE.equals(flag) && null != refundStatus) {
...@@ -424,7 +426,7 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> { ...@@ -424,7 +426,7 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
* @param refundAmount * @param refundAmount
* @param refundTradeNo * @param refundTradeNo
*/ */
private Integer addOrderRefund(Integer orderId, String refundDesc, BigDecimal refundAmount, String refundTradeNo, Integer refundType) { private Integer addOrderRefund(Integer orderId, String refundDesc, BigDecimal originalRefundAmount, BigDecimal refundAmount, String refundTradeNo, Integer refundType) {
//如果返回的流水为空,则当做失败 //如果返回的流水为空,则当做失败
Integer refundStatus = SYS_TRUE; Integer refundStatus = SYS_TRUE;
if(StrUtil.isBlank(refundTradeNo)) { if(StrUtil.isBlank(refundTradeNo)) {
...@@ -438,6 +440,8 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> { ...@@ -438,6 +440,8 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
setTradeNo(refundTradeNo); setTradeNo(refundTradeNo);
setRefundType(RefundTypeEnum.ORDER_FUND.getCode()); setRefundType(RefundTypeEnum.ORDER_FUND.getCode());
}}; }};
orderRefund.setOriginalRefundAmount(originalRefundAmount);
orderRefund.setDeductAmount(originalRefundAmount.subtract(refundAmount));
orderRefund.setRefundAmount(refundAmount); orderRefund.setRefundAmount(refundAmount);
orderRefund.setRefundDesc(refundDesc); orderRefund.setRefundDesc(refundDesc);
orderRefund.setRefundStatus(refundStatus); orderRefund.setRefundStatus(refundStatus);
...@@ -619,10 +623,10 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> { ...@@ -619,10 +623,10 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
} }
} }
// @Scheduled(cron = "0 0 2 * * ? ") // @Scheduled(cron = "0 0 2 * * ? ")
// private void countDailyOrdersRegularly(){ // private void countDailyOrdersRegularly(){
// DailyOrderStatistics dailyOrderStatistics= mapper.getTotalOrder(); // DailyOrderStatistics dailyOrderStatistics= mapper.getTotalOrder();
// } // }
//
} }
\ No newline at end of file
...@@ -56,19 +56,20 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> { ...@@ -56,19 +56,20 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> {
}}); }});
//还车扣除款 剩余的 钱,再减去违章预备金 //还车扣除款 剩余的 钱,再减去违章预备金
BigDecimal refundAmont = crosstown.getRestDeposit().subtract(illegalReserve); BigDecimal refundAmont = crosstown.getRestDeposit().subtract(illegalReserve);
BigDecimal originalRefundAmount = crosstown.getRestDeposit().add(crosstown.getDeductionCost()).subtract(illegalReserve);
List<DedDetailDTO> dddList = JSONUtil.toBean(crosstown.getDedDetail(), List.class); List<DedDetailDTO> dddList = JSONUtil.toBean(crosstown.getDedDetail(), List.class);
String refundDesc = "退还押金:"+ refundAmont.toString()+ "(已扣除 违章预备金:"+ illegalReserve.toString(); String refundDesc = "退还押金:"+ refundAmont.toString()+ "(已扣除 违章预备金:"+ illegalReserve.toString();
for(DedDetailDTO ddd : dddList) { for(DedDetailDTO ddd : dddList) {
refundDesc += ", "+ ddd.getDeductions()+ ":"+ ddd.getCost(); refundDesc += ", "+ ddd.getDeductions()+ ":"+ ddd.getCost();
} }
refundDesc += ")"; refundDesc += ")";
refundTrigger(orderMQDTO, orderMQDTO.getOrderRentVehicleDetail(), illegalReserve, refundAmont, refundDesc, RefundStatusEnum.RESIDUE_ILLEGAL.getCode()); refundTrigger(orderMQDTO, orderMQDTO.getOrderRentVehicleDetail(), illegalReserve, originalRefundAmount, refundAmont, refundDesc, RefundStatusEnum.RESIDUE_ILLEGAL.getCode());
} }
} }
public void refundTrigger(BaseOrder baseOrder, OrderRentVehicleDetail orvd, BigDecimal residueAmount, BigDecimal refundAmont, String refundDesc, Integer refundStatus) { public void refundTrigger(BaseOrder baseOrder, OrderRentVehicleDetail orvd, BigDecimal residueAmount, BigDecimal originalRefundAmount, BigDecimal refundAmont, String refundDesc, Integer refundStatus) {
//退款子流程: 订单基础,退款描述,退款金额 //退款子流程: 订单基础,退款描述,退款金额
baseOrderBiz.refundSubProcess(baseOrder, refundDesc, refundAmont, RefundTypeEnum.DEPOSIT.getCode(), refundStatus); baseOrderBiz.refundSubProcess(baseOrder, refundDesc, originalRefundAmount, refundAmont, RefundTypeEnum.DEPOSIT.getCode(), refundStatus);
//设置剩余没有返还的钱 //设置剩余没有返还的钱
orderRentVehicleBiz.updateSelectiveById(new OrderRentVehicleDetail(){{ orderRentVehicleBiz.updateSelectiveById(new OrderRentVehicleDetail(){{
setId(orvd.getId()); setId(orvd.getId());
......
...@@ -88,11 +88,8 @@ public class RentDepositJobHandler extends IJobHandler { ...@@ -88,11 +88,8 @@ public class RentDepositJobHandler extends IJobHandler {
//还车扣除款 剩余的 钱,再减去违章预备金 //还车扣除款 剩余的 钱,再减去违章预备金
BigDecimal refundAmont = orvd.getReturnPayResidue().subtract(orderViolation.getPrice()); BigDecimal refundAmont = orvd.getReturnPayResidue().subtract(orderViolation.getPrice());
String refundDesc = "退还押金:"+ refundAmont.toString()+ "(已扣除 违章扣款:"+ refundAmont.toString(); String refundDesc = "退还押金:"+ refundAmont.toString()+ "(已扣除 违章扣款:"+ refundAmont.toString();
// for(DedDetailDTO ddd : dddList) {
// refundDesc += ", "+ ddd.getDeductions()+ ":"+ ddd.getCost();
// }
refundDesc += ")"; refundDesc += ")";
orderRefundBiz.refundTrigger(baseOrder, orvd, refundAmont, refundAmont, refundDesc, RefundStatusEnum.REFUND_DEPOSIT.getCode()); orderRefundBiz.refundTrigger(baseOrder, orvd, BigDecimal.ZERO, orvd.getReturnPayResidue(), refundAmont, refundDesc, RefundStatusEnum.REFUND_DEPOSIT.getCode());
} }
} }
......
package com.xxfc.platform.order.mapper; package com.xxfc.platform.order.mapper;
import com.xxfc.platform.order.entity.BaseOrder; import com.xxfc.platform.order.entity.BaseOrder;
import com.xxfc.platform.order.entity.DailyOrderStatistics;
import com.xxfc.platform.order.pojo.order.OrderListVo; import com.xxfc.platform.order.pojo.order.OrderListVo;
import com.xxfc.platform.order.pojo.order.OrderPageVO; import com.xxfc.platform.order.pojo.order.OrderPageVO;
import tk.mybatis.mapper.common.Mapper; import tk.mybatis.mapper.common.Mapper;
...@@ -27,5 +28,5 @@ public interface BaseOrderMapper extends Mapper<BaseOrder> { ...@@ -27,5 +28,5 @@ public interface BaseOrderMapper extends Mapper<BaseOrder> {
public OrderPageVO getOrderDetail(String no); public OrderPageVO getOrderDetail(String no);
Integer getTotalOrder(); DailyOrderStatistics getTotalOrder();
} }
...@@ -206,15 +206,32 @@ ...@@ -206,15 +206,32 @@
</select> </select>
<select id="getTotalOrder" resultType="com.xxfc.platform.order.entity.DailyOrderStatistics"> <select id="getTotalOrder" resultType="com.xxfc.platform.order.entity.DailyOrderStatistics">
select
date_format(crt_time,'%Y-%c-%d') as oneDay, select
SUM(1) date_format(pay_time,'%Y-%c-%d') as oneDay,
sum(1) as totalOrders,
sum(pay_time)as actualTotalIncome
from from
base_order base_order
where where
date(crt_time)=date(now())-1 date(pay_time)=date(now())-1
group by group by
date_format(crt_time,'%d') date_format(pay_time,'%d')
</select> </select>
<!-- <select id="getTotalOrder" resultType="com.xxfc.platform.order.entity.DailyOrderStatistics">-->
<!-- select-->
<!-- date_format(refund_time,'%Y-%c-%d') as oneDay,-->
<!-- sum(1) as totalOrders,-->
<!-- sum(refund_time)as actualTotalIncome-->
<!-- from-->
<!-- base_order-->
<!-- where-->
<!-- date(refund_time)=date(now())-1-->
<!-- group by-->
<!-- date_format(refund_time,'%d')-->
<!-- </select>-->
</mapper> </mapper>
\ No newline at end of file
...@@ -28,40 +28,79 @@ public class IdInformation implements Serializable { ...@@ -28,40 +28,79 @@ public class IdInformation implements Serializable {
private Integer id; private Integer id;
//证件号 /**
* 证件号
*/
@Column(name ="id_number") @Column(name ="id_number")
private String idNumber; private String idNumber;
//用户真实姓名
private String name;
/**
* 用户真实姓名
*/
private String name;
//用户id /**
*
*/
/**
* 用户id
*/
@Column(name = "user_login_id") @Column(name = "user_login_id")
private Integer userLonginId; private Integer userLonginId;
/**
//证件类型 *
*/
/**
* 证件类型
*/
@Column(name = "certificate_type") @Column(name = "certificate_type")
private Integer certificateType; private Integer certificateType;
//正面url /**
* 正面url
*/
@Column(name = "front_url") @Column(name = "front_url")
private String frontUrl; private String frontUrl;
//背面url /**
* 背面url
*/
@Column(name = "back_url") @Column(name = "back_url")
private String backUrl; private String backUrl;
//到期时间 /**
*到期时间
*/
@Column(name = "expiration_date") @Column(name = "expiration_date")
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyyMMdd",timezone="GMT+8") @JsonFormat(pattern = "yyyyMMdd",timezone="GMT+8")
private Date expirationDate; private Date expirationDate;
//认证方式 /**
* 认证方式
*/
@Column(name = "authentication_methods") @Column(name = "authentication_methods")
private Integer authenticationMethods; private Integer authenticationMethods;
/**
*创建时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH;mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH;mm:ss",timezone = "GMT+8")
@Column(name = "crt_time")
private Date crtTime;
/**
* 修改时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH;mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH;mm:ss",timezone = "GMT+8")
@Column(name = "upd_time")
private Date updTime;
} }
...@@ -48,9 +48,12 @@ public class CertificationController { ...@@ -48,9 +48,12 @@ public class CertificationController {
MQServiceBiZ mqServiceBiZ; MQServiceBiZ mqServiceBiZ;
/**
* 实名认证
* @param idInformation
* @param request
* @return
*/
@PostMapping("/app/certificate") @PostMapping("/app/certificate")
public ObjectRestResponse certificate(@RequestBody IdInformation idInformation, HttpServletRequest request) { public ObjectRestResponse certificate(@RequestBody IdInformation idInformation, HttpServletRequest request) {
......
...@@ -12,6 +12,7 @@ import com.xxfc.platform.universal.utils.CertifHttpUtils; ...@@ -12,6 +12,7 @@ import com.xxfc.platform.universal.utils.CertifHttpUtils;
import com.xxfc.platform.universal.utils.Validation; import com.xxfc.platform.universal.utils.Validation;
import javafx.application.Application; import javafx.application.Application;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.map.HashedMap; import org.apache.commons.collections4.map.HashedMap;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.http.HttpResponse; import org.apache.http.HttpResponse;
...@@ -24,6 +25,7 @@ import org.springframework.stereotype.Service; ...@@ -24,6 +25,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.TransactionStatus; import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport; import org.springframework.transaction.interceptor.TransactionAspectSupport;
import tk.mybatis.mapper.entity.Example;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
...@@ -287,10 +289,8 @@ public class CertificationService { ...@@ -287,10 +289,8 @@ public class CertificationService {
try { try {
expirationDate = formatter.parse(endDate); expirationDate = formatter.parse(endDate);
} catch (ParseException e) { } catch (ParseException e) {
e.printStackTrace(); e.printStackTrace();
return ObjectRestResponse.createDefaultFail(); return ObjectRestResponse.createDefaultFail();
} }
} }
idInformation.setExpirationDate(expirationDate); idInformation.setExpirationDate(expirationDate);
...@@ -401,7 +401,20 @@ public class CertificationService { ...@@ -401,7 +401,20 @@ public class CertificationService {
//保存认证信息 //保存认证信息
try { try {
idInformationMapper.insertSelective(idInformation); Example exa = new Example(IdInformation.class);
Example.Criteria criteria = exa.createCriteria();
criteria.andEqualTo("idNumber",idInformation.getIdNumber());
criteria.andEqualTo("userLonginId",idInformation.getUserLonginId());
List<IdInformation> idInformations = idInformationMapper.selectByExample(exa);
if (CollectionUtils.isEmpty(idInformations)) {
idInformation.setCrtTime(new Date());
idInformationMapper.insertSelective(idInformation);
}else {
IdInformation idInformation1 = idInformations.get(0);
idInformation.setId(idInformation1.getId());
idInformation.setUpdTime(new Date());
idInformationMapper.updateByPrimaryKeySelective(idInformation);
}
//认证成功后修改用户,用户认证状态 //认证成功后修改用户,用户认证状态
ObjectRestResponse authentication = userFeign.authentication(idInformation.getUserLonginId(), idInformation.getName(), idInformation.getIdNumber(), 1); ObjectRestResponse authentication = userFeign.authentication(idInformation.getUserLonginId(), idInformation.getName(), idInformation.getIdNumber(), 1);
return ObjectRestResponse.succ(idInformation.getId()); return ObjectRestResponse.succ(idInformation.getId());
......
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