|
|
@@ -65,6 +65,18 @@ func (s SuperCloudIssuanceUserRobotBindFollowDb) GetCloudIssuanceUserRobotBindFo |
|
|
|
return m, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (s SuperCloudIssuanceUserRobotBindFollowDb) GetCloudIssuanceUserRobotBindFollowById(id int) (m *models.SuperCloudIssuanceUserRobotBindFollow, err error) { |
|
|
|
m = new(models.SuperCloudIssuanceUserRobotBindFollow) |
|
|
|
has, err := s.Db.Where("id =?", id).Get(m) |
|
|
|
if err != nil { |
|
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
|
} |
|
|
|
if has == false { |
|
|
|
return nil, nil |
|
|
|
} |
|
|
|
return m, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (s SuperCloudIssuanceUserRobotBindFollowDb) GetCloudIssuanceUserRobotBindFollowByChatRoomId(chatRoomId string, robotId int) (m *models.SuperCloudIssuanceUserRobotBindFollow, err error) { |
|
|
|
m = new(models.SuperCloudIssuanceUserRobotBindFollow) |
|
|
|
has, err := s.Db.Where("chat_room_id =? AND robot_id = ? AND state = 1", chatRoomId, robotId).Get(m) |
|
|
|