Browse Source

update

master
dengbiao 4 months ago
parent
commit
9963d7d4a3
2 changed files with 13 additions and 0 deletions
  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 View File

@@ -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 View File

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


Loading…
Cancel
Save