Documentation ¶
Index ¶
- Constants
- func Add(f1, f2 float64) float64
- func AliSendSMS(sms SmsInfo, phoneNumber, code string) error
- func Bccomp(a, b float64) int64
- func BoolToInt(b bool) int64
- func ClientIP(r *http.Request) string
- func ConcatenatedStringBuilder(str ...string) string
- func CreateOrderNo() string
- func Date2Timestamp(datetime string) int64
- func DateTime2Timestamp(datetime string) int64
- func Decimal(value float64) float64
- func Div(f1, f2 float64) float64
- func Float(d decimal.Decimal) float64
- func Float2Float(num float64, format string) float64
- func Float64DivInt64(f1 float64, i2 int64) float64
- func Float64MulInt64(f1 float64, i1 int64) float64
- func Float64ToString(f float64) string
- func FormatSecond(seconds int64) (day, hour, minute, second int64)
- func GbkToUtf8(str []byte) (b []byte, err error)
- func Get(url string) string
- func GetActiveStatus(value int64) map[string]interface{}
- func GetAloneGradeEquity(aloneGradeEquity string) map[string]string
- func GetApplyStatus(value int64) map[string]interface{}
- func GetAskCommentStatus(value int64) map[string]interface{}
- func GetAskStatus(value int64) map[string]interface{}
- func GetBalanceLogScene(value int64) map[string]interface{}
- func GetBetweenStr(str, start, end string) string
- func GetCityByIp(ipAddr string) string
- func GetColorAttr(value int64) map[string]interface{}
- func GetColorText(value int64) string
- func GetCouponState(TotalNum, ReceiveNum, ExpireType, EndTime, isReceive int64) map[string]interface{}
- func GetCouponTypeAttr(value int64) map[string]interface{}
- func GetCouponTypeText(value int64) string
- func GetDateTime(date string) (int64, int64)
- func GetDeliveryStatus(value int64) map[string]interface{}
- func GetDeliveryStatusText(value int64) string
- func GetDeliveryType(value int64) map[string]interface{}
- func GetIsCheckAttr(value int64) map[string]interface{}
- func GetJoinStatusAttr(status, endTime, joinEndTime int64) int64
- func GetLiveStatusText(value int64) string
- func GetLiveStatusTextAttr(value int64) map[string]interface{}
- func GetMapKeys(m map[string]string) []string
- func GetMethodAttr(value int64) map[string]interface{}
- func GetMethodText(value int64) string
- func GetOrderRefundIsAgree(value int64) map[string]interface{}
- func GetOrderRefundPlateStatus(value int64) map[string]interface{}
- func GetOrderRefundStatus(value int64) map[string]interface{}
- func GetOrderRefundType(value int64) map[string]interface{}
- func GetOrderSource(value int64) string
- func GetOrderStatus(value int64) map[string]interface{}
- func GetOrderStatusText(value int64) string
- func GetOrderType(value int64) map[string]interface{}
- func GetPayStatus(value int64) map[string]interface{}
- func GetPayStatusText(value int64) string
- func GetPayType(value int64) map[string]interface{}
- func GetPayTypeText(payType int64) string
- func GetProductStatus(value int64) map[string]interface{}
- func GetProductStatusText(value int64) string
- func GetRandomCapitalString(l int) string
- func GetRandomNumber() string
- func GetRandomString(l int) string
- func GetReceiptStatus(value int64) map[string]interface{}
- func GetReceiptStatusText(value int64) string
- func GetSecKillProductStatusTextAttr(status int64) string
- func GetStatusTextAttr(status, startTime, endTime int64) string
- func GetStoreStatus(status int64) map[string]interface{}
- func GetTimeAttr(time int64) map[string]interface{}
- func GetTodayDate() string
- func GetTodayDateTime() (int64, int64)
- func GetUpdatePriceAttr(value float64) string
- func GetYesterdayDate() string
- func HideMobileMid(phone string) string
- func HttpBuildQuery(params map[string]string) (paramStr string)
- func IdsToString(ids []int64) string
- func Int64DivFloat64(i2 int64, f1 float64) float64
- func Int64DivInt64(i1, i2 int64) float64
- func Int64MulFloat64(i1 int64, f1 float64) float64
- func Int64MulInt64(i1 int64, i2 int64) float64
- func Int64SToString(s []int64) string
- func Int64SubFloat(f1 int64, f2 float64) float64
- func Int64SubInt64(f1, f2 int64) int64
- func Int64ToString(i int64) string
- func IntPart(f float64) int64
- func IsContain(items []string, item string) bool
- func IsContainInt64(items []int64, item int64) bool
- func ItoStringSli(intS []int) string
- func JsonTostring(v interface{}) string
- func KeyInMap(myMap map[string]string, key string) bool
- func Krand(size int, kind int) string
- func Mul(f1, f2 float64) float64
- func Post(url string, data string, contentType string) (string, error)
- func RandNum(length int, max int) []string
- func RemoveDuplicate(list *[]int64) []int64
- func RemoveLastRune(s string, i int) string
- func SearchParam(s string) (str []string, value []interface{})
- func ServerIP() (ip string, err error)
- func SliceRemoveDuplicates(slice []string) []string
- func StrDate() string
- func StrDateAndTime() string
- func String2Bool(str string) bool
- func String2Float64(str string) float64
- func String2Int(str string) int
- func String2Int64(str string) int64
- func StringIdsToString(ids []string) string
- func StringToFloat64(s string) float64
- func StringToInt64(s string) int64
- func StringToInterface(s string, v interface{}) error
- func Sub(f1, f2 float64) float64
- func Substr(str string, start, length int) string
- func TimesToNum(timestamp int64) string
- func Timestamp2Date(timestamp int64) string
- func Timestamp2min(timestamp int64) string
- func TimestampToDataWithDay(timestamp int64) string
- func TraverseMapInStringOrder(params map[string]string, handler MapEntryHandler)
- func Utf8ToGbk(str []byte) (b []byte, err error)
- type IpInfo
- type MapEntryHandler
- type Set
- type SmsInfo
Constants ¶
const GET_IP_URL string = `http://whois.pconline.com.cn/ipJson.jsp?json=true&ip=`
Variables ¶
This section is empty.
Functions ¶
func ConcatenatedStringBuilder ¶
ConcatenatedStringBuilder 高效字符串拼接 strings.Builder 是一个变长的字节缓存区,其内部使用slice来存储字节(buf []byte)
func CreateOrderNo ¶
func CreateOrderNo() string
func Float2Float ¶
Float2Float float转float64并保留4位精度
func Float64DivInt64 ¶
func Float64MulInt64 ¶
func Float64ToString ¶
func GetActiveStatus ¶
GetActiveStatus 获取 活动状态(1生效 0未生效)
func GetAloneGradeEquity ¶
func GetApplyStatus ¶
获取 分销商提现申请状态 (10待审核 20审核通过 30驳回 40已打款)
func GetAskCommentStatus ¶
GetAskCommentStatus 提问评论状态(0=待审核 1=审核通过 2=审核不通过)
func GetAskStatus ¶
GetAskStatus 提问状态(0=待审核 1=审核通过 2=审核不通过)
func GetBalanceLogScene ¶
GetBalanceLogScene 余额变动场景(10用户充值 20用户消费 30管理员操作 40订单退款)
func GetBetweenStr ¶
func GetColorText ¶
func GetCouponState ¶
func GetCouponTypeAttr ¶
func GetDateTime ¶
通过时间戳获取00:00:00和23.59.59时间戳 例data : 2020-11-11
func GetDeliveryStatus ¶
获取 DeliveryStatus 发货状态(10未发货 20已发货)
func GetDeliveryStatusText ¶
func GetDeliveryType ¶
获取 deliveryType 配送方式(10快递配送 20上门自提 30无需物流)
func GetJoinStatusAttr ¶
func GetLiveStatusText ¶
func GetMethodAttr ¶
func GetMethodText ¶
func GetOrderRefundIsAgree ¶
商家审核状态(0待审核 10已同意 20已拒绝)
func GetOrderRefundPlateStatus ¶
10申请平台介入20同意30拒绝
func GetOrderRefundStatus ¶
售后单状态(0进行中 10已拒绝 20已完成 30已取消)
func GetOrderRefundType ¶
售后类型(10退货退款 20换货 30退款)
func GetOrderSource ¶
获取 订单来源(10普通 20积分 30拼团 40砍价 50秒杀 60礼包购)
func GetOrderStatus ¶
获取 订单状态10=>进行中,20=>已取消,30=>已完成
func GetOrderStatusText ¶
func GetPayStatusText ¶
func GetPayTypeText ¶
func GetProductStatusText ¶
func GetRandomCapitalString ¶
func GetReceiptStatus ¶
获取 收货状态(10未收货 20已收货)
func GetReceiptStatusText ¶
func GetStatusTextAttr ¶
func GetTimeAttr ¶
func GetTodayDateTime ¶
func GetUpdatePriceAttr ¶
func HttpBuildQuery ¶
func Int64DivFloat64 ¶
func Int64DivInt64 ¶
func Int64MulFloat64 ¶
func Int64MulInt64 ¶
func Int64SubFloat ¶
func Int64SubInt64 ¶
func Int64ToString ¶
func Post ¶
发送POST请求 url: 请求地址 data: POST请求提交的数据 contentType: 请求体格式,如:application/json,"application/x-www-form-urlencoded" content: 请求放回的内容
func SearchParam ¶
SearchParam 解析查询参数
func StrDateAndTime ¶
func StrDateAndTime() string
func StringToFloat64 ¶
func StringToInt64 ¶
func TimesToNum ¶
func Timestamp2min ¶
func TimestampToDataWithDay ¶
func TraverseMapInStringOrder ¶
func TraverseMapInStringOrder(params map[string]string, handler MapEntryHandler)
按字母顺序遍历map
Types ¶
type IpInfo ¶
type MapEntryHandler ¶
type SmsInfo ¶
type SmsInfo struct { AccessKeyId string `json:"AccessKeyId"` AccessKeySecret string `json:"AccessKeySecret"` SignName string `json:"sign"` TemplateCode string `json:"login_template"` TemplateParam string `json:"apply_template"` SupplierRejectCode string `json:"supplier_reject_code"` SupplierPassCode string `json:"supplier_pass_code"` }