Browse Source

add clientIp param

zhangbo 1 year ago
parent
commit
310dd31bc2

+ 22 - 21
recommend-server-client/src/main/java/com/tzld/piaoquan/recommend/server/gen/recommend/Recommend.java

@@ -56,7 +56,7 @@ public final class Recommend {
       "\n2com/tzld/piaoquan/recommend/server/rec" +
       "ommend.proto\032\031google/protobuf/any.proto\032" +
       "/com/tzld/piaoquan/recommend/server/comm" +
-      "on.proto\"\233\004\n\020RecommendRequest\022\022\n\nrequest" +
+      "on.proto\"\256\004\n\020RecommendRequest\022\022\n\nrequest" +
       "_id\030\001 \001(\t\022\013\n\003mid\030\002 \001(\t\022\013\n\003uid\030\003 \001(\t\022\014\n\004s" +
       "ize\030\004 \001(\005\022\020\n\010app_type\030\005 \001(\005\022\021\n\tcity_code" +
       "\030\006 \001(\t\022\025\n\rprovince_code\030\007 \001(\t\022\023\n\013ab_exp_" +
@@ -68,25 +68,26 @@ public final class Recommend {
       "InfoProto\022\025\n\rnew_exp_group\030\020 \001(\t\022\022\n\nsess" +
       "ion_id\030\021 \001(\t\022\026\n\016sub_session_id\030\022 \001(\t\022\023\n\013" +
       "page_source\030\023 \001(\t\022\023\n\013category_id\030\024 \001(\t\022\026" +
-      "\n\016hot_scene_type\030\025 \001(\003\032.\n\014EventIdEntry\022\013" +
-      "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\177\n\020Machin" +
-      "eInfoProto\022\r\n\005brand\030\001 \001(\t\022\r\n\005model\030\002 \001(\t" +
-      "\022\020\n\010platform\030\003 \001(\t\022\023\n\013sdk_version\030\004 \001(\t\022" +
-      "\016\n\006system\030\005 \001(\t\022\026\n\016wechat_version\030\006 \001(\t\"" +
-      "H\n\021RecommendResponse\022\027\n\006result\030\001 \001(\0132\007.R" +
-      "esult\022\032\n\005video\030\002 \003(\0132\013.VideoProto\"\336\001\n\nVi" +
-      "deoProto\022\020\n\010video_id\030\001 \001(\003\022\021\n\trov_score\030" +
-      "\002 \001(\001\022\021\n\tpush_from\030\003 \001(\t\022\017\n\007ab_code\030\004 \001(" +
-      "\t\022\022\n\nsort_score\030\005 \001(\001\022\020\n\010position\030\006 \001(\005\022" +
-      "\021\n\tflow_pool\030\007 \001(\t\022\027\n\017is_in_flow_pool\030\010 " +
-      "\001(\005\022\014\n\004rand\030\t \001(\001\022\'\n\017push_from_index\030\n \003" +
-      "(\0132\016.PushFromIndex\"1\n\rPushFromIndex\022\021\n\tp" +
-      "ush_from\030\001 \001(\t\022\r\n\005index\030\002 \003(\t2\212\001\n\020Recomm" +
-      "endService\022:\n\021HomepageRecommend\022\021.Recomm" +
-      "endRequest\032\022.RecommendResponse\022:\n\021Releva" +
-      "ntRecommend\022\021.RecommendRequest\032\022.Recomme" +
-      "ndResponseB7\n0com.tzld.piaoquan.recommen" +
-      "d.server.gen.recommendP\001\210\001\001b\006proto3"
+      "\n\016hot_scene_type\030\025 \001(\003\022\021\n\tclient_ip\030\026 \001(" +
+      "\t\032.\n\014EventIdEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" +
+      "\002 \001(\t:\0028\001\"\177\n\020MachineInfoProto\022\r\n\005brand\030\001" +
+      " \001(\t\022\r\n\005model\030\002 \001(\t\022\020\n\010platform\030\003 \001(\t\022\023\n" +
+      "\013sdk_version\030\004 \001(\t\022\016\n\006system\030\005 \001(\t\022\026\n\016we" +
+      "chat_version\030\006 \001(\t\"H\n\021RecommendResponse\022" +
+      "\027\n\006result\030\001 \001(\0132\007.Result\022\032\n\005video\030\002 \003(\0132" +
+      "\013.VideoProto\"\336\001\n\nVideoProto\022\020\n\010video_id\030" +
+      "\001 \001(\003\022\021\n\trov_score\030\002 \001(\001\022\021\n\tpush_from\030\003 " +
+      "\001(\t\022\017\n\007ab_code\030\004 \001(\t\022\022\n\nsort_score\030\005 \001(\001" +
+      "\022\020\n\010position\030\006 \001(\005\022\021\n\tflow_pool\030\007 \001(\t\022\027\n" +
+      "\017is_in_flow_pool\030\010 \001(\005\022\014\n\004rand\030\t \001(\001\022\'\n\017" +
+      "push_from_index\030\n \003(\0132\016.PushFromIndex\"1\n" +
+      "\rPushFromIndex\022\021\n\tpush_from\030\001 \001(\t\022\r\n\005ind" +
+      "ex\030\002 \003(\t2\212\001\n\020RecommendService\022:\n\021Homepag" +
+      "eRecommend\022\021.RecommendRequest\032\022.Recommen" +
+      "dResponse\022:\n\021RelevantRecommend\022\021.Recomme" +
+      "ndRequest\032\022.RecommendResponseB7\n0com.tzl" +
+      "d.piaoquan.recommend.server.gen.recommen" +
+      "dP\001\210\001\001b\006proto3"
     };
     descriptor = com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
@@ -99,7 +100,7 @@ public final class Recommend {
     internal_static_RecommendRequest_fieldAccessorTable = new
       com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
         internal_static_RecommendRequest_descriptor,
-        new java.lang.String[] { "RequestId", "Mid", "Uid", "Size", "AppType", "CityCode", "ProvinceCode", "AbExpCode", "EventId", "VersionAuditStatus", "RecommendTraceId", "VideoId", "City", "Province", "MachineInfo", "NewExpGroup", "SessionId", "SubSessionId", "PageSource", "CategoryId", "HotSceneType", });
+        new java.lang.String[] { "RequestId", "Mid", "Uid", "Size", "AppType", "CityCode", "ProvinceCode", "AbExpCode", "EventId", "VersionAuditStatus", "RecommendTraceId", "VideoId", "City", "Province", "MachineInfo", "NewExpGroup", "SessionId", "SubSessionId", "PageSource", "CategoryId", "HotSceneType", "ClientIp", });
     internal_static_RecommendRequest_EventIdEntry_descriptor =
       internal_static_RecommendRequest_descriptor.getNestedTypes().get(0);
     internal_static_RecommendRequest_EventIdEntry_fieldAccessorTable = new

