fix: product price float
CI / changes (push) Successful in 13s
CI / ad (push) Successful in 3s
CI / admin (push) Successful in 2s
CI / bff (push) Successful in 2s
CI / chore (push) Successful in 1s
CI / express (push) Successful in 2s
CI / product (push) Successful in 31s
CI / sale (push) Successful in 2s
CI / user (push) Successful in 2s
CI / wecom (push) Successful in 2s

This commit is contained in:
zzw
2026-08-31 11:55:34 +08:00
parent c4af0f481a
commit 90a195c9ca
3 changed files with 24 additions and 27 deletions
+16 -20
View File
@@ -76,28 +76,20 @@ jobs:
docker:
needs: changes
runs-on: runner
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: bff
dockerfile: bff/Dockerfile
- name: product
dockerfile: services/product/Dockerfile
- name: admin
dockerfile: services/admin/Dockerfile
- name: user
dockerfile: services/user/Dockerfile
- name: ad
dockerfile: services/ad/Dockerfile
- name: chore
dockerfile: services/chore/Dockerfile
- name: express
dockerfile: services/express/Dockerfile
- name: sale
dockerfile: services/sale/Dockerfile
- name: wecom
dockerfile: services/wecom/Dockerfile
name:
- bff
- product
- admin
- user
- ad
- chore
- express
- sale
- wecom
env:
BUILD_LIST: ${{ needs.changes.outputs.build_list }}
NAME: lone/${{ matrix.name }}
@@ -124,8 +116,12 @@ jobs:
- name: Docker build
if: steps.check.outputs.build == 'yes'
run: |
case "${{ matrix.name }}" in
bff) dockerfile="bff/Dockerfile" ;;
*) dockerfile="services/${{ matrix.name }}/Dockerfile" ;;
esac
docker buildx use default
docker buildx build --builder default --load -f "${{ matrix.dockerfile }}" -t "${{ vars.REGISTRY }}/$NAME:latest" .
docker buildx build --builder default --load -f "$dockerfile" -t "${{ vars.REGISTRY }}/$NAME:latest" .
- name: Docker push
if: steps.check.outputs.build == 'yes'
+2 -1
View File
@@ -12,7 +12,8 @@ rpc/scripts/gen-rpc.sh order
3.nacos 加配置
4.增加 etc/order.yaml 配置文件
5.Dockerfile 文件
6.gitea 配置,修改这行。SERVICES="bff product admin user ad chore express sale wecom"
6.changes 里的 SERVICES="..."
docker.strategy.matrix.include 加一行 { name: xxx, dockerfile: services/xxx/Dockerfile }
```
+6 -6
View File
@@ -22,16 +22,16 @@ func toProductItem(row dao.Info) *product.Item {
Subhead: row.Subhead,
Content: row.Content,
ModelCode: row.ModelCode,
Price: float64(row.Price),
StorePrice: float64(row.StorePrice),
SalePrice: float64(row.SalePrice),
SharePrice: float64(row.SharePrice),
AgentPrice: float64(row.AgentPrice),
Price: utils.RoundFloat(float64(row.Price)),
StorePrice: utils.RoundFloat(float64(row.StorePrice)),
SalePrice: utils.RoundFloat(float64(row.SalePrice)),
SharePrice: utils.RoundFloat(float64(row.SharePrice)),
AgentPrice: utils.RoundFloat(float64(row.AgentPrice)),
SaleReward: row.SaleReward,
SalesModel: uint32(row.SalesModel),
Waybill: row.Waybill,
Status: uint32(row.Status),
Weight: float64(row.Weight),
Weight: utils.RoundFloat(float64(row.Weight)),
IsIndex: uint32(row.IsIndex),
IndexImage: row.IndexImage,
Cubage: row.Cubage,