|
@@ -152,6 +152,7 @@ func RepoUpdateSetDoc1(ctx *RepoSession, collectName string, idstr string, model
|
|
|
|
|
|
// 获取模型对应的数据表
|
|
|
collection := getModel2Collection(model)
|
|
|
+ fmt.Println(collection)
|
|
|
|
|
|
uid, _ := primitive.ObjectIDFromHex(idstr)
|
|
|
|
|
@@ -214,29 +215,29 @@ func getModel2Collection(omodel interface{}) string {
|
|
|
if _, ok := omodel.(*dm.PurchaseBill); ok {
|
|
|
return CollectionBillPurchase
|
|
|
}
|
|
|
- // if _, ok := omodel.(*dm.ProduceBill); ok {
|
|
|
- // return CollectionBillProduce
|
|
|
- // }
|
|
|
-
|
|
|
- // test
|
|
|
if _, ok := omodel.(*dm.ProduceBill); ok {
|
|
|
- return "bill-produce_copy1"
|
|
|
+ return CollectionBillProduce
|
|
|
}
|
|
|
|
|
|
+ // test
|
|
|
+ // if _, ok := omodel.(*dm.ProduceBill); ok {
|
|
|
+ // return "bill-produce_copy1"
|
|
|
+ // }
|
|
|
+
|
|
|
if _, ok := omodel.(*dm.ProductBill); ok {
|
|
|
return CollectionBillProduct
|
|
|
}
|
|
|
|
|
|
// 计划
|
|
|
- // if _, ok := omodel.(*dm.ProductPlan); ok {
|
|
|
- // return CollectionProductPlan
|
|
|
- // }
|
|
|
-
|
|
|
- // test
|
|
|
if _, ok := omodel.(*dm.ProductPlan); ok {
|
|
|
- return "product-plan_copy1"
|
|
|
+ return CollectionProductPlan
|
|
|
}
|
|
|
|
|
|
+ // test
|
|
|
+ // if _, ok := omodel.(*dm.ProductPlan); ok {
|
|
|
+ // return "product-plan_copy1"
|
|
|
+ // }
|
|
|
+
|
|
|
if _, ok := omodel.(*dm.Product); ok {
|
|
|
return CollectionProduct
|
|
|
}
|