Browse Source

update

master
dengbiao 5 months ago
parent
commit
87130c2acc
19 changed files with 209 additions and 8 deletions
  1. +5
    -0
      src/dao/installment_payment_list_dao.go
  2. +5
    -0
      src/dao/installment_payment_scheme_dao.go
  3. +5
    -0
      src/dao/installment_payment_scheme_with_goods_dao.go
  4. +5
    -2
      src/dao/super_cloud_issuance_user_robot_dao.go
  5. +14
    -0
      src/implement/installment_payment_list_db.go
  6. +14
    -0
      src/implement/installment_payment_scheme_db.go
  7. +14
    -0
      src/implement/installment_payment_scheme_with_goods_db.go
  8. +8
    -6
      src/implement/super_cloud_issuance_user_robot_db.go
  9. +15
    -0
      src/models/installment_payment_list.go
  10. +9
    -0
      src/models/installment_payment_scheme.go
  11. +10
    -0
      src/models/installment_payment_scheme_with_goods.go
  12. +15
    -0
      src/models/official/db_super_cloud_issuance_robot_records.go
  13. +15
    -0
      src/models/official/model/super_cloud_issuance_basic.go
  14. +14
    -0
      src/models/official/model/super_cloud_issuance_master.go
  15. +22
    -0
      src/models/official/model/super_cloud_issuance_master_buy_ord.go
  16. +15
    -0
      src/models/official/model/super_cloud_issuance_robot.go
  17. +8
    -0
      src/models/official/model/super_cloud_issuance_robot_records.go
  18. +8
    -0
      src/models/official/model/user_app_list.go
  19. +8
    -0
      src/models/official/model/user_app_member.go

+ 5
- 0
src/dao/installment_payment_list_dao.go View File

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

type InstallmentPaymentListDao interface {
//TODO:: You can add specific method definitions here
}

+ 5
- 0
src/dao/installment_payment_scheme_dao.go View File

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

type InstallmentPaymentSchemeDao interface {
//TODO:: You can add specific method definitions here
}

+ 5
- 0
src/dao/installment_payment_scheme_with_goods_dao.go View File

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

type InstallmentPaymentSchemeWithGoodsDao interface {
//TODO:: You can add specific method definitions here
}

+ 5
- 2
src/dao/super_cloud_issuance_user_robot_dao.go View File

@@ -1,10 +1,13 @@
package dao

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

type SuperCloudIssuanceUserRobotDao interface {
GetSuperCloudIssuanceUserRobot() (m *models.SuperCloudIssuanceUserRobot, err error)
SaveSuperCloudIssuanceUserRobot(id interface{}, m *models.SuperCloudIssuanceUserRobot, forceColums ...string) (affected int64, err error)
GetCloudIssuanceUserFreeRobot() (m *models.SuperCloudIssuanceUserRobot, err error)
InsertCloudIssuanceUserRobot(m *models.SuperCloudIssuanceUserRobot) (id int, err error)
InsertCloudIssuanceUserRobot(m *models.SuperCloudIssuanceUserRobot, officialDb *xorm.Engine) (id int, err error)
}

+ 14
- 0
src/implement/installment_payment_list_db.go View File

@@ -0,0 +1,14 @@
package implement

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

type InstallmentPaymentListDb struct {
Db *xorm.Engine
}

func NewInstallmentPaymentListDb(engine *xorm.Engine) dao.InstallmentPaymentListDao {
return &InstallmentPaymentListDb{Db: engine}
}

+ 14
- 0
src/implement/installment_payment_scheme_db.go View File

@@ -0,0 +1,14 @@
package implement

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

type InstallmentPaymentSchemeDb struct {
Db *xorm.Engine
}

func NewInstallmentPaymentSchemeDb(engine *xorm.Engine) dao.InstallmentPaymentSchemeDao {
return &InstallmentPaymentSchemeDb{Db: engine}
}

+ 14
- 0
src/implement/installment_payment_scheme_with_goods_db.go View File

@@ -0,0 +1,14 @@
package implement

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

type InstallmentPaymentSchemeWithGoodsDb struct {
Db *xorm.Engine
}

func NewInstallmentPaymentSchemeWithGoodsDb(engine *xorm.Engine) dao.InstallmentPaymentSchemeWithGoodsDao {
return &InstallmentPaymentSchemeWithGoodsDb{Db: engine}
}

+ 8
- 6
src/implement/super_cloud_issuance_user_robot_db.go View File

