|
@@ -112,7 +112,7 @@ func (d LocalLifeDao) GetLocalPreviews(param *vo.LocalSearchParam) ([]vo.ReLocal
|
|
|
query = query.Where("enterprise_id = ? or local_id = ? or local_name LIKE ?", param.Others, param.Others, "%"+param.Others+"%")
|
|
|
}
|
|
|
query.Count(&total)
|
|
|
- query = query.Select("enterprise_id, sub_account_id, local_id, local_platform, task_status, estimated_cost, need_pay, task_form, content_type, need_review, need_quality, need_calculate, store_id, team_buying_id, tools")
|
|
|
+ query = query.Select("enterprise_id, sub_account_id, local_id, local_name, local_platform, task_status, estimated_cost, need_pay, task_form, content_type, need_review, need_quality, need_calculate, store_id, team_buying_id, tools")
|
|
|
offset := (param.Page - 1) * param.PageSize
|
|
|
if param.Order == 1 {
|
|
|
if err := query.Order("created_at asc").Offset(offset).Limit(param.PageSize).Find(&localLifes).Error; err != nil {
|
|
@@ -128,6 +128,7 @@ func (d LocalLifeDao) GetLocalPreviews(param *vo.LocalSearchParam) ([]vo.ReLocal
|
|
|
EnterpriseId: localLife.EnterpriseID,
|
|
|
SubAccountId: localLife.SubAccountID,
|
|
|
LocalId: localLife.LocalID,
|
|
|
+ LocalName: localLife.LocalName,
|
|
|
LocalPlatform: localLife.LocalPlatform,
|
|
|
LocalStatus: localLife.TaskStatus,
|
|
|
LocalForm: localLife.TaskForm,
|
|
@@ -187,7 +188,7 @@ func (d LocalLifeDao) GetLocalDraftList(param *vo.LocalDraftParam) ([]vo.ReLocal
|
|
|
query = query.Where("enterprise_id = ? or local_id = ? or local_name LIKE ?", param.Others, param.Others, "%"+param.Others+"%")
|
|
|
}
|
|
|
query.Count(&total)
|
|
|
- query = query.Select("enterprise_id, sub_account_id, local_id, local_platform, local_type, created_at, store_id")
|
|
|
+ query = query.Select("enterprise_id, sub_account_id, local_id, local_name, local_platform, local_type, created_at, store_id")
|
|
|
offset := (param.Page - 1) * param.PageSize
|
|
|
if err := query.Order("created_at asc").Offset(offset).Limit(param.PageSize).Find(&localLifeInfos).Error; err != nil {
|
|
|
return nil, 0, err
|
|
@@ -197,6 +198,7 @@ func (d LocalLifeDao) GetLocalDraftList(param *vo.LocalDraftParam) ([]vo.ReLocal
|
|
|
EnterpriseId: localLifeInfo.EnterpriseID,
|
|
|
SubAccountId: localLifeInfo.SubAccountID,
|
|
|
LocalId: localLifeInfo.LocalID,
|
|
|
+ LocalName: localLifeInfo.LocalName,
|
|
|
LocalPlatform: localLifeInfo.LocalPlatform,
|
|
|
LocalType: localLifeInfo.LocalType,
|
|
|
CreatedAt: localLifeInfo.CreatedAt.Format("2006-01-02 15:04:05"),
|
|
@@ -288,7 +290,7 @@ func (d LocalLifeDao) GetLocalStoreExplorePreviews(param *vo.LocalSearchParam) (
|
|
|
}
|
|
|
query = query.Where("task_status = ? AND task_form = ?", 8, 1)
|
|
|
query.Count(&total)
|
|
|
- query = query.Select("enterprise_id, sub_account_id, local_id, local_type, local_platform, need_reserve, need_confirm, need_explore, explored_num, store_id, team_buying_id")
|
|
|
+ query = query.Select("enterprise_id, sub_account_id, local_id, local_name, local_type, local_platform, need_reserve, need_confirm, need_explore, explored_num, store_id, team_buying_id")
|
|
|
offset := (param.Page - 1) * param.PageSize
|
|
|
if err := query.Order("pay_at asc").Offset(offset).Limit(param.PageSize).Find(&localLifes).Error; err != nil {
|
|
|
return nil, 0, err
|
|
@@ -298,6 +300,7 @@ func (d LocalLifeDao) GetLocalStoreExplorePreviews(param *vo.LocalSearchParam) (
|
|
|
EnterpriseId: localLife.EnterpriseID,
|
|
|
SubAccountId: localLife.SubAccountID,
|
|
|
LocalId: localLife.LocalID,
|
|
|
+ LocalName: localLife.LocalName,
|
|
|
LocalPlatform: localLife.LocalPlatform,
|
|
|
LocalType: localLife.LocalType,
|
|
|
NeedReserve: localLife.NeedReserve,
|
|
@@ -341,7 +344,7 @@ func (d LocalLifeDao) GetBillLocalPreviews(param *vo.LocalSearchParam) ([]vo.ReB
|
|
|
query = query.Where("enterprise_id = ? or local_id = ? or local_name LIKE ?", param.Others, param.Others, "%"+param.Others+"%")
|
|
|
}
|
|
|
query.Count(&total)
|
|
|
- query = query.Select("enterprise_id, sub_account_id, local_id, local_platform, task_status, estimated_cost, need_pay, task_form, content_type, store_id, team_buying_id, settlement_amount")
|
|
|
+ query = query.Select("enterprise_id, sub_account_id, local_id, local_name, local_platform, task_status, estimated_cost, need_pay, task_form, content_type, store_id, team_buying_id, settlement_amount")
|
|
|
offset := (param.Page - 1) * param.PageSize
|
|
|
if err := query.Order("created_at asc").Offset(offset).Limit(param.PageSize).Find(&localLifes).Error; err != nil {
|
|
|
return nil, 0, err
|
|
@@ -351,6 +354,7 @@ func (d LocalLifeDao) GetBillLocalPreviews(param *vo.LocalSearchParam) ([]vo.ReB
|
|
|
EnterpriseId: localLife.EnterpriseID,
|
|
|
SubAccountId: localLife.SubAccountID,
|
|
|
LocalId: localLife.LocalID,
|
|
|
+ LocalName: localLife.LocalName,
|
|
|
LocalPlatform: localLife.LocalPlatform,
|
|
|
LocalStatus: localLife.TaskStatus,
|
|
|
LocalForm: localLife.TaskForm,
|