Documentation ¶
Index ¶
- Constants
- Variables
- func CancelExpress(ctx context.Context, expressSn int64, project, cancelType int, ...) error
- func CancelOrder(ctx context.Context, orderSn int64, project, cancelType int, ...) error
- func ChangeCredits(ctx context.Context, uid, creditNum int, remark string) error
- func Init(_from string, _isPro bool)
- func IsChannelUser(ctx context.Context, mobile string) bool
- func IsChannelUserByUid(ctx context.Context, uid int) bool
- func LoadServicesConf()
- func ProcessNotInterruptErr(ctx context.Context, idName string, idVal interface{}, err error)
- func ReadUser(ctx context.Context, uid int) *simplejson.Json
- func ReadUserDevice(ctx context.Context, uid int) *simplejson.Json
- func RecordAddOp(ctx context.Context, engine *xorm.Engine, bean interface{}, opUser string) error
- func RecordDelOp(ctx context.Context, engine *xorm.Engine, bean interface{}, opUser string) error
- func RecordOperate(ctx context.Context, opType int, opRecord map[string]interface{}) error
- func RecordUpdateOp(ctx context.Context, engine *xorm.Engine, bean interface{}, ...) error
- func RecordUserOrder(ctx context.Context, uid, orderId, storeId int) error
- func RefundCredits(ctx context.Context, uid, creditNum int, remark string) error
- func ReturnVoucher(ctx context.Context, voucherID, merchantID int) error
- func SendAppMsg(ctx context.Context, userid, content, iosMsg, destType string) error
- func SendDingtalkBotMsg(ctx context.Context, webhook, title, content, msgtype string, extra ...string) error
- func SendDingtalkMsg(ctx context.Context, userid, agentid, content string, msgtypes ...string) error
- func SendEmail(ctx context.Context, subject, content, tos string) error
- func SendSms(ctx context.Context, mobile, content string, smsTypes ...string) error
- func SendVoucher(uid, typ, state int) error
- func ServiceWarning(ctx context.Context, emailInfo map[string]string, smsContent string) error
- func ThirdOrderCancel(ctx context.Context, orderId, reason string) error
- func ThirdOrderConfirm(ctx context.Context, orderId string) error
- func ThirdOrderDelivering(ctx context.Context, orderId string) error
- func ThirdOrderFinish(ctx context.Context, orderId string) error
- type TableSchema
Constants ¶
const ( OpTypeAdd = iota OpTypeUpdate OpTypeDel )
const ( ProjectCms = iota ProjectZhimazg ProjectSupply ProjectDriver )
Variables ¶
var ServiceFailErr = errors.New("remote service return code is not 0")
Functions ¶
func CancelExpress ¶
func CancelExpress(ctx context.Context, expressSn int64, project, cancelType int, cancelReason string) error
CancelExpress 取消物流单
func CancelOrder ¶
func CancelOrder(ctx context.Context, orderSn int64, project, cancelType int, cancelReason string) error
CancelOrder 取消订单,如果有物流单,一起取消; 主要为了方便,可以一次性全部取消或者还没有物流单时候的取消
func ChangeCredits ¶
ChangeCredits 变更用户积分
func IsChannelUser ¶
IsChannelUser 判断手机号是否是渠道用户(预注册过)
func IsChannelUserByUid ¶
IsChannelUser 判断UID是否是渠道用户(预注册过)
func ProcessNotInterruptErr ¶
ProcessNotInterruptErr 处理一些非中断型错误,一般不会出现。 这些错误发生时,程序依然往下执行,这里只是记录错误,同时报警
func ReadUserDevice ¶
ReadUserDevice 获取用户设备信息,用于推送,比如 client_id,client_source
func RecordAddOp ¶
RecordAddOp 记录新增操作
func RecordDelOp ¶
RecordDelOp 记录删除操作
func RecordOperate ¶
RecordOperate 记录操作
func RecordUpdateOp ¶
func RecordUpdateOp(ctx context.Context, engine *xorm.Engine, bean interface{}, changeVals map[string]interface{}, opUser string) error
RecordUpdateOp 记录修改操作
func RecordUserOrder ¶
RecordUserOrder 记录用户完成的订单
func RefundCredits ¶
RefundCredits 退还用户积分
func ReturnVoucher ¶
ReturnVoucher 返回优惠券:一般指订单取消后
func SendAppMsg ¶
SendAppMsg App push destType: driver 司机端;supply 供货宝;shopper 芝麻掌柜
func SendDingtalkBotMsg ¶
func SendDingtalkBotMsg(ctx context.Context, webhook, title, content, msgtype string, extra ...string) error
SendDingtalkBotMsg 通过机器人给群发送钉钉消息 参考:https://open-doc.dingtalk.com/docs/doc.htm?spm=a219a.7629140.0.0.karFPe&treeId=257&articleId=105735&docType=1
func SendDingtalkMsg ¶
func SendDingtalkMsg(ctx context.Context, userid, agentid, content string, msgtypes ...string) error
SendDingtalkMsg 给员工发送钉钉消息
func ServiceWarning ¶
ServiceWarning 技术服务报警
func ThirdOrderCancel ¶
ThirdOrderCancel 取消
func ThirdOrderConfirm ¶
ThirdConfirm 第三方订单确认
func ThirdOrderDelivering ¶
ThirdConfirm 配送中