提交 11bf492b 作者: 张小凤

PackageName(update)

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