正在显示
3 个修改的文件
包含
12 行增加
和
3 行删除
| @@ -103,7 +103,7 @@ func DeleteChance(id int64) (err error) { | @@ -103,7 +103,7 @@ func DeleteChance(id int64) (err error) { | ||
| 103 | func GetChanceMyChance(uid, cid int64, reviewStatus []int8, lastId int64, pageSize int, v interface{}) (total int, err error) { | 103 | func GetChanceMyChance(uid, cid int64, reviewStatus []int8, lastId int64, pageSize int, v interface{}) (total int, err error) { |
| 104 | sql := `select a.*,b.images,speechs,videos | 104 | sql := `select a.*,b.images,speechs,videos |
| 105 | from ( | 105 | from ( |
| 106 | -select id,user_id,create_at,source_content from chance | 106 | +select id,user_id,create_at,source_content,approve_data from chance |
| 107 | where user_id=? and company_id=? and review_status in (?) and (?=0 or id>?) | 107 | where user_id=? and company_id=? and review_status in (?) and (?=0 or id>?) |
| 108 | order by create_at desc | 108 | order by create_at desc |
| 109 | limit ? | 109 | limit ? |
| @@ -195,7 +195,7 @@ type MySubmitChanceRequest struct { | @@ -195,7 +195,7 @@ type MySubmitChanceRequest struct { | ||
| 195 | ReviewStatus int8 `json:"reviewStatus"` //审核状态 | 195 | ReviewStatus int8 `json:"reviewStatus"` //审核状态 |
| 196 | } | 196 | } |
| 197 | type MySubmitChanceResponse struct { | 197 | type MySubmitChanceResponse struct { |
| 198 | - List []ChanceItem `json:"list"` | 198 | + List []CommonListItem `json:"list"` |
| 199 | Total int `json:"total"` | 199 | Total int `json:"total"` |
| 200 | } | 200 | } |
| 201 | 201 | ||
| @@ -233,6 +233,8 @@ type ChanceItemOrm struct { | @@ -233,6 +233,8 @@ type ChanceItemOrm struct { | ||
| 233 | Images string `orm:"column(images)"` | 233 | Images string `orm:"column(images)"` |
| 234 | Voices string `orm:"column(speechs)"` | 234 | Voices string `orm:"column(speechs)"` |
| 235 | Videos string `orm:"column(videos)"` | 235 | Videos string `orm:"column(videos)"` |
| 236 | + | ||
| 237 | + ApproveData string `json:"approveData"` //审核数据 | ||
| 236 | } | 238 | } |
| 237 | type ChanceItem struct { | 239 | type ChanceItem struct { |
| 238 | Id int64 `json:"id"` | 240 | Id int64 `json:"id"` |
| @@ -785,6 +785,8 @@ func MySubmitChance(header *protocol.RequestHeader, request *protocol.MySubmitCh | @@ -785,6 +785,8 @@ func MySubmitChance(header *protocol.RequestHeader, request *protocol.MySubmitCh | ||
| 785 | 785 | ||
| 786 | for i := 0; i < len(myChances); i++ { | 786 | for i := 0; i < len(myChances); i++ { |
| 787 | chance := myChances[i] | 787 | chance := myChances[i] |
| 788 | + commItem := protocol.CommonListItem{} | ||
| 789 | + { | ||
| 788 | item := protocol.ChanceItem{ | 790 | item := protocol.ChanceItem{ |
| 789 | Id: chance.Id, | 791 | Id: chance.Id, |
| 790 | Provider: provider, | 792 | Provider: provider, |
| @@ -794,7 +796,12 @@ func MySubmitChance(header *protocol.RequestHeader, request *protocol.MySubmitCh | @@ -794,7 +796,12 @@ func MySubmitChance(header *protocol.RequestHeader, request *protocol.MySubmitCh | ||
| 794 | jsonUnmarshal(chance.Images, &item.Pictures) | 796 | jsonUnmarshal(chance.Images, &item.Pictures) |
| 795 | jsonUnmarshal(chance.Voices, &item.Speechs) | 797 | jsonUnmarshal(chance.Voices, &item.Speechs) |
| 796 | jsonUnmarshal(chance.Videos, &item.Videos) | 798 | jsonUnmarshal(chance.Videos, &item.Videos) |
| 797 | - rsp.List = append(rsp.List, item) | 799 | + commItem.Chance = item |
| 800 | + } | ||
| 801 | + if request.ReviewStatus == protocol.ReviewStatusPass { | ||
| 802 | + jsonUnmarshal(chance.ApproveData, &commItem.ApproveData) | ||
| 803 | + } | ||
| 804 | + rsp.List = append(rsp.List, commItem) | ||
| 798 | } | 805 | } |
| 799 | return | 806 | return |
| 800 | } | 807 | } |
-
请 注册 或 登录 后发表评论