|
@@ -420,6 +420,8 @@ func (s *TmpzcgtSession) InsertOilSupplierCertSub() error {
|
|
|
"from tmp_zengxiang " +
|
|
"from tmp_zengxiang " +
|
|
|
"limit " + start + "," + end
|
|
"limit " + start + "," + end
|
|
|
_, err = s.DBE.Query(sql)
|
|
_, err = s.DBE.Query(sql)
|
|
|
|
|
+ s.UpdateCertSubIsType2()
|
|
|
|
|
+ s.UpdateOilSupplierCertSub()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -454,7 +456,7 @@ func (s *TmpzcgtSession) UpdateCertSubIsType2() error {
|
|
|
"b.SupplierId = IFNULL(a.`SupplierId`, 0), " +
|
|
"b.SupplierId = IFNULL(a.`SupplierId`, 0), " +
|
|
|
"b.SupplierCertId = IFNULL(a.`SupplierCertId`, 0), " +
|
|
"b.SupplierCertId = IFNULL(a.`SupplierCertId`, 0), " +
|
|
|
"b.SupplierCertAppendId = IFNULL(a.`Id`, 0) " +
|
|
"b.SupplierCertAppendId = IFNULL(a.`Id`, 0) " +
|
|
|
- "where b.Type = '3'"
|
|
|
|
|
|
|
+ "where b.Type = '3' and (b.SupplierId is null or b.SupplierId = 0)"
|
|
|
_, err := s.DBE.Query(sql)
|
|
_, err := s.DBE.Query(sql)
|
|
|
return err
|
|
return err
|
|
|
}
|
|
}
|