Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
wang
/
go_supplier_task
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
81abd60d
authored
Mar 23, 2021
by
wang
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
^
parent
ecfc44e0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
service/service_supplier.go
service/service_supplier.go
View file @
81abd60d
package
service
import
(
"encoding/json"
"fmt"
"go_supplier_task/pkg/common"
syncLog
"go_supplier_task/pkg/logger/sync"
...
...
@@ -132,12 +133,19 @@ func (this *ServiceSupplier) onlyOpenHandle(groupName string,PoolSupplierEntity
*/
func
(
this
*
ServiceSupplier
)
updateSupplier
(
supplierEntity
PoolSupplierEntity
,
cols
...
string
)
{
if
(
len
(
cols
)
<=
0
){
/*
if(len(cols)<=0){
cols=[]string{
"is_type","updated","status","supplier_name",
}
}
fmt.Println(len(cols))
panic("瞧瞧====================================================================")*/
cols
=
[]
string
{
"is_type"
,
"updated"
,
"status"
,
"supplier_name"
,
}
dbSpu
:=
mysql
.
Conn
(
"supp"
)
//spu实例化链接
bytes
,
_
:=
json
.
Marshal
(
supplierEntity
)
fmt
.
Printf
(
string
(
bytes
))
_
,
err
:=
dbSpu
.
Table
(
"lie_supplier_channel"
)
.
Where
(
"supplier_id=?"
,
supplierEntity
.
SupplierId
)
.
Cols
(
cols
...
)
.
Update
(
supplierEntity
)
if
(
err
!=
nil
){
errMsg
:=
fmt
.
Sprintf
(
"修改失败:错误:%s;数据:%s"
,
err
.
Error
(),
fmt
.
Sprintln
(
supplierEntity
))
...
...
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