Commit a02c3c5a authored by 周健威's avatar 周健威

Merge branch 'master-vehicle-price' into dev-tiande

# Conflicts:
#	xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
parents f7d4f296 45d0ad66
package com.github.wxiaoqi.security.common.util;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import com.github.wxiaoqi.security.common.exception.BaseException;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import lombok.extern.slf4j.Slf4j;
import org.mockito.internal.util.collections.Sets;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_FALSE;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_JSON_TRUE;
@Slf4j
public class AssertUtils {
public static<T> T isBlank(T object, BaseException baseException, String name) throws BaseException {
log.info(" AssertUtils.isBlank : {}", object);
if(object instanceof Collection) {
if (CollUtil.isEmpty((List)object)) {
throwException(baseException, name);
}
}else if (object == null) {
throwException(baseException, name);
}
return object;
}
public static<T> T isNotBlank(T object, BaseException baseException, String name) throws BaseException {
log.info(" AssertUtils.isNotBlank : {}", object);
if (object != null ) {
//如果是集合 并且 为空 着不抛异常
if (object instanceof Collection && CollUtil.isEmpty((List)object)) {
return object;
}else {
throwException(baseException, name);
}
}
return object;
}
public static<T> T isBlank(T object, BaseException baseException) throws BaseException {
return isBlank(object, baseException, null);
}
public static<T> T isNotBlank(T object, BaseException baseException) throws BaseException {
return isNotBlank(object, baseException, null);
}
public static void isBlankMulti(Object... objects) throws BaseException {
log.info(" AssertUtils.isBlank : {}", objects);
isBlank(objects);
for (Object object : objects) {
isBlank(object);
}
}
// public static void isEqual(Object a, Object b, BaseException bex) throws BaseException {
// log.info(" AssertUtils.isEqual : {} {}", a, b);
// if(a.equals(b)) {
// if(null != bex) {
// throw new BaseException(ResultCode.DB_OPERATION_FAIL_CODE);
// }else {
// throw bex;
// }
// }
// }
public static<T> T isBlank(T object) throws BaseException {
return isBlank(object, null, null);
}
public static<T> T isBlankBean(T object) throws BaseException {
Map<String, Object> beanMap = BeanUtil.beanToMap(object);
isBlank(object);
for(String key : beanMap.keySet()) {
isBlank(beanMap.get(key), null, null);
}
return object;
}
public static<T> T isBlank(T object, String attrName) throws BaseException {
return isBlank(object, null, attrName);
}
public static Integer isDBSucc(Integer flag, BaseException baseException) throws BaseException {
log.info(" AssertUtils.isDBSucc : {}", flag);
if(SYS_FALSE.equals(flag)) {
throwDBException(baseException);
}
return flag;
}
public static Integer isDBSucc(Integer flag) throws BaseException {
return isDBSucc(flag, null);
}
public static<T> ObjectRestResponse<T> isFeignSucc(ObjectRestResponse<T> orr) throws BaseException {
log.info(" AssertUtils.isFeignSucc : {}", orr);
if(!SYS_JSON_TRUE.equals(orr.getStatus())) {
throw new BaseException(orr.getMessage(), orr.getStatus());
}
return orr;
}
public static<T,E> ObjectRestResponse<T> isFeignSuccGetObj(E dto, Function<Map, ObjectRestResponse<T>> function) throws BaseException {
log.info(" AssertUtils.isFeignSucc : {}", dto);
ObjectRestResponse<T> orr = function.apply(DepthBeanToMap.objectToMap(dto));
//ObjectRestResponse<T> orr = function.apply( BeanUtil.beanToMap(dto, false, false));
if(!SYS_JSON_TRUE.equals(orr.getStatus())) {
throw new BaseException(orr.getMessage(), orr.getStatus());
}
return orr;
}
public static<T,E> List<T> isFeignSuccGetDataList(E dto, Function<Map, ObjectRestResponse<List<T>>> function, Class<T> tClass) throws BaseException {
log.info(" AssertUtils.isFeignSucc : {}", dto);
ObjectRestResponse<List<T>> orr = function.apply(DepthBeanToMap.objectToMap(dto));
//ObjectRestResponse<List<T>> orr = function.apply(BeanUtil.beanToMap(dto, false, false));
if(!SYS_JSON_TRUE.equals(orr.getStatus())) {
throw new BaseException(orr.getMessage(), orr.getStatus());
}
orr.setData(orr.getData().parallelStream().map(t -> BeanUtil.toBean(t, tClass)).collect(Collectors.toList()));
return orr.getData();
}
public static<T,E> T isFeignSuccGetData(E dto, Function<Map, ObjectRestResponse<T>> function) throws BaseException {
return isFeignSuccGetObj(dto, function).getData();
}
private static void throwException(BaseException baseException, String name) {
if(null != baseException) {
throw baseException;
}else {
throw new BaseException(ResultCode.NOTEXIST_CODE, Sets.newSet(name));
}
}
private static void throwDBException(BaseException baseException) {
if(null != baseException) {
throw baseException;
}else {
throw new BaseException(ResultCode.DB_OPERATION_FAIL_CODE);
}
}
}
package com.github.wxiaoqi.security.common.util;
import java.beans.BeanInfo;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
public class DepthBeanToMap {
public static Map objectToMap(Object obj){
try{
Class type = obj.getClass();
Map returnMap = new HashMap();
BeanInfo beanInfo = Introspector.getBeanInfo(type);
PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors();
for (int i = 0; i< propertyDescriptors.length; i++) {
PropertyDescriptor descriptor = propertyDescriptors[i];
String propertyName = descriptor.getName();
if (!propertyName.equals("class")) {
Method readMethod = descriptor.getReadMethod();
Object result = readMethod.invoke(obj, new Object[0]);
if(result == null){
continue;
}
//判断是否为 基础类型 String,Boolean,Byte,Short,Integer,Long,Float,Double
//判断是否集合类,COLLECTION,MAP
if(result instanceof String
|| result instanceof Boolean
|| result instanceof Byte
|| result instanceof Short
|| result instanceof Integer
|| result instanceof Long
|| result instanceof Float
|| result instanceof Double
|| result instanceof Enum
){
if (result != null) {
returnMap.put(propertyName, result);
}
}else if(result instanceof Collection){
Collection<?> lstObj = arrayToMap((Collection<?>)result);
returnMap.put(propertyName, lstObj);
}else if(result instanceof Map){
Map<Object,Object> lstObj = mapToMap((Map<Object,Object>)result);
returnMap.put(propertyName, lstObj);
} else {
Map mapResult = objectToMap(result);
returnMap.put(propertyName, mapResult);
}
}
}
return returnMap;
}catch(Exception e){
throw new RuntimeException(e);
}
}
private static Map<Object, Object> mapToMap(Map<Object, Object> orignMap) {
Map<Object,Object> resultMap = new HashMap<Object,Object>();
for(Map.Entry<Object, Object> entry:orignMap.entrySet()){
Object key = entry.getKey();
Object resultKey = null;
if(key instanceof Collection){
resultKey = arrayToMap((Collection)key);
}else if(key instanceof Map){
resultKey = mapToMap((Map)key);
}
else{
if(key instanceof String
|| key instanceof Boolean
|| key instanceof Byte
|| key instanceof Short
|| key instanceof Integer
|| key instanceof Long
|| key instanceof Float
|| key instanceof Double
|| key instanceof Enum
){
if (key != null) {
resultKey = key;
}
}else{
resultKey = objectToMap(key);
}
}
Object value = entry.getValue();
Object resultValue = null;
if(value instanceof Collection){
resultValue = arrayToMap((Collection)value);
}else if(value instanceof Map){
resultValue = mapToMap((Map)value);
}
else{
if(value instanceof String
|| value instanceof Boolean
|| value instanceof Byte
|| value instanceof Short
|| value instanceof Integer
|| value instanceof Long
|| value instanceof Float
|| value instanceof Double
|| value instanceof Enum
){
if (value != null) {
resultValue = value;
}
}else{
resultValue = objectToMap(value);
}
}
resultMap.put(resultKey, resultValue);
}
return resultMap;
}
private static Collection arrayToMap(Collection lstObj){
ArrayList arrayList = new ArrayList();
for (Object t : lstObj) {
if(t instanceof Collection){
Collection result = arrayToMap((Collection)t);
arrayList.add(result);
}else if(t instanceof Map){
Map result = mapToMap((Map)t);
arrayList.add(result);
} else {
if(t instanceof String
|| t instanceof Boolean
|| t instanceof Byte
|| t instanceof Short
|| t instanceof Integer
|| t instanceof Long
|| t instanceof Float
|| t instanceof Double
|| t instanceof Enum
){
if (t != null) {
arrayList.add(t);
}
}else{
Object result = objectToMap(t);
arrayList.add(result);
}
}
}
return arrayList;
}
}
\ No newline at end of file
package com.github.wxiaoqi.security.common.vo;
import lombok.Data;
import java.util.List;
@Data
public class DataInterBean implements DataInter {
private List<Integer> DataCompanyIds;
private List<Integer> DataCorporationIds;
}
\ No newline at end of file
...@@ -7,6 +7,7 @@ import com.github.wxiaoqi.security.common.context.BaseContextHandler; ...@@ -7,6 +7,7 @@ import com.github.wxiaoqi.security.common.context.BaseContextHandler;
import com.github.wxiaoqi.security.common.exception.BaseException; import com.github.wxiaoqi.security.common.exception.BaseException;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.vo.DataInter; import com.github.wxiaoqi.security.common.vo.DataInter;
import com.github.wxiaoqi.security.common.vo.DataInterBean;
import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.context.request.ServletRequestAttributes;
...@@ -84,4 +85,14 @@ public interface UserRestInterface { ...@@ -84,4 +85,14 @@ public interface UserRestInterface {
} }
} }
default void setPowerData(DataInter dataInter){
setPowerData(dataInter, Boolean.TRUE);
}
default DataInterBean getDataInter() {
DataInterBean dataInterBean = new DataInterBean();
setPowerData(dataInterBean);
return dataInterBean;
}
} }
...@@ -24,6 +24,7 @@ public class ShuntApply implements Serializable { ...@@ -24,6 +24,7 @@ public class ShuntApply implements Serializable {
public static final int STATUS_CNL = 2; public static final int STATUS_CNL = 2;
public static final int STATUS_CONFIRM = 3; public static final int STATUS_CONFIRM = 3;
public static final int STATUS_ORDER = 4; public static final int STATUS_ORDER = 4;
public static final int STATUS_AUTOCNL = 5;
/** /**
* 主键 * 主键
......
package com.xxfc.platform.order.pojo.dto;
import com.alibaba.fastjson.JSONObject;
import com.github.wxiaoqi.security.common.vo.DataInter;
import com.github.wxiaoqi.security.common.vo.PageParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.List;
/**
* 提现申请DTO
* @author libin
* @version 1.0
* @description
* @data 2019/12/25 14:53
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class WalletCathApplyDTO {
@ApiModelProperty("门店")
private List<JSONObject> companyIds;
@ApiModelProperty("提现金额")
private BigDecimal amount;
@ApiModelProperty("提现账号")
private String accountNumber;
@ApiModelProperty("账号名称")
private String accountName;
}
package com.xxfc.platform.order.pojo.dto;
import com.github.wxiaoqi.security.common.vo.DataInter;
import com.github.wxiaoqi.security.common.vo.PageParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.List;
/**
* 门店收支明细DTO
* @author libin
* @version 1.0
* @description
* @data 2019/12/25 14:53
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class WalletCathDTO extends PageParam implements DataInter {
@ApiModelProperty("门店")
private Integer companyId;
@ApiModelProperty("企业")
private Integer branchId;
@ApiModelProperty("提现状态:0-未提现;1-已提现")
private Integer status;
@ApiModelProperty("开始时间")
private Long startTime;
@ApiModelProperty("结束时间")
private Long endTime;
@ApiModelProperty("提现单号")
private String orderNo;
List<Integer> dataCorporationIds;
List<Integer> dataCompanyIds;
}
package com.xxfc.platform.order.pojo.dto;
import com.github.wxiaoqi.security.common.vo.DataInter;
import com.github.wxiaoqi.security.common.vo.PageParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.List;
/**
* 门店收支明细DTO
* @author libin
* @version 1.0
* @description
* @data 2019/12/25 14:53
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class WalletDTO extends PageParam implements DataInter {
@ApiModelProperty("门店")
private Integer companyId;
@ApiModelProperty("企业")
private Integer branchId;
List<Integer> dataCorporationIds;
List<Integer> dataCompanyIds;
}
package com.xxfc.platform.order.pojo.order;
import com.xxfc.platform.order.entity.BaseOrder;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.persistence.Column;
import java.util.List;
@Data
public class OrderFullDTO extends BaseOrder {
private List<String> vehicleIds;
private String multiNotStatus;
private String multiStatus;
/**
* 开始时间 需要大于等于
*/
private Long startTimeGte;
/**
* 开始时间 需要小于等于
*/
private Long startTimeLte;
/**
* 结束时间 需要大于等于
*/
private Long endTimeGte;
/**
* 结束时间 需要小于等于
*/
private Long endTimeLte;
}
package com.xxfc.platform.order.pojo.order;
import com.xxfc.platform.order.entity.BaseOrder;
import com.xxfc.platform.order.entity.OrderMemberDetail;
import com.xxfc.platform.order.entity.OrderRentVehicleDetail;
import com.xxfc.platform.order.entity.OrderTourDetail;
import lombok.Data;
@Data
public class OrderFullVO extends BaseOrder {
OrderRentVehicleDetail orderRentVehicleDetail;
OrderTourDetail orderTourDetail;
OrderMemberDetail orderMemberDetail;
}
package com.xxfc.platform.order.pojo.vo;
import com.xxfc.platform.order.entity.CompanyWalletCath;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class CompanyWalletCathVo extends CompanyWalletCath {
@ApiModelProperty("门店名称")
private String companyName;
@ApiModelProperty("企业名称")
private String branchName;
@ApiModelProperty("企业名称")
private Long branchId;
}
package com.xxfc.platform.order.pojo.vo;
import com.xxfc.platform.order.entity.CompanyWallet;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class CompanyWalletVo extends CompanyWallet {
@ApiModelProperty("门店名称")
private String companyName;
@ApiModelProperty("企业名称")
private String branchName;
@ApiModelProperty("企业名称")
private Long branchId;
}
...@@ -8,6 +8,7 @@ import org.springframework.boot.SpringApplication; ...@@ -8,6 +8,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication(scanBasePackages = { @SpringBootApplication(scanBasePackages = {
...@@ -22,6 +23,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; ...@@ -22,6 +23,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@EnableFeignClients(value = {"com.github.wxiaoqi.security.auth.client.feign", "com.github.wxiaoqi.security.admin.feign", "com.xxfc.platform"},defaultConfiguration = HeaderConfig.class) @EnableFeignClients(value = {"com.github.wxiaoqi.security.auth.client.feign", "com.github.wxiaoqi.security.admin.feign", "com.xxfc.platform"},defaultConfiguration = HeaderConfig.class)
@EnableAceCache @EnableAceCache
@AddBasicConfiguration @AddBasicConfiguration
@EnableAspectJAutoProxy(exposeProxy = true)
@tk.mybatis.spring.annotation.MapperScan(basePackages = "com.xxfc.platform.order.mapper") @tk.mybatis.spring.annotation.MapperScan(basePackages = "com.xxfc.platform.order.mapper")
public class OrderApplication { public class OrderApplication {
public static void main(String[] args) { public static void main(String[] args) {
......
...@@ -3,12 +3,20 @@ package com.xxfc.platform.order.biz; ...@@ -3,12 +3,20 @@ package com.xxfc.platform.order.biz;
import com.github.wxiaoqi.security.common.biz.BaseBiz; import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.exception.BaseException;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.xxfc.platform.order.entity.*; import com.xxfc.platform.order.entity.*;
import com.xxfc.platform.order.mapper.CompanyWalletMapper; import com.xxfc.platform.order.mapper.CompanyWalletMapper;
import com.xxfc.platform.order.pojo.dto.WalletDTO;
import com.xxfc.platform.order.pojo.dto.WalletDetailDTO; import com.xxfc.platform.order.pojo.dto.WalletDetailDTO;
import com.xxfc.platform.order.pojo.vo.CompanyWalletVo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.List;
@Service @Service
@Slf4j @Slf4j
...@@ -25,6 +33,34 @@ public class CompanyWalletBiz extends BaseBiz<CompanyWalletMapper, CompanyWallet ...@@ -25,6 +33,34 @@ public class CompanyWalletBiz extends BaseBiz<CompanyWalletMapper, CompanyWallet
} }
//检查提现下一步操作
public CompanyWallet checkAmount(Integer companyId, BigDecimal amount) {
if (amount.compareTo(BigDecimal.ZERO) < 1) {
throw new BaseException("提现金额不能小于0", ResultCode.FAILED_CODE);
}
CompanyWallet companyWallet =selectById(companyId);
if (companyWallet == null) {
throw new BaseException( "钱包不存在",ResultCode.FAILED_CODE);
}
if (amount.compareTo(companyWallet.getBalance()) > 0) {
throw new BaseException("提现金额不能大于钱包金额和未审核提现金额",ResultCode.FAILED_CODE);
}
return companyWallet;
}
public List<CompanyWalletVo> getList(WalletDTO walletDTO){
return mapper.selectList(walletDTO);
}
public PageDataVO<CompanyWalletVo> selectList(WalletDTO walletDTO) {
return PageDataVO.pageInfo(walletDTO.getPage(), walletDTO.getLimit(), () -> getList(walletDTO));
}
......
package com.xxfc.platform.order.biz;
import cn.hutool.core.lang.Snowflake;
import com.alibaba.fastjson.JSONObject;
import com.github.wxiaoqi.security.admin.constant.WithDrawStatusEnum;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.exception.BaseException;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.xxfc.platform.order.contant.enumerate.CompanyWalletITypeEnum;
import com.xxfc.platform.order.entity.*;
import com.xxfc.platform.order.mapper.CompanyWalletCathMapper;
import com.xxfc.platform.order.pojo.dto.WalletCathApplyDTO;
import com.xxfc.platform.order.pojo.dto.WalletCathDTO;
import com.xxfc.platform.order.pojo.vo.CompanyWalletCathVo;
import com.xxfc.platform.order.pojo.vo.CompanyWalletDetailVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.Instant;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.List;
@Service
@Slf4j
public class CompanyWalletCathBiz extends BaseBiz<CompanyWalletCathMapper, CompanyWalletCath> implements InitializingBean {
@Autowired
CompanyWalletBiz companyWalletBiz;
@Autowired
CompanyWalletDetailBiz walletDetailBiz;
@Autowired
BranchCompanyBiz branchCompanyBiz;
private Snowflake snowflake;
private DateTimeFormatter dateTimeFormatter;
public List<CompanyWalletCathVo> getList(WalletCathDTO walletCathDTO){
return mapper.selectList(walletCathDTO);
}
public PageDataVO<CompanyWalletDetailVo> selectList(WalletCathDTO walletCathDTO) {
return PageDataVO.pageInfo(walletCathDTO.getPage(), walletCathDTO.getLimit(), () -> getList(walletCathDTO));
}
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public void applyCathList(WalletCathApplyDTO walletCathApplyDTO){
if (walletCathApplyDTO == null) {
throw new BaseException("参数不能为空",ResultCode.NULL_CODE);
}
List<JSONObject> companyIds = walletCathApplyDTO.getCompanyIds();
for (JSONObject object:companyIds){
CompanyWalletCath walletCathDTO=new CompanyWalletCath();
BeanUtils.copyProperties(walletCathApplyDTO,walletCathDTO);
walletCathDTO.setCompanyId(object.getInteger("companyId"));
walletCathDTO.setAmount(object.getBigDecimal("amount"));
applyCath(walletCathDTO);
}
}
//提现申请
public void applyCath(CompanyWalletCath walletCathDTO) {
if (walletCathDTO == null) {
throw new BaseException("参数不能为空",ResultCode.NULL_CODE);
}
Integer companyId = walletCathDTO.getCompanyId();
BigDecimal amount = walletCathDTO.getAmount();
//检查是否可以提现
BigDecimal cathAmount=mapper.sunAmountByStatus(companyId);
cathAmount=cathAmount.add(amount);
CompanyWallet companyWallet=companyWalletBiz.checkAmount(companyId, cathAmount);
CompanyWalletCath walletCath = new CompanyWalletCath();
BeanUtils.copyProperties(walletCathDTO,walletCath);
BigDecimal commission =BigDecimal.ZERO;
BigDecimal balnece = companyWallet.getBalance();
//到账金额
BigDecimal realAmount = amount.subtract(commission).setScale(2, RoundingMode.HALF_UP);
//提现单号
String orderNo = snowflake.nextIdStr();
orderNo = String.format("%s%s", dateTimeFormatter.format(LocalDate.now()), orderNo);
log.info("-----提现申请-----orderNo===" + orderNo + "----companyId====" + companyId + "---realAmount===" + realAmount);
walletCath.setCrtTime(Instant.now().toEpochMilli());
walletCath.setOrderNo(orderNo);
walletCath.setStauts(WithDrawStatusEnum.AUDIT.getCode());
walletCath.setBalance(balnece);
walletCath.setRealAmount(realAmount);
walletCath.setCommission(commission);
walletCath.setWithdrawWay(2);
insertSelective(walletCath);
}
public void withDrawProcess(CompanyWalletCath companyWalletCath) {
WalletCathDTO walletCathDTO=new WalletCathDTO();
walletCathDTO.setOrderNo(companyWalletCath.getOrderNo());
List<CompanyWalletCathVo> list = getList(walletCathDTO);
if (list == null || list.size() == 0) {
throw new BaseException("提现记录不存在",ResultCode.FAILED_CODE);
}
CompanyWalletCathVo walletCathVo=list.get(0);
if (walletCathVo.getStauts() == WithDrawStatusEnum.SUCCESS.getCode()) {
throw new BaseException("已审核",ResultCode.FAILED_CODE);
}
CompanyWallet companyWallet=companyWalletBiz.selectById(walletCathVo.getCompanyId());
if (companyWallet == null) {
throw new BaseException("钱包不存在", ResultCode.FAILED_CODE);
}
companyWalletCath.setFinishTime(Instant.now().toEpochMilli());
companyWalletCath.setId(walletCathVo.getId());
updateSelectiveById(companyWalletCath);
if (companyWalletCath.getStauts() == WithDrawStatusEnum.SUCCESS.getCode()) {
BigDecimal sAmount=companyWallet.getBalance().subtract(walletCathVo.getAmount()).setScale(2, RoundingMode.HALF_UP);
CompanyWalletDetail detail = new CompanyWalletDetail();
detail.setCono(walletCathVo.getOrderNo());
detail.setSAmount(sAmount);
detail.setAmount(walletCathVo.getAmount());
detail.setItype(CompanyWalletITypeEnum.CATH.getCode());
//设置提现单号
detail.setCompanyId(walletCathVo.getCompanyId());
detail.setBranchId(walletCathVo.getBranchId());
walletDetailBiz.insertSelective(detail);
//更新钱包
BigDecimal withdrawals = companyWallet.getWithdrawals().add(walletCathVo.getAmount()).setScale(2, RoundingMode.HALF_UP);
companyWallet.setBalance(sAmount);
companyWallet.setWithdrawals(withdrawals);
companyWalletBiz.updCompanyWallet(companyWallet);
}
}
@Override
public void afterPropertiesSet() throws Exception {
snowflake = new Snowflake(2, 2, false);
dateTimeFormatter = DateTimeFormatter.ofPattern("YYYYMMdd");
}
}
...@@ -10,6 +10,8 @@ import com.github.wxiaoqi.security.common.util.result.JsonResultUtil; ...@@ -10,6 +10,8 @@ import com.github.wxiaoqi.security.common.util.result.JsonResultUtil;
import com.xxfc.platform.order.biz.inner.OrderCalculateBiz; import com.xxfc.platform.order.biz.inner.OrderCalculateBiz;
import com.xxfc.platform.order.entity.OrderRentVehicleDetail; import com.xxfc.platform.order.entity.OrderRentVehicleDetail;
import com.xxfc.platform.order.mapper.OrderRentVehicleDetailMapper; import com.xxfc.platform.order.mapper.OrderRentVehicleDetailMapper;
import com.xxfc.platform.order.pojo.order.OrderFullDTO;
import com.xxfc.platform.order.pojo.order.OrderFullVO;
import com.xxfc.platform.order.pojo.order.RentVehicleBO; import com.xxfc.platform.order.pojo.order.RentVehicleBO;
import com.xxfc.platform.order.pojo.order.add.AddRentVehicleDTO; import com.xxfc.platform.order.pojo.order.add.AddRentVehicleDTO;
import com.xxfc.platform.vehicle.entity.BranchCompany; import com.xxfc.platform.vehicle.entity.BranchCompany;
...@@ -145,5 +147,9 @@ public class OrderRentVehicleBiz extends BaseBiz<OrderRentVehicleDetailMapper, O ...@@ -145,5 +147,9 @@ public class OrderRentVehicleBiz extends BaseBiz<OrderRentVehicleDetailMapper, O
return bo; return bo;
} }
public List<OrderFullVO> selectListFull(OrderFullDTO dto) {
return mapper.selectListFull(dto);
}
} }
\ No newline at end of file
package com.xxfc.platform.order.biz; package com.xxfc.platform.order.biz;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.ace.cache.annotation.Cache;
import com.ace.cache.annotation.CacheClear;
import com.github.wxiaoqi.security.admin.entity.BaseUserMemberLevel; import com.github.wxiaoqi.security.admin.entity.BaseUserMemberLevel;
import com.github.wxiaoqi.security.common.biz.BaseBiz; import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.exception.BaseException; import com.github.wxiaoqi.security.common.exception.BaseException;
...@@ -8,14 +12,21 @@ import com.github.wxiaoqi.security.common.msg.auth.PageResult; ...@@ -8,14 +12,21 @@ import com.github.wxiaoqi.security.common.msg.auth.PageResult;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.xxfc.platform.order.Utils.OrderDateUtils; import com.xxfc.platform.order.Utils.OrderDateUtils;
import com.xxfc.platform.order.contant.enumerate.OrderInquiryType; import com.xxfc.platform.order.contant.enumerate.OrderInquiryType;
import com.xxfc.platform.order.contant.enumerate.OrderStatusEnum;
import com.xxfc.platform.order.contant.enumerate.OrderTypeEnum; import com.xxfc.platform.order.contant.enumerate.OrderTypeEnum;
import com.xxfc.platform.order.contant.enumerate.RefundStatusEnum;
import com.xxfc.platform.order.entity.*; import com.xxfc.platform.order.entity.*;
import com.xxfc.platform.order.mapper.OrderStatisticsMapper; import com.xxfc.platform.order.mapper.OrderStatisticsMapper;
import com.xxfc.platform.order.pojo.*; import com.xxfc.platform.order.pojo.*;
import com.xxfc.platform.order.pojo.order.OrderFullDTO;
import com.xxfc.platform.order.pojo.order.OrderFullVO;
import com.xxfc.platform.order.rest.background.BgStatisticsController;
import com.xxfc.platform.vehicle.constant.RedisKey;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.assertj.core.util.Lists; import org.assertj.core.util.Lists;
import org.springframework.aop.framework.AopContext;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -26,6 +37,8 @@ import java.util.HashMap; ...@@ -26,6 +37,8 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_TRUE;
/** /**
* @author Administrator * @author Administrator
...@@ -46,6 +59,9 @@ public class OrderStatisticsBiz extends BaseBiz<OrderStatisticsMapper, OrderStat ...@@ -46,6 +59,9 @@ public class OrderStatisticsBiz extends BaseBiz<OrderStatisticsMapper, OrderStat
private DailyTravelOrderStatisticsBiz travelStatisticsBiz; private DailyTravelOrderStatisticsBiz travelStatisticsBiz;
@Autowired @Autowired
private DailyMembersOrderStatisticsBiz membersStatisticsBiz; private DailyMembersOrderStatisticsBiz membersStatisticsBiz;
@Autowired
OrderRentVehicleBiz orderRentVehicleBiz;
public HomePageOrderData getTotalOrder(List<Integer> companyIds, Integer dataAll) { public HomePageOrderData getTotalOrder(List<Integer> companyIds, Integer dataAll) {
HomePageOrderData result = new HomePageOrderData(); HomePageOrderData result = new HomePageOrderData();
...@@ -378,4 +394,72 @@ public class OrderStatisticsBiz extends BaseBiz<OrderStatisticsMapper, OrderStat ...@@ -378,4 +394,72 @@ public class OrderStatisticsBiz extends BaseBiz<OrderStatisticsMapper, OrderStat
map.put(memberLevel.getName() + "购买量", number); map.put(memberLevel.getName() + "购买量", number);
map.put("支付金额(" + memberLevel.getName() + ")", amount); map.put("支付金额(" + memberLevel.getName() + ")", amount);
} }
@Cache(key = RedisKey.STATISTICS_ORDER_DAY+"{1}{2}")
public BgStatisticsController.IndexOrderVO handleStatistics(String companyIds, String timeStr, List<String> vehicleIds) {
//清空 RedisKey.STATISTICS_ORDER_DAY+"{1}"
getMyBiz().getMyBiz().cacheClearStatistics(companyIds);
BgStatisticsController.IndexOrderVO indexOrderVO = new BgStatisticsController.IndexOrderVO();
OrderFullDTO orderFullDTO = new OrderFullDTO(){{
setCrtTime(DateUtil.beginOfDay(DateUtil.date()));
setHasPay(SYS_TRUE);
setVehicleIds(vehicleIds);
setMultiNotStatus(OrderStatusEnum.ORDER_CANCEL.getCode().toString());
}};
List<OrderFullVO> orderFullVOS = orderRentVehicleBiz.selectListFull(orderFullDTO);
//今天订单金额
BigDecimal allAmount = orderFullVOS.parallelStream().map(BaseOrder::getRealAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
//今天订单数量
Long allNum = Long.valueOf(orderFullVOS.size());
//获取今天出发订单
OrderFullDTO orderFullDTO2 = new OrderFullDTO(){{
setStartTimeGte(DateUtil.beginOfDay(DateUtil.date()).getTime());
setStartTimeLte(DateUtil.endOfDay(DateUtil.date()).getTime());
setVehicleIds(vehicleIds);
setMultiStatus(OrderStatusEnum.ORDER_TOSTART.getCode().toString());
}};
List<OrderFullVO> orderFullVOS2 = orderRentVehicleBiz.selectListFull(orderFullDTO2);
//今天出发车辆数量
Long toLiftNum = Long.valueOf(orderFullVOS2.size());
//获取今天归还订单
OrderFullDTO orderFullDTO3 = new OrderFullDTO(){{
setEndTimeGte(DateUtil.beginOfDay(DateUtil.date()).getTime());
setEndTimeLte(DateUtil.endOfDay(DateUtil.date()).getTime());
setVehicleIds(vehicleIds);
setMultiStatus(OrderStatusEnum.ORDER_WAIT.getCode().toString());
}};
List<OrderFullVO> orderFullVOS3 = orderRentVehicleBiz.selectListFull(orderFullDTO3);
//今天归还车辆数量
Long toReturnNum = Long.valueOf(orderFullVOS3.size());
//获取今天归还订单
OrderFullDTO orderFullDTO4 = new OrderFullDTO(){{
setVehicleIds(vehicleIds);
setMultiStatus(OrderStatusEnum.ORDER_FINISH.getCode().toString());
setRefundStatus(RefundStatusEnum.RESIDUE_ILLEGAL.getCode());
}};
List<OrderFullVO> orderFullVOS4 = orderRentVehicleBiz.selectListFull(orderFullDTO4);
//今天归还车辆数量
Long toDealTrafficNum = Long.valueOf(orderFullVOS4.size());
indexOrderVO.setCurrDayOrderAmount(allAmount);
indexOrderVO.setCurrDayOrderNum(allNum);
indexOrderVO.setCurrDayToLiftVehicleNum(toLiftNum);
indexOrderVO.setCurrDayToReturnVehicleNum(toReturnNum);
indexOrderVO.setToDealTrafficPay(toDealTrafficNum);
return indexOrderVO;
}
@CacheClear(pre = RedisKey.STATISTICS_ORDER_DAY+"{1}")
public void cacheClearStatistics(String companyIds) {;}
private OrderStatisticsBiz getMyBiz() {
return AopContext.currentProxy() != null ? (OrderStatisticsBiz) AopContext.currentProxy() : this;
}
} }
...@@ -60,7 +60,8 @@ public class WebConfiguration implements WebMvcConfigurer { ...@@ -60,7 +60,8 @@ public class WebConfiguration implements WebMvcConfigurer {
"/orderMember/**", "/orderMember/**",
"/orderRefund/**", "/orderRefund/**",
"/orderVehicle/**", "/orderVehicle/**",
"/shuntApply/**" "/shuntApply/**",
"/admin/**",
}; };
Collections.addAll(list, urls); Collections.addAll(list, urls);
return list; return list;
......
...@@ -2,8 +2,15 @@ package com.xxfc.platform.order.mapper; ...@@ -2,8 +2,15 @@ package com.xxfc.platform.order.mapper;
import com.xxfc.platform.order.entity.CompanyWalletCath; import com.xxfc.platform.order.entity.CompanyWalletCath;
import com.xxfc.platform.order.pojo.dto.WalletCathDTO;
import com.xxfc.platform.order.pojo.vo.CompanyWalletCathVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper; import tk.mybatis.mapper.common.Mapper;
import java.math.BigDecimal;
import java.util.List;
/** /**
* 钱包提现表 * 钱包提现表
...@@ -14,4 +21,9 @@ import tk.mybatis.mapper.common.Mapper; ...@@ -14,4 +21,9 @@ import tk.mybatis.mapper.common.Mapper;
*/ */
public interface CompanyWalletCathMapper extends Mapper<CompanyWalletCath> { public interface CompanyWalletCathMapper extends Mapper<CompanyWalletCath> {
List<CompanyWalletCathVo> selectList(WalletCathDTO walletCathDTO);
@Select("SELECT IFNULL(SUM(amount),0) FROM company_wallet_cath WHERE company_id =#{companyId} AND stauts=0")
BigDecimal sunAmountByStatus(@Param("companyId")Integer companyId);
} }
...@@ -3,11 +3,15 @@ package com.xxfc.platform.order.mapper; ...@@ -3,11 +3,15 @@ package com.xxfc.platform.order.mapper;
import com.xxfc.platform.order.entity.CompanyWallet; import com.xxfc.platform.order.entity.CompanyWallet;
import com.xxfc.platform.order.pojo.dto.WalletDTO;
import com.xxfc.platform.order.pojo.dto.WalletDetailDTO; import com.xxfc.platform.order.pojo.dto.WalletDetailDTO;
import com.xxfc.platform.order.pojo.vo.CompanyWalletVo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update; import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper; import tk.mybatis.mapper.common.Mapper;
import java.util.List;
/** /**
* 我的钱包 * 我的钱包
* *
...@@ -25,4 +29,7 @@ public interface CompanyWalletMapper extends Mapper<CompanyWallet> { ...@@ -25,4 +29,7 @@ public interface CompanyWalletMapper extends Mapper<CompanyWallet> {
CompanyWallet sumAmount(WalletDetailDTO walletDetailDTO); CompanyWallet sumAmount(WalletDetailDTO walletDetailDTO);
List<CompanyWalletVo> selectList(WalletDTO walletDTO);
} }
package com.xxfc.platform.order.mapper; package com.xxfc.platform.order.mapper;
import com.xxfc.platform.order.entity.OrderRentVehicleDetail; import com.xxfc.platform.order.entity.OrderRentVehicleDetail;
import com.xxfc.platform.order.pojo.order.OrderFullDTO;
import com.xxfc.platform.order.pojo.order.OrderFullVO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper; import tk.mybatis.mapper.common.Mapper;
...@@ -16,5 +18,6 @@ import java.util.List; ...@@ -16,5 +18,6 @@ import java.util.List;
public interface OrderRentVehicleDetailMapper extends Mapper<OrderRentVehicleDetail> { public interface OrderRentVehicleDetailMapper extends Mapper<OrderRentVehicleDetail> {
public List<OrderRentVehicleDetail> listByOrderId(@Param("orderId") Integer orderId); public List<OrderRentVehicleDetail> listByOrderId(@Param("orderId") Integer orderId);
public Integer getPScore(@Param("modelId") Integer modelId); public Integer getPScore(@Param("modelId") Integer modelId);
public List<OrderFullVO> selectListFull(OrderFullDTO dto);
} }
...@@ -149,7 +149,7 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp ...@@ -149,7 +149,7 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
RentVehicleBO bo = orderRentVehicleBiz.initRentVehicleBO(dto); RentVehicleBO bo = orderRentVehicleBiz.initRentVehicleBO(dto);
bo.setAppUserDTO(userFeign.userDetailByToken(BaseContextHandler.getToken()).getData()); bo.setAppUserDTO(userFeign.userDetailByToken(BaseContextHandler.getToken()).getData());
orderRentVehicleService.createOrder(bo); orderRentVehicleService.applyCreateOrder(bo, shuntApply.getOrderNo());
return ObjectRestResponse.succ(bo.getOrder()); return ObjectRestResponse.succ(bo.getOrder());
} }
......
...@@ -6,12 +6,19 @@ import com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface; ...@@ -6,12 +6,19 @@ import com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController; import com.github.wxiaoqi.security.common.rest.BaseController;
import com.github.wxiaoqi.security.common.vo.PageDataVO; import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.xxfc.platform.order.biz.CompanyWalletBiz;
import com.xxfc.platform.order.biz.CompanyWalletCathBiz;
import com.xxfc.platform.order.biz.CompanyWalletDetailBiz; import com.xxfc.platform.order.biz.CompanyWalletDetailBiz;
import com.xxfc.platform.order.entity.CompanyWalletCath;
import com.xxfc.platform.order.entity.CompanyWalletDetail; import com.xxfc.platform.order.entity.CompanyWalletDetail;
import com.xxfc.platform.order.pojo.dto.WalletCathApplyDTO;
import com.xxfc.platform.order.pojo.dto.WalletCathDTO;
import com.xxfc.platform.order.pojo.dto.WalletDTO;
import com.xxfc.platform.order.pojo.dto.WalletDetailDTO; import com.xxfc.platform.order.pojo.dto.WalletDetailDTO;
import com.xxfc.platform.order.pojo.vo.CompanyWalletDetailVo; import com.xxfc.platform.order.pojo.vo.CompanyWalletDetailVo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -29,9 +36,16 @@ public class AdminCompanyWalletDetailController extends BaseController<CompanyWa ...@@ -29,9 +36,16 @@ public class AdminCompanyWalletDetailController extends BaseController<CompanyWa
} }
@Autowired
CompanyWalletCathBiz walletCathBiz;
@Autowired
CompanyWalletBiz walletBiz;
@RequestMapping(value = "selectList", method = RequestMethod.GET) @RequestMapping(value = "selectList", method = RequestMethod.GET)
@ApiModelProperty(value = "营收明细列表") @ApiModelProperty(value = "营收明细列表")
public ObjectRestResponse<PageDataVO<CompanyWalletDetailVo>> refundAmount(WalletDetailDTO walletDetailDTO) { public ObjectRestResponse<PageDataVO<CompanyWalletDetailVo>> selectList(WalletDetailDTO walletDetailDTO) {
setPowerData(walletDetailDTO,true); setPowerData(walletDetailDTO,true);
return ObjectRestResponse.succ(baseBiz.selectList(walletDetailDTO)); return ObjectRestResponse.succ(baseBiz.selectList(walletDetailDTO));
} }
...@@ -44,4 +58,45 @@ public class AdminCompanyWalletDetailController extends BaseController<CompanyWa ...@@ -44,4 +58,45 @@ public class AdminCompanyWalletDetailController extends BaseController<CompanyWa
return ObjectRestResponse.succ(baseBiz.getSumAmount(walletDetailDTO)); return ObjectRestResponse.succ(baseBiz.getSumAmount(walletDetailDTO));
} }
@RequestMapping(value = "cath/selectList", method = RequestMethod.GET)
@ApiModelProperty(value = "提现明细列表")
public ObjectRestResponse<PageDataVO<CompanyWalletDetailVo>> cathSelectList(WalletCathDTO walletCathDTO) {
setPowerData(walletCathDTO,true);
return ObjectRestResponse.succ(walletCathBiz.selectList(walletCathDTO));
}
@RequestMapping(value = "amount/selectList", method = RequestMethod.GET)
@ApiModelProperty(value = "钱包列表")
public ObjectRestResponse<PageDataVO<CompanyWalletDetailVo>> amountSelectList(WalletDTO walletDTO) {
setPowerData(walletDTO,true);
return ObjectRestResponse.succ(walletBiz.selectList(walletDTO));
}
@RequestMapping(value = "applyCath", method = RequestMethod.POST)
@ApiModelProperty(value = "提现申请")
public ObjectRestResponse applyCath(@RequestBody CompanyWalletCath walletCathDTO) {
walletCathBiz.applyCath(walletCathDTO);
return ObjectRestResponse.succ();
}
@RequestMapping(value = "applyCathList", method = RequestMethod.POST)
@ApiModelProperty(value = "提现申请List")
public ObjectRestResponse applyCathList(@RequestBody WalletCathApplyDTO walletCathApplyDTO) {
walletCathBiz.applyCathList(walletCathApplyDTO);
return ObjectRestResponse.succ();
}
@RequestMapping(value = "withDrawProcess", method = RequestMethod.POST)
@ApiModelProperty(value = "提现审核")
public ObjectRestResponse withDrawProcess(@RequestBody CompanyWalletCath companyWalletCath) {
walletCathBiz.withDrawProcess(companyWalletCath);
return ObjectRestResponse.succ();
}
} }
\ No newline at end of file
...@@ -6,6 +6,7 @@ import com.github.wxiaoqi.security.common.context.BaseContextHandler; ...@@ -6,6 +6,7 @@ import com.github.wxiaoqi.security.common.context.BaseContextHandler;
import com.github.wxiaoqi.security.common.exception.BaseException; 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.rest.BaseController; import com.github.wxiaoqi.security.common.rest.BaseController;
import com.github.wxiaoqi.security.common.util.OrderUtil;
import com.github.wxiaoqi.security.common.util.Query; import com.github.wxiaoqi.security.common.util.Query;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.vo.PageDataVO; import com.github.wxiaoqi.security.common.vo.PageDataVO;
...@@ -13,10 +14,12 @@ import com.github.wxiaoqi.security.common.vo.PageParam; ...@@ -13,10 +14,12 @@ import com.github.wxiaoqi.security.common.vo.PageParam;
import com.xxfc.platform.order.biz.OrderRentVehicleBiz; import com.xxfc.platform.order.biz.OrderRentVehicleBiz;
import com.xxfc.platform.order.biz.ShuntApplyBiz; import com.xxfc.platform.order.biz.ShuntApplyBiz;
import com.xxfc.platform.order.biz.inner.OrderCalculateBiz; import com.xxfc.platform.order.biz.inner.OrderCalculateBiz;
import com.xxfc.platform.order.entity.BaseOrder;
import com.xxfc.platform.order.entity.ShuntApply; import com.xxfc.platform.order.entity.ShuntApply;
import com.xxfc.platform.order.pojo.order.RentVehicleBO; import com.xxfc.platform.order.pojo.order.RentVehicleBO;
import com.xxfc.platform.order.pojo.order.add.BgAddRentDTO; import com.xxfc.platform.order.pojo.order.add.BgAddRentDTO;
import com.xxfc.platform.order.service.OrderRentVehicleService; import com.xxfc.platform.order.service.OrderRentVehicleService;
import com.xxfc.platform.vehicle.constant.VehicleBookRecordStatus;
import com.xxfc.platform.vehicle.entity.VehicleModel; import com.xxfc.platform.vehicle.entity.VehicleModel;
import com.xxfc.platform.vehicle.feign.VehicleFeign; import com.xxfc.platform.vehicle.feign.VehicleFeign;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -66,8 +69,22 @@ public class BgShuntApplyController extends BaseController<ShuntApplyBiz, ShuntA ...@@ -66,8 +69,22 @@ public class BgShuntApplyController extends BaseController<ShuntApplyBiz, ShuntA
throw new BaseException(ResultCode.PARAM_ILLEGAL_CODE); throw new BaseException(ResultCode.PARAM_ILLEGAL_CODE);
} }
RentVehicleBO detail = new RentVehicleBO();
detail.setStartTime(shuntApply.getStartTime());
detail.setEndTime(shuntApply.getEndTime());
detail.setVehicleId(shuntApply.getVehicleId());
detail.setModelId(shuntApply.getModelId());
detail.setStartAddr(shuntApply.getStartCompanyName());
detail.setStartCompanyId(shuntApply.getStartCompanyId());
detail.setEndCompanyId(shuntApply.getEndCompanyId());
detail.setOrder(new BaseOrder(){{setNo(OrderUtil.GetOrderNumber("", OrderUtil.APP_MID));}});
//预约车辆
orderRentVehicleService.acquireVehicle(detail, null , VehicleBookRecordStatus.APPROVE.getCode());
shuntApply.setVehicleId(dto.getVehicleId()); shuntApply.setVehicleId(dto.getVehicleId());
shuntApply.setStatus(STATUS_CONFIRM); shuntApply.setStatus(STATUS_CONFIRM);
shuntApply.setOrderNo(detail.getOrder().getNo());
baseBiz.updateSelectiveById(shuntApply); baseBiz.updateSelectiveById(shuntApply);
return ObjectRestResponse.succ(); return ObjectRestResponse.succ();
......
package com.xxfc.platform.order.rest.background; package com.xxfc.platform.order.rest.background;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.IoUtil; import cn.hutool.core.io.IoUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.poi.excel.ExcelUtil; import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.ExcelWriter; import cn.hutool.poi.excel.ExcelWriter;
import com.ace.cache.annotation.Cache;
import com.github.wxiaoqi.security.admin.entity.BaseUserMemberLevel; import com.github.wxiaoqi.security.admin.entity.BaseUserMemberLevel;
import com.github.wxiaoqi.security.admin.feign.UserFeign; import com.github.wxiaoqi.security.admin.feign.UserFeign;
import com.github.wxiaoqi.security.admin.feign.dto.UserDTO; import com.github.wxiaoqi.security.admin.feign.dto.UserDTO;
import com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface;
import com.github.wxiaoqi.security.auth.client.config.UserAuthConfig; import com.github.wxiaoqi.security.auth.client.config.UserAuthConfig;
import com.github.wxiaoqi.security.common.exception.BaseException; 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.rest.BaseController; import com.github.wxiaoqi.security.common.rest.BaseController;
import com.github.wxiaoqi.security.common.util.AssertUtils;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.xxfc.platform.order.biz.DailyMembersOrderStatisticsBiz; import com.github.wxiaoqi.security.common.vo.DataInter;
import com.xxfc.platform.order.biz.DailyTravelOrderStatisticsBiz; import com.github.wxiaoqi.security.common.vo.DataInterBean;
import com.xxfc.platform.order.biz.DailyVehicleOrderStatisticsBiz; import com.xxfc.platform.order.biz.*;
import com.xxfc.platform.order.biz.OrderStatisticsBiz; import com.xxfc.platform.order.contant.enumerate.DepositRefundStatus;
import com.xxfc.platform.order.contant.enumerate.OrderStatusEnum;
import com.xxfc.platform.order.contant.enumerate.RefundStatusEnum;
import com.xxfc.platform.order.entity.BaseOrder;
import com.xxfc.platform.order.entity.OrderRentVehicleDetail;
import com.xxfc.platform.order.entity.OrderStatistics; import com.xxfc.platform.order.entity.OrderStatistics;
import com.xxfc.platform.order.pojo.MembersOrderDto; import com.xxfc.platform.order.pojo.MembersOrderDto;
import com.xxfc.platform.order.pojo.OrderQuery; import com.xxfc.platform.order.pojo.OrderQuery;
import com.xxfc.platform.order.pojo.order.OrderFullDTO;
import com.xxfc.platform.order.pojo.order.OrderFullVO;
import com.xxfc.platform.vehicle.constant.RedisKey;
import com.xxfc.platform.vehicle.entity.Vehicle;
import com.xxfc.platform.vehicle.feign.VehicleFeign; import com.xxfc.platform.vehicle.feign.VehicleFeign;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -30,8 +45,12 @@ import javax.servlet.ServletOutputStream; ...@@ -30,8 +45,12 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.ParseException; import java.text.ParseException;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_TRUE;
/** /**
* @author Administrator * @author Administrator
...@@ -40,19 +59,45 @@ import java.util.List; ...@@ -40,19 +59,45 @@ import java.util.List;
@RestController @RestController
@RequestMapping("/background/statistics") @RequestMapping("/background/statistics")
@Api(description = "每月总的订单统计") @Api(description = "每月总的订单统计")
public class BgStatisticsController extends BaseController<OrderStatisticsBiz, OrderStatistics> { public class BgStatisticsController extends BaseController<OrderStatisticsBiz, OrderStatistics> implements UserRestInterface {
@Autowired
BaseOrderBiz baseOrderBiz;
@Autowired
OrderRentVehicleBiz orderRentVehicleBiz;
@Autowired
UserFeign userFeign;
@Autowired
VehicleFeign vehicleFeign;
@Override
public UserFeign getUserFeign() {
return userFeign;
}
@GetMapping("/indexOrder") @GetMapping("/indexOrder")
@ApiOperation(value = "首页订单统计") @ApiOperation(value = "首页订单统计")
public ObjectRestResponse<IndexOrderVO> indexOrder() { public ObjectRestResponse<IndexOrderVO> indexOrder() {
IndexOrderVO indexOrderVO = new IndexOrderVO(); //获取当前用户所在的公司
indexOrderVO.setCurrDayOrderAmount(new BigDecimal("1000000000.00")); if (StrUtil.isBlank(getCurrentUserId())) {
indexOrderVO.setCurrDayOrderNum(2L); throw new BaseException(ResultCode.AJAX_WECHAT_NOTEXIST_CODE);
indexOrderVO.setCurrDayToLiftVehicleNum(3L); }
indexOrderVO.setCurrDayToReturnVehicleNum(4L); DataInterBean dataInterBean = getDataInter();
indexOrderVO.setToDealTrafficPay(5L);
//获取公司对应的车的id
String companyIds = StrUtil.join(",", dataInterBean.getDataCompanyIds());
String timeStr = DatePattern.NORM_DATETIME_MINUTE_FORMAT.format(new DateTime());
if(companyIds == null || "null".equals(companyIds)) {
companyIds = "0";
}
ObjectRestResponse<List<Vehicle>> feignResponse = vehicleFeign.vehicleSelectByCompanyIds(companyIds);
List<String> vehicleIds = feignResponse.getData().parallelStream().map(Vehicle::getId).collect(Collectors.toList());
//获取会员订单统计信息 //获取会员订单统计信息
return ObjectRestResponse.succ(indexOrderVO); return ObjectRestResponse.succ(baseBiz.handleStatistics(companyIds, timeStr, vehicleIds));
} }
@Data @Data
......
...@@ -66,7 +66,7 @@ public abstract class AbstractOrderHandle<Biz extends BaseBiz, Detail extends Or ...@@ -66,7 +66,7 @@ public abstract class AbstractOrderHandle<Biz extends BaseBiz, Detail extends Or
* 创建基础订单 * 创建基础订单
* @return * @return
*/ */
public BaseOrder createBaseOrder(Integer orderOrigin, String facilitatePhone, AppUserDTO appUserDTO) { public BaseOrder createBaseOrder(Integer orderOrigin, String facilitatePhone, AppUserDTO appUserDTO, String orderNo) {
BaseOrder baseOrder = new BaseOrder(); BaseOrder baseOrder = new BaseOrder();
//设置下单来源 //设置下单来源
...@@ -82,7 +82,11 @@ public abstract class AbstractOrderHandle<Biz extends BaseBiz, Detail extends Or ...@@ -82,7 +82,11 @@ public abstract class AbstractOrderHandle<Biz extends BaseBiz, Detail extends Or
} }
//设置订单号 //设置订单号
baseOrder.setNo(OrderUtil.GetOrderNumber("", OrderUtil.APP_MID)); if(StrUtil.isBlank(orderNo)) {
baseOrder.setNo(orderNo);
} else {
baseOrder.setNo(OrderUtil.GetOrderNumber("", OrderUtil.APP_MID));
}
//设置订单类型 //设置订单类型
if(null == orderTypeEnum) if(null == orderTypeEnum)
throw new BaseException(ResultCode.NOTEXIST_CODE); throw new BaseException(ResultCode.NOTEXIST_CODE);
...@@ -107,6 +111,14 @@ public abstract class AbstractOrderHandle<Biz extends BaseBiz, Detail extends Or ...@@ -107,6 +111,14 @@ public abstract class AbstractOrderHandle<Biz extends BaseBiz, Detail extends Or
return baseOrder; return baseOrder;
} }
/**
* 创建基础订单
* @return
*/
public BaseOrder createBaseOrder(Integer orderOrigin, String facilitatePhone, AppUserDTO appUserDTO) {
return createBaseOrder(orderOrigin, facilitatePhone, appUserDTO, null);
}
public void initDetail(Detail detail) { public void initDetail(Detail detail) {
// Integer appUserId = (null == detail.getAppUserDTO())? Integer.valueOf(BaseContextHandler.getUserID()): detail.getAppUserDTO().getUserid(); // Integer appUserId = (null == detail.getAppUserDTO())? Integer.valueOf(BaseContextHandler.getUserID()): detail.getAppUserDTO().getUserid();
BaseOrder order = createBaseOrder(detail.getOrderOrigin(), detail.getFacilitatePhone(), detail.getAppUserDTO()); BaseOrder order = createBaseOrder(detail.getOrderOrigin(), detail.getFacilitatePhone(), detail.getAppUserDTO());
......
...@@ -23,6 +23,7 @@ import com.xxfc.platform.order.contant.enumerate.ItemTypeEnum; ...@@ -23,6 +23,7 @@ import com.xxfc.platform.order.contant.enumerate.ItemTypeEnum;
import com.xxfc.platform.order.contant.enumerate.OrderCostEnum; import com.xxfc.platform.order.contant.enumerate.OrderCostEnum;
import com.xxfc.platform.order.contant.enumerate.OrderStatusEnum; import com.xxfc.platform.order.contant.enumerate.OrderStatusEnum;
import com.xxfc.platform.order.contant.enumerate.OrderTypeEnum; import com.xxfc.platform.order.contant.enumerate.OrderTypeEnum;
import com.xxfc.platform.order.entity.BaseOrder;
import com.xxfc.platform.order.entity.OrderItem; import com.xxfc.platform.order.entity.OrderItem;
import com.xxfc.platform.order.entity.OrderTemplate; import com.xxfc.platform.order.entity.OrderTemplate;
import com.xxfc.platform.order.pojo.OrderAccompanyDTO; import com.xxfc.platform.order.pojo.OrderAccompanyDTO;
...@@ -94,6 +95,26 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl ...@@ -94,6 +95,26 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
this.orderTypeEnum = OrderTypeEnum.RENT_VEHICLE; this.orderTypeEnum = OrderTypeEnum.RENT_VEHICLE;
} }
/**
* 创建订单及其子项
* @param detail
*/
public void applyCreateOrder(RentVehicleBO detail, String orderNo) {
//初始化
applyInitDetail(detail, orderNo);
//计算价格
handleCalculate(detail);
//插入baseOrder
baseOrderBiz.insertSelective(detail.getOrder());
//处理detail
handleDetail(detail);
}
public void applyInitDetail(RentVehicleBO bo, String orderNo) {
BaseOrder order = createBaseOrder(bo.getOrderOrigin(), bo.getFacilitatePhone(), bo.getAppUserDTO(), orderNo);
bo.setOrder(order);
initDetailSecond(bo);
}
@Override @Override
public void initDetail(RentVehicleBO bo) { public void initDetail(RentVehicleBO bo) {
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.xxfc.platform.order.mapper.CompanyWalletCathMapper">
<select id="selectList" resultType="com.xxfc.platform.order.pojo.vo.CompanyWalletCathVo" parameterType="com.xxfc.platform.order.pojo.dto.WalletCathDTO">
SELECT
wc.*,
c.`name` as companyName,
ci.`name` as branchName,
ci.id as branchId
FROM company_wallet_cath wc
LEFT JOIN branch_company c ON wc.company_id =c.id
LEFT JOIN company_info ci ON c.company_id=ci.id
<where>
<if test="companyId != null and companyId > 0">
and wc.company_id=#{companyId}
</if>
<if test="branchId != null and branchId > 0">
and c.company_id=#{branchId}
</if>
<if test="orderNo != null and orderNo != '' ">
and wc.order_no like concat('%',#{orderNo},'%')
</if>
<if test="status != null ">
and
<choose>
<when test="status == 0">
wc.stauts in (0 ,2)
</when>
<otherwise>
wc.stauts =#{status}
</otherwise>
</choose>
</if>
<if test="startTime != null and startTime > 0">
and wc.crt_time >= #{startTime}
</if>
<if test="endTime != null and endTime > 0">
and wc.crt_time &lt;= #{endTime}
</if>
<if test="dataCompanyIds != null and dataCompanyIds.size() > 0">
and wc.company_id= in
<foreach collection="dataCompanyIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test="dataCorporationIds != null and dataCorporationIds.size() > 0">
and c.company_id in
<foreach collection="dataCorporationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
</where>
order by wc.crt_time desc
</select>
</mapper>
\ No newline at end of file
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
and d.branch_id=#{branchId} and d.branch_id=#{branchId}
</if> </if>
<if test="startTime != null and startTime > 0"> <if test="startTime != null and startTime > 0">
and d.crt_time > = {startTime} and d.crt_time >= #{startTime}
</if> </if>
<if test="endTime != null and endTime > 0"> <if test="endTime != null and endTime > 0">
and d.crt_time &lt;= {endTime} and d.crt_time &lt;= #{endTime}
</if> </if>
<if test="dataCompanyIds != null and dataCompanyIds.size() > 0"> <if test="dataCompanyIds != null and dataCompanyIds.size() > 0">
and d.company_id= in and d.company_id= in
......
...@@ -71,4 +71,38 @@ ...@@ -71,4 +71,38 @@
</where> </where>
</select> </select>
<select id="selectList" resultType="com.xxfc.platform.order.pojo.vo.CompanyWalletVo" parameterType="com.xxfc.platform.order.pojo.dto.WalletDTO">
SELECT
w.*,
c.`name` as companyName,
ci.`name` as branchName,
ci.id as branchId
FROM company_wallet w
LEFT JOIN branch_company c ON w.company_id =c.id
LEFT JOIN company_info ci ON c.company_id=ci.id
<where>
<if test="companyId != null and companyId > 0">
and w.company_id=#{companyId}
</if>
<if test="branchId != null and branchId > 0">
and c.company_id=#{branchId}
</if>
<if test="dataCompanyIds != null and dataCompanyIds.size() > 0">
and w.company_id= in
<foreach collection="dataCompanyIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test="dataCorporationIds != null and dataCorporationIds.size() > 0">
and c.company_id in
<foreach collection="dataCorporationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
</where>
order by w.id desc
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -35,4 +35,51 @@ ...@@ -35,4 +35,51 @@
</where> </where>
order by crt_time desc order by crt_time desc
</select> </select>
<select id="selectListFull" parameterType="com.xxfc.platform.order.pojo.order.OrderFullDTO" resultType="com.xxfc.platform.order.pojo.order.OrderFullVO">
select bo.*
from order_rent_vehicle_detail orvd
left join base_order bo on
orvd.order_id = bo.id
<where>
<if test="crtTime != null">
and bo.crt_time &gt;= #{crtTime}
</if>
<if test="startTimeGte != null">
and orvd.start_time &gt;= #{startTimeGte}
</if>
<if test="startTimeLte != null">
and orvd.start_time &lt;= #{startTimeLte}
</if>
<if test="endTimeGte != null">
and orvd.end_time &gt;= #{endTimeGte}
</if>
<if test="endTimeLte != null">
and orvd.end_time &lt;= #{endTimeLte}
</if>
<if test="hasPay != null">
and bo.has_pay = #{hasPay}
</if>
<if test="vehicleIds != null">
and orvd.vehicle_id in
<foreach collection="vehicleIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="multiNotStatus != null">
and bo.status not in
<foreach collection="multiNotStatus.split(',')" item="notStatus" open="(" separator="," close=")">
#{notStatus}
</foreach>
</if>
<if test="multiStatus != null">
and bo.status not in
<foreach collection="multiStatus.split(',')" item="status" open="(" separator="," close=")">
#{status}
</foreach>
</if>
</where>
order by crt_time desc
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -116,4 +116,6 @@ public class RedisKey { ...@@ -116,4 +116,6 @@ public class RedisKey {
public static final String BRANCH_COMPANY_CATA_LIST = BRANCH_CATA_CACHE + ":list"; public static final String BRANCH_COMPANY_CATA_LIST = BRANCH_CATA_CACHE + ":list";
// 每日统计cache cache:statistics:order:day:[vehicleIds]:202009121322:
public static final String STATISTICS_ORDER_DAY ="cache:statistics:order:day";
} }
...@@ -236,4 +236,15 @@ public interface VehicleFeign { ...@@ -236,4 +236,15 @@ public interface VehicleFeign {
@PostMapping("branchCompany/app/unauth/listByIds") @PostMapping("branchCompany/app/unauth/listByIds")
ObjectRestResponse<List<CompanySearchVO>> listByIds(@RequestBody CompanySearchDTO vo); ObjectRestResponse<List<CompanySearchVO>> listByIds(@RequestBody CompanySearchDTO vo);
@GetMapping(value = "/vehicleHolidayPriceInfo/getByVehicleIdFeign")
public ObjectRestResponse<List<VehicleModelCalendarPriceDTO>> getByVehicleIdFeign(
@RequestParam("vehicleId") String vehicleId, @RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate, @RequestParam("userId") Integer userId, @RequestParam("companyId") Integer companyId);
@RequestMapping(value = "/vehicleInfo/selectByParam", method = RequestMethod.GET)
public RestResponse<List<Vehicle>> vehicleSelectByParam(@RequestParam(value = "vehicle")Map<String, Object> vehicleMap);
@RequestMapping(value = "/vehicleInfo/selectByCompanyIds", method = RequestMethod.GET)
public ObjectRestResponse<List<Vehicle>> vehicleSelectByCompanyIds(@RequestParam("companyIds") String companyIds);
} }
...@@ -3,6 +3,7 @@ package com.xxfc.platform.vehicle.rest; ...@@ -3,6 +3,7 @@ package com.xxfc.platform.vehicle.rest;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONException; import com.alibaba.fastjson.JSONException;
...@@ -670,6 +671,15 @@ public class VehicleController extends BaseController<VehicleBiz> implements Use ...@@ -670,6 +671,15 @@ public class VehicleController extends BaseController<VehicleBiz> implements Use
return RestResponse.data(vehicleVO); return RestResponse.data(vehicleVO);
} }
@RequestMapping(value = "/selectByCompanyIds", method = RequestMethod.GET)
@IgnoreUserToken
public ObjectRestResponse<List<Vehicle>> selectByCompanyIds(String companyIds) {
if(StrUtil.isBlank(companyIds) || "0".equals(companyIds)) {
return ObjectRestResponse.succ(baseBiz.selectListAlls());
}else {
return ObjectRestResponse.succ(baseBiz.selectByAttrs(Vehicle::getSubordinateBranch, CollUtil.toList(companyIds.split(","))));
}
}
@Data @Data
static public class VehicleVO extends Vehicle { static public class VehicleVO extends Vehicle {
......
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