From b46c2ac951f8e6c43e952eccc0269a6712b34a2a Mon Sep 17 00:00:00 2001 From: zhx Date: Thu, 9 Jul 2026 13:36:36 +0800 Subject: [PATCH] feat: add super dealer sub coin sellers --- .deploy/prod-deploy/deploy-likei-services.sh | 14 +++- .deploy/prod-deploy/ops/aslan_ops.py | 7 +- ...60709_user_freight_sub_seller_relation.sql | 14 ++++ ...60709_user_freight_sub_seller_relation.sql | 14 ++++ .../wallet/inner/error/FreightErrorCode.java | 15 ++++ .../adapter/app/FreightRestController.java | 41 +++++++++++ .../freight/DealerToFreightShipCmdExe.java | 16 +++-- .../SuperDealerSubSellerTransferCmdExe.java | 56 +++++++++++++++ .../UserFreightSubSellerAddCmdExe.java | 66 +++++++++++++++++ .../query/UserFreightSubSellerQryExe.java | 72 +++++++++++++++++++ .../support/SuperFreightDealerChecker.java | 36 ++++++++++ .../app/service/UserFreightServiceImpl.java | 24 +++++++ .../dto/clientobject/FreightSubSellerCO.java | 47 ++++++++++++ .../app/dto/cmd/FreightSubSellerCmd.java | 28 ++++++++ .../dto/cmd/FreightSubSellerTransferCmd.java | 42 +++++++++++ .../app/service/UserFreightService.java | 9 +++ .../rds/dao/FreightSubSellerRelationDAO.java | 11 +++ .../freight/FreightSubSellerRelation.java | 54 ++++++++++++++ .../freight/FreightBalanceService.java | 6 ++ .../FreightSubSellerRelationService.java | 19 +++++ .../impl/FreightBalanceServiceImpl.java | 31 +++++++- .../FreightSubSellerRelationServiceImpl.java | 57 +++++++++++++++ .../sql/user_freight_sub_seller_relation.sql | 14 ++++ 23 files changed, 684 insertions(+), 9 deletions(-) create mode 100644 .deploy/prod-deploy/sql/20260709_user_freight_sub_seller_relation.sql create mode 100644 .deploy/test-deploy/sql/20260709_user_freight_sub_seller_relation.sql create mode 100644 rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/freight/SuperDealerSubSellerTransferCmdExe.java create mode 100644 rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/freight/UserFreightSubSellerAddCmdExe.java create mode 100644 rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/freight/query/UserFreightSubSellerQryExe.java create mode 100644 rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/freight/support/SuperFreightDealerChecker.java create mode 100644 rc-service/rc-service-wallet/wallet-client/src/main/java/com/red/circle/wallet/app/dto/clientobject/FreightSubSellerCO.java create mode 100644 rc-service/rc-service-wallet/wallet-client/src/main/java/com/red/circle/wallet/app/dto/cmd/FreightSubSellerCmd.java create mode 100644 rc-service/rc-service-wallet/wallet-client/src/main/java/com/red/circle/wallet/app/dto/cmd/FreightSubSellerTransferCmd.java create mode 100644 rc-service/rc-service-wallet/wallet-infrastructure/src/main/java/com/red/circle/wallet/infra/database/rds/dao/FreightSubSellerRelationDAO.java create mode 100644 rc-service/rc-service-wallet/wallet-infrastructure/src/main/java/com/red/circle/wallet/infra/database/rds/entity/freight/FreightSubSellerRelation.java create mode 100644 rc-service/rc-service-wallet/wallet-infrastructure/src/main/java/com/red/circle/wallet/infra/database/rds/service/freight/FreightSubSellerRelationService.java create mode 100644 rc-service/rc-service-wallet/wallet-infrastructure/src/main/java/com/red/circle/wallet/infra/database/rds/service/freight/impl/FreightSubSellerRelationServiceImpl.java create mode 100644 rc-service/rc-service-wallet/wallet-infrastructure/src/main/resources/sql/user_freight_sub_seller_relation.sql diff --git a/.deploy/prod-deploy/deploy-likei-services.sh b/.deploy/prod-deploy/deploy-likei-services.sh index e797cd4a..bb7c0abf 100755 --- a/.deploy/prod-deploy/deploy-likei-services.sh +++ b/.deploy/prod-deploy/deploy-likei-services.sh @@ -23,11 +23,13 @@ FALLBACK_BASE_IMAGE="${FALLBACK_BASE_IMAGE:-eclipse-temurin:17-jdk-jammy}" usage() { cat <<'EOF' Usage: - deploy-likei-services.sh [--mode preload|push|build-only|status] [--skip-build] [other|external|console ...] + deploy-likei-services.sh [--mode preload|push|build-only|status] [--skip-build] [--fast] [wallet|other|external|console ...] Examples: /opt/aslan-deploy/deploy-likei-services.sh status + /opt/aslan-deploy/deploy-likei-services.sh --mode preload wallet /opt/aslan-deploy/deploy-likei-services.sh --mode preload other external console + /opt/aslan-deploy/deploy-likei-services.sh --fast wallet USE_GIT_SOURCE=1 GIT_REF=aslan_prod /opt/aslan-deploy/deploy-likei-services.sh --mode preload other MODE=push ALIYUN_USER=xxx ALIYUN_PASS=xxx /opt/aslan-deploy/deploy-likei-services.sh other @@ -102,6 +104,7 @@ update_source_from_git() { service_module() { case "$1" in + wallet) echo "rc-service/rc-service-wallet/wallet-start" ;; other) echo "rc-service/rc-service-other/other-start" ;; external) echo "rc-service/rc-service-external/external-start" ;; console) echo "rc-service/rc-service-console/console-start" ;; @@ -111,6 +114,7 @@ service_module() { service_dir() { case "$1" in + wallet) echo "rc-service/rc-service-wallet" ;; other) echo "rc-service/rc-service-other" ;; external) echo "rc-service/rc-service-external" ;; console) echo "rc-service/rc-service-console" ;; @@ -120,6 +124,7 @@ service_dir() { image_repo() { case "$1" in + wallet) echo "$IMAGE_REGISTRY/$IMAGE_PROJECT/wallet" ;; other) echo "$IMAGE_REGISTRY/$IMAGE_PROJECT/other" ;; external) echo "$IMAGE_REGISTRY/$IMAGE_PROJECT/external" ;; console) echo "$IMAGE_REGISTRY/$IMAGE_PROJECT/console" ;; @@ -290,7 +295,7 @@ rollout() { } status() { - kubectl --kubeconfig "$KUBECONFIG" -n "$NAMESPACE" get deploy other external console -o wide + kubectl --kubeconfig "$KUBECONFIG" -n "$NAMESPACE" get deploy wallet other external console -o wide kubectl --kubeconfig "$KUBECONFIG" get nodes -o wide } @@ -306,6 +311,11 @@ main() { SKIP_BUILD=1 shift ;; + --fast) + # Code-only wallet changes can keep Maven's target cache instead of forcing clean package. + MAVEN_GOALS=package + shift + ;; -h|--help) usage exit 0 diff --git a/.deploy/prod-deploy/ops/aslan_ops.py b/.deploy/prod-deploy/ops/aslan_ops.py index 2899482f..67d89293 100644 --- a/.deploy/prod-deploy/ops/aslan_ops.py +++ b/.deploy/prod-deploy/ops/aslan_ops.py @@ -37,6 +37,11 @@ ALLOWED_BRANCHES = { } SERVICES = { + "wallet": { + "label": "Wallet", + "port": "9000", + "health": "/actuator/health", + }, "other": { "label": "Other", "port": "5800", @@ -749,7 +754,7 @@ INDEX_HTML = """