aa
This commit is contained in:
@@ -271,3 +271,19 @@ func UpdateVendorOrgCode(ctx *jxcontext.Context, ID int, payload map[string]inte
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func AddVendorOrgCode(ctx *jxcontext.Context, vendorOrgCode *model.VendorOrgCode) (err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
)
|
||||
list, err := dao.GetVendorOrgCode(db, vendorOrgCode.VendorID, vendorOrgCode.VendorOrgCode, model.VendorOrgTypePlatform)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(list) > 0 {
|
||||
return fmt.Errorf("库里有这个账号了,[%v]", vendorOrgCode.VendorOrgCode)
|
||||
}
|
||||
dao.WrapAddIDCULDEntity(vendorOrgCode, ctx.GetUserName())
|
||||
dao.CreateEntity(db, vendorOrgCode)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user