Răsfoiți Sursa

fix:sql 修改 pull

duxin 3 ani în urmă
părinte
comite
46feb41af4

+ 1 - 1
rpc/consumer/internal/logic/infochangelogic.go

@@ -50,7 +50,7 @@ func (l *InfoChangeLogic) InfoChange(in *consumer.InfoDetailReq) (*consumer.Info
 
 		if in.MsgType == 1 || in.MsgType == 2 {
 			if _d := model.Mysql.SelectBySql(`SELECT a.*,b.title as relatedTitle FROM information a
-				LEFT JOIN information b on (a.related_id =b.id) where a.id = ? and app_id = ?`, mc.IntAll(msgId), in.AppId); _d != nil && len(*_d) > 0 {
+				LEFT JOIN information b on (a.related_id =b.id) where a.id = ? and a.app_id = ?`, mc.IntAll(msgId), in.AppId); _d != nil && len(*_d) > 0 {
 				data = (*_d)[0]
 				var (
 					Related consumer.Related

+ 1 - 1
rpc/manager/internal/logic/infodetaillogic.go

@@ -49,7 +49,7 @@ func (l *InfoDetailLogic) InfoDetail(in *manager.InfoDetailReq) (*manager.InfoDe
 	switch in.Type {
 	case 1, 2:
 		if _d := model.Mysql.SelectBySql(`SELECT a.*,b.title as relatedTitle FROM information a 
-				LEFT JOIN information b on (a.related_id =b.id) where a.id =? and app_id = ?`, msgId, in.AppId); _d != nil && len(*_d) > 0 {
+				LEFT JOIN information b on (a.related_id =b.id) where a.id =? and a.app_id = ?`, msgId, in.AppId); _d != nil && len(*_d) > 0 {
 			data = (*_d)[0]
 			var (
 				related manager.Related