作者 tangxvhui

修复一些问题

... ... @@ -596,6 +596,11 @@ func (srv TaskService) ListTask(param *command.ListTaskCommand) (map[string]inte
Name: val.Name,
StatusDescription: val.StatusDescription(),
SortBy: val.SortBy,
PlanCompletedAt: time.Unix(int64(val.PlanCompletedAt), 0).Local().Format("2006-01-02"),
RealCompletedAt: "",
}
if val.RealCompletedAt > 0 {
stage.RealCompletedAt = time.Unix(int64(val.RealCompletedAt), 0).Local().Format("2006-01-02")
}
switch val.SortBy {
case 1:
... ...
... ... @@ -8,9 +8,9 @@ import (
func TestGenerateToken(t *testing.T) {
ut := UserAuth{
CompanyId: 233,
UserId: 3240357405361920,
Phone: "13459147023",
CompanyId: 8,
UserId: 3438641393081088,
Phone: "17711111111",
PlatformId: 28,
AdminType: 1,
}
... ...
... ... @@ -102,8 +102,7 @@ func (repo *TaskStageRepository) Find(queryOptions map[string]interface{}) (int,
tx := repo.transactionContext.PgTx
var m []*models.TaskStage
query := tx.Model(&m).
Where("deleted_at isnull").
Limit(20)
Where("deleted_at isnull")
if val, ok := queryOptions["taskId"]; ok {
query.Where("task_stage.task_id = ?", val)
... ...