Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
kaopu-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
a6efa346
authored
Dec 31, 2019
by
Joneq
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
判断sql插入限制
parent
5169c749
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
internal/dao/com_basicinfos.go
internal/dao/com_credits.go
internal/logic/mobile_message.go
internal/dao/com_basicinfos.go
View file @
a6efa346
...
@@ -37,7 +37,6 @@ func (d *dao) GetCompanyBaseInfoByCid(c context.Context, companyId int64) (res m
...
@@ -37,7 +37,6 @@ func (d *dao) GetCompanyBaseInfoByCid(c context.Context, companyId int64) (res m
tycInfo
:=
logic
.
HttpGet
(
res
[
"com_name"
])
tycInfo
:=
logic
.
HttpGet
(
res
[
"com_name"
])
tycInfo
[
"com_credits_id"
]
=
res
[
"com_credits_id"
]
tycInfo
[
"com_credits_id"
]
=
res
[
"com_credits_id"
]
tycInfo
[
"tyc_select_num"
]
=
"1"
tycInfo
[
"tyc_select_num"
]
=
"1"
fmt
.
Println
(
tycInfo
)
d
.
UpdateCompanyBaseInfoForTyc
(
c
,
tycInfo
)
d
.
UpdateCompanyBaseInfoForTyc
(
c
,
tycInfo
)
logic
.
SendMessage
(
logic
.
StringTurnInt64
(
res
[
"legal_mobile_phone"
]),
""
)
logic
.
SendMessage
(
logic
.
StringTurnInt64
(
res
[
"legal_mobile_phone"
]),
""
)
}
}
...
...
internal/dao/com_credits.go
View file @
a6efa346
...
@@ -15,7 +15,7 @@ func (d *dao) GetCompanyCresitsList(ctx context.Context) (res []map[string]strin
...
@@ -15,7 +15,7 @@ func (d *dao) GetCompanyCresitsList(ctx context.Context) (res []map[string]strin
var
(
var
(
rows
*
sql
.
Rows
rows
*
sql
.
Rows
)
)
if
rows
,
err
=
d
.
db
.
Query
(
ctx
,
"SELECT "
+
SqlField
+
" FROM lie_com_credits where id >
4907
"
);
err
!=
nil
{
if
rows
,
err
=
d
.
db
.
Query
(
ctx
,
"SELECT "
+
SqlField
+
" FROM lie_com_credits where id >
5022
"
);
err
!=
nil
{
err
=
errors
.
WithStack
(
err
)
err
=
errors
.
WithStack
(
err
)
return
return
}
}
...
...
internal/logic/mobile_message.go
View file @
a6efa346
...
@@ -14,6 +14,7 @@ const APIDOMAIN string = "http://api.ichunt.com/msg/sendMessageByAuto"
...
@@ -14,6 +14,7 @@ const APIDOMAIN string = "http://api.ichunt.com/msg/sendMessageByAuto"
func
SendMessage
(
mobile
int64
,
content
string
){
func
SendMessage
(
mobile
int64
,
content
string
){
if
mobile
!=
0
{
timeNow
:=
time
.
Now
()
.
Unix
()
timeNow
:=
time
.
Now
()
.
Unix
()
requestContent
,
_
:=
json
.
Marshal
(
map
[
string
]
string
{
"content"
:
content
})
requestContent
,
_
:=
json
.
Marshal
(
map
[
string
]
string
{
"content"
:
content
})
requestTel
,
_
:=
json
.
Marshal
([]
int64
{
mobile
})
requestTel
,
_
:=
json
.
Marshal
([]
int64
{
mobile
})
...
@@ -31,5 +32,6 @@ func SendMessage(mobile int64 , content string){
...
@@ -31,5 +32,6 @@ func SendMessage(mobile int64 , content string){
fmt
.
Print
(
err
)
fmt
.
Print
(
err
)
}
}
defer
resp
.
Body
.
Close
()
defer
resp
.
Body
.
Close
()
}
}
}
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