From 1adf08474c9e03d7ab37d150753fc01d1c4cd22d Mon Sep 17 00:00:00 2001 From: Ryan Su Date: Sat, 6 Jan 2024 10:33:05 +0800 Subject: [PATCH 1/2] chore: upgrade deps --- desc/mms/oauth_provider.api | 2 +- go.mod | 32 +++++----- go.sum | 64 +++++++++---------- .../publicmember/login_by_email_logic.go | 2 +- .../logic/publicmember/login_by_sms_logic.go | 2 +- internal/logic/publicmember/login_logic.go | 2 +- .../logic/publicoauth/oauth_callback_logic.go | 4 +- .../wechat_mini_program_login_logic.go | 4 +- internal/types/types.go | 2 +- mms.go | 2 +- mms.json | 4 +- 11 files changed, 60 insertions(+), 60 deletions(-) diff --git a/desc/mms/oauth_provider.api b/desc/mms/oauth_provider.api index eb40bf1..23e3c61 100644 --- a/desc/mms/oauth_provider.api +++ b/desc/mms/oauth_provider.api @@ -112,7 +112,7 @@ type ( Token string `json:"token"` // Expire timestamp | 过期时间戳 - Expire uint64 `json:"expire"` + Expire int64 `json:"expire"` // Avatar | 用户头像 Avatar string `json:"avatar"` diff --git a/go.mod b/go.mod index 836d7b7..b958f3d 100644 --- a/go.mod +++ b/go.mod @@ -2,17 +2,17 @@ module github.com/suyuan32/simple-admin-member-api go 1.21.0 -replace github.com/zeromicro/go-zero v1.6.1 => github.com/suyuan32/simple-admin-tools v1.6.3 +replace github.com/zeromicro/go-zero v1.6.1 => github.com/suyuan32/simple-admin-tools v1.6.4 require ( - github.com/casbin/casbin/v2 v2.80.0 + github.com/casbin/casbin/v2 v2.81.0 github.com/duke-git/lancet/v2 v2.2.8 github.com/mojocn/base64Captcha v1.3.6 github.com/redis/go-redis/v9 v9.3.1 - github.com/suyuan32/simple-admin-common v1.3.0 - github.com/suyuan32/simple-admin-core v1.3.0 + github.com/suyuan32/simple-admin-common v1.3.1 + github.com/suyuan32/simple-admin-core v1.3.1 github.com/suyuan32/simple-admin-member-rpc v1.2.1 - github.com/suyuan32/simple-admin-message-center v1.3.0 + github.com/suyuan32/simple-admin-message-center v1.3.1 github.com/zeromicro/go-zero v1.6.1 ) @@ -72,7 +72,7 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-sqlite3 v1.14.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -81,10 +81,10 @@ require ( github.com/openzipkin/zipkin-go v0.4.2 // indirect github.com/pelletier/go-toml/v2 v2.1.1 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.17.0 // indirect - github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.11.1 // indirect + github.com/prometheus/client_golang v1.18.0 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/zclconf/go-cty v1.13.1 // indirect go.etcd.io/etcd/api/v3 v3.5.11 // indirect @@ -104,7 +104,7 @@ require ( go.uber.org/automaxprocs v1.5.3 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.16.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect golang.org/x/image v0.13.0 // indirect golang.org/x/mod v0.12.0 // indirect @@ -115,11 +115,11 @@ require ( golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231211222908-989df2bf70f3 // indirect + google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect google.golang.org/grpc v1.60.1 // indirect - google.golang.org/protobuf v1.31.1-0.20231027082548-f4a6c1f6e5c1 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -128,7 +128,7 @@ require ( k8s.io/client-go v0.29.0 // indirect k8s.io/klog/v2 v2.110.1 // indirect k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect - k8s.io/utils v0.0.0-20231127182322-b307cd553661 // indirect + k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/go.sum b/go.sum index baff438..78630ed 100644 --- a/go.sum +++ b/go.sum @@ -53,8 +53,8 @@ github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdb github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/casbin/casbin/v2 v2.29.2/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= -github.com/casbin/casbin/v2 v2.80.0 h1:khGQBLnC+4XuAoGH/KW1JvyY0/nfFG8AhgzDrQKCH/g= -github.com/casbin/casbin/v2 v2.80.0/go.mod h1:jX8uoN4veP85O/n2674r2qtfSXI6myvxW85f6TH50fw= +github.com/casbin/casbin/v2 v2.81.0 h1:vNwJXK7a+TJZElZ5saP+SFJvweZNtJ3MlVP6P4IuRqE= +github.com/casbin/casbin/v2 v2.81.0/go.mod h1:jX8uoN4veP85O/n2674r2qtfSXI6myvxW85f6TH50fw= github.com/casbin/ent-adapter v0.3.0 h1:4lkhB/BwXAhj84iSrZG/gQ4avkO4uPwz4kdDP1VEnww= github.com/casbin/ent-adapter v0.3.0/go.mod h1:U6saAFuVDEOWLCtrgx35d95M12FC0uh5GtJL82QunRM= github.com/casbin/govaluate v1.1.0 h1:6xdCWIpE9CwHdZhlVQW+froUrCsjb6/ZYNcXODfLT+E= @@ -350,8 +350,8 @@ github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A github.com/mattn/go-sqlite3 v1.14.19 h1:fhGleo2h1p8tVChob4I9HpmVFIAkKGpiukdrgQbWfGI= github.com/mattn/go-sqlite3 v1.14.19/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -406,21 +406,21 @@ github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4 github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM= -github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/redis/go-redis/v9 v9.3.1 h1:KqdY8U+3X6z+iACvumCNxnoluToB+9Me+TvyFa21Mds= github.com/redis/go-redis/v9 v9.3.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M= @@ -476,16 +476,16 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/suyuan32/simple-admin-common v1.3.0 h1:DQZ6XnRl1cP8aAEbLp35V5RiXe88X1gPQUy8+FmVjhU= -github.com/suyuan32/simple-admin-common v1.3.0/go.mod h1:MI5f0TIeUpiXx7sVvmuYlOm5R5W/wAOBD4BU1nCCs4E= -github.com/suyuan32/simple-admin-core v1.3.0 h1:MtAItbrVUrZcRXp+WDcTnjAmMlbC7qho75/gj43jdfM= -github.com/suyuan32/simple-admin-core v1.3.0/go.mod h1:nWIwqADzx9Un2X/gR9GOcAh5xrdxnPiiSXfNSkgj+Wk= +github.com/suyuan32/simple-admin-common v1.3.1 h1:bpS39kbjg9BHGQN5guHo7GKc/eeh4mXkTDIeKDEzr/U= +github.com/suyuan32/simple-admin-common v1.3.1/go.mod h1:WsrW+h0L0IgIZkiojYdPnXniG4a30S9CI5jQZe+3bRI= +github.com/suyuan32/simple-admin-core v1.3.1 h1:1wv5LB+PXlkKDxFjPNv30QhZW7PnOR/ktgiJH1Owho0= +github.com/suyuan32/simple-admin-core v1.3.1/go.mod h1:cBM/42cVDbw0CQnAikpVsX6r0BNmwhw6GnidNsHAgeU= github.com/suyuan32/simple-admin-member-rpc v1.2.1 h1:uLCjeMhScrmw411ZfGWplpYFc3tn4VYq4jxxzqMkBAw= github.com/suyuan32/simple-admin-member-rpc v1.2.1/go.mod h1:HnTxLs9U9vR6rvy/kWbGjSxe1lIOUoPlIuylDYJshOY= -github.com/suyuan32/simple-admin-message-center v1.3.0 h1:VEl1xUqKAsesqco731sescf390Pfyl6chBZh7uW9KWk= -github.com/suyuan32/simple-admin-message-center v1.3.0/go.mod h1:vz4XCEkkmHU9EZ10J+v3AJRgZaBWFGE/uFOhl2Qic1I= -github.com/suyuan32/simple-admin-tools v1.6.3 h1:BgasHW7GBJfbOhQqvdnovATYpGEsEEd2PtGS0xfksuQ= -github.com/suyuan32/simple-admin-tools v1.6.3/go.mod h1:TxS7kvMSnTI0HrqCXUjDoSfuQh+WfJ1x073DzVs3UAc= +github.com/suyuan32/simple-admin-message-center v1.3.1 h1:RbxEh4P+qmiP68pBbrl+YVe5KKz/KF1s1NWqHzBnNuE= +github.com/suyuan32/simple-admin-message-center v1.3.1/go.mod h1:PoMbujDoGRUzlOfxaMtK3o9UVo0iXwmos3qTgQh30ZQ= +github.com/suyuan32/simple-admin-tools v1.6.4 h1:JZ1mj4MbbpMoV0CGr6zHwU18cdD09dI29kE/LPq/A2c= +github.com/suyuan32/simple-admin-tools v1.6.4/go.mod h1:F02Swh4+lg6i17gkedxrRuAKPKjUG425wU9q2hCxefQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -562,8 +562,8 @@ golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -749,12 +749,12 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 h1:1hfbdAfFbkmpg41000wDVqr7jUpK/Yo+LPnIxxGzmkg= -google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3/go.mod h1:5RBcpGRxr25RbDzY5w+dmaqpSEvl8Gwl1x2CICf60ic= -google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 h1:s1w3X6gQxwrLEpxnLd/qXTVLgQE2yXwaOaoa6IlY/+o= -google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0/go.mod h1:CAny0tYF+0/9rmDB9fahA9YLzX3+AEVl1qXbv5hhj6c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231211222908-989df2bf70f3 h1:kzJAXnzZoFbe5bhZd4zjUuHos/I31yH4thfMb/13oVY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231211222908-989df2bf70f3/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM= +google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 h1:YJ5pD9rF8o9Qtta0Cmy9rdBwkSjrTCT6XTiUQVOtIos= +google.golang.org/genproto v0.0.0-20231212172506-995d672761c0/go.mod h1:l/k7rMz0vFTBPy+tFSGvXEd3z+BcoG1k7EHbqm+YBsY= +google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 h1:rcS6EyEaoCO52hQDupoSfrxI3R6C2Tq741is7X8OvnM= +google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 h1:/jFB8jK5R3Sq3i/lmeZO0cATSzFfZaJq1J2Euan3XKU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0/go.mod h1:FUoWkonphQm3RhTS+kOEhF8h0iDpm4tdXolVCeZ9KKA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -775,8 +775,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.1-0.20231027082548-f4a6c1f6e5c1 h1:fk72uXZyuZiTtW5tgd63jyVK6582lF61nRC/kGv6vCA= -google.golang.org/protobuf v1.31.1-0.20231027082548-f4a6c1f6e5c1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -817,8 +817,8 @@ k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= -k8s.io/utils v0.0.0-20231127182322-b307cd553661 h1:FepOBzJ0GXm8t0su67ln2wAZjbQ6RxQGZDnzuLcrUTI= -k8s.io/utils v0.0.0-20231127182322-b307cd553661/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= diff --git a/internal/logic/publicmember/login_by_email_logic.go b/internal/logic/publicmember/login_by_email_logic.go index 7c0594c..8c54277 100644 --- a/internal/logic/publicmember/login_by_email_logic.go +++ b/internal/logic/publicmember/login_by_email_logic.go @@ -78,7 +78,7 @@ func (l *LoginByEmailLogic) LoginByEmail(req *types.LoginByEmailReq) (resp *type } // add token into database - expiredAt := time.Now().Add(time.Second * time.Duration(l.svcCtx.Config.Auth.AccessExpire)).Unix() + expiredAt := time.Now().Add(time.Second * time.Duration(l.svcCtx.Config.Auth.AccessExpire)).UnixMilli() _, err = l.svcCtx.MmsRpc.CreateToken(l.ctx, &mms.TokenInfo{ Uuid: memberData.Data[0].Id, Token: pointy.GetPointer(token), diff --git a/internal/logic/publicmember/login_by_sms_logic.go b/internal/logic/publicmember/login_by_sms_logic.go index c86289d..b46d21e 100644 --- a/internal/logic/publicmember/login_by_sms_logic.go +++ b/internal/logic/publicmember/login_by_sms_logic.go @@ -78,7 +78,7 @@ func (l *LoginBySmsLogic) LoginBySms(req *types.LoginBySmsReq) (resp *types.Logi } // add token into database - expiredAt := time.Now().Add(time.Second * time.Duration(l.svcCtx.Config.Auth.AccessExpire)).Unix() + expiredAt := time.Now().Add(time.Second * time.Duration(l.svcCtx.Config.Auth.AccessExpire)).UnixMilli() _, err = l.svcCtx.MmsRpc.CreateToken(l.ctx, &mms.TokenInfo{ Uuid: memberData.Data[0].Id, Token: pointy.GetPointer(token), diff --git a/internal/logic/publicmember/login_logic.go b/internal/logic/publicmember/login_logic.go index 3867c94..45ece4c 100644 --- a/internal/logic/publicmember/login_logic.go +++ b/internal/logic/publicmember/login_logic.go @@ -77,7 +77,7 @@ func (l *LoginLogic) Login(req *types.LoginReq) (resp *types.LoginResp, err erro } // add token into database - expiredAt := time.Now().Add(time.Second * time.Duration(l.svcCtx.Config.Auth.AccessExpire)).Unix() + expiredAt := time.Now().Add(time.Second * time.Duration(l.svcCtx.Config.Auth.AccessExpire)).UnixMilli() _, err = l.svcCtx.MmsRpc.CreateToken(l.ctx, &mms.TokenInfo{ Uuid: user.Id, Token: pointy.GetPointer(token), diff --git a/internal/logic/publicoauth/oauth_callback_logic.go b/internal/logic/publicoauth/oauth_callback_logic.go index 46f0964..716aacb 100644 --- a/internal/logic/publicoauth/oauth_callback_logic.go +++ b/internal/logic/publicoauth/oauth_callback_logic.go @@ -47,7 +47,7 @@ func (l *OauthCallbackLogic) OauthCallback() (resp *types.CallbackResp, err erro result.RankCode), jwt.WithOption("roleId", "invalid")) // add token into database - expiredAt := time.Now().Add(time.Second * 259200).Unix() + expiredAt := time.Now().Add(time.Second * time.Duration(l.svcCtx.Config.Auth.AccessExpire)).UnixMilli() _, err = l.svcCtx.MmsRpc.CreateToken(l.ctx, &mms.TokenInfo{ Uuid: result.Id, Token: pointy.GetPointer(token), @@ -65,7 +65,7 @@ func (l *OauthCallbackLogic) OauthCallback() (resp *types.CallbackResp, err erro Data: types.CallbackInfo{ UserId: *result.Id, Token: token, - Expire: uint64(time.Now().Add(time.Second * 259200).Unix()), + Expire: expiredAt, Avatar: *result.Avatar, RankId: *result.RankCode, RankName: publicmember.MemberRankData[*result.RankId], diff --git a/internal/logic/publicoauth/wechat_mini_program_login_logic.go b/internal/logic/publicoauth/wechat_mini_program_login_logic.go index 2e6e3d3..9cfe397 100644 --- a/internal/logic/publicoauth/wechat_mini_program_login_logic.go +++ b/internal/logic/publicoauth/wechat_mini_program_login_logic.go @@ -51,7 +51,7 @@ func (l *WechatMiniProgramLoginLogic) WechatMiniProgramLogin(req *types.WechatMi data.Data[0].RankCode), jwt.WithOption("roleId", "invalid")) // add token into database - expiredAt := time.Now().Add(time.Second * 259200).Unix() + expiredAt := time.Now().Add(time.Second * time.Duration(l.svcCtx.Config.Auth.AccessExpire)).UnixMilli() _, err = l.svcCtx.MmsRpc.CreateToken(l.ctx, &mms.TokenInfo{ Uuid: data.Data[0].Id, Token: pointy.GetPointer(token), @@ -69,7 +69,7 @@ func (l *WechatMiniProgramLoginLogic) WechatMiniProgramLogin(req *types.WechatMi Data: types.CallbackInfo{ UserId: *data.Data[0].Id, Token: token, - Expire: uint64(time.Now().Add(time.Second * 259200).Unix()), + Expire: expiredAt, Avatar: *data.Data[0].Avatar, RankId: *data.Data[0].RankCode, RankName: publicmember.MemberRankData[*data.Data[0].RankId], diff --git a/internal/types/types.go b/internal/types/types.go index ceb43ac..2180303 100644 --- a/internal/types/types.go +++ b/internal/types/types.go @@ -580,7 +580,7 @@ type CallbackInfo struct { // Token for authorization | 验证身份的token Token string `json:"token"` // Expire timestamp | 过期时间戳 - Expire uint64 `json:"expire"` + Expire int64 `json:"expire"` // Avatar | 用户头像 Avatar string `json:"avatar"` // Nickname | 用户昵称 diff --git a/mms.go b/mms.go index f4b4a5b..f7c5aee 100644 --- a/mms.go +++ b/mms.go @@ -5,7 +5,7 @@ // Schemes: http, https // Host: localhost:9104 // BasePath: / -// Version: 1.2.1 +// Version: 1.2.2 // SecurityDefinitions: // Token: // type: apiKey diff --git a/mms.json b/mms.json index f470d99..a8a5cc4 100644 --- a/mms.json +++ b/mms.json @@ -13,7 +13,7 @@ "info": { "description": "MMS: Member Management Service", "title": "Simple Admin Member Management Service", - "version": "1.2.1" + "version": "1.2.2" }, "host": "localhost:9104", "basePath": "/", @@ -1221,7 +1221,7 @@ "expire": { "description": "Expire timestamp | 过期时间戳", "type": "integer", - "format": "uint64", + "format": "int64", "x-go-name": "Expire" }, "nickname": { From 3fa9da46b56ecc83181c1b35975566742ad0fb42 Mon Sep 17 00:00:00 2001 From: Ryan Su Date: Sat, 6 Jan 2024 10:38:27 +0800 Subject: [PATCH 2/2] chore: upgrade deps --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b958f3d..080dda4 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/redis/go-redis/v9 v9.3.1 github.com/suyuan32/simple-admin-common v1.3.1 github.com/suyuan32/simple-admin-core v1.3.1 - github.com/suyuan32/simple-admin-member-rpc v1.2.1 + github.com/suyuan32/simple-admin-member-rpc v1.2.2 github.com/suyuan32/simple-admin-message-center v1.3.1 github.com/zeromicro/go-zero v1.6.1 ) diff --git a/go.sum b/go.sum index 78630ed..990e608 100644 --- a/go.sum +++ b/go.sum @@ -480,8 +480,8 @@ github.com/suyuan32/simple-admin-common v1.3.1 h1:bpS39kbjg9BHGQN5guHo7GKc/eeh4m github.com/suyuan32/simple-admin-common v1.3.1/go.mod h1:WsrW+h0L0IgIZkiojYdPnXniG4a30S9CI5jQZe+3bRI= github.com/suyuan32/simple-admin-core v1.3.1 h1:1wv5LB+PXlkKDxFjPNv30QhZW7PnOR/ktgiJH1Owho0= github.com/suyuan32/simple-admin-core v1.3.1/go.mod h1:cBM/42cVDbw0CQnAikpVsX6r0BNmwhw6GnidNsHAgeU= -github.com/suyuan32/simple-admin-member-rpc v1.2.1 h1:uLCjeMhScrmw411ZfGWplpYFc3tn4VYq4jxxzqMkBAw= -github.com/suyuan32/simple-admin-member-rpc v1.2.1/go.mod h1:HnTxLs9U9vR6rvy/kWbGjSxe1lIOUoPlIuylDYJshOY= +github.com/suyuan32/simple-admin-member-rpc v1.2.2 h1:pAqlBint6axy0UFYkgoXx5LPFgcGrW2WF7383Sz+LiA= +github.com/suyuan32/simple-admin-member-rpc v1.2.2/go.mod h1:t/udoinaputbhbLEv2AbM8ZX2m9597KMcOSgREo/yck= github.com/suyuan32/simple-admin-message-center v1.3.1 h1:RbxEh4P+qmiP68pBbrl+YVe5KKz/KF1s1NWqHzBnNuE= github.com/suyuan32/simple-admin-message-center v1.3.1/go.mod h1:PoMbujDoGRUzlOfxaMtK3o9UVo0iXwmos3qTgQh30ZQ= github.com/suyuan32/simple-admin-tools v1.6.4 h1:JZ1mj4MbbpMoV0CGr6zHwU18cdD09dI29kE/LPq/A2c=