|
|
@@ -20,7 +20,7 @@ func GetSelectService(xormEngine *xorm.Engine) *SelectService {
|
|
|
return s
|
|
|
}
|
|
|
|
|
|
-func (s *SelectService) GetMyPagingEntitiesWithOrderBytbl(supplierTableName, supplierCertTableName, OilInfoChangeName, OilSupplierCert2FileName string, pageIndex, itemsPerPage int64, orderby string, asc bool, entitiesPtr interface{}, where,having string) (total int64) {
|
|
|
+func (s *SelectService) GetMyPagingEntitiesWithOrderBytbl(supplierTableName, supplierCertTableName, OilInfoChangeName, OilSupplierCertSubName,OilSupplierFileName string, pageIndex, itemsPerPage int64, orderby string, asc bool, entitiesPtr interface{}, where,having string) (total int64) {
|
|
|
|
|
|
//获取总记录数
|
|
|
/*sqlCount := `select count(*) from (`
|
|
|
@@ -42,11 +42,12 @@ func (s *SelectService) GetMyPagingEntitiesWithOrderBytbl(supplierTableName, sup
|
|
|
sql += `a.DepositBank,a.HseTraining,a.CompanyType,a.SetupTime,a.Address,a.Province,a.City,a.Street, `
|
|
|
sql += `a.LinkAddress,a.LinkProvince,a.LinkCity,a.LinkStreet,a.BusinessScope, `
|
|
|
sql += `b.InStyle,`
|
|
|
- sql += `group_concat(distinct d.Name) CerSubName,group_concat(distinct d.NeedFileType) NeedFileType `
|
|
|
+ sql += `group_concat(distinct d.Name) CerSubName,group_concat(distinct e.NeedFileType) NeedFileType `
|
|
|
sql += `from ` + supplierTableName + ` a `
|
|
|
sql += `left join ` + supplierCertTableName + ` b on b.SupplierId = a.Id `
|
|
|
sql += `left join ` + OilInfoChangeName + ` c on c.SupplierId = a.Id `
|
|
|
- sql += `left join ` + OilSupplierCert2FileName + ` d on d.SupplierCertId = b.Id `
|
|
|
+ sql += `left join ` + OilSupplierCertSubName + ` d on d.SupplierCertId = b.Id `
|
|
|
+ sql += `left join ` + OilSupplierFileName + ` e on e.SupplierId = a.Id `
|
|
|
sql += `where ` + where
|
|
|
|
|
|
sql += ` group by a.Id,b.Id ` + having
|