dengbiao 4 miesięcy temu
rodzic
commit
9963d7d4a3
2 zmienionych plików z 13 dodań i 0 usunięć
  1. +1
    -0
      src/dao/super_cloud_issuance_user_robot_bind_follow_dao.go
  2. +12
    -0
      src/implement/super_cloud_issuance_user_robot_bind_follow_db.go

+ 1
- 0
src/dao/super_cloud_issuance_user_robot_bind_follow_dao.go Wyświetl plik

@@ -7,6 +7,7 @@ import (

type SuperCloudIssuanceUserRobotBindFollowDao interface {
GetCloudIssuanceUserRobotBindFollow(id int) (m *models.SuperCloudIssuanceUserRobotBindFollow, err error)
GetCloudIssuanceUserRobotBindFollowById(id int) (m *models.SuperCloudIssuanceUserRobotBindFollow, err error)
GetCloudIssuanceUserRobotBindFollowByChatRoomId(chatRoomId string, robotId int) (m *models.SuperCloudIssuanceUserRobotBindFollow, err error)
InsertCloudIssuanceUserRobotBindFollow(m *models.SuperCloudIssuanceUserRobotBindFollow) (id int, err error)
SaveCloudIssuanceUserRobotBindFollow(id interface{}, m *models.SuperCloudIssuanceUserRobotBindFollow, forceColums ...string) (affected int64, err error)


+ 12
- 0
src/implement/super_cloud_issuance_user_robot_bind_follow_db.go Wyświetl plik

@@ -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)


Ładowanie…
Anuluj
Zapisz