Merge branch 'dev/dev1.0' into feature_413_cjh
# Conflicts: # app/constants/common/common.go # app/data/app.go # app/data/order_log.go # app/data/pay_channel.go
This commit is contained in:
commit
1a292ff5d3
|
@ -3,15 +3,16 @@ package common
|
||||||
const (
|
const (
|
||||||
TOKEN_PRE = "player_token_"
|
TOKEN_PRE = "player_token_"
|
||||||
TOKEN_Admin = "Admin_token_"
|
TOKEN_Admin = "Admin_token_"
|
||||||
ADMIN_V1 = "/admin/api/v1"
|
ADMIN_V1 = "/admin/pay/api/v1"
|
||||||
|
|
||||||
PAYCHANNEL_WX_JSAPI = 1 // 微信支付JSAPI
|
|
||||||
PAYCHANNEL_WX_H5 = 2 // 微信支付H5
|
|
||||||
PAYCHANNEL_WX_APP = 3 // 微信支付APP
|
|
||||||
PAYCHANNEL_WX_Native = 4 // 微信支付Native
|
|
||||||
PAYCHANNEL_WX_Minnin = 5 // 微信支付小程序
|
|
||||||
PAYCHANNEL_ALI_H5 = 6 // 支付宝支付H5
|
|
||||||
PAYCHANNEL_ALI_Minnin = 7 // 支付宝支付小程序
|
|
||||||
PAYCHANNEL_ALI_JSAPI = 8 // 支付宝支付JSAPI
|
|
||||||
|
|
||||||
|
// 支付渠道枚举,1微信JSAPI,2微信H5,3微信app,4微信Native,5微信小程序,6支付宝网页&移动应用,7支付宝小程序,8支付宝JSAPI
|
||||||
|
PAY_CHANNEL_UNKNOWN = 0
|
||||||
|
PAY_CHANNEL_WECHAT_JSAPI = 1
|
||||||
|
PAY_CHANNEL_WECHAT_H5 = 2
|
||||||
|
PAY_CHANNEL_WECHAT_APP = 3
|
||||||
|
PAY_CHANNEL_WECHAT_NATIVE = 4
|
||||||
|
PAY_CHANNEL_WECHAT_MINI = 5
|
||||||
|
PAY_CHANNEL_ALIPAY_WEB = 6
|
||||||
|
PAY_CHANNEL_ALIPAY_MINI = 7
|
||||||
|
PAY_CHANNEL_ALIPAY_JSAPI = 8
|
||||||
)
|
)
|
||||||
|
|
|
@ -1 +1,39 @@
|
||||||
package data
|
package data
|
||||||
|
|
||||||
|
import (
|
||||||
|
"PaymentCenter/app/http/entities"
|
||||||
|
"PaymentCenter/app/models/appmodel"
|
||||||
|
"xorm.io/builder"
|
||||||
|
"xorm.io/xorm"
|
||||||
|
)
|
||||||
|
|
||||||
|
type AppRepo struct {
|
||||||
|
repo xorm.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewAppRepo(repo xorm.Interface) *AppRepo {
|
||||||
|
return &AppRepo{
|
||||||
|
repo: repo,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *AppRepo) AppList(conn builder.Cond, pageFilter entities.PageRequest, appList *[]appmodel.App) (int64, error) {
|
||||||
|
repo := m.repo.Where(conn)
|
||||||
|
if pageFilter.Page > 0 {
|
||||||
|
repo = repo.Limit(pageFilter.PageSize, pageFilter.PageSize*(pageFilter.Page-1))
|
||||||
|
}
|
||||||
|
return repo.Desc("create_time").FindAndCount(appList)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *AppRepo) AppInsertOne(app *appmodel.App) (int64, error) {
|
||||||
|
return m.repo.InsertOne(app)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *AppRepo) AppDelete(app *appmodel.App, conn builder.Cond) (int64, error) {
|
||||||
|
return m.repo.Where(conn).Delete(app)
|
||||||
|
}
|
||||||
|
|
||||||
|
// columns 参数为要更新的字段
|
||||||
|
func (m *AppRepo) AppUpdate(app *appmodel.App, conn builder.Cond, columns ...string) (int64, error) {
|
||||||
|
return m.repo.Where(conn).MustCols(columns...).Update(app)
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
package data
|
||||||
|
|
||||||
|
import (
|
||||||
|
"PaymentCenter/app/http/entities"
|
||||||
|
"PaymentCenter/app/models/merchantmodel"
|
||||||
|
"xorm.io/builder"
|
||||||
|
"xorm.io/xorm"
|
||||||
|
)
|
||||||
|
|
||||||
|
type MerchantRepo struct {
|
||||||
|
repo xorm.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewMerchantRepo(repo xorm.Interface) *MerchantRepo {
|
||||||
|
return &MerchantRepo{
|
||||||
|
repo: repo,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MerchantRepo) MerchantList(conn builder.Cond, pageFilter entities.PageRequest, merchantList *[]merchantmodel.Merchant) (int64, error) {
|
||||||
|
repo := m.repo.Where(conn)
|
||||||
|
if pageFilter.Page > 0 {
|
||||||
|
repo = repo.Limit(pageFilter.PageSize, pageFilter.PageSize*(pageFilter.Page-1))
|
||||||
|
}
|
||||||
|
return repo.Desc("create_time").FindAndCount(merchantList)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MerchantRepo) MerchantInsertOne(merchant *merchantmodel.Merchant) (int64, error) {
|
||||||
|
return m.repo.InsertOne(merchant)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MerchantRepo) MerchantDelete(merchant *merchantmodel.Merchant, conn builder.Cond) (int64, error) {
|
||||||
|
return m.repo.Where(conn).Delete(merchant)
|
||||||
|
}
|
||||||
|
|
||||||
|
// columns 参数为要更新的字段
|
||||||
|
func (m *MerchantRepo) MerchantUpdate(merchant *merchantmodel.Merchant, conn builder.Cond, columns ...string) (int64, error) {
|
||||||
|
return m.repo.Where(conn).MustCols(columns...).Update(merchant)
|
||||||
|
}
|
|
@ -1 +1,39 @@
|
||||||
package data
|
package data
|
||||||
|
|
||||||
|
import (
|
||||||
|
"PaymentCenter/app/http/entities"
|
||||||
|
"PaymentCenter/app/models/orderlogmodel"
|
||||||
|
"xorm.io/builder"
|
||||||
|
"xorm.io/xorm"
|
||||||
|
)
|
||||||
|
|
||||||
|
type OrderLogRepo struct {
|
||||||
|
repo xorm.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewOrderLogRepo(repo xorm.Interface) *OrderLogRepo {
|
||||||
|
return &OrderLogRepo{
|
||||||
|
repo: repo,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *OrderLogRepo) MerchantList(conn builder.Cond, pageFilter entities.PageRequest, orderLogList *[]orderlogmodel.OrderLogModel) (int64, error) {
|
||||||
|
repo := m.repo.Where(conn)
|
||||||
|
if pageFilter.Page > 0 {
|
||||||
|
repo = repo.Limit(pageFilter.PageSize, pageFilter.PageSize*(pageFilter.Page-1))
|
||||||
|
}
|
||||||
|
return repo.Desc("create_time").FindAndCount(orderLogList)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *OrderLogRepo) MerchantInsertOne(orderLog *orderlogmodel.OrderLogModel) (int64, error) {
|
||||||
|
return m.repo.InsertOne(orderLog)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *OrderLogRepo) MerchantDelete(orderLog *orderlogmodel.OrderLogModel, conn builder.Cond) (int64, error) {
|
||||||
|
return m.repo.Where(conn).Delete(orderLog)
|
||||||
|
}
|
||||||
|
|
||||||
|
// columns 参数为要更新的字段
|
||||||
|
func (m *OrderLogRepo) MerchantUpdate(orderLog *orderlogmodel.OrderLogModel, conn builder.Cond, columns ...string) (int64, error) {
|
||||||
|
return m.repo.Where(conn).MustCols(columns...).Update(orderLog)
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
package data
|
||||||
|
|
||||||
|
import (
|
||||||
|
"PaymentCenter/app/http/entities"
|
||||||
|
"PaymentCenter/app/models/ordersmodel"
|
||||||
|
"xorm.io/builder"
|
||||||
|
"xorm.io/xorm"
|
||||||
|
)
|
||||||
|
|
||||||
|
type OrderRepo struct {
|
||||||
|
repo xorm.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewOrderRepo(repo xorm.Interface) *OrderRepo {
|
||||||
|
return &OrderRepo{
|
||||||
|
repo: repo,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *OrderRepo) MerchantList(conn builder.Cond, pageFilter entities.PageRequest, orderList *[]ordersmodel.Orders) (int64, error) {
|
||||||
|
repo := m.repo.Where(conn)
|
||||||
|
if pageFilter.Page > 0 {
|
||||||
|
repo = repo.Limit(pageFilter.PageSize, pageFilter.PageSize*(pageFilter.Page-1))
|
||||||
|
}
|
||||||
|
return repo.Desc("create_time").FindAndCount(orderList)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *OrderRepo) MerchantInsertOne(order *ordersmodel.Orders) (int64, error) {
|
||||||
|
return m.repo.InsertOne(order)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *OrderRepo) MerchantDelete(order *ordersmodel.Orders, conn builder.Cond) (int64, error) {
|
||||||
|
return m.repo.Where(conn).Delete(order)
|
||||||
|
}
|
||||||
|
|
||||||
|
// columns 参数为要更新的字段
|
||||||
|
func (m *OrderRepo) MerchantUpdate(order *ordersmodel.Orders, conn builder.Cond, columns ...string) (int64, error) {
|
||||||
|
return m.repo.Where(conn).MustCols(columns...).Update(order)
|
||||||
|
}
|
|
@ -1,14 +1,39 @@
|
||||||
package data
|
package data
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"PaymentCenter/app/models/ordersmodel"
|
"PaymentCenter/app/http/entities"
|
||||||
"PaymentCenter/app/models/paychannelmodel"
|
"PaymentCenter/app/models/paychannelmodel"
|
||||||
|
"xorm.io/builder"
|
||||||
|
"xorm.io/xorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetPayChannelById(id int64) (payChannelInfo paychannelmodel.PayChannel, err error) {
|
type PayChannelRepo struct {
|
||||||
_, err = ordersmodel.GetInstance().GetDb().Where("Id = ?", id).Get(&payChannelInfo)
|
repo xorm.Interface
|
||||||
if err != nil {
|
}
|
||||||
return paychannelmodel.PayChannel{}, err
|
|
||||||
}
|
func NewPayChannelRepo(repo xorm.Interface) *PayChannelRepo {
|
||||||
return payChannelInfo, nil
|
return &PayChannelRepo{
|
||||||
|
repo: repo,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *PayChannelRepo) PayChannelList(conn builder.Cond, pageFilter entities.PageRequest, payChannelList *[]paychannelmodel.PayChannel) (int64, error) {
|
||||||
|
repo := m.repo.Where(conn)
|
||||||
|
if pageFilter.Page > 0 {
|
||||||
|
repo = repo.Limit(pageFilter.PageSize, pageFilter.PageSize*(pageFilter.Page-1))
|
||||||
|
}
|
||||||
|
return repo.Desc("create_time").FindAndCount(payChannelList)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *PayChannelRepo) PayChannelInsertOne(merchant *paychannelmodel.PayChannel) (int64, error) {
|
||||||
|
return m.repo.InsertOne(merchant)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *PayChannelRepo) PayChannelDelete(merchant *paychannelmodel.PayChannel, conn builder.Cond) (int64, error) {
|
||||||
|
return m.repo.Where(conn).Delete(merchant)
|
||||||
|
}
|
||||||
|
|
||||||
|
// columns 参数为要更新的字段
|
||||||
|
func (m *PayChannelRepo) PayChannelUpdate(merchant *paychannelmodel.PayChannel, conn builder.Cond, columns ...string) (int64, error) {
|
||||||
|
return m.repo.Where(conn).MustCols(columns...).Update(merchant)
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
package backend
|
||||||
|
|
||||||
|
import (
|
||||||
|
"PaymentCenter/app/http/controllers"
|
||||||
|
"PaymentCenter/app/http/entities"
|
||||||
|
"PaymentCenter/app/http/entities/backend"
|
||||||
|
"PaymentCenter/app/models/merchantmodel"
|
||||||
|
"PaymentCenter/app/services"
|
||||||
|
"github.com/ahmetb/go-linq/v3"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
)
|
||||||
|
|
||||||
|
func MerchantList(c *gin.Context) {
|
||||||
|
req, _ := controllers.GetRequest(c).(*backend.MerchantListRequest)
|
||||||
|
req.SetDefault()
|
||||||
|
merchantList, total, code := services.MerchantList(*req)
|
||||||
|
|
||||||
|
result := make([]backend.MerchantResponse, 0, len(merchantList))
|
||||||
|
linq.From(merchantList).SelectT(func(in merchantmodel.Merchant) (out backend.MerchantResponse) {
|
||||||
|
out.ResponseFromDb(in)
|
||||||
|
return
|
||||||
|
}).ToSlice(&result)
|
||||||
|
data := entities.PageRsp{
|
||||||
|
Total: total,
|
||||||
|
Data: result,
|
||||||
|
}
|
||||||
|
controllers.HandCodeRes(c, data, code)
|
||||||
|
}
|
||||||
|
|
||||||
|
func MerchantCreate(c *gin.Context) {
|
||||||
|
req, _ := controllers.GetRequest(c).(*backend.MerchantCreateRequest)
|
||||||
|
merchant := req.RequestToDb()
|
||||||
|
code := services.MerchantCreate(&merchant)
|
||||||
|
|
||||||
|
data := backend.MerchantResponse{}
|
||||||
|
data.ResponseFromDb(merchant)
|
||||||
|
controllers.HandCodeRes(c, data, code)
|
||||||
|
}
|
||||||
|
|
||||||
|
func MerchantUpdate(c *gin.Context) {
|
||||||
|
req, _ := controllers.GetRequest(c).(*backend.MerchantUpdateRequest)
|
||||||
|
merchant := req.RequestToDb()
|
||||||
|
code := services.MerchantUpdate(&merchant)
|
||||||
|
|
||||||
|
data := backend.MerchantResponse{}
|
||||||
|
data.ResponseFromDb(merchant)
|
||||||
|
controllers.HandCodeRes(c, data, code)
|
||||||
|
}
|
||||||
|
|
||||||
|
func MerchantDelete(c *gin.Context) {
|
||||||
|
req, _ := controllers.GetRequest(c).(*entities.IdRequest)
|
||||||
|
code := services.MerchantDelete(*req)
|
||||||
|
controllers.HandCodeRes(c, nil, code)
|
||||||
|
}
|
|
@ -15,6 +15,8 @@ import (
|
||||||
zh_translations "gopkg.in/go-playground/validator.v9/translations/zh"
|
zh_translations "gopkg.in/go-playground/validator.v9/translations/zh"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"reflect"
|
||||||
|
"regexp"
|
||||||
|
|
||||||
"PaymentCenter/app/constants/errorcode"
|
"PaymentCenter/app/constants/errorcode"
|
||||||
|
|
||||||
|
@ -108,12 +110,26 @@ func GenRequest(c *gin.Context, request interface{}) (msgs []string, err error)
|
||||||
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
validate := validator.New()
|
validate := validator.New()
|
||||||
|
_ = validate.RegisterValidation("phoneValidation", phoneValidation)
|
||||||
zh_ch := zh.New()
|
zh_ch := zh.New()
|
||||||
|
|
||||||
uni := ut.New(zh_ch)
|
uni := ut.New(zh_ch)
|
||||||
trans, _ := uni.GetTranslator("zh")
|
trans, _ := uni.GetTranslator("zh")
|
||||||
|
_ = validate.RegisterTranslation("phoneValidation", trans, func(ut ut.Translator) error {
|
||||||
|
return ut.Add("phoneValidation", "手机号不合法", true) // 添加翻译
|
||||||
|
}, func(ut ut.Translator, fe validator.FieldError) string {
|
||||||
|
t, _ := ut.T("phoneValidation", fe.Field()) // 获取翻译
|
||||||
|
return t
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
//注册一个函数,获取struct tag里自定义的label作为字段名
|
||||||
|
validate.RegisterTagNameFunc(func(fld reflect.StructField) string {
|
||||||
|
name := fld.Tag.Get("label")
|
||||||
|
return name
|
||||||
|
})
|
||||||
//验证器注册翻译器
|
//验证器注册翻译器
|
||||||
zh_translations.RegisterDefaultTranslations(validate, trans)
|
_ = zh_translations.RegisterDefaultTranslations(validate, trans)
|
||||||
errValidate := validate.Struct(request)
|
errValidate := validate.Struct(request)
|
||||||
|
|
||||||
if errValidate != nil {
|
if errValidate != nil {
|
||||||
|
@ -175,3 +191,15 @@ func Frequence(key string) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 自定义验证器
|
||||||
|
func phoneValidation(fl validator.FieldLevel) bool {
|
||||||
|
phone := fl.Field().String()
|
||||||
|
if phone == "" {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
// 使用正则表达式验证手机号
|
||||||
|
phoneRegex := `^1[3-9]\d{9}$`
|
||||||
|
reg := regexp.MustCompile(phoneRegex)
|
||||||
|
return reg.MatchString(phone)
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,63 @@
|
||||||
|
package backend
|
||||||
|
|
||||||
|
import (
|
||||||
|
"PaymentCenter/app/http/entities"
|
||||||
|
"PaymentCenter/app/models/merchantmodel"
|
||||||
|
)
|
||||||
|
|
||||||
|
type MerchantListRequest struct {
|
||||||
|
entities.PageRequest
|
||||||
|
Name string `form:"name"`
|
||||||
|
Contact string `form:"contact"`
|
||||||
|
Phone string `form:"phone"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type MerchantResponse struct {
|
||||||
|
Id int64 `json:"id"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Contact string `json:"contact"`
|
||||||
|
Phone string `json:"phone"`
|
||||||
|
Remark string `json:"remark"`
|
||||||
|
CreateTime string `json:"create_time"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MerchantResponse) ResponseFromDb(db merchantmodel.Merchant) {
|
||||||
|
m.Id = db.Id
|
||||||
|
m.Name = db.Name
|
||||||
|
m.Contact = db.Contact
|
||||||
|
m.Phone = db.Phone
|
||||||
|
m.Remark = db.Remark
|
||||||
|
m.CreateTime = db.CreateTime.Format("2006-01-02 15:04:05")
|
||||||
|
}
|
||||||
|
|
||||||
|
type MerchantCreateRequest struct {
|
||||||
|
Name string `json:"name" validate:"required" label:"商户名称"`
|
||||||
|
Contact string `json:"contact" validate:"required" label:"联系人"`
|
||||||
|
Phone string `json:"phone" validate:"required,phoneValidation" label:"联系电话"`
|
||||||
|
Remark string `json:"remark" label:"备注"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MerchantCreateRequest) RequestToDb() (db merchantmodel.Merchant) {
|
||||||
|
db.Name = m.Name
|
||||||
|
db.Contact = m.Contact
|
||||||
|
db.Phone = m.Phone
|
||||||
|
db.Remark = m.Remark
|
||||||
|
return db
|
||||||
|
}
|
||||||
|
|
||||||
|
type MerchantUpdateRequest struct {
|
||||||
|
Id int64 `json:"id" validate:"required" label:"商户ID"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Contact string `json:"contact"`
|
||||||
|
Phone string `json:"phone" validate:"phoneValidation" label:"联系电话"`
|
||||||
|
Remark string `json:"remark"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MerchantUpdateRequest) RequestToDb() (db merchantmodel.Merchant) {
|
||||||
|
db.Id = m.Id
|
||||||
|
db.Name = m.Name
|
||||||
|
db.Contact = m.Contact
|
||||||
|
db.Phone = m.Phone
|
||||||
|
db.Remark = m.Remark
|
||||||
|
return db
|
||||||
|
}
|
|
@ -0,0 +1,87 @@
|
||||||
|
package backend
|
||||||
|
|
||||||
|
import (
|
||||||
|
"PaymentCenter/app/constants/common"
|
||||||
|
"PaymentCenter/app/models/paychannelmodel"
|
||||||
|
"PaymentCenter/app/utils"
|
||||||
|
"encoding/json"
|
||||||
|
"github.com/pkg/errors"
|
||||||
|
)
|
||||||
|
|
||||||
|
type PayChannelResponse struct {
|
||||||
|
Id int64 `json:"id"`
|
||||||
|
PayName string `json:"pay_name"`
|
||||||
|
MerchantId int64 `json:"merchant_id"`
|
||||||
|
ChannelType int `json:"channel_type"`
|
||||||
|
WhiteIp string `json:"white_ip"`
|
||||||
|
AppId string `json:"app_id"`
|
||||||
|
ExpireTime string `json:"expire_time"`
|
||||||
|
CreateTime string `json:"create_time"`
|
||||||
|
AliPayPayChannel AliPayPayChannel `json:"ali_pay_pay_channel,omitempty"`
|
||||||
|
WechatPayChannel WechatPayChannel `json:"wechat_pay_channel,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PayChannelResponse) ResponseFromDb(db paychannelmodel.PayChannel) {
|
||||||
|
p.Id = db.Id
|
||||||
|
p.PayName = db.PayName
|
||||||
|
p.MerchantId = db.MerchantId
|
||||||
|
p.ChannelType = db.ChannelType
|
||||||
|
p.WhiteIp = db.WhiteIp
|
||||||
|
p.AppId = db.AppId
|
||||||
|
p.ExpireTime = db.ExpireTime.Format("2006-01-02 15:04:05")
|
||||||
|
p.CreateTime = db.CreateTime.Format("2006-01-02 15:04:05")
|
||||||
|
|
||||||
|
switch p.ChannelType {
|
||||||
|
case common.PAY_CHANNEL_WECHAT_H5 | common.PAY_CHANNEL_WECHAT_JSAPI | common.PAY_CHANNEL_WECHAT_NATIVE | common.PAY_CHANNEL_WECHAT_APP | common.PAY_CHANNEL_WECHAT_MINI:
|
||||||
|
_ = json.Unmarshal([]byte(db.ExtJson), &p.WechatPayChannel)
|
||||||
|
case common.PAY_CHANNEL_ALIPAY_JSAPI | common.PAY_CHANNEL_ALIPAY_WEB | common.PAY_CHANNEL_ALIPAY_MINI:
|
||||||
|
_ = json.Unmarshal([]byte(db.ExtJson), &p.AliPayPayChannel)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
type PayChannelCreateRequest struct {
|
||||||
|
PayName string `json:"pay_name"`
|
||||||
|
MerchantId int64 `json:"merchant_id"`
|
||||||
|
ChannelType int `json:"channel_type"` //支付渠道枚举,1微信JSAPI,2微信H5,3微信app,4微信Native,5微信小程序,6支付宝网页&移动应用,7支付宝小程序,8支付宝JSAPI
|
||||||
|
WhiteIp string `json:"white_ip"`
|
||||||
|
AppId string `json:"app_id"`
|
||||||
|
ExpireTime string `json:"expire_time"`
|
||||||
|
AliPayPayChannel AliPayPayChannel `json:"ali_pay_pay_channel,omitempty"`
|
||||||
|
WechatPayChannel WechatPayChannel `json:"wechat_pay_channel,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type WechatPayChannel struct {
|
||||||
|
MchId int `json:"mch_id"` //直连商户号
|
||||||
|
MchCertificateSerialNumber string `json:"mch_certificate_serial_number"` //商户证书序列号
|
||||||
|
MchAPIv3Key string `json:"mch_APIv3_key"` //商户APIv3密钥
|
||||||
|
PrivateKeyPath string `json:"private_key_path"` //商户私钥文件路径
|
||||||
|
}
|
||||||
|
|
||||||
|
type AliPayPayChannel struct {
|
||||||
|
AliPublicKey string `json:"ali_public_key"` //支付宝公钥
|
||||||
|
PrivateKeyPath string `json:"private_key_path"` //应用私钥
|
||||||
|
SignType string `json:"sign_type"` //商户生成签名字符串所使用的签名算法类型,目前支持RSA2和RSA,推荐使用RSA2
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PayChannelCreateRequest) RequestToDb() (db paychannelmodel.PayChannel, err error) {
|
||||||
|
db.PayName = p.PayName
|
||||||
|
db.MerchantId = p.MerchantId
|
||||||
|
db.ChannelType = p.ChannelType
|
||||||
|
db.WhiteIp = p.WhiteIp
|
||||||
|
db.AppId = p.AppId
|
||||||
|
if p.ExpireTime != "" {
|
||||||
|
db.ExpireTime, err = utils.StrToTimeShanghai(p.ExpireTime)
|
||||||
|
if err != nil {
|
||||||
|
err = errors.Wrap(err, "时间格式错误")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
switch p.ChannelType {
|
||||||
|
case common.PAY_CHANNEL_WECHAT_H5 | common.PAY_CHANNEL_WECHAT_JSAPI | common.PAY_CHANNEL_WECHAT_NATIVE | common.PAY_CHANNEL_WECHAT_APP | common.PAY_CHANNEL_WECHAT_MINI:
|
||||||
|
b, _ := json.Marshal(p.WechatPayChannel)
|
||||||
|
db.ExtJson = string(b)
|
||||||
|
case common.PAY_CHANNEL_ALIPAY_JSAPI | common.PAY_CHANNEL_ALIPAY_WEB | common.PAY_CHANNEL_ALIPAY_MINI:
|
||||||
|
b, _ := json.Marshal(p.AliPayPayChannel)
|
||||||
|
db.ExtJson = string(b)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
|
@ -1,15 +1,24 @@
|
||||||
package entities
|
package entities
|
||||||
|
|
||||||
type IdRequest struct {
|
type IdRequest struct {
|
||||||
Id int64 `json:"id"`
|
Id int64 `json:"id" form:"id" valid:"Required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PageRequest struct {
|
type PageRequest struct {
|
||||||
Page int64 `json:"page"`
|
Page int `json:"page" form:"page"`
|
||||||
PageSize int64 `json:"pageSize"`
|
PageSize int `json:"page_size" form:"page_size"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PageRequest) SetDefault() {
|
||||||
|
if p.Page == 0 {
|
||||||
|
p.Page = 1
|
||||||
|
}
|
||||||
|
if p.PageSize == 0 {
|
||||||
|
p.PageSize = 10
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type PageRsp struct {
|
type PageRsp struct {
|
||||||
Total int64 `json:"total"`
|
Total int64 `json:"total"`
|
||||||
Data []interface{} `json:"data"`
|
Data interface{} `json:"data"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,8 +93,9 @@ func ValidateRequest() gin.HandlerFunc {
|
||||||
v := handler()
|
v := handler()
|
||||||
msg, err := controllers.GenRequest(c, v)
|
msg, err := controllers.GenRequest(c, v)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Log(c, "path", path)
|
utils.Log(c, "参数错误", "path=", path, "err=", err.Error(), "msg=", msg)
|
||||||
controllers.Error(c, errorcode.ParamError, msg...)
|
controllers.Error(c, errorcode.ParamError, msg...)
|
||||||
|
c.Abort()
|
||||||
} else {
|
} else {
|
||||||
c.Set("request", v)
|
c.Set("request", v)
|
||||||
c.Next()
|
c.Next()
|
||||||
|
|
|
@ -1,8 +1,16 @@
|
||||||
package requestmapping
|
package requestmapping
|
||||||
|
|
||||||
|
import (
|
||||||
|
"PaymentCenter/app/constants/common"
|
||||||
|
"PaymentCenter/app/http/entities"
|
||||||
|
"PaymentCenter/app/http/entities/backend"
|
||||||
|
)
|
||||||
|
|
||||||
var BackendRequestMap = map[string]func() interface{}{
|
var BackendRequestMap = map[string]func() interface{}{
|
||||||
|
|
||||||
//common.ADMIN_V1 + "/product/create": func() interface{} {
|
// 商户
|
||||||
// return new(backend.ProductCreateRequest)
|
common.ADMIN_V1 + "/merchant/create": func() interface{} { return new(backend.MerchantCreateRequest) },
|
||||||
//},
|
common.ADMIN_V1 + "/merchant/update": func() interface{} { return new(backend.MerchantUpdateRequest) },
|
||||||
|
common.ADMIN_V1 + "/merchant/list": func() interface{} { return new(backend.MerchantListRequest) },
|
||||||
|
common.ADMIN_V1 + "/merchant/delete": func() interface{} { return new(entities.IdRequest) },
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package routes
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"PaymentCenter/app/http/controllers"
|
"PaymentCenter/app/http/controllers"
|
||||||
|
"PaymentCenter/app/http/controllers/backend"
|
||||||
"PaymentCenter/app/http/middlewares"
|
"PaymentCenter/app/http/middlewares"
|
||||||
"PaymentCenter/app/http/trace"
|
"PaymentCenter/app/http/trace"
|
||||||
"PaymentCenter/app/utils"
|
"PaymentCenter/app/utils"
|
||||||
|
@ -22,9 +23,14 @@ func RegisterAdminRoute(router *gin.Engine) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//v1 := router.Group("/admin/api/v1")
|
v1 := router.Group("/admin/pay/api/v1", middlewares.ValidateRequest())
|
||||||
//{
|
{
|
||||||
//
|
// 商户管理
|
||||||
//}
|
merchant := v1.Group("/merchant")
|
||||||
|
merchant.GET("/list", backend.MerchantList) // 商户列表
|
||||||
|
merchant.POST("/create", backend.MerchantCreate) // 商户创建
|
||||||
|
merchant.PUT("/update", backend.MerchantUpdate) // 商户更新
|
||||||
|
merchant.DELETE("/delete", backend.MerchantDelete) // 商户删除
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ var (
|
||||||
|
|
||||||
// 实体
|
// 实体
|
||||||
type App struct {
|
type App struct {
|
||||||
Id int64 `xorm:"'Id' bigint(20)"`
|
Id int64 `xorm:"pk autoincr AUTO_RANDOM"`
|
||||||
MerchantId int64 `xorm:"'merchant_id' bigint(20)"`
|
MerchantId int64 `xorm:"'merchant_id' bigint(20)"`
|
||||||
AppName string `xorm:"'app_name' varchar(128)"`
|
AppName string `xorm:"'app_name' varchar(128)"`
|
||||||
AppRemark string `xorm:"'app_remark' varchar(255)"`
|
AppRemark string `xorm:"'app_remark' varchar(255)"`
|
||||||
|
@ -22,9 +22,9 @@ type App struct {
|
||||||
PublicKey string `xorm:"'public_key' varchar(1024)"`
|
PublicKey string `xorm:"'public_key' varchar(1024)"`
|
||||||
PrivateKey string `xorm:"'private_key' varchar(1024)"`
|
PrivateKey string `xorm:"'private_key' varchar(1024)"`
|
||||||
MerchantPublicKey string `xorm:"'merchant_public_key' varchar(1024)"`
|
MerchantPublicKey string `xorm:"'merchant_public_key' varchar(1024)"`
|
||||||
CreateTime time.Time `xorm:"'create_time' datetime updated"`
|
CreateTime time.Time `xorm:"'create_time' datetime created"`
|
||||||
UpdateTime time.Time `xorm:"'update_time' timestamp"`
|
UpdateTime time.Time `xorm:"'update_time' timestamp updated"`
|
||||||
DeleteTime time.Time `xorm:"'delete_time' timestamp"`
|
DeleteTime time.Time `xorm:"'delete_time' timestamp deleted"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表名
|
// 表名
|
||||||
|
|
|
@ -13,14 +13,14 @@ var (
|
||||||
|
|
||||||
// 实体
|
// 实体
|
||||||
type Merchant struct {
|
type Merchant struct {
|
||||||
Id int64 `xorm:"'Id' bigint(20)"`
|
Id int64
|
||||||
Name string `xorm:"'name' varchar(128)"`
|
Name string `xorm:"'name' varchar(128)"`
|
||||||
Contact string `xorm:"'contact' varchar(128)"`
|
Contact string `xorm:"'contact' varchar(128)"`
|
||||||
Phone string `xorm:"'phone' varchar(11)"`
|
Phone string `xorm:"'phone' varchar(11)"`
|
||||||
Remark string `xorm:"'remark' varchar(1024)"`
|
Remark string `xorm:"'remark' varchar(1024)"`
|
||||||
CreateTime time.Time `xorm:"'create_time' datetime"`
|
CreateTime time.Time `xorm:"'create_time' datetime created"`
|
||||||
UpdateTime time.Time `xorm:"'update_time' timestamp"`
|
UpdateTime time.Time `xorm:"'update_time' timestamp updated"`
|
||||||
DeleteTime time.Time `xorm:"'delete_time' timestamp"`
|
DeleteTime time.Time `xorm:"'delete_time' timestamp deleted"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表名
|
// 表名
|
||||||
|
|
|
@ -13,13 +13,13 @@ var (
|
||||||
|
|
||||||
// 实体
|
// 实体
|
||||||
type OrderLog struct {
|
type OrderLog struct {
|
||||||
Id int64 `xorm:"'Id' bigint(20)"`
|
Id int64
|
||||||
OrderId int64 `xorm:"'order_id' bigint(20)"`
|
OrderId int64 `xorm:"'order_id' bigint(20)"`
|
||||||
PayCallback string `xorm:"'pay_callback' varchar(255)"`
|
PayCallback string `xorm:"'pay_callback' varchar(255)"`
|
||||||
Status int `xorm:"'status' int(11)"`
|
Status int `xorm:"'status' int(11)"`
|
||||||
MerchantParam string `xorm:"'merchant_param' varchar(255)"`
|
MerchantParam string `xorm:"'merchant_param' varchar(255)"`
|
||||||
MerchantCallback string `xorm:"'merchant_callback' varchar(255)"`
|
MerchantCallback string `xorm:"'merchant_callback' varchar(255)"`
|
||||||
CreateTime time.Time `xorm:"'create_time' datetime"`
|
CreateTime time.Time `xorm:"'create_time' datetime created"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表名
|
// 表名
|
||||||
|
|
|
@ -13,7 +13,7 @@ var (
|
||||||
|
|
||||||
// 实体
|
// 实体
|
||||||
type Orders struct {
|
type Orders struct {
|
||||||
Id int64 `xorm:"'Id' bigint(20)"`
|
Id int64
|
||||||
MerchantId int64 `xorm:"'merchant_id' bigint(20)"`
|
MerchantId int64 `xorm:"'merchant_id' bigint(20)"`
|
||||||
PayId int64 `xorm:"'pay_id' bigint(20)"`
|
PayId int64 `xorm:"'pay_id' bigint(20)"`
|
||||||
MerchantOrderId string `xorm:"'merchant_order_id' varchar(128)"`
|
MerchantOrderId string `xorm:"'merchant_order_id' varchar(128)"`
|
||||||
|
@ -26,9 +26,9 @@ type Orders struct {
|
||||||
MerchantResponse string `xorm:"'merchant_response' varchar(255)"`
|
MerchantResponse string `xorm:"'merchant_response' varchar(255)"`
|
||||||
OrderResponse string `xorm:"'order_response' varchar(255)"`
|
OrderResponse string `xorm:"'order_response' varchar(255)"`
|
||||||
ExtJson string `xorm:"'ext_json' varchar(1024)"`
|
ExtJson string `xorm:"'ext_json' varchar(1024)"`
|
||||||
CreateTime time.Time `xorm:"'create_time' datetime"`
|
CreateTime time.Time `xorm:"'create_time' datetime created"`
|
||||||
UpdateTime time.Time `xorm:"'update_time' timestamp"`
|
UpdateTime time.Time `xorm:"'update_time' timestamp updated"`
|
||||||
DeleteTime time.Time `xorm:"'delete_time' timestamp"`
|
DeleteTime time.Time `xorm:"'delete_time' timestamp deleted"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表名
|
// 表名
|
||||||
|
|
|
@ -13,7 +13,7 @@ var (
|
||||||
|
|
||||||
// 实体
|
// 实体
|
||||||
type PayChannel struct {
|
type PayChannel struct {
|
||||||
Id int64 `xorm:"'Id' bigint(20)"`
|
Id int64
|
||||||
PayName string `xorm:"'pay_name' varchar(128)"`
|
PayName string `xorm:"'pay_name' varchar(128)"`
|
||||||
MerchantId int64 `xorm:"'merchant_id' bigint(20)"`
|
MerchantId int64 `xorm:"'merchant_id' bigint(20)"`
|
||||||
ChannelType int `xorm:"'channel_type' int(11)"`
|
ChannelType int `xorm:"'channel_type' int(11)"`
|
||||||
|
@ -21,9 +21,9 @@ type PayChannel struct {
|
||||||
AppId string `xorm:"'app_id' varchar(255)"`
|
AppId string `xorm:"'app_id' varchar(255)"`
|
||||||
ExtJson string `xorm:"'ext_json' JSON"`
|
ExtJson string `xorm:"'ext_json' JSON"`
|
||||||
ExpireTime time.Time `xorm:"'expire_time' datetime"`
|
ExpireTime time.Time `xorm:"'expire_time' datetime"`
|
||||||
CreateTime time.Time `xorm:"'create_time' datetime"`
|
CreateTime time.Time `xorm:"'create_time' datetime created"`
|
||||||
UpdateTime time.Time `xorm:"'update_time' timestamp"`
|
UpdateTime time.Time `xorm:"'update_time' timestamp updated"`
|
||||||
DeleteTime time.Time `xorm:"'delete_time' timestamp"`
|
DeleteTime time.Time `xorm:"'delete_time' timestamp deleted"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表名
|
// 表名
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
package services
|
||||||
|
|
||||||
|
import (
|
||||||
|
"PaymentCenter/app/constants/errorcode"
|
||||||
|
"PaymentCenter/app/utils"
|
||||||
|
)
|
||||||
|
|
||||||
|
func handErr(err error) int {
|
||||||
|
if err != nil {
|
||||||
|
utils.Log(nil, "sys err", err.Error())
|
||||||
|
return errorcode.SystemError
|
||||||
|
} else {
|
||||||
|
return errorcode.Success
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
package services
|
||||||
|
|
||||||
|
import (
|
||||||
|
"PaymentCenter/app/data"
|
||||||
|
"PaymentCenter/app/http/entities"
|
||||||
|
"PaymentCenter/app/http/entities/backend"
|
||||||
|
"PaymentCenter/app/models/merchantmodel"
|
||||||
|
"xorm.io/builder"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MerchantList 商户列表
|
||||||
|
func MerchantList(req backend.MerchantListRequest) (result []merchantmodel.Merchant, total int64, code int) {
|
||||||
|
repo := data.NewMerchantRepo(merchantmodel.GetInstance().GetDb())
|
||||||
|
// 拼接查询条件
|
||||||
|
conn := builder.NewCond()
|
||||||
|
if req.Name != "" {
|
||||||
|
conn = conn.And(builder.Like{"name", req.Name})
|
||||||
|
}
|
||||||
|
if req.Contact != "" {
|
||||||
|
conn = conn.And(builder.Like{"contact", req.Contact})
|
||||||
|
}
|
||||||
|
if req.Phone != "" {
|
||||||
|
conn = conn.And(builder.Like{"phone", req.Phone})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 调用repo
|
||||||
|
merchantList := make([]merchantmodel.Merchant, 0)
|
||||||
|
count, err := repo.MerchantList(conn, req.PageRequest, &merchantList)
|
||||||
|
code = handErr(err)
|
||||||
|
return merchantList, count, code
|
||||||
|
}
|
||||||
|
|
||||||
|
func MerchantCreate(merchant *merchantmodel.Merchant) (code int) {
|
||||||
|
repo := data.NewMerchantRepo(merchantmodel.GetInstance().GetDb())
|
||||||
|
_, err := repo.MerchantInsertOne(merchant)
|
||||||
|
|
||||||
|
code = handErr(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func MerchantUpdate(merchant *merchantmodel.Merchant) (code int) {
|
||||||
|
repo := data.NewMerchantRepo(merchantmodel.GetInstance().GetDb())
|
||||||
|
// 拼接查询条件
|
||||||
|
conn := builder.NewCond()
|
||||||
|
conn = conn.And(builder.Eq{"Id": merchant.Id})
|
||||||
|
_, err := repo.MerchantUpdate(merchant, conn, "remark")
|
||||||
|
|
||||||
|
code = handErr(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func MerchantDelete(req entities.IdRequest) (code int) {
|
||||||
|
repo := data.NewMerchantRepo(merchantmodel.GetInstance().GetDb())
|
||||||
|
|
||||||
|
// 拼接查询条件
|
||||||
|
conn := builder.NewCond()
|
||||||
|
conn = conn.And(builder.Eq{"Id": req.Id})
|
||||||
|
m := merchantmodel.Merchant{Id: req.Id}
|
||||||
|
_, err := repo.MerchantDelete(&m, conn)
|
||||||
|
|
||||||
|
code = handErr(err)
|
||||||
|
return
|
||||||
|
}
|
1
go.mod
1
go.mod
|
@ -36,6 +36,7 @@ require (
|
||||||
github.com/KyleBanks/depth v1.2.1 // indirect
|
github.com/KyleBanks/depth v1.2.1 // indirect
|
||||||
github.com/PuerkitoBio/purell v1.1.1 // indirect
|
github.com/PuerkitoBio/purell v1.1.1 // indirect
|
||||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
||||||
|
github.com/ahmetb/go-linq/v3 v3.2.0 // indirect
|
||||||
github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68 // indirect
|
github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68 // indirect
|
||||||
github.com/alibabacloud-go/tea v1.1.17 // indirect
|
github.com/alibabacloud-go/tea v1.1.17 // indirect
|
||||||
github.com/alibabacloud-go/tea-utils v1.4.4 // indirect
|
github.com/alibabacloud-go/tea-utils v1.4.4 // indirect
|
||||||
|
|
2
go.sum
2
go.sum
|
@ -61,6 +61,8 @@ github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/
|
||||||
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
|
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
|
||||||
github.com/agiledragon/gomonkey/v2 v2.3.1 h1:k+UnUY0EMNYUFUAQVETGY9uUTxjMdnUkP0ARyJS1zzs=
|
github.com/agiledragon/gomonkey/v2 v2.3.1 h1:k+UnUY0EMNYUFUAQVETGY9uUTxjMdnUkP0ARyJS1zzs=
|
||||||
github.com/agiledragon/gomonkey/v2 v2.3.1/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY=
|
github.com/agiledragon/gomonkey/v2 v2.3.1/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY=
|
||||||
|
github.com/ahmetb/go-linq/v3 v3.2.0 h1:BEuMfp+b59io8g5wYzNoFe9pWPalRklhlhbiU3hYZDE=
|
||||||
|
github.com/ahmetb/go-linq/v3 v3.2.0/go.mod h1:haQ3JfOeWK8HpVxMtHHEMPVgBKiYyQ+f1/kLZh/cj9U=
|
||||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||||
|
|
Loading…
Reference in New Issue