Commit 273ed267 by 孙龙

up

parent f725a611
Showing with 20 additions and 2 deletions
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
dns="huntdbuser:mLssy2@@!!@$#yy@tcp(172.18.137.21:3306)/hunt2016?parseTime=true" dns="huntdbuser:mLssy2@@!!@$#yy@tcp(172.18.137.21:3306)/hunt2016?parseTime=true"
[LiexinLabel_databases] [LiexinLabel_databases]
dns="lie_labels:lie_labels#zsyM@tcp(192.168.2.232:3306)/lie_labels?parseTime=true" dns="LabxsuT:Plz2#$afsPqmz@#5@tcp(172.18.137.34:3306)/lie_labels?parseTime=true"
[Liexincms_databases] [Liexincms_databases]
dns="dtuser:dAtaL#ym2902m2lLX2y33@tcp(172.18.137.21:3306)/icdata?parseTime=true" dns="dtuser:dAtaL#ym2902m2lLX2y33@tcp(172.18.137.21:3306)/icdata?parseTime=true"
......
...@@ -4,6 +4,8 @@ import ( ...@@ -4,6 +4,8 @@ import (
"errors" "errors"
"fmt" "fmt"
"go-queue-server/dal/db" "go-queue-server/dal/db"
"strconv"
"strings"
"time" "time"
) )
...@@ -45,6 +47,22 @@ type UserInfo struct { ...@@ -45,6 +47,22 @@ type UserInfo struct {
UserId int `db:"userId"` UserId int `db:"userId"`
} }
func unicodeToZW(str string) string{
sUnicodev := strings.Split(str, "\\u")
var context string
for _, v := range sUnicodev {
if len(v) < 1 {
continue
}
temp, err := strconv.ParseInt(v, 16, 32)
if err != nil {
panic(err)
}
context += fmt.Sprintf("%c", temp)
}
return context
}
func AddTmplRelations(relations TemplateRelation) error{ func AddTmplRelations(relations TemplateRelation) error{
var( var(
err error err error
...@@ -52,7 +70,7 @@ func AddTmplRelations(relations TemplateRelation) error{ ...@@ -52,7 +70,7 @@ func AddTmplRelations(relations TemplateRelation) error{
) )
//找出销售员对应后台登陆的用户id //找出销售员对应后台登陆的用户id
userInfo := UserInfo{} userInfo := UserInfo{}
err = db.CmsDB.Get(&userInfo,"select userId from user_info where name = ? ",relations.CreateUser); err = db.CmsDB.Get(&userInfo,"select userId from user_info where name = ? ",fmt.Sprintf(relations.CreateUser));
if err != nil{ if err != nil{
return errors.New(fmt.Sprintf("没找到对应的销售员: %s ",relations.CreateUser)) return errors.New(fmt.Sprintf("没找到对应的销售员: %s ",relations.CreateUser))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment