Compare commits
No commits in common. "pre" and "pro" have entirely different histories.
|
|
@ -12,7 +12,6 @@ import (
|
|||
"github.com/nacos-group/nacos-sdk-go/common/constant"
|
||||
_ "go.uber.org/automaxprocs"
|
||||
"gopkg.in/yaml.v2"
|
||||
"html/template"
|
||||
"os"
|
||||
"voucher/internal/conf"
|
||||
log2 "voucher/internal/pkg/log"
|
||||
|
|
@ -128,7 +127,7 @@ func main() {
|
|||
businessLogger := log2.NewBusinessLogger(bc.Logs.Business, Name, Name, Version)
|
||||
accessLogger := log2.NewAccessLogger(bc.Logs.Access, id, Name, Version)
|
||||
|
||||
app, cleanup, err := wireApp(bc, temp(), businessLogger, accessLogger)
|
||||
app, cleanup, err := wireApp(bc, businessLogger, accessLogger)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
@ -139,17 +138,3 @@ func main() {
|
|||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func temp() *template.Template {
|
||||
wd, err := os.Getwd()
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("获取当前工作目录失败:", err))
|
||||
}
|
||||
|
||||
templatePath := fmt.Sprintf("%s/templates/index.tmpl", wd)
|
||||
tmpl, err := template.ParseFiles(templatePath)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return tmpl
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import (
|
|||
"github.com/go-kratos/kratos/v2/log"
|
||||
"github.com/google/wire"
|
||||
"github.com/robfig/cron"
|
||||
"html/template"
|
||||
"voucher/internal/biz"
|
||||
"voucher/internal/biz/cmb"
|
||||
"voucher/internal/biz/timeslicequery"
|
||||
|
|
@ -25,7 +24,7 @@ import (
|
|||
)
|
||||
|
||||
// wireApp init kratos application.
|
||||
func wireApp(*conf.Bootstrap, *template.Template, log.Logger, *log2.AccessLogger) (*kratos.App, func(), error) {
|
||||
func wireApp(*conf.Bootstrap, log.Logger, *log2.AccessLogger) (*kratos.App, func(), error) {
|
||||
panic(wire.Build(
|
||||
server.ProviderSetServer,
|
||||
service.ProviderSetService,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ docker stop $server && docker rm $server
|
|||
docker run --network=merketing-network -itd --name $server --restart=always \
|
||||
-p $http_port:13000 \
|
||||
-v /var/www/marketing/cert:/app/cert \
|
||||
-v /var/www/marketing/templates:/app/templates \
|
||||
registry.cn-chengdu.aliyuncs.com/lsxdjr/$image:"${CI_COMMIT_ID}" \
|
||||
./server -nacosIp "47.110.74.203" -nacosPort 8848 -nacosSpace "voucher" -nacosUsername "" -nacosPassword ""
|
||||
docker image prune -f
|
||||
|
|
|
|||
|
|
@ -1,62 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{{.Title}}</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background-color: #f4f4f4;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #FF6600; /* 设置为橙色,可替换为其他颜色代码 */
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
pre {
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
white-space: pre-line;
|
||||
line-height: 1.6;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
pre strong {
|
||||
color: #007BFF;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<pre>
|
||||
{{if.Order}}
|
||||
<strong>订单号:</strong> {{.Order.OrderNo}}
|
||||
<strong>招行订单号:</strong> {{.Order.OutBizNo}}
|
||||
<strong>订单状态:</strong> {{.Order.Status.GetText}}
|
||||
<strong>openid:</strong> {{.Order.Account}}
|
||||
<strong>微信券ID:</strong> {{.Order.VoucherNo}}
|
||||
<strong>商品编号:</strong> {{.Order.ProductNo}}
|
||||
<strong>批次号:</strong> {{.Order.BatchNo}}
|
||||
<strong>商户号:</strong> {{.Order.MerchantNo}}
|
||||
<strong>appId:</strong> {{.Order.AppID}}
|
||||
<strong>订单创建时间:</strong> {{.Order.CreateTime}}
|
||||
<strong>领取成功时间(成功即有该值):</strong> {{.Order.ReceiveSuccessTime}}
|
||||
<strong>最后一次核销时间(核销即有该值):</strong> {{.Order.LastUseTime}}
|
||||
<strong>订单备注说明(失败说明):</strong> {{.Order.Remark}}
|
||||
{{else}}
|
||||
<h1 style="color: #FF6600">{{.ErrMsg}}</h1>
|
||||
{{end}}
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue