|
|
@@ -5,7 +5,6 @@ import (
|
|
|
"fmt"
|
|
|
|
|
|
"dashoo.cn/opms_libary/myerrors"
|
|
|
- "github.com/gogf/gf/errors/gerror"
|
|
|
"github.com/gogf/gf/frame/g"
|
|
|
"github.com/gogf/gf/util/gconv"
|
|
|
|
|
|
@@ -52,7 +51,6 @@ func (s *salesRegionDetailService) GetList(req *model.SecBaseRegionDetailReq) (t
|
|
|
total, err = Model.Count()
|
|
|
if err != nil {
|
|
|
g.Log().Error(err)
|
|
|
- err = gerror.New("获取总行数失败")
|
|
|
return
|
|
|
}
|
|
|
if req.PageNum == 0 {
|
|
|
@@ -61,7 +59,6 @@ func (s *salesRegionDetailService) GetList(req *model.SecBaseRegionDetailReq) (t
|
|
|
err = Model.Page(req.PageNum, req.PageSize).Order("id asc").Scan(&RegionList)
|
|
|
if err != nil {
|
|
|
g.Log().Error(err)
|
|
|
- err = gerror.New("获取数据失败")
|
|
|
return
|
|
|
}
|
|
|
var districtList []int
|
|
|
@@ -82,8 +79,7 @@ func (s *salesRegionDetailService) GetList(req *model.SecBaseRegionDetailReq) (t
|
|
|
if req.CustIndustry != "" {
|
|
|
CustModel = CustModel.Where(s.CustomerDao.Columns.CustIndustry+" like ?", "%"+req.CustIndustry+"%")
|
|
|
}
|
|
|
- total, err = Model.Fields().Count()
|
|
|
-
|
|
|
+
|
|
|
dist, _ := s.District.Fields("dist_name,dist_code").Where("dist_code in (?)", districtList).All()
|
|
|
custDist, _ := CustModel.Group("cust_dist_code").All()
|
|
|
|