|
@@ -73,6 +73,7 @@ func OrderAddBatch(c *gin.Context, apictx *ApiSession) (interface{}, error) {
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
func OrderAdd(c *gin.Context, apictx *ApiSession) (interface{}, error) {
|
|
|
var form model.Order
|
|
|
err := c.ShouldBindJSON(&form)
|
|
@@ -102,10 +103,8 @@ func OrderList(c *gin.Context, apictx *ApiSession) (interface{}, error) {
|
|
|
|
|
|
page, size, query := UtilQueryPageSize(c)
|
|
|
_userId := apictx.User.ID
|
|
|
- userId, err := primitive.ObjectIDFromHex(_userId)
|
|
|
- if err != nil {
|
|
|
- return nil, errors.New("非法用户")
|
|
|
- }
|
|
|
+ userId, _ := primitive.ObjectIDFromHex(_userId)
|
|
|
+
|
|
|
|
|
|
query["userId"] = userId
|
|
|
|