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
49857083
authored
Mar 23, 2021
by
wang
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改is_type=0的问题
parent
67c6ecba
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
cmd/main.go
service/service_supplier.go
cmd/main.go
0 → 100644
View file @
49857083
package
main
import
(
"sync/atomic"
"unsafe"
)
func
main
()
{
var
s
atomic
.
Value
s
.
Load
()
}
func
(
v
*
Value
)
Load
()
(
x
interface
{})
{
vp
:=
(
*
ifaceWords
)(
unsafe
.
Pointer
(
v
))
typ
:=
LoadPointer
(
&
vp
.
typ
)
if
typ
==
nil
||
uintptr
(
typ
)
==
^
uintptr
(
0
)
{
// First store not yet completed.
return
nil
}
data
:=
LoadPointer
(
&
vp
.
data
)
xp
:=
(
*
ifaceWords
)(
unsafe
.
Pointer
(
&
x
))
xp
.
typ
=
typ
xp
.
data
=
data
return
}
\ No newline at end of file
service/service_supplier.go
View file @
49857083
...
@@ -103,7 +103,7 @@ func (this *ServiceSupplier) onlyOpenHandle(groupName string,PoolSupplierEntity
...
@@ -103,7 +103,7 @@ func (this *ServiceSupplier) onlyOpenHandle(groupName string,PoolSupplierEntity
}
else
{
}
else
{
SupplierOne
.
Status
=-
2
SupplierOne
.
Status
=-
2
}
}
this
.
updateSupplier
(
SupplierOne
,
updateCols
...
)
this
.
updateSupplier
(
SupplierOne
)
}
}
//遍历到最后了还没有找到启用的供应商,就把第一个当成启用的供应商
//遍历到最后了还没有找到启用的供应商,就把第一个当成启用的供应商
if
(
!
isUpdate
){
if
(
!
isUpdate
){
...
@@ -111,7 +111,7 @@ func (this *ServiceSupplier) onlyOpenHandle(groupName string,PoolSupplierEntity
...
@@ -111,7 +111,7 @@ func (this *ServiceSupplier) onlyOpenHandle(groupName string,PoolSupplierEntity
PoolSupplierEntitys
[
0
]
.
SupplierName
=
groupName
PoolSupplierEntitys
[
0
]
.
SupplierName
=
groupName
PoolSupplierEntitys
[
0
]
.
Status
=
2
PoolSupplierEntitys
[
0
]
.
Status
=
2
PoolSupplierEntitys
[
0
]
.
IsType
=
0
PoolSupplierEntitys
[
0
]
.
IsType
=
0
this
.
updateSupplier
(
PoolSupplierEntitys
[
0
]
,
updateCols
...
)
this
.
updateSupplier
(
PoolSupplierEntitys
[
0
])
return
true
,
PoolSupplierEntitys
[
0
]
return
true
,
PoolSupplierEntitys
[
0
]
}
else
{
}
else
{
return
true
,
onlyOpenSupplier
return
true
,
onlyOpenSupplier
...
...
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