test
This commit is contained in:
@@ -51,7 +51,7 @@ func (c *DeliveryHandler) IsErrStoreExist(err error) bool {
|
|||||||
}
|
}
|
||||||
func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee int64) (bill *model.Waybill, err error) {
|
func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee int64) (bill *model.Waybill, err error) {
|
||||||
storeID := jxutils.GetShowStoreIDFromOrder(order)
|
storeID := jxutils.GetShowStoreIDFromOrder(order)
|
||||||
stores, err := dao.GetStoreList(dao.GetDB(), []int{storeID}, nil, nil, nil, "")
|
stores, err := dao.GetStoreList(dao.GetDB(), []int{storeID}, nil, nil, nil, nil, "")
|
||||||
if len(stores) == 0 || err != nil {
|
if len(stores) == 0 || err != nil {
|
||||||
return bill, fmt.Errorf("未查询到该门店! 门店id :[%v]", storeID)
|
return bill, fmt.Errorf("未查询到该门店! 门店id :[%v]", storeID)
|
||||||
}
|
}
|
||||||
@@ -65,8 +65,8 @@ func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee
|
|||||||
ReceiveName: order.ConsigneeName,
|
ReceiveName: order.ConsigneeName,
|
||||||
ReceiveAddress: order.ConsigneeAddress,
|
ReceiveAddress: order.ConsigneeAddress,
|
||||||
ReceiveTel: order.ConsigneeMobile,
|
ReceiveTel: order.ConsigneeMobile,
|
||||||
Weight: order.Weight,
|
Weight: utils.Int2Float64(order.Weight),
|
||||||
Vloumn: order.Weight,
|
Vloumn: utils.Int2Float64(order.Weight),
|
||||||
PackageCount: 1,
|
PackageCount: 1,
|
||||||
Description: "生鲜",
|
Description: "生鲜",
|
||||||
Aging: 5,
|
Aging: 5,
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ func (c *Auth2Controller) SendVerifyCode() {
|
|||||||
// @Param authSecret formData string true "不同登录类型的登录秘密,如果是localpass登录类型,是md5后的值(空串不要md5)"
|
// @Param authSecret formData string true "不同登录类型的登录秘密,如果是localpass登录类型,是md5后的值(空串不要md5)"
|
||||||
// @Param authID formData string false "登录ID,登录类型为localpass时依赖于authIDType,其它为相应登录类型的id"
|
// @Param authID formData string false "登录ID,登录类型为localpass时依赖于authIDType,其它为相应登录类型的id"
|
||||||
// @Param authIDType formData string false "只有在登录类型为localpass时,才有意义,分别为:userid2:用户名,email,mobile"
|
// @Param authIDType formData string false "只有在登录类型为localpass时,才有意义,分别为:userid2:用户名,email,mobile"
|
||||||
|
// @Param version formData string false "当app登录时,需要传版本号"
|
||||||
// @Success 200 {object} controllers.CallResult
|
// @Success 200 {object} controllers.CallResult
|
||||||
// @Failure 200 {object} controllers.CallResult
|
// @Failure 200 {object} controllers.CallResult
|
||||||
// @router /Login [post]
|
// @router /Login [post]
|
||||||
@@ -110,6 +111,10 @@ func (c *Auth2Controller) Login() {
|
|||||||
params.AuthSecret = GetComposedCode(&c.Controller, params.AuthSecret)
|
params.AuthSecret = GetComposedCode(&c.Controller, params.AuthSecret)
|
||||||
}
|
}
|
||||||
if params.AuthType == weixin.AuthTypeWxApp {
|
if params.AuthType == weixin.AuthTypeWxApp {
|
||||||
|
configs, _ := dao.QueryConfigs(dao.GetDB(), "checkversion", model.ConfigTypeSys, "")
|
||||||
|
if params.Version == "" || configs[0].Value != params.Version {
|
||||||
|
return nil, "", fmt.Errorf("当前APP版本过旧,数据显示有错误,请到'京西菜市'公众号下载最新版本APP!")
|
||||||
|
}
|
||||||
params.AuthSecret = GetComposedCode2(&c.Controller, params.AuthSecret)
|
params.AuthSecret = GetComposedCode2(&c.Controller, params.AuthSecret)
|
||||||
}
|
}
|
||||||
ctx := auth2.NewContext(c.Ctx.ResponseWriter, c.Ctx.Request)
|
ctx := auth2.NewContext(c.Ctx.ResponseWriter, c.Ctx.Request)
|
||||||
|
|||||||
Reference in New Issue
Block a user