提交 e5d2b13a 作者: zhenjie

Merge branch 'develop'

FROM openjdk:8-jdk-alpine FROM openjdk:8-jdk-alpine
VOLUME ["/var/log/app/"]
ARG JAVA_OPTS ARG JAVA_OPTS
ENV JAVA_OPTS=$JAVA_OPTS ENV JAVA_OPTS=$JAVA_OPTS
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
......
...@@ -4,6 +4,8 @@ metadata: ...@@ -4,6 +4,8 @@ metadata:
name: payment-deployment name: payment-deployment
namespace: default namespace: default
spec: spec:
minReadySeconds: 250
revisionHistoryLimit: 2
replicas: 1 replicas: 1
selector: selector:
matchLabels: matchLabels:
...@@ -16,6 +18,9 @@ spec: ...@@ -16,6 +18,9 @@ spec:
containers: containers:
- name: payment - name: payment
image: REGISTRY/NAMESPACE/IMAGE:TAG image: REGISTRY/NAMESPACE/IMAGE:TAG
volumeMounts:
- name: log-of-app
mountPath: /var/log/app
resources: resources:
limits: limits:
memory: 1024Mi memory: 1024Mi
...@@ -27,4 +32,8 @@ spec: ...@@ -27,4 +32,8 @@ spec:
valueFrom: valueFrom:
configMapKeyRef: configMapKeyRef:
name: payment-map name: payment-map
key: SPRING_PROFILES_ACTIVE key: SPRING_PROFILES_ACTIVE
\ No newline at end of file volumes:
- name: log-of-app
hostPath:
path: /var/log/app
\ No newline at end of file
apiVersion: apps/v1
kind: Deployment
metadata:
name: payment-deployment
spec:
replicas: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
\ No newline at end of file
...@@ -9,4 +9,9 @@ commonLabels: ...@@ -9,4 +9,9 @@ commonLabels:
commonAnnotations: commonAnnotations:
note: This is dev! note: This is dev!
patches: patches:
- path: ./configMap.yaml - path: ./increase_replicas.yaml
\ No newline at end of file - path: ./configMap.yaml
images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/payment
newTag: 100991a5fb3e8db73695404a54af20b579da421f
...@@ -3,4 +3,9 @@ kind: Deployment ...@@ -3,4 +3,9 @@ kind: Deployment
metadata: metadata:
name: payment-deployment name: payment-deployment
spec: spec:
replicas: 1 replicas: 2
\ No newline at end of file strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
\ No newline at end of file
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;
/**
* @Author small
* @Date 2023/5/29 16:18
* @Version 1.0
*/
public enum FlyerAccountType {
YK(0, "游客"), PT(1, "普通用户"), GR(2, "个人飞手"), JG(3, "飞手机构");
FlyerAccountType(Integer code, String status) {
this.code = code;
this.status = status;
}
private Integer code;
private String status;
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
}
package com.mmc.payment.common;
/**
* @Author small
* @Date 2023/5/30 10:47
* @Version 1.0
*/
public enum PortTypeEnum {
ADMIN_ACCOUNTS(0, "后台管理账号"), CLIENTS_AND_APPLETS(100, "客户端和小程序");
private Integer code;
private String name;
PortTypeEnum(Integer code, String name) {
this.code = code;
this.name = name;
}
public void setCode(Integer code) {
this.code = code;
}
public Integer getCode() {
return this.code;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
}
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
...@@ -381,14 +383,14 @@ public enum ResultEnum implements BaseErrorInfoInterface { ...@@ -381,14 +383,14 @@ public enum ResultEnum implements BaseErrorInfoInterface {
SCORE_ERROR("40177", "您输入的积分数量有误,请重新输入!"), SCORE_ERROR("40177", "您输入的积分数量有误,请重新输入!"),
PLEASE_FILL_IN_THE_CONTRACT_TEMPLATE_FIRST("40178", "请先填充合同模板!"), PLEASE_FILL_IN_THE_CONTRACT_TEMPLATE_FIRST("40178", "请先填充合同模板!"),
SCORE_NOT_GIVE_MYSELF("40179","积分不能转赠给本人,请重新操作"), SCORE_NOT_GIVE_MYSELF("40179", "积分不能转赠给本人,请重新操作"),
ALREADY_FINISH_ENT_AUTH_ERROR("2000", "助力已完成!"), ALREADY_FINISH_ENT_AUTH_ERROR("2000", "助力已完成!"),
SYSTEM_ERROR ("2001","系统错误,请稍后重试") , SYSTEM_ERROR("2001", "系统错误,请稍后重试"),
RULE_ERROR ("2002","当前兑换比例已失效,请刷新后重试"), RULE_ERROR("2002", "当前兑换比例已失效,请刷新后重试"),
COUNT_LIMIT_ERROR("2003", "参与次数已达上线"), COUNT_LIMIT_ERROR("2003", "参与次数已达上线"),
ALREADY_ENT_AUTH_ERROR("2004","助力失败,您已完成企业认证!"), ALREADY_ENT_AUTH_ERROR("2004", "助力失败,您已完成企业认证!"),
ALREADY_REAL_NAME_AUTH_ERROR("2005","助力失败,您已完成实名认证!"), ALREADY_REAL_NAME_AUTH_ERROR("2005", "助力失败,您已完成实名认证!"),
PARTICIPATE_BUT_NOT_AUTH_ERROR("2006", "待完成授权或认证"), PARTICIPATE_BUT_NOT_AUTH_ERROR("2006", "待完成授权或认证"),
ALREADY_HELP_ERROR("2007", "已助力"), ALREADY_HELP_ERROR("2007", "已助力"),
ALREADY_STOP_ERROR("2008", "活动已下线"), ALREADY_STOP_ERROR("2008", "活动已下线"),
...@@ -396,15 +398,20 @@ public enum ResultEnum implements BaseErrorInfoInterface { ...@@ -396,15 +398,20 @@ public enum ResultEnum implements BaseErrorInfoInterface {
ALREADY_BINDING_ERROR("2010", "优惠券已被绑定"), ALREADY_BINDING_ERROR("2010", "优惠券已被绑定"),
ALREADY_DIVIDE_ERROR("2011", "订单已分成"), ALREADY_DIVIDE_ERROR("2011", "订单已分成"),
DIVIDE_OBJ_NOT_EXIST("2012", "先点击确认添加分成对象"), DIVIDE_OBJ_NOT_EXIST("2012", "先点击确认添加分成对象"),
THE_REQUEST_IS_NOT_AUTHENTICATED("2013","请求未经过鉴权"), THE_REQUEST_IS_NOT_AUTHENTICATED("2013", "请求未经过鉴权"),
THE_TOKEN_IS_INVALID("2014","token失效") ;; THE_TOKEN_IS_INVALID("2014", "token失效"),
FAILED_TO_CHARGE_MONEY("2015", "只有后台账号才能给小程序客户端充值"),
NO_WALLET_FUNCTION("2016", "后台账号无钱包功能"),
THE_ORDER_HAS_BEEN_PAID("2017", "订单已支付/订单编号错误"),
THE_CURRENT_AMOUNT_IS_INSUFFICIENT("2019", "当前余额不足,请充值再支付"),
THE_TOKEN_CANNOT_BE_NULL("2018", "token不能为null");
/** /**
* 错误码 * 错误码
* *
* @return * @return
*/ */
public String resultCode; public String resultCode;
/** /**
* 错误描述 * 错误描述
......
package com.mmc.payment.common; package com.mmc.payment.common.util;
import java.math.BigDecimal; import java.math.BigDecimal;
......
package com.mmc.payment.common.util;
import org.springframework.beans.BeanUtils;
import java.util.Objects;
/**
* @Author small
* @Date 2023/5/30 10:21
* @Version 1.0
*/
public class BeanCopyUtils {
public static <T> T properties(Object source, T target) {
if (Objects.isNull(source)) {
return target;
}
BeanUtils.copyProperties(source, target);
return target;
}
public static <T> T properties(Object source, Class<T> target) {
T t = null;
try {
t = target.newInstance();
if (Objects.isNull(source)) {
return t;
}
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
BeanUtils.copyProperties(source, t);
return t;
}
}
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;
...@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -26,6 +27,7 @@ import javax.servlet.http.HttpServletRequest; ...@@ -26,6 +27,7 @@ import javax.servlet.http.HttpServletRequest;
*/ */
@Api(tags = {"云仓-账号相关-接口"}) @Api(tags = {"云仓-账号相关-接口"})
@RestController @RestController
@ApiIgnore
@RequestMapping("/repoaccount/") @RequestMapping("/repoaccount/")
public class RepoAccountController { public class RepoAccountController {
...@@ -39,7 +41,7 @@ public class RepoAccountController { ...@@ -39,7 +41,7 @@ public class RepoAccountController {
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = RepoAccountDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RepoAccountDTO.class)})
@PostMapping("listPagePayManager") @PostMapping("listPagePayManager")
public ResultBody listPagePayManager(HttpServletRequest request, @RequestBody RepoAccountQO param) { public ResultBody listPagePayManager(HttpServletRequest request, @RequestBody RepoAccountQO param) {
return ResultBody.success(repoAccountService.listPagePayManager(param,this.getCurrentAccount(request))); return ResultBody.success(repoAccountService.listPagePayManager(param, this.getCurrentAccount(request)));
} }
/** /**
...@@ -51,6 +53,4 @@ public class RepoAccountController { ...@@ -51,6 +53,4 @@ public class RepoAccountController {
} }
} }
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.PayCashResultDTO; import com.mmc.payment.model.dto.cash.CashTypeDTO;
import com.mmc.payment.model.dto.RepoCashDTO; 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.RepoCashQO;
import com.mmc.payment.model.vo.RepoCashVO; import com.mmc.payment.model.qo.UserCashQO;
import com.mmc.payment.model.vo.RepoOrderPayVO; 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 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;
...@@ -29,70 +33,123 @@ import java.math.BigDecimal; ...@@ -29,70 +33,123 @@ import java.math.BigDecimal;
@RequestMapping("/repocash/") @RequestMapping("/repocash/")
public class RepoCashController extends BaseController { public class RepoCashController extends BaseController {
@Autowired private RepoCashService repoCashService; @Autowired
private RepoCashService repoCashService;
@Autowired private StringRedisTemplate stringRedisTemplate;
@Autowired
@ApiOperation(value = "web-订单支付") private StringRedisTemplate stringRedisTemplate;
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = PayCashResultDTO.class)})
@PostMapping("orderPayment")
public PayCashResultDTO orderPayment(HttpServletRequest request, @RequestParam String orderNo) { @ApiOperation(value = "现金管理列表")
return repoCashService.orderPayment(this.getCurrentAccount(request), orderNo); @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RepoWalletDTO.class)})
} @PostMapping("listPagePayManager")
public ResultBody<RepoWalletDTO> listPagePayManager(HttpServletRequest request, @RequestBody UserCashQO param) {
@ApiOperation(value = "支付订单-充值扣款") return ResultBody.success(repoCashService.listPagePayManager(this.getCurrentAccount(request), param));
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = PayCashResultDTO.class)}) }
@ApiIgnore
@PostMapping("PayCashOrder")
public PayCashResultDTO feignPayCashOrder(@RequestBody RepoOrderPayVO orderPay) { @ApiOperation(value = "余额变更-分页-列表")
return repoCashService.payCashOrder(orderPay); @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RepoCashDTO.class)})
} @PostMapping("listPageCash")
public ResultBody<RepoCashDTO> listPageCash(HttpServletRequest request, @RequestBody RepoCashQO param) {
@ApiOperation(value = "当前用户剩余的余额") return ResultBody.success(repoCashService.listPageRepoCash(this.getCurrentAccount(request), param));
@GetMapping("RemainingBalance") }
public BigDecimal RemainingBalance(
@RequestParam(value = "repoAccountId", required = true) Integer repoAccountId) {
@ApiOperation(value = "现金类型")
String s = stringRedisTemplate.opsForValue().get("R2023052814538712"); @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RepoCashDTO.class)})
return repoCashService.RemainingBalance(repoAccountId); @PostMapping("cashType")
} public ResultBody<CashTypeDTO> cashType() {
return repoCashService.cashType();
@ApiOperation(value = "余额变更-分页-列表") }
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = RepoCashDTO.class)})
@PostMapping("listPageCash")
public ResultBody listPageCash(@RequestBody RepoCashQO param) { @ApiOperation(value = "v1.0.1-现金-充值/即扣款")
return ResultBody.success(repoCashService.listPageRepoCash(param)); @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
} @RepeatSubmit
@PostMapping("reqCash")
@ApiOperation(value = "余额变更-修改备注") public ResultBody reqCash(HttpServletRequest request, @RequestBody RepoCashVO param) {
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) return repoCashService.reqCash(this.getCurrentAccount(request), param);
@GetMapping("updateCashRemark") }
public ResultBody updateCashRemark(@RequestParam Integer id, @RequestParam() String remark) {
repoCashService.updateCashRemark(id, remark);
return ResultBody.success(); @ApiOperation(value = "小程序用户生成时,用户钱包中用户同时生成————用于远程,前端不使用")
} @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("walletUsers")
@ApiOperation(value = "v1.0.1Yes-现金-充值") public ResultBody walletUsers(@RequestBody WalletUsersVO walletUsersVO) {
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) return repoCashService.walletUsers(walletUsersVO);
@RepeatSubmit }
@PostMapping("reqCash")
public ResultBody reqCash(HttpServletRequest request, @RequestBody RepoCashVO param) {
return repoCashService.reqCash(this.getCurrentAccount(request), param); @ApiOperation(value = "租赁——订单支付")
} @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("orderPayment")
@ApiOperation(value = "v1.0.1-Yes现金-手动扣除") public ResultBody orderPayment(HttpServletRequest request, @RequestParam String orderNo) {
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) return repoCashService.orderPayment(this.getCurrentAccount(request), orderNo);
@RepeatSubmit }
@PostMapping("dedCash")
public ResultBody dedCash(HttpServletRequest request, @RequestBody RepoCashVO param) { @ApiOperation(value = "支付订单-充值扣款")
return repoCashService.dedCash(this.getCurrentAccount(request), param); @ApiResponses({@ApiResponse(code = 200, message = "OK", response = PayCashResultDTO.class)})
} @ApiIgnore
@PostMapping("PayCashOrder")
@ApiIgnore public PayCashResultDTO feignPayCashOrder(@RequestBody RepoOrderPayVO orderPay) {
@ApiOperation(value = "查询退款金额") return repoCashService.payCashOrder(orderPay);
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = RepoCashDTO.class)}) }
@GetMapping("feignRefundInfo")
public RepoCashDTO feignRefundInfo(@RequestParam String refundNo) {
return repoCashService.getRefundInfo(refundNo); @ApiOperation(value = "当前用户剩余的余额--后台内部调用")
} @GetMapping("RemainingBalance")
public BigDecimal RemainingBalance(
@RequestParam(value = "repoAccountId", required = true) Integer repoAccountId) {
return repoCashService.RemainingBalance(repoAccountId);
}
@ApiIgnore
@ApiOperation(value = "余额变更-修改备注")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("updateCashRemark")
public ResultBody updateCashRemark(@RequestParam Integer id, @RequestParam() String remark) {
repoCashService.updateCashRemark(id, remark);
return ResultBody.success();
}
@ApiIgnore
@ApiOperation(value = "v1.0.1-Yes现金-手动扣除")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@RepeatSubmit
@PostMapping("dedCash")
public ResultBody dedCash(HttpServletRequest request, @RequestBody RepoCashVO param) {
return repoCashService.dedCash(this.getCurrentAccount(request), param);
}
@ApiIgnore
@ApiOperation(value = "查询退款金额")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = RepoCashDTO.class)})
@GetMapping("feignRefundInfo")
public RepoCashDTO feignRefundInfo(@RequestParam String refundNo) {
return repoCashService.getRefundInfo(refundNo);
}
@ApiOperation(value = "获取用户钱包")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = RepoCashDTO.class)})
@GetMapping("userWallet")
public ResultBody<RepoWalletDTO> userWallet(HttpServletRequest request) {
return repoCashService.userWallet(this.getCurrentAccount(request));
}
@ApiOperation(value = "退款金额---用户后台内部调用前端不使用")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("amountOfRefund")
public ResultBody amountOfRefund(HttpServletRequest request, @RequestParam(value = "orderNo") String orderNo,
@RequestParam(value = "actualPay") BigDecimal actualPay,
@RequestParam(value = "repoAccountId") Integer repoAccountId,
@RequestParam(value = "refundNo") String refundNo) {
return repoCashService.amountOfRefund(this.getCurrentAccount(request), orderNo, actualPay, repoAccountId, refundNo);
}
} }
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.RepoCashDO; import com.mmc.payment.entity.cash.CashTypeDO;
import com.mmc.payment.entity.RepoWalletDO; 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.RepoCashQO;
import com.mmc.payment.model.qo.UserCashQO;
import com.mmc.payment.model.qo.WalletUsersQO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -13,23 +16,37 @@ import java.util.List; ...@@ -13,23 +16,37 @@ import java.util.List;
*/ */
@Mapper @Mapper
public interface RepoCashDao { public interface RepoCashDao {
RepoCashDO getRefundCashInfo(String refundNo); RepoCashDO getRefundCashInfo(String refundNo);
void insertRepoCash(RepoCashDO rc); void insertRepoCash(RepoCashDO rc);
void updateCashRemark(Integer id, String remark); void updateCashRemark(Integer id, String remark);
List<RepoCashDO> listPagePFRepoCash(RepoCashQO param); List<RepoCashDO> listPagePFRepoCash(RepoCashQO param);
int countPagePFRepoCash(RepoCashQO param); int countPagePFRepoCash(RepoCashQO param);
RepoWalletDO getRepoWalletInfo(Integer repoAccountId); RepoWalletDO getRepoWalletInfo(Integer repoAccountId);
void updateRepoWalletAmt(Integer repoAccountId, BigDecimal chageAmt); void updateRepoWalletAmt(Integer repoAccountId, BigDecimal chageAmt);
BigDecimal RemainingBalance(Integer repoAccountId); BigDecimal RemainingBalance(Integer repoAccountId);
void updateWalletAmt(Integer repoAccountId, BigDecimal addAmt, BigDecimal addPaid); void updateWalletAmt(Integer repoAccountId, BigDecimal addAmt, BigDecimal addPaid);
void orderPayment(RepoCashDO repoCashDO); void orderPayment(RepoCashDO repoCashDO);
int countPagePayManager(UserCashQO param);
List<RepoWalletDO> listPagePayManager(UserCashQO param);
List<RepoWalletDO> listWalletInfo(UserCashQO param);
void walletUsers(WalletUsersQO properties);
Integer findWalletUsers(WalletUsersQO properties);
List<CashTypeDO> cashType();
RepoWalletDO userWallet(Integer userAccountId);
} }
package com.mmc.payment.entity.cash;
import com.mmc.payment.model.dto.cash.CashTypeDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author small
* @Date 2023/5/30 19:59
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class CashTypeDO implements Serializable {
private Integer id;
private String type;
public CashTypeDTO buildCashTypeDTO() {
return CashTypeDTO.builder().id(this.id)
.type(this.type).build();
}
}
package com.mmc.payment.entity.flyer;
import com.mmc.payment.common.FlyerAccountType;
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;
import lombok.NoArgsConstructor;
import org.springframework.util.StringUtils;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;
import java.util.HashSet;
/**
* @Author small
* @Date 2023/5/29 16:11
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class FlyerAccountDO implements Serializable {
private static final long serialVersionUID = 6990172418648675316L;
private Integer id;
private String uid;
private String accountName;
private String phoneNum;
private Integer accountType;
private Integer realAuthStatus;
private Integer entAuthStatus;
private Integer workStatus;
private Integer serviceStatus;
private String openId;
private String unionId;
private String nickName;
private String resAddress;
private String headerImg;
private Double lon;
private Double lat;
private String ports;
private String remark;
private Integer deleted;
private Date createTime;
private Date updateTime;
private Integer sale;
private Integer white;
private Integer source;
private FlyerAccountDO rcdFlyer;
/**
* 辅助字段-start
*
* @return
*/
private String entName;
private Integer licStatus;
private FlyerEntInfoDO entInfo;
private Date rcdCreateTime;
private String rcdRemark;
private String flyerName;
private Integer protocolAuth;
private Integer electricAuth;
private Integer aviationAuth;
private Integer emergencyAuth;
private Integer superviseAuth;
private Integer universalAuth;
private Integer oilGasAuth;
private Integer demoAuth;
private Integer aviationOutAuth;
private Integer aviationInAuth;
private Integer commandAuth;
private Integer tmjAuth;
private String xeUserId;
public FlyerAccountDO(FlyerWorkStatusVO flyerWorkStatusVO) {
this.id = flyerWorkStatusVO.getId();
this.resAddress = flyerWorkStatusVO.getResAddress();
this.lon = flyerWorkStatusVO.getLon();
this.lat = flyerWorkStatusVO.getLat();
this.workStatus = flyerWorkStatusVO.getWorkStatus();
}
/**
* 辅助字段-end
*
* @return
*/
public FlyerAccountDTO builderFlyerAccountDTO() {
Integer white = 0;
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)
.realAuthStatus(this.realAuthStatus).entAuthStatus(this.entAuthStatus).workStatus(this.workStatus)
.nickName(this.nickName).serviceStatus(this.serviceStatus).unionId(this.unionId)
.headerImg(this.headerImg).lon(this.lon).lat(this.lat).remark(this.remark).deleted(this.deleted).createTime(this.createTime)
.updateTime(this.updateTime).resAddress(this.resAddress).entName(this.entName).licStatus(this.licStatus)
.ports(StringUtils.isEmpty(this.ports) ? null
: new HashSet<String>(Arrays.asList(this.ports.split(","))))
.entInfo(this.entInfo == null ? null : this.entInfo.buildFlyerEntInfoDTO()).openId(this.openId)
.sale(this.sale)
.rcdFlyerAccountId(this.rcdFlyer == null ? null : this.rcdFlyer.getId())
.rcdUid(this.rcdFlyer == null ? null : this.rcdFlyer.getUid())
.rcdAccountName(this.rcdFlyer == null ? null : this.rcdFlyer.getAccountName())
.rcdNickName(this.rcdFlyer == null ? null : this.rcdFlyer.getNickName()).white(white).source(this.source).build();
}
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 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)
.oilGasAuth(this.oilGasAuth).demoAuth(this.demoAuth).aviationOutAuth(this.aviationOutAuth)
.aviationInAuth(this.aviationOutAuth).commandAuth(this.commandAuth).tmjAuth(this.tmjAuth).build();
}
/**
* 是否为飞手机构用户
*
* @return
*/
public boolean checkFlyerEnt() {
return (FlyerAccountType.JG.getCode().toString().equals(this.accountType.toString()));
}
/**
* 是否为飞手个人用户
*
* @return
*/
public boolean checkFlyer() {
return (FlyerAccountType.GR.getCode().toString().equals(this.accountType.toString()));
}
/**
* 是否为普通用户
*
* @return
*/
public boolean checkUsual() {
return (FlyerAccountType.PT.getCode().toString().equals(this.accountType.toString()));
}
}
package com.mmc.payment.entity.flyer;
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;
import java.io.Serializable;
import java.util.Date;
/**
* @Author small
* @Date 2023/5/29 16:12
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FlyerEntInfoDO implements Serializable {
private static final long serialVersionUID = -3400952137664644676L;
private Integer id;
private Integer flyerAccountId;
private String entName;
private Integer entCheckStatus;
private String entLegalPerson;
private String uscCode;
private String unLicImg;
private String bankName;
private String accountHolder;
private String bankAccount;
private String idNumber;
private String remark;
private Date createTime;
private Date updateTime;
/**
* 额外字段
*/
private Integer sumOfFlyer;
private Integer countOfAuthFlyer;
private String uid;
private String phoneNum;
private String resAddress;
private String nickName;
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)
.idNumber(this.idNumber).remark(this.remark).createTime(this.createTime).updateTime(this.updateTime).sumOfFlyer(this.sumOfFlyer)
.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();
}
}
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.order;
import com.mmc.payment.model.dto.order.OrderVcuDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;
/**
* @Author small
* @Date 2023/6/1 15:55
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderVcuDO implements Serializable {
private static final long serialVersionUID = 5685858931224789256L;
private Integer id;
private Integer orderInfoId;
private Integer orderRefundId;
private Integer vcuType;
private Integer vcuSatus;
private String imgs;
private String videoUrl;
private String remark;
private Date createTime;
public OrderVcuDTO buildOrderVcuDTO() {
return OrderVcuDTO.builder().id(this.id).orderInfoId(this.orderInfoId).vcuType(this.vcuType)
.vcuSatus(this.vcuSatus)
.imgs(StringUtils.isBlank(this.imgs) ? null : Arrays.asList(this.imgs.split(",")))
.remark(this.remark)
.videoUrl(this.videoUrl).build();
}
}
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;
...@@ -27,6 +27,7 @@ public class RepoCashDO implements Serializable { ...@@ -27,6 +27,7 @@ public class RepoCashDO implements Serializable {
private Integer repoAccountId; private Integer repoAccountId;
private String uid; private String uid;
private String accountName; private String accountName;
private String userName;
private Integer orderInfoId; private Integer orderInfoId;
private String orderNo; private String orderNo;
private Integer skuInfoId; private Integer skuInfoId;
...@@ -47,12 +48,23 @@ public class RepoCashDO implements Serializable { ...@@ -47,12 +48,23 @@ public class RepoCashDO implements Serializable {
private Integer updateUser; private Integer updateUser;
private Date updateTime; private Date updateTime;
private String orderName;
private String type;
private BigDecimal cashFreeze;
private BigDecimal shouldPay;
private BigDecimal actualPay;
public RepoCashDTO buildRepoCashDTO() { public RepoCashDTO buildRepoCashDTO() {
return RepoCashDTO.builder().id(this.id).repoAccountId(this.repoAccountId).uid(this.uid) return RepoCashDTO.builder().id(this.id).repoAccountId(this.repoAccountId).uid(this.uid)
.accountName(this.accountName).orderInfoId(this.orderInfoId).orderNo(this.orderNo) .accountName(this.accountName).orderInfoId(this.orderInfoId).orderNo(this.orderNo)
.skuInfoId(this.skuInfoId).skuTitle(this.skuTitle).wareInfoId(this.wareInfoId).wareNo(this.wareNo) .skuInfoId(this.skuInfoId).skuTitle(this.skuTitle).wareInfoId(this.wareInfoId).wareNo(this.wareNo)
.wareTitle(this.wareTitle).payNo(this.payNo).payMethod(this.payMethod).amtPaid(this.amtPaid) .wareTitle(this.wareTitle).payNo(this.payNo).payMethod(this.payMethod).amtPaid(this.amtPaid)
.refundNo(this.refundNo).createUser(this.createUser) .refundNo(this.refundNo).createUser(this.createUser)
.userName(this.userName)
.orderName(this.orderName)
.type(this.type)
.cashFreeze(this.cashFreeze)
.voucher(StringUtils.isBlank(this.voucher) ? null : Arrays.asList(this.voucher.split(","))) .voucher(StringUtils.isBlank(this.voucher) ? null : Arrays.asList(this.voucher.split(",")))
.cashAmt(this.cashAmt).payTime(this.payTime).remark(this.remark).build(); .cashAmt(this.cashAmt).payTime(this.payTime).remark(this.remark).build();
} }
......
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;
...@@ -30,6 +30,11 @@ public class RepoWalletDO implements Serializable { ...@@ -30,6 +30,11 @@ public class RepoWalletDO implements Serializable {
private String remark; private String remark;
private Date updateTime; private Date updateTime;
private Date createTime; private Date createTime;
private String phoneNum;
private String userName;
private String nickName;
private Integer portType;
private String uid;
public void initWallet(Integer repoAccountId) { public void initWallet(Integer repoAccountId) {
this.repoAccountId = repoAccountId; this.repoAccountId = repoAccountId;
...@@ -40,9 +45,17 @@ public class RepoWalletDO implements Serializable { ...@@ -40,9 +45,17 @@ public class RepoWalletDO implements Serializable {
} }
public RepoWalletDTO buildRepoWalletDTO() { public RepoWalletDTO buildRepoWalletDTO() {
return RepoWalletDTO.builder().id(this.id).repoAccountId(this.repoAccountId).cashAmt(this.cashAmt) return RepoWalletDTO.builder().id(this.id).
.cashPaid(this.cashPaid).cashFreeze(this.cashFreeze).rcdRebateAmt(this.rcdRebateAmt).rebateWdl(this.rebateWdl) repoAccountId(this.repoAccountId).
.rebateFreeze(this.rebateFreeze).remark(this.remark).build(); cashAmt(this.cashAmt).
cashPaid(this.cashPaid).
cashFreeze(this.cashFreeze)
.userName(this.userName)
.uid(this.uid)
.nickName(this.nickName)
.phoneNum(this.phoneNum).
portType(this.portType).
remark(this.remark).build();
} }
/* public RepoRebateSubDTO buildRepoRebateSubDTO(){ /* public RepoRebateSubDTO buildRepoRebateSubDTO(){
......
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;
...@@ -38,10 +38,11 @@ public class AuthSignatureFilter implements AuthFilter { ...@@ -38,10 +38,11 @@ public class AuthSignatureFilter implements AuthFilter {
/** /**
* 无需登录白名单 * 无需登录白名单
*/ */
private static final String[] IGNORE_URLS = {"/payment/swagger/swagger-resources","/payment/swagger/v2/api-docs","/payment/swagger/doc.html"}; private static final String[] IGNORE_URLS = {"/payment/swagger-resources"
, "/payment/v2/api-docs", "/payment/repocash/walletUsers", "/payment/doc.html"};
/*无需加密狗无需登录白名单*/ /*无需加密狗无需登录白名单*/
private static final String[] USE_KEY = {"/crm/account/loginByUsbKey"}; private static final String[] USE_KEY = {"/oms/account/loginByUsbKey"};
/** /**
* 请求方式预请求方式值 * 请求方式预请求方式值
...@@ -49,7 +50,7 @@ public class AuthSignatureFilter implements AuthFilter { ...@@ -49,7 +50,7 @@ public class AuthSignatureFilter implements AuthFilter {
private static final String REQUEST_METHOD_OPTIONS_VALUE = "OPTIONS"; private static final String REQUEST_METHOD_OPTIONS_VALUE = "OPTIONS";
public static final String SWAGGER_URL_PREFIX = "/payment/swagger"; public static final String SWAGGER_URL_PREFIX = "/payment/doc.html";
@Override @Override
public void init(FilterConfig filterConfig) { public void init(FilterConfig filterConfig) {
...@@ -69,24 +70,25 @@ public class AuthSignatureFilter implements AuthFilter { ...@@ -69,24 +70,25 @@ public class AuthSignatureFilter implements AuthFilter {
// 忽略以下url请求,白名单路径以及swagger路径 // 忽略以下url请求,白名单路径以及swagger路径
if (!ArrayUtils.contains(IGNORE_URLS, url) if (!ArrayUtils.contains(IGNORE_URLS, url)
&& !ArrayUtils.contains(USE_KEY, url) && !url.startsWith("/payment/webjars") && !url.startsWith(SWAGGER_URL_PREFIX)) { && !ArrayUtils.contains(USE_KEY, url) && !url.startsWith("/payment/webjars") && !url.startsWith(SWAGGER_URL_PREFIX)) {
if (REQUEST_METHOD_OPTIONS_VALUE.equals(request.getMethod())) { if (REQUEST_METHOD_OPTIONS_VALUE.equals(request.getMethod())) {
response.setStatus(HttpServletResponse.SC_OK); response.setStatus(HttpServletResponse.SC_OK);
return false; return false;
} else { } else {
String token = request.getHeader("token"); String token = request.getHeader("token");
if (null==token){ if (null == token) {
response(response, ResultBody.error(ResultEnum.THE_REQUEST_IS_NOT_AUTHENTICATED)); response(response, ResultBody.error(ResultEnum.THE_REQUEST_IS_NOT_AUTHENTICATED));
return false; return false;
} }
String s = stringRedisTemplate.opsForValue().get(token); String s = stringRedisTemplate.opsForValue().get(token);
if (null==s){ if (null == s) {
response(response,ResultBody.error(ResultEnum.THE_TOKEN_IS_INVALID)); response(response, ResultBody.error(ResultEnum.THE_TOKEN_IS_INVALID));
return false; return false;
} }
UserAccountDTO userAccountDTO = JSON.parseObject(s, UserAccountDTO.class); UserAccountDTO userAccountDTO = JSON.parseObject(s, UserAccountDTO.class);
try { try {
Tenant tenant = TenantContext.buildTenant(userAccountDTO.getAccountNo()); Tenant tenant = TenantContext.buildTenant(userAccountDTO.getAccountNo());
if (tenant!=null){ if (tenant != null) {
TenantContext.setTenant(tenant); TenantContext.setTenant(tenant);
return true; return true;
} }
......
package com.mmc.payment.model.dto.cash;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author small
* @Date 2023/5/30 20:00
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CashTypeDTO {
private static final long serialVersionUID = -5663270547201316327L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "type")
private String type;
}
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.flyer;
import com.mmc.payment.common.FlyerAccountType;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Set;
/**
* @Author small
* @Date 2023/5/29 16:14
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
//@ApiModel(value = "com.mmc.csf.model.dto.FlyerAccountDTO", description = "飞手端用户DTO")
public class FlyerAccountDTO implements Serializable {
private static final long serialVersionUID = -5663270547201316327L;
@ApiModelProperty(value = "飞手端用户id")
private Integer id;
@ApiModelProperty(value = "飞手端用户uid")
private String uid;
@ApiModelProperty(value = "飞手端用户名称")
private String accountName;
@ApiModelProperty(value = "联系电话")
private String phoneNum;
@ApiModelProperty(value = "飞手端用户类型,(个人飞手,机构)")
private Integer accountType;
@ApiModelProperty(value = "实名认证状态")
private Integer realAuthStatus;
@ApiModelProperty(value = "企业认证状态")
private Integer entAuthStatus;
@ApiModelProperty(value = "工作状态")
private Integer workStatus;
@ApiModelProperty(value = "常驻城市")
private String resAddress;
@ApiModelProperty(value = "openId")
private String openId;
@ApiModelProperty(value = "unionId")
private String unionId;
@ApiModelProperty(value = "昵称")
private String nickName;
@ApiModelProperty(value = "头像url")
private String headerImg;
@ApiModelProperty(value = "经度")
private Double lon;
@ApiModelProperty(value = "纬度")
private Double lat;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "删除状态,0未删除,1删除")
private Integer deleted;
@ApiModelProperty(value = "企业名称")
private String entName;
@ApiModelProperty(value = "生成时间")
private Date createTime;
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ApiModelProperty(value = "有无订单:0无,1有")
private Integer serviceStatus;
@ApiModelProperty(value = "距离订单距离-单位km")
private Double orderDist;
@ApiModelProperty(value = "服务中的订单名称")
private List<String> orderNames;
@ApiModelProperty(value = "飞手认证状态")
private Integer licStatus;
@ApiModelProperty(value = "机构信息")
private FlyerEntInfoDTO entInfo;
@ApiModelProperty(value = "抢单状态-0否-1是")
private Integer applyOrder;
@ApiModelProperty(value = "多端用户,USER_PORT(云享飞)-FLYER_PORT(云飞手)-REPO_PORT(云仓)")
private Set<String> ports;
@ApiModelProperty(value = "推荐人ID")
private Integer rcdFlyerAccountId;
@ApiModelProperty(value = "推荐人昵称")
private String rcdNickName;
@ApiModelProperty(value = "推荐人uid")
private String rcdUid;
@ApiModelProperty(value = "推荐人账号名称")
private String rcdAccountName;
@ApiModelProperty(value = "已推荐用户数")
private Integer rcdUserNumber;
@ApiModelProperty(value = "是否销售")
private Integer sale;
@ApiModelProperty(value = "是否白名单")
private Integer white;
@ApiModelProperty(value = "用户来源:0自然流,1海报,2抖音,3公众号,4社群,5招投标,默认0")
private Integer source;
@ApiModelProperty(value = "订单信息")
private FlyerOrderTaskDTO flyerOrderTask;
@ApiModelProperty(value = "场景认证信息")
private FlyerScenesAuthDTO flyerScenesAuth;
/**
* 是否为飞手机构用户
*
* @return
*/
public boolean checkFlyerEnt() {
return (FlyerAccountType.JG.getCode().toString().equals(this.accountType.toString()));
}
/**
* 是否为飞手个人用户
*
* @return
*/
public boolean checkFlyer() {
return (FlyerAccountType.GR.getCode().toString().equals(this.accountType.toString()));
}
}
package com.mmc.payment.model.dto.flyer;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @Author small
* @Date 2023/5/29 16:12
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
//@ApiModel(value = "com.mmc.csf.model.dto.FlyerEntInfoDTO", description = "飞手机构DTO")
public class FlyerEntInfoDTO implements Serializable {
private static final long serialVersionUID = -3064900348178903673L;
@ApiModelProperty(value = "机构id")
private Integer id;
@ApiModelProperty(value = "飞手端用户id")
private Integer flyerAccountId;
@ApiModelProperty(value = "机构名称")
private String entName;
@ApiModelProperty(value = "机构认证审批状态")
private Integer entCheckStatus;
@ApiModelProperty(value = "机构法人名称")
private String entLegalPerson;
@ApiModelProperty(value = "社会统一信用码")
private String uscCode;
@ApiModelProperty(value = "营业执照url")
private String unLicImg;
@ApiModelProperty(value = "开户银行")
private String bankName;
@ApiModelProperty(value = "账户名称")
private String accountHolder;
@ApiModelProperty(value = "银行账号")
private String bankAccount;
@ApiModelProperty(value = "法人身份证号")
private String idNumber;
@ApiModelProperty(value = "机构备注")
private String remark;
@ApiModelProperty(value = "生成时间")
private Date createTime;
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ApiModelProperty(value = "飞手总数")
private Integer sumOfFlyer;
@ApiModelProperty(value = "认证飞手数")
private Integer countOfAuthFlyer;
@ApiModelProperty(value = "用户uid")
private String uid;
@ApiModelProperty(value = "用户手机号")
private String phoneNum;
@ApiModelProperty(value = "常驻城市")
private String resAddress;
@ApiModelProperty(value = "昵称")
private String nickName;
}
package com.mmc.payment.model.dto.flyer;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @Author small
* @Date 2023/5/29 16:17
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
//@ApiModel(value = "com.mmc.csf.model.dto.FlyerInfoDTO", description = "飞手信息DTO")
public class FlyerInfoDTO implements Serializable {
private static final long serialVersionUID = -5443010919398186590L;
@ApiModelProperty(value = "飞手信息表id")
private Integer id;
@ApiModelProperty(value = "飞手信息表uid")
private String uid;
@ApiModelProperty(value = "飞手id,个人飞手必填,机构飞手为空")
private Integer flyerAccountId;
@ApiModelProperty(value = "机构id")
private Integer flyerEntId;
@ApiModelProperty(value = "飞手类型,0个人飞手,1机构飞手 2机构")
private Integer flyerType;
@ApiModelProperty(value = "飞手姓名")
private String flyerName;
@ApiModelProperty(value = "飞行执照认证状态")
private Integer licStatus;
@ApiModelProperty(value = "飞手执照名称")
private String licName;
@ApiModelProperty(value = "飞手执照编号")
private String licNumber;
@ApiModelProperty(value = "飞行执照url")
private String licImg;
@ApiModelProperty(value = "联系电话")
private String phoneNum;
@ApiModelProperty(value = "身份证号")
private String idNumber;
@ApiModelProperty(value = "性别")
private Integer sex;
@ApiModelProperty(value = "民族")
private String nation;
@ApiModelProperty(value = "出生日期")
private Date birthday;
@ApiModelProperty(value = "地址")
private String address;
@ApiModelProperty(value = "签发机关")
private String signOrg;
@ApiModelProperty(value = "有效开始时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date startDate;
@ApiModelProperty(value = "有效结束时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date endDate;
@ApiModelProperty(value = "身份证正面照url")
private String frontIdImg;
@ApiModelProperty(value = "身份证背面照url")
private String backIdImg;
@ApiModelProperty(value = "实名认证备注")
private String authRemark;
@ApiModelProperty(value = "生成时间")
private Date createTime;
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ApiModelProperty(value = "实名状态")
private Integer realAuthStatus;
@ApiModelProperty(value = "常驻地址")
private String resAddress;
private String entName;
private Integer entCheckStatus;
@ApiModelProperty(value = "飞手审核原因")
private String licCheckReason;
@ApiModelProperty(value = "电子执照认证提交时间")
private Date licCreateTime;
@ApiModelProperty(value = "电子执照认证审核时间")
private Date licUpdateTime;
@ApiModelProperty(value = "商务礼仪认证")
private Integer protocolAuth;
@ApiModelProperty(value = "电力巡检认证状态,0未认证,1通过,2未通过")
private Integer electricAuth;
@ApiModelProperty(value = "航空测绘认证状态,0未认证,1通过,2未通过", hidden = true)
private Integer aviationAuth;
@ApiModelProperty(value = "应急保障认证状态,0未认证,1通过,2未通过", hidden = true)
private Integer emergencyAuth;
@ApiModelProperty(value = "value = 监察巡检认证状态,0未认证,1通过,2未通过", hidden = true)
private Integer superviseAuth;
@ApiModelProperty(value = "通用认证状态,0未认证,1通过,2未通过")
private Integer universalAuth;
@ApiModelProperty(value = "油气巡检认证状态,0未认证,1通过,2未通过")
private Integer oilGasAuth;
@ApiModelProperty(value = "演示认证状态,0未认证,1通过,2未通过")
private Integer demoAuth;
@ApiModelProperty(value = "航空测绘外业状态,0未认证,1通过,2未通过")
private Integer aviationOutAuth;
@ApiModelProperty(value = "航空测绘内业状态,0未认证,1通过,2未通过")
private Integer aviationInAuth;
@ApiModelProperty(value = "指挥车认证状态,0未认证,1通过,2未通过")
private Integer commandAuth;
@ApiModelProperty(value = "天目将软件认证状态,0未认证,1通过,2未通过")
private Integer tmjAuth;
@ApiModelProperty(value = "0:无订单状态(空闲) 1:有订单(作业中)")
private Integer serviceStatus;
@ApiModelProperty(value = "评分记录")
private FlyerRecordDTO record;
}
package com.mmc.payment.model.dto.flyer;
import com.mmc.payment.model.dto.order.OrderTaskDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author small
* @Date 2023/5/29 17:30
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class FlyerOrderTaskDTO implements Serializable {
private static final long serialVersionUID = 4288411060058354326L;
private Integer id;
private Integer orderId;
private Integer flyerAccountId;
private Integer orderType;
private Integer virtualTeamId;
private String orderName;
private String orderNo;
public FlyerOrderTaskDTO(OrderTaskDTO d) {
this.orderId = d.getId();
this.orderName = d.getOrderName();
this.orderNo = d.getOrderNo();
}
}
package com.mmc.payment.model.dto.flyer;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @Author small
* @Date 2023/5/29 16:16
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
//@ApiModel(value = "com.mmc.csf.model.dto.FlyerRcdTeamDTO", description = "飞手推荐团队DTO")
public class FlyerRcdTeamDTO implements Serializable {
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "账户名称")
private String FlyerAccountName;
@ApiModelProperty(value = "uid")
private String uid;
@ApiModelProperty(value = "手机号")
private String phoneNum;
@ApiModelProperty(value = "发展时间")
private Date createTime;
@ApiModelProperty(value = "昵称")
private String nickName;
@ApiModelProperty(value = "企业认证状态:0未认证1已认证")
private Integer entAuthStatus;
@ApiModelProperty(value = "实名认证:0未实名1已实名2未通过")
private Integer realAuthStatus;
@ApiModelProperty(value = "账户类型 0游客1普通用户2个人飞手3飞手机构")
private Integer accountType;
@ApiModelProperty(value = "备注")
private String remark;
}
package com.mmc.payment.model.dto.flyer;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @Author small
* @Date 2023/5/29 17:29
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
//@ApiModel(value = "com.mmc.csf.flyer.dto.FlyerRecordDTO", description = "飞手记录DTO")
public class FlyerRecordDTO implements Serializable {
private static final long serialVersionUID = -188321537755558914L;
private Integer flyerAccountId;
@ApiModelProperty("订单数")
private Integer orderNum;
@ApiModelProperty("任务天数")
private Integer workDay;
@ApiModelProperty("综合评分")
private BigDecimal score;
@ApiModelProperty("差评数")
private Integer negtNum;
@ApiModelProperty("好评数")
private Integer praiseNum;
@ApiModelProperty("差评率")
private BigDecimal negtRate;
public void defaultValue() {
if (orderNum == null) {
orderNum = 0;
}
if (workDay == null) {
workDay = 0;
}
if (score == null) {
score = BigDecimal.ZERO;
}
if (negtNum == null) {
negtNum = 0;
}
if (praiseNum == null) {
praiseNum = 0;
}
}
public void compareNegtRate() {
this.negtRate = (BigDecimal.valueOf(negtNum).divide(BigDecimal.valueOf(negtNum + praiseNum))).setScale(2,
BigDecimal.ROUND_HALF_DOWN);
}
}
package com.mmc.payment.model.dto.flyer;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author small
* @Date 2023/5/29 17:30
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class FlyerScenesAuthDTO implements Serializable {
private static final long serialVersionUID = 66032902942031710L;
@ApiModelProperty("飞手id")
private Integer id;
@ApiModelProperty(value = "商务礼仪认证")
private Integer protocolAuth;
@ApiModelProperty(value = "电力巡检认证状态,0未认证,1通过,2未通过")
private Integer electricAuth;
@ApiModelProperty(value = "航空测绘认证状态,0未认证,1通过,2未通过", hidden = true)
@JsonIgnore
private Integer aviationAuth;
@ApiModelProperty(value = "应急保障认证状态,0未认证,1通过,2未通过", hidden = true)
@JsonIgnore
private Integer emergencyAuth;
@ApiModelProperty(value = "value = 监察巡检认证状态,0未认证,1通过,2未通过", hidden = true)
@JsonIgnore
private Integer superviseAuth;
@ApiModelProperty(value = "通用认证状态,0未认证,1通过,2未通过")
private Integer universalAuth;
@ApiModelProperty(value = "油气巡检认证状态,0未认证,1通过,2未通过")
private Integer oilGasAuth;
@ApiModelProperty(value = "演示认证状态,0未认证,1通过,2未通过")
private Integer demoAuth;
@ApiModelProperty(value = "航空测绘外业状态,0未认证,1通过,2未通过")
private Integer aviationOutAuth;
@ApiModelProperty(value = "航空测绘内业状态,0未认证,1通过,2未通过")
private Integer aviationInAuth;
@ApiModelProperty(value = "指挥车认证状态,0未认证,1通过,2未通过")
private Integer commandAuth;
@ApiModelProperty(value = "天目将软件认证状态,0未认证,1通过,2未通过")
private Integer tmjAuth;
}
package com.mmc.payment.model.dto.flyer;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Author small
* @Date 2023/5/29 17:32
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
//@ApiModel(value = "com.mmc.csf.model.dto.TaskFlyerCostDTO", description = "飞手工资DTO")
public class TaskFlyerCostDTO implements Serializable {
private static final long serialVersionUID = 4411028098471010440L;
@ApiModelProperty(value = "飞手工资id")
private Integer id;
@ApiModelProperty(value = "订单id")
private Integer orderTaskId;
@ApiModelProperty(value = "飞手日薪")
private BigDecimal flyerWag;
@ApiModelProperty(value = "飞手每日补贴")
private BigDecimal flyerSudy;
@ApiModelProperty(value = "每月工资结算日")
private Integer payDay;
@ApiModelProperty(value = "租房补贴")
private BigDecimal rentHouseSudy;
@ApiModelProperty(value = "交通补贴")
private BigDecimal trafficSudy;
@ApiModelProperty(value = "支付比例(例如0.95)")
private BigDecimal payPersent;
@ApiModelProperty(value = "设备信息")
private String deviceInfo;
@ApiModelProperty(value = "生成时间")
private Date createTime;
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ApiModelProperty(value = "任务编号")
private String orderNo;
@ApiModelProperty(value = "任务名称")
private String orderName;
@ApiModelProperty(value = "飞手数量")
private Integer flyerNum;
@ApiModelProperty(value = "服务类型")
private String inspectionName;
@ApiModelProperty(value = "飞手类型(0个人飞手 1飞手机构)")
private Integer flyerType;
// @ApiModelProperty(value = "任务工资信息列表")
//private List<WagTermDetailDTO> details;
@ApiModelProperty(value = "任务开始日")
private Date startTime;
@ApiModelProperty(value = "任务结束日")
private Date endTime;
@ApiModelProperty(value = "高温补贴")
private BigDecimal hotSudy;
@ApiModelProperty(value = "预估金额")
private BigDecimal estimateWag;
@ApiModelProperty(value = "补助标签")
private String sudyTag;
public void defaultValue() {
if (this.flyerWag == null) {
this.flyerWag = BigDecimal.ZERO;
}
if (this.flyerSudy == null) {
this.flyerSudy = BigDecimal.ZERO;
}
if (this.rentHouseSudy == null) {
this.rentHouseSudy = BigDecimal.ZERO;
}
if (this.trafficSudy == null) {
this.trafficSudy = BigDecimal.ZERO;
}
if (this.payPersent == null) {
this.payPersent = BigDecimal.ZERO;
}
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 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.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;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @Author small
* @Date 2023/5/29 17:31
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderTaskDTO implements Serializable {
private static final long serialVersionUID = 6732943573766573605L;
@ApiModelProperty(value = "订单id")
private Integer id;
@ApiModelProperty(value = "主任务id")
private Integer parentId;
@ApiModelProperty(value = "用户id")
private Integer userAccountId;
@ApiModelProperty(value = "订单专属运营id")
private Integer userOperateId;
@ApiModelProperty(value = "用户订单uid")
private String uid;
@ApiModelProperty(value = "订单编号")
private String orderNo;//单号
@ApiModelProperty(value = "订单名称")
private String orderName;//名称
@ApiModelProperty(value = "账单金额")
private BigDecimal orderAmt;//账单金额
@ApiModelProperty(value = "订单现金金额")
private BigDecimal orderCashAmt;
@ApiModelProperty(value = "订单信用金额")
private BigDecimal orderCreditAmt;
@ApiModelProperty(value = "任务状态")
private Integer orderStatus;//任务状态
@ApiModelProperty(value = "评价状态")
private Integer evaluateStatus;//评价状态
private String lastMsg1;//消息
private String lastMag2;
@ApiModelProperty(value = "生成时间")
private Date createTime;
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ApiModelProperty(value = "备注")
private String basicInfo;//基本信息
@ApiModelProperty(value = "预计开始时间")
private String startTime;//开始时间
@ApiModelProperty(value = "预计结束时间")
private String endTime;//结束时间
@ApiModelProperty(value = "实际开始时间")
private String acStartTime;// 实际开始时间
@ApiModelProperty(value = "实际结束时间")
private String acEndTime;// 实际结束时间
@ApiModelProperty(value = "订单地址")
private String taskAddress;
private String image;
@ApiModelProperty(value = "服务id")
private Integer inspectionId;
@ApiModelProperty(value = "服务名称")
private String inspectionName;
@ApiModelProperty(value = "运营联系电话")
private String phoneNum;
@ApiModelProperty(value = "专属运营名称")
private String operateName;
@ApiModelProperty(value = "经度")
private BigDecimal lon;
@ApiModelProperty(value = "纬度")
private BigDecimal lat;
@ApiModelProperty(value = "用户名称")
private String userName;
@ApiModelProperty(value = "是否企业")
private Integer entUser;
@ApiModelProperty(value = "企业名称")
private String entName;
@ApiModelProperty(value = "是否实名")
private Integer realAuthStatus;
@ApiModelProperty(value = "昵称")
private String nickName;
@ApiModelProperty(value = "订单关闭原因")
private String shutReason;
@ApiModelProperty(value = "用户联系电话")
private String userPhoneNum;
@ApiModelProperty(value = "飞手Id")
private Integer flyerAccountId;
@ApiModelProperty(value = "平台工作人员设置的备注")
private String pfRemark;
@ApiModelProperty(value = "飞手端-推送-数据-0否-1是")
private Integer dummy;
@ApiModelProperty(value = "飞手UID")
private String flyerUid;
@ApiModelProperty(value = "飞手账号名")
private String flyerAccountName;
@ApiModelProperty(value = "抢单状态:0待接单,1抢单中")
private Integer applyStatus;
@ApiModelProperty(value = "预付款总金额")
private BigDecimal totalFreeze;
@ApiModelProperty(value = "结算总金额")
private BigDecimal totalPay;
@ApiModelProperty(value = "倒计时")
private Long countSconds;
@ApiModelProperty(value = "飞手基本信息")
private FlyerAccountDTO flyerAccount;
@ApiModelProperty(value = "飞手类型")
private Integer flyerType;
@ApiModelProperty(value = "飞手个数")
private Integer flyerNum;
@ApiModelProperty(value = "0:隐藏 1:显示")
private Integer display;
@ApiModelProperty(value = "飞手-结算-信息", hidden = true)
private TaskFlyerCostDTO taskFlyerCost;
@ApiModelProperty(value = "下期飞手入账时间")
private String nextFlyerIncomeDate;
@ApiModelProperty(value = "是否进行过催付款 0:未催 1:已催")
private Integer urge;
@ApiModelProperty(value = "订单类型")
private Integer orderType;
@ApiModelProperty(value = "确认需求备注")
private String cmdRemark;
@ApiModelProperty(value = "飞手可抢单开始时间")
private Date flyerStartTime;
@ApiModelProperty(value = "飞手可抢单结束时间")
private Date flyerEndTime;
@ApiModelProperty(value = "预估金额")
private BigDecimal estimatedAmount;
@ApiModelProperty(value = "申请id")
private Integer orderApplyId;
@ApiModelProperty(value = "用户下单附件预览效果")
private String userPreview;
@ApiModelProperty(value = "平台上传附件预览效果")
private String platformPreview;
@ApiModelProperty(value = "文案描述")
private String copywriting;
@ApiModelProperty(value = "子任务列表")
private List<OrderTaskDTO> children;
@ApiModelProperty(value = "子订单信息")
private List<OrderTaskSonDTO> son;
public void buildOperateUser(UserAccountDTO op) {
this.phoneNum = op.getPhoneNum();
this.operateName = op.getUserName();
this.userOperateId = op.getId();
}
public void buildWxUser(UserAccountDTO wx) {
this.userAccountId = wx.getId();
this.uid = wx.getUid();
this.nickName = wx.getNickName();
this.userName = wx.getUserName();
this.userPhoneNum = wx.getPhoneNum();
}
public FlyerOrderTaskDTO buildFlyerOrderTaskDTO() {
return FlyerOrderTaskDTO.builder().orderId(this.id).orderNo(this.orderNo).orderName(this.orderName).build();
}
}
package com.mmc.payment.model.dto.order;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @Author small
* @Date 2023/5/29 17:32
* @Version 1.0
*/
@Data
@ApiModel(value = "OrderTaskSonDTO", description = "云享飞订单-子任务表")
@AllArgsConstructor
@NoArgsConstructor
public class OrderTaskSonDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
@ApiModelProperty(value = "0为主任务")
private Integer parentId;
@ApiModelProperty(value = "客户ID")
private Integer userAccountId;
@ApiModelProperty(value = "运营人员ID(负责这个order的运营人员id")
private Integer userOperateId;
@ApiModelProperty(value = "订单编号")
private String orderNo;
@ApiModelProperty(value = "订单名称")
private String orderName;
@ApiModelProperty(value = "订单总金额")
private BigDecimal orderAmt;
@ApiModelProperty(value = "订单金额中的现金金额")
private BigDecimal cashAmt;
@ApiModelProperty(value = "订单金额中的信用金额")
private BigDecimal creditAmt;
@ApiModelProperty(value = "任务飞行地址")
private String taskAddress;
@ApiModelProperty(value = "基本信息")
private String basicInfo;
@ApiModelProperty(value = "服务开始时间")
private LocalDateTime startTime;
@ApiModelProperty(value = "服务结束时间")
private LocalDateTime endTime;
@ApiModelProperty(value = "实际服务开始时间")
private LocalDateTime acStartTime;
@ApiModelProperty(value = "实际服务结束时间")
private LocalDateTime acEndTime;
@ApiModelProperty(value = "0下单初始化(待分配运营)-> 100已分配运营(待需求确认)-> 200已经需求确认(待订单确认)-> 300已订单确认(待预支付)-> 400已预支付(调度中)-> 500飞手已接单(待抵达现场)-> 525飞手已抵达(待开始作业)-> 550已开始作业(作业中)-> 575飞手已完成作业(待平台确认作业完成)-> 600平台已确认作业完成(待验收结算)-> 700验收通过-> 900订单关闭")
private Integer orderStatus;
@ApiModelProperty(value = "评价状态:0未评价 1已评价")
private Integer evaluateStatus;
private LocalDateTime createTime;
private LocalDateTime updateTime;
@ApiModelProperty(value = "服务项ID")
private Integer inspectionId;
@ApiModelProperty(value = "服务名称")
private String inspectionName;
@ApiModelProperty(value = "最近一次操作信息")
private String lastMsg;
@ApiModelProperty(value = "任务地址经度")
private BigDecimal lon;
@ApiModelProperty(value = "任务地址纬度")
private BigDecimal lat;
@ApiModelProperty(value = "订单关闭原因")
private String shutReason;
@ApiModelProperty(value = "是否营销数据(假数据):0:否 1:是")
private Boolean isDummy;
@ApiModelProperty(value = "平台备注")
private String pfRemark;
@ApiModelProperty(value = "飞手类型(0个人飞手 1飞手机构)")
private Integer flyerType;
@ApiModelProperty(value = "任务飞手人数")
private Integer flyerNum;
@ApiModelProperty(value = "0:隐藏 1:显示(隐藏后飞手端不显示,不参与抢单)")
private Integer display;
@ApiModelProperty(value = "飞手评价:0未评价 1已评价")
private Integer flyerEval;
@ApiModelProperty(value = "是否进行过催单 0:未通知 1:已通知")
private Integer isUrge;
@ApiModelProperty(value = "订单类型:0普通订单,1推荐订单,2加急单")
private Integer orderType;
@ApiModelProperty(value = "需求确认备注")
private String cmdRemark;
@ApiModelProperty(value = "飞手抢单开始时间")
private LocalDateTime flyerStartTime;
@ApiModelProperty(value = "飞手抢单结束时间")
private LocalDateTime flyerEndTime;
@ApiModelProperty(value = "推荐机构")
private Integer rcdCompanyId;
}
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.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
...@@ -30,12 +29,16 @@ public class RepoCashDTO implements Serializable { ...@@ -30,12 +29,16 @@ public class RepoCashDTO implements Serializable {
private Integer repoAccountId; private Integer repoAccountId;
@ApiModelProperty(value = "用户UID", hidden = true) @ApiModelProperty(value = "用户UID", hidden = true)
private String uid; private String uid;
@ApiModelProperty(value = "用户名", hidden = true) @ApiModelProperty(value = "账号名称", hidden = true)
private String accountName; private String accountName;
@ApiModelProperty(value = "用户名称", hidden = true)
private String userName;
@ApiModelProperty(value = "订单ID", hidden = true) @ApiModelProperty(value = "订单ID", hidden = true)
private Integer orderInfoId; private Integer orderInfoId;
@ApiModelProperty(value = "订单编号") @ApiModelProperty(value = "订单编号")
private String orderNo; private String orderNo;
@ApiModelProperty(value = "相关订单名称")
private String orderName;
@ApiModelProperty(value = "skuID", hidden = true) @ApiModelProperty(value = "skuID", hidden = true)
private Integer skuInfoId; private Integer skuInfoId;
@ApiModelProperty(value = "sku标题", hidden = true) @ApiModelProperty(value = "sku标题", hidden = true)
...@@ -46,15 +49,15 @@ public class RepoCashDTO implements Serializable { ...@@ -46,15 +49,15 @@ public class RepoCashDTO implements Serializable {
private String wareNo; private String wareNo;
@ApiModelProperty(value = "商品标题") @ApiModelProperty(value = "商品标题")
private String wareTitle; private String wareTitle;
@ApiModelProperty(value = "流水编号") @ApiModelProperty(value = "流水编号/交易编号")
private String payNo; private String payNo;
@ApiModelProperty(value = "流水类型:查字典") @ApiModelProperty(value = "流水类型:查字典")
private Integer payMethod; private Integer payMethod;
@ApiModelProperty(value = "变动金额") @ApiModelProperty(value = "变动金额/变动现金")
private BigDecimal amtPaid; private BigDecimal amtPaid;
@ApiModelProperty(value = "当前余额") @ApiModelProperty(value = "当前余额")
private BigDecimal cashAmt; private BigDecimal cashAmt;
@ApiModelProperty(value = "支付时间") @ApiModelProperty(value = "支付时间/交易")
private Date payTime; private Date payTime;
@ApiModelProperty(value = "退款流水编号") @ApiModelProperty(value = "退款流水编号")
private String refundNo; private String refundNo;
...@@ -67,4 +70,8 @@ public class RepoCashDTO implements Serializable { ...@@ -67,4 +70,8 @@ public class RepoCashDTO implements Serializable {
@ApiModelProperty(value = "操作人姓名") @ApiModelProperty(value = "操作人姓名")
private String opName; private String opName;
private Integer createUser; private Integer createUser;
@ApiModelProperty(value = "现金类型")
private String type;
@ApiModelProperty(value = "已冻结现金")
private BigDecimal cashFreeze;
} }
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.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
...@@ -24,7 +23,7 @@ public class RepoWalletDTO implements Serializable { ...@@ -24,7 +23,7 @@ public class RepoWalletDTO implements Serializable {
private static final long serialVersionUID = 5306992787421065922L; private static final long serialVersionUID = 5306992787421065922L;
@ApiModelProperty(value = "ID") @ApiModelProperty(value = "ID")
private Integer id; private Integer id;
@ApiModelProperty(value = "用户ID") @ApiModelProperty(value = "账号id")
private Integer repoAccountId; private Integer repoAccountId;
@ApiModelProperty(value = "现金余额") @ApiModelProperty(value = "现金余额")
private BigDecimal cashAmt; private BigDecimal cashAmt;
...@@ -32,15 +31,25 @@ public class RepoWalletDTO implements Serializable { ...@@ -32,15 +31,25 @@ public class RepoWalletDTO implements Serializable {
private BigDecimal cashPaid; private BigDecimal cashPaid;
@ApiModelProperty(value = "冻结中-金额") @ApiModelProperty(value = "冻结中-金额")
private BigDecimal cashFreeze; private BigDecimal cashFreeze;
@ApiModelProperty(value = "奖励-余额") //@ApiModelProperty(value = "奖励-余额")
private BigDecimal rcdRebateAmt; // private BigDecimal rcdRebateAmt;
@ApiModelProperty(value = "累计提现") // @ApiModelProperty(value = "累计提现")
private BigDecimal rebateWdl; // private BigDecimal rebateWdl;
@ApiModelProperty(value = "提现冻结金额") // @ApiModelProperty(value = "提现冻结金额")
private BigDecimal rebateFreeze; //private BigDecimal rebateFreeze;
@ApiModelProperty(value = "平台备注") @ApiModelProperty(value = "平台备注")
private String remark; private String remark;
@ApiModelProperty(value = "手机号")
private String phoneNum;
@ApiModelProperty(value = "用户名称")
private String userName;
@ApiModelProperty(value = "用户昵称")
private String nickName;
@ApiModelProperty(value = "账号类型:0后台管理账号 ; 100云享飞-客户端;")
private Integer portType;
@ApiModelProperty(value = "uid")
private String uid;
/*
public void defaultRebateValue() { public void defaultRebateValue() {
if (this.rcdRebateAmt == null) { if (this.rcdRebateAmt == null) {
this.rcdRebateAmt = BigDecimal.ZERO; this.rcdRebateAmt = BigDecimal.ZERO;
...@@ -49,5 +58,5 @@ public class RepoWalletDTO implements Serializable { ...@@ -49,5 +58,5 @@ public class RepoWalletDTO implements Serializable {
if (this.rebateWdl == null) { if (this.rebateWdl == null) {
this.rebateWdl = BigDecimal.ZERO; this.rebateWdl = BigDecimal.ZERO;
} }
} }*/
} }
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 io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -17,26 +18,29 @@ import java.io.Serializable; ...@@ -17,26 +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")
private String token;
@ApiModelProperty(value = "token") @ApiModelProperty(value = "账号id")
private String token; private Integer userAccountId;
@ApiModelProperty(value = "账号id") @ApiModelProperty(value = "账号")
private Integer userAccountId; private String accountNo;
@ApiModelProperty(value = "账号") @ApiModelProperty(value = "账号uid")
private String accountNo; private String uid;
@ApiModelProperty(value = "账号uid") @ApiModelProperty(value = "手机号")
private String uid; private String phoneNum;
@ApiModelProperty(value = "手机号") @ApiModelProperty(value = "用户名称")
private String phoneNum; private String userName;
@ApiModelProperty(value = "用户名称") @ApiModelProperty(value = "用户昵称")
private String userName; private String nickName;
@ApiModelProperty(value = "用户昵称") @ApiModelProperty(value = "0后台管理账号 ; 100云享飞-客户端")
private String nickName; 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;
...@@ -45,4 +45,6 @@ public class UserAccountSimpleDTO implements Serializable { ...@@ -45,4 +45,6 @@ public class UserAccountSimpleDTO implements Serializable {
private Integer portType; private Integer portType;
@ApiModelProperty(value = "企业认证状态, 0未通过,1通过") @ApiModelProperty(value = "企业认证状态, 0未通过,1通过")
private Integer companyAuthStatus; private Integer companyAuthStatus;
@ApiModelProperty(value = "账号")
private String accountNo;
} }
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.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
...@@ -24,7 +23,7 @@ import java.io.Serializable; ...@@ -24,7 +23,7 @@ import java.io.Serializable;
//@ApiModel(value = "com.mmc.csf.model.qo.RepoCashQO", description = "现金变更QO") //@ApiModel(value = "com.mmc.csf.model.qo.RepoCashQO", description = "现金变更QO")
public class RepoCashQO implements Serializable { public class RepoCashQO implements Serializable {
private static final long serialVersionUID = 8705749845968042632L; private static final long serialVersionUID = 8705749845968042632L;
@ApiModelProperty(value = "用户ID") @ApiModelProperty(value = "用户ID", required = true)
@NotNull(message = "用户ID不能为空", groups = Page.class) @NotNull(message = "用户ID不能为空", groups = Page.class)
private Integer repoAccountId; private Integer repoAccountId;
@ApiModelProperty(value = "关键字") @ApiModelProperty(value = "关键字")
...@@ -33,15 +32,15 @@ public class RepoCashQO implements Serializable { ...@@ -33,15 +32,15 @@ public class RepoCashQO implements Serializable {
private String startTime; private String startTime;
@ApiModelProperty(value = "结束时间") @ApiModelProperty(value = "结束时间")
private String endTime; private String endTime;
@ApiModelProperty(value = "交易类型:查字典") @ApiModelProperty(value = "现金类型:查字典")
private Integer payMethod; private Integer cashTypeId;
@ApiModelProperty(value = "页码", required = true) @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) @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.qo;
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 javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @Author small
* @Date 2023/5/30 13:32
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
//@ApiModel(value = "com.mmc.csf.model.qo.RepoCashQO", description = "现金变更QO")
public class RepoWalletQO implements Serializable {
private static final long serialVersionUID = 8705749845968042632L;
@ApiModelProperty(value = "用户ID")
private Integer repoAccountId;
@ApiModelProperty(value = "现金余额")
private String cashAmt;
@ApiModelProperty(value = "已付现金")
private String cashPaid;
@ApiModelProperty(value = "已冻结现金")
private String cashFreeze;
@ApiModelProperty(value = "页码", required = true)
@NotNull(message = "页码不能为空", groups = Page.class)
@Min(value = 1, groups = Page.class)
private Integer pageNo;
@ApiModelProperty(value = "每页显示数", required = true)
@NotNull(message = "每页显示数不能为空", groups = Page.class)
@Min(value = 1, groups = Page.class)
private Integer pageSize;
public void buildCurrentPage() {
this.pageNo = (pageNo - 1) * 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 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;
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 javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* @Author small
* @Date 2023/5/29 15:59
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
//@ApiModel(value = "com.mmc.csf.model.qo.RepoAccountQO", description = "云仓账号信息查询QO")
public class UserCashQO implements Serializable {
private static final long serialVersionUID = -3425378226992206841L;
@ApiModelProperty(value = "用户名称/手机号/UID")
private String userMassage;
@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")
@NotNull(message = "每页显示数不能为空", groups = Page.class)
@Min(value = 1, groups = Page.class)
private Integer pageSize;
public void buildCurrentPage() {
this.pageNo = (pageNo - 1) * pageSize;
}
@ApiModelProperty(value = "用户ID", hidden = true)
private List<Integer> accountIds;
}
package com.mmc.payment.model.qo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @Author small
* @Date 2023/5/30 14:08
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class WalletMessageQO {
private static final long serialVersionUID = -1274280958579567505L;
@ApiModelProperty(value = "用户id集合")
private List<Integer> userIds;
}
package com.mmc.payment.model.qo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
/**
* @Author small
* @Date 2023/5/30 10:21
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class WalletUsersQO {
private static final long serialVersionUID = -1274280958579567505L;
@ApiModelProperty(value = "repo_account_id")
@NotNull(message = "账号id")
private Integer repoAccountId;
}
package com.mmc.payment.model.vo.flyer;
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;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @Author small
* @Date 2023/5/29 16:14
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
//@ApiModel(value = "com.mmc.csf.model.vo.EntFourValidateVO", description = "新增/修改参数类")
public class EntFourValidateVO implements Serializable {
private static final long serialVersionUID = 6208245549679324962L;
@ApiModelProperty(value = "id")
@NotNull(message = "id创建修改不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "用户ID")
@NotNull(message = "用户ID不能为空", groups = {Update.class, Create.class})
private Integer userAccountId;
@ApiModelProperty(value = "企业法人")
@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})
private String entName;
@ApiModelProperty(value = "统一社会信用代码")
@NotBlank(message = "统一社会信用代码", groups = {Create.class})
private String unifySocialCreditCode;
@ApiModelProperty(value = "营业执照")
@NotBlank(message = "营业执照", groups = {Update.class})
private String businessLicenseImg;
@ApiModelProperty(value = "unionId")
private String unionId;
@ApiModelProperty(value = "参与邀请id")
private Integer participateActivityId;
}
package com.mmc.payment.model.vo.flyer;
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;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* @Author small
* @Date 2023/5/29 16:16
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
//@ApiModel(value = "com.mmc.csf.model.vo.FlyerAccountVO", description = "新增/修改参数类")
public class FlyerAccountVO implements Serializable {
private static final long serialVersionUID = 5606965866344925637L;
@ApiModelProperty(value = "id")
@NotNull(message = "更新时ID不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "uid")
private String uid;
@ApiModelProperty(value = "账号", example = "")
@NotEmpty(message = "账号不能为空", groups = {Create.class})
private String accountName;
@ApiModelProperty(value = "飞手手机号")
private String phoneNum;
@ApiModelProperty(value = "账号类型", example = "个人飞手或机构")
private Integer accountType;
@ApiModelProperty(value = "飞手实名认证状态", example = "0未实名,1已实名")
private Integer realAuthStatus;
@ApiModelProperty(value = "机构认证状态", example = "0未认证,1,已认证")
private Integer entAuthStatus;
@ApiModelProperty(value = "工作状态,0休息中,1接单中,2服务订单中")
private Integer workStatus;
@ApiModelProperty(value = "昵称", example = "科比特")
private String nickName;
@ApiModelProperty(value = "常驻地址", example = "广东省深圳市")
private String resAddress;
@ApiModelProperty(value = "头像", example = "url")
private String headerImg;
@ApiModelProperty(value = "经度")
private Double lon;
@ApiModelProperty(value = "纬度")
private Double lat;
@ApiModelProperty(value = "用户备注")
@Size(max = 70, message = "用户备注内容不能超过70字符", groups = {Update.class})
private String remark;
@ApiModelProperty(value = "用户删除状态,0未删除,1已删除")
private Integer deleted;
}
package com.mmc.payment.model.vo.flyer;
import com.mmc.payment.common.publicinterface.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;
/**
* @Author small
* @Date 2023/5/29 16:13
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
//@ApiModel(value = "com.mmc.csf.model.vo.FlyerWorkStatusVO", description = "新增/修改参数类")
public class FlyerWorkStatusVO implements Serializable {
private static final long serialVersionUID = -1274280958579567505L;
@ApiModelProperty(value = "id")
@NotNull(message = "更新时ID不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "常驻地址", example = "深圳市")
@NotEmpty(message = "常驻地址不能为空", groups = {Update.class})
private String resAddress;
@ApiModelProperty(value = "经度")
@NotNull(message = "更新时经度不能为空", groups = {Update.class})
private Double lon;
@ApiModelProperty(value = "纬度")
@NotNull(message = "更新时纬度不能为空", groups = {Update.class})
private Double lat;
@ApiModelProperty(value = "工作状态")
@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 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.wallet;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @Author small
* @Date 2023/5/30 10:05
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class WalletUsersVO implements Serializable {
private static final long serialVersionUID = -1274280958579567505L;
@ApiModelProperty(value = "repo_account_id")
@NotNull(message = "账号id")
private Integer repoAccountId;
}
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());
}
} }
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.vo.RepoCashVO; import com.mmc.payment.model.qo.UserCashQO;
import com.mmc.payment.model.vo.RepoOrderPayVO; 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; import java.math.BigDecimal;
/** /**
* @Author small @Date 2023/5/24 10:06 @Version 1.0 * @Author small
* @Date 2023/5/29 17:59
* @Version 1.0
*/ */
public interface RepoCashService { public interface RepoCashService {
PageResult listPageRepoCash(RepoCashQO param); PageResult listPageRepoCash(BaseAccountDTO cuser, RepoCashQO param);
void updateCashRemark(Integer id, String remark); void updateCashRemark(Integer id, String remark);
/** /**
* 充值 * 充值
* *
* @param cash * @param cash
* @return * @return
*/ */
ResultBody reqCash(BaseAccountDTO cuser, RepoCashVO cash); ResultBody reqCash(BaseAccountDTO cuser, RepoCashVO cash);
ResultBody dedCash(BaseAccountDTO cuser, RepoCashVO cash); ResultBody amountOfRefund(BaseAccountDTO cuser, String orderNo, BigDecimal actualPay, Integer repoAccountId, String refundNo);
RepoCashDTO getRefundInfo(String refundNo); ResultBody dedCash(BaseAccountDTO cuser, RepoCashVO cash);
BigDecimal RemainingBalance(Integer uid); RepoCashDTO getRefundInfo(String refundNo);
PayCashResultDTO orderPayment(BaseAccountDTO currentAccount, String orderNo); BigDecimal RemainingBalance(Integer uid);
PayCashResultDTO payCashOrder(RepoOrderPayVO orderPay); ResultBody orderPayment(BaseAccountDTO currentAccount, String orderNo);
PayCashResultDTO payCashOrder(RepoOrderPayVO orderPay);
PageResult listPagePayManager(BaseAccountDTO currentAccount, UserCashQO param);
ResultBody walletUsers(WalletUsersVO walletUsersVO);
ResultBody cashType();
ResultBody userWallet(BaseAccountDTO currentAccount);
} }
...@@ -2,14 +2,14 @@ spring: ...@@ -2,14 +2,14 @@ spring:
datasource: datasource:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://mysql.default:3306/iuav_payment?characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai url: jdbc:mysql://mysql.default:3306/iuav_payment_dev?characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: tmj username: tmj
password: MMC@2022&MYSQL password: MMC@2022&MYSQL
redis: redis:
database: 1 database: 1
host: redis.default host: redis.default
password: MMC@2022&REDIS
port: 6379 port: 6379
password: MMC@2022&REDIS
jedis: jedis:
pool: pool:
max-active: 2 max-active: 2
...@@ -33,4 +33,10 @@ mmcflying: ...@@ -33,4 +33,10 @@ mmcflying:
mount: mount:
directory: D:@javaVolume@ directory: D:@javaVolume@
userapp:
url: https://test.iuav.shop/userapp/
oms:
url: https://test.iuav.shop/oms/
...@@ -2,7 +2,7 @@ spring: ...@@ -2,7 +2,7 @@ spring:
datasource: datasource:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://rm-wz9dd796t4j1giz6t2o.mysql.rds.aliyuncs.com:3306/iuav_payment?characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai url: jdbc:mysql://rm-wz9dd796t4j1giz6t2o.mysql.rds.aliyuncs.com:3306/iuav_payment_dev?characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: tmj username: tmj
password: MMC@2022&MYSQL password: MMC@2022&MYSQL
redis: redis:
...@@ -37,4 +37,8 @@ mount: ...@@ -37,4 +37,8 @@ mount:
userapp: userapp:
url: http://localhost:35150/userapp/ url: http://localhost:35150/userapp/
oms:
url: http://localhost:8077/oms/
...@@ -32,3 +32,9 @@ mmcflying: ...@@ -32,3 +32,9 @@ mmcflying:
path: /ossservlet/upload/download/ path: /ossservlet/upload/download/
mount: mount:
directory: D:@javaVolume@ directory: D:@javaVolume@
userapp:
url: https://www.iuav.shop/userapp/
oms:
url: https://www.iuav.shop/oms/
...@@ -15,8 +15,12 @@ spring: ...@@ -15,8 +15,12 @@ spring:
jackson: jackson:
date-format: yyyy-MM-dd HH:mm:ss date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8 time-zone: GMT+8
main:
banner-mode: off
logging: logging:
level: level:
com: com:
mmc: mmc:
payment: DEBUG payment: DEBUG
file:
name: "/var/log/app/${spring.application.name}.log"
...@@ -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"/>
...@@ -43,7 +43,21 @@ ...@@ -43,7 +43,21 @@
<result property="updateUser" column="update_user"/> <result property="updateUser" column="update_user"/>
<result property="createTime" column="create_time"/> <result property="createTime" column="create_time"/>
<result property="createUser" column="create_user"/> <result property="createUser" column="create_user"/>
<result property="orderName" column="order_name"/>
<result property="type" column="type"/>
</resultMap> </resultMap>
<resultMap type="com.mmc.payment.entity.repo.RepoWalletDO"
id="RepoAccountResultMap">
<id property="id" column="id"/>
<result property="repoAccountId" column="repo_account_id"/>
<result property="cashAmt" column="cash_amt"/>
<result property="cashPaid" column="cash_paid"/>
<result property="cashFreeze" column="cash_freeze"/>
<result property="remark" column="remark"/>
</resultMap>
<select id="getRefundCashInfo" resultMap="repoCashResultMap" <select id="getRefundCashInfo" resultMap="repoCashResultMap"
parameterType="Integer"> parameterType="Integer">
select c.id,c.repo_account_id,c.ware_title,c.pay_no, select c.id,c.repo_account_id,c.ware_title,c.pay_no,
...@@ -57,15 +71,15 @@ ...@@ -57,15 +71,15 @@
<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,
voucher, refund_no, update_time, update_user, create_time, create_user) voucher, refund_no, update_time, update_user, create_time, create_user, cash_type_id)
values (#{repoAccountId}, #{uid}, #{accountName}, #{orderInfoId}, #{orderNo}, #{skuInfoId}, #{skuTitle}, values (#{repoAccountId}, #{uid}, #{accountName}, #{orderInfoId}, #{orderNo}, #{skuInfoId}, #{skuTitle},
#{wareInfoId}, #{wareNo}, #{wareTitle}, #{payNo}, #{payMethod}, #{amtPaid}, #{cashAmt}, #{payTime}, #{wareInfoId}, #{wareNo}, #{wareTitle}, #{payNo}, #{payMethod}, #{amtPaid}, #{cashAmt}, #{payTime},
#{remark}, #{remark},
#{voucher}, #{refundNo}, #{updateTime}, #{updateUser}, #{createTime}, #{createUser}) #{voucher}, #{refundNo}, #{updateTime}, #{updateUser}, #{createTime}, #{createUser}, 4)
</insert> </insert>
<update id="updateCashRemark"> <update id="updateCashRemark">
...@@ -77,9 +91,11 @@ ...@@ -77,9 +91,11 @@
parameterType="com.mmc.payment.model.qo.RepoCashQO"> parameterType="com.mmc.payment.model.qo.RepoCashQO">
select c.id,c.repo_account_id,c.ware_title,c.pay_no, select c.id,c.repo_account_id,c.ware_title,c.pay_no,
c.order_no,c.refund_no,c.create_user,c.pay_method, c.order_no,c.refund_no,c.create_user,c.pay_method,
c.amt_paid,c.cash_amt,c.remark,c.voucher c.amt_paid,c.cash_amt,c.remark,c.voucher,c.pay_time,c.order_name,ct.type
from repo_cash c from repo_cash c
LEFT JOIN cash_type ct on c.cash_type_id=ct.id
<where> <where>
1=1
and c.repo_account_id = #{repoAccountId} and c.repo_account_id = #{repoAccountId}
<if test=" keyword!=null and keyword!='' "> <if test=" keyword!=null and keyword!='' ">
and ( and (
...@@ -89,6 +105,9 @@ ...@@ -89,6 +105,9 @@
or c.refund_no like CONCAT('%',#{keyword},'%') or c.refund_no like CONCAT('%',#{keyword},'%')
) )
</if> </if>
<if test="cashTypeId!=null and cashTypeId!=''">
and ct.id=#{cashTypeId}
</if>
<if test=" startTime != null and startTime != '' "> <if test=" startTime != null and startTime != '' ">
and c.pay_time &gt;= STR_TO_DATE(#{startTime},'%Y-%m-%d and c.pay_time &gt;= STR_TO_DATE(#{startTime},'%Y-%m-%d
%H:%i:%s') %H:%i:%s')
...@@ -97,9 +116,6 @@ ...@@ -97,9 +116,6 @@
and c.pay_time &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d and c.pay_time &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d
%H:%i:%s') %H:%i:%s')
</if> </if>
<if test=" payMethod != null ">
and c.pay_method = #{payMethod}
</if>
</where> </where>
order by c.pay_time desc order by c.pay_time desc
limit #{pageNo},#{pageSize} limit #{pageNo},#{pageSize}
...@@ -107,10 +123,12 @@ ...@@ -107,10 +123,12 @@
<select id="countPagePFRepoCash" resultType="int" <select id="countPagePFRepoCash" resultType="int"
parameterType="com.mmc.payment.model.qo.RepoCashQO"> parameterType="com.mmc.payment.model.qo.RepoCashQO">
select count(*) select count(1)
from repo_cash c from repo_cash c
LEFT JOIN cash_type ct on c.cash_type_id=ct.id
<where> <where>
and c.repo_account_id = #{repoAccountId} 1=1 and
c.repo_account_id = #{repoAccountId}
<if test=" keyword!=null and keyword!='' "> <if test=" keyword!=null and keyword!='' ">
and ( and (
c.ware_title like CONCAT('%',#{keyword},'%') c.ware_title like CONCAT('%',#{keyword},'%')
...@@ -119,6 +137,9 @@ ...@@ -119,6 +137,9 @@
or c.refund_no like CONCAT('%',#{keyword},'%') or c.refund_no like CONCAT('%',#{keyword},'%')
) )
</if> </if>
<if test="cashTypeId!=null and cashTypeId!=''">
and ct.id=#{cashTypeId}
</if>
<if test=" startTime != null and startTime != '' "> <if test=" startTime != null and startTime != '' ">
and c.pay_time &gt;= STR_TO_DATE(#{startTime},'%Y-%m-%d and c.pay_time &gt;= STR_TO_DATE(#{startTime},'%Y-%m-%d
%H:%i:%s') %H:%i:%s')
...@@ -127,10 +148,8 @@ ...@@ -127,10 +148,8 @@
and c.pay_time &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d and c.pay_time &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d
%H:%i:%s') %H:%i:%s')
</if> </if>
<if test=" payMethod != null ">
and c.pay_method = #{payMethod}
</if>
</where> </where>
order by c.pay_time desc
</select> </select>
<select id="getRepoWalletInfo" resultMap="repoWalletResultMap"> <select id="getRepoWalletInfo" resultMap="repoWalletResultMap">
...@@ -169,15 +188,83 @@ ...@@ -169,15 +188,83 @@
<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,
voucher, refund_no, update_time, update_user, create_time, create_user) voucher, refund_no, update_time, update_user, create_time, create_user, cash_type_id)
values (#{repoAccountId}, #{uid}, #{accountName}, #{orderInfoId}, #{orderNo}, #{skuInfoId}, #{skuTitle}, values (#{repoAccountId}, #{uid}, #{accountName}, #{orderInfoId}, #{orderNo}, #{skuInfoId}, #{skuTitle},
#{wareInfoId}, #{wareNo}, #{wareTitle}, #{payNo}, #{payMethod}, #{amtPaid}, #{cashAmt}, #{payTime}, #{wareInfoId}, #{wareNo}, #{wareTitle}, #{payNo}, #{payMethod}, #{amtPaid}, #{cashAmt}, now(),
#{remark}, #{remark},
#{voucher}, #{refundNo}, #{updateTime}, #{updateUser}, #{createTime}, #{createUser}) #{voucher}, #{refundNo}, #{updateTime}, #{updateUser}, now(), #{createUser}, 2)
</insert> </insert>
<select id="countPagePayManager" resultType="Integer"
parameterType="com.mmc.payment.model.qo.RepoAccountQO">
select count(*)
from repo_wallet
</select>
<select id="listPagePayManager" resultMap="RepoAccountResultMap"
parameterType="com.mmc.payment.model.qo.UserCashQO">
SELECT id,
repo_account_id,
cash_amt,
cash_paid,
cash_freeze,
remark
FROM repo_wallet
WHERE 1 = 1
ORDER BY create_time DESC
limit #{pageNo}, #{pageSize}
</select>
<select id="listWalletInfo" resultMap="repoWalletResultMap"
parameterType="com.mmc.payment.model.qo.UserCashQO">
select w.id,w.repo_account_id,w.cash_amt,w.cash_freeze,
w.cash_paid,w.rcd_rebate_amt,w.rebate_wdl,w.rebate_freeze,w.remark,w.create_time,w.update_time
from repo_wallet w
where
w.repo_account_id in
<foreach collection="accountIds" item="id" index="index"
open="(" close=")" separator=",">
#{id}
</foreach>
</select>
<insert id="walletUsers" parameterType="com.mmc.payment.model.qo.WalletUsersQO">
insert into repo_wallet(repo_account_id, create_time)
values (#{repoAccountId}, now())
</insert>
<select id="findWalletUsers" resultType="int" parameterType="com.mmc.payment.model.qo.WalletUsersQO">
select repo_account_id As repoAccountId
from repo_wallet
where repo_account_id = #{repoAccountId}
</select>
<select id="cashType" resultType="com.mmc.payment.entity.cash.CashTypeDO">
select id, `type`
from cash_type
</select>
<select id="userWallet" resultType="com.mmc.payment.entity.repo.RepoWalletDO">
SELECT id,
repo_account_id AS repoAccountId,
cash_amt AS cashAmt,
cash_paid AS cashPaid,
cash_paid,
cash_freeze AS cashFreeze,
remark,
rcd_rebate_amt AS rcdRebateAmt,
rebate_wdl AS rebateWdl,
rebate_freeze AS rebateFreeze,
update_time AS updateTime,
create_time AS createTime
FROM repo_wallet
where repo_account_id = #{userAccountId}
</select>
</mapper> </mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论