Documentation ¶
Overview ¶
kafka消息队列
公众号用户组服务列表 1. 通过OfficialAccountId和UserWxInfoId,获取openid 2. 通过code换取access_token 3. 获取可以得到请求CODE的url 4. 通过open_id,获取user_wx_info的主键ID
公众号服务列表 1. 公众号与公司ID的绑定 2. 获取公众号基本信息 3. 获取公众号列表 4. 通过公司ID,获取公众号信息
微信公众号支付参数服务列表 1. 支付证书上传 2. 支付参数修改 3. 通过公众号ID,获取公众号支付参数记录
Index ¶
- func AddAuthorizationUserWxInfo(base *WxBaseInfoResp, appid string) (bindingStatus int16, userId int, customerId int, retcode int, err error)
- func BindingCompanyAndOfficialAccount(officialAccountId int, companyId int) (retcode int, err error)
- func ConsumeAccountTemplateMessage(officialAccountId int, bts []byte) (err error)
- func GetAllAccountMessageSendRecords(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllIndustryCodeQuerys(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllOfficialAccountIndustryCodes(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllOfficialAccounts(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllWechatMessageReceiptRecords(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAuthorierAccessTokenById(id int, o *orm.Ormer) (token string, retcode int, err error)
- func GetIndustryIdByName(mainIndustry string, secIndustry string) (id int, retcode int, err error)
- func GetUserAccessToken(appid string, code string) (bindingStatus int16, user *BindingSimpleInfo, customer *BindingSimpleInfo, ...)
- func GetUserWxIdByCustomerId(customerId int) (userWxInfoId int, retcode int, err error)
- func GetUserWxIdByUserId(userId int) (userWxInfoId int, retcode int, err error)
- func GetUserWxInfoIdByOpenid(officialAccountId int, openid string) (id int, retcode int, err error)
- func GetopenidByCond(officialAccountId int, userWxInfoId int) (openid string, retcode int, err error)
- func LogicDeleteAccountMessageTemplatesNoLocks(systemMessageTemplateId int, o *orm.Ormer) (retcode int, err error)
- func ModifyWechatParams(id int, appkey string, mchid string, name string) (retcode int, err error)
- func OfficialAccountAuthorizationUser(id int, callbackUrl string) (httpStr string, retcode int, err error)
- func SendAccountMessage(id int, toUser string, templateId string, content json.RawMessage) (msgId string, retcode int, err error)
- func UploadCertification(id int, req *http.Request) (retcode int, err error)
- type AccountMessageSendRecords
- type AccountMessageTemplates
- func (t *AccountMessageTemplates) InsertAccountMessageTemplate(o *orm.Ormer) (retcode int, err error)
- func (t *AccountMessageTemplates) LogicDeleteAccountMessageTemplateNoLock(o *orm.Ormer) (retcode int, err error)
- func (t *AccountMessageTemplates) ReadAccountMessageTemplateNoLock(o *orm.Ormer) (retcode int, err error)
- func (t *AccountMessageTemplates) TableName() string
- func (t *AccountMessageTemplates) UpdateAccountMessageTemplateNoLock(o *orm.Ormer) (retcode int, err error)
- type AuthorizationInfo
- type AuthorizedInfo
- type AuthorizedInfoResp
- type Authorizer
- type AuthorizerInfo
- type BillInfo
- type BindingSimpleInfo
- type BusinessInfo
- type ClassIndustry
- type Content
- type CustomerServices
- type FuncInfo
- type FuncScopeInfo
- type IndustryCodeQuerys
- type IndustryInfo
- type IndustryInfoResp
- type MessageInfo
- type MessageInfoReq
- type OfficialAccountIndustryCodes
- func (t *OfficialAccountIndustryCodes) GetOfficialAccountIndustryNoLock() (firstIndustry string, secIndustry string, retcode int, err error)
- func (t *OfficialAccountIndustryCodes) InsertOfficialAccountIndustryCodesNoLock(o *orm.Ormer) (retcode int, err error)
- func (t *OfficialAccountIndustryCodes) ReadOfficialAccountIndustryNoLock(o *orm.Ormer) (retcode int, err error)
- func (t *OfficialAccountIndustryCodes) TableName() string
- func (t *OfficialAccountIndustryCodes) UpdateOfficialAccountIndustryCodeNoLock(o *orm.Ormer) (retcode int, err error)
- type OfficialAccountServer
- func (t *OfficialAccountServer) BindingCustomerAndWxInfo(openid string, userId int) (err error)
- func (t *OfficialAccountServer) BindingUserAndWxInfo(openid string, userId int) (err error)
- func (t *OfficialAccountServer) GetOfficialAccountId(companyId int) (officialAccountId int, err error)
- func (t *OfficialAccountServer) GetSaleOrderPayNativeParams(ppi *types.ProductPayInfo) (codeUrl string, err error)
- func (t *OfficialAccountServer) GetSmsRechargePayJsapiParams(sri *types.SmsRechargeInfo) (wjpi *types.WechatJSAPIParamInfo, err error)
- func (t *OfficialAccountServer) GetSmsRechargePayNativeParams(sri *types.SmsRechargeInfo) (codeUrl string, err error)
- func (t *OfficialAccountServer) SendMessage(soid int, soiid int, typ int16) (err error)
- type OfficialAccountSimpleInfo
- type OfficialAccountUsers
- type OfficialAccounts
- func (t *OfficialAccounts) InsertOfficialAccountNoLock(o *orm.Ormer) (retcode int, err error)
- func (t *OfficialAccounts) ReadOfficialAccountNoLock(o *orm.Ormer) (retcode int, err error)
- func (t *OfficialAccounts) TableName() string
- func (t *OfficialAccounts) UpdatedOfficialAccountNoLock(o *orm.Ormer) (retcode int, err error)
- type OfficialAccountsPayParams
- type ServiceTypeInfo
- type SystemMessageTemplates
- type TemplateInfo
- type TemplateInfos
- type Text
- type UserWxInfos
- type Values
- type VerifyTypeInfo
- type WeMessageTemplate
- func (t *WeMessageTemplate) DeleteMessageTemplate(accessToken string, templateId string) (retcode int, err error)
- func (t *WeMessageTemplate) GetOfficialAccountIndustry(accessToken string) (industryInfo *IndustryInfo, retcode int, err error)
- func (t *WeMessageTemplate) GetTemplateId(accessToken string, templateCode string) (templateId string, retcode int, err error)
- func (t *WeMessageTemplate) GetTemplateList(accessToken string) (templateInfos *TemplateInfos, retcode int, err error)
- func (t *WeMessageTemplate) SendMessage(accessToken string, templateId string, content json.RawMessage, toUser string) (msgId string, retcode int, err error)
- func (t *WeMessageTemplate) SetOfficialAccountIndustry(firstIndustry int, secIndustry int, accessToken string) (retcode int, err error)
- type WechatMessageReceiptRecords
- type WechatPayParamInfo
- type WxBaseInfoResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindingCompanyAndOfficialAccount ¶
func BindingCompanyAndOfficialAccount(officialAccountId int, companyId int) (retcode int, err error)
1. 公众号与公司ID的绑定
func GetAllAccountMessageSendRecords ¶
func GetAllAccountMessageSendRecords(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllAccountMessageSendRecords retrieves all AccountMessageSendRecords matches certain condition. Returns empty list if no records exist
func GetAllIndustryCodeQuerys ¶
func GetAllIndustryCodeQuerys(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllIndustryCodeQuerys retrieves all IndustryCodeQuerys matches certain condition. Returns empty list if no records exist
func GetAllOfficialAccountIndustryCodes ¶
func GetAllOfficialAccountIndustryCodes(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllOfficialAccountIndustryCodes retrieves all OfficialAccountIndustryCodes matches certain condition. Returns empty list if no records exist
func GetAllOfficialAccounts ¶
func GetAllOfficialAccounts(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllOfficialAccounts retrieves all OfficialAccounts matches certain condition. Returns empty list if no records exist
func GetAllWechatMessageReceiptRecords ¶
func GetAllWechatMessageReceiptRecords(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllWechatMessageReceiptRecords retrieves all WechatMessageReceiptRecords matches certain condition. Returns empty list if no records exist
func GetIndustryIdByName ¶
func GetUserAccessToken ¶
func GetUserAccessToken(appid string, code string) ( bindingStatus int16, user *BindingSimpleInfo, customer *BindingSimpleInfo, openid string, retcode int, err error)
param bindingStatus // 微信是否已经绑定过用户 param user, customer // 如果已绑定,则返回id等信息 通过code换取access_token
func GetUserWxIdByCustomerId ¶
通过客户ID,获取微信ID
func GetUserWxIdByUserId ¶
通过用户ID,获取微信ID
func GetUserWxInfoIdByOpenid ¶
4. 通过open_id,获取user_wx_info的主键ID
func GetopenidByCond ¶
func GetopenidByCond(officialAccountId int, userWxInfoId int) (openid string, retcode int, err error)
通过OfficialAccountId和UserWxInfoId,获取openid
func LogicDeleteAccountMessageTemplatesNoLocks ¶
func LogicDeleteAccountMessageTemplatesNoLocks(systemMessageTemplateId int, o *orm.Ormer) (retcode int, err error)
删除系统中公众号已使用过的该消息模板ID
func ModifyWechatParams ¶
func OfficialAccountAuthorizationUser ¶
func OfficialAccountAuthorizationUser(id int, callbackUrl string) (httpStr string, retcode int, err error)
获取可以得到请求CODE的url
func SendAccountMessage ¶
Types ¶
type AccountMessageSendRecords ¶
type AccountMessageSendRecords struct { Id int `orm:"column(account_message_send_record_id);auto"` OfficialAccountId int `orm:"column(official_account_id);null"` TemplateId string `orm:"column(template_id);size(100);null"` Content string `orm:"column(content);size(2000);null"` ReceiverUser string `orm:"column(receiver_user);size(100);null"` Status int16 `orm:"column(status);null"` UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null"` CreatedAt time.Time `orm:"column(created_at);type(datetime);null"` }
func (*AccountMessageSendRecords) InsertAccountMessageSendRecordNoLock ¶
func (t *AccountMessageSendRecords) InsertAccountMessageSendRecordNoLock(o *orm.Ormer) (retcode int, err error)
func (*AccountMessageSendRecords) TableName ¶
func (t *AccountMessageSendRecords) TableName() string
type AccountMessageTemplates ¶
type AccountMessageTemplates struct { Id int `orm:"column(account_message_template_id);auto" json:"id"` OfficialAccountId int `orm:"column(official_account_id);null" json:"official_account_id"` TemplateId string `orm:"column(template_id);null" json:"template_id"` SystemMessageTemplateId int `orm:"column(system_message_template_id);null" json:"system_message_template_id"` Status int16 `orm:"column(status);null"` UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null"` CreatedAt time.Time `orm:"column(created_at);type(datetime);null"` }
func AddAccountMessageTemplate ¶
func AddAccountMessageTemplate(id int, messageTemplateId int) (accountMessageTemplate *AccountMessageTemplates, retcode int, err error)
func (*AccountMessageTemplates) InsertAccountMessageTemplate ¶
func (t *AccountMessageTemplates) InsertAccountMessageTemplate(o *orm.Ormer) (retcode int, err error)
func (*AccountMessageTemplates) LogicDeleteAccountMessageTemplateNoLock ¶
func (t *AccountMessageTemplates) LogicDeleteAccountMessageTemplateNoLock(o *orm.Ormer) (retcode int, err error)
func (*AccountMessageTemplates) ReadAccountMessageTemplateNoLock ¶
func (t *AccountMessageTemplates) ReadAccountMessageTemplateNoLock(o *orm.Ormer) (retcode int, err error)
func (*AccountMessageTemplates) TableName ¶
func (t *AccountMessageTemplates) TableName() string
func (*AccountMessageTemplates) UpdateAccountMessageTemplateNoLock ¶
func (t *AccountMessageTemplates) UpdateAccountMessageTemplateNoLock(o *orm.Ormer) (retcode int, err error)
type AuthorizationInfo ¶
type AuthorizedInfo ¶
type AuthorizedInfoResp ¶
type AuthorizedInfoResp struct {
AuthorizedInfo AuthorizedInfo `json:"authorization_info"`
}
func GetAuthorierTokenInfo ¶
func GetAuthorierTokenInfo(componentAccessToken string, appid string, authorizationCode string) (authorizedInfoResp *AuthorizedInfoResp, retcode int, err error)
4、使用授权码换取公众号的接口调用凭据和授权信息 DESC: 通过授权码和自己的接口调用凭据(component_access_token),换取公众号的接口调用凭据
(authorizer_access_token和用于前者快过期时用来刷新它的authorizer_refresh_token)和授权信息(授权了哪些权限等信息)
type Authorizer ¶
type Authorizer struct { AuthorizerInfo AuthorizerInfo `json:"authorizer_info"` AuthorizationInfo AuthorizationInfo `json:"authorization_info"` }
func GetOfficialAccountBaseInfoExternal ¶
func GetOfficialAccountBaseInfoExternal(componentAccessToken string, appid string, authorizedAppid string) (authorizer *Authorizer, retcode int, err error)
6、获取授权公众号帐号基本信息 DESC: 在需要的情况下,第三方平台可以获取公众号的帐号基本信息,
包括头像、昵称、帐号名、帐号类型、认证类型、微信号、原始ID和二维码图片URL。
type AuthorizerInfo ¶
type AuthorizerInfo struct { Nickname string `json:"nick_name"` HeadImg string `json:"head_img"` ServiceTypeInfo ServiceTypeInfo `json:"service_type_info"` VerifyTypeInfo VerifyTypeInfo `json:"verify_type_info"` UserName string `json:"user_name"` PrincipalName string `json:"principal_name"` BusinessInfo BusinessInfo `json:"business_info"` Alias string `json:"alias"` QrcodeUrl string `json:"qrcode_url"` }
type BillInfo ¶
type BillInfo struct { Money int64 `json:"money"` ActivitySubOrderId int64 `json:"activity_sub_order_id"` TradeNo string `json:"trade_no"` TradeNoJsapi string `json:"trade_no_jsapi"` TradeNoNative string `json:"trade_no_native"` PrepayId string `json:"prepay_id"` PayStatus int16 `json:"pay_status"` Title string `json:"title"` }
type BindingSimpleInfo ¶
绑定要返回的object对象信息{user,customer}
type BusinessInfo ¶
type ClassIndustry ¶
type Content ¶
type Content struct { First Values `json:"first"` Keyword1 Values `json:"keyword1"` Keyword2 Values `json:"keyword2"` Keyword3 Values `json:"keyword3"` Keyword4 Values `json:"keyword4"` Keyword5 Values `json:"keyword5"` Remark Values `json:"remark"` }
通用模板消息内容
type CustomerServices ¶
type CustomerServices struct{}
func (*CustomerServices) SendMessage ¶
func (t *CustomerServices) SendMessage(appid string, touser string, msgType string, content string)
客服接口-发消息
type FuncInfo ¶
type FuncInfo struct {
FuncScope FuncScopeInfo `json:"funcscope_category"`
}
type FuncScopeInfo ¶
type FuncScopeInfo struct {
Id int `json:"id"`
}
公众号授权给公众号第三方平台的返回结果集, 平台通过这些信息,托管所有授权的公众号
type IndustryCodeQuerys ¶
type IndustryCodeQuerys struct { Id int `orm:"column(industry_code_query_id);auto"` MainType int `orm:"column(main_type);null"` MainIndustryCode string `orm:"column(main_industry_code);size(30);null"` SecIndustryCode string `orm:"column(sec_industry_code);size(30);null"` CodeNum int `orm:"column(code_num);null"` Status int16 `orm:"column(status);null"` UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null"` CreatedAt time.Time `orm:"column(created_at);type(datetime);null"` }
func (*IndustryCodeQuerys) GetIndustryCodeQueryNoLock ¶
func (t *IndustryCodeQuerys) GetIndustryCodeQueryNoLock(o *orm.Ormer) (retcode int, err error)
func (*IndustryCodeQuerys) GetSecIndutryListNoLocks ¶
func (t *IndustryCodeQuerys) GetSecIndutryListNoLocks() (secIndustrys []IndustryInfoResp, retcode int, err error)
获取副行业列表
func (*IndustryCodeQuerys) TableName ¶
func (t *IndustryCodeQuerys) TableName() string
type IndustryInfo ¶
type IndustryInfo struct { PrimaryIndustry ClassIndustry `json:"primary_industry"` SecIndustry ClassIndustry `json:"secondary_industry"` }
type IndustryInfoResp ¶
func GetAllMainIndutryNoLocks ¶
func GetAllMainIndutryNoLocks() (mainIndustrys []IndustryInfoResp, retcode int, err error)
获取主行业列表
type MessageInfo ¶
type MessageInfoReq ¶
type MessageInfoReq struct { TemplateId string `json:"template_id"` ToUser string `json:"touser"` Content json.RawMessage `json:"content"` }
type OfficialAccountIndustryCodes ¶
type OfficialAccountIndustryCodes struct { Id int `orm:"column(official_account_industry_code_id);auto"` OfficialAccountId int `orm:"column(official_account_id);null"` IndustryId1 int `orm:"column(industry_id1);null"` IndustryId2 int `orm:"column(industry_id2);null"` Status int16 `orm:"column(status);null"` UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null"` CreatedAt time.Time `orm:"column(created_at);type(datetime);null"` }
func (*OfficialAccountIndustryCodes) GetOfficialAccountIndustryNoLock ¶
func (t *OfficialAccountIndustryCodes) GetOfficialAccountIndustryNoLock() (firstIndustry string, secIndustry string, retcode int, err error)
获取设置的行业信息
func (*OfficialAccountIndustryCodes) InsertOfficialAccountIndustryCodesNoLock ¶
func (t *OfficialAccountIndustryCodes) InsertOfficialAccountIndustryCodesNoLock(o *orm.Ormer) (retcode int, err error)
添加行业信息
func (*OfficialAccountIndustryCodes) ReadOfficialAccountIndustryNoLock ¶
func (t *OfficialAccountIndustryCodes) ReadOfficialAccountIndustryNoLock(o *orm.Ormer) (retcode int, err error)
func (*OfficialAccountIndustryCodes) TableName ¶
func (t *OfficialAccountIndustryCodes) TableName() string
func (*OfficialAccountIndustryCodes) UpdateOfficialAccountIndustryCodeNoLock ¶
func (t *OfficialAccountIndustryCodes) UpdateOfficialAccountIndustryCodeNoLock(o *orm.Ormer) (retcode int, err error)
更新公众号所属行业
type OfficialAccountServer ¶
type OfficialAccountServer struct{}
func (*OfficialAccountServer) BindingCustomerAndWxInfo ¶
func (t *OfficialAccountServer) BindingCustomerAndWxInfo(openid string, userId int) (err error)
4. 客户账号与微信绑定,目前只与盈创丰茂公众号绑定
func (*OfficialAccountServer) BindingUserAndWxInfo ¶
func (t *OfficialAccountServer) BindingUserAndWxInfo(openid string, userId int) (err error)
5. B端账号与微信绑定,目前只与盈创丰茂公众号绑定
func (*OfficialAccountServer) GetOfficialAccountId ¶
func (t *OfficialAccountServer) GetOfficialAccountId(companyId int) (officialAccountId int, err error)
6. 通过公司ID,获取内部公众号ID
func (*OfficialAccountServer) GetSaleOrderPayNativeParams ¶
func (t *OfficialAccountServer) GetSaleOrderPayNativeParams(ppi *types.ProductPayInfo) (codeUrl string, err error)
3. 获取商品订单支付二维码
func (*OfficialAccountServer) GetSmsRechargePayJsapiParams ¶
func (t *OfficialAccountServer) GetSmsRechargePayJsapiParams(sri *types.SmsRechargeInfo) ( wjpi *types.WechatJSAPIParamInfo, err error)
1. 微信JSAPI短信充值支付
func (*OfficialAccountServer) GetSmsRechargePayNativeParams ¶
func (t *OfficialAccountServer) GetSmsRechargePayNativeParams(sri *types.SmsRechargeInfo) (codeUrl string, err error)
2. 微信Native二维码短信充值支付
func (*OfficialAccountServer) SendMessage ¶
func (t *OfficialAccountServer) SendMessage(soid int, soiid int, typ int16) (err error)
type OfficialAccountSimpleInfo ¶
type OfficialAccountSimpleInfo struct { Id int `json:"id"` IsStartWechatPay int16 `json:"is_start_wechat_pay"` Name string `json:"name"` }
func GetOfficialAccounts ¶
func GetOfficialAccounts(companyId int) (officialAccountSimpleInfos []*OfficialAccountSimpleInfo, retcode int, err error)
3. 获取公众号列表
type OfficialAccountUsers ¶
type OfficialAccountUsers struct { Id int `orm:"column(official_account_user_id);auto"` OfficialAccountId int `orm:"column(official_account_id);null"` UserWxInfoId int `orm:"column(user_wx_info_id);null"` Openid string `orm:"column(openid);size(50);null"` Status int16 `orm:"column(status);null"` CreatedAt time.Time `orm:"column(created_at);type(datetime);null"` }
func (*OfficialAccountUsers) InsertOfficialAccountNoLock ¶
func (t *OfficialAccountUsers) InsertOfficialAccountNoLock(o *orm.Ormer) (retcode int, err error)
func (*OfficialAccountUsers) TableName ¶
func (t *OfficialAccountUsers) TableName() string
type OfficialAccounts ¶
type OfficialAccounts struct { Id int `orm:"column(official_account_id);auto" json:"id"` CompanyId int `orm:"column(company_id);null" json:"company_id"` Nickname string `orm:"column(nickname);size(50);null" json:"nickname"` AvartarUrl string `orm:"column(avartar_url);size(300);null" json:"avatar_url"` ServiceTypeId int16 `orm:"column(service_type_id);null" json:"service_type_id"` VerifyTypeId int16 `orm:"column(verify_type_id);null" json:"verify_type_id"` OriginalId string `orm:"column(original_id);size(40);null" json:"original_id"` PrincipalName string `orm:"column(principal_name);size(300);null" json:"principal_name"` Alias string `orm:"column(alias);size(100);null" json:"alias"` BusinessInfoOpenStore int16 `orm:"column(business_info_open_store);null" json:"business_info_open_store"` BusinessInfoOpenScan int16 `orm:"column(business_info_open_scan);null" json:"business_info_open_scan"` BusinessInfoOpenPay int16 `orm:"column(business_info_open_pay);null" json:"business_info_open_pay"` BusinessInfoOpenCard int16 `orm:"column(business_info_open_card);null" json:"business_info_open_card"` BusinessInfoOpenShake int16 `orm:"column(business_info_open_shake);null" json:"business_info_open_shake"` QrcodeUrl string `orm:"column(qrcode_url);size(300);null" json:"qrcode_url"` Appid string `orm:"column(appid);size(100);null" json:"appid"` FuncIds string `orm:"column(func_ids);size(100);null" json:"func_ids"` Status int16 `orm:"column(status);null"` UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null"` CreatedAt time.Time `orm:"column(created_at);type(datetime);null"` }
func GetOfficialAccountBaseInfo ¶
func GetOfficialAccountBaseInfo(platformAppid string, appid string) (offAcc *OfficialAccounts, retcode int, err error)
func GetOfficialAccountByCompanyId ¶
func GetOfficialAccountByCompanyId(companyId int) (officialAccount *OfficialAccounts, retcode int, err error)
4. 通过公司ID,获取公众号信息
func (*OfficialAccounts) InsertOfficialAccountNoLock ¶
func (t *OfficialAccounts) InsertOfficialAccountNoLock(o *orm.Ormer) (retcode int, err error)
func (*OfficialAccounts) ReadOfficialAccountNoLock ¶
func (t *OfficialAccounts) ReadOfficialAccountNoLock(o *orm.Ormer) (retcode int, err error)
func (*OfficialAccounts) TableName ¶
func (t *OfficialAccounts) TableName() string
func (*OfficialAccounts) UpdatedOfficialAccountNoLock ¶
func (t *OfficialAccounts) UpdatedOfficialAccountNoLock(o *orm.Ormer) (retcode int, err error)
type OfficialAccountsPayParams ¶
type OfficialAccountsPayParams struct { Id int `orm:"column(official_accounts_pay_param_id);auto"` OfficialAccountId int `orm:"column(official_account_id);null"` MchId string `orm:"column(mch_id);size(30);null"` Name string `orm:"column(name);size(100);null"` Appkey string `orm:"column(appkey);size(50);null"` Status int16 `orm:"column(status);null"` UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null"` CreatedAt time.Time `orm:"column(created_at);type(datetime);null"` }
func GetOfficialAccountPayParamByOfficialAccountId ¶
func GetOfficialAccountPayParamByOfficialAccountId(id int) (officialAccountPayParam *OfficialAccountsPayParams, retcode int, err error)
3. 通过公众号ID,获取公众号支付参数记录
func (*OfficialAccountsPayParams) InsertOfficialAccountsPayParamsNoLock ¶
func (t *OfficialAccountsPayParams) InsertOfficialAccountsPayParamsNoLock(o *orm.Ormer) (retcode int, err error)
func (*OfficialAccountsPayParams) TableName ¶
func (t *OfficialAccountsPayParams) TableName() string
func (*OfficialAccountsPayParams) UpdateOfficialAccountsPayParamsNoLock ¶
func (t *OfficialAccountsPayParams) UpdateOfficialAccountsPayParamsNoLock(o *orm.Ormer) (retcode int, err error)
type ServiceTypeInfo ¶
type ServiceTypeInfo struct {
Id int `json:"id"`
}
type SystemMessageTemplates ¶
type SystemMessageTemplates struct { Id int `orm:"column(system_message_template_id);auto"` Code string `orm:"column(code);size(20);null"` Title string `orm:"column(title);size(100);null"` Content string `orm:"column(content);null"` IndustryCodeQueryId int `orm:"column(industry_code_query_id);null"` Status int16 `orm:"column(status);null"` UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null"` CreatedAt time.Time `orm:"column(created_at);type(datetime);null"` }
func (*SystemMessageTemplates) GetSystemMessageTemplateNoLock ¶
func (t *SystemMessageTemplates) GetSystemMessageTemplateNoLock(o *orm.Ormer) (retcode int, err error)
func (*SystemMessageTemplates) TableName ¶
func (t *SystemMessageTemplates) TableName() string
func (*SystemMessageTemplates) UpdateSystemMessageTemplatesNoLock ¶
func (t *SystemMessageTemplates) UpdateSystemMessageTemplatesNoLock(o *orm.Ormer) (retcode int, err error)
type TemplateInfo ¶
type TemplateInfos ¶
type TemplateInfos struct {
TemplateList []TemplateInfo `json:"template_list"`
}
type UserWxInfos ¶
type UserWxInfos struct { Id int `orm:"column(user_wx_info_id);auto"` UserId int `orm:"column(user_id);null"` CustomerId int `orm:"column(customer_id);null` Nickname string `orm:"column(nickname);size(50);null"` Sex int16 `orm:"column(sex);null"` Province string `orm:"column(province);size(100);null"` City string `orm:"column(city);size(100);null"` Country string `orm:"column(country);size(30);null"` Headimgurl string `orm:"column(headimgurl);size(100);null"` Privilege string `orm:"column(privilege);size(100);null"` CreatedAt time.Time `orm:"column(created_at);type(datetime);null"` }
func GetUserWxInfoByCustomerId ¶
func GetUserWxInfoByCustomerId(customerId int) (info *UserWxInfos, retcode int, err error)
通过客户ID,获取主键ID
func GetUserWxInfoByUserId ¶
func GetUserWxInfoByUserId(userId int) (info *UserWxInfos, retcode int, err error)
通过用户UserId,获取主键ID
func (*UserWxInfos) InsertUserWxInfoNoLock ¶
func (t *UserWxInfos) InsertUserWxInfoNoLock(o *orm.Ormer) (retcode int, err error)
func (*UserWxInfos) ReadUserWxInfoNoLock ¶
func (t *UserWxInfos) ReadUserWxInfoNoLock(o *orm.Ormer) (retcode int, err error)
func (*UserWxInfos) TableName ¶
func (t *UserWxInfos) TableName() string
func (*UserWxInfos) UpdateUserWxInfoNoLock ¶
func (t *UserWxInfos) UpdateUserWxInfoNoLock(o *orm.Ormer) (retcode int, err error)
type VerifyTypeInfo ¶
type VerifyTypeInfo struct {
Id int `json:"id"`
}
type WeMessageTemplate ¶
type WeMessageTemplate struct{}
1.设置所属行业 2.获取设置的行业信息 3.获得模板ID 4.获取模板列表 5.删除模板 6.发送模板消息 7.事件推送
func (*WeMessageTemplate) DeleteMessageTemplate ¶
func (t *WeMessageTemplate) DeleteMessageTemplate(accessToken string, templateId string) (retcode int, err error)
5.删除模板
func (*WeMessageTemplate) GetOfficialAccountIndustry ¶
func (t *WeMessageTemplate) GetOfficialAccountIndustry(accessToken string) (industryInfo *IndustryInfo, retcode int, err error)
2.获取设置的行业信息
func (*WeMessageTemplate) GetTemplateId ¶
func (t *WeMessageTemplate) GetTemplateId(accessToken string, templateCode string) (templateId string, retcode int, err error)
3.获得模板ID @param: templateCode模板编号
func (*WeMessageTemplate) GetTemplateList ¶
func (t *WeMessageTemplate) GetTemplateList(accessToken string) (templateInfos *TemplateInfos, retcode int, err error)
4.获取模板列表
func (*WeMessageTemplate) SendMessage ¶
func (t *WeMessageTemplate) SendMessage(accessToken string, templateId string, content json.RawMessage, toUser string) (msgId string, retcode int, err error)
6.发送模板消息 @params: toUser是指接收消息的用户openid
func (*WeMessageTemplate) SetOfficialAccountIndustry ¶
func (t *WeMessageTemplate) SetOfficialAccountIndustry(firstIndustry int, secIndustry int, accessToken string) (retcode int, err error)
1.设置所属行业
type WechatMessageReceiptRecords ¶
type WechatMessageReceiptRecords struct { Id int `orm:"column(wechat_message_receipt_record_id);auto"` Appid string `orm:"column(appid);size(50);null"` ToUserName string `orm:"column(to_user_name);size(50);null"` FromUserName string `orm:"column(from_user_name);size(50);null"` CreateTime time.Time `orm:"column(create_time);type(datetime);null"` MsgType string `orm:"column(msg_type);size(50);null"` Event string `orm:"column(event);size(50);null"` Content string `orm:"column(content);size(1000);null"` MsgId string `orm:"column(msg_id);size(50);null"` Status int16 `orm:"column(status);size(50);null"` CreatedAt time.Time `orm:"column(created_at);type(datetime);null"` }
func (*WechatMessageReceiptRecords) InsertWechatMessageReceiptRecordNoLock ¶
func (t *WechatMessageReceiptRecords) InsertWechatMessageReceiptRecordNoLock(o *orm.Ormer) (retcode int, err error)
func (*WechatMessageReceiptRecords) TableName ¶
func (t *WechatMessageReceiptRecords) TableName() string
type WechatPayParamInfo ¶
type WechatPayParamInfo struct { Appid string // 公众号appid MchId string // 商户号ID Appkey string // 支付密钥 CertFile string // 证书1 KeyFile string // 证书2 }
func GetWechatPayParams ¶
func GetWechatPayParams(id int) (payParamInfo *WechatPayParamInfo, retcode int, err error)
func UnifiedOrder ¶
func UnifiedOrder(id int, bill *BillInfo, openId string, tradeType string, attach string) (payParamInfo *WechatPayParamInfo, unifiedOrderRespMap map[string]string, retcode int, err error)
@params id: 内部公众号ID @params attach: 附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用。 附加数据,目前主要用于短信交易类型:短信充值、购买布匹交易
type WxBaseInfoResp ¶
type WxBaseInfoResp struct { Openid string `json:"openid"` Nickname string `json:"nickname"` Sex int16 `json:"sex"` Province string `json:"province"` City string `json:"city"` Country string `json:"country"` Headimgurl string `json:"headimgurl"` Privileges []string `json:"privileges"` Unionid string `json:"unionid"` }
Source Files ¶
- account_message_send_records.go
- account_message_templates.go
- authorized.go
- consumer.go
- customer_services.go
- hprose.go
- industry_code_querys.go
- message_template_external.go
- official_account_industry_codes.go
- official_account_users.go
- official_accounts.go
- official_accounts_pay_params.go
- pay.go
- system_message_templates.go
- user_wx_infos.go
- wechat_message_receipt_records.go