|
@@ -32,8 +32,16 @@ func (l *StatusQueryLogic) StatusQuery(in *consumer.StatusReq) (*consumer.Status
|
|
|
if in.Type == 3 {
|
|
|
data := model.Mysql.FindOne("supply_info", map[string]interface{}{"id": msgId}, "", "")
|
|
|
if len(*data) > 0 {
|
|
|
+ status := mc.IntAll((*data)["status"])
|
|
|
+ published := mc.IntAll((*data)["published"])
|
|
|
var statusData consumer.StatusData
|
|
|
- statusData.Status = mc.InterfaceToStr((*data)["status"])
|
|
|
+ statusData.Status = "1"
|
|
|
+ if published == 2 {
|
|
|
+ statusData.Status = "2"
|
|
|
+ } else if status == -2 || status == -1 {
|
|
|
+ statusData.Status = "3"
|
|
|
+ }
|
|
|
+
|
|
|
statusData.Published = mc.InterfaceToStr((*data)["published"])
|
|
|
return &consumer.StatusResp{
|
|
|
ErrCode: 0,
|
|
@@ -44,8 +52,15 @@ func (l *StatusQueryLogic) StatusQuery(in *consumer.StatusReq) (*consumer.Status
|
|
|
} else {
|
|
|
data := model.Mysql.FindOne("information", map[string]interface{}{"id": msgId}, "", "")
|
|
|
if len(*data) > 0 {
|
|
|
+ status := mc.IntAll((*data)["status"])
|
|
|
+ published := mc.IntAll((*data)["published"])
|
|
|
var statusData consumer.StatusData
|
|
|
- statusData.Status = mc.InterfaceToStr((*data)["status"])
|
|
|
+ statusData.Status = "1"
|
|
|
+ if published == 2 {
|
|
|
+ statusData.Status = "2"
|
|
|
+ } else if status == -2 || status == -1 {
|
|
|
+ statusData.Status = "3"
|
|
|
+ }
|
|
|
statusData.Published = mc.InterfaceToStr((*data)["published"])
|
|
|
return &consumer.StatusResp{
|
|
|
ErrCode: 0,
|