作者 yangfu

配置修改

@@ -37,7 +37,7 @@ user_center_app_key ="39aefef9e22744a3b2d2d3791824ae7b" @@ -37,7 +37,7 @@ user_center_app_key ="39aefef9e22744a3b2d2d3791824ae7b"
37 user_center_app_secret ="cykbjnfqgctn" 37 user_center_app_secret ="cykbjnfqgctn"
38 38
39 #Html5 39 #Html5
40 -h5_host = "https://web-open-test.fjmaimaimai.com" 40 +h5_host = "https://mmm-web-open-test.fjmaimaimai.com"
41 41
42 #审核中心 42 #审核中心
43 suplus_approve_host ="http://suplus-approve-dev.fjmaimaimai.com" 43 suplus_approve_host ="http://suplus-approve-dev.fjmaimaimai.com"
@@ -37,7 +37,7 @@ user_center_app_key ="39aefef9e22744a3b2d2d3791824ae7b" @@ -37,7 +37,7 @@ user_center_app_key ="39aefef9e22744a3b2d2d3791824ae7b"
37 user_center_app_secret ="cykbjnfqgctn" 37 user_center_app_secret ="cykbjnfqgctn"
38 38
39 #Html5 39 #Html5
40 -h5_host = "https://web-open-test.fjmaimaimai.com" 40 +h5_host = "https://mmm-web-open-test.fjmaimaimai.com"
41 41
42 #审核中心 42 #审核中心
43 suplus_approve_host ="http://suplus-approve-test.fjmaimaimai.com" 43 suplus_approve_host ="http://suplus-approve-test.fjmaimaimai.com"
@@ -132,7 +132,7 @@ select id,approve_time,approve_data,uid,chance_id,approve_message,create_at pro @@ -132,7 +132,7 @@ select id,approve_time,approve_data,uid,chance_id,approve_message,create_at pro
132 from audit_flow_process where uid=? and enable_status =1 and review_status in (%v) and (?=0 or id>?) 132 from audit_flow_process where uid=? and enable_status =1 and review_status in (%v) and (?=0 or id>?)
133 )a left outer join chance b on a.chance_id = b.id 133 )a left outer join chance b on a.chance_id = b.id
134 )a left outer join chance_data b on a.chance_id =b.chance_id 134 )a left outer join chance_data b on a.chance_id =b.chance_id
135 -order by a.approve_time desc 135 +order by process_create_time desc
136 LIMIT ?`, utils.JoinInt8s(reviewStatus, ",")) 136 LIMIT ?`, utils.JoinInt8s(reviewStatus, ","))
137 137
138 sqlCount := fmt.Sprintf(`select count(0) 138 sqlCount := fmt.Sprintf(`select count(0)
@@ -301,6 +301,9 @@ type CommonListItem struct { @@ -301,6 +301,9 @@ type CommonListItem struct {
301 Message interface{} `json:"message,omitempty"` //消息 301 Message interface{} `json:"message,omitempty"` //消息
302 Comment interface{} `json:"comment,omitempty"` //评论 302 Comment interface{} `json:"comment,omitempty"` //评论
303 ChanceStatus int `json:"chanceStatus"` //0:正常 1.删除 2.关闭 303 ChanceStatus int `json:"chanceStatus"` //0:正常 1.删除 2.关闭
  304 +
  305 + //我审核的-通过
  306 + Score interface{} `json:"score,omitempty"`
304 } 307 }
305 type ChanceItem struct { 308 type ChanceItem struct {
306 Id int64 `json:"id"` 309 Id int64 `json:"id"`
@@ -794,6 +794,7 @@ func MySubmitChance(header *protocol.RequestHeader, request *protocol.MySubmitCh @@ -794,6 +794,7 @@ func MySubmitChance(header *protocol.RequestHeader, request *protocol.MySubmitCh
794 CreateTime: chance.CreateTime.Unix() * 1000, 794 CreateTime: chance.CreateTime.Unix() * 1000,
795 } 795 }
796 jsonUnmarshal(chance.SourceContent, &item.FormList) 796 jsonUnmarshal(chance.SourceContent, &item.FormList)
  797 + item.FormList = clearEmptyForm(item.FormList)
797 jsonUnmarshal(chance.Images, &item.Pictures) 798 jsonUnmarshal(chance.Images, &item.Pictures)
798 jsonUnmarshal(chance.Voices, &item.Speechs) 799 jsonUnmarshal(chance.Voices, &item.Speechs)
799 jsonUnmarshal(chance.Videos, &item.Videos) 800 jsonUnmarshal(chance.Videos, &item.Videos)
@@ -843,24 +844,31 @@ func MyApproveChance(header *protocol.RequestHeader, request *protocol.MyApprove @@ -843,24 +844,31 @@ func MyApproveChance(header *protocol.RequestHeader, request *protocol.MyApprove
843 //CreateTime: chance.CreateTime.Unix() * 1000, 844 //CreateTime: chance.CreateTime.Unix() * 1000,
844 } 845 }
845 jsonUnmarshal(chance.SourceContent, &item.FormList) 846 jsonUnmarshal(chance.SourceContent, &item.FormList)
  847 + item.FormList = clearEmptyForm(item.FormList)
846 jsonUnmarshal(chance.Images, &item.Pictures) 848 jsonUnmarshal(chance.Images, &item.Pictures)
847 jsonUnmarshal(chance.Voices, &item.Speechs) 849 jsonUnmarshal(chance.Voices, &item.Speechs)
848 jsonUnmarshal(chance.Videos, &item.Videos) 850 jsonUnmarshal(chance.Videos, &item.Videos)
849 commItem.Chance = item 851 commItem.Chance = item
850 } 852 }
851 } 853 }
852 - commItem.Approve = protocol.Approve{ 854 + approve := protocol.Approve{
853 ProcessId: chance.Id, 855 ProcessId: chance.Id,
854 //Provider:provider, 856 //Provider:provider,
855 - CreateTime: chance.ProcessCreateTime.Unix() * 1000,  
856 - ApproveTime: chance.ApproveTime.Unix() * 1000, 857 + CreateTime: chance.ProcessCreateTime.Unix() * 1000,
857 } 858 }
  859 + //审核过的才有审核时间
  860 + if request.ReviewStatus != protocol.ReviewStatusAuditging {
  861 + approve.ApproveTime = chance.ApproveTime.Unix() * 1000
  862 + }
  863 + commItem.Approve = approve
