123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523 |
- package main
- import (
- "time"
- )
- type GlobalConf struct {
- Mongob MgoConf
- Cron CronConf
- Mongop MgoConf
- Mysql MysqlConf
- Log Log
- Mongospider MgoConf
- Email EmailConf
- Clickhouse CkConf
- }
- type MgoConf struct {
- Host string
- DB string
- Coll string // 查询表
- Username string
- Password string
- Size int
- }
- // CronConf 定时任务
- type CronConf struct {
- Spec string
- Url string
- Start int
- End int
- Delete int
- }
- type CkConf struct {
- Host string
- Username string
- Password string
- DB string
- }
- type MysqlConf struct {
- Address string
- Dbname string
- Dbname2 string
- Dbname3 string
- Username string
- Password string
- Table string
- Table2 string
- Table3 string
- Table4 string
- Table5 string
- Table6 string
- Table7 string
- Stime string
- Etime string
- Test bool
- }
- type Log struct {
- LogPath string
- MaxSize int
- Compress bool
- MaxAge int
- MaxBackups int
- LogLevel string
- Format string
- }
- type EmailConf struct {
- Api string
- To string
- }
- // DataexportOrder 原来的订单表
- type DataexportOrder struct {
- ID int `gorm:"primaryKey"` // 自增 ID
- OrderCode string `gorm:"column:order_code"` // 订单编号
- PayMoney int `gorm:"column:pay_money"` // 支付金额,精确到分
- OrderMoney int `gorm:"column:order_money"` // 订单金额,精确到分
- UserNickname string `gorm:"column:user_nickname"` // 昵称
- PayTime *time.Time `gorm:"column:pay_time"` // 支付时间
- OrderStatus int `gorm:"column:order_status"` // 订单状态 0:未支付 1:已支付 -1:逻辑删除 -2:已取消 -3:已退款
- CreateTime *time.Time `gorm:"column:create_time"` // 创建时间
- UserOpenid string `gorm:"column:user_openid"` // 用户 openid
- ServiceStatus uint `gorm:"column:service_status"` // 服务状态,1 已提供服务及已经下载,0 未服务
- ServiceTime *time.Time `gorm:"column:service_time"` // 服务时间
- Filter string `gorm:"column:filter"` // 筛选条件
- PrepayId string `gorm:"column:prepay_id"` // 预支付交易会话标识
- CodeUrl string `gorm:"column:code_url"` // 二维码地址
- OutTradeNo string `gorm:"column:out_trade_no"` // 商户订单号
- FilterKeys string `gorm:"column:filter_keys"` // 筛选条件,所有的关键词
- FilterPublishtime string `gorm:"column:filter_publishtime"` // 筛选条件,发布时间
- DataCount int `gorm:"column:data_count"` // 匹配到的数据总数
- UserMail string `gorm:"column:user_mail"` // 用户邮箱
- DataSpec string `gorm:"column:data_spec"` // 数据规格 1-标准字段包 2-高级字段包
- OriginalPrice int `gorm:"column:original_price"` // 原价,精确到分
- PrepayTime *time.Time `gorm:"column:prepay_time"` // 预订单生成时间
- ProductType string `gorm:"column:product_type"` // 订单类型 1-历史数据
- FilterID string `gorm:"column:filter_id"` // 过滤条件在 mongodb 中的 id
- PayWay string `gorm:"column:pay_way"` // 支付方式
- UserPhone string `gorm:"column:user_phone"` // 用户手机号
- ApplybillStatus int `gorm:"column:applybill_status"` // 0:默认未申请发票 1:申请发票 2:已开具
- DownloadUrl string `gorm:"column:download_url"` // 下载链接
- ApplybillType int `gorm:"column:applybill_type"` // 0:默认为个人 1:公司
- ApplybillTaxnum string `gorm:"column:applybill_taxnum"` // 公司申请发票-纳税人识别号
- ApplybillCompany string `gorm:"column:applybill_company"` // 公司申请发票 公司名称
- UserID string `gorm:"column:user_id"` // 用户 id
- RemindStatus int `gorm:"column:remind_status"` // 订单提醒 1-下单时间 2 小时提醒 2-剩余 2 小时自动关闭时再次提醒
- VipStarttime *time.Time `gorm:"column:vip_starttime"` // vip 订阅-开始时间
- VipEndtime *time.Time `gorm:"column:vip_endtime"` // vip 订阅-结束时间
- VipType int `gorm:"column:vip_type"` // vip 订阅-0:试用 1:续费 2:升级
- CourseStatus int `gorm:"column:course_status"` // 1:对公转账未上传凭证;2:对公转账审核中;3:对公转账审核未通过;4:对公转账审核通过(同时修改订单状态为已完成);5:退款审核中;6:已退款;(1,2,3 为订单未支付状态;4,5,6 为订单完成状态)
- ApplyRefundName string `gorm:"column:apply_refund_name"` // 退票申请人
- ApplyRefundReason string `gorm:"column:apply_refund_reason"` // 退票原因
- ApplyRefundTime int64 `gorm:"column:apply_refund_time"` // 退票时间
- DelStatus int `gorm:"column:del_status"` // 删除状态:0:未删除; 1:已删除
- DelTime *time.Time `gorm:"column:del_time"` // 删除时间
- DisWord string `gorm:"column:dis_word"` // 分销口令
- DiscountPrice int `gorm:"column:discount_price"` // 剑鱼折扣金额
- DRelationID string `gorm:"column:d_relation_id"` // 优惠关联 id;--用户领取卡卷的记录 id
- ReturnStatus int `gorm:"column:return_status"` // 回款状态,1-全额回款 2-部分回款 0-未回款
- RefundStatus int `gorm:"column:refund_status"` // 退款状态,1-全额退款 2-部分退款 0-未退款
- IsBackstageOrder int `gorm:"column:is_backstage_order"` // 是否后台创建订单,1-是 0-不是
- Salesperson string `gorm:"column:salesperson"` // 销售人员
- CompanyName string `gorm:"column:company_name"` // 公司名称
- BillingMode int `gorm:"column:billingMode"` // 计费模式:0-免费、1-收费
- SaleTime *time.Time `gorm:"column:sale_time"` // 销售时间
- Commission int `gorm:"column:commission"` // 佣金(单位分)
- ProceduresMoney int `gorm:"column:procedures_money"` // 手续费(单位分)
- OrderChannel string `gorm:"column:order_channel"` // 下单渠道
- DistributionChannel string `gorm:"column:distribution_channel"` // 销售渠道
- SalespersonID string `gorm:"column:salesperson_id"` // 销售人员在剑鱼后台的用户 id
- CreatePerson string `gorm:"column:create_person"` // 创建人
- LastUpdatePerson string `gorm:"column:last_update_person"` // 最近一次更新人
- LastUpdateTime *time.Time `gorm:"column:last_update_time"` // 最近一次更新时间
- SigningSubject string `gorm:"column:signing_subject"` // 签约主体
- ExpirationTime *time.Time `gorm:"column:expiration_time"` // 到期时间 (活动有效)
- AuditStatus int `gorm:"column:audit_status"` // 审核状态 0:待提交 1:待审核 2:审核中 3:审核通过
- BuySubject int `gorm:"column:buy_subject"` // 购买主体;1:个人 2:企业
- EntID int `gorm:"column:ent_id"` // 企业 id
- BuyCount int `gorm:"column:buy_count"` // 购买数量
- AutoUpdate *time.Time `gorm:"column:autoUpdate"` // 自动更新时间
- SaleDep string `gorm:"column:saleDep"` // 业绩归属部门
- SaleMoney string `gorm:"column:saleMoney"` // 销售业绩
- ContractNature int `gorm:"column:contract_nature"` // 合同性质
- }
- func (DataexportOrder) TableName() string {
- return "dataexport_order"
- }
- // DwdFAccountOrder 归集后的订单表
- type DwdFAccountOrder struct {
- ID int `gorm:"primaryKey"` // 自增 ID
- OrderCode string `gorm:"column:order_code"` // 订单编号
- SalerName string `gorm:"column:saler_name"` // 销售人员
- SalerDept string `gorm:"column:saler_dept"` // 部门
- CompanyName string `gorm:"column:company_name"` // 公司名称
- UserRegtime *time.Time `gorm:"column:user_regtime"` // 用户注册时间
- CreateTime *time.Time `gorm:"column:create_time"` // 订单创建时间
- ReturnTime *time.Time `gorm:"column:return_time"` // 回款时间
- SaleTime *time.Time `gorm:"column:sale_time"` // 业绩统计
- RefundTime *time.Time `gorm:"column:refund_time"` // 退款日期
- OriginalPrice int `gorm:"column:original_price"` // 标准售价
- ContractMoney int `gorm:"column:contract_money"` // 合同金额
- Commission int `gorm:"column:commission"` // 佣金
- ProceduresMoney int `gorm:"column:procedures_money"` // 手续费
- ReceivableAmount int `gorm:"column:receivable_amount"` // 应收金额
- TotalReceived int `gorm:"column:total_received"` // 累计已收
- ProductType string `gorm:"column:product_type"` // 产品类型
- DataSpec string `gorm:"column:data_spec"` // 规格
- OrderStatus string `gorm:"column:order_status"` // 订单状态
- ReturnStatus string `gorm:"column:return_status"` // 回款状态
- RefundStatus string `gorm:"column:refund_status"` // 退款状态
- VipType string `gorm:"column:vip_type"` // 付费类型
- UserPhone string `gorm:"column:user_phone"` // 手机号
- UserID string `gorm:"column:user_id"` // 用户 ID
- VipStarttime *time.Time `gorm:"column:vip_starttime"` // 服务开始时间
- VipEndtime *time.Time `gorm:"column:vip_endtime"` // 服务结束时间
- ContractStatus string `gorm:"column:contract_status"` // 合同状态
- ContractCode string `gorm:"column:contract_code"` // 合同编号
- ContractTime *time.Time `gorm:"column:contract_time"` // 合同时间
- SigningSubject string `gorm:"column:signing_subject"` // 签约主体
- OrderChannel string `gorm:"column:order_channel"` // 下单渠道
- DistributionChannel string `gorm:"column:distribution_channel"` // 销售渠道
- IsBackstageOrder string `gorm:"column:is_backstage_order"` // 是否是后台订单
- PayWay string `gorm:"column:pay_way"` // 付款方式
- Comeintime *time.Time `gorm:"column:comeintime;autoCreateTime"` // 入库时间
- Updatetime *time.Time `gorm:"column:updatetime;autoUpdateTime"` // 更新时间
- }
- func (DwdFAccountOrder) TableName() string {
- if GF.Mysql.Test {
- return "dwd_f_account_order_test"
- } else {
- return "dwd_f_account_order"
- }
- }
- // OrderSaleRecord 原来的业绩变更表
- type OrderSaleRecord struct {
- ID int `gorm:"primaryKey;autoIncrement"`
- Ordercode string `gorm:"column:ordercode;unique;comment:'订单编号'"`
- State int `gorm:"column:state;comment:'1 生效业绩,2:待生效业绩 -2:作废业绩 -1:历史业绩变更'"`
- SalerID int `gorm:"column:saler_Id;comment:'销售人员在剑鱼后台的用户 id'"`
- SalerName string `gorm:"column:saler_name;comment:'销售人员名字'"`
- SalerDept string `gorm:"column:saler_dept;comment:'销售部门'"`
- SalerDeptID int `gorm:"column:saler_dept_id;comment:'销售部门 id'"`
- Money int `gorm:"column:money;comment:'销售业绩,单位分'"`
- ChangeValue int `gorm:"column:change_value;comment:'变更值'"`
- GroupUUID string `gorm:"column:group_uuid;comment:'业绩组 id'"`
- LastGroupUUID string `gorm:"column:last_group_uuid;comment:'上次业绩组 id'"`
- ChangeReason string `gorm:"column:change_reason;comment:'变更原因'"`
- Operator string `gorm:"column:operator;comment:'操作人'"`
- StatisticsTime *time.Time `gorm:"column:statistics_time;comment:'业绩统计时间'"`
- CreateTime *time.Time `gorm:"column:create_time;comment:'创建时间'"`
- AutoUpdate *time.Time `gorm:"column:autoUpdate;comment:'自动更新时间'"`
- }
- func (OrderSaleRecord) TableName() string {
- return "order_sale_record"
- }
- // DwdFUserbaseBaseinfo 剑鱼用户表-个人身份表
- type DwdFUserbaseBaseinfo struct {
- ID int `gorm:"primaryKey"`
- Uid string `gorm:"column:uid"`
- Userid string `gorm:"column:userid"`
- BaseUserID int `gorm:"column:base_user_id"`
- Name string `gorm:"column:name"`
- Nickname string `gorm:"column:nickname"`
- Province string `gorm:"column:province"`
- City string `gorm:"column:city"`
- CompanyName string `gorm:"column:company_name"`
- Phone string `gorm:"column:phone"`
- ISpush int `gorm:"column:i_ispush"`
- LRegistedate *time.Time `gorm:"column:l_registedate"`
- IAppid int `gorm:"column:i_appid"`
- Rsource string `gorm:"column:rsource"`
- SAppponetype string `gorm:"column:s_appponetype"`
- ISex int `gorm:"column:i_sex"`
- Email string `gorm:"column:email"`
- SMOpenid string `gorm:"column:s_m_openid"`
- AMOpenid string `gorm:"column:a_m_openid"`
- Unionid string `gorm:"column:unionid"`
- Status int `gorm:"column:status"`
- LogOffCause string `gorm:"column:log_off_cause"`
- LogOffTime *time.Time `gorm:"column:log_off_time"`
- Updatetime *time.Time `gorm:"column:updatetime"`
- Source string `gorm:"column:source"`
- Createtime *time.Time `gorm:"column:createtime"`
- SRegsource string `gorm:"column:s_regsource"`
- SSourceid string `gorm:"column:s_sourceid"`
- BelongTo string `gorm:"column:belong_to"`
- Remark string `gorm:"column:remark"`
- Shuoming string `gorm:"column:shuoming"`
- SPlatform string `gorm:"column:s_platform"`
- LoginPositionid int `gorm:"column:login_positionid"`
- ClueOperateStatus int `gorm:"column:clue_operate_status"`
- }
- func (DwdFUserbaseBaseinfo) TableName() string {
- return "dwd_f_userbase_baseinfo"
- }
- // DwdFUserbaseIdMapping 剑鱼用户表-企业身份
- type DwdFUserbaseIdMapping struct {
- ID int `gorm:"primaryKey"`
- Userid string `gorm:"column:userid"`
- BaseUserID int `gorm:"column:base_user_id"`
- PositionID int `gorm:"column:position_id"`
- Type int8 `gorm:"column:type"`
- AccountID int `gorm:"column:account_id"`
- EntID int `gorm:"column:ent_id"`
- AccountName string `gorm:"column:account_name"`
- PersonName string `gorm:"column:person_name"`
- Createtime *time.Time `gorm:"column:createtime"`
- Uid string `gorm:"column:uid"`
- Shuoming string `gorm:"column:shuoming"`
- }
- func (DwdFUserbaseIdMapping) TableName() string {
- return "dwd_f_userbase_id_mapping"
- }
- // ReturnMoneyRecord 回款记录表结构体
- type ReturnMoneyRecord struct {
- ID int `gorm:"primaryKey"` // 自增 id
- OrderCode string `gorm:"column:order_code"` // 订单编号
- ReturnTime *time.Time `gorm:"column:return_time"` // 回款时间
- ReturnMoney int `gorm:"column:return_money"` // 回款金额,单位:分
- ReturnType int `gorm:"column:return_type"` // 回款方式,1-微信 2-支付宝 3-对公转账
- ReturnRemark string `gorm:"column:return_remark"` // 回款说明/备注
- ReturnCode string `gorm:"column:return_code"` // 回款单号
- ReturnInvoiceStatus int `gorm:"column:return_invoice_status"` // 回款发票状态,0-未申请 1-已申请 2-已开具
- ReturnVoucherUrl string `gorm:"column:return_voucher_url"` // 回款凭证地址
- OperatePerson string `gorm:"column:operate_person"` // 操作人
- OperateTime *time.Time `gorm:"column:operate_time"` // 操作时间
- FlowMoney int `gorm:"column:flow_money"` // 流水金额
- BankName string `gorm:"column:bank_name"` // 银行名称
- BankFlow string `gorm:"column:bank_flow"` // 银行流水号
- OperateType int `gorm:"column:operate_type"` // 回款操作方式 1-手动回款 2-自动回款
- FlowType int `gorm:"column:flow_type"` // 流水方式 0cds 回款 1 手动录入
- PayAccountName string `gorm:"column:pay_account_name"` // 支付户名
- State int64 `gorm:"column:state"` // 回款状态 1 有效 0 无效
- AutoUpdate *time.Time `gorm:"column:autoUpdate"` // 自动更新时间
- }
- func (ReturnMoneyRecord) TableName() string {
- return "return_money_record"
- }
- // Contract 合同表结构体
- type Contract struct {
- ID int `gorm:"primaryKey"` // 自增 ID
- OrderCode string `gorm:"column:order_code"` // 订单编号
- CustomerName string `gorm:"column:customer_name"` // 客户名称
- ContractCode string `gorm:"column:contract_code"` // 协议编号
- ContractTime *time.Time `gorm:"column:contract_time"` // 协议签订时间
- ContractStatus int `gorm:"column:contract_status"` // 协议状态 1-已签协议 0-未签协议
- ContractMoney int `gorm:"column:contract_money"` // 合同金额 单位:分
- SealType int `gorm:"column:seal_type"` // 1:有电子章,2:无电子章
- PartyAType int `gorm:"column:partyA_type"` // 1:个人,2:企业
- PartyAName string `gorm:"column:partyA_name"` // 甲方名称
- PartyAPerson string `gorm:"column:partyA_person"` // 甲方联系人
- PartyATel string `gorm:"column:partyA_tel"` // 甲方联系方式
- PartyAAddress string `gorm:"column:partyA_address"` // 甲方地址
- PartyBPerson string `gorm:"column:partyB_person"` // 乙方联系人
- Remark string `gorm:"column:remark"` // 电子合同备注
- ContractFileURL string `gorm:"column:contract_file_url"` // 合同文件地址
- ContractArchiveStatus int `gorm:"column:contract_archive_status"` // 协议归档状态 0-未归档 1-已归档
- ContractArchiveTime *time.Time `gorm:"column:contract_archive_time"` // 协议归档时间
- ContractArchiveNum int `gorm:"column:contract_archive_num"` // 协议归档份数
- AutoUpdate *time.Time `gorm:"column:autoUpdate"` // 自动更新时间
- }
- func (Contract) TableName() string {
- return "contract"
- }
- // DwdFAccountOrderChange 归集后的-剑鱼业绩变更表结构体;
- type DwdFAccountOrderChange struct {
- ID int `gorm:"primaryKey"`
- OrderCode string `gorm:"column:order_code;not null;comment:'订单编号'"`
- SalerName string `gorm:"column:saler_name;comment:'销售人员'"`
- SalerDept string `gorm:"column:saler_dept;comment:'部门'"`
- CompanyName string `gorm:"column:company_name;comment:'公司名称'"`
- UserRegtime *time.Time `gorm:"column:user_regtime;comment:'用户注册时间'"`
- CreateTime *time.Time `gorm:"column:create_time;comment:'订单创建时间'"`
- SaleTime *time.Time `gorm:"column:sale_time;comment:'业绩统计时间'"`
- OriginalPrice int `gorm:"column:original_price;comment:'标准售价'"`
- ContractMoney int `gorm:"column:contract_money;comment:'合同金额'"`
- Commission int `gorm:"column:commission;comment:'佣金'"`
- ProceduresMoney int `gorm:"column:procedures_money;comment:'手续费'"`
- ReceivableAmount int `gorm:"column:receivable_amount;comment:'应收金额'"`
- ChangeValue int `gorm:"column:change_value;comment:'业绩变动额'"`
- ChangeReason string `gorm:"column:change_reason;comment:'变更类型'"`
- TotalReceived int `gorm:"column:total_received;comment:'累计已收'"`
- ProductType string `gorm:"column:product_type;comment:'产品类型'"`
- DataSpec string `gorm:"column:data_spec;comment:'规格'"`
- OrderStatus string `gorm:"column:order_status;comment:'订单状态'"`
- ReturnStatus string `gorm:"column:return_status;comment:'回款状态'"`
- RefundStatus string `gorm:"column:refund_status;comment:'退款状态'"`
- VipType string `gorm:"column:vip_type;comment:'付费类型'"`
- UserPhone string `gorm:"column:user_phone;comment:'手机号'"`
- UserID string `gorm:"column:user_id;comment:'用户ID'"`
- VipStarttime *time.Time `gorm:"column:vip_starttime;comment:'服务开始时间'"`
- VipEndtime *time.Time `gorm:"column:vip_endtime;comment:'服务结束时间'"`
- ContractStatus string `gorm:"column:contract_status;comment:'合同状态'"`
- ContractCode string `gorm:"column:contract_code;comment:'合同编号'"`
- ContractTime *time.Time `gorm:"column:contract_time;comment:'合同时间'"`
- SigningSubject string `gorm:"column:signing_subject;comment:'签约主体'"`
- OrderChannel string `gorm:"column:order_channel;comment:'下单渠道'"`
- DistributionChannel string `gorm:"column:distribution_channel;comment:'销售渠道'"`
- IsBackstageOrder string `gorm:"column:is_backstage_order;comment:'是否是后台订单'"`
- PayWay string `gorm:"column:pay_way;comment:'付款方式'"`
- Comeintime *time.Time `gorm:"column:comeintime;default:CURRENT_TIMESTAMP;comment:'数据进入时间'"`
- Updatetime *time.Time `gorm:"column:updatetime;default:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;comment:'更新时间'"`
- OrderSaleRecordID int `gorm:"column:order_sale_record_id;comment:'业绩变更表ID'"`
- RefundRecordID int `gorm:"column:refund_record_id;comment:'退款表ID'"`
- }
- func (DwdFAccountOrderChange) TableName() string {
- if GF.Mysql.Test {
- return "dwd_f_account_order_change_test"
- } else {
- return "dwd_f_account_order_change"
- }
- }
- // RefundRecord 退款表结构体
- type RefundRecord struct {
- ID int `gorm:"primaryKey"`
- OrderCode string `gorm:"column:order_code;not null;comment:'订单编号'"`
- RefundTime *time.Time `gorm:"column:refund_time;comment:'退款时间'"`
- RefundMoney int `gorm:"column:refund_money;not null;comment:'退款金额,单位:分'"`
- RefundReason string `gorm:"column:refund_reason;comment:'退款原因'"`
- RefundReasonType string `gorm:"column:refund_reason_type;comment:'退款原因类型'"`
- }
- func (RefundRecord) TableName() string {
- return "refund_record"
- }
- // DwdFAccountReturn 归集后的-剑鱼回款表结构体
- type DwdFAccountReturn struct {
- ID int `gorm:"primaryKey"`
- OrderCode string `gorm:"column:order_code;comment:'订单编号'"`
- SalerName string `gorm:"column:saler_name;comment:'销售人员'"`
- SalerDept string `gorm:"column:saler_dept;comment:'部门'"`
- UserPhone string `gorm:"column:user_phone;comment:'用户手机号'"`
- CompanyName string `gorm:"column:company_name;comment:'公司名称'"`
- ProductType string `gorm:"column:product_type;comment:'产品类型'"`
- DataSpec string `gorm:"column:data_spec;comment:'规格'"`
- ReturnType string `gorm:"column:return_type;comment:'回款方式'"`
- SaleTime *time.Time `gorm:"column:sale_time;comment:'业绩统计日期'"`
- ReturnTime *time.Time `gorm:"column:return_time;comment:'回款日期'"`
- ReturnMoney int `gorm:"column:return_money;comment:'回款金额'"`
- SigningSubject string `gorm:"column:signing_subject;comment:'签约主体'"`
- ReturnSubject string `gorm:"column:return_subject;comment:'回款主体'"`
- SubjectCheck string `gorm:"column:subject_check;comment:'主体校验'"`
- PaymentNumber string `gorm:"column:payment_number;comment:'支付单号'"`
- BankFlow string `gorm:"column:bank_flow;comment:'银行流水号'"`
- BankName string `gorm:"column:bank_name;comment:'银行名称'"`
- OrderChannel string `gorm:"column:order_channel;comment:'下单渠道'"`
- DistributionChannel string `gorm:"column:distribution_channel;comment:'销售渠道'"`
- RefundStatus string `gorm:"column:refund_status;comment:'退款状态'"`
- OperateType string `gorm:"column:operate_type;comment:'关联方式'"`
- OperatePerson string `gorm:"column:operate_person;comment:'创建人'"`
- ReturnMoneyRecordState int `gorm:"column:return_money_record_state;comment:'数据状态'"`
- Comeintime *time.Time `gorm:"column:comeintime;default:CURRENT_TIMESTAMP;comment:'入库时间'"`
- Updatetime *time.Time `gorm:"column:updatetime;default:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;comment:'更新时间'"`
- ReturnMoneyRecordID int `gorm:"column:return_money_record_id;comment:'回款表 id'"`
- DataexportOrderID int `gorm:"column:dataexport_order_id;comment:'订单表 id'"`
- }
- func (DwdFAccountReturn) TableName() string {
- if GF.Mysql.Test {
- return "dwd_f_account_return_test"
- } else {
- return "dwd_f_account_return"
- }
- }
- // AliPay 结构体表示支付宝支付记录表
- type AliPay struct {
- ID int `gorm:"primaryKey;autoIncrement"`
- TransactionID string `gorm:"column:transaction_id;unique;comment:'支付订单号'"` // TransactionID 是支付订单号,唯一索引
- OutTradeNo string `gorm:"column:out_trade_no;index;comment:'商户订单号'"` // OutTradeNo 是商户订单号,索引
- CreateTime *time.Time `gorm:"column:create_time;comment:'创建时间'"` // CreateTime 是记录创建时间,在更新时自动更新为当前时间戳
- TotalFee int `gorm:"column:total_fee;comment:'标价金额-订单总金额,单位为分'"` // TotalFee 是标价金额-订单总金额,单位为分
- CashFee int `gorm:"column:cash_fee;comment:'现金支付金额-现金支付金额订单现金支付金额'"` // CashFee 是现金支付金额-现金支付金额订单现金支付金额
- TimeEnd string `gorm:"column:time_end;comment:'支付完成时间'"` // TimeEnd 是支付完成时间
- }
- // TableName 返回表名
- func (AliPay) TableName() string {
- return "ali_pay"
- }
- // WeixinPay 结构体表示微信支付记录表
- type WeixinPay struct {
- ID int `gorm:"primaryKey;autoIncrement"`
- TransactionID string `gorm:"column:transaction_id;unique;comment:'微信支付订单号'"` // TransactionID 是微信支付订单号,唯一索引
- OutTradeNo string `gorm:"column:out_trade_no;index;comment:'商户订单号'"`
- UserOpenid string `gorm:"column:user_openid;comment:'用户 openid'"`
- TotalFee int `gorm:"column:total_fee;comment:'标价金额-订单总金额,单位为分'"`
- CreateTime *time.Time `gorm:"column:create_time;comment:'创建时间'"`
- CashFee int `gorm:"column:cash_fee;comment:'现金支付金额-现金支付金额订单现金支付金额'"`
- TimeEnd string `gorm:"column:time_end;comment:'支付完成时间'"`
- UserID string `gorm:"column:user_id;comment:'用户 ID'"`
- PayChannel int `gorm:"column:pay_channel;comment:'0-微信;1-微信小店'"`
- }
- // TableName 返回表名
- func (WeixinPay) TableName() string {
- return "weixin_pay"
- }
- // DwdFAccountReturnChange 归集后-剑鱼回款变更表
- type DwdFAccountReturnChange struct {
- ID int `gorm:"primaryKey;autoIncrement;comment:'自增唯一标识'"`
- OrderCode string `gorm:"column:order_code;comment:'订单编号'"`
- SalerName string `gorm:"column:saler_name;comment:'销售人员'"`
- SalerDept string `gorm:"column:saler_dept;comment:'部门'"`
- UserPhone string `gorm:"column:user_phone;comment:'用户手机号'"`
- CompanyName string `gorm:"column:company_name;comment:'公司名称'"`
- ProductType string `gorm:"column:product_type;comment:'产品类型'"`
- DataSpec string `gorm:"column:data_spec;comment:'规格'"`
- ReturnType string `gorm:"column:return_type;comment:'回款方式'"`
- SaleTime *time.Time `gorm:"column:sale_time;comment:'业绩变更日期'"`
- ReturnTime *time.Time `gorm:"column:return_time;comment:'回款日期'"`
- ReturnMoney int `gorm:"column:return_money;comment:'回款金额'"`
- ChangeValue int `gorm:"column:change_value;comment:'业绩变动额'"`
- ChangeReason string `gorm:"column:change_reason;comment:'变更类型'"`
- SigningSubject string `gorm:"column:signing_subject;comment:'签约主体'"`
- ReturnSubject string `gorm:"column:return_subject;comment:'回款主体'"`
- SubjectCheck string `gorm:"column:subject_check;comment:'主体校验'"`
- PaymentNumber string `gorm:"column:payment_number;comment:'支付单号'"`
- BankFlow string `gorm:"column:bank_flow;comment:'银行流水号'"`
- BankName string `gorm:"column:bank_name;comment:'银行名称'"`
- OrderChannel string `gorm:"column:order_channel;comment:'下单渠道'"`
- DistributionChannel string `gorm:"column:distribution_channel;comment:'销售渠道'"`
- RefundStatus string `gorm:"column:refund_status;comment:'退款状态'"`
- OperateType string `gorm:"column:operate_type;comment:'关联方式'"`
- OperatePerson string `gorm:"column:operate_person;comment:'创建人'"`
- OrderSaleRecordID int `gorm:"column:order_sale_record_id;comment:'业绩变更表 ID'"`
- RefundRecordID int `gorm:"column:refund_record_id;comment:'退款表 ID'"`
- Comeintime *time.Time `gorm:"column:comeintime;default:CURRENT_TIMESTAMP;comment:'入库时间'"`
- Updatetime *time.Time `gorm:"column:updatetime;default:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;comment:'更新时间'"`
- }
- // TableName 返回表名
- func (DwdFAccountReturnChange) TableName() string {
- if GF.Mysql.Test {
- return "dwd_f_account_return_change_test"
- } else {
- return "dwd_f_account_return_change"
- }
- }
|