Merge branch 'master' of http://192.168.5.5:10010/r/aps/crm
| | |
| | | } |
| | | params := make([]*product.Info, 0) |
| | | for _, p := range first.Products { |
| | | var pa *product.Info |
| | | var pa product.Info |
| | | pa.ProductId = p.Number |
| | | pa.Time = utils.TimeToString(first.UpdatedAt) |
| | | params = append(params, pa) |
| | | pa.StartTime = utils.TimeToString(first.UpdatedAt) |
| | | pa.EndTime = first.DeliveryDate |
| | | params = append(params, &pa) |
| | | } |
| | | client := product.NewProductServiceClient(productServiceConn) |
| | | info, err := client.GetProductOrder(ctx.GetCtx(), &product.GetProductOrderRequest{Params: params}) |
| | |
| | | // @Tags SalesDetails |
| | | // @Summary 更新销售明细状态 |
| | | // @Produce application/json |
| | | // @Param object body request.UpdateSalesDetails true "查询参数" |
| | | // @Param object body request.UpdateSalesDetailsStatus true "查询参数" |
| | | // @Success 200 {object} contextx.Response{} |
| | | // @Router /api/salesDetails/update [post] |
| | | // @Router /api/salesDetails/updateStatus [post] |
| | | func (s *SalesDetailsApi) UpdateStatus(c *gin.Context) { |
| | | var params request.UpdateSalesDetails |
| | | var params request.UpdateSalesDetailsStatus |
| | | ctx, ok := contextx.NewContext(c, ¶ms) |
| | | if !ok { |
| | | return |
| | | } |
| | | |
| | | m := make(map[string]interface{}) |
| | | m["status"] = params.SalesDetails.Status |
| | | m["status"] = params.Status |
| | | err := model.NewSalesDetailsSearch().SetId(params.Id).UpdateByMap(m) |
| | | if err != nil { |
| | | ctx.FailWithMsg(ecode.UnknownErr, "更新失败") |
| | |
| | | if !ok { |
| | | return |
| | | } |
| | | m := make(map[string]interface{}) |
| | | m["status"] = params.Status |
| | | err := model.NewSalesDetailsSearch().SetNumber(params.Number).UpdateByMap(m) |
| | | if err != nil { |
| | | ctx.FailWithMsg(ecode.UnknownErr, "状态更新失败") |
| | | return |
| | | } |
| | | |
| | | client := product_inventory.NewProductInventoryServiceClient(ProductInventoryServiceConn) |
| | | products := make([]*product_inventory.InventoryProduct, 0) |
| | |
| | | p.Amount = product.Amount.String() |
| | | products = append(products, &p) |
| | | } |
| | | _, err := client.CreateOperation(ctx.GetCtx(), &product_inventory.CreateOperationRequest{ |
| | | _, err = client.CreateOperation(ctx.GetCtx(), &product_inventory.CreateOperationRequest{ |
| | | Number: params.Number, |
| | | Addressee: params.Addressee, |
| | | Address: params.Address, |
| | |
| | | "system": { |
| | | "env": "develop", |
| | | "port": 8002, |
| | | "grpcPort": "9092", |
| | | "UseMultipoint": false, |
| | | "UseRedis": false, |
| | | "LimitCountIP": 15000, |
| | |
| | | System struct { |
| | | Env string // 环境值 develop test public |
| | | Port int // 端口 |
| | | GrpcPort string //grpc端口 |
| | | DbType string // 数据库类型 |
| | | UseMultipoint bool // 多点登录拦截 |
| | | UseRedis bool // 使用redis |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/api/product/getProductOrderInfo/{number}": { |
| | | "get": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "产品" |
| | | ], |
| | | "summary": "获取产品订单信息", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "明细编码", |
| | | "name": "number", |
| | | "in": "path", |
| | | "required": true |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/product.WorkOrderInfo" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api/product/info": { |
| | | "get": { |
| | | "produces": [ |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/api/salesDetails/createOperation": { |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "SalesDetails" |
| | | ], |
| | | "summary": "创建产品出库信息", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.SalesDetails" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "OK", |
| | | "schema": { |
| | | "$ref": "#/definitions/response.ListResponse" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api/salesDetails/delete": { |
| | | "delete": { |
| | | "produces": [ |
| | |
| | | "description": "OK", |
| | | "schema": { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api/salesDetails/getProductInventoryInfo/{number}": { |
| | | "get": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "SalesDetails" |
| | | ], |
| | | "summary": "获取产品库存信息", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "明细编码", |
| | | "name": "number", |
| | | "in": "path", |
| | | "required": true |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "OK", |
| | | "schema": { |
| | | "$ref": "#/definitions/response.ListResponse" |
| | | } |
| | | } |
| | | } |
| | |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.UpdateSalesDetails" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "OK", |
| | | "schema": { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api/salesDetails/updateStatus": { |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "SalesDetails" |
| | | ], |
| | | "summary": "更新销售明细状态", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.UpdateSalesDetailsStatus" |
| | | } |
| | | } |
| | | ], |
| | |
| | | "SalesDetailsKeywordTypeProductName" |
| | | ] |
| | | }, |
| | | "constvar.SalesDetailsStatus": { |
| | | "type": "integer", |
| | | "enum": [ |
| | | 1, |
| | | 2, |
| | | 3, |
| | | 4 |
| | | ], |
| | | "x-enum-comments": { |
| | | "OverCLose": "已关闭", |
| | | "OverOutbound": "出库完成", |
| | | "WaitConfirmed": "待确认", |
| | | "WaitOutbound": "待出库" |
| | | }, |
| | | "x-enum-varnames": [ |
| | | "WaitConfirmed", |
| | | "WaitOutbound", |
| | | "OverOutbound", |
| | | "OverCLose" |
| | | ] |
| | | }, |
| | | "constvar.SalesRefundKeywordType": { |
| | | "type": "string", |
| | | "enum": [ |
| | |
| | | "signTime": { |
| | | "type": "string" |
| | | }, |
| | | "source": { |
| | | "type": "string" |
| | | }, |
| | | "status": { |
| | | "$ref": "#/definitions/constvar.SalesDetailsStatus" |
| | | }, |
| | | "updateTime": { |
| | | "type": "string" |
| | | }, |
| | |
| | | "type": "string" |
| | | }, |
| | | "Unit": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "product.WorkOrderInfo": { |
| | | "type": "object", |
| | | "properties": { |
| | | "EndTime": { |
| | | "type": "string" |
| | | }, |
| | | "OrderId": { |
| | | "type": "string" |
| | | }, |
| | | "OrderStatus": { |
| | | "type": "string" |
| | | }, |
| | | "ProductName": { |
| | | "type": "string" |
| | | }, |
| | | "StartTime": { |
| | | "type": "string" |
| | | }, |
| | | "WorkOrderId": { |
| | | "type": "string" |
| | | }, |
| | | "WorkOrderStatus": { |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | }, |
| | | "signTime": { |
| | | "type": "string" |
| | | }, |
| | | "source": { |
| | | "type": "string" |
| | | }, |
| | | "status": { |
| | | "$ref": "#/definitions/constvar.SalesDetailsStatus" |
| | | }, |
| | | "wechatOrderStatusId": { |
| | | "type": "integer" |
| | |
| | | "$ref": "#/definitions/constvar.SalesDetailsKeywordType" |
| | | }, |
| | | "number": { |
| | | "description": "销售子单号", |
| | | "description": "销售明细单号", |
| | | "type": "string" |
| | | }, |
| | | "page": { |
| | |
| | | }, |
| | | "signTime": { |
| | | "type": "string" |
| | | }, |
| | | "source": { |
| | | "type": "string" |
| | | }, |
| | | "status": { |
| | | "$ref": "#/definitions/constvar.SalesDetailsStatus" |
| | | }, |
| | | "wechatOrderStatusId": { |
| | | "type": "integer" |
| | |
| | | } |
| | | } |
| | | }, |
| | | "request.UpdateSalesDetailsStatus": { |
| | | "type": "object", |
| | | "properties": { |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "status": { |
| | | "$ref": "#/definitions/constvar.SalesDetailsStatus" |
| | | } |
| | | } |
| | | }, |
| | | "request.UpdateSalesLeads": { |
| | | "type": "object", |
| | | "properties": { |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/api/product/getProductOrderInfo/{number}": { |
| | | "get": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "产品" |
| | | ], |
| | | "summary": "获取产品订单信息", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "明细编码", |
| | | "name": "number", |
| | | "in": "path", |
| | | "required": true |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/product.WorkOrderInfo" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api/product/info": { |
| | | "get": { |
| | | "produces": [ |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/api/salesDetails/createOperation": { |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "SalesDetails" |
| | | ], |
| | | "summary": "创建产品出库信息", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.SalesDetails" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "OK", |
| | | "schema": { |
| | | "$ref": "#/definitions/response.ListResponse" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api/salesDetails/delete": { |
| | | "delete": { |
| | | "produces": [ |
| | |
| | | "description": "OK", |
| | | "schema": { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api/salesDetails/getProductInventoryInfo/{number}": { |
| | | "get": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "SalesDetails" |
| | | ], |
| | | "summary": "获取产品库存信息", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "明细编码", |
| | | "name": "number", |
| | | "in": "path", |
| | | "required": true |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "OK", |
| | | "schema": { |
| | | "$ref": "#/definitions/response.ListResponse" |
| | | } |
| | | } |
| | | } |
| | |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.UpdateSalesDetails" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "OK", |
| | | "schema": { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api/salesDetails/updateStatus": { |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "SalesDetails" |
| | | ], |
| | | "summary": "更新销售明细状态", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.UpdateSalesDetailsStatus" |
| | | } |
| | | } |
| | | ], |
| | |
| | | "SalesDetailsKeywordTypeProductName" |
| | | ] |
| | | }, |
| | | "constvar.SalesDetailsStatus": { |
| | | "type": "integer", |
| | | "enum": [ |
| | | 1, |
| | | 2, |
| | | 3, |
| | | 4 |
| | | ], |
| | | "x-enum-comments": { |
| | | "OverCLose": "已关闭", |
| | | "OverOutbound": "出库完成", |
| | | "WaitConfirmed": "待确认", |
| | | "WaitOutbound": "待出库" |
| | | }, |
| | | "x-enum-varnames": [ |
| | | "WaitConfirmed", |
| | | "WaitOutbound", |
| | | "OverOutbound", |
| | | "OverCLose" |
| | | ] |
| | | }, |
| | | "constvar.SalesRefundKeywordType": { |
| | | "type": "string", |
| | | "enum": [ |
| | |
| | | "signTime": { |
| | | "type": "string" |
| | | }, |
| | | "source": { |
| | | "type": "string" |
| | | }, |
| | | "status": { |
| | | "$ref": "#/definitions/constvar.SalesDetailsStatus" |
| | | }, |
| | | "updateTime": { |
| | | "type": "string" |
| | | }, |
| | |
| | | "type": "string" |
| | | }, |
| | | "Unit": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "product.WorkOrderInfo": { |
| | | "type": "object", |
| | | "properties": { |
| | | "EndTime": { |
| | | "type": "string" |
| | | }, |
| | | "OrderId": { |
| | | "type": "string" |
| | | }, |
| | | "OrderStatus": { |
| | | "type": "string" |
| | | }, |
| | | "ProductName": { |
| | | "type": "string" |
| | | }, |
| | | "StartTime": { |
| | | "type": "string" |
| | | }, |
| | | "WorkOrderId": { |
| | | "type": "string" |
| | | }, |
| | | "WorkOrderStatus": { |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | }, |
| | | "signTime": { |
| | | "type": "string" |
| | | }, |
| | | "source": { |
| | | "type": "string" |
| | | }, |
| | | "status": { |
| | | "$ref": "#/definitions/constvar.SalesDetailsStatus" |
| | | }, |
| | | "wechatOrderStatusId": { |
| | | "type": "integer" |
| | |
| | | "$ref": "#/definitions/constvar.SalesDetailsKeywordType" |
| | | }, |
| | | "number": { |
| | | "description": "销售子单号", |
| | | "description": "销售明细单号", |
| | | "type": "string" |
| | | }, |
| | | "page": { |
| | |
| | | }, |
| | | "signTime": { |
| | | "type": "string" |
| | | }, |
| | | "source": { |
| | | "type": "string" |
| | | }, |
| | | "status": { |
| | | "$ref": "#/definitions/constvar.SalesDetailsStatus" |
| | | }, |
| | | "wechatOrderStatusId": { |
| | | "type": "integer" |
| | |
| | | } |
| | | } |
| | | }, |
| | | "request.UpdateSalesDetailsStatus": { |
| | | "type": "object", |
| | | "properties": { |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "status": { |
| | | "$ref": "#/definitions/constvar.SalesDetailsStatus" |
| | | } |
| | | } |
| | | }, |
| | | "request.UpdateSalesLeads": { |
| | | "type": "object", |
| | | "properties": { |
| | |
| | | - SalesDetailsKeywordTypeSignTime |
| | | - SalesDetailsKeywordTypePrincipal |
| | | - SalesDetailsKeywordTypeProductName |
| | | constvar.SalesDetailsStatus: |
| | | enum: |
| | | - 1 |
| | | - 2 |
| | | - 3 |
| | | - 4 |
| | | type: integer |
| | | x-enum-comments: |
| | | OverCLose: 已关闭 |
| | | OverOutbound: 出库完成 |
| | | WaitConfirmed: 待确认 |
| | | WaitOutbound: 待出库 |
| | | x-enum-varnames: |
| | | - WaitConfirmed |
| | | - WaitOutbound |
| | | - OverOutbound |
| | | - OverCLose |
| | | constvar.SalesRefundKeywordType: |
| | | enum: |
| | | - 销售退货单编号 |
| | |
| | | type: integer |
| | | signTime: |
| | | type: string |
| | | source: |
| | | type: string |
| | | status: |
| | | $ref: '#/definitions/constvar.SalesDetailsStatus' |
| | | updateTime: |
| | | type: string |
| | | wechatOrderStatus: |
| | |
| | | description: 型号 |
| | | type: string |
| | | Unit: |
| | | type: string |
| | | type: object |
| | | product.WorkOrderInfo: |
| | | properties: |
| | | EndTime: |
| | | type: string |
| | | OrderId: |
| | | type: string |
| | | OrderStatus: |
| | | type: string |
| | | ProductName: |
| | | type: string |
| | | StartTime: |
| | | type: string |
| | | WorkOrderId: |
| | | type: string |
| | | WorkOrderStatus: |
| | | type: string |
| | | type: object |
| | | request.AddAccountId: |
| | |
| | | type: integer |
| | | signTime: |
| | | type: string |
| | | source: |
| | | type: string |
| | | status: |
| | | $ref: '#/definitions/constvar.SalesDetailsStatus' |
| | | wechatOrderStatusId: |
| | | type: integer |
| | | type: object |
| | |
| | | keywordType: |
| | | $ref: '#/definitions/constvar.SalesDetailsKeywordType' |
| | | number: |
| | | description: 销售子单号 |
| | | description: 销售明细单号 |
| | | type: string |
| | | page: |
| | | description: 页码 |
| | |
| | | type: integer |
| | | signTime: |
| | | type: string |
| | | source: |
| | | type: string |
| | | status: |
| | | $ref: '#/definitions/constvar.SalesDetailsStatus' |
| | | wechatOrderStatusId: |
| | | type: integer |
| | | type: object |
| | |
| | | type: integer |
| | | salesDetails: |
| | | $ref: '#/definitions/request.SalesDetails' |
| | | type: object |
| | | request.UpdateSalesDetailsStatus: |
| | | properties: |
| | | id: |
| | | type: integer |
| | | status: |
| | | $ref: '#/definitions/constvar.SalesDetailsStatus' |
| | | type: object |
| | | request.UpdateSalesLeads: |
| | | properties: |
| | |
| | | summary: 更新优先级别 |
| | | tags: |
| | | - 优先级别管理 |
| | | /api/product/getProductOrderInfo/{number}: |
| | | get: |
| | | parameters: |
| | | - description: 明细编码 |
| | | in: path |
| | | name: number |
| | | required: true |
| | | type: string |
| | | produces: |
| | | - application/json |
| | | responses: |
| | | "200": |
| | | description: 成功 |
| | | schema: |
| | | allOf: |
| | | - $ref: '#/definitions/contextx.Response' |
| | | - properties: |
| | | data: |
| | | items: |
| | | $ref: '#/definitions/product.WorkOrderInfo' |
| | | type: array |
| | | type: object |
| | | summary: 获取产品订单信息 |
| | | tags: |
| | | - 产品 |
| | | /api/product/info: |
| | | get: |
| | | parameters: |
| | |
| | | summary: 添加销售明细 |
| | | tags: |
| | | - SalesDetails |
| | | /api/salesDetails/createOperation: |
| | | post: |
| | | parameters: |
| | | - description: 查询参数 |
| | | in: body |
| | | name: object |
| | | required: true |
| | | schema: |
| | | $ref: '#/definitions/request.SalesDetails' |
| | | produces: |
| | | - application/json |
| | | responses: |
| | | "200": |
| | | description: OK |
| | | schema: |
| | | $ref: '#/definitions/response.ListResponse' |
| | | summary: 创建产品出库信息 |
| | | tags: |
| | | - SalesDetails |
| | | /api/salesDetails/delete: |
| | | delete: |
| | | parameters: |
| | |
| | | schema: |
| | | $ref: '#/definitions/contextx.Response' |
| | | summary: 删除销售明细 |
| | | tags: |
| | | - SalesDetails |
| | | /api/salesDetails/getProductInventoryInfo/{number}: |
| | | get: |
| | | parameters: |
| | | - description: 明细编码 |
| | | in: path |
| | | name: number |
| | | required: true |
| | | type: string |
| | | produces: |
| | | - application/json |
| | | responses: |
| | | "200": |
| | | description: OK |
| | | schema: |
| | | $ref: '#/definitions/response.ListResponse' |
| | | summary: 获取产品库存信息 |
| | | tags: |
| | | - SalesDetails |
| | | /api/salesDetails/list: |
| | |
| | | summary: 更新销售明细 |
| | | tags: |
| | | - SalesDetails |
| | | /api/salesDetails/updateStatus: |
| | | post: |
| | | parameters: |
| | | - description: 查询参数 |
| | | in: body |
| | | name: object |
| | | required: true |
| | | schema: |
| | | $ref: '#/definitions/request.UpdateSalesDetailsStatus' |
| | | produces: |
| | | - application/json |
| | | responses: |
| | | "200": |
| | | description: OK |
| | | schema: |
| | | $ref: '#/definitions/contextx.Response' |
| | | summary: 更新销售明细状态 |
| | | tags: |
| | | - SalesDetails |
| | | /api/salesLeads/add: |
| | | post: |
| | | parameters: |
| | |
| | | "aps_crm/middleware" |
| | | "aps_crm/model" |
| | | "aps_crm/pkg/logx" |
| | | "aps_crm/proto/product_inventory" |
| | | "aps_crm/router" |
| | | "fmt" |
| | | "google.golang.org/grpc" |
| | | "net" |
| | | "net/http" |
| | | "os" |
| | | "os/signal" |
| | |
| | | WriteTimeout: 5 * time.Second, |
| | | } |
| | | |
| | | //启动grpc客户端 |
| | | go v1.InitProductServiceConn() |
| | | go middleware.InitUserConn() |
| | | go v1.InitCodeServiceConn() |
| | | go v1.InitProductInventoryServiceConn() |
| | | |
| | | //启动grpc服务 |
| | | go func() { |
| | | ln, err := net.Listen("tcp", ":"+conf.Conf.System.GrpcPort) |
| | | if err != nil { |
| | | logx.Errorf("grpc server init error: %v", err.Error()) |
| | | panic(fmt.Sprintf("grpc server init error: %v", err.Error())) |
| | | } |
| | | s := grpc.NewServer() |
| | | //todo 添加具体服务 |
| | | product_inventory.RegisterProductInventoryServiceServer(s, &product_inventory.Server{}) |
| | | err = s.Serve(ln) |
| | | if err != nil { |
| | | logx.Errorf("grpc server init error: %v", err.Error()) |
| | | panic(fmt.Sprintf("grpc server init error: %v", err.Error())) |
| | | } |
| | | }() |
| | | //c := cron.New() |
| | | //c.AddFunc("@every 15s", service.SyncUserInfo) // 每15秒同步一次 |
| | | //c.Start() |
| | |
| | | SalesDetails SalesDetails `json:"salesDetails"` |
| | | } |
| | | |
| | | type UpdateSalesDetailsStatus struct { |
| | | Id int `json:"id"` |
| | | Status constvar.SalesDetailsStatus `json:"status" gorm:"column:status;type:int;comment:状态"` |
| | | } |
| | | |
| | | type GetSalesDetailsList struct { |
| | | PageInfo |
| | | KeywordType constvar.SalesDetailsKeywordType `json:"keywordType"` |
| | |
| | | |
| | | message Info { |
| | | string ProductId = 1; |
| | | string Time = 2; |
| | | string StartTime = 2; |
| | | string EndTime = 3; |
| | | } |
| | | |
| | | message GetProductOrderRequest { |
| | |
| | | unknownFields protoimpl.UnknownFields |
| | | |
| | | ProductId string `protobuf:"bytes,1,opt,name=ProductId,proto3" json:"ProductId,omitempty"` |
| | | Time string `protobuf:"bytes,2,opt,name=Time,proto3" json:"Time,omitempty"` |
| | | StartTime string `protobuf:"bytes,2,opt,name=StartTime,proto3" json:"StartTime,omitempty"` |
| | | EndTime string `protobuf:"bytes,3,opt,name=EndTime,proto3" json:"EndTime,omitempty"` |
| | | } |
| | | |
| | | func (x *Info) Reset() { |
| | |
| | | return "" |
| | | } |
| | | |
| | | func (x *Info) GetTime() string { |
| | | func (x *Info) GetStartTime() string { |
| | | if x != nil { |
| | | return x.Time |
| | | return x.StartTime |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | func (x *Info) GetEndTime() string { |
| | | if x != nil { |
| | | return x.EndTime |
| | | } |
| | | return "" |
| | | } |
| | |
| | | 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x50, |
| | | 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, |
| | | 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x54, 0x6f, 0x74, |
| | | 0x61, 0x6c, 0x22, 0x38, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x72, |
| | | 0x61, 0x6c, 0x22, 0x5c, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x72, |
| | | 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x50, |
| | | 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, |
| | | 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x37, 0x0a, 0x16, |
| | | 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, |
| | | 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, |
| | | 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x50, |
| | | 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xf1, 0x01, 0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6b, 0x4f, 0x72, |
| | | 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, |
| | | 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, |
| | | 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, |
| | | 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, |
| | | 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, |
| | | 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, |
| | | 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x57, 0x6f, 0x72, 0x6b, 0x4f, 0x72, 0x64, |
| | | 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x57, 0x6f, 0x72, 0x6b, |
| | | 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x4f, |
| | | 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, |
| | | 0x52, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, |
| | | 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, |
| | | 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, |
| | | 0x18, 0x0a, 0x07, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, |
| | | 0x52, 0x07, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x63, 0x0a, 0x17, 0x47, 0x65, 0x74, |
| | | 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, |
| | | 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, |
| | | 0x28, 0x05, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, |
| | | 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x22, 0x0a, 0x04, 0x4c, 0x69, |
| | | 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x4f, |
| | | 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x32, 0xe2, |
| | | 0x01, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, |
| | | 0x65, 0x12, 0x43, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, |
| | | 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, |
| | | 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x47, 0x65, |
| | | 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, |
| | | 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, |
| | | 0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, |
| | | 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, |
| | | 0x1a, 0x17, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, |
| | | 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0f, 0x47, |
| | | 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x17, |
| | | 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, |
| | | 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, |
| | | 0x64, 0x75, 0x63, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, |
| | | 0x65, 0x22, 0x00, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, |
| | | 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
| | | 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x72, |
| | | 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x74, 0x61, |
| | | 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, |
| | | 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, |
| | | 0x22, 0x37, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4f, 0x72, |
| | | 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x06, 0x50, 0x61, |
| | | 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x49, 0x6e, 0x66, |
| | | 0x6f, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xf1, 0x01, 0x0a, 0x0d, 0x57, 0x6f, |
| | | 0x72, 0x6b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x4f, |
| | | 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4f, 0x72, |
| | | 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, |
| | | 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x50, 0x72, 0x6f, 0x64, |
| | | 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, |
| | | 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x72, |
| | | 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x57, 0x6f, 0x72, |
| | | 0x6b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, |
| | | 0x57, 0x6f, 0x72, 0x6b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x57, |
| | | 0x6f, 0x72, 0x6b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, |
| | | 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, |
| | | 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, |
| | | 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, |
| | | 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, |
| | | 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x63, 0x0a, |
| | | 0x17, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, |
| | | 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, |
| | | 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, |
| | | 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x22, |
| | | 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x57, |
| | | 0x6f, 0x72, 0x6b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x4c, 0x69, |
| | | 0x73, 0x74, 0x32, 0xe2, 0x01, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x65, |
| | | 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, |
| | | 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, |
| | | 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, |
| | | 0x17, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, |
| | | 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0e, 0x47, 0x65, |
| | | 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x47, |
| | | 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, |
| | | 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, |
| | | 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, |
| | | 0x46, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4f, 0x72, 0x64, |
| | | 0x65, 0x72, 0x12, 0x17, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4f, |
| | | 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x47, 0x65, |
| | | 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, |
| | | 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x70, 0x72, 0x6f, |
| | | 0x64, 0x75, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
| | | } |
| | | |
| | | var ( |
| | |
| | | service productInventoryService { |
| | | rpc CreateOperation(CreateOperationRequest) returns(CreateOperationResponse) {} |
| | | rpc GetInventoryProductInfo(GetInventoryProductInfoRequest) returns (GetInventoryProductInfoResponse) {} |
| | | rpc UpdateSalesDetailStatus(UpdateSalesDetailStatusRequest) returns (UpdateSalesDetailStatusResponse) {} |
| | | } |
| | | |
| | | message CreateOperationRequest{ |
| | |
| | | int32 Code = 1; |
| | | string Msg = 2; |
| | | repeated ProductInfo ProductList = 3; |
| | | } |
| | | |
| | | //------------------------------------------------------------ |
| | | |
| | | message UpdateSalesDetailStatusRequest { |
| | | string Number = 1;//明细单编码 |
| | | string SalesDetailStatus = 2; |
| | | } |
| | | |
| | | message UpdateSalesDetailStatusResponse{ |
| | | int32 Code = 1; |
| | | string Msg = 2; |
| | | } |
| | |
| | | return nil |
| | | } |
| | | |
| | | type UpdateSalesDetailStatusRequest struct { |
| | | state protoimpl.MessageState |
| | | sizeCache protoimpl.SizeCache |
| | | unknownFields protoimpl.UnknownFields |
| | | |
| | | Number string `protobuf:"bytes,1,opt,name=Number,proto3" json:"Number,omitempty"` //明细单编码 |
| | | SalesDetailStatus string `protobuf:"bytes,2,opt,name=SalesDetailStatus,proto3" json:"SalesDetailStatus,omitempty"` |
| | | } |
| | | |
| | | func (x *UpdateSalesDetailStatusRequest) Reset() { |
| | | *x = UpdateSalesDetailStatusRequest{} |
| | | if protoimpl.UnsafeEnabled { |
| | | mi := &file_product_inventory_proto_msgTypes[6] |
| | | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| | | ms.StoreMessageInfo(mi) |
| | | } |
| | | } |
| | | |
| | | func (x *UpdateSalesDetailStatusRequest) String() string { |
| | | return protoimpl.X.MessageStringOf(x) |
| | | } |
| | | |
| | | func (*UpdateSalesDetailStatusRequest) ProtoMessage() {} |
| | | |
| | | func (x *UpdateSalesDetailStatusRequest) ProtoReflect() protoreflect.Message { |
| | | mi := &file_product_inventory_proto_msgTypes[6] |
| | | if protoimpl.UnsafeEnabled && x != nil { |
| | | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| | | if ms.LoadMessageInfo() == nil { |
| | | ms.StoreMessageInfo(mi) |
| | | } |
| | | return ms |
| | | } |
| | | return mi.MessageOf(x) |
| | | } |
| | | |
| | | // Deprecated: Use UpdateSalesDetailStatusRequest.ProtoReflect.Descriptor instead. |
| | | func (*UpdateSalesDetailStatusRequest) Descriptor() ([]byte, []int) { |
| | | return file_product_inventory_proto_rawDescGZIP(), []int{6} |
| | | } |
| | | |
| | | func (x *UpdateSalesDetailStatusRequest) GetNumber() string { |
| | | if x != nil { |
| | | return x.Number |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | func (x *UpdateSalesDetailStatusRequest) GetSalesDetailStatus() string { |
| | | if x != nil { |
| | | return x.SalesDetailStatus |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | type UpdateSalesDetailStatusResponse struct { |
| | | state protoimpl.MessageState |
| | | sizeCache protoimpl.SizeCache |
| | | unknownFields protoimpl.UnknownFields |
| | | |
| | | Code int32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` |
| | | Msg string `protobuf:"bytes,2,opt,name=Msg,proto3" json:"Msg,omitempty"` |
| | | } |
| | | |
| | | func (x *UpdateSalesDetailStatusResponse) Reset() { |
| | | *x = UpdateSalesDetailStatusResponse{} |
| | | if protoimpl.UnsafeEnabled { |
| | | mi := &file_product_inventory_proto_msgTypes[7] |
| | | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| | | ms.StoreMessageInfo(mi) |
| | | } |
| | | } |
| | | |
| | | func (x *UpdateSalesDetailStatusResponse) String() string { |
| | | return protoimpl.X.MessageStringOf(x) |
| | | } |
| | | |
| | | func (*UpdateSalesDetailStatusResponse) ProtoMessage() {} |
| | | |
| | | func (x *UpdateSalesDetailStatusResponse) ProtoReflect() protoreflect.Message { |
| | | mi := &file_product_inventory_proto_msgTypes[7] |
| | | if protoimpl.UnsafeEnabled && x != nil { |
| | | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| | | if ms.LoadMessageInfo() == nil { |
| | | ms.StoreMessageInfo(mi) |
| | | } |
| | | return ms |
| | | } |
| | | return mi.MessageOf(x) |
| | | } |
| | | |
| | | // Deprecated: Use UpdateSalesDetailStatusResponse.ProtoReflect.Descriptor instead. |
| | | func (*UpdateSalesDetailStatusResponse) Descriptor() ([]byte, []int) { |
| | | return file_product_inventory_proto_rawDescGZIP(), []int{7} |
| | | } |
| | | |
| | | func (x *UpdateSalesDetailStatusResponse) GetCode() int32 { |
| | | if x != nil { |
| | | return x.Code |
| | | } |
| | | return 0 |
| | | } |
| | | |
| | | func (x *UpdateSalesDetailStatusResponse) GetMsg() string { |
| | | if x != nil { |
| | | return x.Msg |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | var File_product_inventory_proto protoreflect.FileDescriptor |
| | | |
| | | var file_product_inventory_proto_rawDesc = []byte{ |
| | |
| | | 0x67, 0x12, 0x2e, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, |
| | | 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, |
| | | 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, |
| | | 0x74, 0x32, 0xc1, 0x01, 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x76, |
| | | 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x46, 0x0a, |
| | | 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, |
| | | 0x12, 0x17, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, |
| | | 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x43, 0x72, 0x65, 0x61, |
| | | 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, |
| | | 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x76, 0x65, |
| | | 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, |
| | | 0x12, 0x1f, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x50, |
| | | 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, |
| | | 0x74, 0x1a, 0x20, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, |
| | | 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, |
| | | 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x15, 0x5a, 0x13, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, |
| | | 0x63, 0x74, 0x5f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, |
| | | 0x6f, 0x74, 0x6f, 0x33, |
| | | 0x74, 0x22, 0x66, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73, |
| | | 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, |
| | | 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, |
| | | 0x01, 0x28, 0x09, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x11, 0x53, |
| | | 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, |
| | | 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, |
| | | 0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x47, 0x0a, 0x1f, 0x55, 0x70, 0x64, |
| | | 0x61, 0x74, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x74, |
| | | 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, |
| | | 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, |
| | | 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, |
| | | 0x73, 0x67, 0x32, 0xa1, 0x02, 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, |
| | | 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x46, |
| | | 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, |
| | | 0x6e, 0x12, 0x17, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, |
| | | 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x43, 0x72, 0x65, |
| | | 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, |
| | | 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x76, |
| | | 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, |
| | | 0x6f, 0x12, 0x1f, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, |
| | | 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, |
| | | 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, |
| | | 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, |
| | | 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, |
| | | 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, |
| | | 0x73, 0x12, 0x1f, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, |
| | | 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, |
| | | 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73, |
| | | 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, |
| | | 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x15, 0x5a, 0x13, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x64, |
| | | 0x75, 0x63, 0x74, 0x5f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x62, 0x06, 0x70, |
| | | 0x72, 0x6f, 0x74, 0x6f, 0x33, |
| | | } |
| | | |
| | | var ( |
| | |
| | | return file_product_inventory_proto_rawDescData |
| | | } |
| | | |
| | | var file_product_inventory_proto_msgTypes = make([]protoimpl.MessageInfo, 6) |
| | | var file_product_inventory_proto_msgTypes = make([]protoimpl.MessageInfo, 8) |
| | | var file_product_inventory_proto_goTypes = []interface{}{ |
| | | (*CreateOperationRequest)(nil), // 0: CreateOperationRequest |
| | | (*InventoryProduct)(nil), // 1: InventoryProduct |
| | |
| | | (*GetInventoryProductInfoRequest)(nil), // 3: GetInventoryProductInfoRequest |
| | | (*ProductInfo)(nil), // 4: ProductInfo |
| | | (*GetInventoryProductInfoResponse)(nil), // 5: GetInventoryProductInfoResponse |
| | | (*UpdateSalesDetailStatusRequest)(nil), // 6: UpdateSalesDetailStatusRequest |
| | | (*UpdateSalesDetailStatusResponse)(nil), // 7: UpdateSalesDetailStatusResponse |
| | | } |
| | | var file_product_inventory_proto_depIdxs = []int32{ |
| | | 1, // 0: CreateOperationRequest.ProductList:type_name -> InventoryProduct |
| | | 4, // 1: GetInventoryProductInfoResponse.ProductList:type_name -> ProductInfo |
| | | 0, // 2: productInventoryService.CreateOperation:input_type -> CreateOperationRequest |
| | | 3, // 3: productInventoryService.GetInventoryProductInfo:input_type -> GetInventoryProductInfoRequest |
| | | 2, // 4: productInventoryService.CreateOperation:output_type -> CreateOperationResponse |
| | | 5, // 5: productInventoryService.GetInventoryProductInfo:output_type -> GetInventoryProductInfoResponse |
| | | 4, // [4:6] is the sub-list for method output_type |
| | | 2, // [2:4] is the sub-list for method input_type |
| | | 6, // 4: productInventoryService.UpdateSalesDetailStatus:input_type -> UpdateSalesDetailStatusRequest |
| | | 2, // 5: productInventoryService.CreateOperation:output_type -> CreateOperationResponse |
| | | 5, // 6: productInventoryService.GetInventoryProductInfo:output_type -> GetInventoryProductInfoResponse |
| | | 7, // 7: productInventoryService.UpdateSalesDetailStatus:output_type -> UpdateSalesDetailStatusResponse |
| | | 5, // [5:8] is the sub-list for method output_type |
| | | 2, // [2:5] is the sub-list for method input_type |
| | | 2, // [2:2] is the sub-list for extension type_name |
| | | 2, // [2:2] is the sub-list for extension extendee |
| | | 0, // [0:2] is the sub-list for field type_name |
| | |
| | | return nil |
| | | } |
| | | } |
| | | file_product_inventory_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { |
| | | switch v := v.(*UpdateSalesDetailStatusRequest); i { |
| | | case 0: |
| | | return &v.state |
| | | case 1: |
| | | return &v.sizeCache |
| | | case 2: |
| | | return &v.unknownFields |
| | | default: |
| | | return nil |
| | | } |
| | | } |
| | | file_product_inventory_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { |
| | | switch v := v.(*UpdateSalesDetailStatusResponse); i { |
| | | case 0: |
| | | return &v.state |
| | | case 1: |
| | | return &v.sizeCache |
| | | case 2: |
| | | return &v.unknownFields |
| | | default: |
| | | return nil |
| | | } |
| | | } |
| | | } |
| | | type x struct{} |
| | | out := protoimpl.TypeBuilder{ |
| | |
| | | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| | | RawDescriptor: file_product_inventory_proto_rawDesc, |
| | | NumEnums: 0, |
| | | NumMessages: 6, |
| | | NumMessages: 8, |
| | | NumExtensions: 0, |
| | | NumServices: 1, |
| | | }, |
| | |
| | | type ProductInventoryServiceClient interface { |
| | | CreateOperation(ctx context.Context, in *CreateOperationRequest, opts ...grpc.CallOption) (*CreateOperationResponse, error) |
| | | GetInventoryProductInfo(ctx context.Context, in *GetInventoryProductInfoRequest, opts ...grpc.CallOption) (*GetInventoryProductInfoResponse, error) |
| | | UpdateSalesDetailStatus(ctx context.Context, in *UpdateSalesDetailStatusRequest, opts ...grpc.CallOption) (*UpdateSalesDetailStatusResponse, error) |
| | | } |
| | | |
| | | type productInventoryServiceClient struct { |
| | |
| | | return out, nil |
| | | } |
| | | |
| | | func (c *productInventoryServiceClient) UpdateSalesDetailStatus(ctx context.Context, in *UpdateSalesDetailStatusRequest, opts ...grpc.CallOption) (*UpdateSalesDetailStatusResponse, error) { |
| | | out := new(UpdateSalesDetailStatusResponse) |
| | | err := c.cc.Invoke(ctx, "/productInventoryService/UpdateSalesDetailStatus", in, out, opts...) |
| | | if err != nil { |
| | | return nil, err |
| | | } |
| | | return out, nil |
| | | } |
| | | |
| | | // ProductInventoryServiceServer is the server API for ProductInventoryService service. |
| | | // All implementations must embed UnimplementedProductInventoryServiceServer |
| | | // for forward compatibility |
| | | type ProductInventoryServiceServer interface { |
| | | CreateOperation(context.Context, *CreateOperationRequest) (*CreateOperationResponse, error) |
| | | GetInventoryProductInfo(context.Context, *GetInventoryProductInfoRequest) (*GetInventoryProductInfoResponse, error) |
| | | UpdateSalesDetailStatus(context.Context, *UpdateSalesDetailStatusRequest) (*UpdateSalesDetailStatusResponse, error) |
| | | mustEmbedUnimplementedProductInventoryServiceServer() |
| | | } |
| | | |
| | |
| | | } |
| | | func (UnimplementedProductInventoryServiceServer) GetInventoryProductInfo(context.Context, *GetInventoryProductInfoRequest) (*GetInventoryProductInfoResponse, error) { |
| | | return nil, status.Errorf(codes.Unimplemented, "method GetInventoryProductInfo not implemented") |
| | | } |
| | | func (UnimplementedProductInventoryServiceServer) UpdateSalesDetailStatus(context.Context, *UpdateSalesDetailStatusRequest) (*UpdateSalesDetailStatusResponse, error) { |
| | | return nil, status.Errorf(codes.Unimplemented, "method UpdateSalesDetailStatus not implemented") |
| | | } |
| | | func (UnimplementedProductInventoryServiceServer) mustEmbedUnimplementedProductInventoryServiceServer() { |
| | | } |
| | |
| | | return interceptor(ctx, in, info, handler) |
| | | } |
| | | |
| | | func _ProductInventoryService_UpdateSalesDetailStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| | | in := new(UpdateSalesDetailStatusRequest) |
| | | if err := dec(in); err != nil { |
| | | return nil, err |
| | | } |
| | | if interceptor == nil { |
| | | return srv.(ProductInventoryServiceServer).UpdateSalesDetailStatus(ctx, in) |
| | | } |
| | | info := &grpc.UnaryServerInfo{ |
| | | Server: srv, |
| | | FullMethod: "/productInventoryService/UpdateSalesDetailStatus", |
| | | } |
| | | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| | | return srv.(ProductInventoryServiceServer).UpdateSalesDetailStatus(ctx, req.(*UpdateSalesDetailStatusRequest)) |
| | | } |
| | | return interceptor(ctx, in, info, handler) |
| | | } |
| | | |
| | | // ProductInventoryService_ServiceDesc is the grpc.ServiceDesc for ProductInventoryService service. |
| | | // It's only intended for direct use with grpc.RegisterService, |
| | | // and not to be introspected or modified (even as a copy) |
| | |
| | | MethodName: "GetInventoryProductInfo", |
| | | Handler: _ProductInventoryService_GetInventoryProductInfo_Handler, |
| | | }, |
| | | { |
| | | MethodName: "UpdateSalesDetailStatus", |
| | | Handler: _ProductInventoryService_UpdateSalesDetailStatus_Handler, |
| | | }, |
| | | }, |
| | | Streams: []grpc.StreamDesc{}, |
| | | Metadata: "product_inventory.proto", |
New file |
| | |
| | | package product_inventory |
| | | |
| | | import ( |
| | | "aps_crm/constvar" |
| | | "aps_crm/model" |
| | | "context" |
| | | "errors" |
| | | ) |
| | | |
| | | type Server struct { |
| | | UnimplementedProductInventoryServiceServer |
| | | } |
| | | |
| | | func (s *Server) UpdateSalesDetailStatus(ctx context.Context, req *UpdateSalesDetailStatusRequest) (*UpdateSalesDetailStatusResponse, error) { |
| | | if req.Number == "" { |
| | | return nil, errors.New("编码不能为空") |
| | | } |
| | | _, err := model.NewSalesDetailsSearch().SetNumber(req.Number).First() |
| | | if err != nil { |
| | | return nil, err |
| | | } |
| | | m := make(map[string]interface{}) |
| | | m["status"] = constvar.OverOutbound |
| | | err = model.NewSalesDetailsSearch().SetNumber(req.Number).UpdateByMap(m) |
| | | resp := new(UpdateSalesDetailStatusResponse) |
| | | return resp, err |
| | | } |
| | |
| | | productRouter := router.Group("product") |
| | | productApi := v1.ProductApi{} |
| | | { |
| | | productRouter.GET("info", productApi.Info) // 产品详情 |
| | | productRouter.GET("list", productApi.List) // 产品列表 |
| | | productRouter.GET("info", productApi.Info) // 产品详情 |
| | | productRouter.GET("list", productApi.List) // 产品列表 |
| | | productRouter.GET("getProductOrderInfo/:number", productApi.GetProductOrderInfo) // 获取产品订单信息 |
| | | } |
| | | } |
| | |
| | | salesDetailsRouter.DELETE("delete/:id", salesDetailsApi.Delete) // 删除销售明细 |
| | | salesDetailsRouter.DELETE("delete", salesDetailsApi.BatchDelete) // 批量删除销售明细 |
| | | salesDetailsRouter.PUT("update", salesDetailsApi.Update) // 更新销售明细 |
| | | salesDetailsRouter.POST("updateStatus", salesDetailsApi.UpdateStatus) // 更新销售明细状态 |
| | | salesDetailsRouter.POST("list", salesDetailsApi.List) // 获取销售明细单列表 |
| | | salesDetailsRouter.GET("getProductInventoryInfo/:number", salesDetailsApi.GetProductInventoryInfo) // 获取产品库存信息 |
| | | salesDetailsRouter.POST("createOperation", salesDetailsApi.CreateOperation) // 创建产品出库信息 |