feat(app): update

This commit is contained in:
Yangtao
2025-11-18 18:33:22 +08:00
parent 6e56cab848
commit 7c0ad28e96
27 changed files with 20 additions and 673 deletions

View File

@ -7,9 +7,9 @@ import (
"github.com/aliyun/alibaba-cloud-sdk-go/services/slb"
)
// LTAI5tCB8SmJcwfO
// dX4kgF4VcblsbCVdKvtCGCmvNbLkZK
// ./AliyunCloudClient -t b -o update -key LTAI5tCB8SmJcwfO -sec dX4kgF4VcblsbCVdKvtCGCmvNbLkZK -reg cn-hangzhou -lb "[{"ServerId":"ServerId","Weight":"0"}]
// LTAI5tCB8SmJcwfO1
// dX4kgF4VcblsbCVdKvtCGCmvNbLkZK1
// ./AliyunCloudClient -t b -o update -key LTAI5tCB8SmJcwfO1 -sec dX4kgF4VcblsbCVdKvtCGCmvNbLkZK1 -reg cn-hangzhou -lb "[{"ServerId":"ServerId","Weight":"0"}]
func main() {
var target string
flag.StringVar(&target, "t", "b", "target: b=backendServer")

View File

@ -9,7 +9,7 @@ import (
)
func main02() {
data := ReadSheet("./CmdTools/星钻VIP体系.xlsx", 0)
data := ReadSheet("./CmdTools/1.xlsx", 0)
fmt.Println(json.Marshal(data))
for index, item := range data {
if index > 0 {

View File

@ -10,8 +10,8 @@ import (
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
)
// ./TencentCloudClient -t b -o add -key AKIDSoxxjI5tukPr9ECsQmwthKhroaCZlldI -sec b1FG2b3JMrESVLxjJdhYDgx12qPiplXB -reg ap-shanghai -params "{\"LoadBalancerId\":\"lb-jip7505r\",\"Targets\":[{\"InstanceId\":\"ins-n2i7x483\",\"Weight\":20}]}"
// ./TencentCloudClient -t b -o remove -key AKIDSoxxjI5tukPr9ECsQmwthKhroaCZlldI -sec b1FG2b3JMrESVLxjJdhYDgx12qPiplXB -reg ap-shanghai -params "{\"LoadBalancerId\":\"lb-jip7505r\",\"InstanceIds\":[\"ins-n2i7x483\"]}"
// ./TencentCloudClient -t b -o add -key AKIDSoxxjI5tukPr9ECsQmwthKhroaCZlldI1 -sec b1FG2b3JMrESVLxjJdhYDgx12qPiplXB1 -reg ap-shanghai -params "{\"LoadBalancerId\":\"lb-jip7505r\",\"Targets\":[{\"InstanceId\":\"ins-n2i7x483\",\"Weight\":20}]}"
// ./TencentCloudClient -t b -o remove -key AKIDSoxxjI5tukPr9ECsQmwthKhroaCZlldI1 -sec b1FG2b3JMrESVLxjJdhYDgx12qPiplXB1 -reg ap-shanghai -params "{\"LoadBalancerId\":\"lb-jip7505r\",\"InstanceIds\":[\"ins-n2i7x483\"]}"
func main03() {
var target string

View File

@ -14,7 +14,6 @@ const (
// API_V_NUM = "1"
//API密钥
// API_SECRECT = "x63363eacf804b4394a120aea240fd9a"
//图片域名
@ -23,8 +22,6 @@ const (
MEDIA_URL_PREV = "https://media-qiniu-app.ddegame.cn/"
//====== 三方key =======
//NETEASE_IM_APPKEY = "a0671ecde01ef03928ccfd460c62d203"
//NETEASE_IM_SECRET = "eb88916031ca"
//用户认证申请状态
USER_CERTIFY_STATUS_INIT = "1" //已提交

View File

@ -1267,9 +1267,6 @@ const (
ICON_TYPE_VIP = "VIP"
ICON_TYPE_NOBILITY = "NOBILITY"
ICON_TYPE_MEDAL = "MEDAL"
H5ROOM_API_SECRET = "H5ROOM_API_SECRET" //H5客户端key
INNER_API_SECRET_TRADE = "INNER_API_SECRET_TRADE_kasdhfih" //trade客户端key
)
const (

View File

@ -99,7 +99,6 @@ func (client *ImClient) CreateImUser(userId, nickName, avatar string) error {
logs.Info("YunXin_SignUp_Fail_AccID_%s:"+err.Error(), userId)
return err
} else {
// {"code":200,"info":{"token":"123456","accid":"b8af4bebe2064435974ba2340d852055","name":"b8af4bebe2064435974ba2340d852055"}}
var resDTO CreateImRes
json.Unmarshal([]byte(res), &resDTO)
if resDTO.Code != 200 {
@ -128,8 +127,6 @@ func (client *ImClient) GetImUserInfo(userId string) error {
byteData, _ := json.Marshal(accids)
sb.Append("accids=" + string(byteData))
res, err := HyTools.HttpDo(httpMethod, url, header, sb.ToString())
// #查询云信用户信息结果:{"desc":"b8af4bebe2064435974ba2340d852055not register","code":414}#
// {"code":200,"uinfos":[{"icon":"https://xzphoto.meetalk.tech/upload/6bba4098-6ea8-4758-8193-19abed540c0b.0","accid":"2251bae8a0514e6892f0374f5dd260d4","name":"弦乐","gender":0}]}
logs.Info("#" + "查询云信用户信息结果:" + res + "#")
var body map[string]interface{}
if errJson := json.Unmarshal([]byte(res), &body); errJson != nil {
@ -219,7 +216,6 @@ func (client *ImClient) CreateChatroom(ownerUserId string, roomName string) (cha
logs.Info(common.LOG_QUOTE_STRING + "云信创建聊天室请求失败:" + err.Error() + common.LOG_QUOTE_STRING)
return
}
// {"valid":true,"ext":"","creator":"1b94b5e7af8a45ed9fda27d28165d4c9","name":"32452345","muted":false,"roomid":11142139973,"queuelevel":0}
logs.Info(common.LOG_QUOTE_STRING + "云信创建聊天室结果:" + res + common.LOG_QUOTE_STRING)
var createRes CreateChatroomResponse
err1 := json.Unmarshal([]byte(res), &createRes)

View File

@ -1,124 +0,0 @@
package Netease
import (
"context"
"testing"
)
// 测试获取IM用户信息
func TestImClient_GetImUserInfo(t *testing.T) {
type fields struct {
AppKey string
AppSecret string
}
type args struct {
userId string
}
tests := []struct {
name string
fields fields
args args
wantErr bool
}{
{
name: "test",
fields: fields{
AppKey: "543b1a440b940b170fccdf494839efc01",
AppSecret: "41134093938f1",
},
args: args{
// 2251bae8a0514e6892f0374f5dd260d4
// b8af4bebe2064435974ba2340d852055
userId: "fcda23bc00e641f5ae17492503b566ed",
},
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &ImClient{
AppKey: tt.fields.AppKey,
AppSecret: tt.fields.AppSecret,
}
if err := client.GetImUserInfo(tt.args.userId); (err != nil) != tt.wantErr {
t.Errorf("GetImUserInfo() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}
// 测试注册IM用户
func TestImClient_CreateImUser(t *testing.T) {
type fields struct {
AppKey string
AppSecret string
}
type args struct {
userId string
nickname string
avatar string
}
tests := []struct {
name string
fields fields
args args
wantErr bool
}{
{
name: "test",
fields: fields{
AppKey: "543b1a440b940b170fccdf494839efc01",
AppSecret: "41134093938f1",
},
args: args{
// 2251bae8a0514e6892f0374f5dd260d4
// b8af4bebe2064435974ba2340d852055
userId: "fcda23bc00e641f5ae17492503b566ed",
nickname: "杏",
avatar: "https://photo-app.ddegame.cn/upload/19986a27-3bae-49f7-9643-cd18cda87557.jpg",
},
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &ImClient{
AppKey: tt.fields.AppKey,
AppSecret: tt.fields.AppSecret,
}
if err := client.CreateImUser(tt.args.userId, tt.args.nickname, tt.args.avatar); (err != nil) != tt.wantErr {
t.Errorf("GetImUserInfo() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}
// 测试注册IM用户
func TestImClient_CreateImUserOne(t *testing.T) {
client := &ImClient{
AppKey: "543b1a440b940b170fccdf494839efc01",
AppSecret: "41134093938f1",
}
client.CreateImUser("fcda23bc00e641f5ae17492503b566ed", "杏", "https://photo-app.ddegame.cn/upload/19986a27-3bae-49f7-9643-cd18cda87557.jpg")
}
func TestImClient_CreateChatGroup(t *testing.T) {
client := &ImClient{
AppKey: "543b1a440b940b170fccdf494839efc01",
AppSecret: "41134093938f1",
}
groupId, err := client.CreateChatGroup(context.Background(), "e1fbefbbd77a402e8c2101a0ebe15f5d", "测试群", []string{"e1fbefbbd77a402e8c2101a0ebe15f5d"})
if err != nil {
t.Error(err)
}
println(groupId)
}
func init() {
// viper.SetConfigName("dev.yaml")
// viper.AddConfigPath("../../../configs/admin/")
// viper.SetConfigType("yaml")
// _ = viper.ReadInConfig()
// log.Init()
// datasource.InitMySQlMaster()
}

View File

@ -1,9 +0,0 @@
package pinyin
import "testing"
func TestTo_Py(t *testing.T) {
LoadingPYFile("./pinyin.txt")
s, _ := PY("3425另264325一4个44平444台")
println(s)
}