作者 tangxvhui

bug 修改

... ... @@ -124,12 +124,13 @@ func GetChanceReserveTypeAll(companyId int64) []protocol.ChanceReserveTypeData {
Filter("company_id", companyId).
All(&sourceData)
if err != nil {
log.Error("获取ChanceReserveType数据失败:%s", err)
return data
}
for i := range data {
for i := range sourceData {
m := protocol.ChanceReserveTypeData{
Id: data[i].Id,
Name: data[i].Name,
Id: sourceData[i].Id,
Name: sourceData[i].Name,
}
data = append(data, m)
}
... ...