Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
golang-queue-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
273ed267
authored
May 22, 2020
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
up
parent
f725a611
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
config/db.toml.pro.demo
dal/label/label.go
config/db.toml.pro.demo
View file @
273ed267
...
...
@@ -3,7 +3,7 @@
dns="huntdbuser:mLssy2@@!!@$#yy@tcp(172.18.137.21:3306)/hunt2016?parseTime=true"
[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]
dns="dtuser:dAtaL#ym2902m2lLX2y33@tcp(172.18.137.21:3306)/icdata?parseTime=true"
...
...
dal/label/label.go
View file @
273ed267
...
...
@@ -4,6 +4,8 @@ import (
"errors"
"fmt"
"go-queue-server/dal/db"
"strconv"
"strings"
"time"
)
...
...
@@ -45,6 +47,22 @@ type UserInfo struct {
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
{
var
(
err
error
...
...
@@ -52,7 +70,7 @@ func AddTmplRelations(relations TemplateRelation) error{
)
//找出销售员对应后台登陆的用户id
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
{
return
errors
.
New
(
fmt
.
Sprintf
(
"没找到对应的销售员: %s "
,
relations
.
CreateUser
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment