This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"fmt" | |
"github.com/tealeg/xlsx" | |
) | |
func main() { | |
test() | |
} | |
var header = []string{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func test1() { | |
var log = logrus.New() | |
log.SetReportCaller(true) | |
log.Level = logrus.TraceLevel | |
log.Out = os.Stdout | |
log.Formatter = &logrus.JSONFormatter{ | |
PrettyPrint: true, | |
FieldMap: logrus.FieldMap{ | |
logrus.FieldKeyLevel: "my_level", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 根据类目获取 药品列表 | |
import ( | |
"git.medlinker.com/service-sdk/med-sdk-go/med-ih-medication/spu-pack" | |
spuSrv "med-patient-medication/app/api_http/medication/spu_pack" | |
) | |
// fcid 是类目id(path) params(query) 只用传 start 和 limit | |
result, err := spuSrv.Service{}.PaginateByFrontCategory(api_http.ParserMedContext(ctx), 0, fcid, *params) | |
// 分页数据转换为前端可用的数据 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// 自定义的时间字符串转 Time 对象 | |
func String2Time() { | |
const longForm = "2006-01-02 15:04:05" | |
t, err := time.Parse(longForm, "1991-01-02 15:04:05") | |
if err != nil { | |
panic(err) | |
} | |
// t Time 的相关操作... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.util.Log; | |
import com.paulyung.dongqiudi.BuildConfig; | |
import java.lang.reflect.Field; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Set; | |
/** |