12345678910111213141516171819202122232425262728 |
- package service
-
- import (
- "sws_xcx/models"
-
- "github.com/jinzhu/gorm"
- )
-
- type CheckRecordService struct {
- rdb *gorm.DB
- wdb *gorm.DB
- }
-
- func NewCheckRecordService() *CheckRecordService {
- return &CheckRecordService{
- rdb: ReadDB(),
- wdb: WriteDB(),
- }
- }
-
- func (s *CheckRecordService) GetCheckRecordList(pageNum, pageSize int, search string) ([]*models.CheckRecord, int, error) {
- return nil, 0, nil
- }
-
- func (s *CheckRecordService) CreateCheckRecord(checkRecord *models.CheckRecord) error {
- return s.wdb.Model(checkRecord).Create(checkRecord).Error
- }
|