diff --git a/.tool-versions b/.tool-versions index 758ab37..309ff5c 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -golang 1.25.2 +golang 1.25.5 diff --git a/CLAUDE.md b/CLAUDE.md index 749cecf..c0e42cd 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -122,6 +122,29 @@ The application uses MySQL with the following connection details configured in ` - **Portal Service**: `127.0.0.1:12400` - User portal integration - **Backend Service**: `kami_backend:12401` - Backend API for configuration +## Deployment + +### Docker Development +```bash +# Build and run with Docker Compose +docker-compose -f deploy/docker-compose-local.yaml up -d --build + +# Production deployment +docker-compose -f deploy/docker-compose.yaml up -d --build +``` + +### Docker Configuration +- Multi-stage build with Go 1.24 builder and Alpine Linux runtime +- Support for Chinese proxy configuration (`USE_PROXY=1`) +- Automatic SSL certificate installation for external services +- Wait-for-it script ensures MySQL is available before startup +- Application runs on port 12306 + +### Jenkins CI/CD +- Automated pipeline in `Jenkinsfile` for building and deploying +- Supports container orchestration and restart functionality +- Build failures don't block subsequent stages + ## Key Features - Merchant management and deployment - Payment channel (road) management diff --git a/internal/controllers/pageController.go b/internal/controllers/pageController.go index a5d988f..ae60014 100644 --- a/internal/controllers/pageController.go +++ b/internal/controllers/pageController.go @@ -387,3 +387,12 @@ func (c *PageAuthController) AlipayOrderPage() { c.Data["portalHost"] = config.GetPortalHost() c.TplName = "camel-oil/order.html" } + +func (c *PageAuthController) AlipayPrefetchPage() { + userID, _ := c.GetSession("userID").(string) + ctx := c.Ctx.Request.Context() + tokenService := service.NewTokenService() + c.Data["token"] = tokenService.GetToken(ctx, userID) + c.Data["portalHost"] = config.GetPortalHost() + c.TplName = "camel-oil/camelOilPrefetch.html" +} diff --git a/internal/routers/router_pages.go b/internal/routers/router_pages.go index 79161e6..d9fe63f 100644 --- a/internal/routers/router_pages.go +++ b/internal/routers/router_pages.go @@ -73,4 +73,5 @@ func init() { beego.Router("/jd-alipay-token.html", &controllers.PageAuthController{}, "*:AlipayTokenPage") beego.Router("/jd-alipay-account.html", &controllers.PageAuthController{}, "*:AlipayAccountPage") beego.Router("/jd-alipay-order.html", &controllers.PageAuthController{}, "*:AlipayOrderPage") + beego.Router("/jd-alipay-prefetch.html", &controllers.PageAuthController{}, "*:AlipayPrefetchPage") } diff --git a/views/camel-oil/camelOilPrefetch.html b/views/camel-oil/camelOilPrefetch.html new file mode 100644 index 0000000..96ef585 --- /dev/null +++ b/views/camel-oil/camelOilPrefetch.html @@ -0,0 +1,21 @@ + + + +
+ + + + + + \ No newline at end of file diff --git a/views/index.html b/views/index.html index be3d6c0..08c9e89 100644 --- a/views/index.html +++ b/views/index.html @@ -334,19 +334,20 @@ 充值订单管理 - - - - - - - - - - - - - +