|
@@ -273,10 +273,13 @@ state 进行状态 1:未开始,2:进行中,3:已结束,4:未开始、
|
|
|
func GetActivityLabelSpecialConfirmList(user *models.WxUserItem, startSize, pageSize, state int, keywords string) (list []*models.CygxActivitySpecialDetail, totalConfirm int, err error) {
|
|
|
//var condition string
|
|
|
companyDetail, e := models.GetCompanyDetailByIdGroupTrip(user.CompanyId)
|
|
|
- if e != nil {
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
err = errors.New("GetCompanyDetailByIdGroupTrip, Err: " + e.Error())
|
|
|
return
|
|
|
}
|
|
|
+ if companyDetail == nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
//如果是永续的就按照普通的权限逻辑来查,如果不是就按照升级的逻辑来查
|
|
|
var condition string
|
|
|
if companyDetail.Status == "永续" {
|
|
@@ -402,8 +405,11 @@ func GetSpecialTripUserSchedule(userId int) (total int, err error) {
|
|
|
// GetActivitySpecialList 获取专项调研列表
|
|
|
func GetActivitySpecialList(user *models.WxUserItem, currentIndex, pageSize int, keywords string) (list []*models.CygxActivitySpecialDetail, total int, err error) {
|
|
|
listConfirm, totalConfirm, e := GetActivityLabelSpecialConfirmList(user, (currentIndex-1)*pageSize, pageSize, 4, keywords)
|
|
|
- if e != nil {
|
|
|
- err = errors.New("GetActivityLabelSpecialConfirmList, Err: " + e.Error())
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
+ err = errors.New("GetActivityLabelSpecialConfirmList11, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if totalConfirm == 0 {
|
|
|
return
|
|
|
}
|
|
|
if currentIndex == 1 && len(listConfirm) > 0 {
|