Merge branch 'order_reconstruction'
This commit is contained in:
commit
089ead49be
@ -1,7 +1,10 @@
|
||||
package com.evotech.hd.authorization.config.oauth2;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.enums.CodeMsg;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||
import org.springframework.http.server.ServletServerHttpResponse;
|
||||
@ -11,12 +14,7 @@ import org.springframework.security.oauth2.core.OAuth2AuthenticationException;
|
||||
import org.springframework.security.oauth2.core.OAuth2Error;
|
||||
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
|
||||
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.enums.CodeMsg;
|
||||
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
public class MyAuthenticationFailureHandler implements AuthenticationFailureHandler {
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package com.evotech.hd.authorization.config.oauth2;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Map;
|
||||
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||
@ -17,11 +17,9 @@ import org.springframework.security.oauth2.server.authorization.authentication.O
|
||||
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Map;
|
||||
|
||||
public class MyAuthenticationSuccessHandler implements AuthenticationSuccessHandler {
|
||||
|
||||
@ -56,7 +54,7 @@ public class MyAuthenticationSuccessHandler implements AuthenticationSuccessHand
|
||||
ServletServerHttpResponse httpResponse = new ServletServerHttpResponse(response);
|
||||
|
||||
|
||||
this.accessTokenHttpResponseConverter.write(new Result<String>().success(tokenResponseParameters), null, httpResponse);
|
||||
this.accessTokenHttpResponseConverter.write(new Result<Map<String, Object>>().success(tokenResponseParameters), null, httpResponse);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,17 +1,16 @@
|
||||
package com.evotech.hd.authorization.config.security;
|
||||
|
||||
import java.io.IOException;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||
import org.springframework.http.server.ServletServerHttpResponse;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.web.access.AccessDeniedHandler;
|
||||
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* 登陆了,没有权限时,触发异常 返回信息
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
package com.evotech.hd.authorization.config.security;
|
||||
|
||||
import java.io.IOException;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.enums.CodeMsg;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||
import org.springframework.http.server.ServletServerHttpResponse;
|
||||
@ -8,12 +12,7 @@ import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.oauth2.server.resource.InvalidBearerTokenException;
|
||||
import org.springframework.security.web.AuthenticationEntryPoint;
|
||||
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.enums.CodeMsg;
|
||||
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* 未认证(没有登录)时,返回异常 信息
|
||||
|
||||
@ -1,17 +1,16 @@
|
||||
package com.evotech.hd.authorization.config.security.userdetail;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.evotech.hd.authorization.service.ResourceService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.entity.resource.auth.AuthUser;
|
||||
import com.evotech.hd.common.core.enums.CodeMsg;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.security.authentication.DisabledException;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import com.evotech.hd.authorization.service.ResourceService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.entity.resource.auth.AuthUser;
|
||||
import com.evotech.hd.common.core.enums.CodeMsg;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class UserDetailService implements UserDetailsService {
|
||||
|
||||
@ -1,17 +1,15 @@
|
||||
package com.evotech.hd.authorization.controller;
|
||||
|
||||
import com.evotech.hd.authorization.service.CaptchaService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.evotech.hd.authorization.service.CaptchaService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
@Tag(name = "验证码")
|
||||
@RestController
|
||||
@RequestMapping("/captcha")
|
||||
|
||||
@ -1,18 +1,9 @@
|
||||
package com.evotech.hd.authorization.controller;
|
||||
|
||||
import org.apache.http.auth.AuthenticationException;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.evotech.hd.authorization.entity.LoginRequest;
|
||||
import com.evotech.hd.authorization.entity.UserVo;
|
||||
import com.evotech.hd.authorization.service.LoginService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
@ -20,6 +11,9 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.validation.Valid;
|
||||
import org.apache.http.auth.AuthenticationException;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@Tag(name = "登陆")
|
||||
@RestController
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.evotech.hd.authorization.service;
|
||||
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
|
||||
public interface CaptchaService {
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ import java.util.List;
|
||||
public interface CloudService {
|
||||
|
||||
|
||||
@GetMapping(value = "/batterystation/login/list", consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
|
||||
@GetMapping(value = "/battery/station/login/list", consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
|
||||
public Result<List<BatteryStation>> loadBatteryStation(@RequestParam("proxyCode") String proxyCode);
|
||||
|
||||
@GetMapping(value = "/company/login/one", consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
package com.evotech.hd.authorization.service;
|
||||
|
||||
import org.apache.http.auth.AuthenticationException;
|
||||
|
||||
import com.evotech.hd.authorization.entity.LoginRequest;
|
||||
import com.evotech.hd.authorization.entity.UserVo;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.apache.http.auth.AuthenticationException;
|
||||
|
||||
public interface LoginService {
|
||||
|
||||
|
||||
@ -21,19 +21,19 @@ public interface ResourceService {
|
||||
|
||||
@GetMapping(value = "/user/userbyname",
|
||||
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
|
||||
public com.evotech.hd.common.core.entity.Result<AuthUser> loadUserByName(@RequestParam("uname") String userName);
|
||||
public Result<AuthUser> loadUserByName(@RequestParam("uname") String userName);
|
||||
|
||||
@PostMapping(value = "/user/userpermbyid",
|
||||
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
|
||||
public com.evotech.hd.common.core.entity.Result<String> userPermById(@NotNull @RequestParam("uid") String userId, @RequestParam("type")Integer type);
|
||||
public Result<String> userPermById(@NotNull @RequestParam("uid") String userId, @RequestParam("type")Integer type);
|
||||
|
||||
@PostMapping(value = "/loginlog/add",
|
||||
consumes = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public com.evotech.hd.common.core.entity.Result<Integer> addLoginLog(@RequestBody LogLogin log);
|
||||
public Result<Integer> addLoginLog(@RequestBody LogLogin log);
|
||||
|
||||
@GetMapping(value = "/logininfo/get",
|
||||
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
|
||||
public com.evotech.hd.common.core.entity.Result<LoginCacheInfo> loginInfo(@RequestParam("uid") String uid);
|
||||
public Result<LoginCacheInfo> loginInfo(@RequestParam("uid") String uid);
|
||||
|
||||
@GetMapping(value = "/user/station",consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
|
||||
public Result<List<AuthUserStation>> loadBatteryStation(@RequestParam("uid") String uid);
|
||||
|
||||
@ -1,18 +1,16 @@
|
||||
package com.evotech.hd.authorization.service.impl;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.evotech.hd.authorization.service.CaptchaService;
|
||||
import com.evotech.hd.common.core.constant.HDConstant;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.redis.utils.RedisUtil;
|
||||
|
||||
import cn.hutool.captcha.CaptchaUtil;
|
||||
import cn.hutool.captcha.LineCaptcha;
|
||||
import cn.hutool.captcha.generator.RandomGenerator;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.evotech.hd.authorization.service.CaptchaService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.constant.HDConstant;
|
||||
import com.evotech.hd.common.redis.utils.RedisUtil;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class CaptchaServiceImpl implements CaptchaService {
|
||||
@ -32,7 +30,7 @@ public class CaptchaServiceImpl implements CaptchaService {
|
||||
String imageBase64Data = captcha.getImageBase64Data();
|
||||
String captchaId = IdUtil.fastSimpleUUID();
|
||||
redisUtil.set(HDConstant.CAPTCHA_REDIS_PREFIX + captchaId, code, captchaExpire);
|
||||
return new Result<String>().success("OK", captchaId + ":" + imageBase64Data);
|
||||
return new Result<String>().success(captchaId + ":" + imageBase64Data);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -15,10 +15,10 @@ import com.evotech.hd.authorization.service.ResourceService;
|
||||
import com.evotech.hd.authorization.utils.LoginRequesHeadertUtil;
|
||||
import com.evotech.hd.authorization.utils.Oauth2AccessTokenUtil;
|
||||
import com.evotech.hd.authorization.utils.TokenUtil;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.Dto.ResultUtil;
|
||||
import com.evotech.hd.common.core.constant.HDConstant;
|
||||
import com.evotech.hd.common.core.entity.LoginCacheInfo;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStation;
|
||||
import com.evotech.hd.common.core.entity.cloud.Company;
|
||||
import com.evotech.hd.common.core.entity.cloud.VehicleInfo;
|
||||
@ -70,7 +70,7 @@ public class LoginServiceImpl implements LoginService {
|
||||
// 1. 校验验证码
|
||||
Result<Boolean> res = captchaService.checkCaptcha(lr.getCode());
|
||||
if (res.getStatus() != 1) {
|
||||
return new Result<UserVo>().error(res.getCode(), res.getMsg());
|
||||
return new Result<UserVo>().error(CodeMsg.getCodeMsgByCode(res.getCode()), res.getMsg());
|
||||
}
|
||||
// 2. 从请求头获取client信息
|
||||
Map<String, String> oAuth2Client = LoginRequesHeadertUtil.getOAuth2Client(request);
|
||||
|
||||
@ -5,6 +5,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 请求返回对象
|
||||
@ -26,9 +27,28 @@ public class Result<T> implements Serializable {
|
||||
@Schema(description = "返回数据")
|
||||
private T data;
|
||||
|
||||
public static <T> Result<T> getInstance(){
|
||||
return new Result<T>();
|
||||
}
|
||||
|
||||
public Result() {
|
||||
}
|
||||
|
||||
public <T> Result<T> build(Class<T> cls) {
|
||||
return (Result<T>) this;
|
||||
}
|
||||
|
||||
public <T> Result<List<T>> buildList(Class<T> cls) {
|
||||
return (Result<List<T>>) this;
|
||||
}
|
||||
|
||||
public Result<T> success() {
|
||||
this.status = 1;
|
||||
this.code = CodeMsg.SUCCESS.getCode();
|
||||
this.msg = CodeMsg.SUCCESS.getMsg();
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> success(T o) {
|
||||
this.status = 1;
|
||||
this.code = CodeMsg.SUCCESS.getCode();
|
||||
@ -37,6 +57,21 @@ public class Result<T> implements Serializable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> error(String errMsg) {
|
||||
this.status = 1;
|
||||
this.code = CodeMsg.ERROR.getCode();
|
||||
this.msg = errMsg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> error(String errMsg, T data) {
|
||||
this.status = 1;
|
||||
this.code = CodeMsg.ERROR.getCode();
|
||||
this.msg = errMsg;
|
||||
this.data = data;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> error(CodeMsg codeMsg) {
|
||||
this.status = 1;
|
||||
this.code = codeMsg.getCode();
|
||||
@ -50,4 +85,20 @@ public class Result<T> implements Serializable {
|
||||
this.msg = errorMsg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> exception(T data) {
|
||||
this.status = -1;
|
||||
this.code = CodeMsg.ERROR.getCode();
|
||||
this.msg = CodeMsg.ERROR.getMsg();
|
||||
this.data = data;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> businessException(String code, String msg, T o) {
|
||||
this.status = -1;
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.data = o;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.evotech.hd.common.core.Dto;
|
||||
package com.evotech.hd.common.core.Dto.device;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.evotech.hd.common.core.Dto.result.home;
|
||||
package com.evotech.hd.common.core.Dto.home;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.evotech.hd.common.core.Dto.result.home;
|
||||
package com.evotech.hd.common.core.Dto.home;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@ -20,4 +20,11 @@ public class HomeOrderSwapBatteryAmountDto {
|
||||
|
||||
Integer status;
|
||||
|
||||
public HomeOrderSwapBatteryAmountDto() {
|
||||
}
|
||||
|
||||
public HomeOrderSwapBatteryAmountDto(Double amount, Long dataCount) {
|
||||
this.amount = amount;
|
||||
this.dataCount = dataCount;
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.evotech.hd.common.core.Dto.result.home;
|
||||
package com.evotech.hd.common.core.Dto.home;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.evotech.hd.common.core.Dto.result.home;
|
||||
package com.evotech.hd.common.core.Dto.home;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.evotech.hd.common.core.Dto.result.home;
|
||||
package com.evotech.hd.common.core.Dto.home;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@ -0,0 +1,55 @@
|
||||
package com.evotech.hd.common.core.Dto.order;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:OrderListVo
|
||||
* @date: 2025年05月16日 13:54
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "订单列表")
|
||||
public class OrderListVo {
|
||||
|
||||
@Schema(description = "唯一标识")
|
||||
private Integer pkId;
|
||||
|
||||
@Schema(description = "订单编号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(name = "订单类型", description = "1=换电;2=充电")
|
||||
private Integer orderType;
|
||||
|
||||
@Schema(name = "车牌号")
|
||||
private String plateNum;
|
||||
|
||||
@Schema(name = "换电站")
|
||||
private String stationName;
|
||||
|
||||
@Schema(name = "订单金额")
|
||||
private Integer amount;
|
||||
|
||||
@Schema(name = "预约人")
|
||||
private String perName;
|
||||
|
||||
@Schema(name = "订单时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date orderTime;
|
||||
|
||||
@Schema(name = "订单状态", description = "订单状态:1-已创建,2-换电中,3-换电完成,4-充电中,5-充电完成,6-待结算,7-已完成,9-已取消, -1-退款")
|
||||
private Integer status;
|
||||
|
||||
@Schema(name = "交易编码", description = "第三方收款返回的唯一标识")
|
||||
private String notifyOrderNo;
|
||||
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
package com.evotech.hd.common.core.Dto.request.order;
|
||||
|
||||
import com.evotech.hd.common.core.entity.BasePageRequest;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:OrderRequest
|
||||
* @date: 2025年05月16日 15:28
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "查询订单请求参数", hidden = true)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class OrderRequest extends BasePageRequest {
|
||||
|
||||
@Schema(description = "订单编码")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "车牌号")
|
||||
private String plateNum;
|
||||
|
||||
@Schema(description = "订单时间开始", example = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date orderTimeBegin;
|
||||
|
||||
@Schema(description = "订单时间结束")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date orderTimeEnd;
|
||||
|
||||
@Schema(description = "换电站编码")
|
||||
private String stationCode;
|
||||
|
||||
@Schema(description = "交易编码")
|
||||
private String tradeNo;
|
||||
|
||||
@Schema(description = "订单状态:1-已创建,2-换电中,3-换电完成,4-充电中,5-充电完成,6-待结算,7-已完成,9-已取消")
|
||||
private String status;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -2,6 +2,16 @@ package com.evotech.hd.common.core.constant;
|
||||
|
||||
public interface HDConstant {
|
||||
|
||||
/***
|
||||
* 全局删除标识-已删除
|
||||
*/
|
||||
final static Integer DELETE_YES = 1;
|
||||
|
||||
/***
|
||||
* 全局删除标识-未删除
|
||||
*/
|
||||
final static Integer DELETE_NO = 0;
|
||||
|
||||
/***
|
||||
* 大华设备相关CONSTANT
|
||||
*/
|
||||
@ -12,6 +22,133 @@ public interface HDConstant {
|
||||
|
||||
}
|
||||
|
||||
final class DcConstant{
|
||||
/** 出租中 */
|
||||
public static final Integer STATUS_CZ = 1;
|
||||
/** 充电中 */
|
||||
public static final Integer STATUS_CD = 2;
|
||||
/** 空闲 */
|
||||
public static final Integer STATUS_KX = 3;
|
||||
/** 故障 */
|
||||
public static final Integer STATUS_GZ = 4;
|
||||
/** 其他 */
|
||||
public static final Integer STATUS_QT = 5;
|
||||
|
||||
/** 来源_电站 */
|
||||
public static final Integer SOURCE_FROM_STATION = 1;
|
||||
/** 来源_车 */
|
||||
public static final Integer SOURCE_FROM_CAR = 2;
|
||||
|
||||
/** 电站 */
|
||||
public static final Integer POINT_TYPE_STATION = 1;
|
||||
/** 车 */
|
||||
public static final Integer POINT_TYPE_CAR = 2;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
* 订单相关参数
|
||||
*/
|
||||
final class OrderConstant{
|
||||
|
||||
/***
|
||||
* 计费方式-ODO(里程数)
|
||||
*/
|
||||
public static final int FEE_TYPE_ODO = 1;
|
||||
/***
|
||||
* 计费方式-SOC(电池百分比)
|
||||
*/
|
||||
public static final int FEE_TYPE_SOC = 2;
|
||||
/***
|
||||
* 计费方式-电量
|
||||
*/
|
||||
public static final int FEE_TYPE_DL = 3;
|
||||
/***
|
||||
* 换电模式 全自动
|
||||
*/
|
||||
public static final Integer CHANGE_MODE_AUTOMATIC = 1;
|
||||
/***
|
||||
* 换电模式 半自动
|
||||
*/
|
||||
public static final Integer CHANGE_MODE_AUTOMATIC_SEMI = 2;
|
||||
/***
|
||||
* 换电模式 人工干预
|
||||
*/
|
||||
public static final Integer CHANGE_MODE_ARTIFICIAL = 3;
|
||||
/***
|
||||
* 换电车道 A
|
||||
*/
|
||||
public static final Integer CHANGE_LANE_A = 1;
|
||||
/***
|
||||
* 换电车道 B
|
||||
*/
|
||||
public static final Integer CHANGE_LANE_B = 2;
|
||||
|
||||
/***
|
||||
* 订单类型-充电
|
||||
*/
|
||||
public static final Integer ORDER_TYPE_CHARGING = 2;
|
||||
/***
|
||||
* 订单类型-换电
|
||||
*/
|
||||
public static final Integer ORDER_TYPE_SWAP = 1;
|
||||
|
||||
/***
|
||||
* 支付方式-支付宝支付
|
||||
*/
|
||||
public static final String PAY_TYPE_ALI_PAY = "aliPay";
|
||||
/***
|
||||
* 支付方式-微信支付
|
||||
*/
|
||||
public static final String PAY_TYPE_WECHAT_PAY = "wechatPay";
|
||||
/***
|
||||
* 支付方式-余额支付
|
||||
*/
|
||||
public static final String PAY_TYPE_BALANCE_PAY = "balancePay";
|
||||
|
||||
|
||||
|
||||
//
|
||||
// /***
|
||||
// * 订单状态-已创建
|
||||
// */
|
||||
// public static final Integer ORDER_STATUS_CREATE = 1;
|
||||
// /***
|
||||
// * 订单状态-换电中
|
||||
// */
|
||||
// public static final Integer ORDER_STATUS_BATTERY_SWAPPING = 2;
|
||||
// /***
|
||||
// * 订单状态-换电完成
|
||||
// */
|
||||
// public static final Integer ORDER_STATUS_BATTERY_SWAPPING_END = 3;
|
||||
// /***
|
||||
// * 订单状态-充电中
|
||||
// */
|
||||
// public static final Integer ORDER_STATUS_CHARGING = 4;
|
||||
// /***
|
||||
// * 订单状态-充电完成
|
||||
// */
|
||||
// public static final Integer ORDER_STATUS_CHARGING_END = 5;
|
||||
// /***
|
||||
// * 订单状态-待结算
|
||||
// */
|
||||
// public static final Integer ORDER_STATUS_TO_BE_SETTLED = 6;
|
||||
// /***
|
||||
// * 订单状态-已完成
|
||||
// */
|
||||
// public static final Integer ORDER_STATUS_END = 7;
|
||||
// /***
|
||||
// * 订单状态-已取消
|
||||
// */
|
||||
// public static final Integer ORDER_STATUS_CLOSE = 9;
|
||||
// /***
|
||||
// * 订单状态-退款
|
||||
// */
|
||||
// public static final Integer ORDER_STATUS_REFUND = -1;
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
* 大华设备相关CONSTANT
|
||||
*/
|
||||
@ -33,7 +170,6 @@ public interface HDConstant {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* 权限相关CONSTANT
|
||||
*/
|
||||
@ -113,14 +249,14 @@ public interface HDConstant {
|
||||
*/
|
||||
String JWT_PAYLOAD_KEY = "payload";
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* jwt中添加的属性
|
||||
*/
|
||||
String USER_ID_KEY = "uid";
|
||||
String ROLE_CODE_KEY = "rcodes";
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 登陆验证码缓存key
|
||||
* hd:login:captcha: + captchaId
|
||||
@ -132,37 +268,37 @@ public interface HDConstant {
|
||||
* key: hd:login:jti:token
|
||||
*/
|
||||
String LOGIN_CACHE_KEY_PREFIX = "hd:login:";
|
||||
|
||||
|
||||
/**
|
||||
* 缓存系统token有效时间,s
|
||||
*/
|
||||
String HD_CACHE_TOKEN_EXP_KEY = "hd:cache:tokenExp";
|
||||
|
||||
|
||||
/**
|
||||
* 资源权限类型
|
||||
*/
|
||||
String RESOURCE_TYPE_PERM = "PER";
|
||||
String RESOURCE_TYPE_MENU = "MENU";
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 交换数据非对称加密RSA秘钥前缀
|
||||
*/
|
||||
String HD_STATION_SECRET_KEY_RSA_PREFIX = "hd:station:secretKey:rsa:";
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 交换数据对称加密AES秘钥前缀
|
||||
* 交换数据对称加密AES秘钥前缀
|
||||
*/
|
||||
String HD_STATION_SECRET_KEY_AES_PREFIX = "hd:station:secretKey:aes:";
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 微信服务请求头中权限验证字段
|
||||
*/
|
||||
String WECHAT_SERVER_AUTHORIZATION_KEY = "WXUID";
|
||||
String WECHAT_SERVER_TOKEN_KEY = "WXTOKEN";
|
||||
|
||||
|
||||
/**
|
||||
* 微信登录缓存数据前缀
|
||||
*/
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
package com.evotech.hd.common.core.dao.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.evotech.hd.common.core.entity.order.Order;
|
||||
import com.evotech.hd.common.core.Dto.home.*;
|
||||
import com.evotech.hd.common.core.Dto.request.HomeRequestDto;
|
||||
import com.evotech.hd.common.core.constant.HDConstant;
|
||||
import com.evotech.hd.common.core.permission.DataScope;
|
||||
import com.evotech.hd.common.core.permission.DataScopes;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 接口
|
||||
*
|
||||
* @ClassName:OrderMapper
|
||||
* @date: 2025年05月16日 14:00
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@DataScopes({
|
||||
@DataScope(permissionObject = HDConstant.OPERATOR_ROLE_CODE, permissionScopeName = "station_code", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_STATION_CODE),
|
||||
@DataScope(permissionObject = HDConstant.COMPANY_ROLE_CODE, permissionScopeName = "plate_num", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_CAR_CODE),
|
||||
})
|
||||
//@DataScopeOpenMethod(openMethod = true, methodName = {"homeFindHalfYearAmountData"})
|
||||
public interface OrderDao extends BaseMapper<Order> {
|
||||
|
||||
List<HomeOrderSwapBatteryProportionDto> homeFindProportionData(@Param("params") HomeRequestDto params);
|
||||
|
||||
List<HomeOrderSwapBatteryAmountDto> homeFindAmountData(@Param("params") HomeRequestDto params);
|
||||
//
|
||||
List<HomeOrderSwapBatteryHalfYearDto> homeFindHalfYearOrderData(@Param("params") HomeRequestDto params);
|
||||
|
||||
// @DataScope(permissionObject = HDConstant.OPERATOR_ROLE_CODE, tableAlias = "osb", permissionScopeName = "station_code", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_STATION_CODE)
|
||||
List<HomeOrderSwapBatteryHalfYearAmountDto> homeFindHalfYearAmountData(@Param("params") HomeRequestDto params);
|
||||
//因为站端不需要显示金额, 所有重新写一个
|
||||
List<HomeOrderSwapBatteryHalfYearAmountDto> homeFindHalfYearStationAmountData(@Param("params") HomeRequestDto params);
|
||||
|
||||
Long homeFindOrderCountData(@Param("date") Date date);
|
||||
|
||||
Double homeFindOrderAmountData(@Param("date") Date date);
|
||||
|
||||
List<HomeOrderInfo> findOrderListByStatus(@Param("status") Integer status);
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.evotech.hd.common.core.dao.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.evotech.hd.common.core.entity.order.OrderDetail;
|
||||
|
||||
/**
|
||||
* 接口
|
||||
*
|
||||
* @ClassName:OrderDetailDap
|
||||
* @date: 2025年05月17日 11:09
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
public interface OrderDetailDao extends BaseMapper<OrderDetail> {
|
||||
}
|
||||
@ -1,43 +1,43 @@
|
||||
package com.evotech.hd.common.core.dao.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.evotech.hd.common.core.Dto.request.HomeRequestDto;
|
||||
import com.evotech.hd.common.core.Dto.result.home.*;
|
||||
import com.evotech.hd.common.core.constant.HDConstant;
|
||||
import com.evotech.hd.common.core.entity.cloud.OrderSwapBattery;
|
||||
import com.evotech.hd.common.core.permission.DataScope;
|
||||
import com.evotech.hd.common.core.permission.DataScopes;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
* @since 2024-11-22
|
||||
*/
|
||||
@DataScopes({
|
||||
@DataScope(permissionObject = HDConstant.OPERATOR_ROLE_CODE, permissionScopeName = "station_code", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_STATION_CODE),
|
||||
@DataScope(permissionObject = HDConstant.COMPANY_ROLE_CODE, permissionScopeName = "plate_num", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_CAR_CODE),
|
||||
})
|
||||
//@DataScopeOpenMethod(openMethod = true, methodName = {"homeFindHalfYearAmountData"})
|
||||
public interface OrderSwapBatteryDao extends BaseMapper<OrderSwapBattery> {
|
||||
|
||||
|
||||
List<HomeOrderSwapBatteryProportionDto> homeFindProportionData(@Param("params") HomeRequestDto params);
|
||||
|
||||
List<HomeOrderSwapBatteryAmountDto> homeFindAmountData(@Param("params") HomeRequestDto params);
|
||||
|
||||
List<HomeOrderSwapBatteryHalfYearDto> homeFindHalfYearOrderData(@Param("params") HomeRequestDto params);
|
||||
|
||||
// @DataScope(permissionObject = HDConstant.OPERATOR_ROLE_CODE, tableAlias = "osb", permissionScopeName = "station_code", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_STATION_CODE)
|
||||
List<HomeOrderSwapBatteryHalfYearAmountDto> homeFindHalfYearAmountData(@Param("params") HomeRequestDto params);
|
||||
//因为站端不需要显示金额, 所有重新写一个
|
||||
List<HomeOrderSwapBatteryHalfYearAmountDto> homeFindHalfYearStationAmountData(@Param("params") HomeRequestDto params);
|
||||
|
||||
Long homeFindOrderCountData(@Param("date") Date date);
|
||||
|
||||
Double homeFindOrderAmountData(@Param("date") Date date);
|
||||
|
||||
List<HomeOrderInfo> findOrderListByStatus(@Param("status") Integer status);
|
||||
}
|
||||
//package com.evotech.hd.common.core.dao.cloud;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
//import com.evotech.hd.common.core.Dto.request.HomeRequestDto;
|
||||
//import com.evotech.hd.common.core.Dto.result.home.*;
|
||||
//import com.evotech.hd.common.core.constant.HDConstant;
|
||||
//import com.evotech.hd.common.core.entity.cloud.OrderSwapBattery;
|
||||
//import com.evotech.hd.common.core.permission.DataScope;
|
||||
//import com.evotech.hd.common.core.permission.DataScopes;
|
||||
//import org.apache.ibatis.annotations.Param;
|
||||
//
|
||||
//import java.util.Date;
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * @author zrb
|
||||
// * @since 2024-11-22
|
||||
// */
|
||||
//@DataScopes({
|
||||
// @DataScope(permissionObject = HDConstant.OPERATOR_ROLE_CODE, permissionScopeName = "station_code", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_STATION_CODE),
|
||||
// @DataScope(permissionObject = HDConstant.COMPANY_ROLE_CODE, permissionScopeName = "plate_num", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_CAR_CODE),
|
||||
//})
|
||||
////@DataScopeOpenMethod(openMethod = true, methodName = {"homeFindHalfYearAmountData"})
|
||||
//public interface OrderSwapBatteryDao extends BaseMapper<OrderSwapBattery> {
|
||||
//
|
||||
//
|
||||
// List<HomeOrderSwapBatteryProportionDto> homeFindProportionData(@Param("params") HomeRequestDto params);
|
||||
//
|
||||
// List<HomeOrderSwapBatteryAmountDto> homeFindAmountData(@Param("params") HomeRequestDto params);
|
||||
//
|
||||
// List<HomeOrderSwapBatteryHalfYearDto> homeFindHalfYearOrderData(@Param("params") HomeRequestDto params);
|
||||
//
|
||||
//// @DataScope(permissionObject = HDConstant.OPERATOR_ROLE_CODE, tableAlias = "osb", permissionScopeName = "station_code", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_STATION_CODE)
|
||||
// List<HomeOrderSwapBatteryHalfYearAmountDto> homeFindHalfYearAmountData(@Param("params") HomeRequestDto params);
|
||||
// //因为站端不需要显示金额, 所有重新写一个
|
||||
// List<HomeOrderSwapBatteryHalfYearAmountDto> homeFindHalfYearStationAmountData(@Param("params") HomeRequestDto params);
|
||||
//
|
||||
// Long homeFindOrderCountData(@Param("date") Date date);
|
||||
//
|
||||
// Double homeFindOrderAmountData(@Param("date") Date date);
|
||||
//
|
||||
// List<HomeOrderInfo> findOrderListByStatus(@Param("status") Integer status);
|
||||
//}
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
package com.evotech.hd.common.core.dao.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.evotech.hd.common.core.entity.system.SysParam;
|
||||
|
||||
/**
|
||||
* 接口
|
||||
*
|
||||
* @ClassName:SysParamDao
|
||||
* @date: 2025年07月02日 14:32
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
public interface SysParamDao extends BaseMapper<SysParam> {
|
||||
}
|
||||
@ -2,18 +2,12 @@ package com.evotech.hd.common.core.entity;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
@ -23,25 +17,16 @@ import java.util.Date;
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "BaseEntity", description = "基础实体类")
|
||||
public class BaseEntity implements Serializable {
|
||||
public class BaseEntity extends IdEntity {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "pk_id", type = IdType.AUTO)
|
||||
@Hidden
|
||||
private Integer pkId;
|
||||
|
||||
@Schema(description = "创建人", hidden = true)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String creater;
|
||||
|
||||
@Schema(description = "创建时间", hidden = true)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date ctime;
|
||||
|
||||
@Schema(description = "更新人", hidden = true)
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private String updater;
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
package com.evotech.hd.common.core.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:IdEntity
|
||||
* @date: 2025年05月16日 11:08
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
public class IdEntity implements Serializable {
|
||||
|
||||
|
||||
@TableId(value = "pk_id", type = IdType.AUTO)
|
||||
@Hidden
|
||||
private Integer pkId;
|
||||
|
||||
|
||||
@Schema(description = "创建时间", hidden = true)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date ctime;
|
||||
}
|
||||
@ -1,164 +1,171 @@
|
||||
package com.evotech.hd.common.core.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.evotech.hd.common.core.enums.CodeMsg;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
* @date 2024年9月2日17:25:54
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "请求返回对象")
|
||||
public class Result<T> implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -7806513009135956518L;
|
||||
|
||||
@Schema(description = "请求处理状态", example = "1")
|
||||
private Integer status;
|
||||
@Schema(description = "状态码", example = "1000")
|
||||
private String code;
|
||||
@Schema(description = "返回消息")
|
||||
private String msg;
|
||||
@Schema(description = "返回数据")
|
||||
private Object data;
|
||||
|
||||
private T obj;
|
||||
|
||||
|
||||
public Result(Integer status, String code, String msg, Object data) {
|
||||
this.status = status;
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public Result(Integer status, String msg, Object data) {
|
||||
this.status = status;
|
||||
this.msg = msg;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public Result(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Result() {
|
||||
}
|
||||
|
||||
public Result(Integer status, String code, String msg) {
|
||||
this.status = status;
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public Result(Integer status, String msg) {
|
||||
this.status = status;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public Result<T> success(Object o) {
|
||||
this.status = 1;
|
||||
this.code = CodeMsg.SUCCESS.getCode();
|
||||
this.msg = CodeMsg.SUCCESS.getMsg();
|
||||
this.data = o;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> success(String msg, Object o) {
|
||||
this.status = 1;
|
||||
this.code = CodeMsg.SUCCESS.getCode();
|
||||
this.msg = msg;
|
||||
this.data = o;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> success(String msg) {
|
||||
this.status = 1;
|
||||
this.code = CodeMsg.SUCCESS.getCode();
|
||||
this.msg = msg;
|
||||
this.data = CodeMsg.SUCCESS.getMsg();
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> success(String code, String msg, Object o) {
|
||||
this.status = 1;
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.data = o;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> success(CodeMsg cm, Object o) {
|
||||
this.status = 0;
|
||||
this.code = cm.getCode();
|
||||
this.msg = cm.getMsg();
|
||||
this.data = o;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> error(String msg) {
|
||||
this.status = 0;
|
||||
this.code = CodeMsg.ERROR.getCode();
|
||||
this.msg = msg;
|
||||
this.data = "ERROR";
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> error(String code, String msg) {
|
||||
this.status = 0;
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.data = "ERROR";
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> error(CodeMsg cm) {
|
||||
this.status = 0;
|
||||
this.code = cm.getCode();
|
||||
this.msg = cm.getMsg();
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> error(CodeMsg cm, Object o) {
|
||||
return error(cm.getCode(), cm.getMsg(), o);
|
||||
}
|
||||
|
||||
public Result<T> error(String code, String msg, Object o) {
|
||||
this.status = 0;
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.data = o;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> error(String msg, Object o) {
|
||||
this.status = 0;
|
||||
this.code = CodeMsg.ERROR.getCode();
|
||||
this.msg = msg;
|
||||
this.data = o;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public Result<T> exception(Object data) {
|
||||
this.status = -1;
|
||||
this.code = CodeMsg.ERROR.getCode();
|
||||
this.msg = CodeMsg.ERROR.getMsg();
|
||||
this.data = data==null?"未知异常":data;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public Result<T> bussinessException(String code, String msg, Object o) {
|
||||
this.status = -1;
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.data = o;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
//package com.evotech.hd.common.core.entity;
|
||||
//
|
||||
//import java.io.Serializable;
|
||||
//
|
||||
//import com.evotech.hd.common.core.enums.CodeMsg;
|
||||
//
|
||||
//import io.swagger.v3.oas.annotations.media.Schema;
|
||||
//import lombok.Data;
|
||||
//
|
||||
///**
|
||||
// * @author zrb
|
||||
// * @date 2024年9月2日17:25:54
|
||||
// */
|
||||
//@Data
|
||||
//@Schema(name = "请求返回对象")
|
||||
//public class Result<T> implements Serializable {
|
||||
//
|
||||
// private static final long serialVersionUID = -7806513009135956518L;
|
||||
//
|
||||
// @Schema(description = "请求处理状态", example = "1")
|
||||
// private Integer status;
|
||||
// @Schema(description = "状态码", example = "1000")
|
||||
// private String code;
|
||||
// @Schema(description = "返回消息")
|
||||
// private String msg;
|
||||
// @Schema(description = "返回数据")
|
||||
// private Object data;
|
||||
//
|
||||
// private T obj;
|
||||
//
|
||||
//
|
||||
// public Result(Integer status, String code, String msg, Object data) {
|
||||
// this.status = status;
|
||||
// this.code = code;
|
||||
// this.msg = msg;
|
||||
// this.data = data;
|
||||
// }
|
||||
//
|
||||
// public Result(Integer status, String msg, Object data) {
|
||||
// this.status = status;
|
||||
// this.msg = msg;
|
||||
// this.data = data;
|
||||
// }
|
||||
//
|
||||
// public Result(Integer status) {
|
||||
// this.status = status;
|
||||
// }
|
||||
//
|
||||
// public Result() {
|
||||
// }
|
||||
//
|
||||
// public Result(Integer status, String code, String msg) {
|
||||
// this.status = status;
|
||||
// this.code = code;
|
||||
// this.msg = msg;
|
||||
// }
|
||||
//
|
||||
// public Result(Integer status, String msg) {
|
||||
// this.status = status;
|
||||
// this.msg = msg;
|
||||
// }
|
||||
//
|
||||
// public Result<T> success() {
|
||||
// this.status = 1;
|
||||
// this.code = CodeMsg.SUCCESS.getCode();
|
||||
// this.msg = CodeMsg.SUCCESS.getMsg();
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> success(Object o) {
|
||||
// this.status = 1;
|
||||
// this.code = CodeMsg.SUCCESS.getCode();
|
||||
// this.msg = CodeMsg.SUCCESS.getMsg();
|
||||
// this.data = o;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> success(String msg, Object o) {
|
||||
// this.status = 1;
|
||||
// this.code = CodeMsg.SUCCESS.getCode();
|
||||
// this.msg = msg;
|
||||
// this.data = o;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> success(String msg) {
|
||||
// this.status = 1;
|
||||
// this.code = CodeMsg.SUCCESS.getCode();
|
||||
// this.msg = msg;
|
||||
// this.data = CodeMsg.SUCCESS.getMsg();
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> success(String code, String msg, Object o) {
|
||||
// this.status = 1;
|
||||
// this.code = code;
|
||||
// this.msg = msg;
|
||||
// this.data = o;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> success(CodeMsg cm, Object o) {
|
||||
// this.status = 0;
|
||||
// this.code = cm.getCode();
|
||||
// this.msg = cm.getMsg();
|
||||
// this.data = o;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> error(String msg) {
|
||||
// this.status = 0;
|
||||
// this.code = CodeMsg.ERROR.getCode();
|
||||
// this.msg = msg;
|
||||
// this.data = "ERROR";
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> error(String code, String msg) {
|
||||
// this.status = 0;
|
||||
// this.code = code;
|
||||
// this.msg = msg;
|
||||
// this.data = "ERROR";
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> error(CodeMsg cm) {
|
||||
// this.status = 0;
|
||||
// this.code = cm.getCode();
|
||||
// this.msg = cm.getMsg();
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> error(CodeMsg cm, Object o) {
|
||||
// return error(cm.getCode(), cm.getMsg(), o);
|
||||
// }
|
||||
//
|
||||
// public Result<T> error(String code, String msg, Object o) {
|
||||
// this.status = 0;
|
||||
// this.code = code;
|
||||
// this.msg = msg;
|
||||
// this.data = o;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public Result<T> error(String msg, Object o) {
|
||||
// this.status = 0;
|
||||
// this.code = CodeMsg.ERROR.getCode();
|
||||
// this.msg = msg;
|
||||
// this.data = o;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public Result<T> exception(Object data) {
|
||||
// this.status = -1;
|
||||
// this.code = CodeMsg.ERROR.getCode();
|
||||
// this.msg = CodeMsg.ERROR.getMsg();
|
||||
// this.data = data==null?"未知异常":data;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public Result<T> bussinessException(String code, String msg, Object o) {
|
||||
// this.status = -1;
|
||||
// this.code = code;
|
||||
// this.msg = msg;
|
||||
// this.data = o;
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
||||
@ -1,16 +1,7 @@
|
||||
package com.evotech.hd.common.core.entity.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
@ -18,6 +9,8 @@ import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
* @since 2024-10-17
|
||||
@ -54,11 +47,16 @@ public class BatteryStationDc extends BaseEntity implements Serializable {
|
||||
@Schema(description = "站码或车牌照", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotBlank
|
||||
private String sourceCode;
|
||||
|
||||
/***
|
||||
* 具体参考 HDConstant.DcConstant.STATUS_*
|
||||
*/
|
||||
@Schema(description = "状态:1-出租中,2-充电中,3-空闲,4-故障,5-其它", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
|
||||
/***
|
||||
* 具体参考 HDConstant.DcConstant.POINT_TYPE_*
|
||||
*/
|
||||
@Schema(description = "轨迹点类型:1-电站,2-车辆")
|
||||
private Integer pointType;
|
||||
|
||||
|
||||
@ -1,27 +1,19 @@
|
||||
package com.evotech.hd.common.core.entity.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
* @since 2024-10-17
|
||||
@ -44,6 +36,9 @@ public class BatteryStationHdFeeStandard extends BaseEntity implements Serializa
|
||||
@Schema(description = "换电站编码")
|
||||
private String stationName;
|
||||
|
||||
@Schema(description = "基本服务费")
|
||||
private BigDecimal serviceFee;
|
||||
|
||||
@Schema(description = "开始日期", requiredMode = RequiredMode.REQUIRED, example = DatePattern.PURE_DATE_PATTERN)
|
||||
@NotBlank(message = "开始时间不能为空")
|
||||
private String dayBegin;
|
||||
@ -61,6 +56,9 @@ public class BatteryStationHdFeeStandard extends BaseEntity implements Serializa
|
||||
@Schema(description = "每度电收费")
|
||||
private BigDecimal eachKwhFee;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "正常换电服务费")
|
||||
private BigDecimal commonRemainFee;
|
||||
|
||||
|
||||
@ -1,26 +1,19 @@
|
||||
package com.evotech.hd.common.core.entity.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalTime;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalTime;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
@ -42,6 +35,9 @@ public class BatteryStationHdFeeStandardDetail extends BaseEntity implements Ser
|
||||
@NotNull
|
||||
private Integer standardId;
|
||||
|
||||
@Schema(description = "服务费")
|
||||
private BigDecimal serviceFee;
|
||||
|
||||
@Schema(description = "每公里收费")
|
||||
private BigDecimal eachKmFee;
|
||||
|
||||
@ -61,6 +57,5 @@ public class BatteryStationHdFeeStandardDetail extends BaseEntity implements Ser
|
||||
@DateTimeFormat(pattern = DatePattern.NORM_TIME_PATTERN)
|
||||
private LocalTime timeEnd;
|
||||
|
||||
@Schema(description = "谷段服务费")
|
||||
private BigDecimal timeServiceFee;
|
||||
|
||||
}
|
||||
|
||||
@ -1,55 +0,0 @@
|
||||
package com.evotech.hd.common.core.entity.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
* @since 2024-11-22
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("hd_cloud_manage.yt_t_order_recharge")
|
||||
@Schema(name = "充值订单")
|
||||
public class OrderRecharge extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "订单时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date orderTime;
|
||||
|
||||
@Schema(description = "订单编码", hidden = true)
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "换电站编码")
|
||||
private String stationCode;
|
||||
|
||||
@Schema(description = "换电站名称")
|
||||
private String stationName;
|
||||
|
||||
@Schema(description = "钱包账户账号")
|
||||
private String accountCode;
|
||||
|
||||
@Schema(description = "充值账号ID")
|
||||
private String userId;
|
||||
|
||||
@Schema(description = "交易编码")
|
||||
private String tradeNo;
|
||||
|
||||
@Schema(description = "删除状态:1-已删除,0-未删除", hidden = true)
|
||||
private Integer delFlag;
|
||||
}
|
||||
@ -1,162 +1,162 @@
|
||||
package com.evotech.hd.common.core.entity.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
* @since 2024-11-22
|
||||
*/
|
||||
@Data
|
||||
@TableName("hd_cloud_manage.yt_t_order_swap_battery")
|
||||
@Schema(name = "换电订单信息表")
|
||||
public class OrderSwapBattery extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "预约订单ID")
|
||||
private Integer orderPreId;
|
||||
|
||||
@Schema(description = "预约用户")
|
||||
private String orderPreUid;
|
||||
|
||||
@Schema(description = "预约用户名称")
|
||||
private String orderPreUname;
|
||||
|
||||
@Schema(description = "预约用户手机")
|
||||
private String orderPrePhone;
|
||||
|
||||
@Schema(description = "类型:1-换电,2-充电", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotNull(message = "订单类型不能为空")
|
||||
private Integer orderType;
|
||||
|
||||
@Schema(description = "订单编码", hidden = true)
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "车牌号", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "车牌号不能为空")
|
||||
private String plateNum;
|
||||
|
||||
@Schema(description = "订单时间", example = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date orderTime;
|
||||
|
||||
@Schema(description = "换电站编码", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "换电站编码不能为空")
|
||||
private String stationCode;
|
||||
|
||||
@Schema(description = "换电站名称", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "换电站名称不能为空")
|
||||
private String stationName;
|
||||
|
||||
@Schema(description = "金额账号")
|
||||
private String accountCode;
|
||||
|
||||
@Schema(description = "订单金额")
|
||||
private Integer amount;
|
||||
|
||||
@Schema(description = "订单状态:1-已创建,2-换电中,3-换电完成,4-充电中,5-充电完成,6-待结算,7-已完成,9-已取消, -1-退款")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "计算费用方式:1-ODO,2-SOC,3-按电量")
|
||||
private Integer feeType;
|
||||
|
||||
@Schema(description = "基础费用")
|
||||
private BigDecimal basicFee;
|
||||
|
||||
@Schema(description = "服务开始时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date serviceTimeBegin;
|
||||
|
||||
@Schema(description = "服务结束时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date serviceTimeEnd;
|
||||
|
||||
@Schema(description = "服务费")
|
||||
private BigDecimal serviceFee;
|
||||
|
||||
@Schema(description = "费用标准")
|
||||
private String feeStandardJson;
|
||||
@Schema(description = "费用标准详情")
|
||||
@TableField(exist = false)
|
||||
private BatteryStationHdFeeStandard feeStandardDetail;
|
||||
|
||||
@Schema(description = "上次租赁电池时车辆里程")
|
||||
private BigDecimal lastRentBatCarOdo;
|
||||
|
||||
@Schema(description = "归还电池时车辆里程")
|
||||
private BigDecimal nowReturnBatCarOdo;
|
||||
|
||||
@Schema(description = "按ODO换电费")
|
||||
private BigDecimal odoAmount;
|
||||
|
||||
@Schema(description = "充电开始时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date chargeTimeBegin;
|
||||
|
||||
@Schema(description = "充电结束时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date chargeTimeEnd;
|
||||
|
||||
@Schema(description = "总充电量")
|
||||
private BigDecimal electAmount;
|
||||
|
||||
@Schema(description = "租借电池包仓位")
|
||||
private Integer rentBatNo;
|
||||
|
||||
@Schema(description = "租用电池包编码")
|
||||
private String rentBatCode;
|
||||
|
||||
@Schema(description = "租用电池包SOC")
|
||||
private Integer rentBatSoc;
|
||||
|
||||
@Schema(description = "归还电池包编码")
|
||||
private String returnBatCode;
|
||||
|
||||
@Schema(description = "归还电池包仓位")
|
||||
private Integer returnBatNo;
|
||||
|
||||
@Schema(description = "归还电池包SOC")
|
||||
private Integer returnBatSoc;
|
||||
|
||||
@Schema(description = "归还电池租出时soc")
|
||||
private Integer returnBatRentSoc;
|
||||
|
||||
@Schema(description = "归还电池租出的换电站编码")
|
||||
private String returnBatRentStationCode;
|
||||
|
||||
@Schema(description = "归还电池租出的换电站")
|
||||
private String returnBatRentStationName;
|
||||
|
||||
@Schema(description = "换电模式:1-全自动,2-半自动,3-人工干预 ")
|
||||
private Integer changeMode;
|
||||
|
||||
@Schema(description = "换电车道 1-A 车道;2-B 车道")
|
||||
private Integer changeLane;
|
||||
|
||||
@Schema(description = "删除状态:1-已删除,0-未删除", hidden = true)
|
||||
private Integer delFlag;
|
||||
|
||||
@Schema(description = "交易编码", hidden = true)
|
||||
private String tradeNo;
|
||||
|
||||
@Schema(description = "备注信息")
|
||||
private String remark;
|
||||
}
|
||||
//package com.evotech.hd.common.core.entity.cloud;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.annotation.TableField;
|
||||
//import com.baomidou.mybatisplus.annotation.TableName;
|
||||
//import com.evotech.hd.common.core.entity.BaseEntity;
|
||||
//import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
//import io.swagger.v3.oas.annotations.media.Schema;
|
||||
//import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
//import jakarta.validation.constraints.NotBlank;
|
||||
//import jakarta.validation.constraints.NotNull;
|
||||
//import lombok.Data;
|
||||
//import org.springframework.format.annotation.DateTimeFormat;
|
||||
//
|
||||
//import java.io.Serializable;
|
||||
//import java.math.BigDecimal;
|
||||
//import java.util.Date;
|
||||
//
|
||||
///**
|
||||
// * @author zrb
|
||||
// * @since 2024-11-22
|
||||
// */
|
||||
//@Data
|
||||
//@TableName("hd_cloud_manage.yt_t_order_swap_battery")
|
||||
//@Schema(name = "换电订单信息表")
|
||||
//public class OrderSwapBattery extends BaseEntity implements Serializable {
|
||||
//
|
||||
// private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// @Schema(description = "预约订单ID")
|
||||
// private Integer orderPreId;
|
||||
//
|
||||
// @Schema(description = "预约用户")
|
||||
// private String orderPreUid;
|
||||
//
|
||||
// @Schema(description = "预约用户名称")
|
||||
// private String orderPreUname;
|
||||
//
|
||||
// @Schema(description = "预约用户手机")
|
||||
// private String orderPrePhone;
|
||||
//
|
||||
// @Schema(description = "类型:1-换电,2-充电", requiredMode = RequiredMode.REQUIRED)
|
||||
// @NotNull(message = "订单类型不能为空")
|
||||
// private Integer orderType;
|
||||
//
|
||||
// @Schema(description = "订单编码", hidden = true)
|
||||
// private String orderNo;
|
||||
//
|
||||
// @Schema(description = "车牌号", requiredMode = RequiredMode.REQUIRED)
|
||||
// @NotBlank(message = "车牌号不能为空")
|
||||
// private String plateNum;
|
||||
//
|
||||
// @Schema(description = "订单时间", example = "yyyy-MM-dd HH:mm:ss")
|
||||
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
// private Date orderTime;
|
||||
//
|
||||
// @Schema(description = "换电站编码", requiredMode = RequiredMode.REQUIRED)
|
||||
// @NotBlank(message = "换电站编码不能为空")
|
||||
// private String stationCode;
|
||||
//
|
||||
// @Schema(description = "换电站名称", requiredMode = RequiredMode.REQUIRED)
|
||||
// @NotBlank(message = "换电站名称不能为空")
|
||||
// private String stationName;
|
||||
//
|
||||
// @Schema(description = "金额账号")
|
||||
// private String accountCode;
|
||||
//
|
||||
// @Schema(description = "订单金额")
|
||||
// private Integer amount;
|
||||
//
|
||||
// @Schema(description = "订单状态:1-已创建,2-换电中,3-换电完成,4-充电中,5-充电完成,6-待结算,7-已完成,9-已取消, -1-退款")
|
||||
// private Integer status;
|
||||
//
|
||||
// @Schema(description = "计算费用方式:1-ODO,2-SOC,3-按电量")
|
||||
// private Integer feeType;
|
||||
//
|
||||
// @Schema(description = "基础费用")
|
||||
// private BigDecimal basicFee;
|
||||
//
|
||||
// @Schema(description = "服务开始时间")
|
||||
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
// private Date serviceTimeBegin;
|
||||
//
|
||||
// @Schema(description = "服务结束时间")
|
||||
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
// private Date serviceTimeEnd;
|
||||
//
|
||||
// @Schema(description = "服务费")
|
||||
// private BigDecimal serviceFee;
|
||||
//
|
||||
// @Schema(description = "费用标准")
|
||||
// private String feeStandardJson;
|
||||
// @Schema(description = "费用标准详情")
|
||||
// @TableField(exist = false)
|
||||
// private BatteryStationHdFeeStandard feeStandardDetail;
|
||||
//
|
||||
// @Schema(description = "上次租赁电池时车辆里程")
|
||||
// private BigDecimal lastRentBatCarOdo;
|
||||
//
|
||||
// @Schema(description = "归还电池时车辆里程")
|
||||
// private BigDecimal nowReturnBatCarOdo;
|
||||
//
|
||||
// @Schema(description = "按ODO换电费")
|
||||
// private BigDecimal odoAmount;
|
||||
//
|
||||
// @Schema(description = "充电开始时间")
|
||||
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
// private Date chargeTimeBegin;
|
||||
//
|
||||
// @Schema(description = "充电结束时间")
|
||||
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
// private Date chargeTimeEnd;
|
||||
//
|
||||
// @Schema(description = "总充电量")
|
||||
// private BigDecimal electAmount;
|
||||
//
|
||||
// @Schema(description = "租借电池包仓位")
|
||||
// private Integer rentBatNo;
|
||||
//
|
||||
// @Schema(description = "租用电池包编码")
|
||||
// private String rentBatCode;
|
||||
//
|
||||
// @Schema(description = "租用电池包SOC")
|
||||
// private Integer rentBatSoc;
|
||||
//
|
||||
// @Schema(description = "归还电池包编码")
|
||||
// private String returnBatCode;
|
||||
//
|
||||
// @Schema(description = "归还电池包仓位")
|
||||
// private Integer returnBatNo;
|
||||
//
|
||||
// @Schema(description = "归还电池包SOC")
|
||||
// private Integer returnBatSoc;
|
||||
//
|
||||
// @Schema(description = "归还电池租出时soc")
|
||||
// private Integer returnBatRentSoc;
|
||||
//
|
||||
// @Schema(description = "归还电池租出的换电站编码")
|
||||
// private String returnBatRentStationCode;
|
||||
//
|
||||
// @Schema(description = "归还电池租出的换电站")
|
||||
// private String returnBatRentStationName;
|
||||
//
|
||||
// @Schema(description = "换电模式:1-全自动,2-半自动,3-人工干预 ")
|
||||
// private Integer changeMode;
|
||||
//
|
||||
// @Schema(description = "换电车道 1-A 车道;2-B 车道")
|
||||
// private Integer changeLane;
|
||||
//
|
||||
// @Schema(description = "删除状态:1-已删除,0-未删除", hidden = true)
|
||||
// private Integer delFlag;
|
||||
//
|
||||
// @Schema(description = "交易编码", hidden = true)
|
||||
// private String tradeNo;
|
||||
//
|
||||
// @Schema(description = "备注信息")
|
||||
// private String remark;
|
||||
//}
|
||||
|
||||
@ -1,21 +1,17 @@
|
||||
package com.evotech.hd.common.core.entity.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
@ -35,7 +31,7 @@ public class OrderSwapBatteryPre extends BaseEntity implements Serializable {
|
||||
@Schema(description = "来源是站端时,记录发送Id,其他来源不需要", hidden = true)
|
||||
private String sourceId;
|
||||
|
||||
@Schema(description = "预约人编码", requiredMode = RequiredMode.REQUIRED)
|
||||
@Schema(description = "预约人的微信Id", requiredMode = RequiredMode.REQUIRED)
|
||||
private String ucode;
|
||||
|
||||
@Schema(description = "预约人姓名", requiredMode = RequiredMode.REQUIRED)
|
||||
|
||||
@ -1,19 +1,15 @@
|
||||
package com.evotech.hd.common.core.entity.cloud;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
* @since 2024-11-22
|
||||
@ -28,38 +24,31 @@ public class TradeDetail extends BaseEntity implements Serializable {
|
||||
@Schema(description = "换电站编码")
|
||||
private String stationCode;
|
||||
|
||||
@Schema(description = "交易人")
|
||||
@Schema(description = "交易人name")
|
||||
private String trader;
|
||||
|
||||
@Schema(description = "交易人编码")
|
||||
@Schema(description = "交易人微信Id")
|
||||
private String traderCode;
|
||||
|
||||
@Schema(description = "交易类型:1-充值,2-订单消费,9-提现")
|
||||
private Integer tradeType;
|
||||
|
||||
@Schema(description = "变动金额的钱包账户,钱包金额不变时不需要")
|
||||
private String wallet;
|
||||
|
||||
@Schema(description = "appid")
|
||||
private String appid;
|
||||
|
||||
@Schema(description = "银行类型")
|
||||
private String bankType;
|
||||
|
||||
@Schema(description = "收款商户号")
|
||||
private String mchid;
|
||||
|
||||
@Schema(description = "微信支付API类型")
|
||||
private String wechatPayApiType;
|
||||
|
||||
@Schema(description = "订单总描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "交易编码")
|
||||
private String outTradeNo;
|
||||
|
||||
@Schema(description = "交易类型:1-充值,2-订单消费,3-退款, 9-提现")
|
||||
private Integer tradeType;
|
||||
|
||||
@Schema(description = "支付方式:1-账户余额,2-微信,3-支付宝,4-网银,5 -充电补偿")
|
||||
private Integer payType;
|
||||
@Schema(description = "微信支付API类型")
|
||||
private String wechatPayApiType;
|
||||
/***
|
||||
* 交易信息
|
||||
*/
|
||||
private String tradeMessage;
|
||||
/***
|
||||
* 交易账号
|
||||
*/
|
||||
// @Schema(description = "变动金额的钱包账户,钱包金额不变时不需要")
|
||||
private String payAccount;
|
||||
|
||||
@Schema(description = "订单数量")
|
||||
private Integer orderCount;
|
||||
@ -82,12 +71,9 @@ public class TradeDetail extends BaseEntity implements Serializable {
|
||||
@Schema(description = "支付结果,暂用微信结果的枚举类型")
|
||||
private String payResult;
|
||||
|
||||
@Schema(description = "在微信等支付网关创建支付订单时失败,返回的失败原因")
|
||||
private String payMsg;
|
||||
|
||||
@Schema(description = "付款人编码,对于个人账户,交易发起人和付款人一般是同一人。公司账户交易发起人是公司,付款人可能是 微信账户")
|
||||
private String payer;
|
||||
|
||||
private String payWechatId;
|
||||
|
||||
@Schema(description = "支付完成时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
@ -96,12 +82,33 @@ public class TradeDetail extends BaseEntity implements Serializable {
|
||||
@Schema(description = "删除标识,1-已删除,0-未删除", hidden = true)
|
||||
private Integer delFlag;
|
||||
|
||||
@Schema(description = "退款结果: 0-未退款, 1-退款中,2-已退款, 3-退款失败")
|
||||
private Integer refundResult;
|
||||
@Schema(description = "appid")
|
||||
private String appid;
|
||||
//
|
||||
@Schema(description = "银行类型")
|
||||
private String bankType;
|
||||
|
||||
@Schema(description = "在微信等退款网关创建退款订单时失败,返回的失败原因")
|
||||
private String refundMsg;
|
||||
@Schema(description = "收款商户号")
|
||||
private String mchid;
|
||||
|
||||
@Schema(description = "退款返回数据")
|
||||
private String refundReturn;
|
||||
@Schema(description = "订单总描述")
|
||||
private String description;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// @Schema(description = "在微信等支付网关创建支付订单时失败,返回的失败原因")
|
||||
// private String payMsg;
|
||||
|
||||
|
||||
|
||||
// @Schema(description = "退款结果: 0-未退款, 1-退款中,2-已退款, 3-退款失败")
|
||||
// private Integer refundResult;
|
||||
//
|
||||
// @Schema(description = "在微信等退款网关创建退款订单时失败,返回的失败原因")
|
||||
// private String refundMsg;
|
||||
//
|
||||
// @Schema(description = "退款返回数据")
|
||||
// private String refundReturn;
|
||||
}
|
||||
|
||||
@ -0,0 +1,158 @@
|
||||
package com.evotech.hd.common.core.entity.cloud.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationHdFeeStandard;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:OrderVo
|
||||
* @date: 2025年06月20日 16:08
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
public class OrderVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "预约订单ID")
|
||||
private Integer orderPreId;
|
||||
|
||||
@Schema(description = "预约用户")
|
||||
private String orderPreUid;
|
||||
|
||||
@Schema(description = "预约用户名称")
|
||||
private String orderPreUname;
|
||||
|
||||
@Schema(description = "预约用户手机")
|
||||
private String orderPrePhone;
|
||||
|
||||
@NotNull(message = "订单类型不能为空")
|
||||
private Integer orderType;
|
||||
|
||||
@Schema(description = "订单编码", hidden = true)
|
||||
private String orderNo;
|
||||
|
||||
@NotBlank(message = "车牌号不能为空")
|
||||
private String plateNum;
|
||||
|
||||
@Schema(description = "订单时间", example = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date orderTime;
|
||||
|
||||
@NotBlank(message = "换电站编码不能为空")
|
||||
private String stationCode;
|
||||
|
||||
@NotBlank(message = "换电站名称不能为空")
|
||||
private String stationName;
|
||||
|
||||
@Schema(description = "金额账号")
|
||||
private String accountCode;
|
||||
|
||||
@Schema(description = "订单金额")
|
||||
private Integer amount;
|
||||
|
||||
@Schema(description = "订单状态:1-已创建,2-换电中,3-换电完成,4-充电中,5-充电完成,6-待结算,7-已完成,9-已取消, -1-退款")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "计算费用方式:1-ODO,2-SOC,3-按电量")
|
||||
private Integer feeType;
|
||||
|
||||
@Schema(description = "基础费用")
|
||||
private BigDecimal basicFee;
|
||||
|
||||
@Schema(description = "服务开始时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date serviceTimeBegin;
|
||||
|
||||
@Schema(description = "服务结束时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date serviceTimeEnd;
|
||||
|
||||
@Schema(description = "服务费")
|
||||
private BigDecimal serviceFee;
|
||||
|
||||
@Schema(description = "费用标准")
|
||||
private String feeStandardJson;
|
||||
@Schema(description = "费用标准详情")
|
||||
@TableField(exist = false)
|
||||
private BatteryStationHdFeeStandard feeStandardDetail;
|
||||
|
||||
@Schema(description = "上次租赁电池时车辆里程")
|
||||
private BigDecimal lastRentBatCarOdo;
|
||||
|
||||
@Schema(description = "归还电池时车辆里程")
|
||||
private BigDecimal nowReturnBatCarOdo;
|
||||
|
||||
@Schema(description = "按ODO换电费")
|
||||
private BigDecimal odoAmount;
|
||||
|
||||
@Schema(description = "充电开始时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date chargeTimeBegin;
|
||||
|
||||
@Schema(description = "充电结束时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date chargeTimeEnd;
|
||||
|
||||
@Schema(description = "总充电量")
|
||||
private BigDecimal electAmount;
|
||||
|
||||
@Schema(description = "租借电池包仓位")
|
||||
private Integer rentBatNo;
|
||||
|
||||
@Schema(description = "租用电池包编码")
|
||||
private String rentBatCode;
|
||||
|
||||
@Schema(description = "租用电池包SOC")
|
||||
private Integer rentBatSoc;
|
||||
|
||||
@Schema(description = "归还电池包编码")
|
||||
private String returnBatCode;
|
||||
|
||||
@Schema(description = "归还电池包仓位")
|
||||
private Integer returnBatNo;
|
||||
|
||||
@Schema(description = "归还电池包SOC")
|
||||
private Integer returnBatSoc;
|
||||
|
||||
@Schema(description = "归还电池租出时soc")
|
||||
private Integer returnBatRentSoc;
|
||||
|
||||
@Schema(description = "归还电池租出的换电站编码")
|
||||
private String returnBatRentStationCode;
|
||||
|
||||
@Schema(description = "归还电池租出的换电站")
|
||||
private String returnBatRentStationName;
|
||||
|
||||
@Schema(description = "换电模式:1-全自动,2-半自动,3-人工干预 ")
|
||||
private Integer changeMode;
|
||||
|
||||
@Schema(description = "换电车道 1-A 车道;2-B 车道")
|
||||
private Integer changeLane;
|
||||
|
||||
@Schema(description = "删除状态:1-已删除,0-未删除", hidden = true)
|
||||
private Integer delFlag;
|
||||
|
||||
@Schema(description = "交易编码", hidden = true)
|
||||
private String tradeNo;
|
||||
|
||||
@Schema(description = "备注信息")
|
||||
private String remark;
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
package com.evotech.hd.common.core.entity.order;
|
||||
|
||||
import com.evotech.hd.common.core.entity.IdEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:BaseOrder
|
||||
* @date: 2025年05月16日 11:11
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
public class BaseOrder extends IdEntity {
|
||||
|
||||
/***
|
||||
* 订单编码
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/***
|
||||
* 订单金额
|
||||
*/
|
||||
private Integer orderAmount;
|
||||
|
||||
/***
|
||||
* 订单状态, 具体参考 OrderStatusEnums //HDConstant.OrderConstant.ORDER_STATUS_*
|
||||
*/
|
||||
private Integer status;
|
||||
/***
|
||||
* 支付方式 具体参考 HDConstant.OrderConstant.PAY_TYPE_*
|
||||
*/
|
||||
private String payType;
|
||||
/***
|
||||
* 支付时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date payTime;
|
||||
/***
|
||||
* 支付人的微信ID
|
||||
*/
|
||||
private String payWechatId;
|
||||
|
||||
/***
|
||||
* 第三方返回的唯一订单标识
|
||||
*/
|
||||
private String notifyOrderNo;
|
||||
/***
|
||||
* 支付的回调信息
|
||||
*/
|
||||
private String notifyInfo;
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
package com.evotech.hd.common.core.entity.order;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:SwapOrder
|
||||
* @date: 2025年05月16日 11:29
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName(value = "yt_t_order", schema = "hd_cloud_manage")
|
||||
public class Order extends BaseOrder{
|
||||
|
||||
private Integer orderPreId;
|
||||
|
||||
/***
|
||||
* 预约用户的微信ID
|
||||
*/
|
||||
private String preWechatId;
|
||||
|
||||
/***
|
||||
* 预约用户名称
|
||||
*/
|
||||
private String orderPreUname;
|
||||
/***
|
||||
* 订单类型, 具体参考 HDConstant.OrderConstant.ORDER_TYPE_*
|
||||
*/
|
||||
private Integer orderType;
|
||||
/***
|
||||
* 车牌号
|
||||
*/
|
||||
private String plateNum;
|
||||
|
||||
/***
|
||||
* 下单时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date orderTime;
|
||||
/***
|
||||
* '换电站编码'
|
||||
*/
|
||||
private String stationCode;
|
||||
|
||||
/***
|
||||
* ''换电站名称''
|
||||
*/
|
||||
private String stationName;
|
||||
|
||||
/***
|
||||
* 订单状态, 具体参考 HDConstant.DELETE_*
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/***
|
||||
* 备注信息
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/***
|
||||
* 变更时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTime;
|
||||
}
|
||||
@ -0,0 +1,108 @@
|
||||
package com.evotech.hd.common.core.entity.order;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.IdEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:OrderDetail
|
||||
* @date: 2025年05月17日 9:10
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "yt_t_order_detail", schema = "hd_cloud_manage")
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class OrderDetail extends IdEntity {
|
||||
|
||||
private Integer orderId;
|
||||
|
||||
/***
|
||||
* 计费类型, 具体参考 HDConstant.OrderConstant.FEE_TYPE_*
|
||||
*/
|
||||
private Integer feeType;
|
||||
/***
|
||||
* 订单金额 (此金额是当前订单的金额, 不包含基础服务费, 所以不是订单总额)
|
||||
*/
|
||||
private Integer orderFee;
|
||||
/***
|
||||
* 服务费
|
||||
*/
|
||||
private Integer serviceFee;
|
||||
/***
|
||||
* 单价(分)
|
||||
*/
|
||||
private Integer unitPrice;
|
||||
/***
|
||||
* 服务开始时间
|
||||
*/
|
||||
private Date serviceTimeBegin;
|
||||
/***
|
||||
* 服务结束时间
|
||||
*/
|
||||
private Date serviceTimeEnd;
|
||||
/***
|
||||
* 订单开始时间
|
||||
*/
|
||||
private Date orderTimeBegin;
|
||||
/***
|
||||
* 订单结束时间
|
||||
*/
|
||||
private Date orderTimeEnd;
|
||||
/***
|
||||
* 费用标准详情
|
||||
*/
|
||||
private String feeStandard;
|
||||
/***
|
||||
* 耗电量; 如果是soc结算 则是soc的差值, ODO则是里程
|
||||
*/
|
||||
private Double electricityQuantity;
|
||||
|
||||
/***
|
||||
* 开始充电的电量
|
||||
*/
|
||||
private Double electStart;
|
||||
/***
|
||||
* 结束充电的电量
|
||||
*/
|
||||
private Double electEnd;
|
||||
/***
|
||||
* 租借电池包仓位
|
||||
*/
|
||||
private String rentBatNo;
|
||||
/***
|
||||
* 租借电池包编码
|
||||
*/
|
||||
private String rentBatCode;
|
||||
/***
|
||||
* 租借电池包SOC
|
||||
*/
|
||||
private Double rentBatSoc;
|
||||
/***
|
||||
* 归还电池包仓位
|
||||
*/
|
||||
private String returnBatNo;
|
||||
/***
|
||||
* 归还电池包编码
|
||||
*/
|
||||
private String returnBatCode;
|
||||
/***
|
||||
* 归还电池包SOC
|
||||
*/
|
||||
private Double returnBatSoc;
|
||||
/***
|
||||
* 换电模式 HDConstant.OrderConstant.CHANGE_MODE_*
|
||||
*/
|
||||
private Integer changeMode;
|
||||
/***
|
||||
* 换电车道 HDConstant.OrderConstant.CHANGE_LANE_*
|
||||
*/
|
||||
private Integer changeLane;
|
||||
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.evotech.hd.common.core.entity.order;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
* @since 2024-11-22
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "yt_t_order_recharge", schema = "hd_cloud_manage")
|
||||
@Schema(name = "充值订单")
|
||||
public class OrderRecharge extends BaseOrder implements Serializable {
|
||||
|
||||
/***
|
||||
* 1 待支付 2 已支付
|
||||
*/
|
||||
private Integer orderType;
|
||||
|
||||
private String wuId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package com.evotech.hd.common.core.entity.order;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.IdEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 退款订单类
|
||||
*
|
||||
* @ClassName:OrderRefund
|
||||
* @date: 2025年06月28日 16:21
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "yt_t_order_refund", schema = "hd_cloud_manage")
|
||||
@Schema(name = "退款订单")
|
||||
public class OrderRefund extends IdEntity {
|
||||
|
||||
/***
|
||||
* 微信支付单号
|
||||
*/
|
||||
String transactionId;
|
||||
/***
|
||||
* 退款订单号
|
||||
*/
|
||||
String refundOrderNo;
|
||||
/***
|
||||
* 充值订单号
|
||||
*/
|
||||
String outTradeNo;
|
||||
/***
|
||||
* 退款原因
|
||||
*/
|
||||
String reason;
|
||||
/***
|
||||
* 订单金额
|
||||
*/
|
||||
Integer orderAmount;
|
||||
/***
|
||||
* 退款金额
|
||||
*/
|
||||
Integer refundAmount;
|
||||
/***
|
||||
* 退款状态. 默认待退款
|
||||
* PENDING_REFUND-待退款
|
||||
* SUCCESS—退款成功
|
||||
* CLOSED—退款关闭。
|
||||
* PROCESSING—退款处理中
|
||||
* ABNORMAL—退款异常,退款到银行发现用户的卡作废或者冻结了,导致原路退款银行卡失败,可前往商户平台-交易中心,手动处理此笔退款,可参考: 退款异常的处理,或者通过发起异常退款接口进行处理。
|
||||
*/
|
||||
String refundStatus = "PENDING_REFUND";
|
||||
/***
|
||||
* 微信退款单号
|
||||
*/
|
||||
String refundId;
|
||||
/***
|
||||
* 微信退款用户Id
|
||||
*/
|
||||
String refundWechatId;
|
||||
/***
|
||||
* 微信请求结果
|
||||
*/
|
||||
String refundRequestInfo;
|
||||
/***
|
||||
* 微信退款回调结果
|
||||
*/
|
||||
String notifyInfo;
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.evotech.hd.common.core.entity.system;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.evotech.hd.common.core.entity.IdEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:SysParam
|
||||
* @date: 2025年07月02日 14:26
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName(value = "yt_t_sys_param", schema = "hd_cloud_manage")
|
||||
public class SysParam extends IdEntity {
|
||||
|
||||
/** 参数名 */
|
||||
private String paramName;
|
||||
|
||||
/** 参数码 */
|
||||
private String paramCode;
|
||||
|
||||
/** 参数值 */
|
||||
private String paramValue;
|
||||
|
||||
/** 说明 */
|
||||
private String description;
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.evotech.hd.common.core.enums;
|
||||
|
||||
/**
|
||||
* 枚举
|
||||
*
|
||||
* @ClassName:BaseEnum
|
||||
* @date: 2025年05月19日 15:36
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
public interface BaseEnum<K, V> {
|
||||
|
||||
K getKey();
|
||||
V getValue();
|
||||
}
|
||||
@ -1,5 +1,9 @@
|
||||
package com.evotech.hd.common.core.enums;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 100 Continue 继续。客户端应继续其请求
|
||||
101 Switching Protocols 切换协议。服务器根据客户端的请求切换协议。只能切换到更高级的协议,例如,切换到HTTP的新版本协议
|
||||
@ -99,5 +103,11 @@ public enum CodeMsg {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public static CodeMsg getCodeMsgByCode(String code){
|
||||
Map<String, CodeMsg> map = Arrays.stream(CodeMsg.values()).collect(Collectors.toMap(CodeMsg::getCode, v->v));
|
||||
return map.get(code);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package com.evotech.hd.common.core.enums;
|
||||
|
||||
public enum OrderStatusEnums {
|
||||
public enum OrderStatusEnums implements BaseEnum<Integer, String> {
|
||||
|
||||
CREATE(1, "已创建"),
|
||||
|
||||
SWAP(2, "换电开始"),
|
||||
SWAP(2, "换电中"),
|
||||
|
||||
SWAPOVER(3, "换电完成"),
|
||||
|
||||
@ -16,7 +16,14 @@ public enum OrderStatusEnums {
|
||||
|
||||
FINISH(7, "已完成"),
|
||||
|
||||
CANCLE(9, "已取消");
|
||||
CANCLE(9, "已取消"),
|
||||
|
||||
REFUND(-1, "订单退款"),
|
||||
|
||||
REFUND_PART(-2, "订单不分退款"),
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
Integer code;
|
||||
@ -36,4 +43,14 @@ public enum OrderStatusEnums {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Integer getKey() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
package com.evotech.hd.common.core.enums;
|
||||
|
||||
/**
|
||||
* 枚举
|
||||
*
|
||||
* @ClassName:SwapBatteryStepEnum
|
||||
* @date: 2025年06月23日 16:08
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
public enum SwapBatteryStepEnum implements BaseEnum<Integer, String>{
|
||||
|
||||
// @Schema(description = "步骤:1-车辆进站,2-车辆到达指定位置,3-对中机构,4-取新电,5-拆旧电,6-装新电,7-放旧电,8-完成")
|
||||
VEHICLES_ENTER_STATION(1, "车辆进站"),
|
||||
|
||||
VEHICLE_POSITION(2, "车辆到达指定位置"),
|
||||
|
||||
INSTITUTIONS_FOR_CHINA(3, "对中机构"),
|
||||
|
||||
GET_NEW_ELECTRICITY(4, "取新电"),
|
||||
|
||||
DISMANTLE_OLD_ELECTRICITY(5, "拆旧电"),
|
||||
|
||||
INSTALL_NEW_ELECTRICITY(6, "装新电"),
|
||||
|
||||
DISCHARGE_OLD_ELECTRICITY(7, "放旧电"),
|
||||
|
||||
COMPLETED(8, "完成"),
|
||||
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
Integer code;
|
||||
|
||||
String name;
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
SwapBatteryStepEnum(Integer code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Integer getKey() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {return this.name;}
|
||||
}
|
||||
@ -45,7 +45,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* @DES 检查集合为空
|
||||
* @author andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @createDate 2020年12月25日下午2:14:43
|
||||
* @methodName Collections.isEmpty
|
||||
* @param list
|
||||
@ -59,7 +58,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* @DES 检查集合不为空
|
||||
* @author andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @createDate 2020年12月25日下午2:15:07
|
||||
* @methodName Collections.isNotEmpty
|
||||
* @param collection
|
||||
@ -73,7 +71,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* 将list进行分页
|
||||
* @author Andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @date 2020年9月15日上午9:37:07
|
||||
* @param <T> 泛型, 根据传入的对对象类型,返回类型
|
||||
* @param list 需要分组的集合
|
||||
@ -109,7 +106,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* 创建对象
|
||||
* @author Andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @date 2020年9月15日上午9:37:07
|
||||
* @param <T>
|
||||
* @return
|
||||
@ -121,7 +117,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* @DES 数组转对象
|
||||
* @author andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @createDate 2020年12月25日下午2:09:14
|
||||
* @methodName Collections.asList
|
||||
* @param objs
|
||||
@ -157,7 +152,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* 去除集合的重复项
|
||||
* @author Andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @date 2020年9月24日上午9:09:07
|
||||
* @param <T> 泛型,字段的类型, 如果是对象, 请重写hashCode() 和 equals()
|
||||
* @param list1 去重的集合1
|
||||
@ -172,7 +166,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* 去除集合的重复项
|
||||
* @author Andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @date 2020年9月24日上午9:13:09
|
||||
* @param <T> 泛型,字段的类型, 如果是对象, 请重写hashCode() 和 equals()
|
||||
* @param listArray 去重的集合数组
|
||||
@ -203,7 +196,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* 获取重复数据
|
||||
* @author Andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @date 2020年9月24日上午9:46:03
|
||||
* @param <T> 泛型,字段的类型, 如果是对象, 请重写hashCode() 和 equals()
|
||||
* @param list1 查重的集合1
|
||||
@ -217,7 +209,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* 获取重复数据
|
||||
* @author Andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @date 2020年9月24日上午9:44:30
|
||||
* @param <T> 泛型,字段的类型, 如果是对象, 请重写hashCode() 和 equals()
|
||||
* @param listArray 需要查重的集合数组
|
||||
@ -281,7 +272,6 @@ public class Collections implements Serializable{
|
||||
/**
|
||||
* @DES 组装map数据对象
|
||||
* @author andy.shi
|
||||
* @company 龙腾工作室
|
||||
* @createDate 2020年12月25日下午1:37:05
|
||||
* @methodName MapLists.createMap
|
||||
* @param args
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
package com.evotech.hd.common.core.utils;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Date;
|
||||
|
||||
public class CommonUtil {
|
||||
|
||||
@ -47,6 +50,19 @@ public class CommonUtil {
|
||||
return prefix + "1100";
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static BigDecimal yuanToFen(BigDecimal yuan){
|
||||
if(ObjectUtils.isEmpty(yuan)){
|
||||
return new BigDecimal(0);
|
||||
}
|
||||
return yuan.multiply(new BigDecimal(100));
|
||||
}
|
||||
|
||||
public static BigDecimal fenToYuan(BigDecimal yuan){
|
||||
if(ObjectUtils.isEmpty(yuan)){
|
||||
return new BigDecimal(0);
|
||||
}
|
||||
return yuan.divide(new BigDecimal(100), 2, RoundingMode.HALF_UP);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -18,6 +18,11 @@ public class MongoDBException extends Exception{
|
||||
super();
|
||||
}
|
||||
|
||||
public MongoDBException(Exception e) {
|
||||
super(e);
|
||||
log.error("mongodb 数据库存储异常============{}", e.getMessage());
|
||||
}
|
||||
|
||||
public MongoDBException(String message) {
|
||||
super(message);
|
||||
log.error("mongodb 数据库存储异常============{}", message);
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
package com.evotech.hd.common.redis.utils;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:RedisServiceUtils
|
||||
* @date: 2025年06月18日 14:43
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Service
|
||||
public class RedisServiceUtils {
|
||||
|
||||
private static RedisUtil redisUtil;
|
||||
|
||||
@Autowired
|
||||
public RedisServiceUtils(RedisUtil redisUtil){
|
||||
this.redisUtil = redisUtil;
|
||||
}
|
||||
|
||||
|
||||
public static boolean set(String key, Object value){
|
||||
return redisUtil.set(key, value);
|
||||
}
|
||||
|
||||
public static boolean set(String key, Object value, long time){
|
||||
return redisUtil.set(key, value, time);
|
||||
}
|
||||
|
||||
public static Object get(String key){
|
||||
return redisUtil.get(key);
|
||||
}
|
||||
|
||||
public static String getStr(String key){
|
||||
return redisUtil.getStringValue(key);
|
||||
}
|
||||
|
||||
public static void del(String... key){
|
||||
redisUtil.del(key);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,18 +1,17 @@
|
||||
package com.evotech.hd.common.web.exception;
|
||||
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.enums.CodeMsg;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.dao.DataIntegrityViolationException;
|
||||
import org.springframework.http.converter.HttpMessageNotReadableException;
|
||||
import org.springframework.validation.FieldError;
|
||||
import org.springframework.web.bind.MethodArgumentNotValidException;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.enums.CodeMsg;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 全局异常处理
|
||||
@ -36,7 +35,7 @@ public class GlobalExceptionHandler {
|
||||
@ExceptionHandler(value = NullPointerException.class)
|
||||
public Result<String> exceptionHandler(HttpServletRequest req, NullPointerException e) {
|
||||
log.error("\r\n===>>>空指针异常:", e);
|
||||
return new Result<String>().bussinessException(CodeMsg.ERROR.getCode(), e.getMessage(), null);
|
||||
return new Result<String>().businessException(CodeMsg.ERROR.getCode(), e.getMessage(), null);
|
||||
}
|
||||
|
||||
|
||||
@ -46,7 +45,7 @@ public class GlobalExceptionHandler {
|
||||
@ExceptionHandler(value = HttpMessageNotReadableException.class)
|
||||
public Result<String> exceptionHandler(HttpServletRequest req, HttpMessageNotReadableException e) {
|
||||
log.error("\r\n===>>>http请求参数解析异常:", e);
|
||||
return new Result<String>().bussinessException(CodeMsg.PARAM_ERROR.getCode(), "http请求参数解析异常", e.getMessage());
|
||||
return new Result<String>().businessException(CodeMsg.PARAM_ERROR.getCode(), "http请求参数解析异常", e.getMessage());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -57,7 +56,7 @@ public class GlobalExceptionHandler {
|
||||
@ExceptionHandler(value = MyArgumentException.class)
|
||||
public Result<String> exceptionHandler(HttpServletRequest req, MyArgumentException e) {
|
||||
log.error("\r\n===>>>请求参数异常:", e);
|
||||
return new Result<String>().bussinessException(CodeMsg.PARAM_ERROR.getCode(), CodeMsg.PARAM_ERROR.getMsg(), e.getParamArr());
|
||||
return new Result<String>().businessException(CodeMsg.PARAM_ERROR.getCode(), CodeMsg.PARAM_ERROR.getMsg(), String.join(",", e.getParamArr()));
|
||||
}
|
||||
|
||||
|
||||
@ -70,7 +69,7 @@ public class GlobalExceptionHandler {
|
||||
@ExceptionHandler(value = DataIntegrityViolationException.class)
|
||||
public Result<String> exceptionHandler(HttpServletRequest req, DataIntegrityViolationException e) {
|
||||
log.error("\r\n===>>>sql语句异常:", e);
|
||||
return new Result<String>().bussinessException(CodeMsg.SQL_RUN_ERROR.getCode(), e.getCause().toString(), null);
|
||||
return new Result<String>().businessException(CodeMsg.SQL_RUN_ERROR.getCode(), e.getCause().toString(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -80,7 +79,7 @@ public class GlobalExceptionHandler {
|
||||
public Result<String> exceptionHandler(HttpServletRequest req, MethodArgumentNotValidException e) {
|
||||
log.error("\r\n===>>>传参 自动检测出 错误:", e);
|
||||
String param = e.getBindingResult().getFieldErrors().stream().map(i -> i.getField()).collect(Collectors.joining(","));
|
||||
return new Result<String>().bussinessException(CodeMsg.PARAM_ERROR.getCode(), param, e.getBindingResult().getFieldErrors());
|
||||
return new Result<String>().businessException(CodeMsg.PARAM_ERROR.getCode(), param, e.getBindingResult().getFieldErrors().stream().map(FieldError::getField).collect(Collectors.joining()));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -91,7 +90,7 @@ public class GlobalExceptionHandler {
|
||||
@ExceptionHandler(value = Exception.class)
|
||||
public Result<String> exceptionHandler(HttpServletRequest req, Exception e) {
|
||||
log.error("\r\n===>>>捕获运行异常:", e);
|
||||
return new Result<String>().bussinessException(CodeMsg.ERROR.getCode(), e instanceof RuntimeException?e.getMessage():e.toString(), null);
|
||||
return new Result<String>().businessException(CodeMsg.ERROR.getCode(), e instanceof RuntimeException?e.getMessage():e.toString(), null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
package com.evotech.hd.common.web.util;
|
||||
|
||||
import com.evotech.hd.common.core.enums.BaseEnum;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 类
|
||||
* @ClassName:EnumUtils
|
||||
* @date: 2025年05月19日 15:30
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
|
||||
public class EnumUtils extends org.apache.commons.lang3.EnumUtils{
|
||||
|
||||
|
||||
public static <E extends BaseEnum<K,V>, K, V> E getEnumProperty(final Class<E> enumClass, final K k) {
|
||||
List<E> el = new ArrayList<>(Arrays.asList(enumClass.getEnumConstants()));
|
||||
for (E e: el){
|
||||
if(e.getKey().equals(k)){
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static <E extends BaseEnum<K,V>, K,V> V getEnumPropertyValue(final Class<E> enumClass, final K k) {
|
||||
List<E> el = new ArrayList<>(Arrays.asList(enumClass.getEnumConstants()));
|
||||
for (E e: el){
|
||||
if(e.getKey().equals(k)){
|
||||
return e.getValue();
|
||||
}
|
||||
}
|
||||
return (V)"未知属性";
|
||||
}
|
||||
}
|
||||
@ -1,29 +1,27 @@
|
||||
package com.evotech.hd.cloud.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.evotech.hd.cloud.service.BatteryStationCdStrategyService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationCdStrategy;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationCdStrategyDetail;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.evotech.hd.cloud.service.BatteryStationCdStrategyService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationCdStrategy;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationCdStrategyDetail;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "充电策略")
|
||||
@ApiSupport(order = 48)
|
||||
@RestController
|
||||
@RequestMapping("/batterystation/cd/strategy")
|
||||
@RequestMapping("/battery/station/cd/strategy")
|
||||
public class BatteryStationCdStrategyController {
|
||||
|
||||
@Resource
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.evotech.hd.cloud.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.evotech.hd.cloud.entity.request.PageListBatteryStationRequest;
|
||||
import com.evotech.hd.cloud.mqtt.message.handle.RequestMessageService;
|
||||
import com.evotech.hd.cloud.service.BatteryStationService;
|
||||
@ -25,7 +26,7 @@ import java.util.Map;
|
||||
@Tag(name = "换电站")
|
||||
@ApiSupport(order = 11)
|
||||
@RestController
|
||||
@RequestMapping("/batterystation")
|
||||
@RequestMapping("/battery/station")
|
||||
public class BatteryStationController {
|
||||
|
||||
@Resource
|
||||
@ -36,43 +37,36 @@ public class BatteryStationController {
|
||||
@Operation(summary = "增加")
|
||||
@PostMapping("/add")
|
||||
@ApiOperationSupport(order = 1)
|
||||
public com.evotech.hd.common.core.entity.Result<Integer> add(@Valid @ParameterObject BatteryStation bs) {
|
||||
public Result<Integer> add(@Valid @ParameterObject BatteryStation bs) {
|
||||
return batteryStationService.add(bs);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@PostMapping("/del")
|
||||
@ApiOperationSupport(order = 2)
|
||||
public com.evotech.hd.common.core.entity.Result<Integer> delete(Integer id) {
|
||||
public Result<Integer> delete(Integer id) {
|
||||
return batteryStationService.delete(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping({"/update"})
|
||||
@ApiOperationSupport(order = 3)
|
||||
public com.evotech.hd.common.core.entity.Result<Integer> update(@ParameterObject BatteryStation bs) {
|
||||
public Result<Integer> update(@ParameterObject BatteryStation bs) {
|
||||
return batteryStationService.update(bs);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询")
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 4)
|
||||
public com.evotech.hd.common.core.entity.Result<List<BatteryStation>> list(@ParameterObject PageListBatteryStationRequest plbsr) {
|
||||
public Result<Page<BatteryStation>> list(@ParameterObject PageListBatteryStationRequest plbsr) {
|
||||
return batteryStationService.list(plbsr);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询2")
|
||||
@GetMapping("/liststation")
|
||||
@Hidden
|
||||
public com.evotech.hd.common.core.entity.Result<List<BatteryStationVO>> listStation(@RequestParam(required = false) String plateNum) {
|
||||
return batteryStationService.listStation(plateNum);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Operation(summary = "站点秘钥")
|
||||
@PostMapping("/rsa_secret_key")
|
||||
@ApiOperationSupport(order = 5)
|
||||
public com.evotech.hd.common.core.entity.Result<Map<String, String>> RsaSecretKey(@NotBlank @RequestParam String stationCode) {
|
||||
public Result<Map<String, String>> RsaSecretKey(@NotBlank @RequestParam String stationCode) {
|
||||
return batteryStationService.RsaSecretKey(stationCode);
|
||||
}
|
||||
|
||||
@ -109,4 +103,12 @@ public class BatteryStationController {
|
||||
return batteryStationService.resourceList(pkIds);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "微信首页换电站地图信息")
|
||||
@GetMapping("/list/station")
|
||||
@Hidden
|
||||
public Result<List<BatteryStationVO>> listStation(@RequestParam(required = false) String longitudeAndLatitude, @RequestParam(required = false) String plateNum) {
|
||||
return batteryStationService.listStation(longitudeAndLatitude, plateNum);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,31 +1,30 @@
|
||||
package com.evotech.hd.cloud.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.evotech.hd.cloud.entity.request.PageListBatteryStationDcRequest;
|
||||
import com.evotech.hd.cloud.service.BatteryStationDcService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationDc;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryTrace;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.evotech.hd.cloud.entity.request.PageListBatteryStationDcRequest;
|
||||
import com.evotech.hd.cloud.service.BatteryStationDcService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationDc;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryTrace;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "换电站电池")
|
||||
@ApiSupport(order = 12)
|
||||
@RestController
|
||||
@RequestMapping("/batterystation/dc")
|
||||
@RequestMapping("/battery/station/dc")
|
||||
public class BatteryStationDcController {
|
||||
|
||||
|
||||
@ -56,7 +55,7 @@ public class BatteryStationDcController {
|
||||
@Operation(summary = "查询")
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 4)
|
||||
public Result<List<BatteryStationDc>> list(@ParameterObject PageListBatteryStationDcRequest plbsdcr) {
|
||||
public Result<Page<BatteryStationDc>> list(@ParameterObject PageListBatteryStationDcRequest plbsdcr) {
|
||||
return batteryStationDcService.list(plbsdcr);
|
||||
}
|
||||
|
||||
|
||||
@ -1,29 +1,26 @@
|
||||
package com.evotech.hd.cloud.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.evotech.hd.cloud.entity.request.PageListBatteryStationDccRequest;
|
||||
import com.evotech.hd.cloud.service.BatteryStationDccService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationDcc;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.evotech.hd.cloud.entity.request.PageListBatteryStationDccRequest;
|
||||
import com.evotech.hd.cloud.service.BatteryStationDccService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationDcc;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@Tag(name = "换电站电池仓")
|
||||
@ApiSupport(order = 13)
|
||||
@RestController
|
||||
@RequestMapping("/batterystation/dcc")
|
||||
@RequestMapping("/battery/station/dcc")
|
||||
public class BatteryStationDccController {
|
||||
|
||||
|
||||
@ -54,7 +51,7 @@ public class BatteryStationDccController {
|
||||
@Operation(summary = "查询")
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 4)
|
||||
public Result<List<BatteryStationDcc>> list(@ParameterObject PageListBatteryStationDccRequest plbsDccr) {
|
||||
public Result<Page<BatteryStationDcc>> list(@ParameterObject PageListBatteryStationDccRequest plbsDccr) {
|
||||
return batteryStationDccService.list(plbsDccr);
|
||||
}
|
||||
|
||||
|
||||
@ -1,29 +1,26 @@
|
||||
package com.evotech.hd.cloud.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.evotech.hd.cloud.entity.request.PageListBatteryStationDjRequest;
|
||||
import com.evotech.hd.cloud.service.BatteryStationDjService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationDj;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.evotech.hd.cloud.entity.request.PageListBatteryStationDjRequest;
|
||||
import com.evotech.hd.cloud.service.BatteryStationDjService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationDj;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@Tag(name = "换电站电机")
|
||||
@ApiSupport(order = 14)
|
||||
@RestController
|
||||
@RequestMapping("/batterystation/dj")
|
||||
@RequestMapping("/battery/station/dj")
|
||||
public class BatteryStationDjController {
|
||||
|
||||
|
||||
@ -54,7 +51,7 @@ public class BatteryStationDjController {
|
||||
@Operation(summary = "查询")
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 4)
|
||||
public Result<List<BatteryStationDj>> list(@ParameterObject PageListBatteryStationDjRequest plbsdjr) {
|
||||
public Result<Page<BatteryStationDj>> list(@ParameterObject PageListBatteryStationDjRequest plbsdjr) {
|
||||
return batteryStationDjService.list(plbsdjr);
|
||||
}
|
||||
|
||||
|
||||
@ -1,28 +1,26 @@
|
||||
package com.evotech.hd.cloud.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.evotech.hd.cloud.service.BatteryStationHdFeeStandardService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationHdFeeStandard;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.evotech.hd.cloud.service.BatteryStationHdFeeStandardService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationHdFeeStandard;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "换电站费用标准")
|
||||
@ApiSupport(order = 16)
|
||||
@RestController
|
||||
@RequestMapping("/batterystation/fee")
|
||||
@RequestMapping("/battery/station/fee")
|
||||
public class BatteryStationHdFeeStandardController {
|
||||
|
||||
|
||||
|
||||
@ -1,28 +1,26 @@
|
||||
package com.evotech.hd.cloud.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.evotech.hd.cloud.service.BatteryStationHdFeeStandardDetailService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationHdFeeStandardDetail;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.evotech.hd.cloud.service.BatteryStationHdFeeStandardDetailService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationHdFeeStandardDetail;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "换电站费用标准明细")
|
||||
@ApiSupport(order = 17)
|
||||
@RestController
|
||||
@RequestMapping("/batterystation/fee/detail")
|
||||
@RequestMapping("/battery/station/fee/detail")
|
||||
public class BatteryStationHdFeeStandardDetailController {
|
||||
|
||||
|
||||
|
||||
@ -1,29 +1,27 @@
|
||||
package com.evotech.hd.cloud.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.evotech.hd.cloud.service.BatteryStationRobotService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationRobot;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.evotech.hd.cloud.service.BatteryStationRobotService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStationRobot;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "换电站机器人")
|
||||
@ApiSupport(order = 15)
|
||||
@RestController
|
||||
@RequestMapping("/batterystation/robot")
|
||||
@RequestMapping("/battery/station/robot")
|
||||
public class BatteryStationRobotController {
|
||||
|
||||
|
||||
|
||||
@ -148,10 +148,10 @@ public class HomeController {
|
||||
// return homeService.homeData7(type);
|
||||
// }
|
||||
|
||||
|
||||
@Operation(hidden = true)
|
||||
@GetMapping("/login/data")
|
||||
public void loginData() {
|
||||
homeService.loginData();
|
||||
}
|
||||
//
|
||||
// @Operation(hidden = true)
|
||||
// @GetMapping("/login/data")
|
||||
// public void loginData() {
|
||||
// homeService.loginData();
|
||||
// }
|
||||
}
|
||||
|
||||
@ -1,23 +1,20 @@
|
||||
package com.evotech.hd.cloud.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.evotech.hd.cloud.entity.MessageMqtt;
|
||||
import com.evotech.hd.cloud.entity.request.PageListMessageMqttRequest;
|
||||
import com.evotech.hd.cloud.service.MessageMqttService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.evotech.hd.cloud.entity.MessageMqtt;
|
||||
import com.evotech.hd.cloud.entity.request.PageListMessageMqttRequest;
|
||||
import com.evotech.hd.cloud.service.MessageMqttService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
@Tag(name = "MQTT消息")
|
||||
@ApiSupport(order = 9)
|
||||
@RestController
|
||||
@ -32,7 +29,7 @@ public class MessageMqttController {
|
||||
@Operation(summary = "查询")
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 1)
|
||||
public Result<List<MessageMqtt>> list(@ParameterObject PageListMessageMqttRequest plmmr) {
|
||||
public Result<Page<MessageMqtt>> list(@ParameterObject PageListMessageMqttRequest plmmr) {
|
||||
return messageMqttService.list(plmmr);
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.evotech.hd.cloud.controller.customer;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.evotech.hd.cloud.service.CompanyService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.entity.BasePageRequest;
|
||||
@ -31,33 +32,33 @@ public class CompanyController {
|
||||
@Operation(summary = "增加")
|
||||
@PostMapping("/add")
|
||||
@ApiOperationSupport(order = 1)
|
||||
public com.evotech.hd.common.core.entity.Result<Integer> add(@Valid @ParameterObject Company company) {
|
||||
public Result<Integer> add(@Valid @ParameterObject Company company) {
|
||||
return companyService.add(company);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@PostMapping("/del")
|
||||
@ApiOperationSupport(order = 2)
|
||||
public com.evotech.hd.common.core.entity.Result<Integer> delete(@NotNull Integer id) {
|
||||
public Result<Integer> delete(@NotNull Integer id) {
|
||||
return companyService.delete(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping({"/update"})
|
||||
@ApiOperationSupport(order = 3)
|
||||
public com.evotech.hd.common.core.entity.Result<Integer> update(@ParameterObject Company company) {
|
||||
public Result<Integer> update(@ParameterObject Company company) {
|
||||
return companyService.update(company);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询")
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 4)
|
||||
public com.evotech.hd.common.core.entity.Result<List<Company>> list(@Valid @ParameterObject BasePageRequest bpr) {
|
||||
public Result<Page<Company>> list(@Valid @ParameterObject BasePageRequest bpr) {
|
||||
return companyService.list(bpr);
|
||||
}
|
||||
|
||||
@GetMapping("/companyByCode")
|
||||
public com.evotech.hd.common.core.entity.Result<Map<String, String>> companyByCode(String ccode) {
|
||||
public Result<Map<String, String>> companyByCode(String ccode) {
|
||||
return companyService.companyByCode(ccode);
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.evotech.hd.cloud.controller.customer;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.evotech.hd.cloud.entity.request.PageListVehicleRequest;
|
||||
import com.evotech.hd.cloud.service.VehicleService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
@ -33,49 +34,49 @@ public class VehicleController {
|
||||
@Operation(summary = "增加")
|
||||
@PostMapping("/add")
|
||||
@ApiOperationSupport(order = 1)
|
||||
public com.evotech.hd.common.core.entity.Result<Integer> add(@Valid @ParameterObject VehicleInfo vi) {
|
||||
public Result<Integer> add(@Valid @ParameterObject VehicleInfo vi) {
|
||||
return vehicleService.add(vi);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@PostMapping("/del")
|
||||
@ApiOperationSupport(order = 2)
|
||||
public com.evotech.hd.common.core.entity.Result<Integer> delete(Integer id) {
|
||||
public Result<Integer> delete(Integer id) {
|
||||
return vehicleService.delete(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping({"/update"})
|
||||
@ApiOperationSupport(order = 3)
|
||||
public com.evotech.hd.common.core.entity.Result<Integer> update(@ParameterObject VehicleInfo vi) {
|
||||
public Result<Integer> update(@ParameterObject VehicleInfo vi) {
|
||||
return vehicleService.update(vi);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询")
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 4)
|
||||
public com.evotech.hd.common.core.entity.Result<List<VehicleInfo>> list(@ParameterObject PageListVehicleRequest plvr) {
|
||||
public Result<Page<VehicleInfo>> list(@ParameterObject PageListVehicleRequest plvr) {
|
||||
return vehicleService.list(plvr);
|
||||
}
|
||||
|
||||
@Operation(summary = "关联公司")
|
||||
@PostMapping("/company/relation")
|
||||
@ApiOperationSupport(order = 5)
|
||||
public com.evotech.hd.common.core.entity.Result<Integer> companyRelation(String plateNum, String ccode, String cname) {
|
||||
public Result<Integer> companyRelation(String plateNum, String ccode, String cname) {
|
||||
return vehicleService.companyRelation(plateNum, ccode, cname);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除关联公司")
|
||||
@PostMapping("/company/relation/del")
|
||||
@ApiOperationSupport(order = 6)
|
||||
public com.evotech.hd.common.core.entity.Result<Integer> delCompanyRelation(String plateNum) {
|
||||
public Result<Integer> delCompanyRelation(String plateNum) {
|
||||
return vehicleService.delCompanyRelation(plateNum);
|
||||
}
|
||||
|
||||
@Operation(summary = "微信用户关联")
|
||||
@PostMapping("/wechatuser/relation/add")
|
||||
@ApiOperationSupport(order = 7)
|
||||
public com.evotech.hd.common.core.entity.Result<Integer> addWechatUserRelation(@Valid @ParameterObject VehicleWechatUserRelation relation) {
|
||||
public Result<Integer> addWechatUserRelation(@Valid @ParameterObject VehicleWechatUserRelation relation) {
|
||||
return vehicleService.addWechatUserRelation(relation);
|
||||
}
|
||||
|
||||
@ -83,7 +84,7 @@ public class VehicleController {
|
||||
@Operation(summary = "删除微信用户关联")
|
||||
@PostMapping("/wechatuser/relation/del")
|
||||
@ApiOperationSupport(order = 8)
|
||||
public com.evotech.hd.common.core.entity.Result<Integer> deleteWechatUserRelation(Integer id) {
|
||||
public Result<Integer> deleteWechatUserRelation(Integer id) {
|
||||
return vehicleService.deleteWechatUserRelation(id);
|
||||
}
|
||||
|
||||
@ -91,14 +92,14 @@ public class VehicleController {
|
||||
@Operation(summary = "查询微信用户车辆")
|
||||
@GetMapping("/wechatuser/relation/list")
|
||||
@ApiOperationSupport(order = 9)
|
||||
public com.evotech.hd.common.core.entity.Result<List<VehicleInfo>> listWechatUserRelation(@NotBlank @RequestParam String wuid) {
|
||||
public Result<List<VehicleInfo>> listWechatUserRelation(@NotBlank @RequestParam String wuid) {
|
||||
return vehicleService.listWechatUserRelation(wuid, null);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询车辆的关联用户")
|
||||
@GetMapping("/relationuser/list")
|
||||
@ApiOperationSupport(order = 10)
|
||||
public com.evotech.hd.common.core.entity.Result<List<VehicleWechatUserRelation>> listRelationUser(@NotBlank @RequestParam String PlantNo) {
|
||||
public Result<List<VehicleWechatUserRelation>> listRelationUser(@NotBlank @RequestParam String PlantNo) {
|
||||
return vehicleService.listRelationUser(PlantNo);
|
||||
}
|
||||
|
||||
|
||||
@ -1,23 +1,20 @@
|
||||
package com.evotech.hd.cloud.controller.customer;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.evotech.hd.cloud.entity.request.PageListWechatUserRequest;
|
||||
import com.evotech.hd.cloud.service.WechatUserService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.entity.wechat.WechatUser;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.evotech.hd.cloud.entity.request.PageListWechatUserRequest;
|
||||
import com.evotech.hd.cloud.service.WechatUserService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.entity.wechat.WechatUser;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
@Tag(name = "微信用户")
|
||||
@RestController
|
||||
@RequestMapping("/wechat/user")
|
||||
@ -30,7 +27,7 @@ public class WechatUserController {
|
||||
|
||||
@Operation(summary = "查询")
|
||||
@GetMapping("/list")
|
||||
public Result<List<WechatUser>> list(@ParameterObject PageListWechatUserRequest plwur) {
|
||||
public Result<Page<WechatUser>> list(@ParameterObject PageListWechatUserRequest plwur) {
|
||||
return wechatUserService.list(plwur);
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ package com.evotech.hd.cloud.controller.dh;
|
||||
|
||||
import com.evotech.hd.cloud.service.DHDeviceService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.Dto.DeviceDto;
|
||||
import com.evotech.hd.common.core.Dto.device.DeviceDto;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
@ -0,0 +1,63 @@
|
||||
package com.evotech.hd.cloud.controller.order;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.evotech.hd.cloud.service.OrderSwapBatteryPreService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.OrderSwapBatteryPre;
|
||||
import com.evotech.hd.common.core.entity.cloud.request.PageListSwapOrderPreRequest;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.text.ParseException;
|
||||
|
||||
/**
|
||||
* 预约订单管理类
|
||||
* @ClassName:OrderPerController
|
||||
* @date: 2025年05月16日 13:51
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Tag(name = "预约订单")
|
||||
@ApiSupport(order = 22)
|
||||
@RestController
|
||||
@RequestMapping("/order/per")
|
||||
public class OrderPerController {
|
||||
|
||||
@Resource
|
||||
OrderSwapBatteryPreService orderSwapBatteryPreService;
|
||||
|
||||
@Operation(summary = "查询预约")
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 3)
|
||||
public Result<Page<OrderSwapBatteryPre>> listPre(@ParameterObject PageListSwapOrderPreRequest plsopr) throws ParseException {
|
||||
return orderSwapBatteryPreService.list(plsopr);
|
||||
}
|
||||
|
||||
@Operation(summary = "增加预约")
|
||||
@PostMapping("/add")
|
||||
@ApiOperationSupport(order = 1)
|
||||
public Result<Boolean> addPre(@Valid @ParameterObject OrderSwapBatteryPre osbp) {
|
||||
return orderSwapBatteryPreService.addOrderSwapBatteryPre(osbp);
|
||||
}
|
||||
|
||||
@Operation(summary = "取消预约")
|
||||
@PostMapping("/cancel")
|
||||
@ApiOperationSupport(order = 2)
|
||||
public Result<Integer> cancelPre(@NotNull Integer id) {
|
||||
return orderSwapBatteryPreService.cancelPre(id, 3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,24 +1,20 @@
|
||||
package com.evotech.hd.cloud.controller.order;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.evotech.hd.cloud.entity.request.PageListRechargeOrderRequest;
|
||||
import com.evotech.hd.cloud.service.OrderRechargeService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.OrderRecharge;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.entity.order.OrderRecharge;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Tag(name = "充值订单")
|
||||
@ -57,8 +53,17 @@ public class OrderRechargeController {
|
||||
@Operation(summary = "查询")
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 4)
|
||||
public Result<List<OrderRecharge>> list(@ParameterObject PageListRechargeOrderRequest plror) {
|
||||
public Result<Page<OrderRecharge>> list(@ParameterObject PageListRechargeOrderRequest plror) {
|
||||
return orderRechargeService.list(plror);
|
||||
}
|
||||
|
||||
/***
|
||||
* 待退款订单查询
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/refund/list")
|
||||
public Result<List<OrderRecharge>> refundList(@RequestParam String wechatId) {
|
||||
return orderRechargeService.refundList(wechatId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,43 @@
|
||||
package com.evotech.hd.cloud.controller.order;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.evotech.hd.cloud.service.OrderRefundService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.entity.order.OrderRefund;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 订单退款类
|
||||
*
|
||||
* @ClassName:OrderRefundController
|
||||
* @date: 2025年06月30日 14:20
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/order/refund")
|
||||
public class OrderRefundController {
|
||||
|
||||
@Resource
|
||||
private OrderRefundService orderRefundService;
|
||||
|
||||
@Operation(summary = "增加")
|
||||
@PostMapping("/addAll")
|
||||
public Result<Boolean> addAll(@RequestParam String listJson) {
|
||||
return orderRefundService.addAll(JSONUtil.toList(listJson, OrderRefund.class));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询")
|
||||
@PostMapping("/orderNo")
|
||||
public Result<OrderRefund> orderNoOne(@RequestParam String orderNo) {
|
||||
return orderRefundService.orderNoOne(orderNo);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,27 +1,25 @@
|
||||
package com.evotech.hd.cloud.controller.order;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.evotech.hd.cloud.entity.vo.NativePayVO;
|
||||
import com.evotech.hd.cloud.service.OrderSwapBatteryService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.OrderSwapBattery;
|
||||
import com.evotech.hd.common.core.entity.cloud.OrderSwapBatteryPre;
|
||||
import com.evotech.hd.cloud.service.OrderService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.Dto.order.OrderListVo;
|
||||
import com.evotech.hd.common.core.entity.cloud.OrderSwapBatteryStep;
|
||||
import com.evotech.hd.common.core.entity.cloud.request.BatterySwapResponse;
|
||||
import com.evotech.hd.common.core.entity.cloud.request.PageListSwapOrderPreRequest;
|
||||
import com.evotech.hd.common.core.entity.cloud.request.PageListSwapOrderRequest;
|
||||
import com.evotech.hd.common.core.entity.order.Order;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "换电订单")
|
||||
@ -29,94 +27,63 @@ import java.util.List;
|
||||
@RestController
|
||||
@RequestMapping("/order/swap")
|
||||
public class OrderSwapBatteryController {
|
||||
|
||||
|
||||
@Resource
|
||||
private OrderSwapBatteryService orderSwapBatteryService;
|
||||
|
||||
|
||||
@Operation(summary = "增加预约")
|
||||
@PostMapping("/pre/add")
|
||||
@ApiOperationSupport(order = 1)
|
||||
public Result<Integer> addPre(@Valid @ParameterObject OrderSwapBatteryPre osbp) {
|
||||
return orderSwapBatteryService.addPre(osbp);
|
||||
}
|
||||
|
||||
@Operation(summary = "取消预约")
|
||||
@PostMapping("/pre/cancel")
|
||||
@ApiOperationSupport(order = 2)
|
||||
public Result<Integer> cancelPre(@NotNull Integer id) {
|
||||
return orderSwapBatteryService.cancelPre(id, null);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询预约")
|
||||
@GetMapping("/pre/list")
|
||||
@ApiOperationSupport(order = 3)
|
||||
public Result<List<OrderSwapBatteryPre>> listPre(@ParameterObject PageListSwapOrderPreRequest plsopr) throws ParseException {
|
||||
return orderSwapBatteryService.listPre(plsopr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Operation(summary = "增加")
|
||||
@PostMapping("/add")
|
||||
@ApiOperationSupport(order = 4)
|
||||
public Result<Integer> add(@Valid @ParameterObject OrderSwapBattery osb) {
|
||||
return orderSwapBatteryService.add(osb);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@PostMapping("/del")
|
||||
@ApiOperationSupport(order = 5)
|
||||
public Result<Integer> delete(Integer id) {
|
||||
return orderSwapBatteryService.delete(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping({"/update"})
|
||||
@ApiOperationSupport(order = 6)
|
||||
public Result<Integer> update(@ParameterObject OrderSwapBattery osb) {
|
||||
return orderSwapBatteryService.update(osb);
|
||||
}
|
||||
|
||||
private OrderService orderService;
|
||||
|
||||
@Operation(summary = "查询")
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 7)
|
||||
public Result<List<OrderSwapBattery>> list(@ParameterObject PageListSwapOrderRequest plsor) {
|
||||
return orderSwapBatteryService.list(plsor);
|
||||
public Result<Page<OrderListVo>> list(@ParameterObject PageListSwapOrderRequest plsor) {
|
||||
return orderService.pageList(plsor);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "查询换电步骤")
|
||||
@GetMapping("/step/list")
|
||||
@ApiOperationSupport(order = 9)
|
||||
public Result<List<OrderSwapBatteryStep>> listStep(@NotBlank String orderNo) {
|
||||
return orderService.listStep(orderNo);
|
||||
}
|
||||
|
||||
@Operation(summary = "个人账户余额支付")
|
||||
@PostMapping({"/one"})
|
||||
@ApiOperationSupport(order = 11)
|
||||
public Result<Order> one(@RequestParam String orderNo) {
|
||||
return orderService.one(orderNo);
|
||||
}
|
||||
|
||||
@Operation(summary = "个人账户余额支付")
|
||||
@PostMapping({"/wallet/pay"})
|
||||
@ApiOperationSupport(order = 11)
|
||||
public Result<String> walletPay(@RequestParam String orderNo, String wuid, String uname) {
|
||||
return orderService.walletPay(orderNo, wuid, uname);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Operation(summary = "查询公司订单")
|
||||
@GetMapping("/listcompanyorder")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Hidden
|
||||
@Deprecated
|
||||
public Result<List<OrderSwapBattery>> listByCompany(@ParameterObject PageListSwapOrderRequest plsor) {
|
||||
return orderSwapBatteryService.listByCompany(plsor);
|
||||
public Result<List<Order>> listByCompany(@ParameterObject PageListSwapOrderRequest plsor) {
|
||||
return orderService.listByCompany(plsor);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询换电步骤")
|
||||
@GetMapping("/step/list")
|
||||
@ApiOperationSupport(order = 9)
|
||||
public Result<List<OrderSwapBatteryStep>> listStep(@NotBlank String orderNo) {
|
||||
return orderSwapBatteryService.listStep(orderNo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Operation(summary = "费用计算")
|
||||
@PostMapping({"/cost"})
|
||||
@ApiOperationSupport(order = 9)
|
||||
public Result<String> calculateCost(@NotBlank @RequestParam OrderSwapBattery osb) {
|
||||
return orderSwapBatteryService.calculateCost(osb);
|
||||
public Result<String> calculateCost(@NotBlank @RequestParam Order osb) {
|
||||
return orderService.calculateCost(osb);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "个人账户余额支付")
|
||||
@PostMapping({"/wallet/pay"})
|
||||
@ApiOperationSupport(order = 11)
|
||||
public Result<String> walletPay(@RequestParam String orderNo, String wuid, String uname) {
|
||||
return orderSwapBatteryService.walletPay(orderNo, wuid, uname);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Operation(summary = "公司订单余额支付")
|
||||
@PostMapping({"/companywallet/pay"})
|
||||
@ApiOperationSupport(order = 12)
|
||||
@ -124,46 +91,46 @@ public class OrderSwapBatteryController {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Operation(summary = "公司订单扫码支付")
|
||||
@PostMapping({"/wechat/nativepay"})
|
||||
@ApiOperationSupport(order = 13)
|
||||
public Result<String> companyNativePay(@RequestBody NativePayVO prePay) {
|
||||
return orderSwapBatteryService.companyNativePay(prePay);
|
||||
return orderService.companyNativePay(prePay);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "扫码支付订单查询状态")
|
||||
@GetMapping("/paystatus/query")
|
||||
@ApiOperationSupport(order = 14)
|
||||
public Result<String> orderQuery(String outTradeNo) {
|
||||
return orderSwapBatteryService.orderQuery(outTradeNo);
|
||||
return orderService.orderQuery(outTradeNo);
|
||||
}
|
||||
|
||||
@Operation(summary = "站端取消订单")
|
||||
@PostMapping("/pre/cancelOrder")
|
||||
@ApiOperationSupport(order = 15)
|
||||
public Result<Integer> cancelOrder(@NotNull String orderNo) {
|
||||
return orderSwapBatteryService.cancelOrder(orderNo, null);
|
||||
return orderService.cancelOrder(orderNo, null);
|
||||
}
|
||||
@Operation(summary = "开始换电")
|
||||
@PostMapping("/startSwap")
|
||||
@ApiOperationSupport(order = 16)
|
||||
public Result<Boolean> startSwap(@RequestParam String wuid,String orderId) {
|
||||
return orderSwapBatteryService.startSwap(wuid,orderId);
|
||||
public Result<Boolean> startSwap(@RequestParam String wuid,String orderNo) {
|
||||
return orderService.startSwap(wuid,orderNo);
|
||||
}
|
||||
@Operation(summary = "获取开始换电回复")
|
||||
@PostMapping("/getStartSwap")
|
||||
@ApiOperationSupport(order = 17)
|
||||
public Result<BatterySwapResponse> getStartSwap(@RequestParam String wuid, String orderId) {
|
||||
return orderSwapBatteryService.getStartSwap(wuid,orderId);
|
||||
return orderService.getStartSwap(wuid,orderId);
|
||||
}
|
||||
|
||||
@Operation(summary = "未完成订单查询:plateNum")
|
||||
@GetMapping("/checkList")
|
||||
@ApiOperationSupport(order = 18)
|
||||
public Result<Integer> checkList(@ParameterObject PageListSwapOrderRequest plsor) {
|
||||
return orderSwapBatteryService.checkList(plsor);
|
||||
return orderService.checkList(plsor);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,26 +1,22 @@
|
||||
package com.evotech.hd.cloud.controller.order;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.evotech.hd.common.core.entity.cloud.request.PrePayRequest;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.evotech.hd.cloud.entity.request.PageListTradeRequest;
|
||||
import com.evotech.hd.cloud.service.TradeService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.TradeDetail;
|
||||
import com.evotech.hd.common.core.entity.cloud.request.PrePayRequest;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Tag(name = "交易详情")
|
||||
@ -58,7 +54,7 @@ public class TradeController {
|
||||
@Operation(summary = "查询")
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 4)
|
||||
public Result<List<TradeDetail>> list(@ParameterObject PageListTradeRequest pltr) {
|
||||
public Result<Page<TradeDetail>> list(@ParameterObject PageListTradeRequest pltr) {
|
||||
return tradeService.list(pltr);
|
||||
}
|
||||
|
||||
@ -67,7 +63,6 @@ public class TradeController {
|
||||
@PostMapping({"/wechatpay/notify"})
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Hidden
|
||||
|
||||
public Result<String> wechatPayNotifyHandle(@ParameterObject TradeDetail tradeDetail) {
|
||||
return tradeService.wechatPayNotifyHandle(tradeDetail);
|
||||
}
|
||||
|
||||
@ -1,26 +1,22 @@
|
||||
package com.evotech.hd.cloud.controller.order;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.evotech.hd.common.core.entity.cloud.vo.WalletAccountVO;
|
||||
import com.evotech.hd.common.core.entity.wechat.WechatPayAttach;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.evotech.hd.cloud.service.WalletAccountService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.WalletAccount;
|
||||
import com.evotech.hd.common.core.entity.cloud.WalletAccountDetail;
|
||||
import com.evotech.hd.common.core.entity.cloud.request.PageListWalletRequest;
|
||||
import com.evotech.hd.common.core.entity.cloud.vo.WalletAccountVO;
|
||||
import com.evotech.hd.common.core.entity.wechat.WechatPayAttach;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
||||
@Tag(name = "资金账户管理")
|
||||
@ -57,7 +53,7 @@ public class WalletAccountController {
|
||||
@Operation(summary = "查询")
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 4)
|
||||
public Result<List<WalletAccountVO>> list(@ParameterObject PageListWalletRequest plwr) {
|
||||
public Result<Page<WalletAccountVO>> list(@ParameterObject PageListWalletRequest plwr) {
|
||||
return walletAccountService.list(plwr);
|
||||
}
|
||||
|
||||
@ -77,12 +73,7 @@ public class WalletAccountController {
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "查询明细")
|
||||
@GetMapping("/detail/list")
|
||||
@ApiOperationSupport(order = 7)
|
||||
public Result<List<WalletAccountDetail>> listDetail(@ParameterObject PageListWalletRequest plwr) {
|
||||
return walletAccountService.listDetail(plwr);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询是否开通微信钱包")
|
||||
@PostMapping("/isOpenAccount")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@ -101,12 +92,15 @@ public class WalletAccountController {
|
||||
public Result<WechatPayAttach> getPayAttach(String wuid) {
|
||||
return walletAccountService.getPayAttach(wuid);
|
||||
}
|
||||
@Operation(summary = "更新账户姓名")
|
||||
@PostMapping({"/updateName"})
|
||||
@ApiOperationSupport(order = 11)
|
||||
public Result<Integer> updateName(@ParameterObject WalletAccount wa) {
|
||||
return walletAccountService.updateName(wa);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Operation(summary = "获取钱包对象")
|
||||
@PostMapping("/getDetailById")
|
||||
@ -114,4 +108,26 @@ public class WalletAccountController {
|
||||
public WalletAccount getDetailById(@NotBlank @RequestParam String outTradeNo) {
|
||||
return walletAccountService.getDetailById(outTradeNo);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/wechatId")
|
||||
public com.evotech.hd.common.core.Dto.Result<WalletAccount> getWalletAccountByWechatId(@NotBlank @RequestParam String wechatId) {
|
||||
return walletAccountService.getWalletAccountByWechatId(wechatId);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新账户信息")
|
||||
@PostMapping({"/update/wechat"})
|
||||
@ApiOperationSupport(order = 11)
|
||||
public com.evotech.hd.common.core.Dto.Result<Integer> updateWechat(@ParameterObject WalletAccount wa) {
|
||||
return walletAccountService.updateWechat(wa);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询账户明细")
|
||||
@GetMapping("/detail/list")
|
||||
@ApiOperationSupport(order = 7)
|
||||
public com.evotech.hd.common.core.Dto.Result<Page<WalletAccountDetail>> listDetail(@ParameterObject PageListWalletRequest plwr) {
|
||||
return walletAccountService.listDetail(plwr);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,19 +1,17 @@
|
||||
package com.evotech.hd.cloud.controller.test;
|
||||
|
||||
import com.evotech.hd.cloud.service.HomeDataManualCollateService;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.evotech.hd.cloud.service.HomeDataManualCollateService;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
@Tag(name = "首页数据手动整理中间表")
|
||||
@ApiSupport(order = 701)
|
||||
@RestController
|
||||
|
||||
@ -1,12 +1,9 @@
|
||||
package com.evotech.hd.cloud.controller.test;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.evotech.hd.cloud.controller.test.service.MqttTestUtil;
|
||||
import com.evotech.hd.cloud.mqtt.enums.MqttMessageTypeEnum;
|
||||
import com.evotech.hd.cloud.mqtt.enums.RequestFunctionTypesEnum;
|
||||
@ -16,17 +13,18 @@ import com.evotech.hd.cloud.mqtt.message.dto.newer.req.order.OrderByPlateNumReq;
|
||||
import com.evotech.hd.cloud.mqtt.message.dto.newer.state.OrderStatus;
|
||||
import com.evotech.hd.cloud.mqtt.message.dto.newer.state.OrderStatusData;
|
||||
import com.evotech.hd.cloud.mqtt.message.dto.newer.state.SwapStep;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Tag(name = "Mqtt消息测试")
|
||||
@ApiSupport(order = 700)
|
||||
|
||||
@ -5,8 +5,6 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.evotech.hd.cloud.dao.BatteryStationDao;
|
||||
import com.evotech.hd.cloud.dao.OrderSwapBatteryPreDao;
|
||||
import com.evotech.hd.cloud.dao.VehicleWechatUserRelationDao;
|
||||
@ -15,11 +13,9 @@ import com.evotech.hd.cloud.mqtt.message.MessageTopic;
|
||||
import com.evotech.hd.cloud.mqtt.message.MqttMessageHeader;
|
||||
import com.evotech.hd.cloud.mqtt.message.processor.strategy.MqttStrategyExchangeProcessor;
|
||||
import com.evotech.hd.cloud.mqtt.message.processor.strategy.impl.state.MqttStateChargingDataExchangeProcessor;
|
||||
import com.evotech.hd.cloud.service.TradeService;
|
||||
import com.evotech.hd.cloud.utils.components.SwapOrderBasicFeeComponent;
|
||||
import com.evotech.hd.common.core.entity.Result;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStation;
|
||||
import com.evotech.hd.common.core.entity.cloud.OrderSwapBattery;
|
||||
import com.evotech.hd.common.core.entity.cloud.OrderSwapBatteryPre;
|
||||
import com.evotech.hd.common.core.Dto.Result;
|
||||
import com.evotech.hd.common.core.utils.Collections;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -27,7 +23,6 @@ import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -53,8 +48,8 @@ public class TestController {
|
||||
MqttStateChargingDataExchangeProcessor mqttStateChargingDataRequestExchangeProcessor;
|
||||
@Autowired
|
||||
private ApplicationContext applicationContext;
|
||||
// @Resource
|
||||
// VehicleService vehicleService;
|
||||
@Resource
|
||||
TradeService tradeService;
|
||||
// @Resource
|
||||
// MongoDBService mongoDBService;
|
||||
|
||||
@ -91,46 +86,55 @@ public class TestController {
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/trade/{tradeId}")
|
||||
public Result trade(@PathVariable(value = "tradeId") String tradeId) {
|
||||
|
||||
@GetMapping("/station")
|
||||
public Result list() {
|
||||
System.out.println("======>>开始......");
|
||||
BatteryStation station = batteryStationDao.selectOne(new LambdaQueryWrapper<BatteryStation>().eq(BatteryStation::getCode,"FD12795455"));
|
||||
// 查这天,这个站的预约
|
||||
List<OrderSwapBatteryPre> orderPreList = orderSwapBatteryPreDao.selectList(new QueryWrapper<OrderSwapBatteryPre>().eq("station_code", station.getCode()).eq("status", 1).eq("ucode","e2fb21b6447e10006f19a23e06b67914"));
|
||||
// 根据预约生成订单
|
||||
if (orderPreList.isEmpty()) {
|
||||
System.out.println("没有预约单");
|
||||
}
|
||||
OrderSwapBatteryPre orderPre = orderPreList.get(0);
|
||||
OrderSwapBattery order = new OrderSwapBattery();
|
||||
order.setOrderType(1);
|
||||
order.setCtime(new Date());
|
||||
order.setCreater("TEST");
|
||||
order.setOrderPreId(orderPre.getPkId());
|
||||
order.setOrderPreUid(orderPre.getUcode());
|
||||
order.setOrderPreUname(orderPre.getUname());
|
||||
order.setOrderPrePhone(orderPre.getPhone());
|
||||
order.setOrderTime(new Date());
|
||||
order.setOrderNo(orderNo(station.getCode(), order.getOrderTime()));
|
||||
order.setPlateNum(orderPre.getPlateNum());
|
||||
|
||||
order.setStationCode(orderPre.getStationCode());
|
||||
order.setStationName(orderPre.getStationName());
|
||||
order.setStatus(1);
|
||||
order.setFeeType(3);
|
||||
order.setDelFlag(0);
|
||||
order.setRemark("测试用的");
|
||||
order.setChangeMode(1);
|
||||
order.setChangeLane(1);
|
||||
// 加上费用标准
|
||||
order = orderBasicFeeComponent.orderBasicFee(order);
|
||||
|
||||
System.out.println(JSONUtil.toJsonStr(order));
|
||||
return new Result().success(order);
|
||||
return new Result().success(JSONUtil.toJsonStr(tradeService.getById(tradeId)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// @GetMapping("/station")
|
||||
// public Result list() {
|
||||
// System.out.println("======>>开始......");
|
||||
// BatteryStation station = batteryStationDao.selectOne(new LambdaQueryWrapper<BatteryStation>().eq(BatteryStation::getCode,"FD12795455"));
|
||||
// // 查这天,这个站的预约
|
||||
// List<OrderSwapBatteryPre> orderPreList = orderSwapBatteryPreDao.selectList(new QueryWrapper<OrderSwapBatteryPre>().eq("station_code", station.getCode()).eq("status", 1).eq("ucode","e2fb21b6447e10006f19a23e06b67914"));
|
||||
// // 根据预约生成订单
|
||||
// if (orderPreList.isEmpty()) {
|
||||
// System.out.println("没有预约单");
|
||||
// }
|
||||
// OrderSwapBatteryPre orderPre = orderPreList.get(0);
|
||||
// OrderSwapBattery order = new OrderSwapBattery();
|
||||
// order.setOrderType(1);
|
||||
// order.setCtime(new Date());
|
||||
// order.setCreater("TEST");
|
||||
// order.setOrderPreId(orderPre.getPkId());
|
||||
// order.setOrderPreUid(orderPre.getUcode());
|
||||
// order.setOrderPreUname(orderPre.getUname());
|
||||
// order.setOrderPrePhone(orderPre.getPhone());
|
||||
// order.setOrderTime(new Date());
|
||||
// order.setOrderNo(orderNo(station.getCode(), order.getOrderTime()));
|
||||
// order.setPlateNum(orderPre.getPlateNum());
|
||||
//
|
||||
// order.setStationCode(orderPre.getStationCode());
|
||||
// order.setStationName(orderPre.getStationName());
|
||||
// order.setStatus(1);
|
||||
// order.setFeeType(3);
|
||||
// order.setDelFlag(0);
|
||||
// order.setRemark("测试用的");
|
||||
// order.setChangeMode(1);
|
||||
// order.setChangeLane(1);
|
||||
// // 加上费用标准
|
||||
// order = orderBasicFeeComponent.orderBasicFee(order);
|
||||
//
|
||||
// System.out.println(JSONUtil.toJsonStr(order));
|
||||
// return new Result().success(order);
|
||||
// }
|
||||
|
||||
|
||||
private String orderNo(String stationCode, Date d) {
|
||||
String orderNoPrefix = "YTSO";
|
||||
String orderNoMiddle1 = stationCode.length() <= 8?stationCode : stationCode.substring(stationCode.length() - 8);
|
||||
|
||||
@ -1,18 +1,13 @@
|
||||
package com.evotech.hd.cloud.controller.test.service;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import org.eclipse.paho.client.mqttv3.MqttClient;
|
||||
import org.eclipse.paho.client.mqttv3.MqttConnectOptions;
|
||||
import org.eclipse.paho.client.mqttv3.MqttDeliveryToken;
|
||||
import org.eclipse.paho.client.mqttv3.MqttException;
|
||||
import org.eclipse.paho.client.mqttv3.MqttMessage;
|
||||
import org.eclipse.paho.client.mqttv3.MqttTopic;
|
||||
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.eclipse.paho.client.mqttv3.*;
|
||||
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@ -39,7 +34,7 @@ public class MqttConfigService {
|
||||
try {
|
||||
MqttClient testClient = new MqttClient(mqttUrl, clientId, new MemoryPersistence());
|
||||
//连接设置
|
||||
MqttConnectOptions options = connectOptions();
|
||||
MqttConnectOptions options = connectOptions();
|
||||
//设置回调
|
||||
testClient.setCallback(mqttTestCallback);
|
||||
testClient.connect(options);
|
||||
|
||||
@ -2,7 +2,7 @@ package com.evotech.hd.cloud.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.evotech.hd.common.core.constant.HDConstant;
|
||||
import com.evotech.hd.common.core.entity.cloud.OrderRecharge;
|
||||
import com.evotech.hd.common.core.entity.order.OrderRecharge;
|
||||
import com.evotech.hd.common.core.permission.DataScope;
|
||||
|
||||
/**
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
package com.evotech.hd.cloud.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.evotech.hd.common.core.entity.order.OrderRefund;
|
||||
|
||||
/**
|
||||
* 接口
|
||||
*
|
||||
* @ClassName:OrderRefundDao
|
||||
* @date: 2025年06月30日 14:26
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
|
||||
//@DataScope(permissionObject = HDConstant.COMPANY_ROLE_CODE, permissionScopeName = "station_code", permissionScopeRedisKey = HDConstant.PermissionConstant.PERMISSION_STATION_CODE)
|
||||
public interface OrderRefundDao extends BaseMapper<OrderRefund> {
|
||||
}
|
||||
@ -4,15 +4,13 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zrb
|
||||
@ -57,4 +55,15 @@ public class MessageMqtt implements Serializable {
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date ctime;
|
||||
|
||||
public MessageMqtt() {
|
||||
}
|
||||
|
||||
public MessageMqtt(String stationCode, String direction, String type, String messageFunction, Date ctime) {
|
||||
this.stationCode = stationCode;
|
||||
this.direction = direction;
|
||||
this.type = type;
|
||||
this.messageFunction = messageFunction;
|
||||
this.ctime = ctime;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.evotech.hd.cloud.entity.vo;
|
||||
|
||||
import com.evotech.hd.common.core.Dto.result.home.HomeOrderInfo;
|
||||
import com.evotech.hd.common.core.Dto.home.HomeOrderInfo;
|
||||
import com.evotech.hd.common.core.utils.Collections;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.evotech.hd.cloud.entity.vo;
|
||||
|
||||
import com.evotech.hd.common.core.Dto.result.home.HomeOrderSwapBatteryProportionDto;
|
||||
import com.evotech.hd.common.core.Dto.home.HomeOrderSwapBatteryProportionDto;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.evotech.hd.cloud.entity.vo;
|
||||
|
||||
import com.evotech.hd.common.core.Dto.result.home.HomeOrderSwapBatteryHalfYearAmountDto;
|
||||
import com.evotech.hd.common.core.Dto.home.HomeOrderSwapBatteryHalfYearAmountDto;
|
||||
import com.evotech.hd.common.core.utils.Collections;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.evotech.hd.cloud.entity.vo;
|
||||
|
||||
import com.evotech.hd.common.core.Dto.result.home.HomeOrderSwapBatteryHalfYearAmountDto;
|
||||
import com.evotech.hd.common.core.Dto.result.home.HomeOrderSwapBatteryProportionDto;
|
||||
import com.evotech.hd.common.core.Dto.home.HomeOrderSwapBatteryHalfYearAmountDto;
|
||||
import com.evotech.hd.common.core.Dto.home.HomeOrderSwapBatteryProportionDto;
|
||||
import com.evotech.hd.common.core.utils.Collections;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.evotech.hd.cloud.entity.vo;
|
||||
|
||||
import com.evotech.hd.common.core.Dto.result.home.HomeOrderSwapBatteryHalfYearAmountDto;
|
||||
import com.evotech.hd.common.core.Dto.home.HomeOrderSwapBatteryHalfYearAmountDto;
|
||||
import com.evotech.hd.common.core.utils.Collections;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
package com.evotech.hd.cloud.entity.vo;
|
||||
|
||||
import com.evotech.hd.cloud.entity.MessageMqtt;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:MqttMessageParam
|
||||
* @date: 2025年05月19日 10:26
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
public class MqttMessageParam extends MessageMqtt {
|
||||
|
||||
/***
|
||||
* 订单编号
|
||||
*/
|
||||
String orderNo;
|
||||
|
||||
public MqttMessageParam() {
|
||||
}
|
||||
|
||||
|
||||
public MqttMessageParam(String orderNo, String stationCode, String direction, String type, String messageFunction, Date ctime) {
|
||||
super(stationCode, direction, type, messageFunction, ctime);
|
||||
this.orderNo = orderNo;
|
||||
}
|
||||
}
|
||||
@ -1,10 +1,9 @@
|
||||
package com.evotech.hd.cloud.mqtt.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@ConfigurationProperties(prefix = "mqtt", ignoreUnknownFields = true)
|
||||
@Data
|
||||
@Component
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
package com.evotech.hd.cloud.mqtt.config;
|
||||
|
||||
import org.eclipse.paho.client.mqttv3.MqttClient;
|
||||
import org.eclipse.paho.client.mqttv3.MqttDeliveryToken;
|
||||
import org.eclipse.paho.client.mqttv3.MqttException;
|
||||
import org.eclipse.paho.client.mqttv3.MqttMessage;
|
||||
import org.eclipse.paho.client.mqttv3.MqttTopic;
|
||||
import org.eclipse.paho.client.mqttv3.*;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
|
||||
@ -1,19 +1,17 @@
|
||||
package com.evotech.hd.cloud.mqtt.config;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.evotech.hd.cloud.dao.BatteryStationDao;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStation;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.eclipse.paho.client.mqttv3.MqttClient;
|
||||
import org.eclipse.paho.client.mqttv3.MqttException;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.evotech.hd.cloud.dao.BatteryStationDao;
|
||||
import com.evotech.hd.common.core.entity.cloud.BatteryStation;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@EnableAsync
|
||||
@ -38,19 +36,31 @@ public class MqttSubscribeService {
|
||||
}
|
||||
List<String> stationCodeList = stationList.stream().map(i -> i.getCode()).toList();
|
||||
for (int i = 0; i < stationCodeList.size(); i++) {
|
||||
String stationCode = stationCodeList.get(i);
|
||||
String topicPrefix = "YTHD/" + stationCode + "/S2M/";
|
||||
for (int j = 0; j < mqttMessageTypeArr.length; j++) {
|
||||
String topic = topicPrefix + mqttMessageTypeArr[j];
|
||||
try {
|
||||
cloudClient.subscribe(topic, mpProperties.getQos());
|
||||
log.info("\r\n=====>>>MQTT订阅主题 {} 成功...", topic);
|
||||
} catch (MqttException e) {
|
||||
e.printStackTrace();
|
||||
log.error("\r\n=====>>>MQTT订阅主题 {} 失败。。。", topic);
|
||||
}
|
||||
}
|
||||
subscribe(cloudClient, stationCodeList.get(i));
|
||||
}
|
||||
log.info("\r\n=====>>>MQTT订阅完成<<<===");
|
||||
}
|
||||
|
||||
|
||||
@Async("taskExecutor")
|
||||
public void subscribe(String stationCode) {
|
||||
log.info("\r\n=====>>>MQTT新增站点订阅主题>>>");
|
||||
// 订阅主题
|
||||
subscribe(MqttConnectInit.mqttClientMap.get("cloudClient"), stationCode);
|
||||
log.info("\r\n=====>>>MQTT新增站点订阅完成<<<===");
|
||||
}
|
||||
|
||||
public void subscribe(MqttClient cloudClient, String stationCode){
|
||||
String topicPrefix = "YTHD/" + stationCode + "/S2M/";
|
||||
for (int j = 0; j < mqttMessageTypeArr.length; j++) {
|
||||
String topic = topicPrefix + mqttMessageTypeArr[j];
|
||||
try {
|
||||
cloudClient.subscribe(topic, mpProperties.getQos());
|
||||
log.info("\r\n=====>>>MQTT订阅主题 {} 成功...", topic);
|
||||
} catch (MqttException e) {
|
||||
e.printStackTrace();
|
||||
log.error("\r\n=====>>>MQTT订阅主题 {} 失败。。。", topic);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,14 @@
|
||||
package com.evotech.hd.cloud.mqtt.config;
|
||||
|
||||
import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken;
|
||||
import org.eclipse.paho.client.mqttv3.MqttCallbackExtended;
|
||||
import org.eclipse.paho.client.mqttv3.MqttClient;
|
||||
import org.eclipse.paho.client.mqttv3.MqttMessage;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.evotech.hd.cloud.mqtt.message.MessageTopic;
|
||||
import com.evotech.hd.cloud.mqtt.message.handle.MqttMessageHandleService;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken;
|
||||
import org.eclipse.paho.client.mqttv3.MqttCallbackExtended;
|
||||
import org.eclipse.paho.client.mqttv3.MqttClient;
|
||||
import org.eclipse.paho.client.mqttv3.MqttMessage;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package com.evotech.hd.cloud.mqtt.enums;
|
||||
|
||||
import com.evotech.hd.cloud.mqtt.message.dto.newer.state.OrderStatusData;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public enum EventFunctionTypesEnum {
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package com.evotech.hd.cloud.mqtt.message;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class MessageTopic implements Serializable {
|
||||
|
||||
@ -15,10 +15,13 @@ import java.io.Serializable;
|
||||
@Data
|
||||
public class MqttResponse<T> implements Serializable {
|
||||
|
||||
|
||||
private Integer code;
|
||||
|
||||
private String msg;
|
||||
|
||||
private String dataId;
|
||||
|
||||
private T data;
|
||||
|
||||
|
||||
@ -28,9 +31,21 @@ public class MqttResponse<T> implements Serializable {
|
||||
|
||||
static final Integer PARAMS_ERROR = 2;
|
||||
|
||||
public static final Integer PUBLIC_SUCCESS = SUCCESS;
|
||||
public static final Integer PUBLIC_ERROR = ERROR;
|
||||
|
||||
/***
|
||||
* 默认新创建的对象直接为错误
|
||||
*/
|
||||
public MqttResponse() {
|
||||
}
|
||||
|
||||
public MqttResponse<T> createError(String dataId) {
|
||||
this.code=ERROR;
|
||||
this.dataId = dataId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MqttResponse<T> success(T data){
|
||||
this.code=SUCCESS;
|
||||
this.msg="成功";
|
||||
@ -43,6 +58,12 @@ public class MqttResponse<T> implements Serializable {
|
||||
this.msg=errorMessage;
|
||||
return this;
|
||||
}
|
||||
public MqttResponse<T> error(T data, String errorMessage){
|
||||
this.code=ERROR;
|
||||
this.msg=errorMessage;
|
||||
this.data=data;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MqttResponse<T> paramsError(String errorMessage){
|
||||
this.code=PARAMS_ERROR;
|
||||
|
||||
@ -2,16 +2,27 @@ package com.evotech.hd.cloud.mqtt.message.dto.newer.req.battery;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
@Data
|
||||
public class BatteryData {
|
||||
|
||||
private String batCode;
|
||||
|
||||
@Schema(description = "生产日期", example = "yyyyMMdd")
|
||||
@Schema(description = "生产日期", example = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private String productionDate;
|
||||
|
||||
@Schema(description = "注册时间", example = "yyyyMMdd")
|
||||
@Schema(description = "注册时间", example = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private String registrationDate;
|
||||
|
||||
public BatteryData() {
|
||||
}
|
||||
|
||||
public BatteryData(String batCode, String productionDate, String registrationDate) {
|
||||
this.batCode = batCode;
|
||||
this.productionDate = productionDate;
|
||||
this.registrationDate = registrationDate;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package com.evotech.hd.cloud.mqtt.message.dto.newer.req.battery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class BatteryInfoResponse {
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package com.evotech.hd.cloud.mqtt.message.dto.newer.req.carinfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 云端回复站端用户车辆数据
|
||||
*/
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package com.evotech.hd.cloud.mqtt.message.dto.newer.req.order;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class OrderByPlateNumResponse implements Serializable {
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package com.evotech.hd.cloud.mqtt.message.dto.newer.req.order;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class OrderData {
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package com.evotech.hd.cloud.mqtt.message.dto.newer.req.preorder;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 站端预约订单
|
||||
*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user