Commit 49857083 by wang

修改is_type=0的问题

parent 67c6ecba
Showing with 29 additions and 2 deletions
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
...@@ -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
......
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