Browse Source

云发单

master
huangjiajun 4 months ago
parent
commit
224692f475
9 changed files with 58 additions and 6 deletions
  1. +3
    -1
      src/dao/super_cloud_issuance_copy_writing_dao.go
  2. +3
    -1
      src/dao/super_cloud_issuance_goods_category_dao.go
  3. +3
    -1
      src/dao/super_cloud_issuance_goods_dao.go
  4. +4
    -2
      src/dao/super_cloud_issuance_user_robot_bind_circle_dao.go
  5. +9
    -0
      src/implement/super_cloud_issuance_copy_writing_db.go
  6. +10
    -0
      src/implement/super_cloud_issuance_goods_category_db.go
  7. +16
    -0
      src/implement/super_cloud_issuance_goods_db.go
  8. +9
    -1
      src/implement/super_cloud_issuance_user_robot_bind_circle_db.go
  9. +1
    -0
      src/models/super_cloud_issuance_goods.go

+ 3
- 1
src/dao/super_cloud_issuance_copy_writing_dao.go View File

@@ -1,5 +1,7 @@
package dao package dao


import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models"

type SuperCloudIssuanceCopyWritingDao interface { type SuperCloudIssuanceCopyWritingDao interface {
//TODO:: You can add specific method definitions here
FindSuperCloudIssuanceCopyWriting() (mm *[]models.SuperCloudIssuanceCopyWriting, err error)
} }

+ 3
- 1
src/dao/super_cloud_issuance_goods_category_dao.go View File

@@ -1,5 +1,7 @@
package dao package dao


import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models"

type SuperCloudIssuanceGoodsCategoryDao interface { type SuperCloudIssuanceGoodsCategoryDao interface {
//TODO:: You can add specific method definitions here
FindSuperCloudIssuanceGoodsCategory(start, limit int) (mm *[]models.SuperCloudIssuanceGoodsCategory, err error)
} }

+ 3
- 1
src/dao/super_cloud_issuance_goods_dao.go View File

@@ -1,5 +1,7 @@
package dao package dao


import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models"

type SuperCloudIssuanceGoodsDao interface { type SuperCloudIssuanceGoodsDao interface {
//TODO:: You can add specific method definitions here
FindSuperCloudIssuanceGoods(id string, cid, start, limit int) (mm *[]models.SuperCloudIssuanceGoods, err error)
} }

+ 4
- 2
src/dao/super_cloud_issuance_user_robot_bind_circle_dao.go View File

@@ -1,5 +1,7 @@
package dao
package dao

import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models"


type SuperCloudIssuanceUserRobotBindCircleDao interface { type SuperCloudIssuanceUserRobotBindCircleDao interface {
//TODO:: You can add specific method definitions here
GetSuperCloudIssuanceUserRobotBindCircle(uid, robotId int) (mm *models.SuperCloudIssuanceUserRobotBindCircle)
} }

+ 9
- 0
src/implement/super_cloud_issuance_copy_writing_db.go View File

@@ -2,6 +2,8 @@ package implement


import ( import (
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao"
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models"
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx"
"xorm.io/xorm" "xorm.io/xorm"
) )


