Commit dbe4d580 by 杨树贤

构建日志上报

parent 6a5f4bf9
The file could not be displayed because it is too large.
The file could not be displayed because it is too large.
package util
import "runtime"
type Caller struct {
FileName string
FileLine int
}
//获取上级调用者
//2代表上级,3代表上上级
func getCaller() Caller {
pc, _, _, _ := runtime.Caller(2)
caller := runtime.FuncForPC(pc)
_, fileLine := caller.FileLine(pc)
name := caller.Name()
return Caller{
FileName: name,
FileLine: fileLine,
}
}
package self_service
import (
"fmt"
"github.com/gin-gonic/gin"
"github.com/syyongx/php2go"
)
type Params struct {
GoodsName string `form:"goods_name/condition"`
}
//$goods_name_arr=array();
//if(isset($arr['goods_name/condition']) && C('ZIYING_BRAND_REPLACE.'.mystrupper($arr['goods_name/condition']))){
//$arr['brand_name/condition'] = C('ZIYING_BRAND_REPLACE.'.mystrupper($arr['goods_name/condition']));
//$goods_name_arr = array($arr['brand_name/condition']);
//unset($arr['goods_name/condition']);
//
//}
func GetSearchParams(c *gin.Context) (params Params) {
if c.ShouldBindQuery(&params) == nil {
//商品名称的数组
fmt.Println(params.GoodsName)
}
return params
}
func getGoodsName(goodsName string){
//判断是否存在于品牌中
if (goodsName != "") && (php2go.Strtoupper(goodsName) != "") {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment