提交 11bf492b 作者: 张小凤

PackageName(update)

上级 054ca163
package com.mmc.payment.common;
import com.alibaba.fastjson.JSONObject;
import com.mmc.payment.common.result.ResultEnum;
import com.mmc.payment.config.AuthHandler;
import com.mmc.payment.exception.BizException;
import com.mmc.payment.jwt.JwtConstant;
import com.mmc.payment.model.dto.BaseAccountDTO;
import com.mmc.payment.model.dto.CurrentUserDTO;
import com.mmc.payment.model.dto.user.BaseAccountDTO;
import com.mmc.payment.model.dto.user.CurrentUserDTO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
......@@ -24,6 +25,7 @@ public abstract class BaseController {
@Autowired
private StringRedisTemplate stringRedisTemplate;
/**
* 获取当前用户
*
......@@ -43,10 +45,10 @@ public abstract class BaseController {
public BaseAccountDTO getCurrentAccount(HttpServletRequest request) {
String token = request.getHeader("token");
String json = stringRedisTemplate.opsForValue().get(token);
if (StringUtils.isBlank(json)){
if (StringUtils.isBlank(json)) {
throw new BizException(ResultEnum.LOGIN_ACCOUNT_STATUS_ERROR);
}
BaseAccountDTO baseAccountDTO= JSONObject.parseObject(json, BaseAccountDTO.class);
BaseAccountDTO baseAccountDTO = JSONObject.parseObject(json, BaseAccountDTO.class);
return baseAccountDTO;
}
}
package com.mmc.payment.common;
package com.mmc.payment.common.publicinterface;
/**
* @Author small
......
package com.mmc.payment.common;
package com.mmc.payment.common.publicinterface;
/**
* @Author small
......
package com.mmc.payment.common;
package com.mmc.payment.common.publicinterface;
/**
* @Author small
......
package com.mmc.payment.common;
package com.mmc.payment.common.publicinterface;
/**
* @Author small
......
package com.mmc.payment.common;
package com.mmc.payment.common.publicinterface;
/**
* @Author small
......
package com.mmc.payment.common;
package com.mmc.payment.common.publicinterface;
/**
* @Author small
......
package com.mmc.payment.common;
package com.mmc.payment.common.result;
import com.mmc.payment.model.qo.BaseInfoQO;
import lombok.AllArgsConstructor;
......
package com.mmc.payment.common;
package com.mmc.payment.common.result;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModel;
import com.mmc.payment.common.publicinterface.BaseErrorInfoInterface;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -71,9 +71,8 @@ public class ResultBody<T> implements Serializable {
/**
* 成功
*
* **/
public static ResultBody success1(ResultEnum enums){
**/
public static ResultBody success1(ResultEnum enums) {
ResultBody rb = new ResultBody();
rb.setCode("200");
rb.setMessage(enums.getResultMsg());
......
package com.mmc.payment.common;
package com.mmc.payment.common.result;
import com.mmc.payment.common.publicinterface.BaseErrorInfoInterface;
/**
* @Author small
......
package com.mmc.payment.common;
package com.mmc.payment.common.util;
import java.math.BigDecimal;
......
package com.mmc.payment.common;
package com.mmc.payment.common.util;
import org.springframework.beans.BeanUtils;
......
package com.mmc.payment.common;
package com.mmc.payment.common.util;
import java.util.Random;
......
package com.mmc.payment.common;
package com.mmc.payment.common.util;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
......
package com.mmc.payment.common;
package com.mmc.payment.common.util;
import java.text.ParseException;
import java.text.SimpleDateFormat;
......@@ -160,17 +160,18 @@ public class TDateUtil {
/**
* 某天个时间加 N 小时
*
* @param now
* @param num
* @return
*/
public static Date addHourTime(Date now,int num){
public static Date addHourTime(Date now, int num) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = null;
try {
Calendar calendar = Calendar.getInstance();
calendar.setTime(now);
calendar.add(Calendar.HOUR,num);
calendar.add(Calendar.HOUR, num);
String last = format.format(calendar.getTime());
date = getDate(last, "yyyy-MM-dd HH:mm:ss");
} catch (Exception e) {
......@@ -480,7 +481,7 @@ public class TDateUtil {
*/
public static Date getLastYearTodayDate() {
Calendar instance = Calendar.getInstance();
instance.add(Calendar.YEAR,-1);
instance.add(Calendar.YEAR, -1);
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
String s = format.format(instance.getTime());
return getDate(s, "yyyy-MM-dd");
......@@ -488,12 +489,13 @@ public class TDateUtil {
/**
* 获取昨天的日期
*
* @param type
* @return
*/
public static String getYesterdayDateByType(String type){
public static String getYesterdayDateByType(String type) {
Calendar instance = Calendar.getInstance();
instance.add(Calendar.DAY_OF_MONTH,-1);
instance.add(Calendar.DAY_OF_MONTH, -1);
Date time = instance.getTime();
SimpleDateFormat format = new SimpleDateFormat(type);
return format.format(time);
......@@ -517,49 +519,51 @@ public class TDateUtil {
/**
* 间隔天数
*
* @param startTime
* @param endTime
* @return
*/
public static int isolateDayNum(String startTime, String endTime){
public static int isolateDayNum(String startTime, String endTime) {
Date startDate = getDate(startTime, "yyyy-MM-dd");
Date endDate = getDate(endTime, "yyyy-MM-dd");
long differentMillis = endDate.getTime() - startDate.getTime();
long dayNum = differentMillis/(1000*60*60*24);
return (int)dayNum;
long dayNum = differentMillis / (1000 * 60 * 60 * 24);
return (int) dayNum;
}
/**
* 获取某月最后一天的时间
*
* @param yearMonth
* @return
*/
public static String getLastDateTimeOfMonth(String yearMonth){
public static String getLastDateTimeOfMonth(String yearMonth) {
SimpleDateFormat format0 = new SimpleDateFormat("yyyy-MM");
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Calendar instance = Calendar.getInstance();
try {
Date parse = format0.parse(yearMonth);
instance.setTime(parse);
instance.set(Calendar.DAY_OF_MONTH, instance.getActualMaximum(Calendar.DAY_OF_MONTH));
instance.set(Calendar.DAY_OF_MONTH, instance.getActualMaximum(Calendar.DAY_OF_MONTH));
instance.set(Calendar.HOUR_OF_DAY, 23);
instance.set(Calendar.MINUTE, 59);
instance.set(Calendar.SECOND, 59);
String format = format1.format(instance.getTime());
return format;
} catch (Exception e){
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
public static Date getStrToDate(String str){
public static Date getStrToDate(String str) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日");
Date date = null;
try {
if (str==null){
if (str == null) {
date = null;
}else {
} else {
date = dateFormat.parse(str);
}
} catch (ParseException e) {
......@@ -568,7 +572,7 @@ public class TDateUtil {
return date;
}
public static int getStageByDate(Date date){
public static int getStageByDate(Date date) {
Calendar instance = Calendar.getInstance();
instance.setTime(date);
//当前时间
......@@ -584,22 +588,22 @@ public class TDateUtil {
Date parse4 = dateFormat.parse("00:00:00");
//A:05:00-11:00 | B:11:00-17:00 | C:00:00-05:00,17:00-00:00
if (currentTime.after(parse4) && currentTime.before(parse1) ) {
if (currentTime.after(parse4) && currentTime.before(parse1)) {
return 3;
}else if (currentTime.after(parse1) && currentTime.before(parse2)) {
} else if (currentTime.after(parse1) && currentTime.before(parse2)) {
return 1;
}else if(currentTime.after(parse2) && currentTime.before(parse3)){
} else if (currentTime.after(parse2) && currentTime.before(parse3)) {
return 2;
}else if(currentTime.after(parse3) && currentTime.after(parse4)){
} else if (currentTime.after(parse3) && currentTime.after(parse4)) {
return 4;
}
}catch (Exception e){
} catch (Exception e) {
e.printStackTrace();
}
return 0;
}
public static String getCurrentYear(){
public static String getCurrentYear() {
Calendar date = Calendar.getInstance();
String year = String.valueOf(date.get(Calendar.YEAR));
return year;
......
package com.mmc.payment.config;
import com.mmc.payment.common.CodeUtil;
import com.mmc.payment.common.util.CodeUtil;
import com.mmc.payment.jwt.JwtConstant;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.JwtBuilder;
......
package com.mmc.payment.controller;
import com.mmc.payment.common.ResultBody;
import com.mmc.payment.common.result.ResultBody;
import com.mmc.payment.config.AuthHandler;
import com.mmc.payment.jwt.JwtConstant;
import com.mmc.payment.model.dto.BaseAccountDTO;
import com.mmc.payment.model.dto.RepoAccountDTO;
import com.mmc.payment.model.dto.user.BaseAccountDTO;
import com.mmc.payment.model.dto.user.RepoAccountDTO;
import com.mmc.payment.model.qo.RepoAccountQO;
import com.mmc.payment.service.RepoAccountService;
import io.swagger.annotations.Api;
......
package com.mmc.payment.controller;
import com.mmc.payment.common.BaseController;
import com.mmc.payment.common.ResultBody;
import com.mmc.payment.common.result.ResultBody;
import com.mmc.payment.config.RepeatSubmit;
import com.mmc.payment.model.dto.CashTypeDTO;
import com.mmc.payment.model.dto.PayCashResultDTO;
import com.mmc.payment.model.dto.RepoCashDTO;
import com.mmc.payment.model.dto.RepoWalletDTO;
import com.mmc.payment.model.dto.cash.CashTypeDTO;
import com.mmc.payment.model.dto.repo.PayCashResultDTO;
import com.mmc.payment.model.dto.repo.RepoCashDTO;
import com.mmc.payment.model.dto.repo.RepoWalletDTO;
import com.mmc.payment.model.qo.RepoCashQO;
import com.mmc.payment.model.qo.UserCashQO;
import com.mmc.payment.model.vo.RepoCashVO;
import com.mmc.payment.model.vo.RepoOrderPayVO;
import com.mmc.payment.model.vo.WalletUsersVO;
import com.mmc.payment.model.vo.repo.RepoCashVO;
import com.mmc.payment.model.vo.repo.RepoOrderPayVO;
import com.mmc.payment.model.vo.wallet.WalletUsersVO;
import com.mmc.payment.service.RepoCashService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......
package com.mmc.payment.dao;
import com.mmc.payment.entity.RepoAccountDO;
import com.mmc.payment.entity.RepoWalletDO;
import com.mmc.payment.entity.repo.RepoAccountDO;
import com.mmc.payment.entity.repo.RepoWalletDO;
import com.mmc.payment.model.qo.RepoAccountQO;
import org.apache.ibatis.annotations.Mapper;
......
package com.mmc.payment.dao;
import com.mmc.payment.entity.CashTypeDO;
import com.mmc.payment.entity.RepoCashDO;
import com.mmc.payment.entity.RepoWalletDO;
import com.mmc.payment.entity.cash.CashTypeDO;
import com.mmc.payment.entity.repo.RepoCashDO;
import com.mmc.payment.entity.repo.RepoWalletDO;
import com.mmc.payment.model.qo.RepoCashQO;
import com.mmc.payment.model.qo.UserCashQO;
import com.mmc.payment.model.qo.WalletUsersQO;
......
package com.mmc.payment.entity;
package com.mmc.payment.entity.cash;
import com.mmc.payment.model.dto.CashTypeDTO;
import com.mmc.payment.model.dto.cash.CashTypeDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
......
package com.mmc.payment.entity;
package com.mmc.payment.entity.flyer;
import com.mmc.payment.common.FlyerAccountType;
import com.mmc.payment.model.dto.FlyerAccountDTO;
import com.mmc.payment.model.dto.FlyerInfoDTO;
import com.mmc.payment.model.dto.FlyerRcdTeamDTO;
import com.mmc.payment.model.vo.FlyerAccountVO;
import com.mmc.payment.model.vo.FlyerWorkStatusVO;
import com.mmc.payment.model.dto.flyer.FlyerAccountDTO;
import com.mmc.payment.model.dto.flyer.FlyerInfoDTO;
import com.mmc.payment.model.dto.flyer.FlyerRcdTeamDTO;
import com.mmc.payment.model.vo.flyer.FlyerAccountVO;
import com.mmc.payment.model.vo.flyer.FlyerWorkStatusVO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
......@@ -84,11 +84,11 @@ public class FlyerAccountDO implements Serializable {
public FlyerAccountDO(FlyerWorkStatusVO flyerWorkStatusVO) {
this.id=flyerWorkStatusVO.getId();
this.resAddress=flyerWorkStatusVO.getResAddress();
this.lon=flyerWorkStatusVO.getLon();
this.lat=flyerWorkStatusVO.getLat();
this.workStatus=flyerWorkStatusVO.getWorkStatus();
this.id = flyerWorkStatusVO.getId();
this.resAddress = flyerWorkStatusVO.getResAddress();
this.lon = flyerWorkStatusVO.getLon();
this.lat = flyerWorkStatusVO.getLat();
this.workStatus = flyerWorkStatusVO.getWorkStatus();
}
/**
......@@ -97,9 +97,9 @@ public class FlyerAccountDO implements Serializable {
* @return
*/
public FlyerAccountDTO builderFlyerAccountDTO(){
public FlyerAccountDTO builderFlyerAccountDTO() {
Integer white = 0;
if(rcdFlyer !=null && rcdFlyer.getSale() ==1){
if (rcdFlyer != null && rcdFlyer.getSale() == 1) {
white = 1;
}
return FlyerAccountDTO.builder().id(this.id).uid(this.uid).accountName(this.accountName).phoneNum(this.phoneNum).accountType(this.accountType)
......@@ -117,31 +117,31 @@ public class FlyerAccountDO implements Serializable {
.rcdNickName(this.rcdFlyer == null ? null : this.rcdFlyer.getNickName()).white(white).source(this.source).build();
}
public FlyerRcdTeamDTO builderFlyerRcdTeamDTO(){
public FlyerRcdTeamDTO builderFlyerRcdTeamDTO() {
return FlyerRcdTeamDTO.builder().FlyerAccountName(this.accountName).id(this.id).accountType(this.accountType)
.realAuthStatus(this.realAuthStatus).entAuthStatus(this.entAuthStatus).createTime(this.rcdCreateTime)
.phoneNum(this.phoneNum).nickName(this.nickName).remark(this.rcdRemark).uid(this.uid).build();
}
public FlyerAccountDO(FlyerAccountVO flyerAccountVO){
this.id=flyerAccountVO.getId();
this.uid=flyerAccountVO.getUid();
this.accountName=flyerAccountVO.getAccountName();
this.accountType=flyerAccountVO.getAccountType();
this.phoneNum=flyerAccountVO.getPhoneNum();
this.realAuthStatus=flyerAccountVO.getRealAuthStatus();
this.entAuthStatus=flyerAccountVO.getEntAuthStatus();
this.workStatus=flyerAccountVO.getWorkStatus();
this.nickName=flyerAccountVO.getNickName();
this.resAddress=flyerAccountVO.getResAddress();
this.headerImg=flyerAccountVO.getHeaderImg();
this.lon=flyerAccountVO.getLon();
this.lat=flyerAccountVO.getLat();
this.remark=flyerAccountVO.getRemark();
this.deleted=flyerAccountVO.getDeleted();
public FlyerAccountDO(FlyerAccountVO flyerAccountVO) {
this.id = flyerAccountVO.getId();
this.uid = flyerAccountVO.getUid();
this.accountName = flyerAccountVO.getAccountName();
this.accountType = flyerAccountVO.getAccountType();
this.phoneNum = flyerAccountVO.getPhoneNum();
this.realAuthStatus = flyerAccountVO.getRealAuthStatus();
this.entAuthStatus = flyerAccountVO.getEntAuthStatus();
this.workStatus = flyerAccountVO.getWorkStatus();
this.nickName = flyerAccountVO.getNickName();
this.resAddress = flyerAccountVO.getResAddress();
this.headerImg = flyerAccountVO.getHeaderImg();
this.lon = flyerAccountVO.getLon();
this.lat = flyerAccountVO.getLat();
this.remark = flyerAccountVO.getRemark();
this.deleted = flyerAccountVO.getDeleted();
}
public FlyerInfoDTO buildFlyerInfoDTO(){
public FlyerInfoDTO buildFlyerInfoDTO() {
return FlyerInfoDTO.builder().id(this.id).flyerName(this.flyerName).licStatus(this.licStatus).phoneNum(this.phoneNum)
.protocolAuth(this.protocolAuth).electricAuth(this.electricAuth).aviationAuth(this.aviationAuth)
.emergencyAuth(this.emergencyAuth).superviseAuth(this.superviseAuth).universalAuth(this.universalAuth)
......
package com.mmc.payment.entity;
package com.mmc.payment.entity.flyer;
import com.mmc.payment.model.dto.FlyerEntInfoDTO;
import com.mmc.payment.model.vo.EntFourValidateVO;
import com.mmc.payment.model.dto.flyer.FlyerEntInfoDTO;
import com.mmc.payment.model.vo.flyer.EntFourValidateVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
......@@ -44,7 +44,7 @@ public class FlyerEntInfoDO implements Serializable {
private String resAddress;
private String nickName;
public FlyerEntInfoDTO buildFlyerEntInfoDTO(){
public FlyerEntInfoDTO buildFlyerEntInfoDTO() {
return FlyerEntInfoDTO.builder().id(this.id).uid(this.uid).phoneNum(this.phoneNum).resAddress(this.resAddress).nickName(this.nickName)
.flyerAccountId(this.flyerAccountId).entName(this.entName).entCheckStatus(this.entCheckStatus).entLegalPerson(this.entLegalPerson)
.uscCode(this.uscCode).unLicImg(this.unLicImg).bankName(this.bankName).accountHolder(this.accountHolder).bankAccount(this.bankAccount)
......@@ -52,12 +52,12 @@ public class FlyerEntInfoDO implements Serializable {
.countOfAuthFlyer(this.countOfAuthFlyer).build();
}
public FlyerEntInfoDO(EntFourValidateVO entFourValidateVO){
this.flyerAccountId=entFourValidateVO.getUserAccountId();
this.entLegalPerson=entFourValidateVO.getEntLegalPerson();
this.entName=entFourValidateVO.getEntName();
this.uscCode=entFourValidateVO.getUnifySocialCreditCode();
this.unLicImg=entFourValidateVO.getBusinessLicenseImg();
this.idNumber=entFourValidateVO.getIdNumber();
public FlyerEntInfoDO(EntFourValidateVO entFourValidateVO) {
this.flyerAccountId = entFourValidateVO.getUserAccountId();
this.entLegalPerson = entFourValidateVO.getEntLegalPerson();
this.entName = entFourValidateVO.getEntName();
this.uscCode = entFourValidateVO.getUnifySocialCreditCode();
this.unLicImg = entFourValidateVO.getBusinessLicenseImg();
this.idNumber = entFourValidateVO.getIdNumber();
}
}
package com.mmc.payment.entity;
package com.mmc.payment.entity.order;
import com.mmc.payment.model.dto.KdnExpDTO;
import com.mmc.payment.model.dto.OrderReceiptDTO;
import com.mmc.payment.model.dto.OrderRefundDTO;
import com.mmc.payment.model.dto.OrderVcuDTO;
import com.mmc.payment.model.dto.logistics.KdnExpDTO;
import com.mmc.payment.model.dto.order.OrderReceiptDTO;
import com.mmc.payment.model.dto.order.OrderRefundDTO;
import com.mmc.payment.model.dto.order.OrderVcuDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -24,125 +24,125 @@ import java.util.List;
@NoArgsConstructor
// @ApiModel(value = "com.mmc.csf.model.dto.OrderInfoDTO", description = "云仓订单DTO")
public class OrderInfoDO implements Serializable {
private static final long serialVersionUID = 1572467108563651846L;
private static final long serialVersionUID = 1572467108563651846L;
@ApiModelProperty(value = "ID")
private Integer id;
@ApiModelProperty(value = "ID")
private Integer id;
@ApiModelProperty(value = "订单编号")
private String orderNo;
@ApiModelProperty(value = "订单编号")
private String orderNo;
@ApiModelProperty(value = "商品ID")
private Integer wareInfoId;
@ApiModelProperty(value = "商品ID")
private Integer wareInfoId;
@ApiModelProperty(value = "商品编号")
private String wareNo;
@ApiModelProperty(value = "商品编号")
private String wareNo;
@ApiModelProperty(value = "商品标题")
private String wareTitle;
@ApiModelProperty(value = "商品标题")
private String wareTitle;
@ApiModelProperty(value = "商品图片")
private String wareImg;
@ApiModelProperty(value = "商品图片")
private String wareImg;
@ApiModelProperty(value = "套餐(sku)ID")
private Integer skuInfoId;
@ApiModelProperty(value = "套餐(sku)ID")
private Integer skuInfoId;
@ApiModelProperty(value = "套餐(sku)名称")
private String skuTitle;
@ApiModelProperty(value = "套餐(sku)名称")
private String skuTitle;
@ApiModelProperty(value = "购买用户ID")
private Integer repoAccountId;
@ApiModelProperty(value = "购买用户ID")
private Integer repoAccountId;
@ApiModelProperty(value = "用户UID")
private String uid;
@ApiModelProperty(value = "用户UID")
private String uid;
@ApiModelProperty(value = "买家name")
private String buyerName;
@ApiModelProperty(value = "买家name")
private String buyerName;
@ApiModelProperty(value = "买家电话")
private String buyerPhone;
@ApiModelProperty(value = "买家电话")
private String buyerPhone;
@ApiModelProperty(value = "单价")
private BigDecimal unitPrice;
@ApiModelProperty(value = "单价")
private BigDecimal unitPrice;
@ApiModelProperty(value = "购买的商品数量")
private Integer wareNum;
@ApiModelProperty(value = "购买的商品数量")
private Integer wareNum;
@ApiModelProperty(value = "应付款金额")
private BigDecimal shouldPay;
@ApiModelProperty(value = "应付款金额")
private BigDecimal shouldPay;
@ApiModelProperty(value = "实收款金额")
private BigDecimal actualPay;
@ApiModelProperty(value = "实收款金额")
private BigDecimal actualPay;
@ApiModelProperty(value = "订单类型:0租赁 100购买")
private Integer orderType;
@ApiModelProperty(value = "订单类型:0租赁 100购买")
private Integer orderType;
@ApiModelProperty(value = "押金")
private BigDecimal deposit;
@ApiModelProperty(value = "押金")
private BigDecimal deposit;
@ApiModelProperty(value = "租金总金额")
private BigDecimal rentPrice;
@ApiModelProperty(value = "租金总金额")
private BigDecimal rentPrice;
@ApiModelProperty(value = "租约开始日")
private Date startDate;
@ApiModelProperty(value = "租约开始日")
private Date startDate;
@ApiModelProperty(value = "租约结束日")
private Date endDate;
@ApiModelProperty(value = "租约结束日")
private Date endDate;
@ApiModelProperty(value = "付款天数")
private Integer payDay;
@ApiModelProperty(value = "付款天数")
private Integer payDay;
@ApiModelProperty(value = "交易状态:查订单状态字典")
private String tranStatus;
@ApiModelProperty(value = "交易状态:查订单状态字典")
private String tranStatus;
@ApiModelProperty(value = "减库方式 0:买家拍下减库存 1:卖家付款减库存")
private Integer exWare;
@ApiModelProperty(value = "减库方式 0:买家拍下减库存 1:卖家付款减库存")
private Integer exWare;
@ApiModelProperty(value = "用户备注")
private String remark;
@ApiModelProperty(value = "用户备注")
private String remark;
@ApiModelProperty(value = "平台人员备注")
private String pfRemark;
@ApiModelProperty(value = "平台人员备注")
private String pfRemark;
@ApiModelProperty(value = "关闭原因")
private String shutReason;
@ApiModelProperty(value = "关闭原因")
private String shutReason;
@ApiModelProperty(value = "交易编号")
private String payNo;
@ApiModelProperty(value = "交易编号")
private String payNo;
@ApiModelProperty(value = "支付时间")
private Date payTime;
@ApiModelProperty(value = "支付时间")
private Date payTime;
@ApiModelProperty(value = "发货时间")
private Date sendWareTime;
@ApiModelProperty(value = "发货时间")
private Date sendWareTime;
@ApiModelProperty(value = "创建时间")
private Date createTime;
@ApiModelProperty(value = "创建时间")
private Date createTime;
@ApiModelProperty(value = "物流信息/收货地址信息")
private OrderReceiptDTO receipt;
@ApiModelProperty(value = "物流信息/收货地址信息")
private OrderReceiptDTO receipt;
@ApiModelProperty(value = "退款单详情信息,无则为null")
private OrderRefundDTO orderRefund;
@ApiModelProperty(value = "退款单详情信息,无则为null")
private OrderRefundDTO orderRefund;
@ApiModelProperty(value = "发货-物流动态,无则为null")
private KdnExpDTO express;
@ApiModelProperty(value = "发货-物流动态,无则为null")
private KdnExpDTO express;
@ApiModelProperty(value = "退货-物流动态,无则为null")
private KdnExpDTO refundExpress;
@ApiModelProperty(value = "退货-物流动态,无则为null")
private KdnExpDTO refundExpress;
@ApiModelProperty(value = "质检详情,无则为null")
private List<OrderVcuDTO> vcus;
@ApiModelProperty(value = "质检详情,无则为null")
private List<OrderVcuDTO> vcus;
@ApiModelProperty(value = "归还时间")
private Date returnTime;
@ApiModelProperty(value = "归还时间")
private Date returnTime;
@ApiModelProperty(value = "优惠券id", example = "221")
private Integer couponId;
@ApiModelProperty(value = "优惠券id", example = "221")
private Integer couponId;
@ApiModelProperty(value = "规格id", example = "1")
private Integer specsId;
@ApiModelProperty(value = "规格id", example = "1")
private Integer specsId;
@ApiModelProperty(value = "余额", example = "4")
private BigDecimal balance;
@ApiModelProperty(value = "余额", example = "4")
private BigDecimal balance;
}
package com.mmc.payment.entity;
package com.mmc.payment.entity.order;
import com.mmc.payment.model.dto.OrderVcuDTO;
import com.mmc.payment.model.dto.order.OrderVcuDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
......
package com.mmc.payment.entity;
package com.mmc.payment.entity.repo;
import com.mmc.payment.model.dto.RepoAccountDTO;
import com.mmc.payment.model.dto.RepoRcdTeamDTO;
import com.mmc.payment.model.dto.RepoRebateWalletDTO;
import com.mmc.payment.model.vo.RepoAccountVO;
import com.mmc.payment.model.dto.repo.RepoRcdTeamDTO;
import com.mmc.payment.model.dto.repo.RepoRebateWalletDTO;
import com.mmc.payment.model.dto.user.RepoAccountDTO;
import com.mmc.payment.model.vo.repo.RepoAccountVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
......@@ -53,16 +53,16 @@ public class RepoAccountDO implements Serializable {
private RepoAccountDO rcdRepo;
/**
* 额外字段
*
*/
private Integer white;
private Date entAuthTime;
private String entName;
private Date rcdCreateTime;
private String rcdRemark;
public RepoAccountDTO buildRepoAccountDTO() {
Integer white = 0;
if(rcdRepo !=null && rcdRepo.getSale() ==1){
if (rcdRepo != null && rcdRepo.getSale() == 1) {
white = 1;
}
return RepoAccountDTO.builder().id(this.id).uid(this.uid).accountName(this.accountName)
......@@ -82,13 +82,13 @@ public class RepoAccountDO implements Serializable {
.build();
}
public RepoRcdTeamDTO builderRepoRcdTeamDTO(){
public RepoRcdTeamDTO builderRepoRcdTeamDTO() {
return RepoRcdTeamDTO.builder().RepoAccountName(this.accountName).id(this.id).accountType(this.accountType)
.realAuthStatus(this.realAuthStatus).entAuthStatus(this.entAuthStatus).createTime(this.rcdCreateTime)
.phoneNum(this.phoneNum).nickName(this.nickName).remark(this.rcdRemark).uid(this.uid).entName(this.entName).build();
}
public RepoRebateWalletDTO buildRepoRebateWalletDTO(){
public RepoRebateWalletDTO buildRepoRebateWalletDTO() {
return RepoRebateWalletDTO.builder().repoAccountId(this.id).uid(this.uid).nickName(this.getNickName()).build();
}
......
package com.mmc.payment.entity;
package com.mmc.payment.entity.repo;
import com.mmc.payment.model.dto.RepoCashDTO;
import com.mmc.payment.model.dto.repo.RepoCashDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
......
package com.mmc.payment.entity;
package com.mmc.payment.entity.repo;
import com.mmc.payment.model.dto.RepoWalletDTO;
import com.mmc.payment.model.dto.repo.RepoWalletDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
......
package com.mmc.payment.exception;
import com.mmc.payment.common.BaseErrorInfoInterface;
import com.mmc.payment.common.ResultEnum;
import com.mmc.payment.common.publicinterface.BaseErrorInfoInterface;
import com.mmc.payment.common.result.ResultEnum;
import static com.mmc.payment.common.ResultEnum.CUSTOM_ERROR;
import static com.mmc.payment.common.result.ResultEnum.CUSTOM_ERROR;
/**
* @Author small
......
package com.mmc.payment.filter;
import com.alibaba.fastjson2.JSON;
import com.mmc.payment.common.ResultBody;
import com.mmc.payment.common.ResultEnum;
import com.mmc.payment.common.Tenant;
import com.mmc.payment.common.result.ResultBody;
import com.mmc.payment.common.result.ResultEnum;
import com.mmc.payment.config.Audience;
import com.mmc.payment.config.TenantContext;
import com.mmc.payment.model.dto.UserAccountDTO;
import com.mmc.payment.model.dto.user.UserAccountDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.cash;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.company;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......@@ -23,9 +23,9 @@ public class CompanyCacheDTO implements Serializable {
private Integer id;
@ApiModelProperty(value = "单位名称")
private String company;
@ApiModelProperty(value = "是否为管理单位:0否 1是",hidden = true)
@ApiModelProperty(value = "是否为管理单位:0否 1是", hidden = true)
private Integer manage;
@ApiModelProperty(value = "当前单位ID+子级单位ID的集合",hidden = true)
@ApiModelProperty(value = "当前单位ID+子级单位ID的集合", hidden = true)
private List<Integer> companys;
}
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.company;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -28,8 +27,8 @@ public class CompanySimpleDTO implements Serializable {
private String company;
@ApiModelProperty(value = "账号类型:0合伙人 1员工")
private Integer userType;
@ApiModelProperty(value = "是否为管理单位:0否 1是",hidden = true)
@ApiModelProperty(value = "是否为管理单位:0否 1是", hidden = true)
private Integer manage;
@ApiModelProperty(value = "当前单位ID+子级单位ID的集合",hidden = true)
@ApiModelProperty(value = "当前单位ID+子级单位ID的集合", hidden = true)
private List<Integer> companys;
}
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.flyer;
import com.mmc.payment.common.FlyerAccountType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.flyer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.flyer;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -58,10 +57,10 @@ public class FlyerInfoDTO implements Serializable {
@ApiModelProperty(value = "签发机关")
private String signOrg;
@ApiModelProperty(value = "有效开始时间")
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date startDate;
@ApiModelProperty(value = "有效结束时间")
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date endDate;
@ApiModelProperty(value = "身份证正面照url")
private String frontIdImg;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.flyer;
import com.mmc.payment.model.dto.order.OrderTaskDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.flyer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.flyer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.flyer;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.flyer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -10,7 +9,6 @@ import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @Author small
......@@ -57,7 +55,7 @@ public class TaskFlyerCostDTO implements Serializable {
private String inspectionName;
@ApiModelProperty(value = "飞手类型(0个人飞手 1飞手机构)")
private Integer flyerType;
// @ApiModelProperty(value = "任务工资信息列表")
// @ApiModelProperty(value = "任务工资信息列表")
//private List<WagTermDetailDTO> details;
@ApiModelProperty(value = "任务开始日")
private Date startTime;
......@@ -92,7 +90,7 @@ public class TaskFlyerCostDTO implements Serializable {
this.payPersent = BigDecimal.ZERO;
}
if(this.hotSudy == null) {
if (this.hotSudy == null) {
this.hotSudy = BigDecimal.ZERO;
}
}
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.logistics;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.logistics;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.logistics;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.order;
import com.mmc.payment.entity.RepoCashDO;
import io.swagger.annotations.ApiModel;
import com.mmc.payment.entity.repo.RepoCashDO;
import com.mmc.payment.model.dto.logistics.KdnExpDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.order;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.order;
import com.mmc.payment.model.dto.logistics.RefundLogDTO;
import com.mmc.payment.model.dto.repo.RepoCashDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.order;
import com.mmc.payment.model.dto.flyer.FlyerAccountDTO;
import com.mmc.payment.model.dto.flyer.FlyerOrderTaskDTO;
import com.mmc.payment.model.dto.flyer.TaskFlyerCostDTO;
import com.mmc.payment.model.dto.user.UserAccountDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -140,7 +144,7 @@ public class OrderTaskDTO implements Serializable {
@ApiModelProperty(value = "平台上传附件预览效果")
private String platformPreview;
@ApiModelProperty(value = "文案描述")
private String copywriting;
private String copywriting;
@ApiModelProperty(value = "子任务列表")
private List<OrderTaskDTO> children;
@ApiModelProperty(value = "子订单信息")
......@@ -160,7 +164,7 @@ public class OrderTaskDTO implements Serializable {
this.userPhoneNum = wx.getPhoneNum();
}
public FlyerOrderTaskDTO buildFlyerOrderTaskDTO(){
public FlyerOrderTaskDTO buildFlyerOrderTaskDTO() {
return FlyerOrderTaskDTO.builder().orderId(this.id).orderNo(this.orderNo).orderName(this.orderName).build();
}
}
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.order;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -16,7 +16,7 @@ import java.time.LocalDateTime;
* @Version 1.0
*/
@Data
@ApiModel(value="OrderTaskSonDTO", description="云享飞订单-子任务表")
@ApiModel(value = "OrderTaskSonDTO", description = "云享飞订单-子任务表")
@AllArgsConstructor
@NoArgsConstructor
public class OrderTaskSonDTO implements Serializable {
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.order;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.repo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.repo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.repo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.repo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.repo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.role;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.user;
import com.mmc.payment.common.PortTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -19,29 +18,29 @@ import java.io.Serializable;
@NoArgsConstructor
// @ApiModel(value = "com.mmc.csf.model.dto.BaseAccountDTO", description = "登录信息DTO")
public class BaseAccountDTO implements Serializable {
private static final long serialVersionUID = -2979712090903806216L;
private static final long serialVersionUID = -2979712090903806216L;
@ApiModelProperty(value = "token")
private String token;
@ApiModelProperty(value = "token")
private String token;
@ApiModelProperty(value = "账号id")
private Integer userAccountId;
@ApiModelProperty(value = "账号id")
private Integer userAccountId;
@ApiModelProperty(value = "账号")
private String accountNo;
@ApiModelProperty(value = "账号")
private String accountNo;
@ApiModelProperty(value = "账号uid")
private String uid;
@ApiModelProperty(value = "账号uid")
private String uid;
@ApiModelProperty(value = "手机号")
private String phoneNum;
@ApiModelProperty(value = "手机号")
private String phoneNum;
@ApiModelProperty(value = "用户名称")
private String userName;
@ApiModelProperty(value = "用户名称")
private String userName;
@ApiModelProperty(value = "用户昵称")
private String nickName;
@ApiModelProperty(value = "用户昵称")
private String nickName;
@ApiModelProperty(value = "0后台管理账号 ; 100云享飞-客户端")
private Integer portType;
@ApiModelProperty(value = "0后台管理账号 ; 100云享飞-客户端")
private Integer portType;
}
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.user;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.user;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.user;
import io.swagger.annotations.ApiModel;
import com.mmc.payment.model.dto.company.CompanySimpleDTO;
import com.mmc.payment.model.dto.role.RoleInfoDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.dto;
package com.mmc.payment.model.dto.user;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......
package com.mmc.payment.model.qo;
import com.mmc.payment.common.Freeze;
import com.mmc.payment.common.Page;
import com.mmc.payment.common.publicinterface.Freeze;
import com.mmc.payment.common.publicinterface.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
......@@ -27,13 +27,13 @@ public class BaseInfoQO {
private String endTime;
@ApiModelProperty(value = "页码")
@NotNull(message = "页码不能为空", groups = { Page.class, Freeze.class })
@Min(value = 1, groups = Page.class,message = "pageNo不能少于1")
@NotNull(message = "页码不能为空", groups = {Page.class, Freeze.class})
@Min(value = 1, groups = Page.class, message = "pageNo不能少于1")
private Integer pageNo;
@ApiModelProperty(value = "每页显示数")
@NotNull(message = "每页显示数不能为空", groups = { Page.class, Freeze.class })
@Min(value = 1, groups = Page.class,message = "pageSize不能少于1")
@NotNull(message = "每页显示数不能为空", groups = {Page.class, Freeze.class})
@Min(value = 1, groups = Page.class, message = "pageSize不能少于1")
private Integer pageSize;
/**
......
package com.mmc.payment.model.qo;
import com.mmc.payment.common.Page;
import com.mmc.payment.common.publicinterface.Page;
import com.mmc.payment.config.UserPorts;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.qo;
import com.mmc.payment.common.Page;
import com.mmc.payment.common.publicinterface.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.qo;
import com.mmc.payment.common.Page;
import com.mmc.payment.common.publicinterface.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.qo;
import com.mmc.payment.common.Page;
import io.swagger.annotations.ApiModel;
import com.mmc.payment.common.publicinterface.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -47,7 +46,7 @@ public class UserAccountQO implements Serializable {
@ApiModelProperty(value = "推荐单位id")
private Integer rcdCompanyId;
@ApiModelProperty(value="单位集合", hidden = true)
@ApiModelProperty(value = "单位集合", hidden = true)
private List<Integer> companys;
@ApiModelProperty(value = "页码", required = true)
......
package com.mmc.payment.model.qo;
import com.mmc.payment.common.Page;
import com.mmc.payment.config.UserPorts;
import com.mmc.payment.common.publicinterface.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.util.CollectionUtils;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
/**
* @Author small
......@@ -33,11 +28,11 @@ public class UserCashQO implements Serializable {
@ApiModelProperty(value = "用户名称/手机号/UID")
private String userMassage;
@ApiModelProperty(value = "页码", required = true,example = "1")
@ApiModelProperty(value = "页码", required = true, example = "1")
@NotNull(message = "页码不能为空", groups = Page.class)
@Min(value = 1, groups = Page.class)
private Integer pageNo;
@ApiModelProperty(value = "每页显示数", required = true,example = "10")
@ApiModelProperty(value = "每页显示数", required = true, example = "10")
@NotNull(message = "每页显示数不能为空", groups = Page.class)
@Min(value = 1, groups = Page.class)
private Integer pageSize;
......
package com.mmc.payment.model.vo;
package com.mmc.payment.model.vo.flyer;
import com.mmc.payment.common.Create;
import com.mmc.payment.common.Update;
import io.swagger.annotations.ApiModel;
import com.mmc.payment.common.publicinterface.Create;
import com.mmc.payment.common.publicinterface.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
......@@ -25,25 +24,25 @@ public class EntFourValidateVO implements Serializable {
private static final long serialVersionUID = 6208245549679324962L;
@ApiModelProperty(value = "id")
@NotNull(message = "id创建修改不能为空", groups = { Update.class })
@NotNull(message = "id创建修改不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "用户ID")
@NotNull(message = "用户ID不能为空", groups = { Update.class, Create.class })
@NotNull(message = "用户ID不能为空", groups = {Update.class, Create.class})
private Integer userAccountId;
@ApiModelProperty(value = "企业法人")
@NotBlank(message = "企业法人", groups = { Create.class })
@NotBlank(message = "企业法人", groups = {Create.class})
private String entLegalPerson;
@ApiModelProperty(value = "身份证号码", hidden = true)
//@NotBlank(message = "身份证号码不能为空",groups = {Create.class})
private String idNumber;
@ApiModelProperty(value = "企业名称")
@NotBlank(message = "企业名称", groups = { Update.class,Create.class })
@NotBlank(message = "企业名称", groups = {Update.class, Create.class})
private String entName;
@ApiModelProperty(value = "统一社会信用代码")
@NotBlank(message = "统一社会信用代码", groups = { Create.class })
@NotBlank(message = "统一社会信用代码", groups = {Create.class})
private String unifySocialCreditCode;
@ApiModelProperty(value = "营业执照")
@NotBlank(message = "营业执照", groups = { Update.class })
@NotBlank(message = "营业执照", groups = {Update.class})
private String businessLicenseImg;
@ApiModelProperty(value = "unionId")
private String unionId;
......
package com.mmc.payment.model.vo;
package com.mmc.payment.model.vo.flyer;
import com.mmc.payment.common.Create;
import com.mmc.payment.common.Update;
import io.swagger.annotations.ApiModel;
import com.mmc.payment.common.publicinterface.Create;
import com.mmc.payment.common.publicinterface.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
......@@ -25,12 +24,12 @@ import java.io.Serializable;
public class FlyerAccountVO implements Serializable {
private static final long serialVersionUID = 5606965866344925637L;
@ApiModelProperty(value = "id")
@NotNull(message = "更新时ID不能为空", groups = { Update.class })
@NotNull(message = "更新时ID不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "uid")
private String uid;
@ApiModelProperty(value = "账号", example = "")
@NotEmpty(message = "账号不能为空", groups = { Create.class })
@NotEmpty(message = "账号不能为空", groups = {Create.class})
private String accountName;
@ApiModelProperty(value = "飞手手机号")
private String phoneNum;
......@@ -53,7 +52,7 @@ public class FlyerAccountVO implements Serializable {
@ApiModelProperty(value = "纬度")
private Double lat;
@ApiModelProperty(value = "用户备注")
@Size(max=70,message = "用户备注内容不能超过70字符",groups = {Update.class})
@Size(max = 70, message = "用户备注内容不能超过70字符", groups = {Update.class})
private String remark;
@ApiModelProperty(value = "用户删除状态,0未删除,1已删除")
private Integer deleted;
......
package com.mmc.payment.model.vo;
package com.mmc.payment.model.vo.flyer;
import com.mmc.payment.common.Update;
import io.swagger.annotations.ApiModel;
import com.mmc.payment.common.publicinterface.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
......@@ -23,19 +22,19 @@ import java.io.Serializable;
public class FlyerWorkStatusVO implements Serializable {
private static final long serialVersionUID = -1274280958579567505L;
@ApiModelProperty(value = "id")
@NotNull(message = "更新时ID不能为空", groups = { Update.class })
@NotNull(message = "更新时ID不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "常驻地址", example = "深圳市")
@NotEmpty(message = "常驻地址不能为空", groups = { Update.class })
@NotEmpty(message = "常驻地址不能为空", groups = {Update.class})
private String resAddress;
@ApiModelProperty(value = "经度")
@NotNull(message = "更新时经度不能为空", groups = { Update.class })
@NotNull(message = "更新时经度不能为空", groups = {Update.class})
private Double lon;
@ApiModelProperty(value = "纬度")
@NotNull(message = "更新时纬度不能为空", groups = { Update.class })
@NotNull(message = "更新时纬度不能为空", groups = {Update.class})
private Double lat;
@ApiModelProperty(value = "工作状态")
@NotNull(message = "workStatus不能为空", groups = { Update.class })
@NotNull(message = "workStatus不能为空", groups = {Update.class})
private Integer workStatus;
}
package com.mmc.payment.model.vo;
package com.mmc.payment.model.vo.order;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......
package com.mmc.payment.model.vo;
package com.mmc.payment.model.vo.repo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
......
package com.mmc.payment.model.vo;
package com.mmc.payment.model.vo.repo;
import com.mmc.payment.common.Create;
import com.mmc.payment.common.Refund;
import com.mmc.payment.common.Share;
import com.mmc.payment.common.publicinterface.Create;
import com.mmc.payment.common.publicinterface.Refund;
import com.mmc.payment.common.publicinterface.Share;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -23,13 +23,13 @@ import java.util.List;
@NoArgsConstructor
// @ApiModel(value = "com.mmc.csf.model.vo.RepoCashVO", description = "现金变更VO")
public class RepoCashVO implements Serializable {
private static final long serialVersionUID = 1828354753495845609L;
private static final long serialVersionUID = 1828354753495845609L;
@ApiModelProperty(value = "用户ID")
@NotNull(
message = "用户ID不能为空",
groups = {Create.class})
private Integer repoAccountId;
@ApiModelProperty(value = "用户ID")
@NotNull(
message = "用户ID不能为空",
groups = {Create.class})
private Integer repoAccountId;
/* @ApiModelProperty(value = "订单ID")
@NotNull(
......@@ -43,21 +43,21 @@ public class RepoCashVO implements Serializable {
groups = {Share.class})
private Integer shareOrderId;*/
@ApiModelProperty(value = "变动金额")
@NotNull(
message = "变动金额不能为空",
groups = {Create.class, Refund.class})
private BigDecimal amtPaid;
@ApiModelProperty(value = "变动金额")
@NotNull(
message = "变动金额不能为空",
groups = {Create.class, Refund.class})
private BigDecimal amtPaid;
@ApiModelProperty(value = "凭证图片集合")
private List<String> voucher;
@ApiModelProperty(value = "凭证图片集合")
private List<String> voucher;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "操作人员密码")
@NotNull(
message = "变动金额不能为空",
groups = {Refund.class, Share.class})
private String authPwd;
@ApiModelProperty(value = "操作人员密码")
@NotNull(
message = "变动金额不能为空",
groups = {Refund.class, Share.class})
private String authPwd;
}
package com.mmc.payment.model.vo;
package com.mmc.payment.model.vo.repo;
import com.mmc.payment.model.dto.BaseAccountDTO;
import com.mmc.payment.model.dto.OrderInfoDTO;
import com.mmc.payment.model.dto.RepoAccountDTO;
import io.swagger.annotations.ApiModel;
import com.mmc.payment.model.dto.order.OrderInfoDTO;
import com.mmc.payment.model.dto.user.BaseAccountDTO;
import com.mmc.payment.model.dto.user.RepoAccountDTO;
import com.mmc.payment.model.vo.order.ShareOrderDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
......
package com.mmc.payment.model.vo;
package com.mmc.payment.model.vo.wallet;
import com.mmc.payment.common.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
......
package com.mmc.payment.service.Impl;
import com.mmc.payment.common.PageResult;
import com.mmc.payment.common.result.PageResult;
import com.mmc.payment.dao.RepoAccountDao;
import com.mmc.payment.entity.RepoWalletDO;
import com.mmc.payment.model.dto.BaseAccountDTO;
import com.mmc.payment.model.dto.RepoAccountDTO;
import com.mmc.payment.model.dto.RepoWalletDTO;
import com.mmc.payment.entity.repo.RepoWalletDO;
import com.mmc.payment.model.dto.repo.RepoWalletDTO;
import com.mmc.payment.model.dto.user.BaseAccountDTO;
import com.mmc.payment.model.dto.user.RepoAccountDTO;
import com.mmc.payment.model.qo.RepoAccountQO;
import com.mmc.payment.service.RepoAccountService;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -21,56 +21,57 @@ import java.util.stream.Collectors;
*/
@Service
public class RepoAccountServiceImpl implements RepoAccountService {
@Autowired private RepoAccountDao repoAccountDao;
@Autowired
private RepoAccountDao repoAccountDao;
@Override
public PageResult listPagePayManager(RepoAccountQO param, BaseAccountDTO cuser) {
@Override
public PageResult listPagePayManager(RepoAccountQO param, BaseAccountDTO cuser) {
/*if(!cuser.isManage()){
param.setCompanys(cuser.getCompanyInfo().getCompanys());
}*/
int count = repoAccountDao.countPagePayManager(param);
if (count == 0) {
return PageResult.buildPage(param.getPageNo(), param.getPageSize(), count);
int count = repoAccountDao.countPagePayManager(param);
if (count == 0) {
return PageResult.buildPage(param.getPageNo(), param.getPageSize(), count);
}
Integer pageNo = param.getPageNo();
param.buildCurrentPage();
List<RepoAccountDTO> data =
repoAccountDao.listPagePayManager(param).stream()
.map(
d -> {
d.buildName();
return d.buildRepoAccountDTO();
})
.collect(Collectors.toList());
List<Integer> accountIds =
data.stream().map(RepoAccountDTO::getId).collect(Collectors.toList());
param.setAccountIds(accountIds);
// List<RepoWalletDTO> wallets = repoPayServletClient.feignListWalletInfo(param);
List<RepoWalletDTO> wallets = listWalletInfo(param);
Map<Integer, RepoWalletDTO> mapWallet =
wallets.stream()
.collect(
Collectors.toMap(
RepoWalletDTO::getRepoAccountId, wallet -> wallet, (k1, k2) -> k2));
for (RepoAccountDTO ac : data) {
if (mapWallet.containsKey(ac.getId())) {
ac.setCashAmt(mapWallet.get(ac.getId()).getCashAmt());
ac.setRemark(mapWallet.get(ac.getId()).getRemark());
}
}
return PageResult.buildPage(pageNo, param.getPageSize(), count, data);
}
Integer pageNo = param.getPageNo();
param.buildCurrentPage();
List<RepoAccountDTO> data =
repoAccountDao.listPagePayManager(param).stream()
.map(
d -> {
d.buildName();
return d.buildRepoAccountDTO();
})
.collect(Collectors.toList());
List<Integer> accountIds =
data.stream().map(RepoAccountDTO::getId).collect(Collectors.toList());
param.setAccountIds(accountIds);
// List<RepoWalletDTO> wallets = repoPayServletClient.feignListWalletInfo(param);
List<RepoWalletDTO> wallets = listWalletInfo(param);
Map<Integer, RepoWalletDTO> mapWallet =
wallets.stream()
.collect(
Collectors.toMap(
RepoWalletDTO::getRepoAccountId, wallet -> wallet, (k1, k2) -> k2));
for (RepoAccountDTO ac : data) {
if (mapWallet.containsKey(ac.getId())) {
ac.setCashAmt(mapWallet.get(ac.getId()).getCashAmt());
ac.setRemark(mapWallet.get(ac.getId()).getRemark());
}
}
return PageResult.buildPage(pageNo, param.getPageSize(), count, data);
}
public List<RepoWalletDTO> listWalletInfo(RepoAccountQO param) {
if (CollectionUtils.isEmpty(param.getAccountIds())) {
return java.util.Collections.emptyList();
public List<RepoWalletDTO> listWalletInfo(RepoAccountQO param) {
if (CollectionUtils.isEmpty(param.getAccountIds())) {
return java.util.Collections.emptyList();
}
List<RepoWalletDO> wallets = repoAccountDao.listWalletInfo(param);
return wallets.stream()
.map(
d -> {
return d.buildRepoWalletDTO();
})
.collect(Collectors.toList());
}
List<RepoWalletDO> wallets = repoAccountDao.listWalletInfo(param);
return wallets.stream()
.map(
d -> {
return d.buildRepoWalletDTO();
})
.collect(Collectors.toList());
}
}
......@@ -3,20 +3,31 @@ package com.mmc.payment.service.Impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.mmc.payment.common.*;
import com.mmc.payment.common.PortTypeEnum;
import com.mmc.payment.common.result.PageResult;
import com.mmc.payment.common.result.ResultBody;
import com.mmc.payment.common.result.ResultEnum;
import com.mmc.payment.common.util.BeanCopyUtils;
import com.mmc.payment.common.util.CodeUtil;
import com.mmc.payment.config.RepoCashMethod;
import com.mmc.payment.dao.RepoCashDao;
import com.mmc.payment.entity.CashTypeDO;
import com.mmc.payment.entity.RepoCashDO;
import com.mmc.payment.entity.RepoWalletDO;
import com.mmc.payment.model.dto.*;
import com.mmc.payment.entity.cash.CashTypeDO;
import com.mmc.payment.entity.repo.RepoCashDO;
import com.mmc.payment.entity.repo.RepoWalletDO;
import com.mmc.payment.model.dto.cash.CashTypeDTO;
import com.mmc.payment.model.dto.order.OrderInfoDTO;
import com.mmc.payment.model.dto.repo.PayCashResultDTO;
import com.mmc.payment.model.dto.repo.RepoCashDTO;
import com.mmc.payment.model.dto.repo.RepoWalletDTO;
import com.mmc.payment.model.dto.user.BaseAccountDTO;
import com.mmc.payment.model.dto.user.UserAccountSimpleDTO;
import com.mmc.payment.model.qo.RepoCashQO;
import com.mmc.payment.model.qo.UserCashQO;
import com.mmc.payment.model.qo.WalletMessageQO;
import com.mmc.payment.model.qo.WalletUsersQO;
import com.mmc.payment.model.vo.RepoCashVO;
import com.mmc.payment.model.vo.RepoOrderPayVO;
import com.mmc.payment.model.vo.WalletUsersVO;
import com.mmc.payment.model.vo.repo.RepoCashVO;
import com.mmc.payment.model.vo.repo.RepoOrderPayVO;
import com.mmc.payment.model.vo.wallet.WalletUsersVO;
import com.mmc.payment.service.RepoCashService;
import io.jsonwebtoken.lang.Collections;
import org.springframework.beans.factory.annotation.Autowired;
......
package com.mmc.payment.service;
import com.mmc.payment.common.PageResult;
import com.mmc.payment.model.dto.BaseAccountDTO;
import com.mmc.payment.common.result.PageResult;
import com.mmc.payment.model.dto.user.BaseAccountDTO;
import com.mmc.payment.model.qo.RepoAccountQO;
/**
......
package com.mmc.payment.service;
import com.mmc.payment.common.PageResult;
import com.mmc.payment.common.ResultBody;
import com.mmc.payment.model.dto.BaseAccountDTO;
import com.mmc.payment.model.dto.PayCashResultDTO;
import com.mmc.payment.model.dto.RepoCashDTO;
import com.mmc.payment.common.result.PageResult;
import com.mmc.payment.common.result.ResultBody;
import com.mmc.payment.model.dto.repo.PayCashResultDTO;
import com.mmc.payment.model.dto.repo.RepoCashDTO;
import com.mmc.payment.model.dto.user.BaseAccountDTO;
import com.mmc.payment.model.qo.RepoCashQO;
import com.mmc.payment.model.qo.UserCashQO;
import com.mmc.payment.model.vo.RepoCashVO;
import com.mmc.payment.model.vo.RepoOrderPayVO;
import com.mmc.payment.model.vo.WalletUsersVO;
import com.mmc.payment.model.vo.repo.RepoCashVO;
import com.mmc.payment.model.vo.repo.RepoOrderPayVO;
import com.mmc.payment.model.vo.wallet.WalletUsersVO;
import java.math.BigDecimal;
......
......@@ -5,7 +5,7 @@
<mapper namespace="com.mmc.payment.dao.RepoCashDao">
<resultMap id="repoWalletResultMap"
type="com.mmc.payment.entity.RepoWalletDO">
type="com.mmc.payment.entity.repo.RepoWalletDO">
<id property="id" column="id"/>
<result property="repoAccountId" column="repo_account_id"/>
<result property="cashAmt" column="cash_amt"/>
......@@ -19,7 +19,7 @@
<result property="createTime" column="update_time"/>
</resultMap>
<resultMap id="repoCashResultMap"
type="com.mmc.payment.entity.RepoCashDO">
type="com.mmc.payment.entity.repo.RepoCashDO">
<id property="id" column="id"/>
<result property="repoAccountId" column="repo_account_id"/>
<result property="uid" column="uid"/>
......@@ -47,7 +47,7 @@
<result property="type" column="type"/>
</resultMap>
<resultMap type="com.mmc.payment.entity.RepoWalletDO"
<resultMap type="com.mmc.payment.entity.repo.RepoWalletDO"
id="RepoAccountResultMap">
<id property="id" column="id"/>
<result property="repoAccountId" column="repo_account_id"/>
......@@ -71,7 +71,7 @@
<insert id="insertRepoCash" useGeneratedKeys="true"
keyProperty="id" parameterType="com.mmc.payment.entity.RepoCashDO">
keyProperty="id" parameterType="com.mmc.payment.entity.repo.RepoCashDO">
insert into repo_cash
(repo_account_id, uid, account_name, order_info_id, order_no, sku_info_id, sku_title,
ware_info_id, ware_no, ware_title, pay_no, pay_method, amt_paid, cash_amt, pay_time, remark,
......@@ -188,7 +188,7 @@
<insert id="orderPayment" useGeneratedKeys="true"
keyProperty="id" parameterType="com.mmc.payment.entity.RepoCashDO">
keyProperty="id" parameterType="com.mmc.payment.entity.repo.RepoCashDO">
insert into repo_cash
(repo_account_id, uid, account_name, order_info_id, order_no, sku_info_id, sku_title,
ware_info_id, ware_no, ware_title, pay_no, pay_method, amt_paid, cash_amt, pay_time, remark,
......@@ -247,7 +247,7 @@
where repo_account_id = #{repoAccountId}
</select>
<select id="cashType" resultType="com.mmc.payment.entity.CashTypeDO">
<select id="cashType" resultType="com.mmc.payment.entity.cash.CashTypeDO">
select id, `type`
from cash_type
</select>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论