+ 138 - 0
recommend-server-client/src/main/java/com/tzld/piaoquan/recommend/server/gen/recommend/RecommendRequest.java

@@ -30,6 +30,7 @@ private static final long serialVersionUID = 0L;
     subSessionId_ = "";
     pageSource_ = "";
     categoryId_ = "";
+    clientIp_ = "";
   }
 
   @java.lang.Override
@@ -201,6 +202,12 @@ private static final long serialVersionUID = 0L;
             hotSceneType_ = input.readInt64();
             break;
           }
+          case 178: {
+            java.lang.String s = input.readStringRequireUtf8();
+
+            clientIp_ = s;
+            break;
+          }
           default: {
             if (!parseUnknownField(
                 input, unknownFields, extensionRegistry, tag)) {
@@ -951,6 +958,44 @@ private static final long serialVersionUID = 0L;
     return hotSceneType_;
   }
 
+  public static final int CLIENT_IP_FIELD_NUMBER = 22;
+  private volatile java.lang.Object clientIp_;
+  /**
+   * <code>string client_ip = 22;</code>
+   * @return The clientIp.
+   */
+  @java.lang.Override
+  public java.lang.String getClientIp() {
+    java.lang.Object ref = clientIp_;
+    if (ref instanceof java.lang.String) {
+      return (java.lang.String) ref;
+    } else {
+      com.google.protobuf.ByteString bs = 
+          (com.google.protobuf.ByteString) ref;
+      java.lang.String s = bs.toStringUtf8();
+      clientIp_ = s;
+      return s;
+    }
+  }
+  /**
+   * <code>string client_ip = 22;</code>
+   * @return The bytes for clientIp.
+   */
+  @java.lang.Override
+  public com.google.protobuf.ByteString
+      getClientIpBytes() {
+    java.lang.Object ref = clientIp_;
+    if (ref instanceof java.lang.String) {
+      com.google.protobuf.ByteString b = 
+          com.google.protobuf.ByteString.copyFromUtf8(
+              (java.lang.String) ref);
+      clientIp_ = b;
+      return b;
+    } else {
+      return (com.google.protobuf.ByteString) ref;
+    }
+  }
+
   private byte memoizedIsInitialized = -1;
   @java.lang.Override
   public final boolean isInitialized() {
@@ -1031,6 +1076,9 @@ private static final long serialVersionUID = 0L;
     if (hotSceneType_ != 0L) {
       output.writeInt64(21, hotSceneType_);
     }
+    if (!getClientIpBytes().isEmpty()) {
+      com.google.protobuf.GeneratedMessageV3.writeString(output, 22, clientIp_);
+    }
     unknownFields.writeTo(output);
   }
 
@@ -1121,6 +1169,9 @@ private static final long serialVersionUID = 0L;
       size += com.google.protobuf.CodedOutputStream
         .computeInt64Size(21, hotSceneType_);
     }
