更新配置

This commit is contained in:
wh_zcy 2022-09-27 11:43:50 +08:00
parent 2856f18728
commit bffcf2e86d
3 changed files with 38 additions and 40 deletions

View File

@ -84,7 +84,7 @@
}, },
"type_id": 10003, "type_id": 10003,
"active": 0, "active": 0,
"id_after": 10004, "id_after": 30002,
"jump_interface": 103, "jump_interface": 103,
"icon": "rw_cj_icon10", "icon": "rw_cj_icon10",
"reword": [ "reword": [
@ -105,7 +105,7 @@
}, },
"type_id": 10004, "type_id": 10004,
"active": 0, "active": 0,
"id_after": 10005, "id_after": 30003,
"jump_interface": 103, "jump_interface": 103,
"icon": "rw_cj_icon10", "icon": "rw_cj_icon10",
"reword": [ "reword": [
@ -126,7 +126,7 @@
}, },
"type_id": 10005, "type_id": 10005,
"active": 0, "active": 0,
"id_after": 10006, "id_after": 30004,
"jump_interface": 103, "jump_interface": 103,
"icon": "rw_cj_icon10", "icon": "rw_cj_icon10",
"reword": [ "reword": [
@ -147,7 +147,7 @@
}, },
"type_id": 10006, "type_id": 10006,
"active": 0, "active": 0,
"id_after": 10007, "id_after": 30005,
"jump_interface": 103, "jump_interface": 103,
"icon": "rw_cj_icon10", "icon": "rw_cj_icon10",
"reword": [ "reword": [
@ -168,7 +168,7 @@
}, },
"type_id": 10007, "type_id": 10007,
"active": 0, "active": 0,
"id_after": 10008, "id_after": 30006,
"jump_interface": 103, "jump_interface": 103,
"icon": "rw_cj_icon10", "icon": "rw_cj_icon10",
"reword": [ "reword": [
@ -189,7 +189,7 @@
}, },
"type_id": 10008, "type_id": 10008,
"active": 0, "active": 0,
"id_after": 10009, "id_after": 30007,
"jump_interface": 103, "jump_interface": 103,
"icon": "rw_cj_icon10", "icon": "rw_cj_icon10",
"reword": [ "reword": [
@ -210,7 +210,7 @@
}, },
"type_id": 10009, "type_id": 10009,
"active": 0, "active": 0,
"id_after": 10010, "id_after": 30008,
"jump_interface": 103, "jump_interface": 103,
"icon": "rw_cj_icon10", "icon": "rw_cj_icon10",
"reword": [ "reword": [
@ -243,16 +243,16 @@
] ]
}, },
{ {
"key": 30009, "key": 30101,
"id_list": 24, "id_list": 24,
"id_tag": 3, "id_tag": 3,
"task_display": { "task_display": {
"key": "task_30009", "key": "task_30101",
"text": "进行10次普通招募" "text": "进行10次普通招募"
}, },
"type_id": 10203, "type_id": 10203,
"active": 0, "active": 0,
"id_after": 10204, "id_after": 30102,
"jump_interface": 107, "jump_interface": 107,
"icon": "rw_cj_icon15", "icon": "rw_cj_icon15",
"reword": [ "reword": [
@ -264,16 +264,16 @@
] ]
}, },
{ {
"key": 30010, "key": 30102,
"id_list": 25, "id_list": 25,
"id_tag": 3, "id_tag": 3,
"task_display": { "task_display": {
"key": "task_30010", "key": "task_30102",
"text": "进行20次普通招募" "text": "进行20次普通招募"
}, },
"type_id": 10204, "type_id": 10204,
"active": 0, "active": 0,
"id_after": 10205, "id_after": 30103,
"jump_interface": 107, "jump_interface": 107,
"icon": "rw_cj_icon15", "icon": "rw_cj_icon15",
"reword": [ "reword": [
@ -285,16 +285,16 @@
] ]
}, },
{ {
"key": 30011, "key": 30103,
"id_list": 26, "id_list": 26,
"id_tag": 3, "id_tag": 3,
"task_display": { "task_display": {
"key": "task_30011", "key": "task_30103",
"text": "进行50次普通招募" "text": "进行50次普通招募"
}, },
"type_id": 10205, "type_id": 10205,
"active": 0, "active": 0,
"id_after": 10206, "id_after": 30104,
"jump_interface": 107, "jump_interface": 107,
"icon": "rw_cj_icon15", "icon": "rw_cj_icon15",
"reword": [ "reword": [
@ -306,16 +306,16 @@
] ]
}, },
{ {
"key": 30012, "key": 30104,
"id_list": 27, "id_list": 27,
"id_tag": 3, "id_tag": 3,
"task_display": { "task_display": {
"key": "task_30012", "key": "task_30104",
"text": "进行100次普通招募" "text": "进行100次普通招募"
}, },
"type_id": 10206, "type_id": 10206,
"active": 0, "active": 0,
"id_after": 10207, "id_after": 30105,
"jump_interface": 107, "jump_interface": 107,
"icon": "rw_cj_icon15", "icon": "rw_cj_icon15",
"reword": [ "reword": [
@ -327,16 +327,16 @@
] ]
}, },
{ {
"key": 30013, "key": 30105,
"id_list": 28, "id_list": 28,
"id_tag": 3, "id_tag": 3,
"task_display": { "task_display": {
"key": "task_30013", "key": "task_30105",
"text": "进行200次普通招募" "text": "进行200次普通招募"
}, },
"type_id": 10207, "type_id": 10207,
"active": 0, "active": 0,
"id_after": 10208, "id_after": 30106,
"jump_interface": 107, "jump_interface": 107,
"icon": "rw_cj_icon15", "icon": "rw_cj_icon15",
"reword": [ "reword": [
@ -348,16 +348,16 @@
] ]
}, },
{ {
"key": 30014, "key": 30106,
"id_list": 29, "id_list": 29,
"id_tag": 3, "id_tag": 3,
"task_display": { "task_display": {
"key": "task_30014", "key": "task_30106",
"text": "进行300次普通招募" "text": "进行300次普通招募"
}, },
"type_id": 10208, "type_id": 10208,
"active": 0, "active": 0,
"id_after": 10209, "id_after": 30107,
"jump_interface": 107, "jump_interface": 107,
"icon": "rw_cj_icon15", "icon": "rw_cj_icon15",
"reword": [ "reword": [
@ -369,16 +369,16 @@
] ]
}, },
{ {
"key": 30015, "key": 30107,
"id_list": 30, "id_list": 30,
"id_tag": 3, "id_tag": 3,
"task_display": { "task_display": {
"key": "task_30015", "key": "task_30107",
"text": "进行500次普通招募" "text": "进行500次普通招募"
}, },
"type_id": 10209, "type_id": 10209,
"active": 0, "active": 0,
"id_after": 10210, "id_after": 30108,
"jump_interface": 107, "jump_interface": 107,
"icon": "rw_cj_icon15", "icon": "rw_cj_icon15",
"reword": [ "reword": [
@ -390,11 +390,11 @@
] ]
}, },
{ {
"key": 30016, "key": 30108,
"id_list": 31, "id_list": 31,
"id_tag": 3, "id_tag": 3,
"task_display": { "task_display": {
"key": "task_30016", "key": "task_30108",
"text": "进行1000次普通招募" "text": "进行1000次普通招募"
}, },
"type_id": 10210, "type_id": 10210,

View File

@ -123,7 +123,6 @@ func (ss *SSHService) ScpCopy(localFilePath, remoteDir string) error {
} }
defer sftpClient.Close() defer sftpClient.Close()
srcFile, err := os.Open(localFilePath) srcFile, err := os.Open(localFilePath)
if err != nil { if err != nil {
log.Println("scpCopy:", err) log.Println("scpCopy:", err)
@ -139,14 +138,13 @@ func (ss *SSHService) ScpCopy(localFilePath, remoteDir string) error {
} }
defer dstFile.Close() defer dstFile.Close()
buf := make([]byte, 1024) fileByte, err := ioutil.ReadAll(srcFile)
for { if nil != err {
n, _ := srcFile.Read(buf) return fmt.Errorf("read local file failed: %w", err)
if n == 0 {
break
}
dstFile.Write(buf[0:n])
} }
dstFile.Write(fileByte)
return nil return nil
} }
func (ss *SSHService) Scp(targetDir, srcFileName string) (int, error) { func (ss *SSHService) Scp(targetDir, srcFileName string) (int, error) {

View File

@ -37,7 +37,7 @@ func TestScp(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
if err := ssh.ScpCopy(`E:/svn/dreamworks/client/dreamworks/ExcelFile/check.bat`, "/opt"); err != nil { if err := ssh.ScpCopy(`E:/svn/dreamworks/client/dreamworks/ExcelFile/testscp.txt`, "/opt"); err != nil {
fmt.Println(err) fmt.Println(err)
} }