858 //审核完有审核数据 864 //审核完有审核数据
859 if request.ReviewStatus == protocol.ReviewStatusAuditging { 865 if request.ReviewStatus == protocol.ReviewStatusAuditging {
860 commItem.Message = chance.ApproveMessage 866 commItem.Message = chance.ApproveMessage
861 } 867 }
862 if request.ReviewStatus == protocol.ReviewStatusPass { 868 if request.ReviewStatus == protocol.ReviewStatusPass {
863 - jsonUnmarshal(chance.ApproveData, &commItem.ApproveData) 869 + var approveData *protocol.ApproveData
  870 + jsonUnmarshal(chance.ApproveData, &approveData)
  871 + commItem.Score = approveData.Score
864 } 872 }
865 rsp.List = append(rsp.List, commItem) 873 rsp.List = append(rsp.List, commItem)
866 } 874 }
@@ -876,6 +884,20 @@ func jsonUnmarshal(jsonData string, v interface{}) { @@ -876,6 +884,20 @@ func jsonUnmarshal(jsonData string, v interface{}) {
876 } 884 }
877 } 885 }
878 886
  887 +//清楚未填写的表单数据
  888 +func clearEmptyForm(inputFormList []*protocol.Form) (FormList []*protocol.Form) {
  889 + if len(inputFormList) == 0 {
  890 + return
  891 + }
  892 + for i := range inputFormList {
  893 + item := inputFormList[i]
  894 + if len(item.Value) > 0 {
  895 + FormList = append(FormList, item)
  896 + }
  897 + }
  898 + return
  899 +}
  900 +
879 //机会详情 901 //机会详情
880 func ChanceDetail(header *protocol.RequestHeader, request *protocol.ChanceDetailRequest) (rsp *protocol.ChanceDetailResponse, err error) { 902 func ChanceDetail(header *protocol.RequestHeader, request *protocol.ChanceDetailRequest) (rsp *protocol.ChanceDetailResponse, err error) {
881 var ( 903 var (
@@ -105,7 +105,7 @@ func Announcements(header *protocol.RequestHeader, request *protocol.Announcemen @@ -105,7 +105,7 @@ func Announcements(header *protocol.RequestHeader, request *protocol.Announcemen
105 Title: bulletin.Title, 105 Title: bulletin.Title,
106 Control: int(bulletin.AllowClose), 106 Control: int(bulletin.AllowClose),
107 //link:'https://web-open.fjmaimaimai.com/#/ability/announcement?id='+announcementCfgData[i].id+'&uid='+param.uid 107 //link:'https://web-open.fjmaimaimai.com/#/ability/announcement?id='+announcementCfgData[i].id+'&uid='+param.uid
108 - Link: fmt.Sprintf("%v#/ability/announcement?id=%v&uid=%v&oppo=", beego.AppConfig.String("h5_host"), bulletin.Id, msg.ReceiveUserId), 108 + Link: fmt.Sprintf("%v/#/ability/announcement?id=%v&uid=%v&oppo=", beego.AppConfig.String("h5_host"), bulletin.Id, msg.ReceiveUserId),
109 } 109 }
110 item.Cover = protocol.Cover{ 110 item.Cover = protocol.Cover{
111 Path: bulletin.Cover, 111 Path: bulletin.Cover,