@@ -3,6 +3,8 @@ package implement
import (
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao"
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models"
db "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models/official"
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models/official/model"
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/super_cloud_issuance/enum"
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx"
"strconv"
@@ -24,17 +26,17 @@ type SuperCloudIssuanceUserRobotDb struct {
MasterId string `json:"master_id"`
}

func (superCloudIssuanceUserRobotDb *SuperCloudIssuanceUserRobotDb) InsertCloudIssuanceUserRobot(m *models.SuperCloudIssuanceUserRobot) (id int, err error) {
_, err = cloudIssuanceUserRobotDb.Db.InsertOne(m)
func (superCloudIssuanceUserRobotDb *SuperCloudIssuanceUserRobotDb) InsertCloudIssuanceUserRobot(m *models.SuperCloudIssuanceUserRobot, officialDb *xorm.Engine) (id int, err error) {
_, err = superCloudIssuanceUserRobotDb.Db.InsertOne(m)
if err != nil {
return 0, err
}
id = m.Id
//顺便新增一份数据到总后台的 `cloud_issuance_robot_records` 表
db.CloudIssuanceRobotRecordsInsert(&model2.CloudIssuanceRobotRecords{
MasterId: cloudIssuanceUserRobotDb.MasterId,
//顺便新增一份数据到总后台的 `super_cloud_issuance_robot_records` 表
db.CloudIssuanceRobotRecordsInsert(officialDb, &model.SuperCloudIssuanceRobotRecords{
MasterId: superCloudIssuanceUserRobotDb.MasterId,
RobotId: strconv.Itoa(m.RobotId),
Uid: cloudIssuanceUserRobotDb.Uid,
Uid: superCloudIssuanceUserRobotDb.Uid,
})
return id, nil
}


+ 15
- 0
src/models/installment_payment_list.go View File

@@ -0,0 +1,15 @@
package models

type InstallmentPaymentList struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Uid int `json:"uid" xorm:"not null default 0 comment('uid') INT(11)"`
GoodsId int `json:"goods_id" xorm:"not null default 0 comment('商品ID') INT(11)"`
OrdId int64 `json:"ord_id" xorm:"not null default 0 comment('订单ID') BIGINT(20)"`
TotalAmount string `json:"total_amount" xorm:"not null default 0.00 comment('总金额') DECIMAL(12,2)"`
InstallmentNums int `json:"installment_nums" xorm:"not null default 0 comment('分期数') TINYINT(3)"`
AlreadyRepaidInstallmentNums int `json:"already_repaid_installment_nums" xorm:"not null default 0 comment('已换分期数') TINYINT(3)"`
RepaymentAmountPerInstallment string `json:"repayment_amount_per_installment" xorm:"not null default 0.00 comment('每期还款金额') DECIMAL(12,2)"`
IsRepaidOff int `json:"is_repaid_off" xorm:"not null default 0 comment('是否已偿还完(0:未偿还完 1:已偿还完)') TINYINT(1)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('创建时间') DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') DATETIME"`
}

+ 9
- 0
src/models/installment_payment_scheme.go View File

@@ -0,0 +1,9 @@
package models

type InstallmentPaymentScheme struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Name string `json:"name" xorm:"not null default '' comment('方案名称') CHAR(50)"`
InstallmentNums int `json:"installment_nums" xorm:"not null default 0 comment('分期数') TINYINT(3)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('创建时间') DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') DATETIME"`
}

+ 10
- 0
src/models/installment_payment_scheme_with_goods.go View File

@@ -0,0 +1,10 @@
package models

type InstallmentPaymentSchemeWithGoods struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
GoodsId int `json:"goods_id" xorm:"not null default 0 comment('商品id') INT(11)"`
SchemeId int `json:"scheme_id" xorm:"not null default 0 comment('方案id') INT(11)"`
Pvd int `json:"pvd" xorm:"not null default 1 comment('平台(1:自营商城)') TINYINT(3)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('创建时间') DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') DATETIME"`
}

+ 15
- 0
src/models/official/db_super_cloud_issuance_robot_records.go View File

@@ -0,0 +1,15 @@
package db

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

// CloudIssuanceRobotRecordsInsert 插入单条数据
func CloudIssuanceRobotRecordsInsert(officialDb *xorm.Engine, CloudIssuanceRobotRecords *model.SuperCloudIssuanceRobotRecords) (int, error) {
_, err := officialDb.InsertOne(CloudIssuanceRobotRecords)
if err != nil {
return 0, err
}
return CloudIssuanceRobotRecords.Id, nil
}

+ 15
- 0
src/models/official/model/super_cloud_issuance_basic.go View File

@@ -0,0 +1,15 @@
package model

import "time"

type SuperCloudIssuanceBasic struct {
Id int `json:"id"`
ImageNumsLimitIssuanceOnCircleOfFriends int `json:"image_nums_limit_issuance_on_circle_of_friends"`
ImageNumsLimitIssuanceOnGroups int `json:"image_nums_limit_issuance_on_groups"`
BindNums int `json:"bind_nums"`
FollowGroupUserNums int `json:"follow_group_user_nums"`
FollowGroupBindNums int `json:"follow_group_bind_nums"`
FollowGroupRelayNums int `json:"follow_group_relay_nums"`
CreateAt time.Time `json:"create_at" xorm:"not null default CURRENT_TIMESTAMP comment('创建时间') TIMESTAMP"`
UpdateAt time.Time `json:"update_at" xorm:"not null default CURRENT_TIMESTAMP comment('更新时间') TIMESTAMP"`
}

+ 14
- 0
src/models/official/model/super_cloud_issuance_master.go View File

@@ -0,0 +1,14 @@
package model

import "time"

type SuperCloudIssuanceMaster struct {
Id int `json:"id"`
MasterId int `json:"master_id"`
Amount string `json:"amount"`
CreditAmount string `json:"credit_amount"`
Memo string `json:"memo"`
State int `json:"state"`
CreateAt time.Time `json:"create_at" xorm:"not null default CURRENT_TIMESTAMP comment('创建时间') TIMESTAMP"`
UpdateAt time.Time `json:"update_at" xorm:"not null default CURRENT_TIMESTAMP comment('更新时间') TIMESTAMP"`
}

+ 22
- 0
src/models/official/model/super_cloud_issuance_master_buy_ord.go View File

@@ -0,0 +1,22 @@
package model

import "time"

type SuperCloudIssuanceMasterBuyOrd struct {
Id int `json:"id"`
OrdId string `json:"ord_id"`
MasterId int `json:"master_id"`
Nickname string `json:"nickname"`
Phone int64 `json:"phone"`
Uid int `json:"uid"`
UserPhone string `json:"user_phone"`
RobotId int `json:"robot_id"`
Month int `json:"month"`
CostPrice string `json:"cost_price"`
BeforeBalance string `json:"before_balance"`
Balance string `json:"balance"`
Memo string `json:"memo"`
State int `json:"state"`
CreateAt time.Time `json:"create_at" xorm:"not null default CURRENT_TIMESTAMP comment('创建时间') TIMESTAMP"`
UpdateAt time.Time `json:"update_at" xorm:"not null default CURRENT_TIMESTAMP comment('更新时间') TIMESTAMP"`
}

+ 15
- 0
src/models/official/model/super_cloud_issuance_robot.go View File

@@ -0,0 +1,15 @@
package model

import "time"

type SuperCloudIssuanceRobot struct {
Id int `json:"id"`
Name string `json:"name"`
Price string `json:"price"`
Type int32 `json:"type"`
State int32 `json:"state"`
Sort int `json:"sort"`
Memo string `json:"memo"`
CreateAt time.Time `json:"create_at" xorm:"not null default CURRENT_TIMESTAMP comment('创建时间') TIMESTAMP"`
UpdateAt time.Time `json:"update_at" xorm:"not null default CURRENT_TIMESTAMP comment('更新时间') TIMESTAMP"`
}

+ 8
- 0
src/models/official/model/super_cloud_issuance_robot_records.go View File

@@ -0,0 +1,8 @@
package model

type SuperCloudIssuanceRobotRecords struct {
Id int `json:"id"`
MasterId string `json:"master_id"`
RobotId string `json:"robot_id"`
Uid int `json:"uid"`
}

+ 8
- 0
src/models/official/model/user_app_list.go View File

@@ -0,0 +1,8 @@
package model

type UserAppList struct {
Id int `json:"id" xorm:"int(11) NOT NULL "`
Uuid int64 `json:"uuid" xorm:"int(10) NOT NULL "`
AppId int64 `json:"app_id" xorm:"int(10) NOT NULL "`
Name string `json:"name" xorm:"varchar(255) DEFAULT '' "`
}

+ 8
- 0
src/models/official/model/user_app_member.go View File

@@ -0,0 +1,8 @@
package model

type UserAppMember struct {
Id int `json:"id" xorm:"int(11) NOT NULL "`
Uuid int64 `json:"uuid" xorm:"int(10) NOT NULL "`
Uid int64 `json:"uid" xorm:"int(10) NOT NULL "`
Phone int64 `json:"phone" xorm:"int(10) NOT NULL "`
}

Loading…
Cancel
Save