修改音频补位
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"strconv"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -13,7 +14,7 @@ func TestPrintMsg(t *testing.T) {
|
||||
msg := &model.PrintMsg{
|
||||
ModelIDCULD: model.ModelIDCULD{},
|
||||
PrintNo: "20220707000002",
|
||||
Content: "<sound>21</sound>",
|
||||
Content: "<sound>10</sound>",
|
||||
OrderNo: 202207261655,
|
||||
Status: 0,
|
||||
Comment: "",
|
||||
@@ -44,7 +45,14 @@ func Test10Two16(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCheckSum(t *testing.T) {
|
||||
aa := getCheckSum(``)
|
||||
fmt.Println(aa)
|
||||
|
||||
soundNum, _ := hex.DecodeString("3130") // 十六进制转字符串
|
||||
intSound, _ := strconv.ParseInt(string(soundNum), 10, 64)
|
||||
int16Sound := strconv.FormatInt(intSound, 16)
|
||||
b := strconv.FormatInt(16, 16)
|
||||
if int16Sound < b {
|
||||
fmt.Println("111111")
|
||||
} else {
|
||||
fmt.Println("22222")
|
||||
}
|
||||
fmt.Println("==========", int16Sound)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user