WH01243 há 3 anos atrás
pai
commit
3bae4feee9

+ 2 - 0
api/internal/types/types.go

@@ -61,6 +61,8 @@ type Request struct {
 	PaybackCompany      string `form:"paybackCompany,optional"`
 	SalesPersonId       int64  `form:"salesperson_id,optional"`
 	CreatePerson        string `form:"create_person,optional"`
+	LastUpdatePerson    string `form:"last_update_person,optional"`
+	LastUpdateTime      string `form:"last_update_time,optional"`
 }
 
 type Response struct {

+ 2 - 0
api/jyOrder.api

@@ -68,6 +68,8 @@ type request {
 	PaybackCompany      string `form:"paybackCompany,optional"`
 	SalesPersonId       int64  `form:"salesperson_id,optional"`
 	CreatePerson        string `form:"create_person,optional"`
+	LastUpdatePerson    int64  `form:"last_update_person,optional"`
+	LastUpdateTime      string `form:"last_update_time,optional"`
 }
 
 type response {

+ 0 - 1
rpc/internal/config/config.go

@@ -11,7 +11,6 @@ type Config struct {
 	Node           int    // 节点
 	CalleeId       string // 服务名字
 	FileSystemConf zrpc.RpcClientConf
-	JySourserRpc   zrpc.RpcClientConf
 }
 
 var ConfigJson Config

+ 0 - 49
rpc/internal/logic/findorderinfologic.go

@@ -1,49 +0,0 @@
-package logic
-
-import (
-	"context"
-
-	"app.yhyue.com/moapp/jyOrder/rpc/internal/svc"
-	"app.yhyue.com/moapp/jyOrder/rpc/jyOrder"
-
-	"github.com/tal-tech/go-zero/core/logx"
-)
-
-type FindOrderInfoLogic struct {
-	ctx    context.Context
-	svcCtx *svc.ServiceContext
-	logx.Logger
-}
-
-func NewFindOrderInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *FindOrderInfoLogic {
-	return &FindOrderInfoLogic{
-		ctx:    ctx,
-		svcCtx: svcCtx,
-		Logger: logx.WithContext(ctx),
-	}
-}
-
-// 通过订单编号查询订单业务信息
-func (l *FindOrderInfoLogic) FindOrderInfo(in *jyOrder.QueryRequest) (*jyOrder.ResponseDetailed, error) {
-	// todo: add your logic here and delete this line
-
-	code, msg, data := orderService.FindOrderInfo(in)
-	requestDetailed := &jyOrder.RequestDetailed{
-		OrderCode:         data.Order_code,
-		ServiceStatus:     data.Service_status,
-		Filter:            data.Filter,
-		FilterKeys:        data.Filter_keys,
-		FilterPublishtime: data.Filter_publishtime,
-		DataCount:         data.Data_count,
-		FilterId:          data.Filter_id,
-		DownloadUrl:       data.Download_url,
-		ProductCode:       data.Product_code,
-		SpecsCode:         data.SpecsCode,
-	}
-	result := jyOrder.ResponseDetailed{
-		Code:    code,
-		Message: msg,
-		Data:    requestDetailed,
-	}
-	return &result, nil
-}

+ 3 - 1
rpc/jyOrder.proto

@@ -63,6 +63,8 @@ message Request {
   string  paybackCompany = 57;
   int64 salesperson_id = 58;
   string create_person = 59;
+  string last_update_person = 60;
+  string last_update_time = 61;
 }
 
 message Response {
@@ -83,7 +85,7 @@ service JyOrder {
   rpc CreateOrder(Request) returns(Response);
   //创建订单明细
   rpc CreateOrderDetailed(RequestDetailed) returns(Response);
-  //创建订单
+  //修改订单
   rpc UpdateOrder(Request) returns(Response);
 }
 

+ 48 - 26
rpc/jyOrder/jyOrder.pb.go

@@ -88,6 +88,8 @@ type Request struct {
 	PaybackCompany    string `protobuf:"bytes,57,opt,name=paybackCompany,proto3" json:"paybackCompany,omitempty"`
 	SalespersonId     int64  `protobuf:"varint,58,opt,name=salesperson_id,json=salespersonId,proto3" json:"salesperson_id,omitempty"`
 	CreatePerson      string `protobuf:"bytes,59,opt,name=create_person,json=createPerson,proto3" json:"create_person,omitempty"`
+	LastUpdatePerson  string `protobuf:"bytes,60,opt,name=last_update_person,json=lastUpdatePerson,proto3" json:"last_update_person,omitempty"`
+	LastUpdateTime    string `protobuf:"bytes,61,opt,name=last_update_time,json=lastUpdateTime,proto3" json:"last_update_time,omitempty"`
 }
 
 func (x *Request) Reset() {
@@ -535,6 +537,20 @@ func (x *Request) GetCreatePerson() string {
 	return ""
 }
 
+func (x *Request) GetLastUpdatePerson() string {
+	if x != nil {
+		return x.LastUpdatePerson
+	}
+	return ""
+}
+
+func (x *Request) GetLastUpdateTime() string {
+	if x != nil {
+		return x.LastUpdateTime
+	}
+	return ""
+}
+
 type Response struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -673,7 +689,7 @@ var File_jyOrder_proto protoreflect.FileDescriptor
 
 var file_jyOrder_proto_rawDesc = []byte{
 	0x0a, 0x0d, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
-	0x07, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x8b, 0x10, 0x0a, 0x07, 0x52, 0x65, 0x71,
+	0x07, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0xe3, 0x10, 0x0a, 0x07, 0x52, 0x65, 0x71,
 	0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x79, 0x5f, 0x6d, 0x6f, 0x6e, 0x65,
 	0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x79, 0x4d, 0x6f, 0x6e, 0x65,
 	0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x6e, 0x65, 0x79,
@@ -802,33 +818,39 @@ var file_jyOrder_proto_rawDesc = []byte{
 	0x28, 0x03, 0x52, 0x0d, 0x73, 0x61, 0x6c, 0x65, 0x73, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49,
 	0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x73,
 	0x6f, 0x6e, 0x18, 0x3b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
-	0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x22, 0x4c, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
-	0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
-	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
-	0x64, 0x61, 0x74, 0x61, 0x22, 0x86, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
-	0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65,
-	0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65,
-	0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
-	0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69,
-	0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
-	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
-	0x12, 0x1b, 0x0a, 0x09, 0x73, 0x61, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x61, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x32, 0xb5, 0x01,
-	0x0a, 0x07, 0x4a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x0b, 0x43, 0x72, 0x65,
-	0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x6a, 0x79, 0x4f, 0x72, 0x64,
-	0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6a, 0x79, 0x4f,
-	0x72, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a,
-	0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61,
-	0x69, 0x6c, 0x65, 0x64, 0x12, 0x18, 0x2e, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x52,
-	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x1a, 0x11,
-	0x2e, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
-	0x65, 0x12, 0x32, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72,
+	0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75,
+	0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x18, 0x3c, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65,
+	0x72, 0x73, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64,
+	0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x3d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e,
+	0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x4c,
+	0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f,
+	0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18,
+	0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x86, 0x01, 0x0a,
+	0x0f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64,
+	0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72,
+	0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x0a, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08,
+	0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
+	0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x61, 0x6c, 0x65,
+	0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x61, 0x6c,
+	0x65, 0x54, 0x69, 0x6d, 0x65, 0x32, 0xb5, 0x01, 0x0a, 0x07, 0x4a, 0x79, 0x4f, 0x72, 0x64, 0x65,
+	0x72, 0x12, 0x32, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72,
 	0x12, 0x10, 0x2e, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65,
 	0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73,
-	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0a, 0x5a, 0x08, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72,
-	0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f,
+	0x72, 0x64, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x18, 0x2e, 0x6a,
+	0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x65,
+	0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x1a, 0x11, 0x2e, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72,
+	0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0b, 0x55, 0x70, 0x64,
+	0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x6a, 0x79, 0x4f, 0x72, 0x64,
+	0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6a, 0x79, 0x4f,
+	0x72, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0a, 0x5a,
+	0x08, 0x6a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x33,
 }
 
 var (

+ 1 - 1
rpc/jyorderclient/jyorder.go

@@ -50,7 +50,7 @@ func (m *defaultJyOrder) CreateOrderDetailed(ctx context.Context, in *RequestDet
 	return client.CreateOrderDetailed(ctx, in)
 }
 
-// 创建订单
+// 修改订单
 func (m *defaultJyOrder) UpdateOrder(ctx context.Context, in *Request) (*Response, error) {
 	client := jyOrder.NewJyOrderClient(m.cli.Conn())
 	return client.UpdateOrder(ctx, in)

+ 1 - 2
service/orderService.go

@@ -168,7 +168,6 @@ func (s OrderService) UpdateOrder(in *jyOrder.Request) (int64, string) {
 	order.SigningSubject = in.PaybackCompany
 	order.SalespersonId = in.SalespersonId
 	order.CreatePerson = in.CreatePerson
-
 	numb, err := orm.Table("dataexport_order").Where(map[string]interface{}{
 		"order_code": in.OrderCode,
 	}).Update(order)
@@ -179,5 +178,5 @@ func (s OrderService) UpdateOrder(in *jyOrder.Request) (int64, string) {
 		return entity.ErrorCode, "订单修改失败"
 	}
 	orm.Commit()
-	return entity.SuccessCode, "订单修改失败"
+	return entity.SuccessCode, "订单修改成功"
 }