@@ -12,3 +14,10 @@ type SuperCloudIssuanceCopyWritingDb struct {
func NewSuperCloudIssuanceCopyWritingDb(engine *xorm.Engine) dao.SuperCloudIssuanceCopyWritingDao { func NewSuperCloudIssuanceCopyWritingDb(engine *xorm.Engine) dao.SuperCloudIssuanceCopyWritingDao {
return &SuperCloudIssuanceCopyWritingDb{Db: engine} return &SuperCloudIssuanceCopyWritingDb{Db: engine}
} }
func (h SuperCloudIssuanceCopyWritingDb) FindSuperCloudIssuanceCopyWriting() (mm *[]models.SuperCloudIssuanceCopyWriting, err error) {
var m []models.SuperCloudIssuanceCopyWriting
if err := h.Db.Where("1=1").Find(&m); err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
return &m, nil
}

+ 10
- 0
src/implement/super_cloud_issuance_goods_category_db.go View File

@@ -2,6 +2,8 @@ package implement


import ( import (
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao"
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models"
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx"
"xorm.io/xorm" "xorm.io/xorm"
) )


@@ -12,3 +14,11 @@ type SuperCloudIssuanceGoodsCategoryDb struct {
func NewSuperCloudIssuanceGoodsCategoryDb(engine *xorm.Engine) dao.SuperCloudIssuanceGoodsCategoryDao { func NewSuperCloudIssuanceGoodsCategoryDb(engine *xorm.Engine) dao.SuperCloudIssuanceGoodsCategoryDao {
return &SuperCloudIssuanceGoodsCategoryDb{Db: engine} return &SuperCloudIssuanceGoodsCategoryDb{Db: engine}
} }

func (h SuperCloudIssuanceGoodsCategoryDb) FindSuperCloudIssuanceGoodsCategory(start, limit int) (mm *[]models.SuperCloudIssuanceGoodsCategory, err error) {
var m []models.SuperCloudIssuanceGoodsCategory
if err := h.Db.Where("1=1").Limit(limit, start).Find(&m); err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
return &m, nil
}

+ 16
- 0
src/implement/super_cloud_issuance_goods_db.go View File

@@ -2,6 +2,8 @@ package implement


import ( import (
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao"
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models"
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx"
"xorm.io/xorm" "xorm.io/xorm"
) )


@@ -12,3 +14,17 @@ type SuperCloudIssuanceGoodsDb struct {
func NewSuperCloudIssuanceGoodsDb(engine *xorm.Engine) dao.SuperCloudIssuanceGoodsDao { func NewSuperCloudIssuanceGoodsDb(engine *xorm.Engine) dao.SuperCloudIssuanceGoodsDao {
return &SuperCloudIssuanceGoodsDb{Db: engine} return &SuperCloudIssuanceGoodsDb{Db: engine}
} }
func (h SuperCloudIssuanceGoodsDb) FindSuperCloudIssuanceGoods(id string, cid, start, limit int) (mm *[]models.SuperCloudIssuanceGoods, err error) {
var m []models.SuperCloudIssuanceGoods
sess := h.Db.Where("1=1")
if cid > 0 {
sess.And("cloud_issuance_category_id=?", cid)
}
if id != "" {
sess.And("id=?", id)
}
if err := sess.Limit(limit, start).OrderBy("create_at desc,id desc").Find(&m); err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
return &m, nil
}

+ 9
- 1
src/implement/super_cloud_issuance_user_robot_bind_circle_db.go View File

@@ -1,7 +1,8 @@
package implement
package implement


import ( import (
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao"
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models"
"xorm.io/xorm" "xorm.io/xorm"
) )


@@ -12,3 +13,10 @@ type SuperCloudIssuanceUserRobotBindCircleDb struct {
func NewSuperCloudIssuanceUserRobotBindCircleDb(engine *xorm.Engine) dao.SuperCloudIssuanceUserRobotBindCircleDao { func NewSuperCloudIssuanceUserRobotBindCircleDb(engine *xorm.Engine) dao.SuperCloudIssuanceUserRobotBindCircleDao {
return &SuperCloudIssuanceUserRobotBindCircleDb{Db: engine} return &SuperCloudIssuanceUserRobotBindCircleDb{Db: engine}
} }
func (h SuperCloudIssuanceUserRobotBindCircleDb) GetSuperCloudIssuanceUserRobotBindCircle(uid, robotId int) (mm *models.SuperCloudIssuanceUserRobotBindCircle) {
var m models.SuperCloudIssuanceUserRobotBindCircle
if has, err := h.Db.Where("robot_id=? and uid=?", robotId, uid).Get(&m); err != nil || has == false {
return nil
}
return &m
}

+ 1
- 0
src/models/super_cloud_issuance_goods.go View File

@@ -18,6 +18,7 @@ type SuperCloudIssuanceGoods struct {
GoodsContent string `json:"goods_content" xorm:"comment('商品文案(以json存)') LONGTEXT"` GoodsContent string `json:"goods_content" xorm:"comment('商品文案(以json存)') LONGTEXT"`
GoodsImg string `json:"goods_img" xorm:"comment('商品主图') VARCHAR(255)"` GoodsImg string `json:"goods_img" xorm:"comment('商品主图') VARCHAR(255)"`
GoodsImgUrl string `json:"goods_img_url" xorm:"comment('商品主图URL') VARCHAR(255)"` GoodsImgUrl string `json:"goods_img_url" xorm:"comment('商品主图URL') VARCHAR(255)"`
Commission string `json:"commission" xorm:"comment('佣金比例') VARCHAR(255)"`
CreateAt string `json:"create_at" xorm:"not null DATETIME"` CreateAt string `json:"create_at" xorm:"not null DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null DATETIME"` UpdateAt string `json:"update_at" xorm:"not null DATETIME"`
CloudIssuanceCategoryId int `json:"cloud_issuance_category_id" xorm:"not null default 0 comment('云发单所属分类id') INT(11)"` CloudIssuanceCategoryId int `json:"cloud_issuance_category_id" xorm:"not null default 0 comment('云发单所属分类id') INT(11)"`


Loading…
Cancel
Save