+    if (!getClientIpBytes().isEmpty()) {
+      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(22, clientIp_);
+    }
     size += unknownFields.getSerializedSize();
     memoizedSize = size;
     return size;
@@ -1181,6 +1232,8 @@ private static final long serialVersionUID = 0L;
         .equals(other.getCategoryId())) return false;
     if (getHotSceneType()
         != other.getHotSceneType()) return false;
+    if (!getClientIp()
+        .equals(other.getClientIp())) return false;
     if (!unknownFields.equals(other.unknownFields)) return false;
     return true;
   }
@@ -1242,6 +1295,8 @@ private static final long serialVersionUID = 0L;
     hash = (37 * hash) + HOT_SCENE_TYPE_FIELD_NUMBER;
     hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
         getHotSceneType());
+    hash = (37 * hash) + CLIENT_IP_FIELD_NUMBER;
+    hash = (53 * hash) + getClientIp().hashCode();
     hash = (29 * hash) + unknownFields.hashCode();
     memoizedHashCode = hash;
     return hash;
@@ -1442,6 +1497,8 @@ private static final long serialVersionUID = 0L;
 
       hotSceneType_ = 0L;
 
+      clientIp_ = "";
+
       return this;
     }
 
@@ -1499,6 +1556,7 @@ private static final long serialVersionUID = 0L;
       result.pageSource_ = pageSource_;
       result.categoryId_ = categoryId_;
       result.hotSceneType_ = hotSceneType_;
+      result.clientIp_ = clientIp_;
       onBuilt();
       return result;
     }
@@ -1629,6 +1687,10 @@ private static final long serialVersionUID = 0L;
       if (other.getHotSceneType() != 0L) {
         setHotSceneType(other.getHotSceneType());
       }
+      if (!other.getClientIp().isEmpty()) {
+        clientIp_ = other.clientIp_;
+        onChanged();
+      }
       this.mergeUnknownFields(other.unknownFields);
       onChanged();
       return this;
@@ -3194,6 +3256,82 @@ private static final long serialVersionUID = 0L;
       onChanged();
       return this;
     }
+
+    private java.lang.Object clientIp_ = "";
+    /**
+     * <code>string client_ip = 22;</code>
+     * @return The clientIp.
+     */
+    public java.lang.String getClientIp() {
+      java.lang.Object ref = clientIp_;
+      if (!(ref instanceof java.lang.String)) {
+        com.google.protobuf.ByteString bs =
+            (com.google.protobuf.ByteString) ref;
+        java.lang.String s = bs.toStringUtf8();
+        clientIp_ = s;
+        return s;
+      } else {
+        return (java.lang.String) ref;
+      }
+    }
+    /**
+     * <code>string client_ip = 22;</code>
+     * @return The bytes for clientIp.
+     */
+    public com.google.protobuf.ByteString
+        getClientIpBytes() {
+      java.lang.Object ref = clientIp_;
+      if (ref instanceof String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        clientIp_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+    /**
+     * <code>string client_ip = 22;</code>
+     * @param value The clientIp to set.
+     * @return This builder for chaining.
+     */
+    public Builder setClientIp(
+        java.lang.String value) {
+      if (value == null) {
+    throw new NullPointerException();
+  }
+  
+      clientIp_ = value;
+      onChanged();
+      return this;
+    }
+    /**
+     * <code>string client_ip = 22;</code>
+     * @return This builder for chaining.
+     */
+    public Builder clearClientIp() {
+      
+      clientIp_ = getDefaultInstance().getClientIp();
+      onChanged();
+      return this;
+    }
+    /**
+     * <code>string client_ip = 22;</code>
+     * @param value The bytes for clientIp to set.
+     * @return This builder for chaining.
+     */
+    public Builder setClientIpBytes(
+        com.google.protobuf.ByteString value) {
+      if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+      
+      clientIp_ = value;
+      onChanged();
+      return this;
+    }
     @java.lang.Override
     public final Builder setUnknownFields(
         final com.google.protobuf.UnknownFieldSet unknownFields) {

+ 12 - 0
recommend-server-client/src/main/java/com/tzld/piaoquan/recommend/server/gen/recommend/RecommendRequestOrBuilder.java

@@ -278,4 +278,16 @@ public interface RecommendRequestOrBuilder extends
    * @return The hotSceneType.
    */
   long getHotSceneType();
+
+  /**
+   * <code>string client_ip = 22;</code>
+   * @return The clientIp.
+   */
+  java.lang.String getClientIp();
+  /**
+   * <code>string client_ip = 22;</code>
+   * @return The bytes for clientIp.
+   */
+  com.google.protobuf.ByteString
+      getClientIpBytes();
 }