作者 yangfu

配置修改

... ... @@ -37,7 +37,7 @@ user_center_app_key ="39aefef9e22744a3b2d2d3791824ae7b"
user_center_app_secret ="cykbjnfqgctn"
#Html5
h5_host = "https://web-open-test.fjmaimaimai.com"
h5_host = "https://mmm-web-open-test.fjmaimaimai.com"
#审核中心
suplus_approve_host ="http://suplus-approve-dev.fjmaimaimai.com"
\ No newline at end of file
... ...
... ... @@ -37,7 +37,7 @@ user_center_app_key ="39aefef9e22744a3b2d2d3791824ae7b"
user_center_app_secret ="cykbjnfqgctn"
#Html5
h5_host = "https://web-open-test.fjmaimaimai.com"
h5_host = "https://mmm-web-open-test.fjmaimaimai.com"
#审核中心
suplus_approve_host ="http://suplus-approve-test.fjmaimaimai.com"
\ No newline at end of file
... ...
... ... @@ -132,7 +132,7 @@ select id,approve_time,approve_data,uid,chance_id,approve_message,create_at pro
from audit_flow_process where uid=? and enable_status =1 and review_status in (%v) and (?=0 or id>?)
)a left outer join chance b on a.chance_id = b.id
)a left outer join chance_data b on a.chance_id =b.chance_id
order by a.approve_time desc
order by process_create_time desc
LIMIT ?`, utils.JoinInt8s(reviewStatus, ","))
sqlCount := fmt.Sprintf(`select count(0)
... ...
... ... @@ -301,6 +301,9 @@ type CommonListItem struct {
Message interface{} `json:"message,omitempty"` //消息
Comment interface{} `json:"comment,omitempty"` //评论
ChanceStatus int `json:"chanceStatus"` //0:正常 1.删除 2.关闭
//我审核的-通过
Score interface{} `json:"score,omitempty"`
}
type ChanceItem struct {
Id int64 `json:"id"`
... ...
... ... @@ -794,6 +794,7 @@ func MySubmitChance(header *protocol.RequestHeader, request *protocol.MySubmitCh
CreateTime: chance.CreateTime.Unix() * 1000,
}
jsonUnmarshal(chance.SourceContent, &item.FormList)
item.FormList = clearEmptyForm(item.FormList)
jsonUnmarshal(chance.Images, &item.Pictures)
jsonUnmarshal(chance.Voices, &item.Speechs)
jsonUnmarshal(chance.Videos, &item.Videos)
... ... @@ -843,24 +844,31 @@ func MyApproveChance(header *protocol.RequestHeader, request *protocol.MyApprove
//CreateTime: chance.CreateTime.Unix() * 1000,
}
jsonUnmarshal(chance.SourceContent, &item.FormList)
item.FormList = clearEmptyForm(item.FormList)
jsonUnmarshal(chance.Images, &item.Pictures)
jsonUnmarshal(chance.Voices, &item.Speechs)
jsonUnmarshal(chance.Videos, &item.Videos)
commItem.Chance = item
}
}
commItem.Approve = protocol.Approve{
approve := protocol.Approve{
ProcessId: chance.Id,
//Provider:provider,
CreateTime: chance.ProcessCreateTime.Unix() * 1000,
ApproveTime: chance.ApproveTime.Unix() * 1000,
CreateTime: chance.ProcessCreateTime.Unix() * 1000,
}
//审核过的才有审核时间
if request.ReviewStatus != protocol.ReviewStatusAuditging {
approve.ApproveTime = chance.ApproveTime.Unix() * 1000
}
commItem.Approve = approve
//审核完有审核数据
if request.ReviewStatus == protocol.ReviewStatusAuditging {
commItem.Message = chance.ApproveMessage
}
if request.ReviewStatus == protocol.ReviewStatusPass {
jsonUnmarshal(chance.ApproveData, &commItem.ApproveData)
var approveData *protocol.ApproveData
jsonUnmarshal(chance.ApproveData, &approveData)
commItem.Score = approveData.Score
}
rsp.List = append(rsp.List, commItem)
}
... ... @@ -876,6 +884,20 @@ func jsonUnmarshal(jsonData string, v interface{}) {
}
}
//清楚未填写的表单数据
func clearEmptyForm(inputFormList []*protocol.Form) (FormList []*protocol.Form) {
if len(inputFormList) == 0 {
return
}
for i := range inputFormList {
item := inputFormList[i]
if len(item.Value) > 0 {
FormList = append(FormList, item)
}
}
return
}
//机会详情
func ChanceDetail(header *protocol.RequestHeader, request *protocol.ChanceDetailRequest) (rsp *protocol.ChanceDetailResponse, err error) {
var (
... ...
... ... @@ -105,7 +105,7 @@ func Announcements(header *protocol.RequestHeader, request *protocol.Announcemen
Title: bulletin.Title,
Control: int(bulletin.AllowClose),
//link:'https://web-open.fjmaimaimai.com/#/ability/announcement?id='+announcementCfgData[i].id+'&uid='+param.uid
Link: fmt.Sprintf("%v#/ability/announcement?id=%v&uid=%v&oppo=", beego.AppConfig.String("h5_host"), bulletin.Id, msg.ReceiveUserId),
Link: fmt.Sprintf("%v/#/ability/announcement?id=%v&uid=%v&oppo=", beego.AppConfig.String("h5_host"), bulletin.Id, msg.ReceiveUserId),
}
item.Cover = protocol.Cover{
Path: bulletin.Cover,
... ...