正在显示
3 个修改的文件
包含
14 行增加
和
2 行删除
| @@ -8,6 +8,7 @@ import ( | @@ -8,6 +8,7 @@ import ( | ||
| 8 | serveaudit "oppmg/services/audit" | 8 | serveaudit "oppmg/services/audit" |
| 9 | servecommon "oppmg/services/common" | 9 | servecommon "oppmg/services/common" |
| 10 | "strconv" | 10 | "strconv" |
| 11 | + "time" | ||
| 11 | ) | 12 | ) |
| 12 | 13 | ||
| 13 | type AuditController struct { | 14 | type AuditController struct { |
| @@ -27,6 +28,14 @@ func (c *AuditController) AuditList() { | @@ -27,6 +28,14 @@ func (c *AuditController) AuditList() { | ||
| 27 | msg = protocol.BadRequestParam("1") | 28 | msg = protocol.BadRequestParam("1") |
| 28 | return | 29 | return |
| 29 | } | 30 | } |
| 31 | + beginTime, err := time.Parse("2006-01-02", param.CreateTimeBeginS) | ||
| 32 | + if err == nil && len(param.CreateTimeBeginS) > 0 { | ||
| 33 | + param.CreateTimeBegin = beginTime.Unix() | ||
| 34 | + } | ||
| 35 | + endTime, err := time.Parse("2006-01-02", param.CreateTimeEndS) | ||
| 36 | + if err == nil && len(param.CreateTimeEndS) > 0 { | ||
| 37 | + param.CreateTimeEnd = endTime.Unix() + 864399 | ||
| 38 | + } | ||
| 30 | uid := c.GetUserId() | 39 | uid := c.GetUserId() |
| 31 | companyId := c.GetCompanyId() | 40 | companyId := c.GetCompanyId() |
| 32 | list, err := serveaudit.GetAuditList(param, companyId, uid) | 41 | list, err := serveaudit.GetAuditList(param, companyId, uid) |
| @@ -236,8 +236,10 @@ type RequestAuditList struct { | @@ -236,8 +236,10 @@ type RequestAuditList struct { | ||
| 236 | ReviewStatus int `json:"review_status"` // | 236 | ReviewStatus int `json:"review_status"` // |
| 237 | EnableStatus int `json:"enable_status"` //关闭状态 | 237 | EnableStatus int `json:"enable_status"` //关闭状态 |
| 238 | DepartmentID int `json:"department_id"` //提交部门 | 238 | DepartmentID int `json:"department_id"` //提交部门 |
| 239 | - CreateTimeBegin int `json:"create_time_begin"` // | ||
| 240 | - CreateTimeEnd int `json:"create_time_end"` // | 239 | + CreateTimeBegin int64 `json:"-"` // |
| 240 | + CreateTimeBeginS string `json:"create_time_begin"` | ||
| 241 | + CreateTimeEnd int64 `json:"-"` // | ||
| 242 | + CreateTimeEndS string `json:"create_time_end"` // | ||
| 241 | Code string `json:"code"` //机会编码 | 243 | Code string `json:"code"` //机会编码 |
| 242 | UserName string `json:"user_name"` //提交人姓名 | 244 | UserName string `json:"user_name"` //提交人姓名 |
| 243 | } | 245 | } |
| @@ -9,6 +9,7 @@ const ( | @@ -9,6 +9,7 @@ const ( | ||
| 9 | KEY_PREFIX string = "oppmg_" //统一前缀 | 9 | KEY_PREFIX string = "oppmg_" //统一前缀 |
| 10 | KEY_USER_TOKEN string = "token" //登录token存储 | 10 | KEY_USER_TOKEN string = "token" //登录token存储 |
| 11 | KEY_CAPTCHA_AUTH string = "captch_auth" //统一用户中心返回的验证码凭证 | 11 | KEY_CAPTCHA_AUTH string = "captch_auth" //统一用户中心返回的验证码凭证 |
| 12 | + KEY_USER_PERMISSION string = "user_permission" //用户操作权限 | ||
| 12 | ) | 13 | ) |
| 13 | 14 | ||
| 14 | const ( | 15 | const ( |
-
请 注册 或 登录 后发表评论