ref: v3变更,,完成整合,同步v2.2508.4 -250902
This commit is contained in:
@@ -289,8 +289,8 @@ func (r NeInfo) Insert(neInfo model.NeInfo) int64 {
|
||||
CreateBy: neInfo.CreateBy,
|
||||
}
|
||||
if v, ok := serverState["version"]; ok && v != nil {
|
||||
neVersion.Name = "-"
|
||||
neVersion.Path = "-"
|
||||
// neVersion.Name = "-"
|
||||
// neVersion.Path = "-"
|
||||
neVersion.Version = fmt.Sprint(v)
|
||||
}
|
||||
NewNeVersion.Insert(neVersion)
|
||||
@@ -366,8 +366,8 @@ func (r NeInfo) Update(neInfo model.NeInfo) int64 {
|
||||
neVersion.NeType = neInfo.NeType
|
||||
}
|
||||
if v, ok := serverState["version"]; ok && v != neVersion.Version {
|
||||
neVersion.Name = "-"
|
||||
neVersion.Path = "-"
|
||||
// neVersion.Name = "-"
|
||||
// neVersion.Path = "-"
|
||||
neVersion.Version = fmt.Sprint(v)
|
||||
}
|
||||
neVersion.UpdateBy = neInfo.UpdateBy
|
||||
@@ -403,10 +403,10 @@ func (r NeInfo) Update(neInfo model.NeInfo) int64 {
|
||||
}
|
||||
|
||||
// DeleteByIds 批量删除信息
|
||||
func (r NeInfo) DeleteById(id int64, coreUid, neUid string) (int64, error) {
|
||||
func (r NeInfo) DeleteByIds(ids []int64, coreUid, neUid string) (int64, error) {
|
||||
// 检查是否存在
|
||||
arr := r.neInfoRepository.SelectByIds([]int64{id})
|
||||
if len(arr) != 1 {
|
||||
arr := r.neInfoRepository.SelectByIds(ids)
|
||||
if len(arr) != len(ids) {
|
||||
return 0, fmt.Errorf("not match id")
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ func (r NeInfo) DeleteById(id int64, coreUid, neUid string) (int64, error) {
|
||||
// 缓存信息删除
|
||||
redis.Del("", fmt.Sprintf("%s:%s:%s:%s", constants.CACHE_NE_INFO, v.CoreUID, v.NeType, v.NeUID))
|
||||
}
|
||||
rows := r.neInfoRepository.DeleteByIds([]int64{id})
|
||||
rows := r.neInfoRepository.DeleteByIds(ids)
|
||||
return rows, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user