|
@@ -230,10 +230,10 @@ func (s CooperationService) GetSupplierInTargetTaskList(param *vo.SupplierSearch
|
|
|
var enterpriseOperator string
|
|
|
if param.Status == 1 { // 可邀约
|
|
|
enterpriseSupplierCooperates, total, _ = dao.EnterpriseSupplierCooperateDao{}.GetSupplierByEnterprise(param.EnterpriseId, param.Page, param.PageSize)
|
|
|
+ var resEnterpriseSuppliers []*entity.EnterpriseSupplierCooperate
|
|
|
if param.TaskType == 2 {
|
|
|
// 品牌种草
|
|
|
// 去除当前project_id、supplier_id已在 s_project_info中的数据
|
|
|
- var resEnterpriseSuppliers []*entity.EnterpriseSupplierCooperate
|
|
|
for _, enterpriseSupplier := range enterpriseSupplierCooperates {
|
|
|
var sProject entity.SProjectInfo
|
|
|
err1 := dao.Db.Model(&entity.SProjectInfo{}).Where("project_id = ? and supplier_id = ?", param.TaskId, enterpriseSupplier.SupplierId).First(&sProject).Error
|
|
@@ -245,11 +245,9 @@ func (s CooperationService) GetSupplierInTargetTaskList(param *vo.SupplierSearch
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- enterpriseSupplierCooperates = resEnterpriseSuppliers
|
|
|
} else if param.TaskType == 3 {
|
|
|
// 本地生活
|
|
|
// 去除当前 local_id、supplier_id 已在 s_local_info中的数据
|
|
|
- var resEnterpriseSuppliers []*entity.EnterpriseSupplierCooperate
|
|
|
for _, enterpriseSupplier := range enterpriseSupplierCooperates {
|
|
|
var sLocalLifeInfo entity.SLocalLifeInfo
|
|
|
err2 := dao.Db.Model(&entity.SLocalLifeInfo{}).Where("local_id = ? and supplier_id = ?", param.TaskId, enterpriseSupplier.SupplierId).First(&sLocalLifeInfo).Error
|
|
@@ -261,8 +259,8 @@ func (s CooperationService) GetSupplierInTargetTaskList(param *vo.SupplierSearch
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- enterpriseSupplierCooperates = resEnterpriseSuppliers
|
|
|
}
|
|
|
+ enterpriseSupplierCooperates = resEnterpriseSuppliers
|
|
|
total = int64(len(enterpriseSupplierCooperates))
|
|
|
} else if param.Status == 2 { // 邀约中
|
|
|
if param.TaskType == 2 {
|
|
@@ -282,7 +280,7 @@ func (s CooperationService) GetSupplierInTargetTaskList(param *vo.SupplierSearch
|
|
|
}
|
|
|
}
|
|
|
// 针对邀约中、合作中情形
|
|
|
- if enterpriseSupplierCooperates == nil {
|
|
|
+ if param.Status == 2 || param.Status == 3 {
|
|
|
if param.TaskType == 2 { // 种草
|
|
|
for _, sProjectInfo := range sProjectInfos {
|
|
|
supplierId := sProjectInfo.SupplierID
|