fix:
This commit is contained in:
parent
e11d1350f4
commit
d134f5742a
|
@ -324,3 +324,25 @@ func ShopAssistantList(c *gin.Context) {
|
|||
RespOK(c, users)
|
||||
return
|
||||
}
|
||||
|
||||
// 订单审核
|
||||
func ErpOrderAudit(c *gin.Context) {
|
||||
req := &struct {
|
||||
ErpOrderId uint32 `json:"erp_order_id"`
|
||||
}{}
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
logger.Error(err)
|
||||
RespJson(c, status.InternalServerError, nil)
|
||||
return
|
||||
}
|
||||
|
||||
err := model.DB.Table("erp_order").Where("id = ?", req.ErpOrderId).Update("state", model.ErpOrderStateAudited).Error
|
||||
if err != nil {
|
||||
logger.Error("order err:", err)
|
||||
RespJson(c, status.InternalServerError, nil)
|
||||
return
|
||||
}
|
||||
|
||||
RespOK(c, nil)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -290,6 +290,7 @@ func ConfigAppRouter(r gin.IRouter) {
|
|||
retail.POST("order/create", controller.ErpOrderCreate)
|
||||
retail.POST("order_detail", controller.ErpOrderDetail)
|
||||
retail.POST("shop_assistant_list", controller.ShopAssistantList)
|
||||
retail.POST("order_audit", controller.ErpOrderAudit)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user