|
@@ -2342,7 +2342,7 @@ func init323() {
|
|
}
|
|
}
|
|
|
|
|
|
//func init() {
|
|
//func init() {
|
|
-// init16_1_03()
|
|
|
|
|
|
+// init16_1_05()
|
|
//}
|
|
//}
|
|
|
|
|
|
func init16_1_01() {
|
|
func init16_1_01() {
|
|
@@ -2422,6 +2422,56 @@ func init16_1_03() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+func init16_1_04() {
|
|
|
|
+ var condition string
|
|
|
|
+ var pars []interface{}
|
|
|
|
+
|
|
|
|
+ condition = " AND product_id = 2 AND seller_id_init = 0 "
|
|
|
|
+
|
|
|
|
+ CompanyApprovalList, e := company.GetCompanyContracList(condition, pars)
|
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
+ fmt.Println(e)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for _, v := range CompanyApprovalList {
|
|
|
|
+ productItem, e := company.GetCompanyProductByCompanyIdAndProductId(v.CompanyId, 2)
|
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
+ fmt.Println(e)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if productItem == nil {
|
|
|
|
+ continue
|
|
|
|
+ }
|
|
|
|
+ e = company.UpdateCompanyContractTypeinit16_1_02(productItem.SellerName, productItem.SellerId, v.CompanyContractId)
|
|
|
|
+ if e != nil {
|
|
|
|
+ fmt.Println(e)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//func init16_1_05() {
|
|
|
|
+// var condition string
|
|
|
|
+// var pars []interface{}
|
|
|
|
+//
|
|
|
|
+// condition = " AND product_id = 2 "
|
|
|
|
+//
|
|
|
|
+// listProduct, e := company.GetCompanyProductList(condition, pars)
|
|
|
|
+// if e != nil {
|
|
|
|
+// fmt.Println(e)
|
|
|
|
+// return
|
|
|
|
+// }
|
|
|
|
+// for _, v := range listProduct {
|
|
|
|
+// e = company.UpdateCompanyProductSellerUnexpiredInitinit16_1_05(v.SellerId, v.SellerName, v.CompanyId)
|
|
|
|
+// if e != nil {
|
|
|
|
+// fmt.Println(e)
|
|
|
|
+// return
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// fmt.Println("end")
|
|
|
|
+//}
|
|
|
|
+
|
|
//更新权益销客户后一个正式的销售为当前销售
|
|
//更新权益销客户后一个正式的销售为当前销售
|
|
//func init(){
|
|
//func init(){
|
|
// SELECT * FROM company_product WHERE 1= 1 AND product_id =2 AND share_seller_id > 0 ;
|
|
// SELECT * FROM company_product WHERE 1= 1 AND product_id =2 AND share_seller_id > 0 ;
|