项目结构调整

This commit is contained in:
andy 2025-04-18 11:52:44 +08:00
parent 204b814994
commit 5966258bff
12 changed files with 60 additions and 60 deletions

View File

@ -28,6 +28,8 @@ spring:
serverAddr: 192.168.5.213:8848
username: nacos
password: nacos
config:
namespace: ${nacos.namespace:public}
discovery:
namespace: ${nacos.namespace:public}
register-enabled: true

View File

@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(value = "cloud-server", path = "/cloud")
@FeignClient(name = "${CLOUD-SERVER-API-NAME}", path = "${CLOUD-SERVER-API-PATH}")
public interface CloudService {

View File

@ -16,27 +16,27 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(value = "resource-server")
@FeignClient(name = "${RESOURCE-SERVER-API-NAME}", path = "${RESOURCE-SERVER-API-PATH}")
public interface ResourceService {
@GetMapping(value = "/resource/user/userbyname",
@GetMapping(value = "/user/userbyname",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<AuthUser> loadUserByName(@RequestParam("uname") String userName);
@PostMapping(value = "/resource/user/userpermbyid",
@PostMapping(value = "/user/userpermbyid",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<String> userPermById(@NotNull @RequestParam("uid") String userId, @RequestParam("type")Integer type);
@PostMapping(value = "/resource/loginlog/add",
@PostMapping(value = "/loginlog/add",
consumes = {MediaType.APPLICATION_JSON_VALUE})
public Result<Integer> addLoginLog(@RequestBody LogLogin log);
@GetMapping(value = "/resource/logininfo/get",
@GetMapping(value = "/logininfo/get",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<LoginCacheInfo> loginInfo(@RequestParam("uid") String uid);
@GetMapping(value = "/resource/user/station",consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
@GetMapping(value = "/user/station",consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
public BaseResponse<List<AuthUserStation>> loadBatteryStation(@RequestParam("uid") String uid);
}

View File

@ -15,7 +15,8 @@ spring:
config:
import:
- nacos:yt-common.properties?refreshEnabled=true
- nacos:${spring.application.name}.yaml?refreshEnabled=true
- nacos:oauth2-server.yaml?refreshEnabled=true
- nacos:yt-redis.yaml?refreshEnabled=true
cloud:
nacos:
serverAddr: 192.168.5.213:8848

View File

@ -1,20 +1,19 @@
package com.evotech.hd.cloud.service.rpc;
import java.util.List;
import com.evotech.hd.common.core.entity.Result;
import com.evotech.hd.common.core.entity.resource.dict.Dict;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.evotech.hd.common.core.entity.Result;
import com.evotech.hd.common.core.entity.resource.dict.Dict;
import java.util.List;
@FeignClient(value = "resource-server")
@FeignClient(name = "${RESOURCE-SERVER-API-NAME}", path = "${RESOURCE-SERVER-API-PATH}")
public interface ResourceService {
@GetMapping(value = "/resource/dict/listdict",
@GetMapping(value = "/dict/listdict",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<List<Dict>> listDict(@RequestParam String typeCode);

View File

@ -14,39 +14,39 @@ import com.evotech.hd.common.core.entity.cloud.OrderSwapBattery;
import com.evotech.hd.common.core.entity.cloud.OrderSwapBatteryPre;
import com.evotech.hd.common.core.entity.cloud.TradeDetail;
@FeignClient(value = "wechat-server")
@FeignClient(name = "${WECHAT-SERVER-API-NAME}", path = "${RESOURCE-SERVER-API-PATH}")
public interface WechatService {
@GetMapping(value = "/wechat/xcx/qrcode/get2",
@GetMapping(value = "/xcx/qrcode/get2",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public String getQRCode2(@RequestParam String path, @RequestParam String width, @RequestParam String env_version);
@GetMapping(value = "/wechat/xcx/qrcode/create2",
@GetMapping(value = "/xcx/qrcode/create2",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public String createQRCode2(@RequestParam String path, @RequestParam String width);
@PostMapping(value = "/wechat/gzh/msg/send/preorder2",
@PostMapping(value = "/gzh/msg/send/preorder2",
consumes = {MediaType.APPLICATION_JSON_VALUE})
public Result<String> preOrderMessage(@RequestBody OrderSwapBatteryPre osbp);
@PostMapping(value = "/wechat/gzh/msg/send/order",
@PostMapping(value = "/gzh/msg/send/order",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<String> orderMessage(@ParameterObject OrderSwapBattery osb, @RequestParam Integer templateType);
@PostMapping(value = "/wechat/gzh/msg/send/order2",
@PostMapping(value = "/gzh/msg/send/order2",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<String> orderMessage2(@RequestParam Integer id, @RequestParam Integer templateType);
@PostMapping(value = "/wechat/gzh/msg/send/recharge",
@PostMapping(value = "/gzh/msg/send/recharge",
consumes = {MediaType.APPLICATION_JSON_VALUE})
public Result<String> rechargeMessage(@RequestBody TradeDetail trade, @RequestParam Integer money);
@PostMapping(value = "/wechat/wechatpay/native/prepay",
@PostMapping(value = "/wechatpay/native/prepay",
consumes = {MediaType.APPLICATION_JSON_VALUE})
public Result<String> wechatNativePay(@RequestBody NativePayVO prePay);
@GetMapping(value = "/wechat/wechatpay/native/order/query",
@GetMapping(value = "/wechatpay/native/order/query",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<String> orderQuery(@RequestParam Integer type, @RequestParam String outTradeNo);

View File

@ -12,7 +12,7 @@ logging:
spring:
# 服务名称必须带上不然nacos服务列表中没有也不会有注册成功的信息
application:
name: cloud-server #${cloud-manage-server:cloud-server}
name: ${cloud-manage-server:cloud-server}
jackson:
timeZone: GMT+08:00
date-format: yyyy-MM-dd HH:mm:ss
@ -22,8 +22,7 @@ spring:
import:
- nacos:yt-common.properties?refreshEnabled=true
- nacos:cloud-server.yaml?refreshEnabled=true
- nacos:yt-redis.yaml?refreshEnabled=true
cloud:
nacos:
serverAddr: 192.168.5.213:8848

View File

@ -1,16 +1,16 @@
package com.evotech.hd.gateway.oauth2.service;
import java.util.Map;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(value = "wechat-server")
import java.util.Map;
@FeignClient(name = "${WECHAT-SERVER-API-NAME}", path = "${WECHAT-SERVER-API-PATH}")
public interface WechatService {
@PostMapping(value = "/wechat/login/tokenbuild",
@PostMapping(value = "/login/tokenbuild",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Map<String, String> tokenBuilder(@RequestParam String wuid);

View File

@ -25,7 +25,7 @@ spring:
config:
import:
- nacos:yt-common.properties?refreshEnabled=true
- nacos:${spring.application.name}.yaml?refreshEnabled=true
- nacos:gateway-server.yaml?refreshEnabled=true
cloud:
nacos:
serverAddr: 192.168.5.213:8848

View File

@ -19,78 +19,78 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;
@FeignClient(value = "${CLOUD-SERVER-API-NAME}")
@FeignClient(name = "${CLOUD-SERVER-API-NAME}", path = "${CLOUD-SERVER-API-PATH}")
public interface CloudService {
@PostMapping(value = "/cloud/order/swap/pre/add",
@PostMapping(value = "/order/swap/pre/add",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<Integer> addPre(OrderSwapBatteryPre osbp);
@PostMapping(value = "/cloud/order/swap/pre/cancel",
@PostMapping(value = "/order/swap/pre/cancel",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<Integer> cancelPre(@RequestParam Integer id, @RequestParam Integer status);
@GetMapping(value = "/cloud/order/swap/pre/list",
@GetMapping(value = "/order/swap/pre/list",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<List<OrderSwapBatteryPre>> listPre(@SpringQueryMap PageListSwapOrderPreRequest plsopr);
@GetMapping(value = "/cloud/order/swap/list",
@GetMapping(value = "/order/swap/list",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<List<OrderSwapBattery>> list(@SpringQueryMap PageListSwapOrderRequest plsor);
@GetMapping(value = "/cloud/order/swap/step/list",
@GetMapping(value = "/order/swap/step/list",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<List<OrderSwapBatteryStep>> listStep(@RequestParam String orderNo);
@GetMapping(value = "/cloud/batterystation/liststation",
@GetMapping(value = "/batterystation/liststation",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<List<BatteryStationVO>> listStation(@RequestParam String plateNum);
// public Result<List<BatteryStation>> listStation(@SpringQueryMap BasePageRequest bpr);
@GetMapping(value = "/cloud/company/companyByCode",
@GetMapping(value = "/company/companyByCode",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<Map<String, String>> companyByCode(@RequestParam String ccode);
@GetMapping(value = "/cloud/vehicle/wechatuser/relation/list",
@GetMapping(value = "/vehicle/wechatuser/relation/list",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<List<VehicleInfo>> listWechatUserCar(@RequestParam String wuid);
@PostMapping(value = "/cloud/wallet/add",
@PostMapping(value = "/wallet/add",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<Integer> addWallet(WalletAccount wa);
@GetMapping(value = "/cloud/wallet/list",
@GetMapping(value = "/wallet/list",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<List<WalletAccount>> listWallet(@RequestParam String ownerId);
@GetMapping(value = "/cloud/wallet/detail/list",
@GetMapping(value = "/wallet/detail/list",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<List<WalletAccountDetail>> listWalletDetail(@SpringQueryMap PageListWalletRequest plwr);
@PostMapping(value = "/cloud/trade/wechatpay/notify",
@PostMapping(value = "/trade/wechatpay/notify",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public void wechatPayNotifyHandle(TradeDetail tradeDetail);
@PostMapping(value = "/cloud/order/swap/wallet/pay",
@PostMapping(value = "/order/swap/wallet/pay",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<String> walletPay(@RequestParam String orderNo, @RequestParam String wuid, @RequestParam String uname);
@PostMapping(value = "/cloud/wallet/isOpenAccount",
@PostMapping(value = "/wallet/isOpenAccount",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<Boolean> isOpenAccount( @RequestParam String wuid);
@PostMapping(value = "/cloud/order/swap/startSwap",
@PostMapping(value = "/order/swap/startSwap",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<Boolean> startSwap( @RequestParam String wuid,String orderId);
@PostMapping(value = "/cloud/order/swap/getStartSwap",
@PostMapping(value = "/order/swap/getStartSwap",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<BatterySwapResponse> getStartSwap(@RequestParam String wuid, String orderId);
@PostMapping(value = "/cloud/wallet/getWalleCode",
@PostMapping(value = "/wallet/getWalleCode",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<String> getWalleCode(@RequestParam String wuid);
@PostMapping(value = "/cloud/wallet/getPayAttach", consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
@PostMapping(value = "/wallet/getPayAttach", consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<WechatPayAttach> getPayAttach(@NotBlank String wuid);
}

View File

@ -1,28 +1,27 @@
package com.evotech.hd.wechat.service.rpc;
import java.util.List;
import com.evotech.hd.common.core.entity.Result;
import com.evotech.hd.common.core.entity.resource.WechatAgreement;
import com.evotech.hd.common.core.entity.resource.WechatSwiper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.evotech.hd.common.core.entity.Result;
import com.evotech.hd.common.core.entity.resource.WechatAgreement;
import com.evotech.hd.common.core.entity.resource.WechatSwiper;
import java.util.List;
@FeignClient(value = "resource-server")
@FeignClient(name = "${RESOURCE-SERVER-API-NAME}", path = "${RESOURCE-SERVER-API-PATH}")
public interface ResourceService {
@GetMapping(value = "/resource/wechat/agreement/list",
@GetMapping(value = "/wechat/agreement/list",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<List<WechatAgreement>> listAgreement(@RequestParam String appid, @RequestParam Integer type, @RequestParam Integer status);
@GetMapping(value = "/resource/wechat/swiper/list",
@GetMapping(value = "/wechat/swiper/list",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<List<WechatSwiper>> listSwiper(@RequestParam String appid, @RequestParam Integer type, @RequestParam Integer status);
@GetMapping(value = "/resource/util/ip",
@GetMapping(value = "/util/ip",
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
public Result<String> getIp();
}

View File

@ -16,8 +16,8 @@ spring:
config:
import:
- nacos:yt-common.properties?refreshEnabled=true
- nacos:yt-redis.yaml?refreshEnabled=true
- nacos:wechat-server.yaml?refreshEnabled=true
- nacos:yt-redis.yaml?refreshEnabled=true
cloud:
nacos:
serverAddr: 192.168.5.213:8848