diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c3605dc --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/.idea + + +/target +/logs diff --git a/com/jmfy/annotations.xml b/com/jmfy/annotations.xml new file mode 100644 index 0000000..daf6c48 --- /dev/null +++ b/com/jmfy/annotations.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/conf/jsonconf/c_database_version.json b/conf/jsonconf/c_database_version.json new file mode 100644 index 0000000..5af1494 --- /dev/null +++ b/conf/jsonconf/c_database_version.json @@ -0,0 +1,4 @@ +{ + "version":0, + "tables":"" +} \ No newline at end of file diff --git a/conf/jsonconf/s_b_item_id_idip.json b/conf/jsonconf/s_b_item_id_idip.json new file mode 100644 index 0000000..df24779 --- /dev/null +++ b/conf/jsonconf/s_b_item_id_idip.json @@ -0,0 +1,1617 @@ +{"_id":{"$numberLong":"1"},"long_id":{"$numberLong":"100100001001"},"type_id":{"$numberLong":"1"},"item_id":{"$numberLong":"1001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"2"},"long_id":{"$numberLong":"100200001002"},"type_id":{"$numberLong":"2"},"item_id":{"$numberLong":"1002"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"3"},"long_id":{"$numberLong":"100400001018"},"type_id":{"$numberLong":"4"},"item_id":{"$numberLong":"1018"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"4"},"long_id":{"$numberLong":"100400001019"},"type_id":{"$numberLong":"4"},"item_id":{"$numberLong":"1019"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"5"},"long_id":{"$numberLong":"100400001021"},"type_id":{"$numberLong":"4"},"item_id":{"$numberLong":"1021"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"6"},"long_id":{"$numberLong":"101000001011"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"1011"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"7"},"long_id":{"$numberLong":"101000001023"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"1023"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"8"},"long_id":{"$numberLong":"101000001029"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"1029"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"9"},"long_id":{"$numberLong":"101000001031"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"1031"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"10"},"long_id":{"$numberLong":"101000005001"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"11"},"long_id":{"$numberLong":"101000005002"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5002"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"12"},"long_id":{"$numberLong":"101000005003"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5003"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"13"},"long_id":{"$numberLong":"101000005004"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5004"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"14"},"long_id":{"$numberLong":"101000005005"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5005"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"15"},"long_id":{"$numberLong":"101000005006"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5006"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"16"},"long_id":{"$numberLong":"101000005007"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5007"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"17"},"long_id":{"$numberLong":"101000005008"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5008"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"18"},"long_id":{"$numberLong":"101000005009"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5009"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"19"},"long_id":{"$numberLong":"101000005010"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5010"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"20"},"long_id":{"$numberLong":"101000005011"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5011"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"21"},"long_id":{"$numberLong":"101400008111"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8111"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"22"},"long_id":{"$numberLong":"101400008112"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8112"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"23"},"long_id":{"$numberLong":"101400008113"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8113"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"24"},"long_id":{"$numberLong":"101400008114"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8114"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"25"},"long_id":{"$numberLong":"101400008115"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8115"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"26"},"long_id":{"$numberLong":"101400008116"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8116"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"27"},"long_id":{"$numberLong":"101400008117"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8117"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"28"},"long_id":{"$numberLong":"101400008118"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8118"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"29"},"long_id":{"$numberLong":"101400008119"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8119"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"30"},"long_id":{"$numberLong":"101400008120"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"31"},"long_id":{"$numberLong":"101400008121"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8121"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"32"},"long_id":{"$numberLong":"101400008122"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8122"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"33"},"long_id":{"$numberLong":"101400008123"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8123"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"34"},"long_id":{"$numberLong":"101400008124"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8124"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"35"},"long_id":{"$numberLong":"101400008125"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8125"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"36"},"long_id":{"$numberLong":"101400008126"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8126"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"37"},"long_id":{"$numberLong":"101400008127"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8127"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"38"},"long_id":{"$numberLong":"101400008128"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8128"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"39"},"long_id":{"$numberLong":"101400008129"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8129"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"40"},"long_id":{"$numberLong":"101400008130"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8130"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"41"},"long_id":{"$numberLong":"101400008131"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8131"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"42"},"long_id":{"$numberLong":"101400008132"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8132"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"43"},"long_id":{"$numberLong":"101400008133"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8133"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"44"},"long_id":{"$numberLong":"101400008134"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8134"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"45"},"long_id":{"$numberLong":"101400008135"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8135"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"46"},"long_id":{"$numberLong":"101400008136"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8136"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"47"},"long_id":{"$numberLong":"101400008137"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8137"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"48"},"long_id":{"$numberLong":"101400008138"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8138"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"49"},"long_id":{"$numberLong":"101400008139"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8139"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"50"},"long_id":{"$numberLong":"101400008140"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8140"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"51"},"long_id":{"$numberLong":"101400008141"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8141"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"52"},"long_id":{"$numberLong":"101400008142"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8142"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"53"},"long_id":{"$numberLong":"101400008143"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8143"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"54"},"long_id":{"$numberLong":"101400008144"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8144"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"55"},"long_id":{"$numberLong":"101400008145"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8145"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"56"},"long_id":{"$numberLong":"101400008146"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8146"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"57"},"long_id":{"$numberLong":"101400008147"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8147"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"58"},"long_id":{"$numberLong":"101400008148"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8148"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"59"},"long_id":{"$numberLong":"101400008149"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8149"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"60"},"long_id":{"$numberLong":"101400008150"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8150"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"61"},"long_id":{"$numberLong":"101400008151"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8151"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"62"},"long_id":{"$numberLong":"101400008152"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8152"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"63"},"long_id":{"$numberLong":"101400008153"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8153"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"64"},"long_id":{"$numberLong":"101400008154"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8154"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"65"},"long_id":{"$numberLong":"101400008155"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8155"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"66"},"long_id":{"$numberLong":"101400008156"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8156"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"67"},"long_id":{"$numberLong":"101400008157"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8157"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"68"},"long_id":{"$numberLong":"101400008158"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8158"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"69"},"long_id":{"$numberLong":"101400008159"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8159"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"70"},"long_id":{"$numberLong":"101400008160"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8160"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"71"},"long_id":{"$numberLong":"101400008161"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8161"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"72"},"long_id":{"$numberLong":"101400008162"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8162"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"73"},"long_id":{"$numberLong":"101400008163"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8163"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"74"},"long_id":{"$numberLong":"101400008164"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8164"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"75"},"long_id":{"$numberLong":"101400008165"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8165"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"76"},"long_id":{"$numberLong":"101400008166"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8166"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"77"},"long_id":{"$numberLong":"101400008167"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8167"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"78"},"long_id":{"$numberLong":"101400008168"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8168"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"79"},"long_id":{"$numberLong":"101400008169"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8169"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"80"},"long_id":{"$numberLong":"101400008170"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8170"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"81"},"long_id":{"$numberLong":"101400008171"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8171"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"82"},"long_id":{"$numberLong":"101400008172"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8172"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"83"},"long_id":{"$numberLong":"101400008173"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8173"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"84"},"long_id":{"$numberLong":"101400008175"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8175"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"85"},"long_id":{"$numberLong":"101400008176"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8176"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"86"},"long_id":{"$numberLong":"101400008177"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8177"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"87"},"long_id":{"$numberLong":"101400008182"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8182"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"88"},"long_id":{"$numberLong":"101400008183"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8183"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"89"},"long_id":{"$numberLong":"101400008184"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8184"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"90"},"long_id":{"$numberLong":"101400008185"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8185"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"91"},"long_id":{"$numberLong":"101400008188"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8188"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"92"},"long_id":{"$numberLong":"101400008189"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8189"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"93"},"long_id":{"$numberLong":"101408120014"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120014"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"94"},"long_id":{"$numberLong":"101408120015"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120015"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"95"},"long_id":{"$numberLong":"101408120016"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120016"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"96"},"long_id":{"$numberLong":"101408120017"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120017"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"97"},"long_id":{"$numberLong":"101408120018"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120018"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"98"},"long_id":{"$numberLong":"101408120019"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120019"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"99"},"long_id":{"$numberLong":"101408120020"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120020"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"100"},"long_id":{"$numberLong":"101408120021"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120021"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"101"},"long_id":{"$numberLong":"101408120022"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120022"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"102"},"long_id":{"$numberLong":"101408120023"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120023"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"103"},"long_id":{"$numberLong":"101408120024"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120024"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"104"},"long_id":{"$numberLong":"101408120025"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120025"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"105"},"long_id":{"$numberLong":"101408120026"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120026"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"106"},"long_id":{"$numberLong":"101408120027"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120027"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"107"},"long_id":{"$numberLong":"101408120028"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120028"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"108"},"long_id":{"$numberLong":"101408120029"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120029"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"109"},"long_id":{"$numberLong":"101408120030"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120030"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"110"},"long_id":{"$numberLong":"101408120031"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120031"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"111"},"long_id":{"$numberLong":"101408120032"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120032"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"112"},"long_id":{"$numberLong":"101408120033"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120033"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"113"},"long_id":{"$numberLong":"101408120034"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120034"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"114"},"long_id":{"$numberLong":"101408120035"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120035"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"115"},"long_id":{"$numberLong":"101408120036"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120036"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"116"},"long_id":{"$numberLong":"101408120037"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120037"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"117"},"long_id":{"$numberLong":"101408120038"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120038"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"118"},"long_id":{"$numberLong":"101408120039"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120039"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"119"},"long_id":{"$numberLong":"101408120040"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120040"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"120"},"long_id":{"$numberLong":"101408120041"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120041"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"121"},"long_id":{"$numberLong":"101408120042"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120042"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"122"},"long_id":{"$numberLong":"101408120043"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120043"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"123"},"long_id":{"$numberLong":"101408120044"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120044"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"124"},"long_id":{"$numberLong":"101408120045"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120045"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"125"},"long_id":{"$numberLong":"101408120046"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120046"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"126"},"long_id":{"$numberLong":"101408120047"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120047"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"127"},"long_id":{"$numberLong":"101408120048"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120048"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"128"},"long_id":{"$numberLong":"101408120049"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120049"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"129"},"long_id":{"$numberLong":"101408120050"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120050"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"130"},"long_id":{"$numberLong":"101408120051"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120051"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"131"},"long_id":{"$numberLong":"101408120052"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120052"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"132"},"long_id":{"$numberLong":"101408120254"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120254"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"133"},"long_id":{"$numberLong":"101408120003"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120003"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"134"},"long_id":{"$numberLong":"101408120056"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120056"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"135"},"long_id":{"$numberLong":"101408120005"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120005"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"136"},"long_id":{"$numberLong":"101408120006"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120006"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"137"},"long_id":{"$numberLong":"101408120057"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120057"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"138"},"long_id":{"$numberLong":"101408120058"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120058"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"139"},"long_id":{"$numberLong":"101408120008"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120008"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"140"},"long_id":{"$numberLong":"101408120004"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120004"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"141"},"long_id":{"$numberLong":"101408120053"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120053"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"142"},"long_id":{"$numberLong":"101408120055"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120055"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"143"},"long_id":{"$numberLong":"101408120007"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120007"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"144"},"long_id":{"$numberLong":"101700001006"},"type_id":{"$numberLong":"17"},"item_id":{"$numberLong":"1006"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"145"},"long_id":{"$numberLong":"102000001007"},"type_id":{"$numberLong":"20"},"item_id":{"$numberLong":"1007"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"146"},"long_id":{"$numberLong":"102300001009"},"type_id":{"$numberLong":"23"},"item_id":{"$numberLong":"1009"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"147"},"long_id":{"$numberLong":"102300001024"},"type_id":{"$numberLong":"23"},"item_id":{"$numberLong":"1024"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"148"},"long_id":{"$numberLong":"102300001025"},"type_id":{"$numberLong":"23"},"item_id":{"$numberLong":"1025"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"149"},"long_id":{"$numberLong":"102400001010"},"type_id":{"$numberLong":"24"},"item_id":{"$numberLong":"1010"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"150"},"long_id":{"$numberLong":"102500001026"},"type_id":{"$numberLong":"25"},"item_id":{"$numberLong":"1026"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"151"},"long_id":{"$numberLong":"102500001027"},"type_id":{"$numberLong":"25"},"item_id":{"$numberLong":"1027"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"152"},"long_id":{"$numberLong":"102500001028"},"type_id":{"$numberLong":"25"},"item_id":{"$numberLong":"1028"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"153"},"long_id":{"$numberLong":"102600511303"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"511303"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"154"},"long_id":{"$numberLong":"102600540303"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"540303"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"155"},"long_id":{"$numberLong":"102600530303"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"530303"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"156"},"long_id":{"$numberLong":"102600520303"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"520303"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"157"},"long_id":{"$numberLong":"102600510303"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"510303"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"158"},"long_id":{"$numberLong":"102600541102"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"541102"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"159"},"long_id":{"$numberLong":"102600521102"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"521102"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"160"},"long_id":{"$numberLong":"102600531102"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"531102"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"161"},"long_id":{"$numberLong":"102600511102"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"511102"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"162"},"long_id":{"$numberLong":"102600440901"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"440901"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"163"},"long_id":{"$numberLong":"102600430901"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"430901"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"164"},"long_id":{"$numberLong":"102600420901"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"420901"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"165"},"long_id":{"$numberLong":"102600541701"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"541701"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"166"},"long_id":{"$numberLong":"102600410901"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"410901"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"167"},"long_id":{"$numberLong":"102600531701"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"531701"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"168"},"long_id":{"$numberLong":"102600521701"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"521701"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"169"},"long_id":{"$numberLong":"102600511701"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"511701"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"170"},"long_id":{"$numberLong":"102600541601"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"541601"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"171"},"long_id":{"$numberLong":"102600531601"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"531601"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"172"},"long_id":{"$numberLong":"102600521601"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"521601"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"173"},"long_id":{"$numberLong":"102600341501"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"341501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"174"},"long_id":{"$numberLong":"102600511601"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"511601"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"175"},"long_id":{"$numberLong":"102600331501"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"331501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"176"},"long_id":{"$numberLong":"102600321501"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"321501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"177"},"long_id":{"$numberLong":"102600311501"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"311501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"178"},"long_id":{"$numberLong":"102600231501"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"231501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"179"},"long_id":{"$numberLong":"102600241501"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"241501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"180"},"long_id":{"$numberLong":"102600221501"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"221501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"181"},"long_id":{"$numberLong":"102600211501"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"211501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"182"},"long_id":{"$numberLong":"102600331401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"331401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"183"},"long_id":{"$numberLong":"102600341401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"341401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"184"},"long_id":{"$numberLong":"102600321401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"321401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"185"},"long_id":{"$numberLong":"102600311401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"311401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"186"},"long_id":{"$numberLong":"102600241401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"241401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"187"},"long_id":{"$numberLong":"102600221401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"221401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"188"},"long_id":{"$numberLong":"102600231401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"231401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"189"},"long_id":{"$numberLong":"102600211401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"211401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"190"},"long_id":{"$numberLong":"102600541302"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"541302"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"191"},"long_id":{"$numberLong":"102600531302"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"531302"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"192"},"long_id":{"$numberLong":"102600521302"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"521302"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"193"},"long_id":{"$numberLong":"102600541301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"541301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"194"},"long_id":{"$numberLong":"102600511302"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"511302"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"195"},"long_id":{"$numberLong":"102600531301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"531301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"196"},"long_id":{"$numberLong":"102600521301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"521301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"197"},"long_id":{"$numberLong":"102600511301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"511301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"198"},"long_id":{"$numberLong":"102600441301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"441301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"199"},"long_id":{"$numberLong":"102600431301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"431301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"200"},"long_id":{"$numberLong":"102600421301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"421301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"201"},"long_id":{"$numberLong":"102600411301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"411301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"202"},"long_id":{"$numberLong":"102600341301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"341301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"203"},"long_id":{"$numberLong":"102600331301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"331301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"204"},"long_id":{"$numberLong":"102600321301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"321301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"205"},"long_id":{"$numberLong":"102600311301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"311301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"206"},"long_id":{"$numberLong":"102600441201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"441201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"207"},"long_id":{"$numberLong":"102600431201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"431201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"208"},"long_id":{"$numberLong":"102600421201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"421201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"209"},"long_id":{"$numberLong":"102600411201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"411201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"210"},"long_id":{"$numberLong":"102600341201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"341201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"211"},"long_id":{"$numberLong":"102600331201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"331201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"212"},"long_id":{"$numberLong":"102600321201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"321201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"213"},"long_id":{"$numberLong":"102600311201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"311201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"214"},"long_id":{"$numberLong":"102600311201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"311201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"215"},"long_id":{"$numberLong":"102600321201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"321201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"216"},"long_id":{"$numberLong":"102600331201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"331201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"217"},"long_id":{"$numberLong":"102600341201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"341201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"218"},"long_id":{"$numberLong":"102600411201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"411201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"219"},"long_id":{"$numberLong":"102600421201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"421201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"220"},"long_id":{"$numberLong":"102600431201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"431201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"221"},"long_id":{"$numberLong":"102600441201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"441201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"222"},"long_id":{"$numberLong":"102600541101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"541101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"223"},"long_id":{"$numberLong":"102600531101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"531101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"224"},"long_id":{"$numberLong":"102600521101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"521101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"225"},"long_id":{"$numberLong":"102600511101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"511101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"226"},"long_id":{"$numberLong":"102600441101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"441101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"227"},"long_id":{"$numberLong":"102600431101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"431101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"228"},"long_id":{"$numberLong":"102600411101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"411101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"229"},"long_id":{"$numberLong":"102600421101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"421101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"230"},"long_id":{"$numberLong":"102600341101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"341101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"231"},"long_id":{"$numberLong":"102600331101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"331101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"232"},"long_id":{"$numberLong":"102600321101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"321101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"233"},"long_id":{"$numberLong":"102600311101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"311101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"234"},"long_id":{"$numberLong":"102600541001"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"541001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"235"},"long_id":{"$numberLong":"102600531001"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"531001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"236"},"long_id":{"$numberLong":"102600521001"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"521001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"237"},"long_id":{"$numberLong":"102600511001"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"511001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"238"},"long_id":{"$numberLong":"102600441001"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"441001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"239"},"long_id":{"$numberLong":"102600431001"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"431001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"240"},"long_id":{"$numberLong":"102600421001"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"421001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"241"},"long_id":{"$numberLong":"102600411001"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"411001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"242"},"long_id":{"$numberLong":"102600341001"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"341001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"243"},"long_id":{"$numberLong":"102600331001"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"331001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"244"},"long_id":{"$numberLong":"102600321001"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"321001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"245"},"long_id":{"$numberLong":"102600311001"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"311001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"246"},"long_id":{"$numberLong":"102600440901"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"440901"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"247"},"long_id":{"$numberLong":"102600430901"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"430901"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"248"},"long_id":{"$numberLong":"102600420901"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"420901"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"249"},"long_id":{"$numberLong":"102600410901"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"410901"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"250"},"long_id":{"$numberLong":"102600340901"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"340901"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"251"},"long_id":{"$numberLong":"102600320901"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"320901"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"252"},"long_id":{"$numberLong":"102600330901"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"330901"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"253"},"long_id":{"$numberLong":"102600310901"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"310901"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"254"},"long_id":{"$numberLong":"102600540802"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"540802"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"255"},"long_id":{"$numberLong":"102600530802"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"530802"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"256"},"long_id":{"$numberLong":"102600520802"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"520802"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"257"},"long_id":{"$numberLong":"102600540801"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"540801"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"258"},"long_id":{"$numberLong":"102600510802"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"510802"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"259"},"long_id":{"$numberLong":"102600530801"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"530801"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"260"},"long_id":{"$numberLong":"102600520801"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"520801"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"261"},"long_id":{"$numberLong":"102600510801"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"510801"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"262"},"long_id":{"$numberLong":"102600420801"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"420801"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"263"},"long_id":{"$numberLong":"102600430801"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"430801"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"264"},"long_id":{"$numberLong":"102600440801"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"440801"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"265"},"long_id":{"$numberLong":"102600410801"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"410801"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"266"},"long_id":{"$numberLong":"102600340801"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"340801"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"267"},"long_id":{"$numberLong":"102600330801"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"330801"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"268"},"long_id":{"$numberLong":"102600320801"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"320801"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"269"},"long_id":{"$numberLong":"102600310801"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"310801"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"270"},"long_id":{"$numberLong":"102600540701"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"540701"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"271"},"long_id":{"$numberLong":"102600530701"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"530701"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"272"},"long_id":{"$numberLong":"102600520701"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"520701"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"273"},"long_id":{"$numberLong":"102600510701"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"510701"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"274"},"long_id":{"$numberLong":"102600440701"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"440701"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"275"},"long_id":{"$numberLong":"102600430701"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"430701"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"276"},"long_id":{"$numberLong":"102600420701"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"420701"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"277"},"long_id":{"$numberLong":"102600410701"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"410701"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"278"},"long_id":{"$numberLong":"102600340701"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"340701"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"279"},"long_id":{"$numberLong":"102600330701"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"330701"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"280"},"long_id":{"$numberLong":"102600320701"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"320701"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"281"},"long_id":{"$numberLong":"102600540601"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"540601"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"282"},"long_id":{"$numberLong":"102600310701"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"310701"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"283"},"long_id":{"$numberLong":"102600530601"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"530601"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"284"},"long_id":{"$numberLong":"102600520601"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"520601"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"285"},"long_id":{"$numberLong":"102600510601"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"510601"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"286"},"long_id":{"$numberLong":"102600440601"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"440601"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"287"},"long_id":{"$numberLong":"102600430601"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"430601"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"288"},"long_id":{"$numberLong":"102600410601"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"410601"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"289"},"long_id":{"$numberLong":"102600420601"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"420601"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"290"},"long_id":{"$numberLong":"102600340601"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"340601"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"291"},"long_id":{"$numberLong":"102600330601"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"330601"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"292"},"long_id":{"$numberLong":"102600320601"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"320601"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"293"},"long_id":{"$numberLong":"102600310601"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"310601"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"294"},"long_id":{"$numberLong":"102600440501"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"440501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"295"},"long_id":{"$numberLong":"102600430501"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"430501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"296"},"long_id":{"$numberLong":"102600420501"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"420501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"297"},"long_id":{"$numberLong":"102600410501"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"410501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"298"},"long_id":{"$numberLong":"102600340501"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"340501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"299"},"long_id":{"$numberLong":"102600330501"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"330501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"300"},"long_id":{"$numberLong":"102600320501"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"320501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"301"},"long_id":{"$numberLong":"102600310501"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"310501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"302"},"long_id":{"$numberLong":"102600540401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"540401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"303"},"long_id":{"$numberLong":"102600530401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"530401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"304"},"long_id":{"$numberLong":"102600520401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"520401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"305"},"long_id":{"$numberLong":"102600510401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"510401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"306"},"long_id":{"$numberLong":"102600440401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"440401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"307"},"long_id":{"$numberLong":"102600420401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"420401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"308"},"long_id":{"$numberLong":"102600430401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"430401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"309"},"long_id":{"$numberLong":"102600410401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"410401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"310"},"long_id":{"$numberLong":"102600340401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"340401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"311"},"long_id":{"$numberLong":"102600330401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"330401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"312"},"long_id":{"$numberLong":"102600320401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"320401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"313"},"long_id":{"$numberLong":"102600310401"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"310401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"314"},"long_id":{"$numberLong":"102600530302"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"530302"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"315"},"long_id":{"$numberLong":"102600540302"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"540302"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"316"},"long_id":{"$numberLong":"102600520302"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"520302"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"317"},"long_id":{"$numberLong":"102600510302"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"510302"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"318"},"long_id":{"$numberLong":"102600530301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"530301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"319"},"long_id":{"$numberLong":"102600540301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"540301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"320"},"long_id":{"$numberLong":"102600510301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"510301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"321"},"long_id":{"$numberLong":"102600520301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"520301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"322"},"long_id":{"$numberLong":"102600440301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"440301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"323"},"long_id":{"$numberLong":"102600430301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"430301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"324"},"long_id":{"$numberLong":"102600420301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"420301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"325"},"long_id":{"$numberLong":"102600410301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"410301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"326"},"long_id":{"$numberLong":"102600330301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"330301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"327"},"long_id":{"$numberLong":"102600340301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"340301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"328"},"long_id":{"$numberLong":"102600320301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"320301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"329"},"long_id":{"$numberLong":"102600310301"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"310301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"330"},"long_id":{"$numberLong":"102600540201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"540201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"331"},"long_id":{"$numberLong":"102600530201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"530201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"332"},"long_id":{"$numberLong":"102600520201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"520201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"333"},"long_id":{"$numberLong":"102600440201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"440201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"334"},"long_id":{"$numberLong":"102600510201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"510201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"335"},"long_id":{"$numberLong":"102600430201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"430201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"336"},"long_id":{"$numberLong":"102600420201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"420201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"337"},"long_id":{"$numberLong":"102600340201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"340201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"338"},"long_id":{"$numberLong":"102600410201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"410201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"339"},"long_id":{"$numberLong":"102600320201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"320201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"340"},"long_id":{"$numberLong":"102600330201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"330201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"341"},"long_id":{"$numberLong":"102600310201"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"310201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"342"},"long_id":{"$numberLong":"102600440101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"440101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"343"},"long_id":{"$numberLong":"102600430101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"430101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"344"},"long_id":{"$numberLong":"102600410101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"410101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"345"},"long_id":{"$numberLong":"102600420101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"420101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"346"},"long_id":{"$numberLong":"102600340101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"340101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"347"},"long_id":{"$numberLong":"102600330101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"330101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"348"},"long_id":{"$numberLong":"102600310101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"310101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"349"},"long_id":{"$numberLong":"102600320101"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"320101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"350"},"long_id":{"$numberLong":"102600521303"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"521303"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"351"},"long_id":{"$numberLong":"102600531303"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"531303"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"352"},"long_id":{"$numberLong":"102600541303"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"541303"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"353"},"long_id":{"$numberLong":"102600510304"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"510304"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"354"},"long_id":{"$numberLong":"102600520304"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"520304"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"355"},"long_id":{"$numberLong":"102600530304"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"530304"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"356"},"long_id":{"$numberLong":"102600540304"},"type_id":{"$numberLong":"26"},"item_id":{"$numberLong":"540304"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"357"},"long_id":{"$numberLong":"102800001016"},"type_id":{"$numberLong":"28"},"item_id":{"$numberLong":"1016"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"358"},"long_id":{"$numberLong":"102800001030"},"type_id":{"$numberLong":"28"},"item_id":{"$numberLong":"1030"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"359"},"long_id":{"$numberLong":"103300000001"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"1"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"360"},"long_id":{"$numberLong":"103300000002"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"2"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"361"},"long_id":{"$numberLong":"103300000003"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"3"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"362"},"long_id":{"$numberLong":"103300000004"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"4"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"363"},"long_id":{"$numberLong":"103300000005"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"5"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"364"},"long_id":{"$numberLong":"103300000006"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"6"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"365"},"long_id":{"$numberLong":"103300000007"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"7"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"366"},"long_id":{"$numberLong":"103300000008"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"8"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"367"},"long_id":{"$numberLong":"103300000009"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"9"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"368"},"long_id":{"$numberLong":"103300000010"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"10"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"369"},"long_id":{"$numberLong":"103300000011"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"11"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"370"},"long_id":{"$numberLong":"103300000012"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"12"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"371"},"long_id":{"$numberLong":"103300000013"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"13"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"372"},"long_id":{"$numberLong":"103300000014"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"14"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"373"},"long_id":{"$numberLong":"103300000015"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"15"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"374"},"long_id":{"$numberLong":"103300000016"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"16"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"375"},"long_id":{"$numberLong":"103300000017"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"17"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"376"},"long_id":{"$numberLong":"103300000018"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"18"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"377"},"long_id":{"$numberLong":"103300000019"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"19"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"378"},"long_id":{"$numberLong":"103300000020"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"20"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"379"},"long_id":{"$numberLong":"103300000021"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"21"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"380"},"long_id":{"$numberLong":"103300000022"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"22"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"381"},"long_id":{"$numberLong":"103300000023"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"23"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"382"},"long_id":{"$numberLong":"103300000024"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"24"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"383"},"long_id":{"$numberLong":"103300000025"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"25"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"384"},"long_id":{"$numberLong":"103300000026"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"26"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"385"},"long_id":{"$numberLong":"103300000027"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"27"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"386"},"long_id":{"$numberLong":"103300000028"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"28"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"387"},"long_id":{"$numberLong":"103300000029"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"29"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"388"},"long_id":{"$numberLong":"103300000030"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"30"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"389"},"long_id":{"$numberLong":"103300000031"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"31"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"390"},"long_id":{"$numberLong":"103300000032"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"32"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"391"},"long_id":{"$numberLong":"103300000033"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"33"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"392"},"long_id":{"$numberLong":"103300000034"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"34"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"393"},"long_id":{"$numberLong":"103300000035"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"35"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"394"},"long_id":{"$numberLong":"103300000036"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"36"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"395"},"long_id":{"$numberLong":"103300000037"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"37"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"396"},"long_id":{"$numberLong":"103300000038"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"38"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"397"},"long_id":{"$numberLong":"103300000039"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"39"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"398"},"long_id":{"$numberLong":"103300000040"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"40"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"399"},"long_id":{"$numberLong":"103300000041"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"41"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"400"},"long_id":{"$numberLong":"103300000042"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"42"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"401"},"long_id":{"$numberLong":"103300000043"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"43"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"402"},"long_id":{"$numberLong":"103300000044"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"44"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"403"},"long_id":{"$numberLong":"103300000045"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"45"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"404"},"long_id":{"$numberLong":"103300000046"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"46"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"405"},"long_id":{"$numberLong":"103300000048"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"48"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"406"},"long_id":{"$numberLong":"103300000049"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"49"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"407"},"long_id":{"$numberLong":"103300000050"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"50"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"408"},"long_id":{"$numberLong":"103300000051"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"51"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"409"},"long_id":{"$numberLong":"103300000052"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"52"},"star":{"$numberLong":"5"}} +{"_id":{"$numberLong":"410"},"long_id":{"$numberLong":"103300000053"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"53"},"star":{"$numberLong":"5"}} +{"_id":{"$numberLong":"411"},"long_id":{"$numberLong":"103300000054"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"54"},"star":{"$numberLong":"5"}} +{"_id":{"$numberLong":"412"},"long_id":{"$numberLong":"103300000055"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"55"},"star":{"$numberLong":"5"}} +{"_id":{"$numberLong":"413"},"long_id":{"$numberLong":"103400000011"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"11"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"414"},"long_id":{"$numberLong":"103400000012"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"12"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"415"},"long_id":{"$numberLong":"103400000013"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"13"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"416"},"long_id":{"$numberLong":"103400000014"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"14"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"417"},"long_id":{"$numberLong":"103400000015"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"15"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"418"},"long_id":{"$numberLong":"103400000016"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"16"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"419"},"long_id":{"$numberLong":"103400000017"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"17"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"420"},"long_id":{"$numberLong":"103400000018"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"18"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"421"},"long_id":{"$numberLong":"103400000019"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"19"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"422"},"long_id":{"$numberLong":"103400000020"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"423"},"long_id":{"$numberLong":"103400000021"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"21"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"424"},"long_id":{"$numberLong":"103400000022"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"22"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"425"},"long_id":{"$numberLong":"103400000023"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"23"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"426"},"long_id":{"$numberLong":"103400000024"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"24"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"427"},"long_id":{"$numberLong":"103400000025"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"25"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"428"},"long_id":{"$numberLong":"103400000026"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"26"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"429"},"long_id":{"$numberLong":"103400000027"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"27"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"430"},"long_id":{"$numberLong":"103400000028"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"28"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"431"},"long_id":{"$numberLong":"103400000029"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"29"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"432"},"long_id":{"$numberLong":"103400000030"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"30"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"433"},"long_id":{"$numberLong":"103400000031"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"31"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"434"},"long_id":{"$numberLong":"103400000032"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"32"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"435"},"long_id":{"$numberLong":"103400000033"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"33"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"436"},"long_id":{"$numberLong":"103400000034"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"34"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"437"},"long_id":{"$numberLong":"103400000035"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"35"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"438"},"long_id":{"$numberLong":"103400000036"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"36"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"439"},"long_id":{"$numberLong":"103400000037"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"37"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"440"},"long_id":{"$numberLong":"103400000038"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"38"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"441"},"long_id":{"$numberLong":"103400000039"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"39"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"442"},"long_id":{"$numberLong":"103400000040"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"40"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"443"},"long_id":{"$numberLong":"103400000041"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"41"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"444"},"long_id":{"$numberLong":"103400000042"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"42"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"445"},"long_id":{"$numberLong":"103400000043"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"43"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"446"},"long_id":{"$numberLong":"103400000044"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"44"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"447"},"long_id":{"$numberLong":"103400000045"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"45"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"448"},"long_id":{"$numberLong":"103400000046"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"46"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"449"},"long_id":{"$numberLong":"103400000047"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"47"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"450"},"long_id":{"$numberLong":"103400000048"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"48"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"451"},"long_id":{"$numberLong":"103400000049"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"49"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"452"},"long_id":{"$numberLong":"103400000050"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"50"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"453"},"long_id":{"$numberLong":"103400000051"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"51"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"454"},"long_id":{"$numberLong":"103400000052"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"52"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"455"},"long_id":{"$numberLong":"103400000053"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"53"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"456"},"long_id":{"$numberLong":"103400000054"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"54"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"457"},"long_id":{"$numberLong":"103400000055"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"55"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"458"},"long_id":{"$numberLong":"103400000056"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"56"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"459"},"long_id":{"$numberLong":"103400000057"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"57"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"460"},"long_id":{"$numberLong":"103400000058"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"58"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"461"},"long_id":{"$numberLong":"103400000059"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"59"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"462"},"long_id":{"$numberLong":"103400000060"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"60"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"463"},"long_id":{"$numberLong":"103400000061"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"61"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"464"},"long_id":{"$numberLong":"103400000062"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"62"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"465"},"long_id":{"$numberLong":"103400000063"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"63"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"466"},"long_id":{"$numberLong":"103400000064"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"64"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"467"},"long_id":{"$numberLong":"103400000065"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"65"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"468"},"long_id":{"$numberLong":"103400000066"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"66"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"469"},"long_id":{"$numberLong":"103400000067"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"67"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"470"},"long_id":{"$numberLong":"103400000068"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"68"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"471"},"long_id":{"$numberLong":"103400000069"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"69"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"472"},"long_id":{"$numberLong":"103400000070"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"70"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"473"},"long_id":{"$numberLong":"103400000071"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"71"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"474"},"long_id":{"$numberLong":"103400000072"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"72"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"475"},"long_id":{"$numberLong":"103400000073"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"73"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"476"},"long_id":{"$numberLong":"103400000075"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"75"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"477"},"long_id":{"$numberLong":"103400000076"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"76"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"478"},"long_id":{"$numberLong":"103400000077"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"77"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"479"},"long_id":{"$numberLong":"103400020004"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20004"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"480"},"long_id":{"$numberLong":"103400020005"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20005"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"481"},"long_id":{"$numberLong":"103400020006"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20006"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"482"},"long_id":{"$numberLong":"103400020014"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20014"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"483"},"long_id":{"$numberLong":"103400020015"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20015"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"484"},"long_id":{"$numberLong":"103400020016"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20016"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"485"},"long_id":{"$numberLong":"103400020017"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20017"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"486"},"long_id":{"$numberLong":"103400020018"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20018"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"487"},"long_id":{"$numberLong":"103400020019"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20019"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"488"},"long_id":{"$numberLong":"103400020020"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20020"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"489"},"long_id":{"$numberLong":"103400020021"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20021"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"490"},"long_id":{"$numberLong":"103400020022"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20022"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"491"},"long_id":{"$numberLong":"103400020023"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20023"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"492"},"long_id":{"$numberLong":"103400020024"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20024"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"493"},"long_id":{"$numberLong":"103400020025"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20025"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"494"},"long_id":{"$numberLong":"103400020026"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20026"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"495"},"long_id":{"$numberLong":"103400020027"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20027"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"496"},"long_id":{"$numberLong":"103400020028"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20028"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"497"},"long_id":{"$numberLong":"103400020053"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20053"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"498"},"long_id":{"$numberLong":"103900001101"},"type_id":{"$numberLong":"39"},"item_id":{"$numberLong":"1101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"499"},"long_id":{"$numberLong":"103900001401"},"type_id":{"$numberLong":"39"},"item_id":{"$numberLong":"1401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"500"},"long_id":{"$numberLong":"103900001501"},"type_id":{"$numberLong":"39"},"item_id":{"$numberLong":"1501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"501"},"long_id":{"$numberLong":"103900003901"},"type_id":{"$numberLong":"39"},"item_id":{"$numberLong":"3901"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"502"},"long_id":{"$numberLong":"103900004101"},"type_id":{"$numberLong":"39"},"item_id":{"$numberLong":"4101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"503"},"long_id":{"$numberLong":"103900006901"},"type_id":{"$numberLong":"39"},"item_id":{"$numberLong":"6901"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"504"},"long_id":{"$numberLong":"104000007001"},"type_id":{"$numberLong":"40"},"item_id":{"$numberLong":"7001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"505"},"long_id":{"$numberLong":"104000007002"},"type_id":{"$numberLong":"40"},"item_id":{"$numberLong":"7002"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"506"},"long_id":{"$numberLong":"104000007003"},"type_id":{"$numberLong":"40"},"item_id":{"$numberLong":"7003"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"507"},"long_id":{"$numberLong":"104000007004"},"type_id":{"$numberLong":"40"},"item_id":{"$numberLong":"7004"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"508"},"long_id":{"$numberLong":"104000007005"},"type_id":{"$numberLong":"40"},"item_id":{"$numberLong":"7005"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"509"},"long_id":{"$numberLong":"104000007006"},"type_id":{"$numberLong":"40"},"item_id":{"$numberLong":"7006"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"510"},"long_id":{"$numberLong":"104000007008"},"type_id":{"$numberLong":"40"},"item_id":{"$numberLong":"7008"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"511"},"long_id":{"$numberLong":"104000007009"},"type_id":{"$numberLong":"40"},"item_id":{"$numberLong":"7009"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"512"},"long_id":{"$numberLong":"104000007010"},"type_id":{"$numberLong":"40"},"item_id":{"$numberLong":"7010"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"513"},"long_id":{"$numberLong":"104000007011"},"type_id":{"$numberLong":"40"},"item_id":{"$numberLong":"7011"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"514"},"long_id":{"$numberLong":"104000007012"},"type_id":{"$numberLong":"40"},"item_id":{"$numberLong":"7012"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"515"},"long_id":{"$numberLong":"104000007013"},"type_id":{"$numberLong":"40"},"item_id":{"$numberLong":"7013"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"516"},"long_id":{"$numberLong":"104000007014"},"type_id":{"$numberLong":"40"},"item_id":{"$numberLong":"7014"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"517"},"long_id":{"$numberLong":"104000007015"},"type_id":{"$numberLong":"40"},"item_id":{"$numberLong":"7015"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"518"},"long_id":{"$numberLong":"104100008000"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8000"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"519"},"long_id":{"$numberLong":"104100008001"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"520"},"long_id":{"$numberLong":"104100008002"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8002"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"521"},"long_id":{"$numberLong":"104100008003"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8003"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"522"},"long_id":{"$numberLong":"104100008004"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8004"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"523"},"long_id":{"$numberLong":"104100008005"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8005"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"524"},"long_id":{"$numberLong":"104100008006"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8006"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"525"},"long_id":{"$numberLong":"104100008007"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8007"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"526"},"long_id":{"$numberLong":"104100008012"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8012"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"527"},"long_id":{"$numberLong":"104100008018"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8018"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"528"},"long_id":{"$numberLong":"104100008019"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8019"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"529"},"long_id":{"$numberLong":"104100008016"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8016"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"530"},"long_id":{"$numberLong":"104100008017"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8017"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"531"},"long_id":{"$numberLong":"104100008020"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8020"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"532"},"long_id":{"$numberLong":"104100008021"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8021"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"533"},"long_id":{"$numberLong":"104100008022"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8022"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"534"},"long_id":{"$numberLong":"104100008023"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8023"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"535"},"long_id":{"$numberLong":"104100008024"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8024"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"536"},"long_id":{"$numberLong":"104100008025"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8025"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"537"},"long_id":{"$numberLong":"104100008026"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8026"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"538"},"long_id":{"$numberLong":"104100008027"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8027"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"539"},"long_id":{"$numberLong":"104100008028"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8028"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"540"},"long_id":{"$numberLong":"104100008029"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8029"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"541"},"long_id":{"$numberLong":"104100008030"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8030"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"542"},"long_id":{"$numberLong":"104100008031"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8031"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"543"},"long_id":{"$numberLong":"104100008032"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8032"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"544"},"long_id":{"$numberLong":"104100008033"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8033"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"545"},"long_id":{"$numberLong":"104100008034"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8034"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"546"},"long_id":{"$numberLong":"104300006001"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"547"},"long_id":{"$numberLong":"104300006002"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6002"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"548"},"long_id":{"$numberLong":"104300006003"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6003"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"549"},"long_id":{"$numberLong":"104300006004"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6004"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"550"},"long_id":{"$numberLong":"104300006011"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6011"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"551"},"long_id":{"$numberLong":"104300006012"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6012"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"552"},"long_id":{"$numberLong":"104300006013"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6013"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"553"},"long_id":{"$numberLong":"104300006014"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6014"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"554"},"long_id":{"$numberLong":"104300006021"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6021"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"555"},"long_id":{"$numberLong":"104300006022"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6022"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"556"},"long_id":{"$numberLong":"104300006023"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6023"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"557"},"long_id":{"$numberLong":"104300006024"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6024"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"558"},"long_id":{"$numberLong":"104300006031"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6031"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"559"},"long_id":{"$numberLong":"104300006032"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6032"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"560"},"long_id":{"$numberLong":"104300006033"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6033"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"561"},"long_id":{"$numberLong":"104300006034"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6034"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"562"},"long_id":{"$numberLong":"104300006041"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6041"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"563"},"long_id":{"$numberLong":"104300006042"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6042"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"564"},"long_id":{"$numberLong":"104300006043"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6043"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"565"},"long_id":{"$numberLong":"104300006044"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6044"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"566"},"long_id":{"$numberLong":"104300006051"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6051"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"567"},"long_id":{"$numberLong":"104300006052"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6052"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"568"},"long_id":{"$numberLong":"104300006053"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6053"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"569"},"long_id":{"$numberLong":"104300006054"},"type_id":{"$numberLong":"43"},"item_id":{"$numberLong":"6054"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"570"},"long_id":{"$numberLong":"104500009011"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9011"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"571"},"long_id":{"$numberLong":"104500009012"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9012"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"572"},"long_id":{"$numberLong":"104500009013"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9013"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"573"},"long_id":{"$numberLong":"104500009021"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9021"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"574"},"long_id":{"$numberLong":"104500009022"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9022"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"575"},"long_id":{"$numberLong":"104500009023"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9023"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"576"},"long_id":{"$numberLong":"104500009031"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9031"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"577"},"long_id":{"$numberLong":"104500009032"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9032"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"578"},"long_id":{"$numberLong":"104500009033"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9033"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"579"},"long_id":{"$numberLong":"104500009041"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9041"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"580"},"long_id":{"$numberLong":"104500009042"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9042"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"581"},"long_id":{"$numberLong":"104500009043"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9043"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"582"},"long_id":{"$numberLong":"104500009051"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9051"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"583"},"long_id":{"$numberLong":"104500009052"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9052"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"584"},"long_id":{"$numberLong":"104500009053"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9053"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"585"},"long_id":{"$numberLong":"104500009061"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9061"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"586"},"long_id":{"$numberLong":"104500009062"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9062"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"587"},"long_id":{"$numberLong":"104500009063"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9063"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"588"},"long_id":{"$numberLong":"104500009111"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9111"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"589"},"long_id":{"$numberLong":"104500009112"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9112"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"590"},"long_id":{"$numberLong":"104500009113"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9113"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"591"},"long_id":{"$numberLong":"104500009121"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9121"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"592"},"long_id":{"$numberLong":"104500009122"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9122"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"593"},"long_id":{"$numberLong":"104500009123"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9123"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"594"},"long_id":{"$numberLong":"104500009131"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9131"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"595"},"long_id":{"$numberLong":"104500009132"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9132"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"596"},"long_id":{"$numberLong":"104500009133"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9133"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"597"},"long_id":{"$numberLong":"104500009141"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9141"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"598"},"long_id":{"$numberLong":"104500009142"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9142"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"599"},"long_id":{"$numberLong":"104500009143"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9143"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"600"},"long_id":{"$numberLong":"104500009151"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9151"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"601"},"long_id":{"$numberLong":"104500009152"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9152"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"602"},"long_id":{"$numberLong":"104500009153"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9153"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"603"},"long_id":{"$numberLong":"104500009161"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9161"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"604"},"long_id":{"$numberLong":"104500009162"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9162"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"605"},"long_id":{"$numberLong":"104500009163"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9163"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"606"},"long_id":{"$numberLong":"104500009171"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9171"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"607"},"long_id":{"$numberLong":"104500009172"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9172"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"608"},"long_id":{"$numberLong":"104500009173"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9173"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"609"},"long_id":{"$numberLong":"104500009201"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"610"},"long_id":{"$numberLong":"104500009202"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9202"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"611"},"long_id":{"$numberLong":"104500009203"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9203"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"612"},"long_id":{"$numberLong":"104500009204"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9204"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"613"},"long_id":{"$numberLong":"104500009205"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9205"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"614"},"long_id":{"$numberLong":"104600001017"},"type_id":{"$numberLong":"46"},"item_id":{"$numberLong":"1017"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"615"},"long_id":{"$numberLong":"104700009000"},"type_id":{"$numberLong":"47"},"item_id":{"$numberLong":"9000"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"616"},"long_id":{"$numberLong":"104800000130"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"130"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"617"},"long_id":{"$numberLong":"104800000120"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"120"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"618"},"long_id":{"$numberLong":"104800000100"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"100"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"619"},"long_id":{"$numberLong":"104800000110"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"110"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"620"},"long_id":{"$numberLong":"104800000131"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"131"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"621"},"long_id":{"$numberLong":"104800000132"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"132"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"622"},"long_id":{"$numberLong":"104800000133"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"133"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"623"},"long_id":{"$numberLong":"104800000134"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"134"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"624"},"long_id":{"$numberLong":"104800000135"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"135"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"625"},"long_id":{"$numberLong":"104800000136"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"136"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"626"},"long_id":{"$numberLong":"104800000121"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"121"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"627"},"long_id":{"$numberLong":"104800000122"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"122"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"628"},"long_id":{"$numberLong":"104800000123"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"123"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"629"},"long_id":{"$numberLong":"104800000124"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"124"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"630"},"long_id":{"$numberLong":"104800000125"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"125"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"631"},"long_id":{"$numberLong":"104800000126"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"126"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"632"},"long_id":{"$numberLong":"104800000111"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"111"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"633"},"long_id":{"$numberLong":"104800000112"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"112"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"634"},"long_id":{"$numberLong":"104800000113"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"113"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"635"},"long_id":{"$numberLong":"104800000114"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"114"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"636"},"long_id":{"$numberLong":"104800000115"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"115"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"637"},"long_id":{"$numberLong":"104800000116"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"116"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"638"},"long_id":{"$numberLong":"104800000101"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"639"},"long_id":{"$numberLong":"104800000102"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"102"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"640"},"long_id":{"$numberLong":"104800000103"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"103"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"641"},"long_id":{"$numberLong":"104800000104"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"104"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"642"},"long_id":{"$numberLong":"104800000105"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"105"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"643"},"long_id":{"$numberLong":"104800000106"},"type_id":{"$numberLong":"48"},"item_id":{"$numberLong":"106"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"644"},"long_id":{"$numberLong":"104900001022"},"type_id":{"$numberLong":"49"},"item_id":{"$numberLong":"1022"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"645"},"long_id":{"$numberLong":"105000000001"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"1"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"646"},"long_id":{"$numberLong":"105000000002"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"2"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"647"},"long_id":{"$numberLong":"105000000003"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"3"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"648"},"long_id":{"$numberLong":"105000000004"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"4"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"649"},"long_id":{"$numberLong":"105000000005"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"5"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"650"},"long_id":{"$numberLong":"105000000006"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"6"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"651"},"long_id":{"$numberLong":"105000000007"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"7"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"652"},"long_id":{"$numberLong":"105000000008"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"8"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"653"},"long_id":{"$numberLong":"105000000009"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"9"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"654"},"long_id":{"$numberLong":"105000000010"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"10"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"655"},"long_id":{"$numberLong":"105000000011"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"11"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"656"},"long_id":{"$numberLong":"105000000012"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"12"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"657"},"long_id":{"$numberLong":"105000000013"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"13"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"658"},"long_id":{"$numberLong":"105000000014"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"14"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"659"},"long_id":{"$numberLong":"105000000015"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"15"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"660"},"long_id":{"$numberLong":"105000000016"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"16"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"661"},"long_id":{"$numberLong":"105000000017"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"17"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"662"},"long_id":{"$numberLong":"105000000018"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"18"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"663"},"long_id":{"$numberLong":"105000000019"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"19"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"664"},"long_id":{"$numberLong":"105000000020"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"20"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"665"},"long_id":{"$numberLong":"105000000021"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"21"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"666"},"long_id":{"$numberLong":"105000000022"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"22"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"667"},"long_id":{"$numberLong":"105000000023"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"23"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"668"},"long_id":{"$numberLong":"105000000024"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"24"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"669"},"long_id":{"$numberLong":"105000000025"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"25"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"670"},"long_id":{"$numberLong":"105000000026"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"26"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"671"},"long_id":{"$numberLong":"105000000027"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"27"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"672"},"long_id":{"$numberLong":"105000000028"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"28"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"673"},"long_id":{"$numberLong":"105000000029"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"29"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"674"},"long_id":{"$numberLong":"105000000030"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"30"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"675"},"long_id":{"$numberLong":"105000000031"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"31"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"676"},"long_id":{"$numberLong":"105000000032"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"32"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"677"},"long_id":{"$numberLong":"105000000033"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"33"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"678"},"long_id":{"$numberLong":"105000000034"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"34"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"679"},"long_id":{"$numberLong":"105000000035"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"35"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"680"},"long_id":{"$numberLong":"105000000036"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"36"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"681"},"long_id":{"$numberLong":"105000000037"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"37"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"682"},"long_id":{"$numberLong":"105000000038"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"38"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"683"},"long_id":{"$numberLong":"105000000039"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"39"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"684"},"long_id":{"$numberLong":"105000000040"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"40"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"685"},"long_id":{"$numberLong":"105000000041"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"41"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"686"},"long_id":{"$numberLong":"105000000042"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"42"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"687"},"long_id":{"$numberLong":"105000000043"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"43"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"688"},"long_id":{"$numberLong":"105000000044"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"44"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"689"},"long_id":{"$numberLong":"105000000045"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"45"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"690"},"long_id":{"$numberLong":"105000000046"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"46"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"691"},"long_id":{"$numberLong":"105000000047"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"47"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"692"},"long_id":{"$numberLong":"105000000048"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"48"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"693"},"long_id":{"$numberLong":"105000000049"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"49"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"694"},"long_id":{"$numberLong":"105000000050"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"50"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"695"},"long_id":{"$numberLong":"105000000051"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"51"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"696"},"long_id":{"$numberLong":"105000000052"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"52"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"697"},"long_id":{"$numberLong":"105000000053"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"53"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"698"},"long_id":{"$numberLong":"105000000054"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"54"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"699"},"long_id":{"$numberLong":"105000000055"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"55"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"700"},"long_id":{"$numberLong":"105000000056"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"56"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"701"},"long_id":{"$numberLong":"105000000057"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"57"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"702"},"long_id":{"$numberLong":"105000000058"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"58"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"703"},"long_id":{"$numberLong":"105000000059"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"59"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"704"},"long_id":{"$numberLong":"105000000060"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"60"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"705"},"long_id":{"$numberLong":"105000000061"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"61"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"706"},"long_id":{"$numberLong":"105000000062"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"62"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"707"},"long_id":{"$numberLong":"105000000063"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"63"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"708"},"long_id":{"$numberLong":"105000000064"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"64"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"709"},"long_id":{"$numberLong":"105000000065"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"65"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"710"},"long_id":{"$numberLong":"105000000066"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"66"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"711"},"long_id":{"$numberLong":"105000000067"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"67"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"712"},"long_id":{"$numberLong":"105000000068"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"68"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"713"},"long_id":{"$numberLong":"105000000069"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"69"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"714"},"long_id":{"$numberLong":"105000000070"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"70"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"715"},"long_id":{"$numberLong":"105000000071"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"71"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"716"},"long_id":{"$numberLong":"105000000072"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"72"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"717"},"long_id":{"$numberLong":"105000000073"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"73"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"718"},"long_id":{"$numberLong":"105000000074"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"74"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"719"},"long_id":{"$numberLong":"105000000075"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"75"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"720"},"long_id":{"$numberLong":"105000000076"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"76"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"721"},"long_id":{"$numberLong":"105000000077"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"77"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"722"},"long_id":{"$numberLong":"105000000078"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"78"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"723"},"long_id":{"$numberLong":"105000000079"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"79"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"724"},"long_id":{"$numberLong":"105000000080"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"80"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"725"},"long_id":{"$numberLong":"105000000081"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"81"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"726"},"long_id":{"$numberLong":"105000000082"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"82"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"727"},"long_id":{"$numberLong":"105000000083"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"83"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"728"},"long_id":{"$numberLong":"105000000084"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"84"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"729"},"long_id":{"$numberLong":"105000000085"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"85"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"730"},"long_id":{"$numberLong":"105000000086"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"86"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"731"},"long_id":{"$numberLong":"105000000087"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"87"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"732"},"long_id":{"$numberLong":"105000000088"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"88"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"733"},"long_id":{"$numberLong":"105000000089"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"89"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"734"},"long_id":{"$numberLong":"105000000090"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"90"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"735"},"long_id":{"$numberLong":"105000000091"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"91"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"736"},"long_id":{"$numberLong":"105000000092"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"92"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"737"},"long_id":{"$numberLong":"105000000093"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"93"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"738"},"long_id":{"$numberLong":"105000000094"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"94"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"739"},"long_id":{"$numberLong":"105000000095"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"95"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"740"},"long_id":{"$numberLong":"105000000096"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"96"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"741"},"long_id":{"$numberLong":"105000000097"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"97"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"742"},"long_id":{"$numberLong":"105000000098"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"98"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"743"},"long_id":{"$numberLong":"105000000099"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"99"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"744"},"long_id":{"$numberLong":"105000000100"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"100"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"745"},"long_id":{"$numberLong":"105000000101"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"746"},"long_id":{"$numberLong":"105000000102"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"102"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"747"},"long_id":{"$numberLong":"105000000103"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"103"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"748"},"long_id":{"$numberLong":"105000000104"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"104"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"749"},"long_id":{"$numberLong":"105000000105"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"105"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"750"},"long_id":{"$numberLong":"105000000106"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"106"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"751"},"long_id":{"$numberLong":"105000000107"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"107"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"752"},"long_id":{"$numberLong":"105000000108"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"108"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"753"},"long_id":{"$numberLong":"105000000109"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"109"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"754"},"long_id":{"$numberLong":"105000000110"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"110"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"755"},"long_id":{"$numberLong":"105000000111"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"111"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"756"},"long_id":{"$numberLong":"105000000112"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"112"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"757"},"long_id":{"$numberLong":"105000000113"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"113"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"758"},"long_id":{"$numberLong":"105000000114"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"114"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"759"},"long_id":{"$numberLong":"105000000115"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"115"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"760"},"long_id":{"$numberLong":"105000000116"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"116"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"761"},"long_id":{"$numberLong":"105000000117"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"117"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"762"},"long_id":{"$numberLong":"105000000118"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"118"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"763"},"long_id":{"$numberLong":"105000000119"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"119"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"764"},"long_id":{"$numberLong":"105000000120"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"120"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"765"},"long_id":{"$numberLong":"105000000121"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"121"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"766"},"long_id":{"$numberLong":"105000000122"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"122"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"767"},"long_id":{"$numberLong":"105000000123"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"123"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"768"},"long_id":{"$numberLong":"105000000124"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"124"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"769"},"long_id":{"$numberLong":"105000000125"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"125"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"770"},"long_id":{"$numberLong":"105000000126"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"126"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"771"},"long_id":{"$numberLong":"105000000127"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"127"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"772"},"long_id":{"$numberLong":"105000000128"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"128"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"773"},"long_id":{"$numberLong":"105000000129"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"129"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"774"},"long_id":{"$numberLong":"105000000130"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"130"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"775"},"long_id":{"$numberLong":"105000000131"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"131"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"776"},"long_id":{"$numberLong":"105000000132"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"132"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"777"},"long_id":{"$numberLong":"105000000133"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"133"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"778"},"long_id":{"$numberLong":"105000000134"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"134"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"779"},"long_id":{"$numberLong":"105000000135"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"135"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"780"},"long_id":{"$numberLong":"105000000136"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"136"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"781"},"long_id":{"$numberLong":"105000000137"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"137"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"782"},"long_id":{"$numberLong":"105000000138"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"138"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"783"},"long_id":{"$numberLong":"105000000139"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"139"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"784"},"long_id":{"$numberLong":"105000000140"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"140"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"785"},"long_id":{"$numberLong":"105000000141"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"141"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"786"},"long_id":{"$numberLong":"105000000142"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"142"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"787"},"long_id":{"$numberLong":"105000000143"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"143"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"788"},"long_id":{"$numberLong":"105000000144"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"144"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"789"},"long_id":{"$numberLong":"105000000145"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"145"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"790"},"long_id":{"$numberLong":"105000000146"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"146"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"791"},"long_id":{"$numberLong":"105000000147"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"147"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"792"},"long_id":{"$numberLong":"105000000148"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"148"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"793"},"long_id":{"$numberLong":"105000000149"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"149"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"794"},"long_id":{"$numberLong":"105000000150"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"150"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"795"},"long_id":{"$numberLong":"105000000151"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"151"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"796"},"long_id":{"$numberLong":"105000000152"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"152"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"797"},"long_id":{"$numberLong":"105000000153"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"153"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"798"},"long_id":{"$numberLong":"105000000154"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"154"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"799"},"long_id":{"$numberLong":"105000000155"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"155"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"800"},"long_id":{"$numberLong":"105000000156"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"156"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"801"},"long_id":{"$numberLong":"105000000157"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"157"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"802"},"long_id":{"$numberLong":"105000000158"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"158"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"803"},"long_id":{"$numberLong":"105000000159"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"159"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"804"},"long_id":{"$numberLong":"105000000160"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"160"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"805"},"long_id":{"$numberLong":"105000000161"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"161"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"806"},"long_id":{"$numberLong":"105000000162"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"162"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"807"},"long_id":{"$numberLong":"105000000163"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"163"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"808"},"long_id":{"$numberLong":"105000000164"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"164"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"809"},"long_id":{"$numberLong":"105000000165"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"165"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"810"},"long_id":{"$numberLong":"105000000166"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"166"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"811"},"long_id":{"$numberLong":"105000000167"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"167"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"812"},"long_id":{"$numberLong":"105000000168"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"168"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"813"},"long_id":{"$numberLong":"105000000169"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"169"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"814"},"long_id":{"$numberLong":"105000000170"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"170"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"815"},"long_id":{"$numberLong":"105000000171"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"171"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"816"},"long_id":{"$numberLong":"105000000172"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"172"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"817"},"long_id":{"$numberLong":"105000000173"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"173"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"818"},"long_id":{"$numberLong":"105000000174"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"174"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"819"},"long_id":{"$numberLong":"105000000175"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"175"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"820"},"long_id":{"$numberLong":"105000000176"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"176"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"821"},"long_id":{"$numberLong":"105000000177"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"177"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"822"},"long_id":{"$numberLong":"105000000178"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"178"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"823"},"long_id":{"$numberLong":"105000000179"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"179"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"824"},"long_id":{"$numberLong":"105000000180"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"180"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"825"},"long_id":{"$numberLong":"105000000181"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"181"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"826"},"long_id":{"$numberLong":"105000000182"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"182"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"827"},"long_id":{"$numberLong":"105000000183"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"183"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"828"},"long_id":{"$numberLong":"105000000184"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"184"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"829"},"long_id":{"$numberLong":"105000000185"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"185"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"830"},"long_id":{"$numberLong":"105000000186"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"186"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"831"},"long_id":{"$numberLong":"105000000187"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"187"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"832"},"long_id":{"$numberLong":"105000000188"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"188"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"833"},"long_id":{"$numberLong":"105000000189"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"189"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"834"},"long_id":{"$numberLong":"105000000190"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"190"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"835"},"long_id":{"$numberLong":"105000000191"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"191"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"836"},"long_id":{"$numberLong":"105000000192"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"192"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"837"},"long_id":{"$numberLong":"105000000193"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"193"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"838"},"long_id":{"$numberLong":"105000000194"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"194"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"839"},"long_id":{"$numberLong":"105000000195"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"195"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"840"},"long_id":{"$numberLong":"105000000196"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"196"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"841"},"long_id":{"$numberLong":"105000000197"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"197"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"842"},"long_id":{"$numberLong":"105000000198"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"198"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"843"},"long_id":{"$numberLong":"105000000199"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"199"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"844"},"long_id":{"$numberLong":"105000000200"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"200"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"845"},"long_id":{"$numberLong":"105000000201"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"846"},"long_id":{"$numberLong":"105000000202"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"202"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"847"},"long_id":{"$numberLong":"105000000203"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"203"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"848"},"long_id":{"$numberLong":"105000000204"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"204"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"849"},"long_id":{"$numberLong":"105000000205"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"205"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"850"},"long_id":{"$numberLong":"105000000206"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"206"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"851"},"long_id":{"$numberLong":"105000000207"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"207"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"852"},"long_id":{"$numberLong":"105000000208"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"208"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"853"},"long_id":{"$numberLong":"105000000209"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"209"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"854"},"long_id":{"$numberLong":"105000000210"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"210"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"855"},"long_id":{"$numberLong":"105000000211"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"211"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"856"},"long_id":{"$numberLong":"105000000212"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"212"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"857"},"long_id":{"$numberLong":"105000000213"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"213"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"858"},"long_id":{"$numberLong":"105000000214"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"214"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"859"},"long_id":{"$numberLong":"105000000215"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"215"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"860"},"long_id":{"$numberLong":"105000000216"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"216"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"861"},"long_id":{"$numberLong":"105000000217"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"217"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"862"},"long_id":{"$numberLong":"105000000218"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"218"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"863"},"long_id":{"$numberLong":"105000000219"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"219"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"864"},"long_id":{"$numberLong":"105000000220"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"220"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"865"},"long_id":{"$numberLong":"105000000221"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"221"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"866"},"long_id":{"$numberLong":"105000000222"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"222"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"867"},"long_id":{"$numberLong":"105000000223"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"223"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"868"},"long_id":{"$numberLong":"105000000224"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"224"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"869"},"long_id":{"$numberLong":"105000000225"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"225"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"870"},"long_id":{"$numberLong":"105000000226"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"226"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"871"},"long_id":{"$numberLong":"105000000227"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"227"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"872"},"long_id":{"$numberLong":"105000000228"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"228"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"873"},"long_id":{"$numberLong":"105000000229"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"229"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"874"},"long_id":{"$numberLong":"105000000230"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"230"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"875"},"long_id":{"$numberLong":"105000000231"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"231"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"876"},"long_id":{"$numberLong":"105000000232"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"232"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"877"},"long_id":{"$numberLong":"105000000233"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"233"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"878"},"long_id":{"$numberLong":"105000000234"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"234"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"879"},"long_id":{"$numberLong":"105000000235"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"235"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"880"},"long_id":{"$numberLong":"105000000236"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"236"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"881"},"long_id":{"$numberLong":"105000000237"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"237"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"882"},"long_id":{"$numberLong":"105000000238"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"238"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"883"},"long_id":{"$numberLong":"105000000239"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"239"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"884"},"long_id":{"$numberLong":"105000000240"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"240"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"885"},"long_id":{"$numberLong":"105000000241"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"241"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"886"},"long_id":{"$numberLong":"105000000242"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"242"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"887"},"long_id":{"$numberLong":"105000000243"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"243"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"888"},"long_id":{"$numberLong":"105000000244"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"244"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"889"},"long_id":{"$numberLong":"105000000245"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"245"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"890"},"long_id":{"$numberLong":"105000000246"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"246"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"891"},"long_id":{"$numberLong":"105000000247"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"247"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"892"},"long_id":{"$numberLong":"105000000248"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"248"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"893"},"long_id":{"$numberLong":"105000000249"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"249"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"894"},"long_id":{"$numberLong":"105000000250"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"250"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"895"},"long_id":{"$numberLong":"105000000251"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"251"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"896"},"long_id":{"$numberLong":"105000000252"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"252"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"897"},"long_id":{"$numberLong":"105000000253"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"253"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"898"},"long_id":{"$numberLong":"105000000254"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"254"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"899"},"long_id":{"$numberLong":"105000000255"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"255"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"900"},"long_id":{"$numberLong":"105000000256"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"256"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"901"},"long_id":{"$numberLong":"105000000257"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"257"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"902"},"long_id":{"$numberLong":"105000000258"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"258"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"903"},"long_id":{"$numberLong":"105000000259"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"259"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"904"},"long_id":{"$numberLong":"105000000260"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"260"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"905"},"long_id":{"$numberLong":"105000000261"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"261"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"906"},"long_id":{"$numberLong":"105000000262"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"262"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"907"},"long_id":{"$numberLong":"105000000263"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"263"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"908"},"long_id":{"$numberLong":"105000000264"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"264"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"909"},"long_id":{"$numberLong":"105000000265"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"265"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"910"},"long_id":{"$numberLong":"105000000266"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"266"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"911"},"long_id":{"$numberLong":"105000000267"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"267"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"912"},"long_id":{"$numberLong":"105000000268"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"268"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"913"},"long_id":{"$numberLong":"105000000269"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"269"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"914"},"long_id":{"$numberLong":"105000000270"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"270"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"915"},"long_id":{"$numberLong":"105000000271"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"271"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"916"},"long_id":{"$numberLong":"105000000272"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"272"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"917"},"long_id":{"$numberLong":"105000000273"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"273"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"918"},"long_id":{"$numberLong":"105000000274"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"274"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"919"},"long_id":{"$numberLong":"105000000275"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"275"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"920"},"long_id":{"$numberLong":"105000000276"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"276"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"921"},"long_id":{"$numberLong":"105000000277"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"277"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"922"},"long_id":{"$numberLong":"105000000278"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"278"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"923"},"long_id":{"$numberLong":"105000000279"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"279"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"924"},"long_id":{"$numberLong":"105000000280"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"280"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"925"},"long_id":{"$numberLong":"105000000281"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"281"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"926"},"long_id":{"$numberLong":"105000000282"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"282"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"927"},"long_id":{"$numberLong":"105000000283"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"283"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"928"},"long_id":{"$numberLong":"105000000284"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"284"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"929"},"long_id":{"$numberLong":"105000000285"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"285"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"930"},"long_id":{"$numberLong":"105000000286"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"286"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"931"},"long_id":{"$numberLong":"105000000287"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"287"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"932"},"long_id":{"$numberLong":"105000000288"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"288"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"933"},"long_id":{"$numberLong":"105000000289"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"289"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"934"},"long_id":{"$numberLong":"105000000290"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"290"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"935"},"long_id":{"$numberLong":"105000000291"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"291"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"936"},"long_id":{"$numberLong":"105000000292"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"292"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"937"},"long_id":{"$numberLong":"105000000293"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"293"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"938"},"long_id":{"$numberLong":"105000000294"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"294"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"939"},"long_id":{"$numberLong":"105000000295"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"295"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"940"},"long_id":{"$numberLong":"105000000296"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"296"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"941"},"long_id":{"$numberLong":"105000000297"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"297"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"942"},"long_id":{"$numberLong":"105000000298"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"298"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"943"},"long_id":{"$numberLong":"105000000299"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"299"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"944"},"long_id":{"$numberLong":"105000000300"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"300"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"945"},"long_id":{"$numberLong":"105000000301"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"946"},"long_id":{"$numberLong":"105000000302"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"302"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"947"},"long_id":{"$numberLong":"105000000303"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"303"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"948"},"long_id":{"$numberLong":"105000000304"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"304"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"949"},"long_id":{"$numberLong":"105000000305"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"305"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"950"},"long_id":{"$numberLong":"105000000306"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"306"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"951"},"long_id":{"$numberLong":"105000000307"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"307"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"952"},"long_id":{"$numberLong":"105000000308"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"308"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"953"},"long_id":{"$numberLong":"105000000309"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"309"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"954"},"long_id":{"$numberLong":"105000000310"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"310"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"955"},"long_id":{"$numberLong":"105000000311"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"311"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"956"},"long_id":{"$numberLong":"105000000312"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"312"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"957"},"long_id":{"$numberLong":"105000000313"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"313"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"958"},"long_id":{"$numberLong":"105000000314"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"314"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"959"},"long_id":{"$numberLong":"105000000315"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"315"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"960"},"long_id":{"$numberLong":"105000000316"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"316"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"961"},"long_id":{"$numberLong":"105000000317"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"317"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"962"},"long_id":{"$numberLong":"105000000318"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"318"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"963"},"long_id":{"$numberLong":"105000000319"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"319"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"964"},"long_id":{"$numberLong":"105000000320"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"320"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"965"},"long_id":{"$numberLong":"105000000321"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"321"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"966"},"long_id":{"$numberLong":"105000000322"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"322"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"967"},"long_id":{"$numberLong":"105000000323"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"323"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"968"},"long_id":{"$numberLong":"105000000324"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"324"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"969"},"long_id":{"$numberLong":"105000000325"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"325"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"970"},"long_id":{"$numberLong":"105000000326"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"326"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"971"},"long_id":{"$numberLong":"105000000327"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"327"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"972"},"long_id":{"$numberLong":"105000000328"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"328"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"973"},"long_id":{"$numberLong":"105000000329"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"329"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"974"},"long_id":{"$numberLong":"105000000330"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"330"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"975"},"long_id":{"$numberLong":"105000000331"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"331"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"976"},"long_id":{"$numberLong":"105000000332"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"332"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"977"},"long_id":{"$numberLong":"105000000333"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"333"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"978"},"long_id":{"$numberLong":"105000000334"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"334"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"979"},"long_id":{"$numberLong":"105000000335"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"335"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"980"},"long_id":{"$numberLong":"105000000336"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"336"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"981"},"long_id":{"$numberLong":"105000000337"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"337"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"982"},"long_id":{"$numberLong":"105000000338"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"338"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"983"},"long_id":{"$numberLong":"105000000339"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"339"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"984"},"long_id":{"$numberLong":"105000000340"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"340"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"985"},"long_id":{"$numberLong":"105000000341"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"341"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"986"},"long_id":{"$numberLong":"105000000342"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"342"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"987"},"long_id":{"$numberLong":"105000000343"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"343"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"988"},"long_id":{"$numberLong":"105000000344"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"344"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"989"},"long_id":{"$numberLong":"105000000345"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"345"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"990"},"long_id":{"$numberLong":"105000000346"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"346"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"991"},"long_id":{"$numberLong":"105000000347"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"347"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"992"},"long_id":{"$numberLong":"105000000348"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"348"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"993"},"long_id":{"$numberLong":"105000000349"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"349"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"994"},"long_id":{"$numberLong":"105000000350"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"350"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"995"},"long_id":{"$numberLong":"105000000351"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"351"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"996"},"long_id":{"$numberLong":"105000000352"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"352"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"997"},"long_id":{"$numberLong":"105000000353"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"353"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"998"},"long_id":{"$numberLong":"105000000354"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"354"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"999"},"long_id":{"$numberLong":"105000000355"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"355"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1000"},"long_id":{"$numberLong":"105000000356"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"356"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1001"},"long_id":{"$numberLong":"105000000357"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"357"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1002"},"long_id":{"$numberLong":"105000000358"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"358"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1003"},"long_id":{"$numberLong":"105000000359"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"359"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1004"},"long_id":{"$numberLong":"105000000360"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"360"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1005"},"long_id":{"$numberLong":"105300002000"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2000"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1006"},"long_id":{"$numberLong":"105300002001"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1007"},"long_id":{"$numberLong":"105300002002"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2002"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1008"},"long_id":{"$numberLong":"105300002003"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2003"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1009"},"long_id":{"$numberLong":"105300002004"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2004"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1010"},"long_id":{"$numberLong":"105300002005"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2005"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1011"},"long_id":{"$numberLong":"105300002006"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2006"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1012"},"long_id":{"$numberLong":"105000000361"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"361"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1013"},"long_id":{"$numberLong":"105000000362"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"362"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1014"},"long_id":{"$numberLong":"105000000363"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"363"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1015"},"long_id":{"$numberLong":"105000000364"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"364"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1016"},"long_id":{"$numberLong":"105000000365"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"365"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1017"},"long_id":{"$numberLong":"105000000366"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"366"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1018"},"long_id":{"$numberLong":"105000000367"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"367"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1019"},"long_id":{"$numberLong":"105000000368"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"368"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1020"},"long_id":{"$numberLong":"105000000369"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"369"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1021"},"long_id":{"$numberLong":"105000000370"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"370"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1022"},"long_id":{"$numberLong":"105000000371"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"371"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1023"},"long_id":{"$numberLong":"105000000372"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"372"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1024"},"long_id":{"$numberLong":"105000000373"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"373"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1025"},"long_id":{"$numberLong":"105000000374"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"374"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1026"},"long_id":{"$numberLong":"105000000375"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"375"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1027"},"long_id":{"$numberLong":"105000000376"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"376"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1028"},"long_id":{"$numberLong":"105000000377"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"377"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1029"},"long_id":{"$numberLong":"105000000378"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"378"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1030"},"long_id":{"$numberLong":"105000000379"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"379"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1031"},"long_id":{"$numberLong":"105000000380"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"380"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1032"},"long_id":{"$numberLong":"105000000381"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"381"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1033"},"long_id":{"$numberLong":"105000000382"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"382"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1034"},"long_id":{"$numberLong":"105000000383"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"383"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1035"},"long_id":{"$numberLong":"105000000384"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"384"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1036"},"long_id":{"$numberLong":"105000000385"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"385"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1037"},"long_id":{"$numberLong":"105000000386"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"386"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1038"},"long_id":{"$numberLong":"105000000387"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"387"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1039"},"long_id":{"$numberLong":"105000000388"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"388"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1040"},"long_id":{"$numberLong":"105000000389"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"389"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1041"},"long_id":{"$numberLong":"105000000390"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"390"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1042"},"long_id":{"$numberLong":"105000000391"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"391"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1043"},"long_id":{"$numberLong":"105000000392"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"392"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1044"},"long_id":{"$numberLong":"105000000393"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"393"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1045"},"long_id":{"$numberLong":"105000000394"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"394"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1046"},"long_id":{"$numberLong":"105000000395"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"395"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1047"},"long_id":{"$numberLong":"105000000396"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"396"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1048"},"long_id":{"$numberLong":"105000000397"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"397"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1049"},"long_id":{"$numberLong":"105000000398"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"398"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1050"},"long_id":{"$numberLong":"105000000399"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"399"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1051"},"long_id":{"$numberLong":"105000000400"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"400"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1052"},"long_id":{"$numberLong":"105000000401"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"401"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1053"},"long_id":{"$numberLong":"105000000402"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"402"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1054"},"long_id":{"$numberLong":"105000000403"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"403"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1055"},"long_id":{"$numberLong":"105000000404"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"404"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1056"},"long_id":{"$numberLong":"105000000405"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"405"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1057"},"long_id":{"$numberLong":"105000000406"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"406"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1058"},"long_id":{"$numberLong":"105000000407"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"407"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1059"},"long_id":{"$numberLong":"105000000408"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"408"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1060"},"long_id":{"$numberLong":"105000000409"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"409"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1061"},"long_id":{"$numberLong":"105000000410"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"410"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1062"},"long_id":{"$numberLong":"105000000411"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"411"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1063"},"long_id":{"$numberLong":"105000000412"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"412"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1064"},"long_id":{"$numberLong":"105000000413"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"413"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1065"},"long_id":{"$numberLong":"105000000414"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"414"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1066"},"long_id":{"$numberLong":"105000000415"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"415"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1067"},"long_id":{"$numberLong":"105000000416"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"416"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1068"},"long_id":{"$numberLong":"105000000417"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"417"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1069"},"long_id":{"$numberLong":"105000000418"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"418"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1070"},"long_id":{"$numberLong":"105000000419"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"419"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1071"},"long_id":{"$numberLong":"105000000420"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"420"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1072"},"long_id":{"$numberLong":"105000000421"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"421"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1073"},"long_id":{"$numberLong":"105000000422"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"422"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1074"},"long_id":{"$numberLong":"105000000423"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"423"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1075"},"long_id":{"$numberLong":"105000000424"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"424"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1076"},"long_id":{"$numberLong":"105000000425"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"425"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1077"},"long_id":{"$numberLong":"105000000426"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"426"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1078"},"long_id":{"$numberLong":"105000000427"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"427"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1079"},"long_id":{"$numberLong":"105000000428"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"428"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1080"},"long_id":{"$numberLong":"105000000429"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"429"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1081"},"long_id":{"$numberLong":"105000000430"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"430"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1082"},"long_id":{"$numberLong":"105000000431"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"431"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1083"},"long_id":{"$numberLong":"105000000432"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"432"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1084"},"long_id":{"$numberLong":"105000000433"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"433"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1085"},"long_id":{"$numberLong":"105000000434"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"434"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1086"},"long_id":{"$numberLong":"105000000435"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"435"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1087"},"long_id":{"$numberLong":"105000000436"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"436"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1088"},"long_id":{"$numberLong":"105000000437"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"437"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1089"},"long_id":{"$numberLong":"105000000438"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"438"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1090"},"long_id":{"$numberLong":"105000000439"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"439"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1091"},"long_id":{"$numberLong":"105000000440"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"440"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1092"},"long_id":{"$numberLong":"105000000441"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"441"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1093"},"long_id":{"$numberLong":"105000000442"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"442"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1094"},"long_id":{"$numberLong":"105000000443"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"443"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1095"},"long_id":{"$numberLong":"105000000444"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"444"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1096"},"long_id":{"$numberLong":"105000000445"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"445"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1097"},"long_id":{"$numberLong":"105000000446"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"446"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1098"},"long_id":{"$numberLong":"105000000447"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"447"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1099"},"long_id":{"$numberLong":"105000000448"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"448"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1100"},"long_id":{"$numberLong":"105000000449"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"449"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1101"},"long_id":{"$numberLong":"105000000450"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"450"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1102"},"long_id":{"$numberLong":"105000000451"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"451"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1103"},"long_id":{"$numberLong":"105000000452"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"452"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1104"},"long_id":{"$numberLong":"105000000453"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"453"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1105"},"long_id":{"$numberLong":"105000000454"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"454"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1106"},"long_id":{"$numberLong":"105000000455"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"455"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1107"},"long_id":{"$numberLong":"105000000456"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"456"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1108"},"long_id":{"$numberLong":"105000000457"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"457"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1109"},"long_id":{"$numberLong":"105000000458"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"458"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1110"},"long_id":{"$numberLong":"105000000459"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"459"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1111"},"long_id":{"$numberLong":"105000000460"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"460"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1112"},"long_id":{"$numberLong":"105000000461"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"461"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1113"},"long_id":{"$numberLong":"105000000462"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"462"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1114"},"long_id":{"$numberLong":"105000000463"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"463"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1115"},"long_id":{"$numberLong":"105000000464"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"464"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1116"},"long_id":{"$numberLong":"105000000465"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"465"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1117"},"long_id":{"$numberLong":"105000000466"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"466"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1118"},"long_id":{"$numberLong":"105000000467"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"467"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1119"},"long_id":{"$numberLong":"105000000468"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"468"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1120"},"long_id":{"$numberLong":"105000000469"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"469"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1121"},"long_id":{"$numberLong":"105000000470"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"470"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1122"},"long_id":{"$numberLong":"105000000471"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"471"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1123"},"long_id":{"$numberLong":"105000000472"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"472"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1124"},"long_id":{"$numberLong":"105000000473"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"473"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1125"},"long_id":{"$numberLong":"105000000474"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"474"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1126"},"long_id":{"$numberLong":"105000000475"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"475"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1127"},"long_id":{"$numberLong":"105000000476"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"476"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1128"},"long_id":{"$numberLong":"105000000477"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"477"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1129"},"long_id":{"$numberLong":"105000000478"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"478"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1130"},"long_id":{"$numberLong":"105000000479"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"479"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1131"},"long_id":{"$numberLong":"105000000480"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"480"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1132"},"long_id":{"$numberLong":"105000000481"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"481"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1133"},"long_id":{"$numberLong":"105000000482"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"482"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1134"},"long_id":{"$numberLong":"105000000483"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"483"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1135"},"long_id":{"$numberLong":"105000000484"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"484"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1136"},"long_id":{"$numberLong":"105000000485"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"485"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1137"},"long_id":{"$numberLong":"105000000486"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"486"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1138"},"long_id":{"$numberLong":"105000000487"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"487"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1139"},"long_id":{"$numberLong":"105000000488"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"488"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1140"},"long_id":{"$numberLong":"105000000489"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"489"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1141"},"long_id":{"$numberLong":"105000000490"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"490"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1142"},"long_id":{"$numberLong":"105000000491"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"491"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1143"},"long_id":{"$numberLong":"105000000492"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"492"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1144"},"long_id":{"$numberLong":"105000000493"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"493"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1145"},"long_id":{"$numberLong":"105000000494"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"494"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1146"},"long_id":{"$numberLong":"105000000495"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"495"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1147"},"long_id":{"$numberLong":"105000000496"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"496"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1148"},"long_id":{"$numberLong":"105000000497"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"497"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1149"},"long_id":{"$numberLong":"105000000498"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"498"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1150"},"long_id":{"$numberLong":"105000000499"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"499"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1151"},"long_id":{"$numberLong":"105000000500"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"500"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1152"},"long_id":{"$numberLong":"105000000501"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1153"},"long_id":{"$numberLong":"105000000502"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"502"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1154"},"long_id":{"$numberLong":"105000000503"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"503"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1155"},"long_id":{"$numberLong":"105000000504"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"504"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1156"},"long_id":{"$numberLong":"105000000505"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"505"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1157"},"long_id":{"$numberLong":"105000000506"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"506"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1158"},"long_id":{"$numberLong":"105000000507"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"507"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1159"},"long_id":{"$numberLong":"105000000508"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"508"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1160"},"long_id":{"$numberLong":"105000000509"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"509"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1161"},"long_id":{"$numberLong":"105000000510"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"510"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1162"},"long_id":{"$numberLong":"105000000511"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"511"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1163"},"long_id":{"$numberLong":"105000000512"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"512"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1164"},"long_id":{"$numberLong":"105000000513"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"513"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1165"},"long_id":{"$numberLong":"105000000514"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"514"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1166"},"long_id":{"$numberLong":"105000000515"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"515"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1167"},"long_id":{"$numberLong":"105000000516"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"516"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1168"},"long_id":{"$numberLong":"105000000517"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"517"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1169"},"long_id":{"$numberLong":"105000000518"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"518"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1170"},"long_id":{"$numberLong":"105000000519"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"519"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1171"},"long_id":{"$numberLong":"105000000520"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"520"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1172"},"long_id":{"$numberLong":"105000000521"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"521"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1173"},"long_id":{"$numberLong":"105000000522"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"522"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1174"},"long_id":{"$numberLong":"105000000523"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"523"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1175"},"long_id":{"$numberLong":"105000000524"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"524"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1176"},"long_id":{"$numberLong":"105000000525"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"525"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1177"},"long_id":{"$numberLong":"105000000526"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"526"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1178"},"long_id":{"$numberLong":"105000000527"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"527"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1179"},"long_id":{"$numberLong":"105000000528"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"528"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1180"},"long_id":{"$numberLong":"105000000529"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"529"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1181"},"long_id":{"$numberLong":"105000000530"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"530"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1182"},"long_id":{"$numberLong":"105000000531"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"531"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1183"},"long_id":{"$numberLong":"105000000532"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"532"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1184"},"long_id":{"$numberLong":"105000000533"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"533"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1185"},"long_id":{"$numberLong":"105000000534"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"534"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1186"},"long_id":{"$numberLong":"105000000535"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"535"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1187"},"long_id":{"$numberLong":"105000000536"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"536"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1188"},"long_id":{"$numberLong":"105000000537"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"537"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1189"},"long_id":{"$numberLong":"105000000538"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"538"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1190"},"long_id":{"$numberLong":"105000000539"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"539"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1191"},"long_id":{"$numberLong":"105000000540"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"540"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1192"},"long_id":{"$numberLong":"105000000541"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"541"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1193"},"long_id":{"$numberLong":"105000000542"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"542"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1194"},"long_id":{"$numberLong":"105000000543"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"543"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1195"},"long_id":{"$numberLong":"105000000544"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"544"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1196"},"long_id":{"$numberLong":"105000000545"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"545"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1197"},"long_id":{"$numberLong":"105000000546"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"546"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1198"},"long_id":{"$numberLong":"105000000547"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"547"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1199"},"long_id":{"$numberLong":"105000000548"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"548"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1200"},"long_id":{"$numberLong":"105000000549"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"549"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1201"},"long_id":{"$numberLong":"105000000550"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"550"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1202"},"long_id":{"$numberLong":"105000000551"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"551"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1203"},"long_id":{"$numberLong":"105000000552"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"552"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1204"},"long_id":{"$numberLong":"105000000553"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"553"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1205"},"long_id":{"$numberLong":"105000000554"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"554"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1206"},"long_id":{"$numberLong":"105000000555"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"555"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1207"},"long_id":{"$numberLong":"105000000556"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"556"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1208"},"long_id":{"$numberLong":"105000000557"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"557"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1209"},"long_id":{"$numberLong":"105000000558"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"558"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1210"},"long_id":{"$numberLong":"105000000559"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"559"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1211"},"long_id":{"$numberLong":"105000000560"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"560"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1212"},"long_id":{"$numberLong":"105000000561"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"561"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1213"},"long_id":{"$numberLong":"105000000562"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"562"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1214"},"long_id":{"$numberLong":"105000000563"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"563"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1215"},"long_id":{"$numberLong":"105000000564"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"564"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1216"},"long_id":{"$numberLong":"105000000565"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"565"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1217"},"long_id":{"$numberLong":"105000000566"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"566"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1218"},"long_id":{"$numberLong":"105000000567"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"567"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1219"},"long_id":{"$numberLong":"105000000568"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"568"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1220"},"long_id":{"$numberLong":"105000000569"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"569"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1221"},"long_id":{"$numberLong":"105000000570"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"570"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1222"},"long_id":{"$numberLong":"105000000571"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"571"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1223"},"long_id":{"$numberLong":"105000000572"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"572"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1224"},"long_id":{"$numberLong":"105000000573"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"573"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1225"},"long_id":{"$numberLong":"105000000574"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"574"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1226"},"long_id":{"$numberLong":"105000000575"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"575"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1227"},"long_id":{"$numberLong":"105000000576"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"576"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1228"},"long_id":{"$numberLong":"105000000577"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"577"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1229"},"long_id":{"$numberLong":"105000000578"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"578"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1230"},"long_id":{"$numberLong":"105000000579"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"579"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1231"},"long_id":{"$numberLong":"105000000580"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"580"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1232"},"long_id":{"$numberLong":"105000000581"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"581"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1233"},"long_id":{"$numberLong":"105000000582"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"582"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1234"},"long_id":{"$numberLong":"105000000583"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"583"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1235"},"long_id":{"$numberLong":"105000000584"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"584"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1236"},"long_id":{"$numberLong":"105000000585"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"585"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1237"},"long_id":{"$numberLong":"105000000586"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"586"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1238"},"long_id":{"$numberLong":"105000000587"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"587"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1239"},"long_id":{"$numberLong":"105000000588"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"588"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1240"},"long_id":{"$numberLong":"105000000589"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"589"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1241"},"long_id":{"$numberLong":"105000000590"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"590"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1242"},"long_id":{"$numberLong":"105000000591"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"591"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1243"},"long_id":{"$numberLong":"105000000592"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"592"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1244"},"long_id":{"$numberLong":"105000000593"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"593"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1245"},"long_id":{"$numberLong":"105000000594"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"594"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1246"},"long_id":{"$numberLong":"105000000595"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"595"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1247"},"long_id":{"$numberLong":"105000000596"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"596"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1248"},"long_id":{"$numberLong":"105000000597"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"597"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1249"},"long_id":{"$numberLong":"105000000598"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"598"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1250"},"long_id":{"$numberLong":"105000000599"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"599"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1251"},"long_id":{"$numberLong":"105000000600"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"600"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1252"},"long_id":{"$numberLong":"105000000601"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"601"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1253"},"long_id":{"$numberLong":"105000000602"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"602"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1254"},"long_id":{"$numberLong":"105000000603"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"603"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1255"},"long_id":{"$numberLong":"105000000604"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"604"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1256"},"long_id":{"$numberLong":"105000000605"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"605"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1257"},"long_id":{"$numberLong":"105000000606"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"606"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1258"},"long_id":{"$numberLong":"105000000607"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"607"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1259"},"long_id":{"$numberLong":"105000000608"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"608"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1260"},"long_id":{"$numberLong":"105000000609"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"609"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1261"},"long_id":{"$numberLong":"105000000610"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"610"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1262"},"long_id":{"$numberLong":"105000000611"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"611"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1263"},"long_id":{"$numberLong":"105000000612"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"612"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1264"},"long_id":{"$numberLong":"105000000613"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"613"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1265"},"long_id":{"$numberLong":"105000000614"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"614"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1266"},"long_id":{"$numberLong":"105000000615"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"615"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1267"},"long_id":{"$numberLong":"105000000616"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"616"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1268"},"long_id":{"$numberLong":"105000000617"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"617"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1269"},"long_id":{"$numberLong":"105000000618"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"618"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1270"},"long_id":{"$numberLong":"105000000619"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"619"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1271"},"long_id":{"$numberLong":"105000000620"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"620"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1272"},"long_id":{"$numberLong":"105000000621"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"621"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1273"},"long_id":{"$numberLong":"105000000622"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"622"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1274"},"long_id":{"$numberLong":"105000000623"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"623"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1275"},"long_id":{"$numberLong":"105000000624"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"624"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1276"},"long_id":{"$numberLong":"105000000625"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"625"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1277"},"long_id":{"$numberLong":"105000000626"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"626"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1278"},"long_id":{"$numberLong":"105000000627"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"627"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1279"},"long_id":{"$numberLong":"105000000628"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"628"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1280"},"long_id":{"$numberLong":"105000000629"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"629"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1281"},"long_id":{"$numberLong":"105000000630"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"630"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1282"},"long_id":{"$numberLong":"105000000631"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"631"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1283"},"long_id":{"$numberLong":"105000000632"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"632"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1284"},"long_id":{"$numberLong":"105000000633"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"633"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1285"},"long_id":{"$numberLong":"105000000634"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"634"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1286"},"long_id":{"$numberLong":"105000000635"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"635"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1287"},"long_id":{"$numberLong":"105000000636"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"636"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1288"},"long_id":{"$numberLong":"105000000637"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"637"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1289"},"long_id":{"$numberLong":"105000000638"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"638"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1290"},"long_id":{"$numberLong":"105000000639"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"639"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1291"},"long_id":{"$numberLong":"105000000640"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"640"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1292"},"long_id":{"$numberLong":"105000000641"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"641"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1293"},"long_id":{"$numberLong":"105000000642"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"642"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1294"},"long_id":{"$numberLong":"105000000643"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"643"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1295"},"long_id":{"$numberLong":"105000000644"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"644"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1296"},"long_id":{"$numberLong":"105000000645"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"645"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1297"},"long_id":{"$numberLong":"105000000646"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"646"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1298"},"long_id":{"$numberLong":"105000000647"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"647"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1299"},"long_id":{"$numberLong":"105000000648"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"648"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1300"},"long_id":{"$numberLong":"105000000649"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"649"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1301"},"long_id":{"$numberLong":"105000000650"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"650"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1302"},"long_id":{"$numberLong":"105000000651"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"651"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1303"},"long_id":{"$numberLong":"105000000652"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"652"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1304"},"long_id":{"$numberLong":"105000000653"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"653"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1305"},"long_id":{"$numberLong":"105000000654"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"654"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1306"},"long_id":{"$numberLong":"105000000655"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"655"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1307"},"long_id":{"$numberLong":"105000000656"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"656"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1308"},"long_id":{"$numberLong":"105000000657"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"657"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1309"},"long_id":{"$numberLong":"105000000658"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"658"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1310"},"long_id":{"$numberLong":"105000000659"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"659"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1311"},"long_id":{"$numberLong":"105000000660"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"660"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1312"},"long_id":{"$numberLong":"105000000661"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"661"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1313"},"long_id":{"$numberLong":"105000000662"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"662"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1314"},"long_id":{"$numberLong":"105000000663"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"663"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1315"},"long_id":{"$numberLong":"105000000664"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"664"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1316"},"long_id":{"$numberLong":"105000000665"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"665"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1317"},"long_id":{"$numberLong":"105000000666"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"666"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1318"},"long_id":{"$numberLong":"105000000667"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"667"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1319"},"long_id":{"$numberLong":"105000000668"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"668"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1320"},"long_id":{"$numberLong":"105000000669"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"669"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1321"},"long_id":{"$numberLong":"105000000670"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"670"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1322"},"long_id":{"$numberLong":"105000000671"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"671"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1323"},"long_id":{"$numberLong":"105000000672"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"672"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1324"},"long_id":{"$numberLong":"105000000673"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"673"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1325"},"long_id":{"$numberLong":"105000000674"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"674"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1326"},"long_id":{"$numberLong":"105000000675"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"675"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1327"},"long_id":{"$numberLong":"105000000676"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"676"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1328"},"long_id":{"$numberLong":"105000000677"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"677"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1329"},"long_id":{"$numberLong":"105000000678"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"678"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1330"},"long_id":{"$numberLong":"105000000679"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"679"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1331"},"long_id":{"$numberLong":"105000000680"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"680"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1332"},"long_id":{"$numberLong":"105000000681"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"681"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1333"},"long_id":{"$numberLong":"105000000682"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"682"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1334"},"long_id":{"$numberLong":"105000000683"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"683"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1335"},"long_id":{"$numberLong":"105000000684"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"684"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1336"},"long_id":{"$numberLong":"105000000685"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"685"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1337"},"long_id":{"$numberLong":"105000000686"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"686"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1338"},"long_id":{"$numberLong":"105000000687"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"687"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1339"},"long_id":{"$numberLong":"105000000688"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"688"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1340"},"long_id":{"$numberLong":"105000000689"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"689"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1341"},"long_id":{"$numberLong":"105000000690"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"690"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1342"},"long_id":{"$numberLong":"105000000691"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"691"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1343"},"long_id":{"$numberLong":"105000000692"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"692"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1344"},"long_id":{"$numberLong":"105000000693"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"693"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1345"},"long_id":{"$numberLong":"105000000694"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"694"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1346"},"long_id":{"$numberLong":"105000000695"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"695"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1347"},"long_id":{"$numberLong":"105000000696"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"696"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1348"},"long_id":{"$numberLong":"105000000697"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"697"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1349"},"long_id":{"$numberLong":"105000000698"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"698"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1350"},"long_id":{"$numberLong":"105000000699"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"699"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1351"},"long_id":{"$numberLong":"105000000700"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"700"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1352"},"long_id":{"$numberLong":"105000000701"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"701"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1353"},"long_id":{"$numberLong":"105000000702"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"702"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1354"},"long_id":{"$numberLong":"105000000703"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"703"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1355"},"long_id":{"$numberLong":"105000000704"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"704"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1356"},"long_id":{"$numberLong":"105000000705"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"705"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1357"},"long_id":{"$numberLong":"105000000706"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"706"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1358"},"long_id":{"$numberLong":"105000000707"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"707"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1359"},"long_id":{"$numberLong":"105000000708"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"708"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1360"},"long_id":{"$numberLong":"105000000709"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"709"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1361"},"long_id":{"$numberLong":"105000000710"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"710"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1362"},"long_id":{"$numberLong":"105000000711"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"711"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1363"},"long_id":{"$numberLong":"105000000712"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"712"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1364"},"long_id":{"$numberLong":"105000000713"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"713"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1365"},"long_id":{"$numberLong":"105000000714"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"714"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1366"},"long_id":{"$numberLong":"105000000715"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"715"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1367"},"long_id":{"$numberLong":"105000000716"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"716"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1368"},"long_id":{"$numberLong":"105000000717"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"717"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1369"},"long_id":{"$numberLong":"105000000718"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"718"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1370"},"long_id":{"$numberLong":"105000000719"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"719"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1371"},"long_id":{"$numberLong":"105000000720"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"720"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1372"},"long_id":{"$numberLong":"105000000721"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"721"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1373"},"long_id":{"$numberLong":"105000000722"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"722"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1374"},"long_id":{"$numberLong":"105000000723"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"723"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1375"},"long_id":{"$numberLong":"105000000724"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"724"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1376"},"long_id":{"$numberLong":"105000000725"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"725"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1377"},"long_id":{"$numberLong":"105000000726"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"726"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1378"},"long_id":{"$numberLong":"105000000727"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"727"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1379"},"long_id":{"$numberLong":"105000000728"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"728"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1380"},"long_id":{"$numberLong":"105000000729"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"729"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1381"},"long_id":{"$numberLong":"105000000730"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"730"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1382"},"long_id":{"$numberLong":"105000000731"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"731"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1383"},"long_id":{"$numberLong":"105000000732"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"732"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1384"},"long_id":{"$numberLong":"105000000733"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"733"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1385"},"long_id":{"$numberLong":"105000000734"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"734"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1386"},"long_id":{"$numberLong":"105000000735"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"735"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1387"},"long_id":{"$numberLong":"105000000736"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"736"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1388"},"long_id":{"$numberLong":"105000000737"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"737"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1389"},"long_id":{"$numberLong":"105000000738"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"738"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1390"},"long_id":{"$numberLong":"105000000739"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"739"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1391"},"long_id":{"$numberLong":"105000000740"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"740"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1392"},"long_id":{"$numberLong":"105000000741"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"741"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1393"},"long_id":{"$numberLong":"105000000742"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"742"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1394"},"long_id":{"$numberLong":"105000000743"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"743"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1395"},"long_id":{"$numberLong":"105000000744"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"744"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1396"},"long_id":{"$numberLong":"105000000745"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"745"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1397"},"long_id":{"$numberLong":"105000000746"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"746"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1398"},"long_id":{"$numberLong":"105000000747"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"747"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1399"},"long_id":{"$numberLong":"105000000748"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"748"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1400"},"long_id":{"$numberLong":"105000000749"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"749"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1401"},"long_id":{"$numberLong":"105000000750"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"750"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1402"},"long_id":{"$numberLong":"105000000751"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"751"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1403"},"long_id":{"$numberLong":"105000000752"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"752"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1404"},"long_id":{"$numberLong":"105000000753"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"753"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1405"},"long_id":{"$numberLong":"105000000754"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"754"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1406"},"long_id":{"$numberLong":"105000000755"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"755"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1407"},"long_id":{"$numberLong":"105000000756"},"type_id":{"$numberLong":"50"},"item_id":{"$numberLong":"756"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1408"},"long_id":{"$numberLong":"101000005012"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5012"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1409"},"long_id":{"$numberLong":"101000005013"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5013"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1410"},"long_id":{"$numberLong":"101000005014"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5014"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1411"},"long_id":{"$numberLong":"101000005015"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5015"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1412"},"long_id":{"$numberLong":"101000005016"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5016"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1413"},"long_id":{"$numberLong":"101000005017"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5017"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1414"},"long_id":{"$numberLong":"101000005018"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5018"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1415"},"long_id":{"$numberLong":"101000005019"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5019"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1416"},"long_id":{"$numberLong":"101000005020"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5020"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1417"},"long_id":{"$numberLong":"101000005021"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5021"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1418"},"long_id":{"$numberLong":"101000005022"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5022"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1419"},"long_id":{"$numberLong":"101000005023"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5023"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1420"},"long_id":{"$numberLong":"104500009206"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9206"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1421"},"long_id":{"$numberLong":"104500009207"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9207"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1422"},"long_id":{"$numberLong":"104500009208"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9208"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1423"},"long_id":{"$numberLong":"101000003001"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"3001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1424"},"long_id":{"$numberLong":"101000003002"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"3002"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1425"},"long_id":{"$numberLong":"101000003003"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"3003"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1426"},"long_id":{"$numberLong":"101000003004"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"3004"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1427"},"long_id":{"$numberLong":"101000003005"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"3005"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1428"},"long_id":{"$numberLong":"101000003006"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"3006"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1429"},"long_id":{"$numberLong":"101000003007"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"3007"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1430"},"long_id":{"$numberLong":"101000003008"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"3008"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1431"},"long_id":{"$numberLong":"101000003009"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"3009"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1432"},"long_id":{"$numberLong":"101000003010"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"3010"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1433"},"long_id":{"$numberLong":"102800001032"},"type_id":{"$numberLong":"28"},"item_id":{"$numberLong":"1032"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1434"},"long_id":{"$numberLong":"102800001033"},"type_id":{"$numberLong":"28"},"item_id":{"$numberLong":"1033"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1435"},"long_id":{"$numberLong":"103300000056"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"56"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1436"},"long_id":{"$numberLong":"103300000057"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"57"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1437"},"long_id":{"$numberLong":"103300000058"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"58"},"star":{"$numberLong":"5"}} +{"_id":{"$numberLong":"1438"},"long_id":{"$numberLong":"103300000059"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"59"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1439"},"long_id":{"$numberLong":"103300000060"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"60"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1440"},"long_id":{"$numberLong":"103300000061"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"61"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1441"},"long_id":{"$numberLong":"103300000062"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"62"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1442"},"long_id":{"$numberLong":"103300000063"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"63"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1443"},"long_id":{"$numberLong":"103300000064"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"64"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1444"},"long_id":{"$numberLong":"103300000065"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"65"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1445"},"long_id":{"$numberLong":"103300000066"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"66"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1446"},"long_id":{"$numberLong":"103300000067"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"67"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1447"},"long_id":{"$numberLong":"103300000083"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"83"},"star":{"$numberLong":"5"}} +{"_id":{"$numberLong":"1448"},"long_id":{"$numberLong":"103400020054"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20054"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1449"},"long_id":{"$numberLong":"103400020055"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20055"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1450"},"long_id":{"$numberLong":"103400020056"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20056"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1451"},"long_id":{"$numberLong":"103400020057"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20057"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1452"},"long_id":{"$numberLong":"103400020058"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20058"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1453"},"long_id":{"$numberLong":"103400020003"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20003"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1454"},"long_id":{"$numberLong":"103400000088"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"88"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1455"},"long_id":{"$numberLong":"103400020008"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20008"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1456"},"long_id":{"$numberLong":"103400000086"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"86"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1457"},"long_id":{"$numberLong":"101400008186"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8186"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1458"},"long_id":{"$numberLong":"101000003301"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"3301"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1459"},"long_id":{"$numberLong":"104500009209"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9209"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1460"},"long_id":{"$numberLong":"101000005028"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5028"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1461"},"long_id":{"$numberLong":"101000005029"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5029"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1462"},"long_id":{"$numberLong":"101000005030"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5030"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1463"},"long_id":{"$numberLong":"101000005032"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5032"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1464"},"long_id":{"$numberLong":"101000005033"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5033"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1465"},"long_id":{"$numberLong":"101000005034"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5034"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1466"},"long_id":{"$numberLong":"101000005035"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5035"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1467"},"long_id":{"$numberLong":"105100000002"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"2"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1468"},"long_id":{"$numberLong":"105100000003"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"3"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1469"},"long_id":{"$numberLong":"105100000004"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"4"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1470"},"long_id":{"$numberLong":"105100000005"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"5"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1471"},"long_id":{"$numberLong":"105100000006"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"6"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1472"},"long_id":{"$numberLong":"105100000007"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"7"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1473"},"long_id":{"$numberLong":"105100000008"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"8"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1474"},"long_id":{"$numberLong":"105100000009"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"9"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1475"},"long_id":{"$numberLong":"105100000010"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"10"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1476"},"long_id":{"$numberLong":"105100000011"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"11"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1477"},"long_id":{"$numberLong":"105100000012"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"12"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1478"},"long_id":{"$numberLong":"105100000013"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"13"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1479"},"long_id":{"$numberLong":"105100000014"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"14"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1480"},"long_id":{"$numberLong":"105100000015"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"15"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1481"},"long_id":{"$numberLong":"105100000016"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"16"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1482"},"long_id":{"$numberLong":"105100000017"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"17"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1483"},"long_id":{"$numberLong":"105100000018"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"18"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1484"},"long_id":{"$numberLong":"105300002007"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2007"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1485"},"long_id":{"$numberLong":"105300002008"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2008"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1486"},"long_id":{"$numberLong":"105300002009"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2009"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1487"},"long_id":{"$numberLong":"105300002010"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2010"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1488"},"long_id":{"$numberLong":"105300002011"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2011"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1489"},"long_id":{"$numberLong":"105300002012"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2012"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1490"},"long_id":{"$numberLong":"105300002013"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2013"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1491"},"long_id":{"$numberLong":"105300002014"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2014"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1492"},"long_id":{"$numberLong":"105300002015"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2015"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1493"},"long_id":{"$numberLong":"105300002016"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2016"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1494"},"long_id":{"$numberLong":"105300002017"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2017"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1495"},"long_id":{"$numberLong":"105300002018"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2018"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1496"},"long_id":{"$numberLong":"105300002019"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2019"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1497"},"long_id":{"$numberLong":"105300002020"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2020"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1498"},"long_id":{"$numberLong":"105300002021"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2021"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1499"},"long_id":{"$numberLong":"105300002022"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2022"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1500"},"long_id":{"$numberLong":"105300002023"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2023"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1501"},"long_id":{"$numberLong":"105300002024"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2024"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1502"},"long_id":{"$numberLong":"105300002025"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2025"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1503"},"long_id":{"$numberLong":"105300002026"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2026"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1504"},"long_id":{"$numberLong":"105300002027"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2027"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1505"},"long_id":{"$numberLong":"105300002028"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2028"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1506"},"long_id":{"$numberLong":"105300002029"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2029"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1507"},"long_id":{"$numberLong":"105300002030"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2030"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1508"},"long_id":{"$numberLong":"105300002031"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2031"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1509"},"long_id":{"$numberLong":"105300002032"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2032"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1510"},"long_id":{"$numberLong":"105300002033"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2033"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1511"},"long_id":{"$numberLong":"105300002034"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2034"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1512"},"long_id":{"$numberLong":"105300002035"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2035"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1513"},"long_id":{"$numberLong":"105300002036"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2036"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1514"},"long_id":{"$numberLong":"105300002037"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2037"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1515"},"long_id":{"$numberLong":"105300002038"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2038"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1516"},"long_id":{"$numberLong":"105300002039"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2039"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1517"},"long_id":{"$numberLong":"105300002040"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2040"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1518"},"long_id":{"$numberLong":"105300002041"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2041"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1519"},"long_id":{"$numberLong":"105300002042"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2042"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1520"},"long_id":{"$numberLong":"105300002043"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2043"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1521"},"long_id":{"$numberLong":"105300002044"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2044"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1522"},"long_id":{"$numberLong":"105300002045"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2045"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1523"},"long_id":{"$numberLong":"105300002046"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2046"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1524"},"long_id":{"$numberLong":"105300002047"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2047"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1525"},"long_id":{"$numberLong":"105300002048"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2048"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1526"},"long_id":{"$numberLong":"105300002049"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2049"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1527"},"long_id":{"$numberLong":"105300002050"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2050"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1528"},"long_id":{"$numberLong":"105300002051"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2051"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1529"},"long_id":{"$numberLong":"105300002052"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2052"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1530"},"long_id":{"$numberLong":"105300002053"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2053"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1531"},"long_id":{"$numberLong":"105300002054"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2054"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1532"},"long_id":{"$numberLong":"105300002055"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2055"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1533"},"long_id":{"$numberLong":"105300002056"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2056"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1534"},"long_id":{"$numberLong":"105300002057"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2057"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1535"},"long_id":{"$numberLong":"105300002058"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2058"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1536"},"long_id":{"$numberLong":"105300002059"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2059"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1537"},"long_id":{"$numberLong":"105300002060"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2060"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1538"},"long_id":{"$numberLong":"103300000084"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"84"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1539"},"long_id":{"$numberLong":"103300000085"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"85"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1540"},"long_id":{"$numberLong":"103300000086"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"86"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1541"},"long_id":{"$numberLong":"103300000087"},"type_id":{"$numberLong":"33"},"item_id":{"$numberLong":"87"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1542"},"long_id":{"$numberLong":"105400000001"},"type_id":{"$numberLong":"54"},"item_id":{"$numberLong":"1"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1543"},"long_id":{"$numberLong":"100400001034"},"type_id":{"$numberLong":"4"},"item_id":{"$numberLong":"1034"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1544"},"long_id":{"$numberLong":"101000003011"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"3011"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1545"},"long_id":{"$numberLong":"104500009210"},"type_id":{"$numberLong":"45"},"item_id":{"$numberLong":"9210"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1546"},"long_id":{"$numberLong":"100400001035"},"type_id":{"$numberLong":"4"},"item_id":{"$numberLong":"1035"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1547"},"long_id":{"$numberLong":"100400001036"},"type_id":{"$numberLong":"4"},"item_id":{"$numberLong":"1036"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1548"},"long_id":{"$numberLong":"100400001037"},"type_id":{"$numberLong":"4"},"item_id":{"$numberLong":"1037"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1549"},"long_id":{"$numberLong":"100400001038"},"type_id":{"$numberLong":"4"},"item_id":{"$numberLong":"1038"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1550"},"long_id":{"$numberLong":"100400001039"},"type_id":{"$numberLong":"4"},"item_id":{"$numberLong":"1039"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1551"},"long_id":{"$numberLong":"100400001040"},"type_id":{"$numberLong":"4"},"item_id":{"$numberLong":"1040"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1552"},"long_id":{"$numberLong":"100400001041"},"type_id":{"$numberLong":"4"},"item_id":{"$numberLong":"1041"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1553"},"long_id":{"$numberLong":"101000001200"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"1200"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1554"},"long_id":{"$numberLong":"101000001201"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"1201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1555"},"long_id":{"$numberLong":"101000005036"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5036"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1556"},"long_id":{"$numberLong":"101000005037"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5037"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1557"},"long_id":{"$numberLong":"101000005038"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5038"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1558"},"long_id":{"$numberLong":"101000005039"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5039"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1559"},"long_id":{"$numberLong":"101000005040"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5040"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1560"},"long_id":{"$numberLong":"105300002061"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2061"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1561"},"long_id":{"$numberLong":"105300002062"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2062"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1562"},"long_id":{"$numberLong":"105300002063"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2063"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1563"},"long_id":{"$numberLong":"105300002064"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2064"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1564"},"long_id":{"$numberLong":"105100000019"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"19"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1565"},"long_id":{"$numberLong":"105100000020"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"20"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1566"},"long_id":{"$numberLong":"105100000021"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"21"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1567"},"long_id":{"$numberLong":"105100000022"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"22"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1568"},"long_id":{"$numberLong":"105100000201"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1569"},"long_id":{"$numberLong":"105100000001"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"1"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1570"},"long_id":{"$numberLong":"103400020002"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20002"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1571"},"long_id":{"$numberLong":"101408120002"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120002"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1572"},"long_id":{"$numberLong":"103900001502"},"type_id":{"$numberLong":"39"},"item_id":{"$numberLong":"1502"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1573"},"long_id":{"$numberLong":"103900002001"},"type_id":{"$numberLong":"39"},"item_id":{"$numberLong":"2001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1574"},"long_id":{"$numberLong":"103900002101"},"type_id":{"$numberLong":"39"},"item_id":{"$numberLong":"2101"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1575"},"long_id":{"$numberLong":"103900002501"},"type_id":{"$numberLong":"39"},"item_id":{"$numberLong":"2501"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1576"},"long_id":{"$numberLong":"103900004001"},"type_id":{"$numberLong":"39"},"item_id":{"$numberLong":"4001"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1577"},"long_id":{"$numberLong":"103400020009"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"20009"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1578"},"long_id":{"$numberLong":"103400000089"},"type_id":{"$numberLong":"34"},"item_id":{"$numberLong":"89"},"star":{"$numberLong":"1"}} +{"_id":{"$numberLong":"1579"},"long_id":{"$numberLong":"101408120009"},"type_id":{"$numberLong":"14"},"item_id":{"$numberLong":"8120009"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1580"},"long_id":{"$numberLong":"100400001042"},"type_id":{"$numberLong":"4"},"item_id":{"$numberLong":"1042"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1581"},"long_id":{"$numberLong":"100400001043"},"type_id":{"$numberLong":"4"},"item_id":{"$numberLong":"1043"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1582"},"long_id":{"$numberLong":"100400001044"},"type_id":{"$numberLong":"4"},"item_id":{"$numberLong":"1044"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1583"},"long_id":{"$numberLong":"100400001045"},"type_id":{"$numberLong":"4"},"item_id":{"$numberLong":"1045"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1584"},"long_id":{"$numberLong":"101000005041"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5041"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1585"},"long_id":{"$numberLong":"101000005042"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5042"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1586"},"long_id":{"$numberLong":"101000005043"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5043"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1587"},"long_id":{"$numberLong":"101000005044"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5044"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1588"},"long_id":{"$numberLong":"101000005045"},"type_id":{"$numberLong":"10"},"item_id":{"$numberLong":"5045"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1589"},"long_id":{"$numberLong":"105300002065"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2065"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1590"},"long_id":{"$numberLong":"105300002066"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2066"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1591"},"long_id":{"$numberLong":"105300002067"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2067"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1592"},"long_id":{"$numberLong":"105300002068"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2068"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1593"},"long_id":{"$numberLong":"105300002069"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2069"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1594"},"long_id":{"$numberLong":"105300002070"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2070"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1595"},"long_id":{"$numberLong":"105300002071"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2071"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1596"},"long_id":{"$numberLong":"105300002072"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2072"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1597"},"long_id":{"$numberLong":"105300002073"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2073"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1598"},"long_id":{"$numberLong":"105300002074"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2074"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1599"},"long_id":{"$numberLong":"105300002075"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2075"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1600"},"long_id":{"$numberLong":"105300002076"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2076"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1601"},"long_id":{"$numberLong":"105300002077"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2077"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1602"},"long_id":{"$numberLong":"105300002078"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2078"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1603"},"long_id":{"$numberLong":"105300002079"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2079"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1604"},"long_id":{"$numberLong":"105300002080"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2080"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1605"},"long_id":{"$numberLong":"105300002081"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2081"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1606"},"long_id":{"$numberLong":"105300002082"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2082"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1607"},"long_id":{"$numberLong":"105300002083"},"type_id":{"$numberLong":"53"},"item_id":{"$numberLong":"2083"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1608"},"long_id":{"$numberLong":"105100000202"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"202"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1609"},"long_id":{"$numberLong":"105100000203"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"203"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1610"},"long_id":{"$numberLong":"105100000205"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"205"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1611"},"long_id":{"$numberLong":"105100000206"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"206"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1612"},"long_id":{"$numberLong":"105100000207"},"type_id":{"$numberLong":"51"},"item_id":{"$numberLong":"207"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1613"},"long_id":{"$numberLong":"103900001701"},"type_id":{"$numberLong":"39"},"item_id":{"$numberLong":"1701"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1614"},"long_id":{"$numberLong":"103900005201"},"type_id":{"$numberLong":"39"},"item_id":{"$numberLong":"5201"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1615"},"long_id":{"$numberLong":"103902000901"},"type_id":{"$numberLong":"39"},"item_id":{"$numberLong":"2000901"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1616"},"long_id":{"$numberLong":"104000007017"},"type_id":{"$numberLong":"40"},"item_id":{"$numberLong":"7017"},"star":{"$numberLong":"0"}} +{"_id":{"$numberLong":"1617"},"long_id":{"$numberLong":"104100008035"},"type_id":{"$numberLong":"41"},"item_id":{"$numberLong":"8035"},"star":{"$numberLong":"0"}} diff --git a/conf/jsonconf/s_c_maincity_level_up.json b/conf/jsonconf/s_c_maincity_level_up.json new file mode 100644 index 0000000..ee45637 --- /dev/null +++ b/conf/jsonconf/s_c_maincity_level_up.json @@ -0,0 +1,100 @@ +{"_id":{"$numberLong":"100"},"level":{"$numberLong":"100"},"need_exp":{"$numberLong":"84077"},"strength_limit":{"$numberLong":"170"},"max_cost":{"$numberLong":"130"},"strength_add":{"$numberLong":"131"}} +{"_id":{"$numberLong":"99"},"level":{"$numberLong":"99"},"need_exp":{"$numberLong":"81977"},"strength_limit":{"$numberLong":"169"},"max_cost":{"$numberLong":"129"},"strength_add":{"$numberLong":"130"}} +{"_id":{"$numberLong":"98"},"level":{"$numberLong":"98"},"need_exp":{"$numberLong":"79907"},"strength_limit":{"$numberLong":"168"},"max_cost":{"$numberLong":"129"},"strength_add":{"$numberLong":"129"}} +{"_id":{"$numberLong":"97"},"level":{"$numberLong":"97"},"need_exp":{"$numberLong":"77867"},"strength_limit":{"$numberLong":"167"},"max_cost":{"$numberLong":"128"},"strength_add":{"$numberLong":"128"}} +{"_id":{"$numberLong":"96"},"level":{"$numberLong":"96"},"need_exp":{"$numberLong":"75857"},"strength_limit":{"$numberLong":"166"},"max_cost":{"$numberLong":"128"},"strength_add":{"$numberLong":"127"}} +{"_id":{"$numberLong":"95"},"level":{"$numberLong":"95"},"need_exp":{"$numberLong":"73877"},"strength_limit":{"$numberLong":"165"},"max_cost":{"$numberLong":"127"},"strength_add":{"$numberLong":"126"}} +{"_id":{"$numberLong":"94"},"level":{"$numberLong":"94"},"need_exp":{"$numberLong":"71927"},"strength_limit":{"$numberLong":"164"},"max_cost":{"$numberLong":"127"},"strength_add":{"$numberLong":"125"}} +{"_id":{"$numberLong":"93"},"level":{"$numberLong":"93"},"need_exp":{"$numberLong":"70007"},"strength_limit":{"$numberLong":"163"},"max_cost":{"$numberLong":"126"},"strength_add":{"$numberLong":"124"}} +{"_id":{"$numberLong":"92"},"level":{"$numberLong":"92"},"need_exp":{"$numberLong":"68117"},"strength_limit":{"$numberLong":"162"},"max_cost":{"$numberLong":"126"},"strength_add":{"$numberLong":"123"}} +{"_id":{"$numberLong":"91"},"level":{"$numberLong":"91"},"need_exp":{"$numberLong":"66257"},"strength_limit":{"$numberLong":"161"},"max_cost":{"$numberLong":"125"},"strength_add":{"$numberLong":"122"}} +{"_id":{"$numberLong":"90"},"level":{"$numberLong":"90"},"need_exp":{"$numberLong":"64427"},"strength_limit":{"$numberLong":"160"},"max_cost":{"$numberLong":"125"},"strength_add":{"$numberLong":"121"}} +{"_id":{"$numberLong":"89"},"level":{"$numberLong":"89"},"need_exp":{"$numberLong":"62627"},"strength_limit":{"$numberLong":"159"},"max_cost":{"$numberLong":"124"},"strength_add":{"$numberLong":"120"}} +{"_id":{"$numberLong":"88"},"level":{"$numberLong":"88"},"need_exp":{"$numberLong":"60857"},"strength_limit":{"$numberLong":"158"},"max_cost":{"$numberLong":"124"},"strength_add":{"$numberLong":"119"}} +{"_id":{"$numberLong":"87"},"level":{"$numberLong":"87"},"need_exp":{"$numberLong":"59117"},"strength_limit":{"$numberLong":"157"},"max_cost":{"$numberLong":"123"},"strength_add":{"$numberLong":"118"}} +{"_id":{"$numberLong":"86"},"level":{"$numberLong":"86"},"need_exp":{"$numberLong":"57407"},"strength_limit":{"$numberLong":"156"},"max_cost":{"$numberLong":"123"},"strength_add":{"$numberLong":"117"}} +{"_id":{"$numberLong":"85"},"level":{"$numberLong":"85"},"need_exp":{"$numberLong":"55727"},"strength_limit":{"$numberLong":"155"},"max_cost":{"$numberLong":"122"},"strength_add":{"$numberLong":"116"}} +{"_id":{"$numberLong":"84"},"level":{"$numberLong":"84"},"need_exp":{"$numberLong":"54077"},"strength_limit":{"$numberLong":"154"},"max_cost":{"$numberLong":"122"},"strength_add":{"$numberLong":"115"}} +{"_id":{"$numberLong":"83"},"level":{"$numberLong":"83"},"need_exp":{"$numberLong":"52457"},"strength_limit":{"$numberLong":"153"},"max_cost":{"$numberLong":"121"},"strength_add":{"$numberLong":"114"}} +{"_id":{"$numberLong":"82"},"level":{"$numberLong":"82"},"need_exp":{"$numberLong":"50867"},"strength_limit":{"$numberLong":"152"},"max_cost":{"$numberLong":"121"},"strength_add":{"$numberLong":"113"}} +{"_id":{"$numberLong":"81"},"level":{"$numberLong":"81"},"need_exp":{"$numberLong":"49307"},"strength_limit":{"$numberLong":"151"},"max_cost":{"$numberLong":"120"},"strength_add":{"$numberLong":"112"}} +{"_id":{"$numberLong":"80"},"level":{"$numberLong":"80"},"need_exp":{"$numberLong":"47777"},"strength_limit":{"$numberLong":"150"},"max_cost":{"$numberLong":"120"},"strength_add":{"$numberLong":"111"}} +{"_id":{"$numberLong":"79"},"level":{"$numberLong":"79"},"need_exp":{"$numberLong":"46277"},"strength_limit":{"$numberLong":"149"},"max_cost":{"$numberLong":"119"},"strength_add":{"$numberLong":"110"}} +{"_id":{"$numberLong":"78"},"level":{"$numberLong":"78"},"need_exp":{"$numberLong":"44807"},"strength_limit":{"$numberLong":"148"},"max_cost":{"$numberLong":"119"},"strength_add":{"$numberLong":"109"}} +{"_id":{"$numberLong":"77"},"level":{"$numberLong":"77"},"need_exp":{"$numberLong":"43367"},"strength_limit":{"$numberLong":"147"},"max_cost":{"$numberLong":"118"},"strength_add":{"$numberLong":"108"}} +{"_id":{"$numberLong":"76"},"level":{"$numberLong":"76"},"need_exp":{"$numberLong":"41957"},"strength_limit":{"$numberLong":"146"},"max_cost":{"$numberLong":"118"},"strength_add":{"$numberLong":"107"}} +{"_id":{"$numberLong":"75"},"level":{"$numberLong":"75"},"need_exp":{"$numberLong":"40577"},"strength_limit":{"$numberLong":"145"},"max_cost":{"$numberLong":"117"},"strength_add":{"$numberLong":"106"}} +{"_id":{"$numberLong":"74"},"level":{"$numberLong":"74"},"need_exp":{"$numberLong":"39227"},"strength_limit":{"$numberLong":"144"},"max_cost":{"$numberLong":"117"},"strength_add":{"$numberLong":"105"}} +{"_id":{"$numberLong":"73"},"level":{"$numberLong":"73"},"need_exp":{"$numberLong":"37907"},"strength_limit":{"$numberLong":"143"},"max_cost":{"$numberLong":"116"},"strength_add":{"$numberLong":"104"}} +{"_id":{"$numberLong":"72"},"level":{"$numberLong":"72"},"need_exp":{"$numberLong":"36617"},"strength_limit":{"$numberLong":"142"},"max_cost":{"$numberLong":"116"},"strength_add":{"$numberLong":"103"}} +{"_id":{"$numberLong":"71"},"level":{"$numberLong":"71"},"need_exp":{"$numberLong":"35357"},"strength_limit":{"$numberLong":"141"},"max_cost":{"$numberLong":"115"},"strength_add":{"$numberLong":"102"}} +{"_id":{"$numberLong":"70"},"level":{"$numberLong":"70"},"need_exp":{"$numberLong":"34127"},"strength_limit":{"$numberLong":"140"},"max_cost":{"$numberLong":"115"},"strength_add":{"$numberLong":"101"}} +{"_id":{"$numberLong":"69"},"level":{"$numberLong":"69"},"need_exp":{"$numberLong":"32927"},"strength_limit":{"$numberLong":"139"},"max_cost":{"$numberLong":"114"},"strength_add":{"$numberLong":"100"}} +{"_id":{"$numberLong":"68"},"level":{"$numberLong":"68"},"need_exp":{"$numberLong":"31757"},"strength_limit":{"$numberLong":"138"},"max_cost":{"$numberLong":"113"},"strength_add":{"$numberLong":"99"}} +{"_id":{"$numberLong":"67"},"level":{"$numberLong":"67"},"need_exp":{"$numberLong":"30617"},"strength_limit":{"$numberLong":"137"},"max_cost":{"$numberLong":"112"},"strength_add":{"$numberLong":"98"}} +{"_id":{"$numberLong":"66"},"level":{"$numberLong":"66"},"need_exp":{"$numberLong":"29507"},"strength_limit":{"$numberLong":"136"},"max_cost":{"$numberLong":"111"},"strength_add":{"$numberLong":"97"}} +{"_id":{"$numberLong":"65"},"level":{"$numberLong":"65"},"need_exp":{"$numberLong":"28427"},"strength_limit":{"$numberLong":"135"},"max_cost":{"$numberLong":"110"},"strength_add":{"$numberLong":"96"}} +{"_id":{"$numberLong":"64"},"level":{"$numberLong":"64"},"need_exp":{"$numberLong":"27377"},"strength_limit":{"$numberLong":"134"},"max_cost":{"$numberLong":"109"},"strength_add":{"$numberLong":"95"}} +{"_id":{"$numberLong":"63"},"level":{"$numberLong":"63"},"need_exp":{"$numberLong":"26357"},"strength_limit":{"$numberLong":"133"},"max_cost":{"$numberLong":"108"},"strength_add":{"$numberLong":"94"}} +{"_id":{"$numberLong":"62"},"level":{"$numberLong":"62"},"need_exp":{"$numberLong":"25367"},"strength_limit":{"$numberLong":"132"},"max_cost":{"$numberLong":"107"},"strength_add":{"$numberLong":"93"}} +{"_id":{"$numberLong":"61"},"level":{"$numberLong":"61"},"need_exp":{"$numberLong":"24407"},"strength_limit":{"$numberLong":"131"},"max_cost":{"$numberLong":"106"},"strength_add":{"$numberLong":"92"}} +{"_id":{"$numberLong":"60"},"level":{"$numberLong":"60"},"need_exp":{"$numberLong":"23477"},"strength_limit":{"$numberLong":"130"},"max_cost":{"$numberLong":"105"},"strength_add":{"$numberLong":"91"}} +{"_id":{"$numberLong":"59"},"level":{"$numberLong":"59"},"need_exp":{"$numberLong":"22577"},"strength_limit":{"$numberLong":"129"},"max_cost":{"$numberLong":"104"},"strength_add":{"$numberLong":"90"}} +{"_id":{"$numberLong":"58"},"level":{"$numberLong":"58"},"need_exp":{"$numberLong":"21707"},"strength_limit":{"$numberLong":"128"},"max_cost":{"$numberLong":"103"},"strength_add":{"$numberLong":"89"}} +{"_id":{"$numberLong":"57"},"level":{"$numberLong":"57"},"need_exp":{"$numberLong":"20867"},"strength_limit":{"$numberLong":"127"},"max_cost":{"$numberLong":"102"},"strength_add":{"$numberLong":"88"}} +{"_id":{"$numberLong":"56"},"level":{"$numberLong":"56"},"need_exp":{"$numberLong":"20057"},"strength_limit":{"$numberLong":"126"},"max_cost":{"$numberLong":"101"},"strength_add":{"$numberLong":"87"}} +{"_id":{"$numberLong":"55"},"level":{"$numberLong":"55"},"need_exp":{"$numberLong":"19277"},"strength_limit":{"$numberLong":"125"},"max_cost":{"$numberLong":"100"},"strength_add":{"$numberLong":"86"}} +{"_id":{"$numberLong":"54"},"level":{"$numberLong":"54"},"need_exp":{"$numberLong":"18527"},"strength_limit":{"$numberLong":"124"},"max_cost":{"$numberLong":"99"},"strength_add":{"$numberLong":"85"}} +{"_id":{"$numberLong":"53"},"level":{"$numberLong":"53"},"need_exp":{"$numberLong":"17807"},"strength_limit":{"$numberLong":"123"},"max_cost":{"$numberLong":"98"},"strength_add":{"$numberLong":"84"}} +{"_id":{"$numberLong":"52"},"level":{"$numberLong":"52"},"need_exp":{"$numberLong":"17117"},"strength_limit":{"$numberLong":"122"},"max_cost":{"$numberLong":"97"},"strength_add":{"$numberLong":"83"}} +{"_id":{"$numberLong":"51"},"level":{"$numberLong":"51"},"need_exp":{"$numberLong":"16457"},"strength_limit":{"$numberLong":"121"},"max_cost":{"$numberLong":"96"},"strength_add":{"$numberLong":"82"}} +{"_id":{"$numberLong":"50"},"level":{"$numberLong":"50"},"need_exp":{"$numberLong":"15827"},"strength_limit":{"$numberLong":"120"},"max_cost":{"$numberLong":"95"},"strength_add":{"$numberLong":"81"}} +{"_id":{"$numberLong":"49"},"level":{"$numberLong":"49"},"need_exp":{"$numberLong":"15203"},"strength_limit":{"$numberLong":"118"},"max_cost":{"$numberLong":"94"},"strength_add":{"$numberLong":"80"}} +{"_id":{"$numberLong":"48"},"level":{"$numberLong":"48"},"need_exp":{"$numberLong":"14585"},"strength_limit":{"$numberLong":"116"},"max_cost":{"$numberLong":"93"},"strength_add":{"$numberLong":"79"}} +{"_id":{"$numberLong":"47"},"level":{"$numberLong":"47"},"need_exp":{"$numberLong":"13973"},"strength_limit":{"$numberLong":"114"},"max_cost":{"$numberLong":"92"},"strength_add":{"$numberLong":"78"}} +{"_id":{"$numberLong":"46"},"level":{"$numberLong":"46"},"need_exp":{"$numberLong":"13367"},"strength_limit":{"$numberLong":"112"},"max_cost":{"$numberLong":"91"},"strength_add":{"$numberLong":"77"}} +{"_id":{"$numberLong":"45"},"level":{"$numberLong":"45"},"need_exp":{"$numberLong":"12767"},"strength_limit":{"$numberLong":"110"},"max_cost":{"$numberLong":"90"},"strength_add":{"$numberLong":"76"}} +{"_id":{"$numberLong":"44"},"level":{"$numberLong":"44"},"need_exp":{"$numberLong":"12173"},"strength_limit":{"$numberLong":"108"},"max_cost":{"$numberLong":"89"},"strength_add":{"$numberLong":"75"}} +{"_id":{"$numberLong":"43"},"level":{"$numberLong":"43"},"need_exp":{"$numberLong":"11585"},"strength_limit":{"$numberLong":"106"},"max_cost":{"$numberLong":"88"},"strength_add":{"$numberLong":"74"}} +{"_id":{"$numberLong":"42"},"level":{"$numberLong":"42"},"need_exp":{"$numberLong":"11003"},"strength_limit":{"$numberLong":"104"},"max_cost":{"$numberLong":"87"},"strength_add":{"$numberLong":"73"}} +{"_id":{"$numberLong":"41"},"level":{"$numberLong":"41"},"need_exp":{"$numberLong":"10427"},"strength_limit":{"$numberLong":"102"},"max_cost":{"$numberLong":"86"},"strength_add":{"$numberLong":"72"}} +{"_id":{"$numberLong":"40"},"level":{"$numberLong":"40"},"need_exp":{"$numberLong":"9857"},"strength_limit":{"$numberLong":"100"},"max_cost":{"$numberLong":"85"},"strength_add":{"$numberLong":"71"}} +{"_id":{"$numberLong":"39"},"level":{"$numberLong":"39"},"need_exp":{"$numberLong":"9293"},"strength_limit":{"$numberLong":"98"},"max_cost":{"$numberLong":"84"},"strength_add":{"$numberLong":"70"}} +{"_id":{"$numberLong":"38"},"level":{"$numberLong":"38"},"need_exp":{"$numberLong":"8735"},"strength_limit":{"$numberLong":"96"},"max_cost":{"$numberLong":"83"},"strength_add":{"$numberLong":"69"}} +{"_id":{"$numberLong":"37"},"level":{"$numberLong":"37"},"need_exp":{"$numberLong":"8183"},"strength_limit":{"$numberLong":"94"},"max_cost":{"$numberLong":"82"},"strength_add":{"$numberLong":"68"}} +{"_id":{"$numberLong":"36"},"level":{"$numberLong":"36"},"need_exp":{"$numberLong":"7637"},"strength_limit":{"$numberLong":"92"},"max_cost":{"$numberLong":"81"},"strength_add":{"$numberLong":"67"}} +{"_id":{"$numberLong":"35"},"level":{"$numberLong":"35"},"need_exp":{"$numberLong":"7097"},"strength_limit":{"$numberLong":"90"},"max_cost":{"$numberLong":"80"},"strength_add":{"$numberLong":"66"}} +{"_id":{"$numberLong":"34"},"level":{"$numberLong":"34"},"need_exp":{"$numberLong":"6563"},"strength_limit":{"$numberLong":"88"},"max_cost":{"$numberLong":"79"},"strength_add":{"$numberLong":"65"}} +{"_id":{"$numberLong":"33"},"level":{"$numberLong":"33"},"need_exp":{"$numberLong":"6035"},"strength_limit":{"$numberLong":"86"},"max_cost":{"$numberLong":"78"},"strength_add":{"$numberLong":"64"}} +{"_id":{"$numberLong":"32"},"level":{"$numberLong":"32"},"need_exp":{"$numberLong":"5513"},"strength_limit":{"$numberLong":"84"},"max_cost":{"$numberLong":"77"},"strength_add":{"$numberLong":"63"}} +{"_id":{"$numberLong":"31"},"level":{"$numberLong":"31"},"need_exp":{"$numberLong":"4997"},"strength_limit":{"$numberLong":"82"},"max_cost":{"$numberLong":"76"},"strength_add":{"$numberLong":"62"}} +{"_id":{"$numberLong":"30"},"level":{"$numberLong":"30"},"need_exp":{"$numberLong":"4487"},"strength_limit":{"$numberLong":"80"},"max_cost":{"$numberLong":"75"},"strength_add":{"$numberLong":"61"}} +{"_id":{"$numberLong":"29"},"level":{"$numberLong":"29"},"need_exp":{"$numberLong":"3983"},"strength_limit":{"$numberLong":"78"},"max_cost":{"$numberLong":"74"},"strength_add":{"$numberLong":"60"}} +{"_id":{"$numberLong":"28"},"level":{"$numberLong":"28"},"need_exp":{"$numberLong":"3485"},"strength_limit":{"$numberLong":"75"},"max_cost":{"$numberLong":"73"},"strength_add":{"$numberLong":"59"}} +{"_id":{"$numberLong":"27"},"level":{"$numberLong":"27"},"need_exp":{"$numberLong":"2993"},"strength_limit":{"$numberLong":"72"},"max_cost":{"$numberLong":"72"},"strength_add":{"$numberLong":"58"}} +{"_id":{"$numberLong":"26"},"level":{"$numberLong":"26"},"need_exp":{"$numberLong":"2507"},"strength_limit":{"$numberLong":"69"},"max_cost":{"$numberLong":"71"},"strength_add":{"$numberLong":"57"}} +{"_id":{"$numberLong":"25"},"level":{"$numberLong":"25"},"need_exp":{"$numberLong":"2027"},"strength_limit":{"$numberLong":"66"},"max_cost":{"$numberLong":"70"},"strength_add":{"$numberLong":"56"}} +{"_id":{"$numberLong":"24"},"level":{"$numberLong":"24"},"need_exp":{"$numberLong":"1889"},"strength_limit":{"$numberLong":"63"},"max_cost":{"$numberLong":"69"},"strength_add":{"$numberLong":"55"}} +{"_id":{"$numberLong":"23"},"level":{"$numberLong":"23"},"need_exp":{"$numberLong":"1753"},"strength_limit":{"$numberLong":"60"},"max_cost":{"$numberLong":"68"},"strength_add":{"$numberLong":"54"}} +{"_id":{"$numberLong":"22"},"level":{"$numberLong":"22"},"need_exp":{"$numberLong":"1619"},"strength_limit":{"$numberLong":"57"},"max_cost":{"$numberLong":"67"},"strength_add":{"$numberLong":"53"}} +{"_id":{"$numberLong":"21"},"level":{"$numberLong":"21"},"need_exp":{"$numberLong":"1487"},"strength_limit":{"$numberLong":"54"},"max_cost":{"$numberLong":"66"},"strength_add":{"$numberLong":"52"}} +{"_id":{"$numberLong":"20"},"level":{"$numberLong":"20"},"need_exp":{"$numberLong":"1357"},"strength_limit":{"$numberLong":"51"},"max_cost":{"$numberLong":"65"},"strength_add":{"$numberLong":"51"}} +{"_id":{"$numberLong":"19"},"level":{"$numberLong":"19"},"need_exp":{"$numberLong":"1229"},"strength_limit":{"$numberLong":"50"},"max_cost":{"$numberLong":"64"},"strength_add":{"$numberLong":"50"}} +{"_id":{"$numberLong":"18"},"level":{"$numberLong":"18"},"need_exp":{"$numberLong":"1103"},"strength_limit":{"$numberLong":"49"},"max_cost":{"$numberLong":"63"},"strength_add":{"$numberLong":"49"}} +{"_id":{"$numberLong":"17"},"level":{"$numberLong":"17"},"need_exp":{"$numberLong":"979"},"strength_limit":{"$numberLong":"48"},"max_cost":{"$numberLong":"62"},"strength_add":{"$numberLong":"48"}} +{"_id":{"$numberLong":"16"},"level":{"$numberLong":"16"},"need_exp":{"$numberLong":"857"},"strength_limit":{"$numberLong":"47"},"max_cost":{"$numberLong":"61"},"strength_add":{"$numberLong":"47"}} +{"_id":{"$numberLong":"15"},"level":{"$numberLong":"15"},"need_exp":{"$numberLong":"737"},"strength_limit":{"$numberLong":"46"},"max_cost":{"$numberLong":"60"},"strength_add":{"$numberLong":"46"}} +{"_id":{"$numberLong":"14"},"level":{"$numberLong":"14"},"need_exp":{"$numberLong":"619"},"strength_limit":{"$numberLong":"45"},"max_cost":{"$numberLong":"59"},"strength_add":{"$numberLong":"45"}} +{"_id":{"$numberLong":"13"},"level":{"$numberLong":"13"},"need_exp":{"$numberLong":"503"},"strength_limit":{"$numberLong":"44"},"max_cost":{"$numberLong":"58"},"strength_add":{"$numberLong":"44"}} +{"_id":{"$numberLong":"12"},"level":{"$numberLong":"12"},"need_exp":{"$numberLong":"403"},"strength_limit":{"$numberLong":"43"},"max_cost":{"$numberLong":"57"},"strength_add":{"$numberLong":"43"}} +{"_id":{"$numberLong":"11"},"level":{"$numberLong":"11"},"need_exp":{"$numberLong":"323"},"strength_limit":{"$numberLong":"42"},"max_cost":{"$numberLong":"55"},"strength_add":{"$numberLong":"42"}} +{"_id":{"$numberLong":"10"},"level":{"$numberLong":"10"},"need_exp":{"$numberLong":"263"},"strength_limit":{"$numberLong":"41"},"max_cost":{"$numberLong":"52"},"strength_add":{"$numberLong":"41"}} +{"_id":{"$numberLong":"9"},"level":{"$numberLong":"9"},"need_exp":{"$numberLong":"213"},"strength_limit":{"$numberLong":"40"},"max_cost":{"$numberLong":"49"},"strength_add":{"$numberLong":"40"}} +{"_id":{"$numberLong":"8"},"level":{"$numberLong":"8"},"need_exp":{"$numberLong":"168"},"strength_limit":{"$numberLong":"39"},"max_cost":{"$numberLong":"48"},"strength_add":{"$numberLong":"39"}} +{"_id":{"$numberLong":"7"},"level":{"$numberLong":"7"},"need_exp":{"$numberLong":"128"},"strength_limit":{"$numberLong":"38"},"max_cost":{"$numberLong":"46"},"strength_add":{"$numberLong":"38"}} +{"_id":{"$numberLong":"6"},"level":{"$numberLong":"6"},"need_exp":{"$numberLong":"93"},"strength_limit":{"$numberLong":"37"},"max_cost":{"$numberLong":"44"},"strength_add":{"$numberLong":"37"}} +{"_id":{"$numberLong":"5"},"level":{"$numberLong":"5"},"need_exp":{"$numberLong":"63"},"strength_limit":{"$numberLong":"36"},"max_cost":{"$numberLong":"42"},"strength_add":{"$numberLong":"36"}} +{"_id":{"$numberLong":"4"},"level":{"$numberLong":"4"},"need_exp":{"$numberLong":"31"},"strength_limit":{"$numberLong":"35"},"max_cost":{"$numberLong":"40"},"strength_add":{"$numberLong":"35"}} +{"_id":{"$numberLong":"3"},"level":{"$numberLong":"3"},"need_exp":{"$numberLong":"18"},"strength_limit":{"$numberLong":"34"},"max_cost":{"$numberLong":"38"},"strength_add":{"$numberLong":"34"}} +{"_id":{"$numberLong":"2"},"level":{"$numberLong":"2"},"need_exp":{"$numberLong":"6"},"strength_limit":{"$numberLong":"33"},"max_cost":{"$numberLong":"36"},"strength_add":{"$numberLong":"33"}} +{"_id":{"$numberLong":"1"},"level":{"$numberLong":"1"},"need_exp":{"$numberLong":"0"},"strength_limit":{"$numberLong":"32"},"max_cost":{"$numberLong":"34"},"strength_add":{"$numberLong":"32"}} diff --git a/conf/jsonconf/s_c_society_permission.json b/conf/jsonconf/s_c_society_permission.json new file mode 100644 index 0000000..a734f8c --- /dev/null +++ b/conf/jsonconf/s_c_society_permission.json @@ -0,0 +1,5 @@ +{"_id":{"$numberLong":"1"},"member_position":"门主","member_position_num_limit":{"$numberLong":"1"},"open_boss_fight":{"$numberLong":"1"},"buy_extra_atk":{"$numberLong":"1"},"member_icon":"family_menzhu"} +{"_id":{"$numberLong":"2"},"member_position":"副门主","member_position_num_limit":{"$numberLong":"2"},"open_boss_fight":{"$numberLong":"1"},"buy_extra_atk":{"$numberLong":"1"},"member_icon":"family_fumenzhu"} +{"_id":{"$numberLong":"3"},"member_position":"长老","member_position_num_limit":{"$numberLong":"4"},"open_boss_fight":{"$numberLong":"0"},"buy_extra_atk":{"$numberLong":"0"},"member_icon":"family_zhanglao"} +{"_id":{"$numberLong":"4"},"member_position":"精英","member_position_num_limit":{"$numberLong":"1000"},"open_boss_fight":{"$numberLong":"0"},"buy_extra_atk":{"$numberLong":"0"},"member_icon":"family_jingying"} +{"_id":{"$numberLong":"5"},"member_position":"弟子","member_position_num_limit":{"$numberLong":"1000"},"open_boss_fight":{"$numberLong":"0"},"buy_extra_atk":{"$numberLong":"0"},"member_icon":"family_dizi"} diff --git a/hotfix.jar b/hotfix.jar new file mode 100644 index 0000000..1fe09b6 Binary files /dev/null and b/hotfix.jar differ diff --git a/idip.iml b/idip.iml new file mode 100644 index 0000000..1daccae --- /dev/null +++ b/idip.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..5ef34c1 --- /dev/null +++ b/pom.xml @@ -0,0 +1,121 @@ + + + 4.0.0 + + com.jmfy + idip + 1.0-SNAPSHOT + + + UTF-8 + 1.8 + + + + org.springframework.boot + spring-boot-starter-parent + 1.5.6.RELEASE + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.apache.thrift + libthrift + 0.9.2 + + + org.springframework.boot + spring-boot-starter-data-mongodb + + + + org.springframework.boot + spring-boot-starter-aop + + + + + com.alibaba + fastjson + 1.2.35 + + + + org.apache.kafka + kafka-clients + 0.9.0.1 + + + javax.resource + connector-api + 1.5 + + + net.sf.json-lib + json-lib + 2.4 + jdk15 + + + org.json + json + 20150729 + + + io.netty + netty + 3.7.0.Final + + + + org.springframework.boot + spring-boot-starter-data-redis + 1.5.2.RELEASE + + + com.google.code.gson + gson + 2.2.4 + + + + org.apache.commons + commons-lang3 + 3.1 + + + commons-io + commons-io + 1.3.2 + + + cn.hutool + hutool-all + 5.8.10 + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + maven-assembly-plugin + 3.0.0 + + + jar-with-dependencies + + + + + + \ No newline at end of file diff --git a/src/main/java/META-INF/MANIFEST.MF b/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 0000000..7fe9cf4 --- /dev/null +++ b/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: out + diff --git a/src/main/java/com/jmfy/Application.java b/src/main/java/com/jmfy/Application.java new file mode 100644 index 0000000..cc8c070 --- /dev/null +++ b/src/main/java/com/jmfy/Application.java @@ -0,0 +1,56 @@ +package com.jmfy; + +import com.jmfy.handler.BaseHandler; +import com.jmfy.handler.ManagerManager; +import com.jmfy.redisProperties.RedisAutoConfiguration; +import com.jmfy.server.ServerConfiguration; +import com.jmfy.server.ServerProperties; +import com.jmfy.thrift.pool.ThriftPoolUtils; +import com.jmfy.util.RedisUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.ConfigurableApplicationContext; + +import java.util.Map; + +/** + * @author Administrator + */ +@SpringBootApplication +public class Application { + private static final Logger LOGGER = LoggerFactory.getLogger(Application.class); + public static String plat = "android"; + public static int isLAN = 0; + public static String coreDb ; + public static void main(String[] args) { + + ConfigurableApplicationContext configurableApplicationContext = SpringApplication.run(Application.class, args); + ServerConfiguration serverConfiguration = configurableApplicationContext.getBean(ServerConfiguration.class); + ServerProperties serverProperties = serverConfiguration.getServerProperties(); + plat = serverProperties.getPlat(); + isLAN = serverProperties.getIsLAN(); + coreDb = serverProperties.getCoredb(); + LOGGER.info("main->plat={},isLAN={}",plat,isLAN); + ManagerManager handlerManager = ManagerManager.getInstance(); +// STableManager.getInstance().init(configurableApplicationContext); +// //初始化s表 +// STableManager.getInstance().initSTable(); +//// 初始化动态创建mongoClient 线程 +// AddMongoClient.startAddMongoClient(configurableApplicationContext); +// //kafka连接 +// RedisRecordSendThread.getInstance().start(); +// //redis初始化 + RedisAutoConfiguration redisAutoConfiguration = configurableApplicationContext.getBean(RedisAutoConfiguration.class); + RedisUtil.getInstence().init(redisAutoConfiguration.getRedisProperties()); + + //初使化连接池util类 + ThriftPoolUtils.getInstance().initContext(configurableApplicationContext); + //数据库 + Map commandHanderMap = configurableApplicationContext.getBeansOfType(BaseHandler.class); + for (BaseHandler handler : commandHanderMap.values()) { + handlerManager.addHandler(handler); + } + } +} diff --git a/src/main/java/com/jmfy/cenum/CommandEnm.java b/src/main/java/com/jmfy/cenum/CommandEnm.java new file mode 100644 index 0000000..42e49b0 --- /dev/null +++ b/src/main/java/com/jmfy/cenum/CommandEnm.java @@ -0,0 +1,323 @@ +package com.jmfy.cenum; + +/** + * @author Administrator + */ + +public enum CommandEnm { + //修改钻石 + IDIP_DO_CHANGE_DIAMOND_REQ(0,4097), + // 修改金币 + IDIP_DO_CHANGE_GOLD_REQ(1,4101), + //修改经验 + IDIP_DO_CHANGE_EXP_REQ(2,4103), + //修改等级 + IDIP_DO_CHANGE_LV_REQ(3,4105), + //修改体力 + IDIP_DO_CHANGE_ENERGE_REQ(4,4107), + //赠送道具 + IDIP_DO_GIFT_ITEM_REQ(5,4109), + //删除道具 + IDIP_DO_DEL_ITEM_REQ(6,4111), + //发送邮件 + IDIP_DO_SEND_MAIL_REQ(7,4113), + //删除邮件 + IDIP_DO_DEL_MAIL_REQ(8,4115), + //激活账号 + IDIP_DO_ACTIVATE_ACCOUNT_REQ(9,4117), + //封号 + IDIP_DO_BAN_COUNT_REQ(10,4119), + //解封 + IDIP_DO_UNBAN_COUNT_REQ(11,4121), + //角色信息查询 + IDIP_QUERY_ROLE_INFO_REQ(12,4123), + //账号角色查询 + IDIP_QUERY_COUNT_ROLE_REQ(13,4125), + //卡牌详细信息查询 + IDIP_QUERY_CARD_INFO_REQ(14,4127), + //邮件详情信息查询 + IDIP_QUERY_MAIL_INFO_REQ(15,4129), + //封号状态查询 + IDIP_QUERY_BAN_STATUS_REQ(16,4133), + //卡牌模板信息查询 + IDIP_QUERY_CARD_MODE_INFO_REQ(17,4135), + //踢下线 + IDIP_DO_KICK_OFFLINE_REQ(18,4137), + //删除激活账号 + IDIP_DO_DEL_ACTIVATEACCOUNT_REQ(19,4139), + //查询激活账号 + IDIP_QUERY_ACTIVATE_ACCOUNT_REQ(20,4141), + //大区配置 + IDIP_DO_SVR_CFG_REQ(21,4149), + //发送公告 + IDIP_DO_SEND_NOTICE_REQ(22,4151), + //查询公告 + IDIP_QUERY_NOTICE_INFO_REQ(23,4153), + //删除公告 + IDIP_DO_DEL_NOTICE_REQ(24,4155), + //发送走马灯 + IDIP_DO_SEND_LIGHT_REQ(25,4157), + //查询走马灯 + IDIP_QUERY_LIGHT_INFO_REQ(26,4159), + //删除走马灯 + IDIP_DO_DEL_LIGHT_REQ(27,4161), + //发送弹幕 + IDIP_DO_SEND_BARAGE_REQ(28,4163), + //查询弹幕 + IDIP_QUERY_BARAGE_INFO_REQ(29,4165), + //删除弹幕 + IDIP_DO_DEL_BARAGE_REQ(30,4167), + //全服发送奖励 + IDIP_DO_SENDALLSVR_REWARD_REQ(31,4193), + //查询全服奖励 + IDIP_QUERY_ALLSVRS_INFO_REQ(32,4197), + //删除全服奖励 + IDIP_DO_DEL_ALLSVRS_REQ(33,4199), + //安全-查询角色信息 + IDIP_QUERY_ROLE_INFO_AQ_REQ(34,4169), + //安全-修改金币 + IDIP_DO_CHANGE_GOLD_AQ_REQ(35,4171), + //安全-修改钻石数量 + IDIP_DO_CHANGE_DIAMOND_AQ_REQ(36,4173), + //安全-禁止参与排行榜 + IDIP_DO_BAN_RANK_AQ_REQ(37,4175), + //安全-禁止指定玩法 + IDIP_DO_BAN_PLAY_AQ_REQ(38,4177), + //安全-零收益 + IDIP_DO_ZEROINCOME_AQ_REQ(40,4181), + //安全-禁止所有玩法 + IDIP_DO_BAN_ALLPLAY_AQ_REQ(39,4179), + //安全-封号 + IDIP_DO_BAN_COUNT_AQ_REQ(41,4183), + //安全-禁言 + IDIP_DO_BAN_CHAT_AQ_REQ(42,4185), + //安全-发言清除 + IDIP_DO_CLEAR_CHAT_AQ_REQ(43,4187), + //安全-解除处罚 + IDIP_DO_LIFT_PUNISH_AQ_REQ(44,4189), + //开通用户GM权限 + IDIP_DO_OPEN_GM_REQ(45,4143), + //关闭用户GM权限 + IDIP_DO_CLOSE_GM_REQ(46,4145), + //查询用户GM权限 + IDIP_QUERY_ACCOUNT_GM_REQ(47,4147), + //弹幕开关 + IDIP_DO_BARAGE_ONOFF_REQ(48,4201), + //开通服务器GM权限 + IDIP_DO_OPEN_SVRGM_REQ(49,4203), + //关闭服务器GM权限 + IDIP_DO_CLOSE_SVRGM_REQ(50,4205), + //查询服务器GM权限 + IDIP_QUERY_SVR_GM_REQ(51,4207), + //概率变化开关 + IDIP_DO_CHANGE_SWITCH_REQ(52,4209), + //查询概率开关配置 + IDIP_QUERY_CHANGE_SWITCH_REQ(53,4213), + //配置卡池模版开关 + IDIP_DO_MODEL_SWITCH_REQ(54,4215), + //查询卡池模版开关配置 + IDIP_QUERY_MODEL_SWITCH_REQ(55,4217), + //状态配置 + IDIP_DO_STATUS_CFG_REQ(56,4219), + //查询状态配置 + IDIP_QUERY_STATUS_CFG_REQ(57,4221), + //推荐配置 + IDIP_DO_COMMEND_CFG_REQ(58,4223), + //查询推荐配置 + IDIP_QUERY_COMMEND_CFG_REQ(59,4225), + //排队配置 + IDIP_DO_LINEUP_CFG_REQ(60,4227), + //查询排队配置 + IDIP_QUERY_LINEUP_CFG_REQ(61,4229), + //设置新服开服活动标准时间 + IDIP_DO_SET_ACTIVITY_NORMALTIME_REQ(63,4231), + //查询新服开服活动标准时间 + IDIP_QUERY_ACTIVITY_NORMALTIME_REQ(64,4233), + //设置服务器注册限制 + IDIP_DO_SET_REGISTER_LIMIT_REQ(65,4235), + //查询服务器注册限制 + IDIP_QUERY_REGISTER_LIMIT_REQ(66,4237), + /* 成长守护(禁玩/解禁) */ + IDIP_DO_SET_NO_PLAY_REQ(67,4239), + + //防沉迷状态查询 + IDIP_QUERY_ANTI_INDULGENCE_STATUS_REQ(68,4241), + //防沉迷状态重置 + IDIP_DO_REST_ANTI_INDULGENCE_REQ(69,4243), + // uid转openid + IDIP_QUERY_OPNEID_REQ(70,4245), + //查询角色卡牌数量 + IDIP_QUERY_CARDS_NUM_REQ(71,4247), + //查询角色当前通关关卡 + IDIP_QUERY_ROLE_CHECKPOINT_REQ(72,4249), + //查询角色当天关卡通关次数 + IDIP_QUERY_CLEARANCE_NUM_REQ(73,4251), + //查询角色当天在线时长 + IDIP_QUERY_ROLE_ONLINE_TIME_REQ(74,4253), + //查询角色当天天才战对战次数 + IDIP_QUERY_TALENT_BATTLE_NUM_REQ(75,4255), + //查询角色当天资源消耗数量 + IDIP_QUERY_RESOURCE_NUM_REQ(76,4257), + //查询用户当前通关天幻圣境 + IDIP_QUERY_ROLE_THSJ_CHECKPOINT_REQ(77,4259), + //查询角色当天天幻圣境通关次数 + IDIP_QUERY_THSJ_CLEARANCE_NUM_REQ(78,4261), + //查询角色累计充值数量 + IDIP_QUERY_ROLE_ACCUM_RECHANGE_REQ(79,4263), + //查询角色灵魂力 + IDIP_QUERY_ROLE_SOUL_REQ(80,4265), + //查询角色天才战积分 + IDIP_QUERY_ROLE_TALENT_POINT_REQ(81,4267), + /* 安全-禁止添加好友接口(AQ) */ + IDIP_DO_BAN_ADD_FRIEND_AQ_REQ(82,4269), + /* 安全-修改角色昵称(AQ) */ + IDIP_DO_CHANGE_ROLE_NAME_AQ_REQ(83,4271), + /* 安全-修改公会信息(AQ) */ + IDIP_DO_CHANGE_UNION_INFO_AQ_REQ(84,4273), + /* 查询用户公会信息 */ + IDIP_QUERY_UNION_INFO_REQ(85,4275), + /* 角色名查询用户账号 */ + IDIP_QUERY_ACCOUNT_THROUGH_NAME_REQ(86,4277), + /* 游戏外部活动上架 */ + IDIP_DO_SHELF_OUTSIDE_ACTIVITY_REQ(87,4279), + /* 删除游戏外部活动 */ + IDIP_DO_DEL_OUTSIDE_ACTIVITY_REQ(88,4281), + /* 查询游戏外部活动 */ + IDIP_QUERY_OUTSIDE_ACTIVITY_REQ(89,4283), + /* 活动白名单开关 */ + IDIP_DO_ACTIVITY_WHITELIST_SWITCH_REQ(90,4285), + /* 活动白名单管理 */ + IDIP_DO_ACTIVITY_WHITELIST_MANAGE_REQ(91,4287), + /* 中控防沉迷提醒 */ + IDIP_DO_ZK_PREVENT_ADDICTION_REMIND_REQ(92,4289), + /* 中控防沉迷禁玩 */ + IDIP_DO_ZK_PREVENT_ADDICTION_BAN_REQ(93,4291), + /* 中控防沉迷强制验证 */ + IDIP_DO_ZK_PREVENT_ADDICTION_FORCE_VERTIFY_REQ(94,4293); + + private int key; + private int value; + CommandEnm(int key, int value) { + this.key =key; + this.value =value; + } + + public static CommandEnm valueOf(int value){ + switch (value){ + case 4097:return IDIP_DO_CHANGE_DIAMOND_REQ; + case 4101:return IDIP_DO_CHANGE_GOLD_REQ; + case 4103:return IDIP_DO_CHANGE_EXP_REQ; + case 4105:return IDIP_DO_CHANGE_LV_REQ; + case 4107:return IDIP_DO_CHANGE_ENERGE_REQ; + case 4109:return IDIP_DO_GIFT_ITEM_REQ; + case 4111:return IDIP_DO_DEL_ITEM_REQ; + case 4113:return IDIP_DO_SEND_MAIL_REQ; + case 4115:return IDIP_DO_DEL_MAIL_REQ; + case 4117:return IDIP_DO_ACTIVATE_ACCOUNT_REQ; + case 4119:return IDIP_DO_BAN_COUNT_REQ; + case 4121:return IDIP_DO_UNBAN_COUNT_REQ; + case 4123:return IDIP_QUERY_ROLE_INFO_REQ; + case 4125:return IDIP_QUERY_COUNT_ROLE_REQ; + case 4127:return IDIP_QUERY_CARD_INFO_REQ; + case 4129:return IDIP_QUERY_MAIL_INFO_REQ; + case 4133:return IDIP_QUERY_BAN_STATUS_REQ; + case 4135:return IDIP_QUERY_CARD_MODE_INFO_REQ; + case 4137:return IDIP_DO_KICK_OFFLINE_REQ; + case 4139:return IDIP_DO_DEL_ACTIVATEACCOUNT_REQ; + case 4141:return IDIP_QUERY_ACTIVATE_ACCOUNT_REQ; + case 4149:return IDIP_DO_SVR_CFG_REQ; + case 4151:return IDIP_DO_SEND_NOTICE_REQ; + case 4153:return IDIP_QUERY_NOTICE_INFO_REQ; + case 4155:return IDIP_DO_DEL_NOTICE_REQ; + case 4157:return IDIP_DO_SEND_LIGHT_REQ; + case 4159:return IDIP_QUERY_LIGHT_INFO_REQ; + case 4161:return IDIP_DO_DEL_LIGHT_REQ; + case 4163:return IDIP_DO_SEND_BARAGE_REQ; + case 4165:return IDIP_QUERY_BARAGE_INFO_REQ; + case 4167:return IDIP_DO_DEL_BARAGE_REQ; + case 4193:return IDIP_DO_SENDALLSVR_REWARD_REQ; + case 4197:return IDIP_QUERY_ALLSVRS_INFO_REQ; + case 4199:return IDIP_DO_DEL_ALLSVRS_REQ; + case 4169:return IDIP_QUERY_ROLE_INFO_AQ_REQ; + case 4171:return IDIP_DO_CHANGE_GOLD_AQ_REQ; + case 4173:return IDIP_DO_CHANGE_DIAMOND_AQ_REQ; + case 4175:return IDIP_DO_BAN_RANK_AQ_REQ; + case 4177:return IDIP_DO_BAN_PLAY_AQ_REQ; + case 4179:return IDIP_DO_BAN_ALLPLAY_AQ_REQ; + case 4181:return IDIP_DO_ZEROINCOME_AQ_REQ; + case 4183:return IDIP_DO_BAN_COUNT_AQ_REQ; + case 4185:return IDIP_DO_BAN_CHAT_AQ_REQ; + case 4187:return IDIP_DO_CLEAR_CHAT_AQ_REQ; + case 4189:return IDIP_DO_LIFT_PUNISH_AQ_REQ; + case 4143:return IDIP_DO_OPEN_GM_REQ; + case 4145:return IDIP_DO_CLOSE_GM_REQ; + case 4147:return IDIP_QUERY_ACCOUNT_GM_REQ; + case 4201:return IDIP_DO_BARAGE_ONOFF_REQ; + case 4203:return IDIP_DO_OPEN_SVRGM_REQ; + case 4205:return IDIP_DO_CLOSE_SVRGM_REQ; + case 4207:return IDIP_QUERY_SVR_GM_REQ; + case 4209:return IDIP_DO_CHANGE_SWITCH_REQ; + case 4213:return IDIP_QUERY_CHANGE_SWITCH_REQ; + case 4215:return IDIP_DO_MODEL_SWITCH_REQ; + case 4217:return IDIP_QUERY_MODEL_SWITCH_REQ; + case 4219:return IDIP_DO_STATUS_CFG_REQ; + case 4221:return IDIP_QUERY_STATUS_CFG_REQ; + case 4223:return IDIP_DO_COMMEND_CFG_REQ; + case 4225:return IDIP_QUERY_COMMEND_CFG_REQ; + case 4227:return IDIP_DO_LINEUP_CFG_REQ; + case 4229:return IDIP_QUERY_LINEUP_CFG_REQ; + case 4231:return IDIP_DO_SET_ACTIVITY_NORMALTIME_REQ; + case 4233:return IDIP_QUERY_ACTIVITY_NORMALTIME_REQ; + case 4235:return IDIP_DO_SET_REGISTER_LIMIT_REQ; + case 4237:return IDIP_QUERY_REGISTER_LIMIT_REQ; + case 4239:return IDIP_DO_SET_NO_PLAY_REQ; + case 4241:return IDIP_QUERY_ANTI_INDULGENCE_STATUS_REQ; + case 4243:return IDIP_DO_REST_ANTI_INDULGENCE_REQ; + case 4245:return IDIP_QUERY_OPNEID_REQ; + case 4247:return IDIP_QUERY_CARDS_NUM_REQ; + case 4249:return IDIP_QUERY_ROLE_CHECKPOINT_REQ; + case 4251:return IDIP_QUERY_CLEARANCE_NUM_REQ; + case 4253:return IDIP_QUERY_ROLE_ONLINE_TIME_REQ; + case 4255:return IDIP_QUERY_TALENT_BATTLE_NUM_REQ; + case 4257:return IDIP_QUERY_RESOURCE_NUM_REQ; + case 4259:return IDIP_QUERY_ROLE_THSJ_CHECKPOINT_REQ; + case 4261:return IDIP_QUERY_THSJ_CLEARANCE_NUM_REQ; + case 4263:return IDIP_QUERY_ROLE_ACCUM_RECHANGE_REQ; + case 4265:return IDIP_QUERY_ROLE_SOUL_REQ; + case 4267:return IDIP_QUERY_ROLE_TALENT_POINT_REQ; + case 4269:return IDIP_DO_BAN_ADD_FRIEND_AQ_REQ; + case 4271:return IDIP_DO_CHANGE_ROLE_NAME_AQ_REQ; + case 4273:return IDIP_DO_CHANGE_UNION_INFO_AQ_REQ; + case 4275:return IDIP_QUERY_UNION_INFO_REQ; + case 4277:return IDIP_QUERY_ACCOUNT_THROUGH_NAME_REQ; + case 4279:return IDIP_DO_SHELF_OUTSIDE_ACTIVITY_REQ; + case 4281:return IDIP_DO_DEL_OUTSIDE_ACTIVITY_REQ; + case 4283:return IDIP_QUERY_OUTSIDE_ACTIVITY_REQ; + case 4285:return IDIP_DO_ACTIVITY_WHITELIST_SWITCH_REQ; + case 4287:return IDIP_DO_ACTIVITY_WHITELIST_MANAGE_REQ; + case 4289:return IDIP_DO_ZK_PREVENT_ADDICTION_REMIND_REQ; + case 4291:return IDIP_DO_ZK_PREVENT_ADDICTION_BAN_REQ; + case 4293:return IDIP_DO_ZK_PREVENT_ADDICTION_FORCE_VERTIFY_REQ; + default: + } + return null; + } + + + + public int getKey() { + return key; + } + + public void setKey(int key) { + this.key = key; + } + + public int getValue() { + return value; + } + + public void setValue(int value) { + this.value = value; + } +} diff --git a/src/main/java/com/jmfy/controller/BuriedPointController.java b/src/main/java/com/jmfy/controller/BuriedPointController.java new file mode 100644 index 0000000..8c7007b --- /dev/null +++ b/src/main/java/com/jmfy/controller/BuriedPointController.java @@ -0,0 +1,81 @@ +package com.jmfy.controller; + +import com.alibaba.fastjson.JSONObject; +import com.jmfy.Application; +import com.jmfy.dao.MongoConnectDao; +import com.jmfy.model.BuriedPoint; +import com.mongodb.BasicDBObject; +import com.mongodb.DBCollection; +import com.mongodb.DBObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; + +@RestController +public class BuriedPointController { + + private static final Logger LOGGER = LoggerFactory.getLogger(BuriedPointController.class); + + private static final String _COLLECTION_NAME = "user_buried_point"; + + @Resource + private MongoConnectDao mongoConnectDao; + + /** + * 埋点排重(之前没有添加,有查询) + * @param channel + * @param userId + * @param point + * @param response + * testUrl: http://34.87.3.216:8081/idip/sfzb/point/buriedPoint?channel=baidu&userId=2020125&point=aaaaaaa + */ + @RequestMapping(value = "/point/buriedPoint", method = {RequestMethod.GET, RequestMethod.POST}) + public void buriedPoint(String channel, String userId, String point, HttpServletResponse response){ + + try { + MongoTemplate mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + + String channelUserId = channel + userId; + + DBObject doc = new BasicDBObject(); + doc.put("channelUserId",channelUserId); + doc.put("channel", channel); + doc.put("userId", userId); + doc.put("point", point); + + //查询 + Query query = new Query(); + Criteria cr = new Criteria(); + cr.andOperator(Criteria.where("channelUserId").is(channelUserId)); + query.addCriteria(cr); + BuriedPoint buriedPoint = mongoTemplate.findOne(query, BuriedPoint.class); + + boolean isPoint = false; + //埋点过 + if(buriedPoint == null) { + //存储 + mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + DBCollection dBCollection = mongoTemplate.getCollection(_COLLECTION_NAME); + dBCollection.save(doc); + }else { + isPoint = true; + } + + JSONObject obj1 = new JSONObject(); + obj1.put("isPoint", isPoint); + response.setContentType("application/json"); + response.getOutputStream().write(obj1.toJSONString().getBytes()); + + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/jmfy/controller/GmController.java b/src/main/java/com/jmfy/controller/GmController.java new file mode 100644 index 0000000..5479748 --- /dev/null +++ b/src/main/java/com/jmfy/controller/GmController.java @@ -0,0 +1,193 @@ +package com.jmfy.controller; + +import com.jmfy.model.NoticeInfo; +import com.jmfy.redisProperties.RedisUserKey; +import com.jmfy.sdk.ServerDemo; +import com.jmfy.util.*; +import com.jmfy.util.loginRedis.RedisKey; +import com.ljsd.jieling.thrift.idl.Result; +import net.sf.json.JSONObject; +import org.apache.commons.codec.digest.DigestUtils; +import org.apache.commons.collections.map.HashedMap; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.servlet.view.RedirectView; + +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@RestController +public class GmController { + public static final Logger LOGGER = LoggerFactory.getLogger(GmController.class); + @Autowired + HttpSession session; + //登录验证 + @RequestMapping(value = "/gm/in", method = {RequestMethod.GET, RequestMethod.POST}) + public String in(String name,String pwd) throws Exception{ + if("admin".equals(name) && "admin".equals(pwd)){ + session.setAttribute("name", "adminTank"); + //RedirectView redirectTarget = new RedirectView(); + //redirectTarget.setContextRelative(true); + //redirectTarget.setUrl("/"); + //return redirectTarget; + } + return "ok"; + } + + @RequestMapping(value = "/gm/other", method = {RequestMethod.GET, RequestMethod.POST}) + public String other(String name,String pwd) throws Exception{ + //验证是否登录 + if(!"adminTank".equals(session.getAttribute("name"))){ + return "9000"; + } + //处理其他逻辑 + + return "ok"; + } + + //发邮件 + @RequestMapping(value = "/gm/sendMail", method = {RequestMethod.GET, RequestMethod.POST}) + public String sendMail(int serverId,String uids,String title,String content,String reward) throws Exception{ + + String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(serverId), String.class, -1); + if(null==rpcString){ + throw new Exception("serverAddress not exist"); + } + String thriftIp = rpcString.split(":")[0]; + String thriftPort = rpcString.split(":")[1]; + + Result result = RPCClient.sendMailToRole(thriftIp, thriftPort,uids,title,content,reward); + if (result.getResultCode() != 1) { + throw new Exception(result.getResultMsg()); + } + return "ok"; + } + //改公告 + @RequestMapping(value = "/gm/updateNotice", method = {RequestMethod.GET, RequestMethod.POST}) + public String updateNotice(int level,long startTime,long endTime,String title,String content) throws Exception{ + + Map noticeInfoMap = new HashMap(); + NoticeInfo noticeInfo = new NoticeInfo(); + noticeInfo.setTitle(title); + noticeInfo.setContent(content); + noticeInfo.setLeve(level); + noticeInfo.setStartTime(startTime); + noticeInfo.setEndTime(endTime); + noticeInfoMap.put("1",noticeInfo); + RedisUtil.getInstence().putMap(RedisKey.NOTICE+":", "", noticeInfoMap, -1); + + return "ok"; + } + + /** + * + * @param name ChiTu + * @param pwd ChiTu220823 + * @param SID 平台方游戏服序号,可同研发方游戏服唯一标识一样或从1开始递增 + * @param _SID 研发方游戏服唯一标识 例: SID=1&_SID=1, 此方案最方便。 SID=1&_SID=50001,如果不能从1开始递增 + * @param STATE 1: 开启服务器, -2: 关闭服务器。 留空不传默认为1,默认开启 + * @param NAME 游戏服名称, 1服,2服。。。依此类推 + * @param START_TIME 开服时间,格式 2019-01-01 12:00:00 + * @return + * @throws Exception + */ + @RequestMapping(value = "/gm/registerGameServer", method = {RequestMethod.GET, RequestMethod.POST}) + public String registerGameServer(String name,String pwd,String SID,String _SID,String STATE,String NAME,String START_TIME) { + try { + //验证是否登录 + if ("ChiTu".equals(name) && "ChiTu220823".equals(pwd)) { + session.setAttribute("name", "ChiTu"); + + //处理其他逻辑 + // 请求参数 + Map params = new HashMap(); + params.put("GAME_ID", String.valueOf(Constant.CHITU_GAMEID)); //游戏ID,由平台方提供 + params.put("SID", SID); //平台方游戏服序号,可同研发方游戏服唯一标识一样或从1开始递增 + params.put("_SID", _SID); //研发方游戏服唯一标识 例: SID=1&_SID=1, 此方案最方便。 SID=1&_SID=50001,如果不能从1开始递增 + params.put("STATE", STATE); // 1: 开启服务器, -2: 关闭服务器。 留空不传默认为1,默认开启 + params.put("NAME", NAME); // 游戏服名称, 1服,2服。。。依此类推 + params.put("START_TIME", START_TIME); // 开服时间,格式 2019-01-01 12:00:00 + String currentTimeMillis = Long.toString(System.currentTimeMillis() / 100L); //时间戳 秒 + params.put("timestamp", currentTimeMillis); + +// getAsciiSort(params); //Map根据键值按ASCII 码从小到大排序 + + //把所有参数用空字符拼接 +// StringBuilder sb = new StringBuilder(); +// for (String value : params.values()) { +// sb.append(value); +// } +// String paramStr = sb.substring(0, sb.length() - 1); + + StringBuilder sbStr = new StringBuilder(); + sbStr.append(params.get("GAME_ID")); + sbStr.append(params.get("NAME")); + sbStr.append(params.get("SID")); + sbStr.append(params.get("START_TIME")); + sbStr.append(params.get("STATE")); + sbStr.append(params.get("_SID")); + sbStr.append(params.get("timestamp")); + + LOGGER.info("sbStr={}",sbStr); + + String mySign = md5(sbStr.toString(),Constant.CHITU_SECRET_KEY); + + LOGGER.info("mySign={}",mySign); + + params.put("sign", mySign); // 签名 + + String url = "https://sdk.chituhuyu.com/game/center/sync_server"; + String resurl = HttpUtil.postForm(url, params); + JSONObject jsonresObject = JSONObject.fromObject(resurl); + LOGGER.info("res=" + jsonresObject.toString()); + + //“status”:0为成功, 其余为失败(-9为服已经存在),”msg”:”对应的信息提示”} + // status状态为0时 成功 其他为失败 + if (jsonresObject.getInt("status") == 0) { + return "添加成功!"; + }else if(jsonresObject.getInt("status") == -9){ + return "请勿重复添加!"; + } else { + return jsonresObject.getJSONObject("status").getString("msg"); + } + } else { + return "Error:name or pwd err!"; + } + } catch (Exception e) { + e.printStackTrace(); + } + return "-1"; + } + + public static String md5(String text, String key) throws Exception { + //加密后的字符串 + String encodeStr= DigestUtils.md5Hex(text + key); + + return encodeStr; + } + + //Map根据键值按ASCII 码从小到大排序,值为空的不拼接 + public static Map getAsciiSort(Map map) { + //移除值为空的 + map.entrySet().removeIf(entry -> "".equals(entry.getValue())); + + List> infoIds = new ArrayList<>(map.entrySet()); + //对所有传入参数按照字段名的 ASCII 码从小到大排序(字典序) + infoIds.sort((o1, o2) -> o1.getKey().compareToIgnoreCase(o2.getKey())); + + Map mapSort = new HashMap<>(); + for (Map.Entry infoId : infoIds) { + mapSort.put(infoId.getKey(),infoId.getValue()); + } + return mapSort; + } +} diff --git a/src/main/java/com/jmfy/controller/ICanController.java b/src/main/java/com/jmfy/controller/ICanController.java new file mode 100644 index 0000000..1b0a116 --- /dev/null +++ b/src/main/java/com/jmfy/controller/ICanController.java @@ -0,0 +1,311 @@ +package com.jmfy.controller; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.jmfy.Application; +import com.jmfy.dao.MongoConnectDao; +import com.jmfy.dao.PayDao; +import com.jmfy.model.CoreUserInfo; +import com.jmfy.model.ServerInfo; +import com.jmfy.model.User; +import com.jmfy.model.sdk.RegisterUser; +import com.jmfy.modelVo.PayVo; +import com.jmfy.redisProperties.RedisUserKey; +import com.jmfy.util.*; +import com.jmfy.util.loginRedis.TimeUtil; +import com.ljsd.jieling.thrift.idl.Result; +import com.mongodb.BasicDBObject; +import org.apache.commons.codec.binary.Base64; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.BasicQuery; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.security.KeyFactory; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.Signature; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.spec.X509EncodedKeySpec; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.stream.Collectors; + +import static com.jmfy.util.MD5Util.encrypByMd5; + +@RestController +public class ICanController { + private static final Logger LOGGER = LoggerFactory.getLogger(ICanController.class); + private static final String DB_NAME_PREFIX = "x1_tw_game_"; + + @Resource + private MongoConnectDao mongoConnectDao; + @Resource + private PayDao payDao; + + @PostMapping("/ican/item") + public JSONObject sendItem(String account, String serverId, String platform, String itemId, Integer count, + String roleId, String time, String verify){ + LOGGER.info("ican send item, roleId:{}, serverId:{}, itemId:{}, count:{}", roleId, serverId, itemId, count); + JSONObject json = new JSONObject(); + String s = account + serverId + itemId + count + time + Constant.AIKEN_SERVER_KEY; + String mySign = MD5Util.encrypByMd5(s); + if (!mySign.equals(verify)){ + json.put("code", "3"); + json.put("msg", "verify error"); + return json; + } + MongoTemplate mongoTemplate = null; + try { + mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + } catch (Exception e) { + LOGGER.error("get mongoTemplate error"); + json.put("code", "99"); + json.put("msg", "server error"); + return json; + } + + BasicQuery query = new BasicQuery(new BasicDBObject("uid", Integer.parseInt(roleId))); + CoreUserInfo userInfo = mongoTemplate.findOne(query, CoreUserInfo.class, "user_info"); + if (userInfo == null){ + LOGGER.error("user not exist, uid:{}", roleId); + json.put("code", "1"); + json.put("msg", "account not exist"); + return json; + } + BasicQuery query1 = new BasicQuery(new BasicDBObject("server_id", userInfo.getServerid()+"")); + ServerInfo serverInfo = mongoTemplate.findOne(query1, ServerInfo.class, "server_info"); + String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(serverInfo.getRealServerId()), String.class, -1); + System.out.println("rpcString " + rpcString); + if (null == rpcString) { + LOGGER.error("serverAddress not exist"); + json.put("code", "99"); + json.put("msg", "server error"); + return json; + } + String thriftIp = rpcString.split(":")[0]; + String thriftPort = rpcString.split(":")[3]; + if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) { + LOGGER.error("serverAddress not exist"); + json.put("code", "99"); + json.put("msg", "server error"); + return json; + } else { + StringBuilder reward = new StringBuilder(); + reward.append(itemId).append("#").append(count); + String title = "艾肯道具发放"; + String content = "艾肯道具发放"; + Result result = null; + try { + result = RPCClient.sendMailToRole(thriftIp, thriftPort, roleId, title, content, reward.toString()); + } catch (Exception e) { + LOGGER.error("addItem error, player_id:{}", roleId, e); + json.put("code", "99"); + json.put("msg", "server error"); + return json; + } + if (result.getResultCode() != 1) { + LOGGER.error("addItem error, player_id:{}", roleId); + json.put("code", "99"); + json.put("msg", "server error"); + } else { + LOGGER.info("addItem " + roleId + " is ok "); + json.put("code", "0"); + json.put("msg", ""); + } + } + return json; + } + + @PostMapping("/ican/user") + public JSONObject queryUser(String account, String serverId, String time, String verify){ + LOGGER.info("ican query user, account:{}, serverId:{}, verify:{}", account, serverId, verify); + JSONObject json = new JSONObject(); + String s = account + serverId + time + Constant.AIKEN_SERVER_KEY; + String mySign = MD5Util.encrypByMd5(s); + if (!mySign.equals(verify)){ + json.put("code", "3"); + json.put("msg", "verify error"); + return json; + } + JSONObject user = new JSONObject(); + try { + user = getRoleById(account, serverId); + } catch (Exception e) { + LOGGER.error("ican query user error, account:{}, serverId:{}", account, serverId, e); + json.put("code", "99"); + json.put("msg", "server error"); + return json; + } + JSONArray jsonArray = new JSONArray(); + jsonArray.add(user); + json.put("code", "0"); + json.put("roles", jsonArray); + return json; + } + + @PostMapping( "/ican/pay")//艾肯sdk + public JSONObject iCanWebOrder(@RequestParam("account") String account, + @RequestParam("serverId") String serverId, + @RequestParam("orderId") String orderId, + @RequestParam("itemId") String itemId, + @RequestParam("productId") String productId, + @RequestParam("iMoney") Integer iMoney, + @RequestParam("gMoney") Integer gMoney, + @RequestParam("roleId") String roleId, + @RequestParam("time") String time, + @RequestParam("verify") String verify, + @RequestParam("platform") String platform + ) { + LOGGER.info("iCan web pay order, account:{}, serverId:{}, orderId:{}, itemId:{}, productId:{}, iMoney:{}, gMoney:{}, roleId:{}, time:{}", + account, serverId, orderId, itemId, productId, iMoney, gMoney, roleId, time); + JSONObject returnJb = new JSONObject(); + StringBuilder sb = new StringBuilder(); + sb.append(account).append(itemId).append(orderId).append(iMoney).append(Constant.AIKEN_SERVER_KEY).append(time).append(roleId); + try { + String mySign = encrypByMd5(sb.toString()); + if (!mySign.equals(verify)){ + LOGGER.error("iCan order sign verify fail, orderId:{}, roleId:{}", + orderId, roleId); + returnJb.put("code", "3"); + returnJb.put("msg", "verify error"); + return returnJb; + } + } catch (Exception e) { + LOGGER.error("iCan order sign error, orderId:{}, roleId:{}", orderId, roleId, e); + returnJb.put("code", "3"); + returnJb.put("msg", "verify error"); + return returnJb; + } + + MongoTemplate mongoTemplate = null; + try { + mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + } catch (Exception e) { + LOGGER.error("get mongoTemplate error"); + returnJb.put("status", "fail"); + returnJb.put("code", "99"); + returnJb.put("msg", "server error"); + return returnJb; + } + if (!StringUtil.isEmpty(productId)){ + itemId = productId; + } + BasicQuery query = new BasicQuery(new BasicDBObject("server_id", serverId)); + ServerInfo serverInfo = mongoTemplate.findOne(query, ServerInfo.class, "server_info"); + PayVo payVo = null; + try { + payVo = payDao.getOder(orderId); + if (payVo != null){ + if (payVo.getStatus() == 1){ + LOGGER.error("order already paid, orderNo:{}", orderId); + returnJb.put("status", "fail"); + returnJb.put("code", "0"); + returnJb.put("msg", "order duplicate"); + return returnJb; + } + }else { + CoreUserInfo userInfo = mongoTemplate.findById(Integer.parseInt(roleId), CoreUserInfo.class); + payVo = new PayVo(userInfo.getOpenId(), Integer.parseInt(roleId), serverInfo.getRealServerId(), platform, itemId, TimeUtil.getTimeStamp(System.currentTimeMillis()), iMoney * 100 ,"NT"); + payVo.setBillno(orderId); + mongoTemplate.insert(payVo); + } + } catch (Exception e) { + LOGGER.error("get order error, orderNo:{}", orderId, e); + returnJb.put("status", "fail"); + returnJb.put("code", "99"); + returnJb.put("message", "server error"); + return returnJb; + } + + String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(serverInfo.getRealServerId()), String.class, -1); + System.out.println("rpcString " + rpcString); + if (null == rpcString) { + LOGGER.error("serverAddress not exist"); + returnJb.put("status", "fail"); + returnJb.put("code", "99"); + returnJb.put("msg", "server error"); + return returnJb; + } + String thriftIp = rpcString.split(":")[0]; + String thriftPort = rpcString.split(":")[3]; + if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) { + LOGGER.error("serverAddress not exist"); + returnJb.put("status", "fail"); + returnJb.put("code", "99"); + returnJb.put("msg", "server error"); + } else { + Result result = null; + try { + result = RPCClient.deliveryRecharge(thriftIp, thriftPort, Integer.parseInt(roleId), itemId, "", orderId, System.currentTimeMillis(), iMoney * 100, platform); + } catch (Exception e) { + LOGGER.error("pay error, orderNo:{}", orderId, e); + returnJb.put("code", "99"); + returnJb.put("msg", "server error"); + return returnJb; + } + + if (result.getResultCode() == 1){ + payVo.setStatus(1); + try { + payDao.upOder(payVo); + } catch (Exception e) { + LOGGER.error("update order status error, orderNo:{}", orderId, e); + } + LOGGER.info("orderNo:{} pay success", orderId); + returnJb.put("status", "ok"); + returnJb.put("code", "0"); + returnJb.put("msg", "success"); + }else { + LOGGER.error("orderNo:{} pay fail", orderId); + returnJb.put("status", "fail"); + returnJb.put("code", "99"); + returnJb.put("msg", "server error"); + } + } + return returnJb; + } + + + private JSONObject getRoleById(String account, String serverId) throws Exception { + MongoTemplate mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + RegisterUser registerUser = mongoTemplate.findById(account, RegisterUser.class); + String[] split = serverId.split("Y"); + BasicDBObject basicDBObject = new BasicDBObject(); + basicDBObject.put("openId", registerUser.getOpenId()); + basicDBObject.put("area", Integer.parseInt(split[1])); + basicDBObject.put("serverId", split[0]); + CoreUserInfo userInfo = mongoTemplate.findOne(new BasicQuery(basicDBObject), CoreUserInfo.class, "user_info"); + + BasicQuery query = new BasicQuery(new BasicDBObject("server_id", userInfo.getServerid()+"")); + ServerInfo serverInfo = mongoTemplate.findOne(query, ServerInfo.class, "server_info"); + MongoTemplate gameMongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(DB_NAME_PREFIX + serverInfo.getRealServerId()); + User user = gameMongoTemplate.findById(userInfo.getUid(), User.class, "user"); + if (user == null){ + return new JSONObject(); + } + return getJsonUser(user); + } + + public static void main(String[] args) { + String s = "10002Y3"; + String[] ys = s.split("Y"); + System.out.println(Arrays.toString(ys)); + } + + private JSONObject getJsonUser(User user) { + JSONObject jsonObject = new JSONObject(); + jsonObject.put("roleId", user.getId()); + jsonObject.put("roleName", user.getPlayerManager().getNickName()); + jsonObject.put("level", user.getPlayerManager().getLevel()); + jsonObject.put("gMoneyTotal", user.getPlayerManager().getRechargeInfo().getSaveAmt()); + jsonObject.put("createTime", user.getPlayerManager().getCreateTime()); + return jsonObject; + } +} diff --git a/src/main/java/com/jmfy/controller/ManagerController.java b/src/main/java/com/jmfy/controller/ManagerController.java new file mode 100644 index 0000000..196ee77 --- /dev/null +++ b/src/main/java/com/jmfy/controller/ManagerController.java @@ -0,0 +1,152 @@ +package com.jmfy.controller; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONException; +import com.alibaba.fastjson.JSONObject; +import com.jmfy.handler.BaseHandler; +import com.jmfy.handler.ManagerManager; +import com.jmfy.modelVo.BaseVo; +import org.apache.commons.io.IOUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.ServletInputStream; +import javax.servlet.http.HttpServletRequest; +import java.net.URLDecoder; +import java.util.Enumeration; +import java.util.HashMap; + +@RestController +public class ManagerController { + + private static final Logger LOGGER = LoggerFactory.getLogger(ManagerController.class); + + + @RequestMapping(value = "/deal/{uri}", method = {RequestMethod.GET, RequestMethod.POST}) + public BaseVo getResult(@PathVariable String uri, HttpServletRequest request) { + try { + JSONObject jsonObject = getJsonObject(request); + if (null == jsonObject) { + throw new Exception("查询异常 "); + } + BaseHandler baseHandler = ManagerManager.getInstance().getBaseHandler(uri); + if (null != baseHandler) { + if (jsonObject.containsKey("gid") && jsonObject.containsKey("pid")) { + baseHandler.setGid(jsonObject.getIntValue("gid")); + baseHandler.setPid(jsonObject.getIntValue("pid")); + } else { + throw new Exception("缺少参数"); + } + BaseVo result = baseHandler.execute(jsonObject); + if (null == result) { + throw new Exception("查询异常 "); + } + return result; + } else { + throw new Exception("请求地址错误"); + } + } catch (Exception e) { + LOGGER.error(String.valueOf(e)); + e.printStackTrace(); + BaseVo baseVo = new BaseVo(); + baseVo.setState(0); + baseVo.setMsg(String.valueOf(e.getMessage()).substring(0, Math.min(e.getMessage().length(), 20))); + return baseVo; + } + } + + + JSONObject getJsonObject(HttpServletRequest request) throws Exception { + JSONObject jsonObject = new JSONObject(); + if (request.getMethod().equals("GET")) { + String paramStr = request.getQueryString(); + if (null == paramStr) { + throw new Exception("缺少参数"); + } + String[] params = paramStr.split("&"); + for (int i = 0; i < params.length; i++) { + String[] param = params[i].split("="); + if (param.length >= 2) { + String key = param[0]; + String value = param[1]; + for (int j = 2; j < param.length; j++) { + value += "=" + param[j]; + } + try { + jsonObject.put(key, value); + } catch (JSONException e) { + e.printStackTrace(); + } + } + } + } else { + ServletInputStream inputStream = request.getInputStream(); + String s = IOUtils.toString(inputStream); + String s1 = URLDecoder.decode(s, "UTF-8"); + jsonObject = JSON.parseObject(s1); + } + return jsonObject; + } + + HashMap getParameterMap(HttpServletRequest request) { + HashMap map = new HashMap(); + Enumeration paramNames = request.getParameterNames(); + while (paramNames.hasMoreElements()) { + String paramName = (String) paramNames.nextElement(); + String[] paramValues = request.getParameterValues(paramName); + String paramValue = paramValues[0]; + map.put(paramName, paramValue); + LOGGER.info("parameter : " + paramName + "=" + paramValue); + } + return map; + } + + + /** + * time | dsid | sign | appkey + * + * @return + */ + @GetMapping(value = "/backc") + public BaseVo backC(HttpServletRequest request) { + try { + JSONObject jsonObject = getJsonObject(request); + + BaseHandler handler = ManagerManager.getInstance().getBaseHandler("gm"); + BaseVo result = handler.execute(jsonObject); + if (null == result) { + throw new Exception("查询异常 "); + } + + LOGGER.info(result.getMsg()); + return result; + } catch (Exception e) { + BaseVo baseVo = new BaseVo(); + baseVo.setState(0); + baseVo.setMsg(String.valueOf(e.getMessage()).substring(0, Math.min(e.getMessage().length(), 20))); + LOGGER.info(baseVo.getMsg()); + return baseVo; + } + } + + +// public BaseVo gmSend(HttpServletRequest request) { +// try { +// JSONObject jsonObject = getJsonObject(request); +// BaseHandler handler = ManagerManager.getInstance().getBaseHandler("gm"); +// BaseVo result = handler.execute(jsonObject); +// if (null == result) { +// throw new Exception("查询异常 "); +// } +// return result; +// +// } catch (Exception e) { +// BaseVo baseVo = new BaseVo(); +// baseVo.setState(0); +// baseVo.setMsg(String.valueOf(e.getMessage()).substring(0, Math.min(e.getMessage().length(), 20))); +// return baseVo; +// } +// } + +} diff --git a/src/main/java/com/jmfy/controller/PayController.java b/src/main/java/com/jmfy/controller/PayController.java new file mode 100644 index 0000000..41cb557 --- /dev/null +++ b/src/main/java/com/jmfy/controller/PayController.java @@ -0,0 +1,1785 @@ +package com.jmfy.controller; + +import cn.hutool.core.util.XmlUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.jmfy.Application; +import com.jmfy.dao.MongoConnectDao; +import com.jmfy.handler.PayHandler; +import com.jmfy.model.ServerInfo; +import com.jmfy.modelVo.PayVo; +import com.jmfy.redisProperties.RedisUserKey; +import com.jmfy.sdk.SdkSign; +import com.jmfy.util.*; +import com.jmfy.util.loginRedis.TimeUtil; +import com.ljsd.jieling.thrift.idl.Result; +import com.ljsd.jieling.thrift.idl.itemData; +import com.mongodb.BasicDBObject; +import com.mongodb.DBCollection; +import com.mongodb.DBObject; + +import org.apache.commons.lang.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.BasicQuery; +import org.springframework.web.bind.annotation.*; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; + + +import javax.annotation.Resource; +import javax.crypto.Cipher; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.StringReader; +import java.io.UnsupportedEncodingException; +import java.net.InetAddress; + +import java.net.URLEncoder; +import java.net.UnknownHostException; +import java.security.KeyFactory; +import java.security.PublicKey; +import java.security.Signature; +import java.security.spec.X509EncodedKeySpec; +import java.util.*; + + +import static com.jmfy.util.MD5Util.encrypByMd5; +import static com.jmfy.util.SdkUtil.getOrderIdByTime; + + +@RestController +public class PayController { + // private static final String _COLLECTION_NAME = "user_register_info"; + + private static final String _COLLECTION_NAME_Order = "order"; + + public static final Logger LOGGER = LoggerFactory.getLogger(PayController.class); + + @Resource + private MongoConnectDao mongoConnectDao; + @Resource + private PayHandler payHandler; + + //生成订单号 (之前老的,现在没用到) + @RequestMapping(value = "/order/genOrder", method = {RequestMethod.GET, RequestMethod.POST}) + public void genOrder(String uid, HttpServletResponse response) { + try { + String orderId = uid + getOrderIdByTime(); + MongoTemplate mongoTemplate; + DBObject doc = new BasicDBObject(); + //doc.put("_id", name); + doc.put("uid", uid); + doc.put("gameOrder", orderId); + //存储 + mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + DBCollection dBCollection = mongoTemplate.getCollection(_COLLECTION_NAME_Order); + dBCollection.save(doc); + + JSONObject returnResult = new JSONObject(); + returnResult.put("gameOrder", orderId); + LOGGER.info("/sdk6kw/verify uid {} gameOrder {}", uid, returnResult.get("gameOrder")); + + response.setContentType("application/json"); + response.getOutputStream().write(returnResult.toJSONString().getBytes()); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * sdk统一创建订单接口 + * + * @param openid 玩家的openid + * @param uid 玩家的uid + * @param region 区服 + * @param channel 渠道 + * @param pay_item 支付项,支付表的id + * @param price 金额 单位:分 + * @param CurrencyCode 币种 + * @return + */ + @RequestMapping(value = "/pay/CreatOrder", method = {RequestMethod.GET, RequestMethod.POST}) + public String CreatOrder(String openid, int uid, int region, String channel, String pay_item, int price,String CurrencyCode, int devalueId) { + try { + if (channel == "" || channel == null) { + channel = "0123"; + } + LOGGER.info("--CreatOrder日志:openid={},uid={},region={},channel={},pay_item={},price={},CurrencyCode={}",openid,uid,region,channel,pay_item,price,CurrencyCode); + PayVo payVo = new PayVo(openid, uid, region, channel, pay_item, TimeUtil.getTimeStamp(System.currentTimeMillis()), price,CurrencyCode); + String orderId = CreateUniqueCodeManager.createBillno(10031, 1); + payVo.setBillno(orderId); + MongoTemplate mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + + int serverId = payVo.getRegion(); + + //查询mongo:客户端传的serverId找到合服后的对应的真实的serverId + //Query query = new Query(); + //Criteria cr = new Criteria(); + //cr.andOperator(Criteria.where("server_id").is(serverId)); + //query.addCriteria(cr); + //ServerInfo serverInfo = mongoTemplate.findOne(query, ServerInfo.class); + + //查询mongo:客户端传的serverId找到合服后的对应的真实的serverId + BasicQuery query = new BasicQuery(new BasicDBObject("server_id", serverId+"")); + ServerInfo serverInfo = mongoTemplate.findOne(query, ServerInfo.class, "server_info"); + + if(serverInfo != null){ + serverId = serverInfo.getRealServerId(); + payVo.setRegion(serverId); + } + LOGGER.info("--CreatOrder日志01:region={}, serverId={},serverInfo={},query={}",payVo.getRegion(),serverId, JSON.toJSON(serverInfo),JSON.toJSON(query)); + + String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(serverId), String.class, -1); + LOGGER.info("rpcString " + rpcString); + if (null == rpcString) { + LOGGER.error("serverAddress not exist"); + } + String thriftIp = rpcString.split(":")[0]; + String thriftPort = rpcString.split(":")[3]; + if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) { + LOGGER.error("serverAddress not exist"); + } else { + //判断达到最大购买次数 + long now = System.currentTimeMillis(); + Result resultOrder = RPCClient.deliveryOrder(thriftIp, thriftPort, uid, pay_item, now, orderId, devalueId); + if (resultOrder.getResultCode() != 1) { + LOGGER.info("processOrder uid={}, goodsId={}, orderTime={},serverId={},errCode={},msg={},orderId={}",uid,pay_item,now,serverId,resultOrder.getResultCode(),resultOrder.getResultMsg(),orderId); + JSONObject returnResult = new JSONObject(); + returnResult.put("errCode", resultOrder.getResultCode()); + returnResult.put("msg", resultOrder.getResultMsg()); + returnResult.put("orderId", orderId); + return returnResult.toJSONString(); + } + LOGGER.info("processOrder uid=" + uid + " goodsId = " + pay_item + " orderTime = " + now + " serverId = " + serverId + " CreatOrder is ok "); + } + + mongoTemplate.insert(payVo); + JSONObject returnResult = new JSONObject(); + + //returnResult.put("errCode", 1); //正确的不返回errCode,客户端要求 + returnResult.put("msg", ""); + returnResult.put("orderId", orderId); + return returnResult.toJSONString(); + } catch (Exception ex) { + ex.printStackTrace(); + } + return null; + } + + @RequestMapping(value = "/pay/sign", method = {RequestMethod.GET, RequestMethod.POST}) + public JSONObject CreatOrder(String channel, String game_area, Integer game_guid, String game_orderid, String game_price, String subject) { + JSONObject returnResult = new JSONObject(); + StringBuilder sb = new StringBuilder(); + + switch (channel){ + case "Android_XiaoQi": + sb.append("game_area=").append(game_area).append("&"); + sb.append("game_guid=").append(game_guid).append("&"); + sb.append("game_orderid=").append(game_orderid).append("&"); + sb.append("game_price=").append(game_price).append("&"); + sb.append("subject=").append(subject); + sb.append(Constant.X7_PUBLIC_KEY); + returnResult.put("game_sign", MD5Util.encrypByMd5(sb.toString())); + break; + default: + returnResult.put("code", 600); + returnResult.put("msg", "channel not exist"); + returnResult.put("game_sign", ""); + return returnResult; + } + LOGGER.info("pay order channel:{}, param: {}", channel, sb); + return returnResult; + } + @RequestMapping(value = "/pay/xiaomiOrder", method = {RequestMethod.GET, RequestMethod.POST}) + public JSONObject xiaomiOrder(HttpServletRequest request) { + try { + JSONObject json = new JSONObject(); + + String appId = request.getParameter("appId");// 应用ID + String cpOrderId = request.getParameter("cpOrderId");// 开发商订单ID + String cpUserInfo = request.getParameter("cpUserInfo");// 开发商透传信息 + String xiaomiUid = request.getParameter("uid");// 用户ID + String orderId = request.getParameter("orderId");// 游戏平台订单ID + String orderStatus = request.getParameter("orderStatus");// 订单状态TRADE_SUCCESS代表成功 + String amonut = request.getParameter("payFee");// 支付金额,单位为分,即0.01 米币 + String productCode = request.getParameter("productCode");// 商品代码 + String productName = request.getParameter("productName");// 商品名称 + String productCount = request.getParameter("productCount");// 商品数量 + String payTime = request.getParameter("payTime");// 支付时间,格式 yyyy-MM-dd + // HH:mm:ss + String partnerGiftConsume = request.getParameter("partnerGiftConsume"); // 可选,使用游戏券金额 + // (如果订单使用游戏券则有,long型),如果有则参与签名 + String signature = request.getParameter("signature");// 签名:以上参数按字母顺序排序然后进行签名。 + String parameterView = "appId:" + appId + ",cpOrderId:" + cpOrderId + ",cpUserInfo:" + cpUserInfo + ",uid:" + xiaomiUid + ",orderId:" + orderId + ",orderStatus:" + orderStatus + ",payFee:" + amonut + ",productCode:" + productCode + ",productName:" + productName + ",productCount:" + productCount + ",payTime:" + payTime + ",signature:" + signature; + //if (LOGGER.isDebugEnabled()) { + LOGGER.debug("pay:xiaomi," + parameterView); + if (StringUtils.isEmpty(appId) || StringUtils.isEmpty(cpOrderId) || StringUtils.isEmpty(cpUserInfo) || StringUtils.isEmpty(xiaomiUid) || StringUtils.isEmpty(orderId) || StringUtils.isEmpty(orderStatus) || StringUtils.isEmpty(amonut) || StringUtils.isEmpty(productCode) || StringUtils.isEmpty(productName) || StringUtils.isEmpty(productCount) || StringUtils.isEmpty(payTime) || StringUtils.isEmpty(signature)) { + LOGGER.error("pay:xiaomi,errcode:0,parameter has null," + parameterView); + json.put("errcode", 0); + json.put("errMsg", "接收失败,回调参数有误"); + return json; + } + // 订单状态 TRADE_SUCCESS 代表成功 + if (!"TRADE_SUCCESS".equals(orderStatus)) { + LOGGER.error("pay:xiaomi,errcode:0,orderStatus is not TRADE_SUCCESS," + parameterView); + json.put("errcode", 0); + json.put("errMsg", "订单状态支付不成功"); + return json; + } + + if (!Constant.XIAOMIAPPID.equals(appId)) { + LOGGER.error("pay:xiaomi,errcode:1515,appId is error," + parameterView); + json.put("errcode", 1515); + json.put("errMsg", "appId 错误"); + return json; + } + // 游戏券金额,有则参与签名 + String encryptText = ""; + if (StringUtils.isEmpty(partnerGiftConsume)) { + encryptText = String.format("appId=%s&cpOrderId=%s&cpUserInfo=%s&orderId=%s&orderStatus=%s&payFee=%s&payTime=%s&productCode=%s&productCount=%s&productName=%s&uid=%s", Constant.XIAOMIAPPID, cpOrderId, cpUserInfo, orderId, orderStatus, amonut, payTime, productCode, productCount, productName, xiaomiUid); + } else { + encryptText = String.format("appId=%s&cpOrderId=%s&cpUserInfo=%s&orderId=%s&orderStatus=%s&partnerGiftConsume=%s&payFee=%s&payTime=%s&productCode=%s&productCount=%s&productName=%s&uid=%s", Constant.XIAOMIAPPID, cpOrderId, cpUserInfo, orderId, orderStatus, partnerGiftConsume, amonut, payTime, productCode, productCount, productName, xiaomiUid); + } + String sign = SdkSign.xiaomiSign(encryptText, Constant.XIAOMIAPPSECRET); + if (signature.equals(sign)) { + PayHandler payHandler = new PayHandler(); + int payres = payHandler.processOrder(cpOrderId, orderId); + if (payres == 1) { + json.put("errcode", 200); + json.put("errMsg", "发货成功"); + return json; + } else { + LOGGER.error("pay:xiaomi,errcode:3515,cpUserInfo is error," + parameterView); + json.put("errcode", 3515); + json.put("errMsg", "订单信息不一致"); + return json; + } + } else { + LOGGER.error("pay:xiaomi,errcode:1525,signature check error," + parameterView); + json.put("errcode", 1525); + json.put("errMsg", "signature 错误"); + return json; + } + } catch (Exception ex) { + ex.printStackTrace(); + } + return null; + } + + + @RequestMapping(value = "/pay/weiweiOrder", method = {RequestMethod.POST}) + public String gameNoticeInterface(String out_trade_no, String price, int pay_status, String extend, String signType, String sign) { + try { + /* + @param orderId 游戏订单号 + * @param out_trade_no 渠道订单号 + */ + LOGGER.info("pay:gameNoticeInterface, out_trade_no={},price={},pay_status={},extend={},sign={}", out_trade_no, price, pay_status, extend, sign); + String[] extendStrs = extend.split("_"); + String orderId = extendStrs[3]; + String context = out_trade_no + price + pay_status + extend + Constant.WEIWEIORDERKEY; + String mySign = MD5Util.encrypByMd5(context); + if (!mySign.equals(sign)) { + LOGGER.error("pay:gameNoticeInterface,sign err, sign={},mySign={}", sign, mySign); + return "sign err!"; + } + // PayHandler payHandler = new PayHandler(); + // 统一发货接口 + int payres = payHandler.processOrder(orderId, out_trade_no); + + // 成功 + if (payres == 1) { + return "success"; + } else if (payres == -1) { + LOGGER.error("pay:gameNoticeInterface, {} 订单不存在,", orderId); + } else if (payres == -2) { + LOGGER.error("pay:gameNoticeInterface, {} 订单参数错误,", orderId); + } else if (payres == -3) { + LOGGER.error("pay:gameNoticeInterface, {} 服务器配置错误,", orderId); + } else if (payres == -4) { + LOGGER.error("pay:gameNoticeInterface, {} 充值失败,", orderId); + } else { + LOGGER.error("pay:gameNoticeInterface, {} 返回错误,", orderId); + return "err"; + } + } catch (Exception ex) { + ex.printStackTrace(); + } + return "err"; + } + + /** + * 百度sdk回调 + * + * @param AppID 应用 ID + * @param OrderSerial SDK 系统内部订单号 + * @param CooperatorOrderSerial CP 订单号 + * @param Sign 签名 + * @param Content 数据结构:JSO N 编码格式: UTF8,Base64 编码 + * @return 线上回调地址:http://120.131.0.103:9076/idip/sfzb/pay/baiduNotify + */ + @RequestMapping(value = "/pay/baiduNotify", method = {RequestMethod.POST}) + public JSONObject payBaiduNotify(int AppID, String OrderSerial, String CooperatorOrderSerial, String Content, String Sign) { + JSONObject json = new JSONObject(); + try { + LOGGER.info("payBaiduNotify, AppID={},OrderSerial={},CooperatorOrderSerial={},Sign={},Content={}", AppID, OrderSerial, CooperatorOrderSerial, Sign, Content); + + //请求参数签名方式: MD5(AppID+OrderSerial+CooperatorOrderSerial+Content+AppSecret) + String context = AppID + OrderSerial + CooperatorOrderSerial + Content + Constant.BAIDU_SECRET_KEY; + + String mySign = MD5Util.encrypByMd5(context); + + json.put("AppID",AppID); + json.put("Sign",mySign); + + if (!mySign.equals(Sign)) { + LOGGER.error("pay:gameNoticeInterface,sign err, sign={},mySign={}", Sign, mySign); + json.put("ResultMsg","Sign err"); + json.put("ResultCode",91); + return json; + } + + if (Constant.BAIDU_APPID != AppID) { + LOGGER.error("pay:baiduNotify,appId is error,BAIDU_APPID =" + Constant.BAIDU_APPID + ",AppID =" + AppID); + json.put("ResultMsg","AppID err"); + json.put("ResultCode",91); + return json; + } + + String orderId = CooperatorOrderSerial; + String out_trade_no = OrderSerial; + + JSONObject jsonObj = JSONObject.parseObject(Content); + int payId = jsonObj.getIntValue("PayId"); //pay_source, — 付款渠道, 0表示为微信支付, 1表示支付宝支付, 2表示苹果支付, 3表示谷歌支付,4 表示onestore, 5 表示mycard, + + // 统一发货接口 + int payres = payHandler.processOrder(orderId, out_trade_no,String.valueOf(payId)); //orderId 游戏订单号 out_trade_no 渠道订单号 + + // 成功 + if (payres == 1) { + json.put("ResultMsg","success"); + json.put("ResultCode",1); + return json; + } else if (payres == -1) { + LOGGER.error("pay:gameNoticeInterface, {} 订单不存在,", orderId); + } else if (payres == -2) { + LOGGER.error("pay:gameNoticeInterface, {} 订单参数错误,", orderId); + } else if (payres == -3) { + LOGGER.error("pay:gameNoticeInterface, {} 服务器配置错误,", orderId); + } else if (payres == -4) { + LOGGER.error("pay:gameNoticeInterface, {} 充值失败,", orderId); + } else { + LOGGER.error("pay:gameNoticeInterface, {} 返回错误,", orderId); + json.put("ResultMsg","err"); + json.put("ResultCode",91); + return json; + } + } catch (Exception ex) { + ex.printStackTrace(); + } + json.put("ResultMsg","err"); + json.put("ResultCode",91); + return json; + } + + /** + * 百度sdk回调 测试 + * + * @param AppID 应用 ID + * @param OrderSerial SDK 系统内部订单号 + * @param CooperatorOrderSerial CP 订单号 + * @param Sign 签名 + * @param Content 数据结构:JSO N 编码格式: UTF8,Base64 编码 + * @return 线上回调地址:http://120.131.0.103:9076/idip/sfzb/pay/baiduTestNotify + */ + @RequestMapping(value = "/pay/baiduTestNotify", method = {RequestMethod.POST}) + public JSONObject payBaiduTestNotify(int AppID, String OrderSerial, String CooperatorOrderSerial, String Content, String Sign) { + JSONObject json = new JSONObject(); + try { + LOGGER.info("payBaiduNotify, AppID={},OrderSerial={},CooperatorOrderSerial={},Sign={},Content={}", AppID, OrderSerial, CooperatorOrderSerial, Sign, Content); + + //请求参数签名方式: MD5(AppID+OrderSerial+CooperatorOrderSerial+Content+AppSecret) + String context = AppID + OrderSerial + CooperatorOrderSerial + Content + Constant.BAIDU_TEST_SECRET_KEY; + + String mySign = MD5Util.encrypByMd5(context); + + json.put("AppID",AppID); + json.put("Sign",mySign); + + if (!mySign.equals(Sign)) { + LOGGER.error("pay:gameNoticeInterface,sign err, sign={},mySign={}", Sign, mySign); + json.put("ResultMsg","Sign err"); + json.put("ResultCode",91); + return json; + } + +// if (Constant.BAIDU_TEST_APPID != AppID) { +// LOGGER.error("pay:baiduNotify,appId is error,BAIDU_TEST_APPID =" + Constant.BAIDU_TEST_APPID + ",AppID =" + AppID); +// json.put("ResultMsg","AppID err"); +// json.put("ResultCode",91); +// return json; +// } + + String orderId = CooperatorOrderSerial; + String out_trade_no = OrderSerial; + + JSONObject jsonObj = JSONObject.parseObject(Content); + int payId = jsonObj.getIntValue("PayId"); //pay_source, — 付款渠道, 0表示为微信支付, 1表示支付宝支付, 2表示苹果支付, 3表示谷歌支付,4 表示onestore, 5 表示mycard, + + // 统一发货接口 + int payres = payHandler.processOrder(orderId, out_trade_no,String.valueOf(payId)); //orderId 游戏订单号 out_trade_no 渠道订单号 + + // 成功 + if (payres == 1) { + json.put("ResultMsg","success"); + json.put("ResultCode",1); + return json; + } else if (payres == -1) { + LOGGER.error("pay:gameNoticeInterface, {} 订单不存在,", orderId); + } else if (payres == -2) { + LOGGER.error("pay:gameNoticeInterface, {} 订单参数错误,", orderId); + } else if (payres == -3) { + LOGGER.error("pay:gameNoticeInterface, {} 服务器配置错误,", orderId); + } else if (payres == -4) { + LOGGER.error("pay:gameNoticeInterface, {} 充值失败,", orderId); + } else { + LOGGER.error("pay:gameNoticeInterface, {} 返回错误,", orderId); + json.put("ResultMsg","err"); + json.put("ResultCode",91); + return json; + } + } catch (Exception ex) { + ex.printStackTrace(); + } + json.put("ResultMsg","err"); + json.put("ResultCode",91); + return json; + } + + @RequestMapping(value = "/pay/test") + public String gameNoticeInterface(String out_trade_no) throws Exception { + int payHandle1r = payHandler.processOrder(out_trade_no, out_trade_no); + return "1"; + } + + + @RequestMapping(value = "/pay/6kwotherNotify", method = {RequestMethod.POST}) + public String sixkwotherNotify(int appid, String data, String sign) { + try { + LOGGER.info("6kwotherNotify, AppID={},data={},Sign={}", appid, data, sign); + if (appid != Constant.SIXKW_OTHER_APPID) { + LOGGER.info("6kwotherNotify appid error"); + return "fail"; + } + //请求参数签名方式: MD5(AppID+OrderSerial+CooperatorOrderSerial+Content+AppSecret) + + Map mapObj = JSONObject.parseObject(data, Map.class); + String bodyUrl = StringUtil.mapToString(mapObj); + String context = Constant.SIXKW_OTHER_APPID + bodyUrl + Constant.SIXKW_OTHER_PAY_SECRER; + LOGGER.info("6kwotherNotify sign str {}", context); + String mySign = MD5Util.encrypByMd5(context); + if (!mySign.equals(sign)) { + LOGGER.error("pay:gameNoticeInterface,sign err, sign={},mySign={}", sign, mySign); + return "91"; + } + String orderId = String.valueOf(mapObj.get("cpOrder")); + String out_trade_no = String.valueOf(mapObj.get("orderId")); + + // 统一发货接口 + int payres = payHandler.processOrder(orderId, out_trade_no); //orderId 游戏订单号 out_trade_no 渠道订单号 + + // 成功 + if (payres == 1) { + return "SUCCESS"; + } else if (payres == -1) { + LOGGER.error("pay:gameNoticeInterface, {} 订单不存在,", orderId); + } else if (payres == -2) { + LOGGER.error("pay:gameNoticeInterface, {} 订单参数错误,", orderId); + } else if (payres == -3) { + LOGGER.error("pay:gameNoticeInterface, {} 服务器配置错误,", orderId); + } else if (payres == -4) { + LOGGER.error("pay:gameNoticeInterface, {} 充值失败,", orderId); + } else { + LOGGER.error("pay:gameNoticeInterface, {} 返回错误,", orderId); + return "err"; + } + } catch (Exception ex) { + ex.printStackTrace(); + } + return "err"; + } + + @RequestMapping(value = "/pay/6kwNotify") + public String sixkwNotify(HttpServletRequest request) { + try { + JSONObject responseObj = new JSONObject(); + int resultCode = Constant.CODE_SUCCESS; + BufferedReader br; + br = request.getReader(); + String str, wholeStr = ""; + while ((str = br.readLine()) != null) { + wholeStr += str; + } + String jsonStr = wholeStr; + String exam = Constant.SIXKW_PAY_SECRER; + String tmpSign = encrypByMd5(jsonStr + exam); + String sign = request.getHeader("AUTH6KW"); + + + LOGGER.info("notify jsonStr {} tmpSign {} sign {}", jsonStr, tmpSign, sign); + + if (!tmpSign.equals(sign)) { + LOGGER.error("pay:gameNoticeInterface,sign err, sign={},mySign={}", sign, tmpSign); + return "91"; + } + + JSONObject obj = JSON.parseObject(jsonStr); + String orderId = String.valueOf(obj.get("gameOrder")); + String out_trade_no = String.valueOf(obj.get("orderID")); + // 统一发货接口 + int payres = payHandler.processOrder(orderId, out_trade_no); //orderId 游戏订单号 out_trade_no 渠道订单号 + + // 成功 + if (payres == 1) { + return "SUCCESS"; + } else if (payres == -1) { + LOGGER.error("pay:gameNoticeInterface, {} 订单不存在,", orderId); + } else if (payres == -2) { + LOGGER.error("pay:gameNoticeInterface, {} 订单参数错误,", orderId); + } else if (payres == -3) { + LOGGER.error("pay:gameNoticeInterface, {} 服务器配置错误,", orderId); + } else if (payres == -4) { + LOGGER.error("pay:gameNoticeInterface, {} 充值失败,", orderId); + } else { + LOGGER.error("pay:gameNoticeInterface, {} 返回错误,", orderId); + return "err"; + } + } catch (Exception ex) { + ex.printStackTrace(); + } + return "err"; + } + + /** + * 唯4366支付回调 + * @param order_id 平台订单号 + * @param user_id 平台用户 ID + * @param server_id 区服 ID(CP 区服 ID) + * @param money 充值金额,单位元 + * @param extra_info 透传参数 + * @param time 当前时间戳 + * @param sign 签名: md5(order_id+ user_id+server_id+money+extra_info+time +'#'+ secret_key) + * @param sandbox 是否是测试订单,1:是: 0:否 + * @return 线上回调地址:http://120.131.0.103:9076/idip/sfzb/pay/payWeiWei4366Notify + */ + @RequestMapping(value = "/pay/payWeiWei4366Notify", method = {RequestMethod.POST,RequestMethod.GET}) + public JSONObject payWeiWei4366Notify(HttpServletRequest request,String order_id, String user_id, String server_id, String money, String extra_info,int time,String sign,String sandbox) { + JSONObject json = new JSONObject(); + try { + + List ipWhiteList = new ArrayList<>(); + ipWhiteList.add("119.23.175.96"); + ipWhiteList.add("120.77.12.228"); + ipWhiteList.add("119.23.24.106"); + ipWhiteList.add("120.78.192.221"); + ipWhiteList.add("14.29.126.78"); + ipWhiteList.add("14.23.117.83"); + ipWhiteList.add("121.8.199.83"); + ipWhiteList.add("47.106.234.30"); + ipWhiteList.add("112.74.113.198"); + ipWhiteList.add("27.18.94.43"); + + //获取自己游戏订单id ,通过extra_info字段穿透传值 + String[] split = extra_info.split("_"); + String self_OrderId = split[3].substring(0,split[3].length()-2); + + String ipAddr = getIpAddr(request); + + LOGGER.info("payWeiWei4366Notify, order_id={},user_id={},server_id={},money={},extra_info={},time={},sign={},sandbox={},ip={},self_OrderId={}", order_id, user_id, server_id, money, extra_info,time,sign,sandbox,ipAddr,self_OrderId); + + boolean contains = ipWhiteList.contains(ipAddr); + if(!contains){ + LOGGER.error("pay:payWeiWei4366Notify, ip = {},白名单ip = {}, ip错误,不在白名单中!!!,", ipAddr,ipWhiteList.toString()); + json.put("state",2); + json.put("msg","请勿非法提交订单,如有问题请联系客服!!!"); + return json; + } + + //签名: md5(order_id+ user_id+server_id+money+extra_info+time +'#'+ secret_key) + String context = order_id + user_id + server_id + money + extra_info + time +'#'+ Constant.WEIWEI_4366_SECRET_KEY ; + + String mySign = MD5Util.encrypByMd5(context); + json.put("Sign",mySign); + + json.put("order_id",order_id); + json.put("user_id",user_id); + json.put("server_id",server_id); + +// json.put("money",money); +// json.put("extra_info",extra_info); +// json.put("time",time); +// json.put("sign",sign); + + if (!mySign.equals(sign)) { + LOGGER.error("pay:gameNoticeInterface,sign err, sign={},mySign={}", sign, mySign); + json.put("state",0); + json.put("msg","Sign err"); + return json; + } + +// if (Constant.BAIDU_APPID != AppID) { +// LOGGER.error("pay:baiduNotify,appId is error,BAIDU_APPID =" + Constant.BAIDU_APPID + ",AppID =" + AppID); +// json.put("ResultMsg","AppID err"); +// json.put("ResultCode",91); +// return json; +// } + + String orderId = self_OrderId; + String out_trade_no = order_id; + + //JSONObject jsonObj = JSONObject.parseObject(Content); + //int payId = jsonObj.getIntValue("PayId"); //pay_source, — 付款渠道, 0表示为微信支付, 1表示支付宝支付, 2表示苹果支付, 3表示谷歌支付,4 表示onestore, 5 表示mycard, + + int amount =Double.valueOf(money).intValue()*100; //元转为分 (带小数点字符串转int类型) + + // 统一发货接口 +// int payres = payHandler.processOrder(orderId, out_trade_no,String.valueOf(payId)); //orderId 游戏订单号 out_trade_no 渠道订单号 + int payres = payHandler.processOrderNew(orderId, out_trade_no,amount); //orderId 游戏订单号 out_trade_no 渠道订单号,amount 支付金额 单位分 + + // 统一发货接口 +// int payres = 0; +// if(sandbox.equals(0)){ //正式订单 (是否是测试订单,1:是: 0:否) +// payHandler.processOrder(orderId, out_trade_no); //orderId 游戏订单号 out_trade_no 渠道订单号 +// }else if(sandbox.equals(1)){ //测试订单 +// payHandler.processOrderTest(orderId, out_trade_no); //orderId 游戏订单号 out_trade_no 渠道订单号 +// } + + // 成功 + if (payres == 1) { + json.put("state",1); + json.put("msg","充值成功/重复充值"); + return json; + } else if (payres == -1) { + LOGGER.error("pay:gameNoticeInterface, {} 订单不存在,", orderId); + } else if (payres == -2) { + LOGGER.error("pay:gameNoticeInterface, {} 订单参数错误,", orderId); + } else if (payres == -3) { + LOGGER.error("pay:gameNoticeInterface, {} 服务器配置错误,", orderId); + } else if (payres == -4) { + LOGGER.error("pay:gameNoticeInterface, {} 充值失败,", orderId); + } else { + LOGGER.error("pay:gameNoticeInterface, {} 返回错误,", orderId); + json.put("state",2); + json.put("msg","err"); + return json; + } + } catch (Exception ex) { + ex.printStackTrace(); + } + json.put("state",3); + json.put("msg","err"); + return json; + } + + /** + * 支付回调:赤兔回调 + * @param request + * @param uid 用户ID(唯一) + * @param order_id 平台方订单号 + * @param server 服务器唯一标识 + * @param amount 金额/单位元 + * @param extra 透传参数, 在SDK传入, 回调原样返回 + * @param sandbox 是否是测试订单,1:是: 0:否 + * @param timestamp 服务器时间戳, 秒 + * @param sign MD5签名: sign = md5(uid + order_id + server + amount + extra + sandbox + timestamp + key) + * @return 线上回调地址:http://cn_pay.caiyanghuyu.com/idip/sfzb/pay/chituNotify + */ + @RequestMapping(value = "/pay/chituNotify", method = {RequestMethod.POST,RequestMethod.GET}) + public JSONObject chituNotify(HttpServletRequest request,String uid, String order_id, String server, String amount, String extra,String sandbox,String timestamp,String sign) { + JSONObject json = new JSONObject(); + try { + + List ipWhiteList = new ArrayList<>(); + ipWhiteList.add("159.75.250.101"); + ipWhiteList.add("159.75.228.66"); + ipWhiteList.add("42.193.162.86"); + ipWhiteList.add("106.52.165.154"); + ipWhiteList.add("81.71.37.182"); + ipWhiteList.add("113.108.204.50"); //wifi的ip + + String strUnEscapeHTML = StringEscapeUtils.unescapeHtml(extra); + + //获取自己游戏订单id ,通过extra字段穿透传值 + String[] split = strUnEscapeHTML.split("_"); + String self_OrderId = split[3].substring(0,split[3].length()-2); + + String ipAddr = getIpAddr(request); + + LOGGER.info("chituNotify, uid={},order_id={},server={},amount={},extra={},sandbox={},timestamp={},sign={},ip={},self_OrderId={}", uid, order_id, server, amount, strUnEscapeHTML,sandbox,timestamp,sign,ipAddr,self_OrderId); + + boolean contains = ipWhiteList.contains(ipAddr); + if(!contains){ + LOGGER.error("pay:chituNotify, ip = {},白名单ip = {}, ip错误,不在白名单中!!!,", ipAddr,ipWhiteList.toString()); + json.put("state",2); + json.put("msg","请勿非法提交订单,如有问题请联系客服!!!"); + return json; + } + + // MD5签名: sign = md5(uid + order_id + server + amount + extra + sandbox + timestamp + key) + String context = uid + order_id + server + amount + extra + sandbox + timestamp + Constant.CHITU_SECRET_KEY ; + + String mySign = MD5Util.encrypByMd5(context); + json.put("Sign",mySign); + + json.put("order_id",order_id); + json.put("user_id",uid); + json.put("server_id",server); + +// json.put("money",money); +// json.put("extra_info",extra_info); +// json.put("time",time); +// json.put("sign",sign); + + if (!mySign.equals(sign)) { + LOGGER.error("----签名不一致----pay:chituNotify,sign err, sign={},mySign={}", sign, mySign); + json.put("state",0); + json.put("msg","Sign err"); + return json; + } + + String orderId = self_OrderId; + String out_trade_no = order_id; + + //JSONObject jsonObj = JSONObject.parseObject(Content); + //int payId = jsonObj.getIntValue("PayId"); //pay_source, — 付款渠道, 0表示为微信支付, 1表示支付宝支付, 2表示苹果支付, 3表示谷歌支付,4 表示onestore, 5 表示mycard, + + int money =Double.valueOf(amount).intValue()*100; //元转为分 (带小数点字符串转int类型) + + // 统一发货接口 +// int payres = payHandler.processOrder(orderId, out_trade_no,String.valueOf(payId)); //orderId 游戏订单号 out_trade_no 渠道订单号 + int payres = payHandler.processOrderNew(orderId, out_trade_no,money); //orderId 游戏订单号 out_trade_no 渠道订单号,amount 支付金额 单位分 + + // 统一发货接口 +// int payres = 0; +// if(sandbox.equals(0)){ //正式订单 (是否是测试订单,1:是: 0:否) +// payHandler.processOrder(orderId, out_trade_no); //orderId 游戏订单号 out_trade_no 渠道订单号 +// }else if(sandbox.equals(1)){ //测试订单 +// payHandler.processOrderTest(orderId, out_trade_no); //orderId 游戏订单号 out_trade_no 渠道订单号 +// } + + // 成功 + if (payres == 1) { + json.put("status",0); + json.put("msg","充值成功/重复充值"); + return json; + } else if (payres == -1) { + LOGGER.error("pay:gameNoticeInterface, {} 订单不存在,", orderId); + } else if (payres == -2) { + LOGGER.error("pay:gameNoticeInterface, {} 订单参数错误,", orderId); + } else if (payres == -3) { + LOGGER.error("pay:gameNoticeInterface, {} 服务器配置错误,", orderId); + } else if (payres == -4) { + LOGGER.error("pay:gameNoticeInterface, {} 充值失败,", orderId); + } else { + LOGGER.error("pay:gameNoticeInterface, {} 返回错误,", orderId); + json.put("status",2); + json.put("msg","err"); + return json; + } + } catch (Exception ex) { + ex.printStackTrace(); + } + json.put("status",3); + json.put("msg","err"); + return json; + } + + /** + * 支付回调:韩国回调 + * @param request + * @param userId 用户ID + * @param transactionId 订单号(GPA-xxxx-xxxx-) + * @param store 商店信息(apple、google、one) + * @param projectId 项目ID + * @param productId Google/Apple/ONE Store中注册的商品ID + * @param platform 操作平台信息(android、ios) + * @param payment 支付方式 + * @param uniqueId 唯一ID(调用purchase api时输入的uniqueId) + * @param gamepotOrderId GAMEPOT Order ID + * @param serverId serverId(调用purchase api时输入的serverId) + * @param playerId playerId(调用purchase api时输入的playerId) + * @param tp 1:测试支付 0:一般支付 + * @param etc etc(调用purchase api时输入的 etc) + * 说明文档: https://guide.ncloud-docs.com/docs/zh/game-gamepotserver + * 线上回调地址:http://acpay.ilod.co.kr/idip/sfzb/pay/ilodNotify + */ + @RequestMapping(value = "/pay/ilodNotify", method = {RequestMethod.POST,RequestMethod.GET}) + public JSONObject ilodNotify(HttpServletRequest request,String userId, String transactionId,String store, String projectId, String productId, String platform,String payment,String uniqueId,String gamepotOrderId,String serverId,String playerId,int tp,String etc) { + JSONObject json = new JSONObject(); + try { + + List ipWhiteList = new ArrayList<>(); + ipWhiteList.add("49.236.143.202"); + ipWhiteList.add("49.236.143.198"); + ipWhiteList.add("106.10.53.19"); + ipWhiteList.add("106.10.52.84"); + + String ipAddr = getIpAddr(request); + + LOGGER.info("ilodNotify, userId={},transactionId={},store={},projectId={},productId={},platform={},payment={},uniqueId={},gamepotOrderId={},serverId={},playerId={},tp={},etc={},ip={}", userId, transactionId, store, projectId, productId,platform,payment,uniqueId,gamepotOrderId,serverId,playerId,tp,etc,ipAddr); + + //获取自己游戏订单id ,通过extra_info字段穿透传值 + String[] split = etc.split("_"); + String self_OrderId = split[3].substring(0,split[3].length()-2); + + boolean contains = ipWhiteList.contains(ipAddr); + if(!contains){ + LOGGER.error("pay:ilodNotify, ip = {},白名单ip = {}, ip错误,不在白名单中!!!,", ipAddr,ipWhiteList.toString()); + json.put("status",0); + json.put("message","请勿非法提交订单,如有问题请联系客服!!!"); + return json; + } + + String orderId = self_OrderId; + String out_trade_no = transactionId; + + // 统一发货接口 +// int payres = payHandler.processOrderNew(orderId, out_trade_no,0); //orderId 游戏订单号 out_trade_no 渠道订单号,amount 支付金额 单位分 + + // 统一发货接口 + int payres = 0; + if(tp==0){ //正式订单 (0:一般支付,1:测试支付) + payres = payHandler.processOrderNew(orderId, out_trade_no,0); //orderId 游戏订单号 out_trade_no 渠道订单号 + }else if(tp==1){ //测试订单 + payres = payHandler.processOrderTest(orderId, out_trade_no); //orderId 游戏订单号 out_trade_no 渠道订单号 + } + + // 成功 + if (payres == 1) { + json.put("status",1); + json.put("message","充值成功/重复充值"); + return json; + } else if (payres == -1) { + LOGGER.error("pay:gameNoticeInterface, {} 订单不存在,", orderId); + } else if (payres == -2) { + LOGGER.error("pay:gameNoticeInterface, {} 订单参数错误,", orderId); + } else if (payres == -3) { + LOGGER.error("pay:gameNoticeInterface, {} 服务器配置错误,", orderId); + } else if (payres == -4) { + LOGGER.error("pay:gameNoticeInterface, {} 充值失败,", orderId); + } else { + LOGGER.error("pay:gameNoticeInterface, {} 返回错误,payres = {}", orderId,payres); + json.put("status",0); + json.put("message","Pay Fail EerrorCord:001"); + return json; + } + } catch (Exception ex) { + ex.printStackTrace(); + } + json.put("status",0); + json.put("message","Pay Fail EerrorCord:002"); + return json; + } + + /** + * 支付回调:韩国优惠劵回调 + * @param request + * @param userId 用户ID(唯一) + * @param projectId 项目ID + * @param platform 操作平台信息(android、ios) + * @param store 商店信息(apple、google、one) + * @param title 在仪表盘 > 游戏 > 送礼物 > 标题中输入的值 + * @param content 在仪表盘 > 游戏 > 送礼物 > 标题中输入的值 + * @param target 在仪表盘 > 游戏 > 送礼物 > 标题中输入的值 + * @param expireMs 在仪表盘 > 游戏 > 送礼物 > 有效期中输入的值时间戳(GMT+9) + * @param userData 调用优惠券API时,在第二个参数中输入的值 + * @param itemId itemData Array - itemData(JSON) {"item_id" : String, "store_item_id" : String, "count" : Number} + * item_id:在仪表盘游戏 > 道具中创建的道具项目的唯一ID + * store_item_id:要发放的道具ID + * count:要发放的道具的数量 + * 说明文档:https://guide.ncloud-docs.com/docs/zh/game-gamepotserver + * 优惠劵线上回调地址:http://acpay.ilod.co.kr/idip/sfzb/pay/ilodCouponNotify + */ + @RequestMapping(value = "/pay/ilodCouponNotify", method = {RequestMethod.POST,RequestMethod.GET}) +// public JSONObject ilodCouponNotify(HttpServletRequest request,String userId, String projectId,String platform, String store, String title, String content,String target,String expireMs,String userData,List itemId) { + public JSONObject ilodCouponNotify(HttpServletRequest request,String userId, String projectId,String platform, String store, String title, String content,String target,String expireMs,String userData,String itemId) { + JSONObject json = new JSONObject(); + try { + + List ipWhiteList = new ArrayList<>(); + ipWhiteList.add("49.236.143.202"); + ipWhiteList.add("49.236.143.198"); + ipWhiteList.add("106.10.53.19"); + ipWhiteList.add("106.10.52.84"); + + String ipAddr = getIpAddr(request); + + List itemDataList = readListValue(itemId, itemData.class); + + LOGGER.info("ilodCouponNotify, userId={},projectId={},platform={},store={},title={},content={},target={},expireMs={},ip={},userData={},itemId={}", userId, projectId, platform, store, title,content,target,expireMs,ipAddr,userData,itemId); + + //获取自己游戏订单id ,通过userData字段穿透传值 + String[] split = userData.split("#"); + int gameUserId = Integer.parseInt(split[0]); //游戏里角色Id = userId + int serverId = Integer.parseInt(split[1]); //服务器Id + String couponCode = split[2]; //兑换码 + + boolean contains = ipWhiteList.contains(ipAddr); + if(!contains){ + LOGGER.error("pay:ilodCouponNotify, ip = {},白名单ip = {}, ip错误,不在白名单中!!!,", ipAddr,ipWhiteList.toString()); + json.put("status",0); + json.put("msg","请勿非法提交订单,如有问题请联系客服!!!"); + return json; + } + + // 优惠劵 发货接口 + int payres = payHandler.processCoupon(gameUserId,serverId,couponCode,title,content,itemDataList); + + // 统一发货接口 +// int payres = 0; +// if(sandbox.equals(0)){ //正式订单 (是否是测试订单,1:是: 0:否) +// payHandler.processOrder(orderId, out_trade_no); //orderId 游戏订单号 out_trade_no 渠道订单号 +// }else if(sandbox.equals(1)){ //测试订单 +// payHandler.processOrderTest(orderId, out_trade_no); //orderId 游戏订单号 out_trade_no 渠道订单号 +// } + + // 成功 + if (payres == 1) { + json.put("status",1); + json.put("message","充值成功/重复充值"); + return json; + } else if (payres == -2) { + LOGGER.error("pay:gameNoticeInterface, {} 服务器配置错误,", gameUserId); + } else if (payres == -3) { + LOGGER.error("pay:gameNoticeInterface, {} 兑换失败,", gameUserId); + } else { + LOGGER.error("pay:gameNoticeInterface, {} 返回错误,payres={}", gameUserId,payres); + json.put("status",0); + json.put("message","err"); + return json; + } + } catch (Exception ex) { + ex.printStackTrace(); + } + json.put("status",0); + json.put("message","err!"); + return json; + } + + /** + * 支付回调:国内渠道 QuickGame Android + * + * 说明文档: https://www.quicksdk.com/doc-15.html + * 测试服回调地址:http://1.13.176.142/idip/sfzb/pay/quickNotify + */ + @RequestMapping(value = "/pay/quickNotify", method = {RequestMethod.POST,RequestMethod.GET}) + public String quickNotify(HttpServletRequest request1,String nt_data,String sign,String md5Sign) { + + try { + LOGGER.info("quickNotify--01, nt_data={},sign={},md5Sign={}", nt_data,sign,md5Sign); + + String signStr = nt_data + sign + Constant.MD5_KEY; + String mySign=MD5Util.encrypByMd5(signStr); + + if(!mySign.equals(md5Sign)){ + LOGGER.error("错误信息:签名不一致 mySign={},md5Sign={}", mySign,md5Sign); + return "-1"; + } + + String deCodeDateXml = QuickSDKUtil.decode(nt_data, Constant.CALLBACK_KEY); + LOGGER.info("quickNotify--02 deCodeDateXml={}",deCodeDateXml); + + Map stringObjectMap = XmlUtil.xmlToMap(deCodeDateXml); + Map message = (Map)stringObjectMap.get("message"); + + String is_test=(String) message.get("is_test"); //是否为测试订单 1为测试 0为线上正式订单,游戏应根据情况确定上线后是否向测试订单发放道具。 + String channel=(String) message.get("channel"); //渠道标示ID 注意:游戏可根据实情,确定发放道具时是否校验充值来源渠道是否与该角色注册渠道相符 + String channel_uid=(String) message.get("channel_uid"); //渠道用户唯一标示,该值从客户端GetUserId()中可获取 + String game_order=(String) message.get("game_order"); //游戏在调用QuickSDK发起支付时传递的游戏方订单,这里会原样传回 + String order_no=(String) message.get("order_no"); //QuickSDK唯一订单号 + String pay_time=(String) message.get("pay_time"); //支付时间 2015-01-01 23:00:00 + String amount=(String) message.get("amount"); //成交金额,单位元,游戏最终发放道具金额应以此为准 + String status=(String) message.get("status"); //充值状态:0成功, 1失败(为1时 应返回FAILED失败) + String extras_params=(String) message.get("extras_params"); //可为空,充值状态游戏客户端调用SDK发起支付时填写的透传参数.没有则为空 + + LOGGER.info("quickNotify--03, is_test={},channel={},channel_uid={},game_order={},order_no={},pay_time={},amount={},status={},extras_params={}", is_test,channel,channel_uid,game_order,order_no,pay_time,amount,status,extras_params); + + String orderId = game_order; //游戏订单号 + String out_trade_no = order_no; //渠道订单号 + + // 统一发货接口 + int payres = 0; + if(is_test.equals("0")){ //正式订单 (0:一般支付,1:测试支付) + Double amountDouble = Double.valueOf(amount) * 100; + payres = payHandler.processOrderNew(orderId, out_trade_no,amountDouble.intValue()); //orderId 游戏订单号 out_trade_no 渠道订单号,支付金额 单位分 + }else if(is_test.equals("1")){ //测试订单 + payres = payHandler.processOrderTest(orderId, out_trade_no); //orderId 游戏订单号 out_trade_no 渠道订单号 + } + + // 成功 + if (payres == 1) { + return "SUCCESS"; + } else if (payres == -1) { + LOGGER.error("pay:gameNoticeInterface, {} 订单不存在,", orderId); + } else if (payres == -2) { + LOGGER.error("pay:gameNoticeInterface, {} 订单参数错误,", orderId); + } else if (payres == -3) { + LOGGER.error("pay:gameNoticeInterface, {} 服务器配置错误,", orderId); + } else if (payres == -4) { + LOGGER.error("pay:gameNoticeInterface, {} 充值失败,", orderId); + } else { + LOGGER.error("pay:gameNoticeInterface, {} 返回错误,payres = {}", orderId,payres); + return "-2"; + } + } catch (Exception ex) { + ex.printStackTrace(); + } + return "-3"; + } + + /** + * 支付回调:国内渠道 QuickGame IOS + * + * 说明文档: https://www.quicksdk.com/doc-544.html + * 测试服回调地址:http://1.13.176.142/idip/sfzb/pay/quickIosNotify + */ + @RequestMapping(value = "/pay/quickIosNotify", method = {RequestMethod.POST,RequestMethod.GET}) + public String quickIosNotify(HttpServletRequest request1,String nt_data,String sign,String md5Sign) { + + try { + LOGGER.info("quickIosNotify--01, nt_data={},sign={},md5Sign={}", nt_data,sign,md5Sign); + + String signStr = nt_data + sign + Constant.QUICK_IOS_MD5_KEY; + String mySign=MD5Util.encrypByMd5(signStr); + + if(!mySign.equals(md5Sign)){ + LOGGER.error("错误信息:签名不一致 mySign={},md5Sign={}", mySign,md5Sign); + return "-1"; + } + + String deCodeDateXml = QuickSDKUtil.decode(nt_data, Constant.QUICK_IOS_CALLBACK_KEY); + LOGGER.info("quickIosNotify--02 deCodeDateXml={}",deCodeDateXml); + + Map stringObjectMap = XmlUtil.xmlToMap(deCodeDateXml); + Map message = (Map)stringObjectMap.get("message"); + + String uid=(String) message.get("uid"); //购买道具的用户uid + String login_name=(String) message.get("login_name"); //购买道具的用户username + String out_order_no=(String) message.get("out_order_no"); //游戏下单时传递的游戏订单号,原样返回 + String order_no=(String) message.get("order_no"); //SDK唯一订单号 + String pay_time=(String) message.get("pay_time"); //用户支付时间,如2017-02-06 14:22:32 + String amount=(String) message.get("amount"); //成交金额,单位元,游戏最终发放道具金额应以此为准 + String status=(String) message.get("status"); //充值状态:0成功, 1失败(为1时 应返回FAILED失败) + String extras_params=(String) message.get("extras_params"); //可为空,充值状态游戏客户端调用SDK发起支付时填写的透传参数.没有则为空 + + LOGGER.info("quickIosNotify--03, uid={},login_name={},out_order_no={},order_no={},pay_time={},amount={},status={},extras_params={}", uid,login_name,out_order_no,order_no,pay_time,amount,status,extras_params); + + String orderId = out_order_no; //游戏订单号 + String out_trade_no = order_no; //渠道订单号 + + // 统一发货接口 + //int payres = 0; + //if(is_test.equals("0")){ //正式订单 (0:一般支付,1:测试支付) + // Double amountDouble = Double.valueOf(amount) * 100; + // payres = payHandler.processOrderNew(orderId, out_trade_no,amountDouble.intValue()); //orderId 游戏订单号 out_trade_no 渠道订单号,支付金额 单位分 + //}else if(is_test.equals("1")){ //测试订单 + // payres = payHandler.processOrderTest(orderId, out_trade_no); //orderId 游戏订单号 out_trade_no 渠道订单号 + //} + + Double amountDouble = Double.valueOf(amount) * 100; + int payres = payHandler.processOrderNew(orderId, out_trade_no,amountDouble.intValue()); //orderId 游戏订单号 out_trade_no 渠道订单号,支付金额 单位分 + + // 成功 + if (payres == 1) { + return "SUCCESS"; + } else if (payres == -1) { + LOGGER.error("pay:gameNoticeInterface, {} 订单不存在,", orderId); + } else if (payres == -2) { + LOGGER.error("pay:gameNoticeInterface, {} 订单参数错误,", orderId); + } else if (payres == -3) { + LOGGER.error("pay:gameNoticeInterface, {} 服务器配置错误,", orderId); + } else if (payres == -4) { + LOGGER.error("pay:gameNoticeInterface, {} 充值失败,", orderId); + } else { + LOGGER.error("pay:gameNoticeInterface, {} 返回错误,payres = {}", orderId,payres); + return "-2"; + } + } catch (Exception ex) { + ex.printStackTrace(); + } + return "-3"; + } + + /** + * 支付回调:国内渠道 九九互动渠道 + * 说明文档: https://forever9.feishu.cn/docx/ErqPdeDlRo00RJxHqyfcN6GNnsb + * 测试服回调地址:http://43.139.240.49/idip/sfzb/pay/jjChannelNotify + */ + @RequestMapping(value = "/pay/jjChannelNotify", method = {RequestMethod.POST,RequestMethod.GET}) + public JSONObject jjChannelNotify(HttpServletRequest request,@RequestBody JSONObject jsonObject) { + JSONObject json = new JSONObject(); + try { + //SDK所在服务器的所有IP + List ipWhiteList = new ArrayList<>(); + ipWhiteList.add("193.112.136.97"); + + String ipAddr = getIpAddr(request); //获取当前网络ip + boolean contains = ipWhiteList.contains(ipAddr); + if(!contains){ + LOGGER.error("pay:jjChannelNotify, ip = {},白名单ip = {}, ip错误,不在白名单中!!!", ipAddr,ipWhiteList.toString()); + json.put("ret",-1); + json.put("msg","请勿非法提交订单,如有问题请联系客服!!!"); + return json; + } + + String appid = jsonObject.getString("appid"); //游戏appid + String openid = jsonObject.getString("openid"); //用户openid + String pid = jsonObject.getString("pid"); //研发商品id,发行不关心 + int amount = jsonObject.getIntValue("amount"); //支付金额(单位:分),发货的时候一定要校验这个字段,防止中途支付金额被篡改 + String transaction_id = jsonObject.getString("transaction_id"); //微信订单号 + String out_trade_no = jsonObject.getString("out_trade_no"); //发行方订单号 + String game_order_id = jsonObject.getString("game_order_id"); + String params = jsonObject.getString("params"); //客户端传的透传参数 + int state = jsonObject.getIntValue("state"); //状态是2表示支付成功 + String created_at = jsonObject.getString("created_at"); //订单创建时间 + String time_end = jsonObject.getString("time_end"); + String order_id = jsonObject.getString("order_id"); //发行订单号 + String sign = jsonObject.getString("sign"); //签名算法, 用MD5方式签名 签名key是游戏appid + + LOGGER.info("jjChannelNotify, appid={},openid={},pid={},amount={},transaction_id={},out_trade_no={},game_order_id={},params={},state={},created_at={},time_end={},order_id={},sign={},ip={}", appid, openid, pid, amount, transaction_id,out_trade_no,game_order_id,params,state,created_at,time_end,order_id,sign,ipAddr); + + //获取自己游戏订单id ,通过extra_info字段穿透传值 + String[] split = params.split("_"); + String self_OrderId = split[3].substring(0,split[3].length()-2); + + if(state != 2){ + LOGGER.error("pay:jjChannelNotify, SDK支付失败,此处不发货,state = {}", state); + json.put("ret",-2); + json.put("msg","SDK支付失败,不发货"); + return json; + } + + //不用签名验证,走下面订单查询验证 +// String signStr = appid; +// String mySign=MD5Util.encrypByMd5(signStr); +// if(!mySign.equals(sign)){ +// LOGGER.error("错误信息:签名不一致 mySign={},sign={}", mySign,sign); +// json.put("ret",-3); +// json.put("msg","签名不一致"); +// return json; +// } + + String ret = jjChannelOrderSearch(appid, openid, order_id); + if(!ret.equals("0")){ + LOGGER.error("错误信息:订单信息不存在 ret={}", ret); + json.put("ret",-4); + json.put("msg","订单信息不存在"); + return json; + } + + // 统一发货接口 + int payres = payHandler.processOrderNew(self_OrderId, out_trade_no,amount); //game_order_id 游戏订单号 out_trade_no 渠道订单号 + + // 成功 + if (payres == 1) { + json.put("ret",0); + json.put("msg","SUCCESS"); + return json; + } else if (payres == -1) { + LOGGER.error("pay:gameNoticeInterface, {} 订单不存在,", game_order_id); + } else if (payres == -2) { + LOGGER.error("pay:gameNoticeInterface, {} 订单参数错误,", game_order_id); + } else if (payres == -3) { + LOGGER.error("pay:gameNoticeInterface, {} 服务器配置错误,", game_order_id); + } else if (payres == -4) { + LOGGER.error("pay:gameNoticeInterface, {} 充值失败,", game_order_id); + } else if (payres == -5) { + LOGGER.error("pay:gameNoticeInterface, {} 提交的金额和支付的金额不一致,", game_order_id); + } else if (payres == -6) { + LOGGER.error("pay:gameNoticeInterface, {} 支付金额不能为0,", game_order_id); + } else { + LOGGER.error("pay:gameNoticeInterface, {} 返回错误,payres = {}", game_order_id,payres); + json.put("ret",-100); + json.put("msg","Pay Fail EerrorCord:001"); + return json; + } + } catch (Exception ex) { + ex.printStackTrace(); + } + json.put("ret",-200); + json.put("msg","Pay Fail EerrorCord:002"); + return json; + } + + /** + * 九九互动渠道 + * 订单查询接口(GET) + * @param appid 游戏appid + * @param openId 用户openid + * @param orderId 发货回调中的order_id字段 + * @return + */ + public static String jjChannelOrderSearch(String appid,String openId,String orderId) { + try { + // 请求参数 + Map headers = new HashMap(); + headers.put("ContentType", "application/json"); + + String body = String.format("game_appid=%s&game_openid=%s&orderId=%s", appid, openId, orderId); + + String resurl = HttpUtil.fetch("GET", Constant.JJCHANNEL_ORDER_SEARCH_URL, body, headers); + + net.sf.json.JSONObject jsonresObject = net.sf.json.JSONObject.fromObject(resurl); + LOGGER.info("jsonresObject="+jsonresObject.toString()); + // ret为 0成功,非0失败 + int ret = jsonresObject.getInt("ret"); + if (ret == 0) { + return "0"; + }else { + LOGGER.info("错误编号:" + ret); + return String.valueOf(ret); + } + } catch (IOException e) { + e.printStackTrace(); + } + return "-1"; + } + + public static List readListValue(String json, Class tClazz){ + return JSON.parseArray(json, tClazz); + } + + /** + * 获取当前网络ip + * @param request + * @return + */ + public String getIpAddr(HttpServletRequest request){ + String ipAddress = request.getHeader("x-forwarded-for"); + if(ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("Proxy-Client-IP"); + } + if(ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("WL-Proxy-Client-IP"); + } + if(ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getRemoteAddr(); + if(ipAddress.equals("127.0.0.1") || ipAddress.equals("0:0:0:0:0:0:0:1")){ + //根据网卡取本机配置的IP + InetAddress inet=null; + try { + inet = InetAddress.getLocalHost(); + } catch (UnknownHostException e) { + e.printStackTrace(); + } + ipAddress= inet.getHostAddress(); + } + } + //对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割 + if(ipAddress!=null && ipAddress.length()>15){ //"***.***.***.***".length() = 15 + if(ipAddress.indexOf(",")>0){ + ipAddress = ipAddress.substring(0,ipAddress.indexOf(",")); + } + } + return ipAddress; + } + + /** + * 支付回调:长尾渠道支付回调 + * + * 说明文档: https://www.quicksdk.com/doc-15.html + * 测试服回调地址:http://1.13.176.142:8081/idip/sfzb/pay/changWeiNotify + */ + @RequestMapping(value = "/pay/changWeiNotify", method = {RequestMethod.POST,RequestMethod.GET}) + public String changWeiNotify(HttpServletRequest request,String nt_data,String sign,String md5Sign) throws UnsupportedEncodingException { + + try { + LOGGER.info("changWeiNotify--01, nt_data={},sign={},md5Sign={}", nt_data,sign,md5Sign); + + String signStr = nt_data + sign + Constant.CHANGWEI_MD5_KEY; + String mySign=MD5Util.encrypByMd5(signStr); + + if(!mySign.equals(md5Sign)){ + LOGGER.error("错误信息:签名不一致 mySign={},md5Sign={}", mySign,md5Sign); + return "-1"; + } + + String deCodeDateXml = QuickSDKUtil.decode(nt_data, Constant.CHANGWEI_CALLBACK_KEY); + LOGGER.info("changWeiNotify--02 deCodeDateXml={}",deCodeDateXml); + + Map stringObjectMap = XmlUtil.xmlToMap(deCodeDateXml); + Map message = (Map)stringObjectMap.get("message"); + + String is_test=(String) message.get("is_test"); //是否为测试订单 1为测试 0为线上正式订单,游戏应根据情况确定上线后是否向测试订单发放道具。 + String channel=(String) message.get("channel"); //渠道标示ID 注意:游戏可根据实情,确定发放道具时是否校验充值来源渠道是否与该角色注册渠道相符 + String channel_uid=(String) message.get("channel_uid"); //渠道用户唯一标示,该值从客户端GetUserId()中可获取 + String game_order=(String) message.get("game_order"); //游戏在调用QuickSDK发起支付时传递的游戏方订单,这里会原样传回 + String order_no=(String) message.get("order_no"); //QuickSDK唯一订单号 + String pay_time=(String) message.get("pay_time"); //支付时间 2015-01-01 23:00:00 + String amount=(String) message.get("amount"); //成交金额,单位元,游戏最终发放道具金额应以此为准 + String status=(String) message.get("status"); //充值状态:0成功, 1失败(为1时 应返回FAILED失败) + String extras_params=(String) message.get("extras_params"); //可为空,充值状态游戏客户端调用SDK发起支付时填写的透传参数.没有则为空 + + LOGGER.info("quickNotify--03, is_test={},channel={},channel_uid={},game_order={},order_no={},pay_time={},amount={},status={},extras_params={}", is_test,channel,channel_uid,game_order,order_no,pay_time,amount,status,extras_params); + + String orderId = game_order; //游戏订单号 + String out_trade_no = order_no; //渠道订单号 + + // 统一发货接口 + int payres = 0; + if(is_test.equals("0")){ //正式订单 (0:一般支付,1:测试支付) + Double amountDouble = Double.valueOf(amount) * 100; + payres = payHandler.processOrderNew(orderId, out_trade_no,amountDouble.intValue()); //orderId 游戏订单号 out_trade_no 渠道订单号,支付金额 单位分 + }else if(is_test.equals("1")){ //测试订单 + payres = payHandler.processOrderTest(orderId, out_trade_no); //orderId 游戏订单号 out_trade_no 渠道订单号 + } + + // 成功 + if (payres == 1) { + return "SUCCESS"; + } else if (payres == -1) { + LOGGER.error("pay:gameNoticeInterface, {} 订单不存在,", orderId); + } else if (payres == -2) { + LOGGER.error("pay:gameNoticeInterface, {} 订单参数错误,", orderId); + } else if (payres == -3) { + LOGGER.error("pay:gameNoticeInterface, {} 服务器配置错误,", orderId); + } else if (payres == -4) { + LOGGER.error("pay:gameNoticeInterface, {} 充值失败,", orderId); + } else { + LOGGER.error("pay:gameNoticeInterface, {} 返回错误,payres = {}", orderId,payres); + return "-2"; + } + } catch (Exception ex) { + ex.printStackTrace(); + } + return "-3"; + } + + @GetMapping("/pay/superOrder") //bt版sdk + public JSONObject superOrder(@RequestParam("order_sn") String orderSn, + @RequestParam("good_name") String goodName, + @RequestParam("game_order_sn") String gameOrderSn, + @RequestParam("uuid") String uuid, + @RequestParam("pay_money") Integer payMoney, + @RequestParam("game_id") String gameId, + @RequestParam("service_id") String serviceId, + @RequestParam("service_name") String serviceName, + @RequestParam("role_id") String roleId, + @RequestParam("role_name") String roleName, + @RequestParam("time") Integer time, + @RequestParam("pay_status") Integer payStatus, + @RequestParam("remark") String remark, + @RequestParam("sign") String sign + ) { + StringBuilder sb = new StringBuilder(); + JSONObject json = new JSONObject(); + try { + sb.append("good_name=").append(URLEncoder.encode(goodName, "utf-8")).append("&"); + sb.append("uuid=").append(uuid).append("&"); + sb.append("order_sn=").append(orderSn).append("&"); + sb.append("game_order_sn=").append(gameOrderSn).append("&"); + sb.append("game_id=").append(gameId).append("&"); + sb.append("service_id=").append(serviceId).append("&"); + sb.append("service_name=").append(URLEncoder.encode(serviceName, "utf-8")).append("&"); + sb.append("role_id=").append(roleId).append("&"); + sb.append("role_name=").append(URLEncoder.encode(roleName, "utf-8")).append("&"); + sb.append("pay_money=").append(payMoney).append("&"); + sb.append("pay_status=").append(payStatus).append("&"); + sb.append("remark=").append(URLEncoder.encode(remark, "utf-8")).append("&"); + sb.append("time=").append(time).append("&"); + sb.append("key=").append(Constant.SUPER_ORDER_KEY); + } catch (UnsupportedEncodingException e) { + LOGGER.error("URLEncoder error, game_id:{}, game_order_sn:{}", gameId, gameOrderSn); + json.put("code", 500); + json.put("msg", "system error"); + return json; + } + String mySign = encrypByMd5(sb.toString()); + if (!mySign.equals(sign)){ + LOGGER.error("super order sign error, game_id:{}, game_order_sn:{}, sign:{}, mySign:{}", + gameId, gameOrderSn, sign, mySign); + json.put("code", 600); + json.put("msg", "sign error"); + return json; + } + int payres = 0; + try { + payres = payHandler.processOrderNew(gameOrderSn, orderSn, payMoney * 100); + } catch (Exception e) { + LOGGER.error("processOrder error, game_id:{}, game_order_sn:{}", gameId, gameOrderSn, e); + json.put("code", 500); + json.put("msg", "system error"); + return json; + } + + // 成功 + if (payres == 1) { + json.put("code", 200); + json.put("msg", "success"); + return json; + } else if (payres == -1) { + LOGGER.error("pay error, {} 订单不存在,", gameOrderSn); + } else if (payres == -2) { + LOGGER.error("pay error, {} 订单参数错误,", gameOrderSn); + } else if (payres == -3) { + LOGGER.error("pay error, {} 服务器配置错误,", gameOrderSn); + } else if (payres == -4) { + LOGGER.error("pay error, {} 充值失败,", gameOrderSn); + } else { + LOGGER.error("pay error, {} 返回错误,", gameOrderSn); + } + json.put("code", 601); + json.put("msg", "pay error"); + return json; + } + + @RequestMapping(value = "/pay/x7Order", method = {RequestMethod.POST,RequestMethod.GET})//小7sdk + public String xiaoQiOrder(@RequestParam("encryp_data") String encrypData, + @RequestParam("extends_info_data") String extendsInfoData, + @RequestParam("game_area") String gameArea, + @RequestParam("game_level") String gameLevel, + @RequestParam("game_orderid") String gameOrderId, + @RequestParam("game_role_id") String gameRoleId, + @RequestParam("game_role_name") String gameRoleName, + @RequestParam("sdk_version") String sdkVersion, + @RequestParam("subject") String subject, + @RequestParam("xiao7_goid") Integer xiao7Goid, + @RequestParam("sign_data") String signData + ) { + StringBuilder sb = new StringBuilder(); + sb.append("encryp_data=").append(encrypData).append("&"); + sb.append("extends_info_data=").append(extendsInfoData).append("&"); + sb.append("game_area=").append(gameArea).append("&"); + sb.append("game_level=").append(gameLevel).append("&"); + sb.append("game_orderid=").append(gameOrderId).append("&"); + sb.append("game_role_id=").append(gameRoleId).append("&"); + sb.append("game_role_name=").append(gameRoleName).append("&"); + sb.append("sdk_version=").append(sdkVersion).append("&"); + sb.append("subject=").append(subject).append("&"); + sb.append("xiao7_goid=").append(xiao7Goid); + String sourceStr = sb.toString(); + X509EncodedKeySpec keySpec = new X509EncodedKeySpec(Base64.getDecoder().decode((Constant.X7_PUBLIC_KEY))); + PublicKey publicKey = null; + try { + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + publicKey = keyFactory.generatePublic(keySpec); + } catch (Exception e) { + LOGGER.error("generate public key error, encrypData:{}, gameOrderId:{}", encrypData, gameOrderId, e); + return "failed:order error"; + } + try { + + byte[] rawSignData = Base64.getDecoder().decode(signData); + Signature signature = Signature.getInstance("SHA1withRSA"); + signature.initVerify(publicKey); + signature.update(sourceStr.getBytes()); + boolean verify = signature.verify(rawSignData); + if (!verify){ + LOGGER.error("x7 order sign verify fail, encrypData:{}, gameOrderId:{}, signData:{}, myData:{}", + encrypData, gameOrderId, signData, sourceStr); + return "sign_data_verify_failed"; + } + } catch (Exception e) { + LOGGER.error("sign error, encrypData:{}, gameOrderId:{}", encrypData, gameOrderId, e); + return "failed:order error"; + } + byte[] rawEncrypData = Base64.getDecoder().decode(encrypData); + String decrypData = null; + try { + Cipher cipher = Cipher.getInstance("RSA"); + cipher.init(Cipher.DECRYPT_MODE, publicKey); + decrypData = new String(cipher.doFinal(rawEncrypData)); + } catch (Exception e) { + LOGGER.error("decrypt data error, encrypData:{}, gameOrderId:{}", encrypData, gameOrderId, e); + return "encryp_data_decrypt_failed"; + } + + int payres = 0; + try { + String[] strings = decrypData.split("&"); + String gameOrderSn = strings[0].split("=")[1]; + double payMoney = Double.parseDouble(strings[2].split("=")[1]); + payres = payHandler.processOrderNew(gameOrderSn, String.valueOf(xiao7Goid), (int)(payMoney * 100)); + } catch (Exception e) { + LOGGER.error("processOrder error, encrypData:{}, gameOrderId:{}", encrypData, gameOrderId, e); + return "failed:order error"; + } + + // 成功 + if (payres == 1) { + return "success"; + } else if (payres == -1) { + LOGGER.error("pay error, {} 订单不存在,", gameOrderId); + } else if (payres == -2) { + LOGGER.error("pay error, {} 订单参数错误,", gameOrderId); + } else if (payres == -3) { + LOGGER.error("pay error, {} 服务器配置错误,", gameOrderId); + } else if (payres == -4) { + LOGGER.error("pay error, {} 充值失败,", gameOrderId); + } else { + LOGGER.error("pay error, {} 返回错误,", gameOrderId); + } + return "failed:order error"; + } + + @RequestMapping(value = "/pay/iCanOrder", method = {RequestMethod.POST,RequestMethod.GET})//艾肯sdk + public JSONObject iCanOrder(@RequestParam("account") String account, + @RequestParam("serverId") String serverId, + @RequestParam("orderId") String orderId, + @RequestParam("itemId") String itemId, + @RequestParam("iMoney") Integer iMoney, + @RequestParam("gMoney") Integer gMoney, + @RequestParam("roleId") String roleId, + @RequestParam("gOrderId") String gOrderId, + @RequestParam("time") String time, + @RequestParam("verify") String verify, + @RequestParam("platform") String platform + ) { + LOGGER.info("iCan pay order, account:{}, serverId:{}, orderId:{}, itemId:{}, iMoney:{}, gMoney:{}, gOrderId:{}, roleId:{}, time:{}, platform:{}", + account, serverId, orderId, itemId, iMoney, gMoney, gOrderId, roleId, time, platform); + JSONObject jsonObject = new JSONObject(); + StringBuilder sb = new StringBuilder(); + sb.append(account).append(itemId).append(orderId).append(iMoney).append(Constant.AIKEN_SERVER_KEY).append(time).append(roleId); + try { + String mySign = encrypByMd5(sb.toString()); + if (!mySign.equals(verify)){ + LOGGER.error("iCan order sign verify fail, gOrderId:{}, roleId:{}", + gOrderId, roleId); + jsonObject.put("code", 3); + jsonObject.put("msg", "verify error"); + return jsonObject; + } + } catch (Exception e) { + LOGGER.error("iCan order sign error, gOrderId:{}, roleId:{}", gOrderId, roleId, e); + jsonObject.put("code", 3); + jsonObject.put("msg", "verify error"); + return jsonObject; + } + + int payres = 0; + try { + payres = payHandler.processOrderWithPlatform(gOrderId, orderId, iMoney * 100, platform); + } catch (Exception e) { + LOGGER.error("processOrder error, gOrderId:{}, roleId:{}", gOrderId, roleId, e); + jsonObject.put("code", 99); + jsonObject.put("msg", "server error"); + return jsonObject; + } + + // 成功 + if (payres == 1) { + jsonObject.put("code", 0); + jsonObject.put("msg", ""); + return jsonObject; + } else if (payres == -1) { + LOGGER.error("pay error, {} 订单不存在,", gOrderId); + } else if (payres == -2) { + LOGGER.error("pay error, {} 订单参数错误,", gOrderId); + } else if (payres == -3) { + LOGGER.error("pay error, {} 服务器配置错误,", gOrderId); + } else if (payres == -4) { + LOGGER.error("pay error, {} 充值失败,", gOrderId); + } else { + LOGGER.error("pay error, {} 返回错误,", gOrderId); + } + jsonObject.put("code", 99); + jsonObject.put("msg", "server error"); + return jsonObject; + } + + @RequestMapping(value = "/pay/qianqian", method = {RequestMethod.POST,RequestMethod.GET})//千千sdk + public String iCanOrder(@RequestParam("appId") String appId, + @RequestParam("userId") String userId, + @RequestParam("channelId") String channelId, + @RequestParam("orderId") String orderId, + @RequestParam("orderStatus") String orderStatus, + @RequestParam("amount") String amount, + String currency, + Integer isTest, + String cpOrderID, + String callBackInfo, + @RequestParam("payTime") String payTime, + @RequestParam("sign") String sign) { + LOGGER.info("qianqian pay order, userId:{}, orderId:{}, amount:{}, currency:{}, cpOrderId:{}", + userId, orderId, amount, currency, cpOrderID); + StringBuilder sb = new StringBuilder(); + sb.append("amount=").append(amount).append("&"); + sb.append("appId=").append(appId).append("&"); + if (callBackInfo != null){ + sb.append("callBackInfo=").append(callBackInfo).append("&"); + } + sb.append("channelId=").append(channelId).append("&"); + if (cpOrderID != null){ + sb.append("cpOrderID=").append(cpOrderID).append("&"); + } + if (currency != null){ + sb.append("currency=").append(currency).append("&"); + } + if (isTest != null){ + sb.append("isTest=").append(isTest).append("&"); + } + sb.append("orderId=").append(orderId).append("&"); + sb.append("orderStatus=").append(orderStatus).append("&"); + sb.append("payTime=").append(payTime).append("&"); + sb.append("userId=").append(userId).append("&"); + sb.append("key=").append(Constant.QIANQIAN_KEY); + String mySign = encrypByMd5(sb.toString()); + if(!mySign.equals(sign)){ + LOGGER.error("错误信息:签名不一致 mySign={},md5Sign={}", mySign, sign); + return "sign fail"; + } + int payres = 0; + try { + payres = payHandler.processOrderNew(cpOrderID, orderId, Integer.parseInt(amount)); + } catch (Exception e) { + LOGGER.error("processOrder error, cpOrderID:{}, userId:{}", cpOrderID, userId, e); + } + if (payres == 1) { + return "SUCCESS"; + } else if (payres == -1) { + LOGGER.error("pay error, {} 订单不存在,", cpOrderID); + } else if (payres == -2) { + LOGGER.error("pay error, {} 订单参数错误,", cpOrderID); + } else if (payres == -3) { + LOGGER.error("pay error, {} 服务器配置错误,", cpOrderID); + } else if (payres == -4) { + LOGGER.error("pay error, {} 充值失败,", cpOrderID); + } else { + LOGGER.error("pay error, {} 返回错误,", cpOrderID); + } + return "fail"; + } + + @RequestMapping(value = "/pay/qianqian/quick", method = {RequestMethod.POST,RequestMethod.GET})//千千sdk + public String iCanOrder(@RequestParam("nt_data") String ntData, + @RequestParam("sign") String sign, + @RequestParam("md5Sign") String md5Sign){ + StringBuilder sb = new StringBuilder(); + sb.append(ntData).append(sign).append(Constant.QUICK_MD5_KEY); + String mySign = encrypByMd5(sb.toString()); + if(!mySign.equals(md5Sign)){ + LOGGER.error("错误信息:签名不一致 mySign={},md5Sign={}", mySign, md5Sign); + return "sign fail"; + } + String xml = QuickSDKUtil.decode(ntData, Constant.QUICK_CALLBACK_KEY); + DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder dBuilder = null; + Document doc = null; + try { + dBuilder = dbFactory.newDocumentBuilder(); + doc = dBuilder.parse(new InputSource(new StringReader(xml))); + } catch (ParserConfigurationException | SAXException | IOException e) { + LOGGER.info("qianqian quick decode error ", e); + return "decode fail"; + } + + doc.getDocumentElement().normalize(); + + NodeList nodeList = doc.getElementsByTagName("message"); + Node node = nodeList.item(0); + if (node.getNodeType() == Node.ELEMENT_NODE) { + Element element = (Element) node; + String channel_uid = element.getElementsByTagName("channel_uid").item(0).getTextContent(); + String game_order = element.getElementsByTagName("game_order").item(0).getTextContent(); + String order_no = element.getElementsByTagName("order_no").item(0).getTextContent(); + String amount = element.getElementsByTagName("amount").item(0).getTextContent(); + + int payres = 0; + try { + payres = payHandler.processOrderNew(game_order, order_no, (int)(Double.parseDouble(amount)) * 100); + } catch (Exception e) { + LOGGER.error("processOrder error, cpOrderID:{}, userId:{}", game_order, channel_uid, e); + } + if (payres == 1) { + return "SUCCESS"; + } else if (payres == -1) { + LOGGER.error("pay error, {} 订单不存在,", game_order); + } else if (payres == -2) { + LOGGER.error("pay error, {} 订单参数错误,", game_order); + } else if (payres == -3) { + LOGGER.error("pay error, {} 服务器配置错误,", game_order); + } else if (payres == -4) { + LOGGER.error("pay error, {} 充值失败,", game_order); + } else { + LOGGER.error("pay error, {} 返回错误,", game_order); + } + return "fail"; + }else { + return "decode fail"; + } + } + + + @RequestMapping(value = "/pay/ky/quick", method = {RequestMethod.POST,RequestMethod.GET}) + public String kyOrder(@RequestParam("nt_data") String ntData, + @RequestParam("sign") String sign, + @RequestParam("md5Sign") String md5Sign){ + StringBuilder sb = new StringBuilder(); + sb.append(ntData).append(sign).append(Constant.QUICK_MD5_KEY_2); + String mySign = encrypByMd5(sb.toString()); + if(!mySign.equals(md5Sign)){ + LOGGER.error("错误信息:签名不一致 mySign={},md5Sign={}", mySign, md5Sign); + return "sign fail"; + } + String xml = QuickSDKUtil.decode(ntData, Constant.QUICK_CALLBACK_KEY_2); + DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder dBuilder = null; + Document doc = null; + try { + dBuilder = dbFactory.newDocumentBuilder(); + doc = dBuilder.parse(new InputSource(new StringReader(xml))); + } catch (ParserConfigurationException | SAXException | IOException e) { + LOGGER.info("ky quick decode error ", e); + return "decode fail"; + } + + doc.getDocumentElement().normalize(); + + NodeList nodeList = doc.getElementsByTagName("message"); + Node node = nodeList.item(0); + if (node.getNodeType() == Node.ELEMENT_NODE) { + Element element = (Element) node; + String channel_uid = element.getElementsByTagName("channel_uid").item(0).getTextContent(); + String game_order = element.getElementsByTagName("game_order").item(0).getTextContent(); + String order_no = element.getElementsByTagName("order_no").item(0).getTextContent(); + String amount = element.getElementsByTagName("amount").item(0).getTextContent(); + + int payres = 0; + try { + payres = payHandler.processOrderNew(game_order, order_no, (int)(Double.parseDouble(amount)) * 100); + } catch (Exception e) { + LOGGER.error("processOrder error, cpOrderID:{}, userId:{}", game_order, channel_uid, e); + } + if (payres == 1) { + return "SUCCESS"; + } else if (payres == -1) { + LOGGER.error("pay error, {} 订单不存在,", game_order); + } else if (payres == -2) { + LOGGER.error("pay error, {} 订单参数错误,", game_order); + } else if (payres == -3) { + LOGGER.error("pay error, {} 服务器配置错误,", game_order); + } else if (payres == -4) { + LOGGER.error("pay error, {} 充值失败,", game_order); + } else { + LOGGER.error("pay error, {} 返回错误,", game_order); + } + return "fail"; + }else { + return "decode fail"; + } + } + +} diff --git a/src/main/java/com/jmfy/controller/QiPaController.java b/src/main/java/com/jmfy/controller/QiPaController.java new file mode 100644 index 0000000..3f03277 --- /dev/null +++ b/src/main/java/com/jmfy/controller/QiPaController.java @@ -0,0 +1,409 @@ +package com.jmfy.controller; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.jmfy.Application; +import com.jmfy.dao.MongoConnectDao; +import com.jmfy.dao.ServerListDao; +import com.jmfy.model.CoreUserInfo; +import com.jmfy.model.ServerInfo; +import com.jmfy.redisProperties.RedisUserKey; +import com.jmfy.sdk.HmacSHA1Encryption; +import com.jmfy.sdk.HttpUtil; +import com.jmfy.sdk.ParamUtil; +import com.jmfy.util.Constant; +import com.jmfy.util.MD5Util; +import com.jmfy.util.RPCClient; +import com.jmfy.util.RedisUtil; +import com.ljsd.jieling.thrift.idl.Result; +import com.mongodb.BasicDBObject; +import com.mongodb.DBCollection; +import com.mongodb.DBObject; +import com.mongodb.WriteResult; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.BasicQuery; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.data.mongodb.core.query.Update; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import java.net.URLEncoder; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Random; + +import static com.jmfy.util.MD5Util.encrypByMd5; + +@RestController +@RequestMapping("/qipa") +public class QiPaController { + private static final Logger LOGGER = LoggerFactory.getLogger(QiPaController.class); + private static final int DIAMOND_ITEM_ID = 16; + + @Resource + private MongoConnectDao mongoConnectDao; + + + @GetMapping("/rebate") + public JSONObject rebate(@RequestParam("rebate_type") Integer rebateType, + @RequestParam("rebate_no") Integer rebateNo, + @RequestParam("game_order_no") String gameOrderNo, + @RequestParam("user_id") String userId, + @RequestParam("pay_money") String payMoney, + @RequestParam("gold") Integer gold, + @RequestParam("game_id") Integer gameId, + @RequestParam("service_id") String serviceId, + @RequestParam("role_id") String roleId, + @RequestParam("role_name") String roleName, + @RequestParam("time") String time, + @RequestParam("sign") String sign){ + LOGGER.info("rebate, role_id:{}, gold:{}", roleId, gold); + + JSONObject json = new JSONObject(); + StringBuilder sb = new StringBuilder(); + try { + sb.append(rebateType); + sb.append(rebateNo); + sb.append(URLEncoder.encode(gameOrderNo, "utf-8")); + sb.append(URLEncoder.encode(userId, "utf-8")); + sb.append(payMoney); + sb.append(gold); + sb.append(gameId); + sb.append(URLEncoder.encode(serviceId, "utf-8")); + sb.append(URLEncoder.encode(roleId, "utf-8")); + sb.append(time); + sb.append(Constant.SUPER_ORDER_KEY); + } catch (UnsupportedEncodingException e) { + LOGGER.error("URLEncoder error, role_id:{}, rebate_no:{}", roleId, rebateNo, e); + json.put("code", 500); + json.put("msg", "system error"); + return json; + } + String mySign = encrypByMd5(sb.toString()); + if (!mySign.equals(sign)){ + LOGGER.error("qipa rebate sign error, role_id:{}, rebate_no:{}, sign:{}, mySign:{}", + roleId, rebateNo, sign, mySign); + json.put("code", 600); + json.put("msg", "sign error"); + return json; + } + MongoTemplate mongoTemplate = null; + try { + mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + } catch (Exception e) { + LOGGER.error("get mongoTemplate error"); + json.put("code", 500); + json.put("msg", "system error"); + return json; + } + + BasicQuery query = new BasicQuery(new BasicDBObject("uid", Integer.parseInt(roleId))); + CoreUserInfo userInfo = mongoTemplate.findOne(query, CoreUserInfo.class, "user_info"); + if (userInfo == null){ + LOGGER.error("user not exist, uid:{}", roleId); + json.put("code", 600); + json.put("msg", "user not exist"); + return json; + } + BasicQuery query1 = new BasicQuery(new BasicDBObject("server_id", userInfo.getServerid()+"")); + ServerInfo serverInfo = mongoTemplate.findOne(query1, ServerInfo.class, "server_info"); + String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(serverInfo.getRealServerId()), String.class, -1); + System.out.println("rpcString " + rpcString); + if (null == rpcString) { + LOGGER.error("serverAddress not exist"); + json.put("code", 601); + json.put("msg", "rebate error"); + return json; + } + String thriftIp = rpcString.split(":")[0]; + String thriftPort = rpcString.split(":")[3]; + if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) { + LOGGER.error("serverAddress not exist"); + json.put("code", 601); + json.put("msg", "rebate error"); + return json; + } else { + String title = "充值返利邮件"; + String content = "充值已触达返利要求,奖励如下,请查收"; + String reward = DIAMOND_ITEM_ID + "#" + gold; + Result result = null; + try { + result = RPCClient.sendMailToRole(thriftIp, thriftPort, roleId, title, content, reward); + } catch (Exception e) { + LOGGER.error("rebate error, role_id:{}, rebate_no:{}", roleId, rebateNo, e); + json.put("code", 500); + json.put("msg", "system error"); + return json; + } + if (result.getResultCode() != 1) { + LOGGER.error("rebate error, role_id:{}, rebate_no:{}", roleId, rebateNo); + json.put("code", 601); + json.put("msg", "rebate error"); + } else { + LOGGER.info("rebate " + rebateNo + " is ok "); + json.put("code", 200); + json.put("msg", "success"); + } + } + return json; + } + + @PostMapping("/addItem") + public JSONObject addItem(@RequestParam("active_id") Integer activeId, + @RequestParam("is_freee") Integer isFreee, + @RequestParam("money") Integer money, + @RequestParam("title") String title, + @RequestParam("content") String content, + @RequestParam("player_id") String playerId, + @RequestParam("server_id") String serverId, + @RequestParam("item") String item, + @RequestParam("sign") String sign){ + + LOGGER.info("addItem, player_id:{}, item:{}", playerId, item); + JSONObject json = new JSONObject(); + StringBuilder sb = new StringBuilder(); + sb.append(activeId); + sb.append(isFreee); + sb.append(money); + sb.append(title); + sb.append(content); + sb.append(playerId); + sb.append(serverId); + sb.append(Constant.SUPER_ITEM_KEY); + + String mySign = encrypByMd5(sb.toString()); + if (!mySign.equals(sign)){ + LOGGER.error("qipa addItem sign error, player_id:{}, active_id:{}, sign:{}, mySign:{}", + playerId, activeId, sign, mySign); + json.put("code", 600); + json.put("msg", "sign error"); + return json; + } + MongoTemplate mongoTemplate = null; + try { + mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + } catch (Exception e) { + LOGGER.error("get mongoTemplate error"); + json.put("code", 500); + json.put("msg", "system error"); + return json; + } + + BasicQuery query = new BasicQuery(new BasicDBObject("uid", Integer.parseInt(playerId))); + CoreUserInfo userInfo = mongoTemplate.findOne(query, CoreUserInfo.class, "user_info"); + if (userInfo == null){ + LOGGER.error("user not exist, uid:{}", playerId); + json.put("code", 600); + json.put("msg", "user not exist"); + return json; + } + BasicQuery query1 = new BasicQuery(new BasicDBObject("server_id", userInfo.getServerid()+"")); + ServerInfo serverInfo = mongoTemplate.findOne(query1, ServerInfo.class, "server_info"); + String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(serverInfo.getRealServerId()), String.class, -1); + System.out.println("rpcString " + rpcString); + if (null == rpcString) { + LOGGER.error("serverAddress not exist"); + json.put("code", 601); + json.put("msg", "rebate error"); + return json; + } + String thriftIp = rpcString.split(":")[0]; + String thriftPort = rpcString.split(":")[3]; + if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) { + LOGGER.error("serverAddress not exist"); + json.put("code", 601); + json.put("msg", "rebate error"); + return json; + } else { + JSONArray jsonArray = JSON.parseArray(item); + StringBuilder reward = new StringBuilder(); + for (Object object : jsonArray) { + String itemId = ((JSONObject) object).getString("mid"); + int amount = ((JSONObject) object).getIntValue("amount"); + if (reward.length() != 0){ + reward.append("|"); + } + reward.append(itemId).append("#").append(amount); + } + Result result = null; + try { + result = RPCClient.sendMailToRole(thriftIp, thriftPort, playerId, title, content, reward.toString()); + } catch (Exception e) { + LOGGER.error("addItem error, player_id:{}, active_id:{}", playerId, activeId, e); + json.put("code", 500); + json.put("msg", "system error"); + return json; + } + if (result.getResultCode() != 1) { + LOGGER.error("addItem error, player_id:{}, active_id:{}", playerId, activeId); + json.put("code", 601); + json.put("msg", "rebate error"); + } else { + LOGGER.info("addItem " + activeId + " is ok "); + json.put("code", 200); + json.put("msg", "success"); + } + } + return json; + } + + @GetMapping("/operate") + public JSONObject operateUser(@RequestParam("userId") String userId, + @RequestParam("roleId") String roleId, + @RequestParam("roleName") String roleName, + @RequestParam("gameId") Integer gameId, + @RequestParam("serviceId") String serviceId, + @RequestParam("opStatus") Integer opStatus, + @RequestParam("shutupTime") Long shutupTime, + @RequestParam("chatContents") String chatContents, + @RequestParam("random") String random, + @RequestParam("sign") String sign){ + + LOGGER.info("operate, roleId:{}, opStatus:{}", roleId, opStatus); + + JSONObject json = new JSONObject(); + StringBuilder sb = new StringBuilder(); + + try { + sb.append(userId); + sb.append(roleId); + sb.append(URLEncoder.encode(roleName, "utf-8").toLowerCase()); + sb.append(gameId); + sb.append(serviceId); + sb.append(opStatus); + sb.append(shutupTime); + sb.append(URLEncoder.encode(chatContents, "utf-8").toLowerCase()); + sb.append(random); + sb.append(Constant.SUPER_ORDER_KEY); + } catch (UnsupportedEncodingException e) { + LOGGER.error("URLEncoder error, role_id:{}", roleId,e); + json.put("code", 500); + json.put("msg", "system error"); + return json; + } + + String mySign = encrypByMd5(sb.toString()); + if (!mySign.equals(sign)){ + LOGGER.error("qipa operate user sign error, roleId:{}, sign:{}, mySign:{}", + roleId, sign, mySign); + json.put("code", 600); + json.put("msg", "sign error"); + return json; + } + MongoTemplate mongoTemplate = null; + try { + mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + } catch (Exception e) { + LOGGER.error("get mongoTemplate error"); + json.put("code", 500); + json.put("msg", "system error"); + return json; + } + + BasicQuery query = new BasicQuery(new BasicDBObject("uid", Integer.parseInt(roleId))); + CoreUserInfo userInfo = mongoTemplate.findOne(query, CoreUserInfo.class, "user_info"); + if (userInfo == null){ + LOGGER.error("user not exist, uid:{}", roleId); + json.put("code", 600); + json.put("msg", "user not exist"); + return json; + } + BasicQuery query1 = new BasicQuery(new BasicDBObject("server_id", userInfo.getServerid()+"")); + ServerInfo serverInfo = mongoTemplate.findOne(query1, ServerInfo.class, "server_info"); + String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(serverInfo.getRealServerId()), String.class, -1); + System.out.println("rpcString " + rpcString); + if (null == rpcString) { + LOGGER.error("serverAddress not exist"); + json.put("code", 601); + json.put("msg", "rebate error"); + return json; + } + String thriftIp = rpcString.split(":")[0]; + String thriftPort = rpcString.split(":")[3]; + if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) { + LOGGER.error("serverAddress not exist"); + json.put("code", 601); + json.put("msg", "rebate error"); + return json; + } else { + Result result = null; + try { + result = RPCClient.operateUser(thriftIp, thriftPort, Integer.parseInt(roleId), opStatus); + } catch (Exception e) { + LOGGER.error("operate user error, player_id:{}", roleId, e); + json.put("code", 500); + json.put("msg", "system error"); + return json; + } + if (result.getResultCode() != 1) { + LOGGER.error("operate user error, player_id:{}", roleId); + json.put("code", 601); + json.put("msg", "rebate error"); + } else { + LOGGER.info("operate user " + roleId + " is ok "); + json.put("code", 200); + json.put("msg", "success"); + } + } + return json; + } + + @PostMapping("/openTime") + public JSONObject openTime(@RequestParam("server_id") String serverId, + @RequestParam("open_time") String openTime, + @RequestParam("token") String token){ + JSONObject json = new JSONObject(); + String mySign = encrypByMd5(Constant.SUPER_ITEM_KEY); + if (!mySign.equals(token)){ + LOGGER.error("qipa operate user sign error, serverId:{}, sign:{}, mySign:{}", + serverId, token, mySign); + json.put("code", 600); + json.put("msg", "sign error"); + return json; + } + LOGGER.info("update server open time, serverId:{}, openTime:{}", serverId, openTime); + MongoTemplate mongoTemplate = null; + try { + mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + } catch (Exception e) { + LOGGER.error("get mongoTemplate error", e); + json.put("code", 500); + json.put("msg", "system error"); + return json; + } + BasicQuery query = new BasicQuery(new BasicDBObject("server_id", serverId+"")); + Update update = new Update(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Date date = null; + try { + date = sdf.parse(openTime); + } catch (ParseException e) { + LOGGER.error("openTime parse error", e); + json.put("code", 501); + json.put("msg", "openTime parse error"); + return json; + } + update.set("open_time", String.valueOf(date.getTime())); + WriteResult writeResult = mongoTemplate.updateFirst(query, update, "server_info"); + if (writeResult.isUpdateOfExisting()){ + json.put("code", 1); + json.put("msg", "更新开服成功"); + LOGGER.info("update server open time success, serverId:{}, openTime:{}", serverId, openTime); + }else { + json.put("code", 601); + json.put("msg", "更新开服失败"); + LOGGER.info("update server open time fail, serverId:{}, openTime:{}", serverId, openTime); + } + return json; + } +} diff --git a/src/main/java/com/jmfy/controller/SDKController.java b/src/main/java/com/jmfy/controller/SDKController.java new file mode 100644 index 0000000..f0a551d --- /dev/null +++ b/src/main/java/com/jmfy/controller/SDKController.java @@ -0,0 +1,201 @@ +package com.jmfy.controller; + +import com.alibaba.fastjson.JSONObject; +import com.jmfy.dao.UserVerfyDao; +import com.jmfy.sdk.SdkVerfy; +import com.jmfy.util.Constant; +import com.jmfy.util.RedisUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +@RestController +public class SDKController { + + private static final Logger LOGGER = LoggerFactory.getLogger(SDKController.class); + + @Resource + private UserVerfyDao userVerfyDao; + + /** + * sdk统一登录接口 + * 验证用户信息接口 + * @param userId + * @param channel + * @param sdksign + * @param sdktoken + * @param response + */ + @RequestMapping(value = "/sdk/verify", method = {RequestMethod.GET, RequestMethod.POST}) + public void verify(String userId, String channel, String sdksign, String sdktoken, HttpServletResponse response) { + try { + Map params = new HashMap(); + params.put("uid", userId); + params.put("channel", channel); + params.put("sign", sdksign); + params.put("token", sdktoken); + JSONObject returnResult = new JSONObject(); + LOGGER.info("verify参数:userId={},channel={},sdksign={},sdktoken={}",userId,channel,sdksign,sdktoken); + if (channel == null) { + returnResult.put("errcode", -2); + response.setContentType("application/json"); + response.getOutputStream().write(returnResult.toJSONString().getBytes()); + return; + } + + int channelType = 0; //区分渠道 + String uid = "-1"; + switch (channel) { + case "test": + uid = SdkVerfy.testVerfy(); + break; + case "quick": + uid = SdkVerfy.quickVerfy(userId, sdktoken); + break; + case "xiaomi": + uid = SdkVerfy.xiaomiVerfy(userId, sdktoken); + break; + case "weiwei": + uid = SdkVerfy.weiweiVerfy(userId, sdktoken); + break; + case "Android_9377": + uid = SdkVerfy.weiwei4366Verfy(userId, sdktoken); + break; + case "Android_ChiTu": //赤兔 + uid = SdkVerfy.chiTuVerfy(userId,sdksign, sdktoken); + break; + case "Android_ilod": //韩国正式 + case "Android_ilod_OneStore": //韩国正式 OneStore渠道 + case "Android_ilod_OneStoreCB": //韩国正式 CB不开支付 + case "iOS_ilod": //韩国正式 iOS渠道 + channelType = 1; + uid = SdkVerfy.ilodVerfy(userId,sdksign, sdktoken); + break; + case "baidu": //百度正式之前 + uid = SdkVerfy.baiduVerfy(userId, sdktoken, sdksign); + break; + case "Android_BaiDu": //百度正式 现在 + case "iOS_BaiDu": + uid = SdkVerfy.baiduVerfy(userId, sdktoken, sdksign); + break; + case "iOS_BaiDu_Test": //百度测试 现在 + uid = SdkVerfy.baiduTestVerfy(userId, sdktoken, sdksign); + break; + case "6kwOther": + uid = SdkVerfy.sixkwVerfy(userId, sdktoken, Constant.SIXKW_APPID, Constant.SIXKW_VERIFY_URL, Constant.SIXKW_SECRET); + break; + case "6kw": + uid = SdkVerfy.sixkwVerfy(userId, sdktoken, Constant.SIXKW_MAIN_APPID, Constant.SIXKW_VERIFY_URL, Constant.SIXKW_MAIN_LOGIN_SECRET); + break; + case "Android_QuickGame": //国内--时空战场 Android + case "Android_QuickGame_douyin": + uid = SdkVerfy.quickGameVerfy(userId,sdksign, sdktoken); + break; + case "iOS_QuickGame": //国内--时空战场 IOS + uid = SdkVerfy.quickGameVerfy_IOS(userId,sdksign, sdktoken); + break; + case "Android_99": //国内--九九互动渠道Android_99 + case "Android_99_Child": //国内--九九互动渠道Android_99_Child + case "Android_99_Child2": //国内--九九互动渠道Android_99_Child2 + case "Android_99_Child3": //国内--九九互动渠道Android_99_Child3 + case "Android_99_Child4": //国内--九九互动渠道Android_99_Child4 + uid = SdkVerfy.jjChannelVerfy(userId,sdksign,sdktoken); //sdksign 客户端 这个值传的是 appid值,因为appid值是变动的,所以需要客户端传 + break; + case "Android_ChangWei": //长尾渠道 安卓 + case "iOS_ChangWei": //长尾渠道 IOS + uid = SdkVerfy.changWeiGameVerify(userId,sdksign,sdktoken); + break; + case "Android_XiaoQi"://xiao7渠道 + uid = SdkVerfy.xiaoQiVerify(sdktoken, returnResult); + break; + case "Android_AiKen"://艾肯渠道安卓 + uid = SdkVerfy.aikenVerify(sdktoken); + break; + case "iOS_AiKen"://艾肯渠道ios + uid = SdkVerfy.aikenVerify(sdktoken); + break; + case "Android_AiKen_Child1"://艾肯渠道 + uid = SdkVerfy.aikenVerify(sdktoken); + break; + case "Android_Tap"://千千官方 + uid = SdkVerfy.qianqianVerify(userId, sdktoken); + break; + case "Android_Tap_Quick"://千千quick + uid = SdkVerfy.quickVerify(userId, sdktoken); + break; + case "Android_Ky_Quick"://0.1折 + uid = SdkVerfy.quickVerify2(userId, sdktoken); + break; + case "iOS_Ky_Quick"://0.1折 + uid = SdkVerfy.quickVerify2(userId, sdktoken); + break; + default: + uid = "-1"; + } + if(channelType ==1){ //韩服 + LOGGER.info("verify02参数: channel={}, uid={}", channel,uid); + if(uid.equals("0") || uid.equals("-1") || uid.equals("-2") || uid.equals("-3") || uid == null){ + String errMessage = "登录验证失败"; + switch (uid){ + case "0": + errMessage = "请求参数有误"; //body中有数据遗漏时。请求HTTP时请确认projectId、memberId、token是否已全部输入 + break; + case "-1": + errMessage = "登录token验证失败"; //Token验证失败。Token被伪造时 + break; + case "-2": + errMessage = "MemberId验证失败"; //MemberId验证失败.Token的用户ID信息与body的用户ID不一致时 + break; + case "-3": + errMessage = "Token到期"; //Token到期. SDK login api成功的时间与请求相应Authentication check的时间相差60分钟以上时 + break; + default: + errMessage = "登录验证失败"; + } + + returnResult.put("errcode", -1); + returnResult.put("errMessage", errMessage); + response.setContentType("application/json"); + response.getOutputStream().write(returnResult.toJSONString().getBytes()); + return; + } + }else { //非韩服 + if (uid.equals("-1") ||uid == null ) { + returnResult.put("errcode", -1); + response.setContentType("application/json"); + response.getOutputStream().write(returnResult.toJSONString().getBytes()); + return; + } + } + LOGGER.info("verify03参数: channel={},uid={}",channel, uid); + String name = uid; + String openId = userVerfyDao.verfyUser(name); + //登录流程 + returnResult.put("openId", openId); + returnResult.put("guid", uid); + String token = UUID.randomUUID().toString(); + returnResult.put("token", token); + RedisUtil.getInstence().putObject("JL_LOGIN_TOKEN", openId, token, -1); + LOGGER.info("verify04参数: channel={}, openId={} token={},uid={}", channel, returnResult.get("openId"), returnResult.get("token"),uid); + response.setContentType("application/json"); + response.getOutputStream().write(returnResult.toJSONString().getBytes()); + return; + } catch (Exception e) { + LOGGER.error("sdk verify error ",e); + } + } + + public static void main(String[] args) { + byte[] bytes = UUID.randomUUID().toString().getBytes(); + System.out.println(bytes.length); + } + +} diff --git a/src/main/java/com/jmfy/controller/SDKManagerController.java b/src/main/java/com/jmfy/controller/SDKManagerController.java new file mode 100644 index 0000000..4dc1429 --- /dev/null +++ b/src/main/java/com/jmfy/controller/SDKManagerController.java @@ -0,0 +1,98 @@ +package com.jmfy.controller; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONException; +import com.alibaba.fastjson.JSONObject; +import com.jmfy.handler.BaseHandler; +import com.jmfy.handler.ManagerManager; +import com.jmfy.modelVo.BaseVo; +import org.apache.commons.io.IOUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.ServletInputStream; +import javax.servlet.http.HttpServletRequest; +import java.net.URLDecoder; +import java.util.Enumeration; +import java.util.HashMap; + +@RestController +public class SDKManagerController { + + private static final Logger LOGGER = LoggerFactory.getLogger(SDKManagerController.class); + + + @RequestMapping(value = "/xiaomi/all/{uri}", method = {RequestMethod.GET, RequestMethod.POST}) + public BaseVo getResult(@PathVariable String uri, HttpServletRequest request) { + try { + JSONObject jsonObject = getJsonObject(request); + if (null == jsonObject) { + throw new Exception("查询异常 "); + } + BaseHandler baseHandler = ManagerManager.getInstance().getBaseHandler(uri); + if (null != baseHandler) { + BaseVo result = baseHandler.execute(jsonObject); + if (null == result) { + throw new Exception("查询异常 "); + } + return result; + } else { + throw new Exception("请求地址错误"); + } + } catch (Exception e) { + LOGGER.error(String.valueOf(e)); + e.printStackTrace(); + BaseVo baseVo = new BaseVo(); + baseVo.setState(0); + baseVo.setMsg(String.valueOf(e.getMessage()).substring(0, Math.min(e.getMessage().length(), 20))); + return baseVo; + } + } + + + JSONObject getJsonObject(HttpServletRequest request) throws Exception { + JSONObject jsonObject = new JSONObject(); + if (request.getMethod().equals("GET")) { + String paramStr = request.getQueryString(); + if (null == paramStr) { + throw new Exception("缺少参数"); + } + String[] params = paramStr.split("&"); + for (int i = 0; i < params.length; i++) { + String[] param = params[i].split("="); + if (param.length >= 2) { + String key = param[0]; + String value = param[1]; + for (int j = 2; j < param.length; j++) { + value += "=" + param[j]; + } + try { + jsonObject.put(key, value); + } catch (JSONException e) { + e.printStackTrace(); + } + } + } + } else { + ServletInputStream inputStream = request.getInputStream(); + String s = IOUtils.toString(inputStream); + String s1 = URLDecoder.decode(s, "UTF-8"); + jsonObject = JSON.parseObject(s1); + } + return jsonObject; + } + + HashMap getParameterMap(HttpServletRequest request) { + HashMap map = new HashMap(); + Enumeration paramNames = request.getParameterNames(); + while (paramNames.hasMoreElements()) { + String paramName = (String) paramNames.nextElement(); + String[] paramValues = request.getParameterValues(paramName); + String paramValue = paramValues[0]; + map.put(paramName, paramValue); + LOGGER.info("parameter : " + paramName + "=" + paramValue); + } + return map; + } +} diff --git a/src/main/java/com/jmfy/controller/XiaoQiController.java b/src/main/java/com/jmfy/controller/XiaoQiController.java new file mode 100644 index 0000000..fe9db06 --- /dev/null +++ b/src/main/java/com/jmfy/controller/XiaoQiController.java @@ -0,0 +1,499 @@ +package com.jmfy.controller; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.jmfy.Application; +import com.jmfy.dao.MongoConnectDao; +import com.jmfy.model.CoreUserInfo; +import com.jmfy.model.ServerInfo; +import com.jmfy.model.User; +import com.jmfy.model.sdk.RegisterUser; +import com.jmfy.redisProperties.RedisUserKey; +import com.jmfy.util.Constant; +import com.jmfy.util.RPCClient; +import com.jmfy.util.RedisUtil; +import com.ljsd.jieling.thrift.idl.ItemConfig; +import com.ljsd.jieling.thrift.idl.Result; +import com.mongodb.BasicDBObject; +import org.apache.commons.codec.binary.Base64; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.BasicQuery; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.security.KeyFactory; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.Signature; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.spec.X509EncodedKeySpec; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.stream.Collectors; + +@RestController +public class XiaoQiController { + private static final Logger LOGGER = LoggerFactory.getLogger(XiaoQiController.class); + private static final String DB_NAME_PREFIX = "x1_xq_game_"; + + + @Resource + private MongoConnectDao mongoConnectDao; + + @PostMapping("/x7/role") + public JSONObject queryRole(String bizParams, String apiMethod, String reqTime, String appkey, String gameType, + String signature) throws Exception { + LOGGER.info("x7 query role, bizParams:{}, apiMethod:{}, reqTime:{}, appkey:{}, gameType:{}, signature:{}", + bizParams, apiMethod, reqTime, appkey, gameType, signature); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("apiMethod", apiMethod); + jsonObject.put("appkey", appkey); + jsonObject.put("gameType", gameType); + DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZZ"); + String respTime = df.format(new Date()); + jsonObject.put("respTime", respTime); + JSONObject respJsonObject = new JSONObject(); + try { + String reqPayload = getPayload(apiMethod, appkey, gameType, reqTime, bizParams); + byte[] keyBytes = Base64.decodeBase64(Constant.X7_PUBLIC_KEY); + X509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes); + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + PublicKey publicK = keyFactory.generatePublic(keySpec); + //SIGNATURE_ALGORITHM + Signature sign = Signature.getInstance("SHA256withRSA"); + sign.initVerify(publicK); + sign.update(reqPayload.getBytes()); + boolean verify = sign.verify(Base64.decodeBase64(signature)); + if (!verify){ + respJsonObject.put("respCode", "FAIL"); + respJsonObject.put("respMsg", "Signature verify fail"); + String bizResp = respJsonObject.toJSONString(); + String payload = getPayload(apiMethod, appkey, gameType, reqTime, bizResp); + String respSign = sign(payload.getBytes(), Constant.X7_SERVER_KEY); + jsonObject.put("bizResp", bizResp); + jsonObject.put("signature", respSign); + return jsonObject; + } + + JSONObject reqParam = JSON.parseObject(bizParams); + String roleId = reqParam.getString("roleId"); + String[] guids = null; + JSONArray guidArray = reqParam.getJSONArray("guids"); + if (guidArray != null){ + guids = guidArray.toJavaObject(String[].class); + } + String serverId = reqParam.getString("serverId"); + JSONObject role = new JSONObject(); + JSONArray guidRoles = new JSONArray(); + if (roleId != null && !roleId.isEmpty()){ + role = getRoleById(roleId); + } + if (guids != null && guids.length > 0 && serverId != null && !serverId.isEmpty()){ + guidRoles = getRolesByIds(guids, serverId); + } + respJsonObject.put("respCode", "SUCCESS"); + respJsonObject.put("respMsg", "SUCCESS"); + respJsonObject.put("role", role); + respJsonObject.put("guidRoles", guidRoles); + LOGGER.info("x7 query role success, role:{}, guidRoles:{}", role, guidRoles); + }catch (Exception e){ + LOGGER.error("x7 query role error, bizParams:{}", bizParams, e); + respJsonObject.put("respCode", "FAIL"); + respJsonObject.put("respMsg", "system error"); + } + String bizResp = respJsonObject.toJSONString(); + String payload = getPayload(apiMethod, appkey, gameType, respTime, bizResp); + String respSign = sign(payload.getBytes(), Constant.X7_SERVER_KEY); + jsonObject.put("bizResp", bizResp); + jsonObject.put("signature", respSign); + return jsonObject; + } + + @PostMapping("/x7/role/2") + public JSONObject queryRole2(String bizParams, String apiMethod, String reqTime, String appkey, String gameType, + String signature) throws Exception { + LOGGER.info("x7 query role2, bizParams:{}, apiMethod:{}, reqTime:{}, appkey:{}, gameType:{}, signature:{}", + bizParams, apiMethod, reqTime, appkey, gameType, signature); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("apiMethod", apiMethod); + jsonObject.put("appkey", appkey); + jsonObject.put("gameType", gameType); + DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZZ"); + String respTime = df.format(new Date()); + jsonObject.put("respTime", respTime); + JSONObject respJsonObject = new JSONObject(); + try { + String reqPayload = getPayload(apiMethod, appkey, gameType, reqTime, bizParams); + byte[] keyBytes = Base64.decodeBase64(Constant.X7_PUBLIC_KEY); + X509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes); + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + PublicKey publicK = keyFactory.generatePublic(keySpec); + //SIGNATURE_ALGORITHM + Signature sign = Signature.getInstance("SHA256withRSA"); + sign.initVerify(publicK); + sign.update(reqPayload.getBytes()); + boolean verify = sign.verify(Base64.decodeBase64(signature)); + if (!verify){ + respJsonObject.put("respCode", "FAIL"); + respJsonObject.put("respMsg", "Signature verify fail"); + String bizResp = respJsonObject.toJSONString(); + String payload = getPayload(apiMethod, appkey, gameType, reqTime, bizResp); + String respSign = sign(payload.getBytes(), Constant.X7_SERVER_KEY); + jsonObject.put("bizResp", bizResp); + jsonObject.put("signature", respSign); + return jsonObject; + } + + JSONObject reqParam = JSON.parseObject(bizParams); + String roleId = reqParam.getString("roleId"); + String guid = reqParam.getString("guid"); + JSONObject role = new JSONObject(); + JSONArray guidRoles = new JSONArray(); + if (roleId != null && !roleId.isEmpty()){ + role = getRoleById(roleId); + } + if (guid != null && !guid.isEmpty()){ + guidRoles = getRolesByGuid(guid); + } + respJsonObject.put("respCode", "SUCCESS"); + respJsonObject.put("respMsg", "SUCCESS"); + respJsonObject.put("role", role); + respJsonObject.put("guidRoles", guidRoles); + LOGGER.info("x7 query role success, role:{}, guidRoles:{}", role, guidRoles); + }catch (Exception e){ + LOGGER.error("x7 query role2 error, bizParams:{}", bizParams, e); + respJsonObject.put("respCode", "FAIL"); + respJsonObject.put("respMsg", "system error"); + } + String bizResp = respJsonObject.toJSONString(); + String payload = getPayload(apiMethod, appkey, gameType, respTime, bizResp); + String respSign = sign(payload.getBytes(), Constant.X7_SERVER_KEY); + jsonObject.put("bizResp", bizResp); + jsonObject.put("signature", respSign); + return jsonObject; + } + + @PostMapping("/x7/item") + public JSONObject sendItem(String bizParams, String apiMethod, String reqTime, String appkey, String gameType, + String signature) throws Exception { + LOGGER.info("x7 send item, bizParams:{}, apiMethod:{}, reqTime:{}, appkey:{}, gameType:{}, signature:{}", + bizParams, apiMethod, reqTime, appkey, gameType, signature); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("apiMethod", apiMethod); + jsonObject.put("appkey", appkey); + jsonObject.put("gameType", gameType); + DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZZ"); + String respTime = df.format(new Date()); + jsonObject.put("respTime", respTime); + JSONObject respJsonObject = new JSONObject(); + try { + String reqPayload = getPayload(apiMethod, appkey, gameType, reqTime, bizParams); + byte[] keyBytes = Base64.decodeBase64(Constant.X7_PUBLIC_KEY); + X509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes); + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + PublicKey publicK = keyFactory.generatePublic(keySpec); + //SIGNATURE_ALGORITHM + Signature sign = Signature.getInstance("SHA256withRSA"); + sign.initVerify(publicK); + sign.update(reqPayload.getBytes()); + boolean verify = sign.verify(Base64.decodeBase64(signature)); + if (!verify){ + respJsonObject.put("respCode", "FAIL"); + respJsonObject.put("respMsg", "Signature verify fail"); + String bizResp = respJsonObject.toJSONString(); + String payload = getPayload(apiMethod, appkey, gameType, reqTime, bizResp); + String respSign = sign(payload.getBytes(), Constant.X7_SERVER_KEY); + jsonObject.put("bizResp", bizResp); + jsonObject.put("signature", respSign); + return jsonObject; + } + + JSONObject reqParam = JSON.parseObject(bizParams); + String roleId = reqParam.getString("roleId"); + String mailTitle = reqParam.getString("mailTitle"); + String mailContent = reqParam.getString("mailContent"); + JSONArray issuedProps = reqParam.getJSONArray("issuedProps"); + if (sendItem(roleId, mailTitle, mailContent, issuedProps)){ + respJsonObject.put("respCode", "SUCCESS"); + respJsonObject.put("respMsg", "SUCCESS"); + LOGGER.info("x7 send item success, roleId:{}", roleId); + }else { + respJsonObject.put("respCode", "FAIL"); + respJsonObject.put("respMsg", "send item fail"); + LOGGER.info("x7 send item fail, roleId:{}", roleId); + } + + }catch (Exception e){ + LOGGER.error("x7 send item error, bizParams:{}", bizParams, e); + respJsonObject.put("respCode", "FAIL"); + respJsonObject.put("respMsg", "system error"); + } + String bizResp = respJsonObject.toJSONString(); + String payload = getPayload(apiMethod, appkey, gameType, respTime, bizResp); + String respSign = sign(payload.getBytes(), Constant.X7_SERVER_KEY); + jsonObject.put("bizResp", bizResp); + jsonObject.put("signature", respSign); + return jsonObject; + } + + @PostMapping("/x7/item/config") + public JSONObject getItemConfig(String bizParams, String apiMethod, String reqTime, String appkey, String gameType, + String signature) throws Exception { + LOGGER.info("x7 get item config, bizParams:{}, apiMethod:{}, reqTime:{}, appkey:{}, gameType:{}, signature:{}", + bizParams, apiMethod, reqTime, appkey, gameType, signature); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("apiMethod", apiMethod); + jsonObject.put("appkey", appkey); + jsonObject.put("gameType", gameType); + DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZZ"); + String respTime = df.format(new Date()); + jsonObject.put("respTime", respTime); + JSONObject respJsonObject = new JSONObject(); + try { + String reqPayload = getPayload(apiMethod, appkey, gameType, reqTime, bizParams); + byte[] keyBytes = Base64.decodeBase64(Constant.X7_PUBLIC_KEY); + X509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes); + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + PublicKey publicK = keyFactory.generatePublic(keySpec); + //SIGNATURE_ALGORITHM + Signature sign = Signature.getInstance("SHA256withRSA"); + sign.initVerify(publicK); + sign.update(reqPayload.getBytes()); + boolean verify = sign.verify(Base64.decodeBase64(signature)); + if (!verify){ + respJsonObject.put("respCode", "FAIL"); + respJsonObject.put("respMsg", "Signature verify fail"); + String bizResp = respJsonObject.toJSONString(); + String payload = getPayload(apiMethod, appkey, gameType, reqTime, bizResp); + String respSign = sign(payload.getBytes(), Constant.X7_SERVER_KEY); + jsonObject.put("bizResp", bizResp); + jsonObject.put("signature", respSign); + return jsonObject; + } + + JSONObject reqParam = JSON.parseObject(bizParams); + JSONArray propCode = reqParam.getJSONArray("propCode"); + + List itemConfigList = getItemConfig(propCode.toJavaList(String.class)); + if (itemConfigList != null){ + respJsonObject.put("respCode", "SUCCESS"); + respJsonObject.put("respMsg", "SUCCESS"); + JSONArray jsonArray = new JSONArray(); + for (ItemConfig itemConfig : itemConfigList) { + JSONObject item = new JSONObject(); + item.put("propCode", itemConfig.getPropCode()); + item.put("propDesc", itemConfig.getPropDesc()); + item.put("propIcon", itemConfig.getPropIcon()); + item.put("propName", itemConfig.getPropName()); + jsonArray.add(item); + } + respJsonObject.put("props", jsonArray); + LOGGER.info("x7 get item config success"); + }else { + respJsonObject.put("respCode", "FAIL"); + respJsonObject.put("respMsg", "get item config fail"); + LOGGER.info("x7 get item config fail"); + } + + }catch (Exception e){ + LOGGER.error("x7 get item config error, bizParams:{}", bizParams, e); + respJsonObject.put("respCode", "FAIL"); + respJsonObject.put("respMsg", "system error"); + } + String bizResp = respJsonObject.toJSONString(); + String payload = getPayload(apiMethod, appkey, gameType, respTime, bizResp); + String respSign = sign(payload.getBytes(), Constant.X7_SERVER_KEY); + jsonObject.put("bizResp", bizResp); + jsonObject.put("signature", respSign); + return jsonObject; + } + + private List getItemConfig(List itemIds){ + String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, "20001", String.class, -1); + LOGGER.info("rpcString " + rpcString); + if (null == rpcString) { + LOGGER.error("serverAddress not exist"); + return null; + } + String thriftIp = rpcString.split(":")[0]; + String thriftPort = rpcString.split(":")[3]; + if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) { + LOGGER.error("serverAddress not exist"); + return null; + } else { + + List result = null; + try { + result = RPCClient.getItemConfig(thriftIp, thriftPort, itemIds); + } catch (Exception e) { + LOGGER.error("get item config error, itemIds:{}", itemIds, e); + return null; + } + if (result == null) { + LOGGER.error("get item config error, itemIds:{}", itemIds); + } else { + LOGGER.info("get item config is ok, itemIds:{} ", itemIds); + } + return result; + } + } + + private boolean sendItem(String playerId, String title, String content, JSONArray items){ + MongoTemplate mongoTemplate = null; + try { + mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + } catch (Exception e) { + LOGGER.error("get mongoTemplate error"); + return false; + } + + BasicQuery query = new BasicQuery(new BasicDBObject("uid", Integer.parseInt(playerId))); + CoreUserInfo userInfo = mongoTemplate.findOne(query, CoreUserInfo.class, "user_info"); + if (userInfo == null){ + LOGGER.error("user not exist, uid:{}", playerId); + return false; + } + BasicQuery query1 = new BasicQuery(new BasicDBObject("server_id", userInfo.getServerid()+"")); + ServerInfo serverInfo = mongoTemplate.findOne(query1, ServerInfo.class, "server_info"); + String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(serverInfo.getRealServerId()), String.class, -1); + System.out.println("rpcString " + rpcString); + if (null == rpcString) { + LOGGER.error("serverAddress not exist"); + return false; + } + String thriftIp = rpcString.split(":")[0]; + String thriftPort = rpcString.split(":")[3]; + if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) { + LOGGER.error("serverAddress not exist"); + return false; + } else { + StringBuilder reward = new StringBuilder(); + for (Object object : items) { + String itemId = ((JSONObject) object).getString("propCode"); + int amount = ((JSONObject) object).getIntValue("propQuantity"); + if (reward.length() != 0){ + reward.append("|"); + } + reward.append(itemId).append("#").append(amount); + } + Result result = null; + try { + result = RPCClient.sendMailToRole(thriftIp, thriftPort, playerId, title, content, reward.toString()); + } catch (Exception e) { + LOGGER.error("addItem error, player_id:{}", playerId, e); + return false; + } + if (result.getResultCode() != 1) { + LOGGER.error("addItem error, player_id:{}", playerId); + return false; + } else { + LOGGER.info("addItem " + playerId + " is ok "); + } + } + return true; + } + + private JSONArray getRolesByIds(String[] guids, String serverId) throws Exception { + JSONArray jsonArray = new JSONArray(); + MongoTemplate mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + Query query = new Query(Criteria.where("_id").in(guids)); + List registerUserList = mongoTemplate.find(query, RegisterUser.class, "user_register_info"); + if (registerUserList == null || registerUserList.isEmpty()){ + return jsonArray; + } + Map registerUserMap = registerUserList.stream().collect(Collectors.toMap(RegisterUser::getOpenId, RegisterUser::getId)); + Set openIds = registerUserMap.keySet(); + Query query1 = new Query(Criteria.where("playerManager.openId").in(openIds)); + BasicQuery basicQuery = new BasicQuery(new BasicDBObject("server_id", serverId)); + ServerInfo serverInfo = mongoTemplate.findOne(basicQuery, ServerInfo.class, "server_info"); + MongoTemplate gameMongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(DB_NAME_PREFIX + serverInfo.getRealServerId()); + List userList = gameMongoTemplate.find(query1, User.class, "user"); + if (userList == null || userList.isEmpty()){ + return jsonArray; + } + for (User user : userList) { + String guid = registerUserMap.get(user.getPlayerManager().getOpenId()); + jsonArray.add(getJsonUser(user, guid, serverId, serverInfo.getName())); + } + return jsonArray; + } + + private JSONArray getRolesByGuid(String guid) throws Exception { + JSONArray jsonArray = new JSONArray(); + MongoTemplate mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + RegisterUser registerUser = mongoTemplate.findById(guid, RegisterUser.class, "user_register_info"); + if (registerUser == null){ + return jsonArray; + } + List userInfoList = mongoTemplate.find(new BasicQuery(new BasicDBObject("openId", registerUser.getOpenId())), CoreUserInfo.class, "user_info"); + for (CoreUserInfo userInfo : userInfoList) { + ServerInfo serverInfo = mongoTemplate.findOne(new BasicQuery(new BasicDBObject("server_id", String.valueOf(userInfo.getServerid()))), ServerInfo.class, "server_info"); + MongoTemplate gameMongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(DB_NAME_PREFIX + serverInfo.getRealServerId()); + User user = gameMongoTemplate.findById(userInfo.getUid(), User.class, "user"); + if (user == null){ + continue; + } + jsonArray.add(getJsonUser(user, guid, String.valueOf(userInfo.getServerid()), serverInfo.getName())); + } + return jsonArray; + } + + private JSONObject getRoleById(String roleId) throws Exception { + MongoTemplate mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + CoreUserInfo userInfo = mongoTemplate.findById(Integer.parseInt(roleId), CoreUserInfo.class); + BasicQuery query1 = new BasicQuery(new BasicDBObject("openId", userInfo.getOpenId())); + RegisterUser registerUser = mongoTemplate.findOne(query1, RegisterUser.class, "user_register_info"); + BasicQuery query = new BasicQuery(new BasicDBObject("server_id", userInfo.getServerid()+"")); + ServerInfo serverInfo = mongoTemplate.findOne(query, ServerInfo.class, "server_info"); + MongoTemplate gameMongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(DB_NAME_PREFIX + serverInfo.getRealServerId()); + User user = gameMongoTemplate.findById(Integer.parseInt(roleId), User.class, "user"); + if (user == null){ + return new JSONObject(); + } + return getJsonUser(user, registerUser.getId(), String.valueOf(serverInfo.getServer_id()), serverInfo.getName()); + } + + private JSONObject getJsonUser(User user, String guid, String serverId, String serverName){ + JSONObject jsonObject = new JSONObject(); + jsonObject.put("roleId", String.valueOf(user.getId())); + jsonObject.put("guid", guid); + jsonObject.put("roleName", user.getPlayerManager().getNickName()); + jsonObject.put("serverId", serverId); + jsonObject.put("serverName", serverName); + jsonObject.put("roleLevel", String.valueOf(user.getPlayerManager().getLevel())); + jsonObject.put("roleCE", String.valueOf(user.getPlayerManager().getMaxForce())); + jsonObject.put("roleStage", String.valueOf(user.getMainLevelManager().getFightId())); + jsonObject.put("roleRechargeAmount", user.getPlayerManager().getRechargeInfo().getSaveAmt()); + return jsonObject; + } + + + private String getPayload(String apiMethod, String appkey, String gameType, String time, String params){ + String sb = "POST" + " " + + apiMethod + "@" + + appkey + "#" + + gameType + "." + + time + "\n\n" + + params; + return sb; + } + + public static String sign(byte[] data, String privateKey) throws Exception { + byte[] keyBytes = Base64.decodeBase64(privateKey); + PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(keyBytes); + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + PrivateKey privateK = keyFactory.generatePrivate(pkcs8KeySpec); + Signature signature = Signature.getInstance("SHA256withRSA"); + signature.initSign(privateK); + signature.update(data); + return Base64.encodeBase64String(signature.sign()); + } + +} diff --git a/src/main/java/com/jmfy/controller/XiaomiController.java b/src/main/java/com/jmfy/controller/XiaomiController.java new file mode 100644 index 0000000..209826e --- /dev/null +++ b/src/main/java/com/jmfy/controller/XiaomiController.java @@ -0,0 +1,140 @@ +package com.jmfy.controller; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.jmfy.Application; +import com.jmfy.dao.MongoConnectDao; +import com.jmfy.dao.ServerListDao; +import com.jmfy.sdk.HmacSHA1Encryption; +import com.jmfy.sdk.HttpUtil; +import com.jmfy.sdk.ParamUtil; +import com.jmfy.util.Constant; +import com.jmfy.util.MD5Util; +import com.jmfy.util.RedisUtil; +import com.mongodb.BasicDBObject; +import com.mongodb.DBCollection; +import com.mongodb.DBObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import java.util.HashMap; +import java.util.Map; +import java.util.Random; + +@RestController +public class XiaomiController { + private static final Logger LOGGER = LoggerFactory.getLogger(XiaomiController.class); + private String verifySessionUrl = "http://mis.migc.xiaomi.com/api/biz/service/verifySession.do"; + + private static final String _COLLECTION_NAME = "user_register_info"; + + @Resource + private MongoConnectDao mongoConnectDao; + @Resource + private ServerListDao serverListDao; + + @RequestMapping(value = "/xiaomi/verify", method = {RequestMethod.GET, RequestMethod.POST}) + public void xioamiverify(String appId, String userId, String session, HttpServletResponse response){ + + Map params = new HashMap(); + //params.put("appId",String.valueOf(Constant.APP_ID)); + params.put("appId",appId); + params.put("uid",userId); + params.put("session",session); + LOGGER.info("/xiaomi/verify result {} ",appId); + try { + String requestUrl = getRequestUrl(params,verifySessionUrl); + String result = HttpUtil.doGet(requestUrl); + JSONObject obj = JSON.parseObject(result); + LOGGER.info("/xiaomi/verify result {} ",obj.toJSONString()); + int errcode = obj.getIntValue("errcode"); + if(Constant.CODE_SUCCESS == errcode){ + //注册流程 + String name = userId; + String password = "1"; + + String openId; + //查询 + MongoTemplate mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + Query query = new Query(); + Criteria cr = new Criteria(); + cr.andOperator(Criteria.where("_id").is(name)); + query.addCriteria(cr); + com.jmfy.model.xiaomi.RegisterUser registerUser = mongoTemplate.findOne(query, com.jmfy.model.xiaomi.RegisterUser.class); + //是否注册过 + if(registerUser == null){ + String salt = "d13b3e8ef74bf72d8aafce3a1c8672a0"; + String mySign = MD5Util.encrypByMd5(name + password + salt); + DBObject doc = new BasicDBObject(); + doc.put("_id", name); + doc.put("password", password); + int random = new Random(1024).nextInt(); + openId = MD5Util.encrypByMd5(mySign + random); + doc.put("openId", openId); + //存储 + mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + DBCollection dBCollection = mongoTemplate.getCollection(_COLLECTION_NAME); + dBCollection.save(doc); + }else{ + openId = registerUser.getOpenId(); + } + //登录流程` + JSONObject returnResult = new JSONObject(); + returnResult.put("openId",openId); + int token = new Random().nextInt(1024) +10000; + returnResult.put("token",Integer.toString(token)); + RedisUtil.getInstence().putObject("JL_LOGIN_TOKEN", openId, token, -1); + LOGGER.info("/xiaomi/verify openId {} token {}",returnResult.get("openId"),returnResult.get("token")); + + + response.setContentType("application/json"); + response.getOutputStream().write(returnResult.toJSONString().getBytes()); + return; + } + + + JSONObject obj1 = new JSONObject(); + obj1.put("errcode", errcode); + response.setContentType("application/json"); + response.getOutputStream().write(obj1.toJSONString().getBytes()); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + private String getRequestUrl(Map params, String baseUrl) throws Exception{ + String signString = ParamUtil.getSortQueryString(params); + String signature = getSign(params); + return baseUrl + "?" + signString + "&signature=" + signature; + } + + private Map getSignParams(String queryString) throws UnsupportedEncodingException { + + Map result = new HashMap(); + String[] params = queryString.split("&"); + for(String param : params){ + String[] tmp = param.split("="); + String key = tmp[0]; + if(!"signature".equals(key)) { + result.put(key, URLDecoder.decode(tmp[1],"UTF-8")); + } + } + return result; + } + + private String getSign(Map params) throws Exception{ + String signString = ParamUtil.getSortQueryString(params); + return HmacSHA1Encryption.hmacSHA1Encrypt(signString, Constant.AppSecret); + } +} diff --git a/src/main/java/com/jmfy/dao/GSUserDao.java b/src/main/java/com/jmfy/dao/GSUserDao.java new file mode 100644 index 0000000..326fbe8 --- /dev/null +++ b/src/main/java/com/jmfy/dao/GSUserDao.java @@ -0,0 +1,21 @@ +package com.jmfy.dao; + +import com.jmfy.modelVo.MarkedVo; +import com.jmfy.model.GSUser; +import org.springframework.data.mongodb.core.query.Update; + +public interface GSUserDao { + + GSUser findUserInfo(MarkedVo marked, int userId) throws Exception; + + void updateUserInfo(MarkedVo marked, Update update, int id) throws Exception; + + int findGuildId(MarkedVo marked, int userId) throws Exception; + + String getThriftIpPort(MarkedVo marked, int userId); + + + int findCuserOnline(MarkedVo marked,int id); + + GSUser findUserInfoByname(MarkedVo marked, String roleName) throws Exception; +} diff --git a/src/main/java/com/jmfy/dao/MongoConnectDao.java b/src/main/java/com/jmfy/dao/MongoConnectDao.java new file mode 100644 index 0000000..90cf453 --- /dev/null +++ b/src/main/java/com/jmfy/dao/MongoConnectDao.java @@ -0,0 +1,11 @@ +package com.jmfy.dao; + +import com.jmfy.model.CoreServerList; +import com.jmfy.modelVo.MarkedVo; +import com.jmfy.util.Connect; + +import java.util.List; + +public interface MongoConnectDao { + Connect getConnect(); +} diff --git a/src/main/java/com/jmfy/dao/PayDao.java b/src/main/java/com/jmfy/dao/PayDao.java new file mode 100644 index 0000000..9a6cf0c --- /dev/null +++ b/src/main/java/com/jmfy/dao/PayDao.java @@ -0,0 +1,16 @@ +package com.jmfy.dao; + +import com.jmfy.modelVo.PayVo; + +public interface PayDao { + + /** + * 一个服一个角 多个返回Android 和ios同时在此服创角 + * @param orderId + * @return + * @throws Exception + */ + PayVo getOder(String orderId) throws Exception; + + PayVo upOder(PayVo payVo) throws Exception; +} diff --git a/src/main/java/com/jmfy/dao/RoleListDao.java b/src/main/java/com/jmfy/dao/RoleListDao.java new file mode 100644 index 0000000..849cd27 --- /dev/null +++ b/src/main/java/com/jmfy/dao/RoleListDao.java @@ -0,0 +1,12 @@ +package com.jmfy.dao; + +import com.jmfy.model.CoreServerList; +import com.jmfy.model.CoreUserInfo; +import com.jmfy.model.WhiteList; +import com.jmfy.modelVo.MarkedVo; + +import java.util.List; + +public interface RoleListDao { + List findRoleList(MarkedVo marked) throws Exception; +} diff --git a/src/main/java/com/jmfy/dao/ServerInfoDao.java b/src/main/java/com/jmfy/dao/ServerInfoDao.java new file mode 100644 index 0000000..610c78f --- /dev/null +++ b/src/main/java/com/jmfy/dao/ServerInfoDao.java @@ -0,0 +1,18 @@ +package com.jmfy.dao; + + +import com.jmfy.model.*; +import com.jmfy.modelVo.MarkedVo; +import org.springframework.data.mongodb.core.query.Update; + +import java.util.List; + +public interface ServerInfoDao { + ServerInfo findServerInfo(MarkedVo marked) throws Exception; + + void updateServerInfo(MarkedVo marked, Update update, int id) throws Exception; + + List findAllServerInfo(MarkedVo marked) throws Exception; + + List findServerInfoByPlat(MarkedVo markedVo) throws Exception; +} diff --git a/src/main/java/com/jmfy/dao/ServerListDao.java b/src/main/java/com/jmfy/dao/ServerListDao.java new file mode 100644 index 0000000..38553bc --- /dev/null +++ b/src/main/java/com/jmfy/dao/ServerListDao.java @@ -0,0 +1,14 @@ +package com.jmfy.dao; + +import com.jmfy.model.CoreServerList; +import com.jmfy.modelVo.MarkedVo; + +import java.util.List; + +public interface ServerListDao { + + List findServerList(MarkedVo marked) throws Exception; + + CoreServerList findServer(MarkedVo marked) throws Exception; + +} diff --git a/src/main/java/com/jmfy/dao/ServerRoleInfoDao.java b/src/main/java/com/jmfy/dao/ServerRoleInfoDao.java new file mode 100644 index 0000000..0b3cd99 --- /dev/null +++ b/src/main/java/com/jmfy/dao/ServerRoleInfoDao.java @@ -0,0 +1,12 @@ +package com.jmfy.dao; + +import com.jmfy.model.CoreUserInfo; +import com.jmfy.model.WhiteList; +import com.jmfy.modelVo.MarkedVo; + +import java.util.List; + +public interface ServerRoleInfoDao { + + CoreUserInfo findServerRoleInfo(MarkedVo marked,int userId) throws Exception; +} diff --git a/src/main/java/com/jmfy/dao/ServerRoleListDao.java b/src/main/java/com/jmfy/dao/ServerRoleListDao.java new file mode 100644 index 0000000..14178e1 --- /dev/null +++ b/src/main/java/com/jmfy/dao/ServerRoleListDao.java @@ -0,0 +1,19 @@ +package com.jmfy.dao; + +import com.jmfy.model.CoreUserInfo; +import com.jmfy.model.WhiteList; +import com.jmfy.modelVo.MarkedVo; + +import java.util.List; + +public interface ServerRoleListDao { + + /** + * 一个服一个角 多个返回Android 和ios同时在此服创角 + * @param marked + * @return + * @throws Exception + */ + List findServerRoleList(MarkedVo marked) throws Exception; + +} diff --git a/src/main/java/com/jmfy/dao/UserVerfyDao.java b/src/main/java/com/jmfy/dao/UserVerfyDao.java new file mode 100644 index 0000000..df2e95b --- /dev/null +++ b/src/main/java/com/jmfy/dao/UserVerfyDao.java @@ -0,0 +1,13 @@ +package com.jmfy.dao; + +public interface UserVerfyDao { + + /** + * 一个服一个角 多个返回Android 和ios同时在此服创角 + * @param name + * @return + * @throws Exception + */ + String verfyUser(String name) throws Exception; + +} diff --git a/src/main/java/com/jmfy/dao/impl/GSUserDaoImpl.java b/src/main/java/com/jmfy/dao/impl/GSUserDaoImpl.java new file mode 100644 index 0000000..7fb3601 --- /dev/null +++ b/src/main/java/com/jmfy/dao/impl/GSUserDaoImpl.java @@ -0,0 +1,88 @@ +package com.jmfy.dao.impl; + +import com.jmfy.dao.GSUserDao; +import com.jmfy.model.GSUser; +import com.jmfy.modelVo.MarkedVo; +import com.jmfy.redisProperties.RedisUserKey; +import com.jmfy.util.Connect; +import com.jmfy.util.GlobalsDef; +import com.jmfy.util.MongoName; +import com.jmfy.util.RedisUtil; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.data.mongodb.core.query.Update; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; + +/** + * @author Administrator + */ +@Component +public class GSUserDaoImpl implements GSUserDao { + @Resource + private Connect connect; + public static final String colon = ":"; + + @Override + public GSUser findUserInfo(MarkedVo marked, int userId) throws Exception { +// GSUser cUser = RedisUtil.getInstence().getObject(marked.getPartition() + colon + RedisUserKey.CUser_Key, +// String.valueOf(userId), GSUser.class, GlobalsDef.REDIS_OVER_TIME); +// if (cUser != null) { +// return cUser; +// } + String dbName = MongoName.getMongoDBName(marked); + MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName); + Query query = new Query(); + Criteria cr = new Criteria(); + cr.andOperator(Criteria.where("playerManager.rootId").is(userId)); + query.addCriteria(cr); + return mongoTemplate.findOne(query, GSUser.class); + } + + @Override + public void updateUserInfo(MarkedVo marked, Update update, int id) throws Exception { +// String dbName = MongoName.getMongoDBName(marked); +// MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName); +// Query query = new Query(Criteria.where("playerManager.rootId").is(id)); +// mongoTemplate.updateMulti(query, update, GSUser.class); +// GSUser cUser = mongoTemplate.findOne(query, GSUser.class); +// RedisUtil.getInstence().putObject(marked.getPartition() + colon + RedisUserKey.CUser_Key, Integer.toString(id), cUser, 3600 * 24); + + } + + @Override + public int findGuildId(MarkedVo marked, int userId) throws Exception { +// String object = RedisUtil.getInstence().getObject(marked.getPartition() + colon + RedisUserKey.USER_FAMILY_ID, Integer.toString(userId), String.class, GlobalsDef.REDIS_OVER_FOREVER); +// if (object != null && !object.isEmpty()) { +// return Integer.parseInt(object); +// } + return 0; + } + + @Override + public String getThriftIpPort(MarkedVo marked, int uid) { + return RedisUtil.getInstence().getObject(marked.getPartition() + colon + RedisUserKey.CUser_ServerInfo_Key, Integer.toString(uid), + String.class, GlobalsDef.REDIS_OVER_TIME); + } + + + @Override + public int findCuserOnline(MarkedVo marked,int uid) { + int online = 0; + String key = RedisUtil.getInstence().redisGetValue(marked.getPartition()+RedisUserKey.Delimiter_colon+RedisUserKey.CUser_Online_Key+RedisUserKey.Delimiter_colon+uid); + if (key != null){ + online = Integer.parseInt(key); + } + return online; + } + + @Override + public GSUser findUserInfoByname(MarkedVo marked, String roleName) throws Exception { + String dbName = MongoName.getMongoDBName(marked); + MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName); + Query query = new Query(Criteria.where("userName").is(roleName)); + return mongoTemplate.findOne(query, GSUser.class); + } +} diff --git a/src/main/java/com/jmfy/dao/impl/MongoConnectImpl.java b/src/main/java/com/jmfy/dao/impl/MongoConnectImpl.java new file mode 100644 index 0000000..58e8ae3 --- /dev/null +++ b/src/main/java/com/jmfy/dao/impl/MongoConnectImpl.java @@ -0,0 +1,30 @@ +package com.jmfy.dao.impl; + +import com.jmfy.Application; +import com.jmfy.dao.MongoConnectDao; +import com.jmfy.dao.ServerListDao; +import com.jmfy.model.CoreServerList; +import com.jmfy.modelVo.MarkedVo; +import com.jmfy.util.Connect; +import com.mongodb.DBCollection; +import com.mongodb.DBObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.List; + +@Component +public class MongoConnectImpl implements MongoConnectDao { + private static final Logger LOGGER = LoggerFactory.getLogger(MongoConnectImpl.class); + @Resource + private Connect connect; + + public Connect getConnect() { + return connect; + } +} diff --git a/src/main/java/com/jmfy/dao/impl/PayImpl.java b/src/main/java/com/jmfy/dao/impl/PayImpl.java new file mode 100644 index 0000000..c21d0ef --- /dev/null +++ b/src/main/java/com/jmfy/dao/impl/PayImpl.java @@ -0,0 +1,61 @@ +package com.jmfy.dao.impl; + +import com.jmfy.Application; +import com.jmfy.dao.PayDao; +import com.jmfy.modelVo.PayVo; +import com.jmfy.util.Connect; +import com.jmfy.util.loginRedis.TimeUtil; +import com.mongodb.BasicDBObject; +import com.mongodb.DBObject; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.BasicQuery; +import org.springframework.data.mongodb.core.query.BasicUpdate; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; + +@Component +public class PayImpl implements PayDao { + + @Resource + private Connect connect; + + private static final String _COLLECTION_NAME = "user_register_info"; + + @Override + public PayVo getOder(String orderId) { + try { + MongoTemplate mongoTemplate = connect.getMongoTemplete(Application.coreDb); + Query query = new Query(); + Criteria cr = new Criteria(); + cr.andOperator(Criteria.where("billno").is(orderId)); + query.addCriteria(cr); + PayVo payVo = mongoTemplate.findOne(query, PayVo.class); + return payVo; + } catch (Exception exception) { + exception.printStackTrace(); + } + return null; + } + + @Override + public PayVo upOder(PayVo payVo) { + try { + BasicDBObject basicDBObject = new BasicDBObject(); + DBObject value = new BasicDBObject(); + value.put("status", 1); + value.put("callbaktime", TimeUtil.getTimeStamp(System.currentTimeMillis())); + basicDBObject.put("$set", value); + BasicUpdate basicUpdate = new BasicUpdate(basicDBObject); + MongoTemplate mongoTemplate = connect.getMongoTemplete(Application.coreDb); + mongoTemplate.updateFirst(new BasicQuery(new BasicDBObject("_id", payVo.getId())), basicUpdate, PayVo.class); + return payVo; + } catch (Exception exception) { + exception.printStackTrace(); + } + return null; + } + +} diff --git a/src/main/java/com/jmfy/dao/impl/RoleListDaoImpl.java b/src/main/java/com/jmfy/dao/impl/RoleListDaoImpl.java new file mode 100644 index 0000000..c4a8223 --- /dev/null +++ b/src/main/java/com/jmfy/dao/impl/RoleListDaoImpl.java @@ -0,0 +1,35 @@ +package com.jmfy.dao.impl; + +import com.jmfy.Application; +import com.jmfy.dao.RoleListDao; +import com.jmfy.dao.ServerRoleListDao; +import com.jmfy.model.CoreServerList; +import com.jmfy.model.CoreUserInfo; +import com.jmfy.model.WhiteList; +import com.jmfy.modelVo.MarkedVo; +import com.jmfy.util.Connect; +import com.jmfy.util.MongoName; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.List; + +@Component +public class RoleListDaoImpl implements RoleListDao { + + @Resource + private Connect connect ; + + @Override + public List findRoleList(MarkedVo marked) throws Exception { + MongoTemplate mongoTemplate = connect.getMongoTemplete(Application.coreDb); + Query query = new Query(); + Criteria cr = new Criteria(); + cr.andOperator(Criteria.where("openId").is(marked.getOpenId())); + query.addCriteria(cr); + return mongoTemplate.find(query, CoreUserInfo.class); + } +} diff --git a/src/main/java/com/jmfy/dao/impl/ServerInfoDaoImpl.java b/src/main/java/com/jmfy/dao/impl/ServerInfoDaoImpl.java new file mode 100644 index 0000000..41bd75c --- /dev/null +++ b/src/main/java/com/jmfy/dao/impl/ServerInfoDaoImpl.java @@ -0,0 +1,62 @@ +package com.jmfy.dao.impl; + +import com.jmfy.Application; +import com.jmfy.dao.ServerInfoDao; +import com.jmfy.model.*; +import com.jmfy.modelVo.MarkedVo; +import com.jmfy.redisProperties.RedisUserKey; +import com.jmfy.util.Connect; +import com.jmfy.util.GlobalsDef; +import com.jmfy.util.MongoName; +import com.jmfy.util.RedisUtil; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.data.mongodb.core.query.Update; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.List; + +@Component +public class ServerInfoDaoImpl implements ServerInfoDao { + @Resource + private Connect connect; + + @Override + public ServerInfo findServerInfo(MarkedVo marked) throws Exception { + MongoTemplate mongoTemplate = connect.getMongoTemplete(Application.coreDb); + Query query = new Query(); + Criteria cr = new Criteria(); + cr.andOperator(Criteria.where("plat").is(marked.getPlatId()), Criteria.where("server_id").is(marked.getPartition()), + Criteria.where("channel").is(marked.getAreaId())); + query.addCriteria(cr); + return mongoTemplate.findOne(query, ServerInfo.class); + } + + @Override + public void updateServerInfo(MarkedVo marked, Update update, int id) throws Exception { + MongoTemplate mongoTemplate = connect.getMongoTemplete(Application.coreDb); + Query query = new Query(Criteria.where("_id").is(id)); + mongoTemplate.updateMulti(query, update, ServerInfo.class); + } + + @Override + public List findAllServerInfo(MarkedVo marked) throws Exception { + MongoTemplate mongoTemplate = connect.getMongoTemplete(Application.coreDb); + Query query = new Query(); + Criteria cr = new Criteria(); + cr.andOperator(Criteria.where("plat").is(marked.getPlatId()), Criteria.where("channel").is(marked.getAreaId())); + query.addCriteria(cr); + return mongoTemplate.find(query, ServerInfo.class); + } + + @Override + public List findServerInfoByPlat(MarkedVo marked) throws Exception { + MongoTemplate mongoTemplate = connect.getMongoTemplete(Application.coreDb); + Query query = new Query(Criteria.where("plat").is(marked.getPlatId())); + return mongoTemplate.find(query, ServerInfo.class); + } + + +} diff --git a/src/main/java/com/jmfy/dao/impl/ServerListDaoImpl.java b/src/main/java/com/jmfy/dao/impl/ServerListDaoImpl.java new file mode 100644 index 0000000..bc80d83 --- /dev/null +++ b/src/main/java/com/jmfy/dao/impl/ServerListDaoImpl.java @@ -0,0 +1,41 @@ +package com.jmfy.dao.impl; + +import com.jmfy.Application; +import com.jmfy.dao.ServerListDao; +import com.jmfy.model.CoreServerList; +import com.jmfy.model.WhiteList; +import com.jmfy.modelVo.MarkedVo; +import com.jmfy.util.Connect; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.List; + +@Component +public class ServerListDaoImpl implements ServerListDao { + + @Resource + private Connect connect; + + @Override + public List findServerList(MarkedVo marked) throws Exception { + MongoTemplate mongoTemplate = connect.getMongoTemplete(Application.coreDb); + Query query = new Query(); + Criteria cr = new Criteria(); + query.addCriteria(cr); + return mongoTemplate.findAll(CoreServerList.class); + } + + @Override + public CoreServerList findServer(MarkedVo marked) throws Exception { + MongoTemplate mongoTemplate = connect.getMongoTemplete(Application.coreDb); + Query query = new Query(); + Criteria cr = new Criteria(); + cr.andOperator(Criteria.where("server_id").is(String.valueOf(marked.getPartition()))); + query.addCriteria(cr); + return mongoTemplate.findOne(query, CoreServerList.class); + } +} diff --git a/src/main/java/com/jmfy/dao/impl/ServerRoleInfoDaoImpl.java b/src/main/java/com/jmfy/dao/impl/ServerRoleInfoDaoImpl.java new file mode 100644 index 0000000..e511e68 --- /dev/null +++ b/src/main/java/com/jmfy/dao/impl/ServerRoleInfoDaoImpl.java @@ -0,0 +1,35 @@ +package com.jmfy.dao.impl; + +import com.jmfy.Application; +import com.jmfy.dao.ServerRoleInfoDao; +import com.jmfy.model.CoreUserInfo; +import com.jmfy.modelVo.MarkedVo; +import com.jmfy.util.Connect; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; + +@Component +public class ServerRoleInfoDaoImpl implements ServerRoleInfoDao { + + @Resource + private Connect connect ; + + @Override + public CoreUserInfo findServerRoleInfo(MarkedVo marked, int userId) throws Exception { + MongoTemplate mongoTemplate = connect.getMongoTemplete(Application.coreDb); + Query query = new Query(); + Criteria cr = new Criteria(); + cr.andOperator(Criteria.where("serverid").is(marked.getPartition()), + Criteria.where("openId").is(marked.getOpenId()), + Criteria.where("uid").is(userId)); + query.addCriteria(cr); + return mongoTemplate.findOne(query, CoreUserInfo.class); + } + + + +} diff --git a/src/main/java/com/jmfy/dao/impl/ServerRoleListDaoImpl.java b/src/main/java/com/jmfy/dao/impl/ServerRoleListDaoImpl.java new file mode 100644 index 0000000..0380a8e --- /dev/null +++ b/src/main/java/com/jmfy/dao/impl/ServerRoleListDaoImpl.java @@ -0,0 +1,33 @@ +package com.jmfy.dao.impl; + +import com.jmfy.Application; +import com.jmfy.dao.ServerRoleListDao; +import com.jmfy.model.CoreUserInfo; +import com.jmfy.modelVo.MarkedVo; +import com.jmfy.util.Connect; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.List; + +@Component +public class ServerRoleListDaoImpl implements ServerRoleListDao { + + @Resource + private Connect connect; + + @Override + public List findServerRoleList(MarkedVo marked) throws Exception { + MongoTemplate mongoTemplate = connect.getMongoTemplete(Application.coreDb); + Query query = new Query(); + Criteria cr = new Criteria(); + cr.andOperator(Criteria.where("serverId").is(marked.getPartition()), + Criteria.where("openId").is(marked.getOpenId())); + query.addCriteria(cr); + return mongoTemplate.find(query, CoreUserInfo.class); + } + +} diff --git a/src/main/java/com/jmfy/dao/impl/UserVerfyDaoImpl.java b/src/main/java/com/jmfy/dao/impl/UserVerfyDaoImpl.java new file mode 100644 index 0000000..ca815d2 --- /dev/null +++ b/src/main/java/com/jmfy/dao/impl/UserVerfyDaoImpl.java @@ -0,0 +1,60 @@ +package com.jmfy.dao.impl; + +import com.alibaba.fastjson.JSONObject; +import com.jmfy.Application; +import com.jmfy.dao.UserVerfyDao; +import com.jmfy.model.sdk.RegisterUser; +import com.jmfy.util.Connect; +import com.jmfy.util.Constant; +import com.jmfy.util.MD5Util; +import com.mongodb.BasicDBObject; +import com.mongodb.DBCollection; +import com.mongodb.DBObject; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.Random; + +@Component +public class UserVerfyDaoImpl implements UserVerfyDao { + + @Resource + private Connect connect; + + private static final String _COLLECTION_NAME = "user_register_info"; + + @Override + public String verfyUser(String name) throws Exception { + JSONObject result=new JSONObject(); + String password="1"; + String openId=null; + //查询 + MongoTemplate mongoTemplate = connect.getMongoTemplete(Application.coreDb); + Query query = new Query(); + Criteria cr = new Criteria(); + cr.andOperator(Criteria.where("_id").is(name)); + query.addCriteria(cr); + RegisterUser registerUser = mongoTemplate.findOne(query, RegisterUser.class); + //是否注册过 + if(registerUser == null){ + String mySign = MD5Util.encrypByMd5(name + password + Constant.SALT); + DBObject doc = new BasicDBObject(); + doc.put("_id", name); + doc.put("password", password); + int random = new Random(1024).nextInt(); + openId = MD5Util.encrypByMd5(mySign + random); + doc.put("openId", openId); + //存储 + mongoTemplate = connect.getMongoTemplete(Application.coreDb); + DBCollection dBCollection = mongoTemplate.getCollection(_COLLECTION_NAME); + dBCollection.save(doc); + }else{ + openId = registerUser.getOpenId(); + } + return openId; + } + +} diff --git a/src/main/java/com/jmfy/handler/BaseHandler.java b/src/main/java/com/jmfy/handler/BaseHandler.java new file mode 100644 index 0000000..b205231 --- /dev/null +++ b/src/main/java/com/jmfy/handler/BaseHandler.java @@ -0,0 +1,47 @@ +package com.jmfy.handler; + +import com.alibaba.fastjson.JSONObject; +import com.jmfy.modelVo.BaseVo; +import com.jmfy.util.MD5Util; + +public abstract class BaseHandler { + private int pid; + private int gid; + + public String getRequestURI() { + return ""; + } + + public abstract BaseVo execute(JSONObject json) throws Exception ; + + public static boolean validSign(String transdata, String sign) { + try { + String md5Str = MD5Util.encrypByMd5(transdata); + if (md5Str.equals(sign)) { + return true; + } else { + return false; + } + } catch (Exception e) { + e.printStackTrace(); + } + return false; + + } + + public int getPid() { + return pid; + } + + public void setPid(int pid) { + this.pid = pid; + } + + public int getGid() { + return gid; + } + + public void setGid(int gid) { + this.gid = gid; + } +} diff --git a/src/main/java/com/jmfy/handler/ManagerManager.java b/src/main/java/com/jmfy/handler/ManagerManager.java new file mode 100644 index 0000000..40da8e9 --- /dev/null +++ b/src/main/java/com/jmfy/handler/ManagerManager.java @@ -0,0 +1,30 @@ +package com.jmfy.handler; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import java.util.HashMap; +import java.util.Map; + +@Component +public class ManagerManager { + private static final Logger LOGGER = LoggerFactory.getLogger(ManagerManager.class); + private static ManagerManager instance; + private Map uriHandlers = new HashMap(); + + public static ManagerManager getInstance(){ + if (instance == null){ + instance = new ManagerManager(); + } + return instance; + } + + public BaseHandler getBaseHandler(String uri){ + return uriHandlers.get(uri); + } + + public void addHandler(BaseHandler handler) { + uriHandlers.put(handler.getRequestURI(),handler); + } +} diff --git a/src/main/java/com/jmfy/handler/MarkedInfo.java b/src/main/java/com/jmfy/handler/MarkedInfo.java new file mode 100644 index 0000000..ebc8cb6 --- /dev/null +++ b/src/main/java/com/jmfy/handler/MarkedInfo.java @@ -0,0 +1,74 @@ +package com.jmfy.handler; + +import com.alibaba.fastjson.JSONObject; +import com.jmfy.modelVo.MarkedVo; +import com.jmfy.util.Connect; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; + +/** + * @author Administrator + */ +public class MarkedInfo { + private static final Logger LOGGER = LoggerFactory.getLogger(Connect.class); + private static final String Y = "#"; + public static final String colon = "|"; + public static final String url_head = "mongodb://game:mongo5aiAXZ5@"; + public static final String url_middle = "/?replicaSet="; + public static final String url_tail = "&authMechanism=MONGODB-CR&authSource=admin"; + + + public static MarkedVo getMarkedVo(JSONObject requestData) { + MarkedVo marked = new MarkedVo(); + int channel = requestData.getIntValue("pid"); + String partition =""; + //37给的多个接口文档命名不一样 区服id + if (requestData.containsKey("dsid")) { + partition = requestData.getString("dsid"); + } + if (requestData.containsKey("partition")) { + partition = requestData.getString("partition"); + } + + marked.setAreaId(String.valueOf(channel)); + + marked.setPartition(partition); + + //37给的类型还不一样 统一String + if (requestData.containsKey("uid")) { + marked.setOpenId(requestData.getString("uid")); + } + + return marked; + } + + /** + * 字符url编码 + * + * @param msg + * @return + * @throws UnsupportedEncodingException + */ + public static String getUrlEncoder(String msg) throws UnsupportedEncodingException { + return URLEncoder.encode(msg, "utf-8"); + } + + + public static String getMongoUrl(int serverId) { + int mongoId = (serverId % 1000 - 1) % 4 + 4 * (serverId / 1000 - 1) + 1; + int mongoIdPort = mongoId + 27000; + + StringBuilder mongoUrl = new StringBuilder(); + mongoUrl.append(url_head) + .append("s").append(mongoId).append("P.game.ysj.db:").append(mongoIdPort).append(",") + .append("s").append(mongoId).append("S.game.ysj.db:").append(mongoIdPort) + .append(url_middle) + .append("ysj-game-s").append(mongoId) + .append(url_tail); + + return mongoUrl.toString(); + } +} diff --git a/src/main/java/com/jmfy/handler/PayHandler.java b/src/main/java/com/jmfy/handler/PayHandler.java new file mode 100644 index 0000000..a82db06 --- /dev/null +++ b/src/main/java/com/jmfy/handler/PayHandler.java @@ -0,0 +1,1006 @@ +package com.jmfy.handler; + +import com.jmfy.dao.PayDao; +import com.jmfy.dao.ServerListDao; +import com.jmfy.model.CoreServerList; +import com.jmfy.modelVo.MarkedVo; +import com.jmfy.modelVo.PayVo; +import com.jmfy.redisProperties.RedisUserKey; +import com.jmfy.util.RPCClient; +import com.jmfy.util.RedisUtil; +import com.ljsd.jieling.thrift.idl.Result; +import com.ljsd.jieling.thrift.idl.itemData; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Service +public class PayHandler { + + public static final Logger LOGGER = LoggerFactory.getLogger(PayHandler.class); + + @Resource + private ServerListDao serverListDao; + @Resource + private PayDao payDao; + + /** + * 统一发货接口 + * + * @param orderId 游戏订单号 + * @param cpOrderNo 渠道订单号 + * @return 1 成功 + * -1 订单不存在 + * -2 订单参数错误 + * -3 服务器配置错误 + * -4 充值失败 + * @throws Exception + */ + public int processOrder(String orderId, String cpOrderNo, String... payWay) throws Exception { + //payWay[0]是渠道,payWay[1]是支付金额 + + PayVo payVo = payDao.getOder(orderId); + if (payVo == null) { + LOGGER.error(orderId + " is not exit"); + return -1; + } + + if (payVo.getStatus() == 1) { + return 1; + } + int serverId = payVo.getRegion(); + int uid = payVo.getUid(); + String goodsId = payVo.getPay_item(); + String openId = "0"; + int amount = payVo.getMoney(); + MarkedVo marked = new MarkedVo(); + marked.setPartition(String.valueOf(serverId)); + CoreServerList coreServerList = serverListDao.findServer(marked); + if (null == coreServerList) { + LOGGER.error("应用不存在"); + return -2; + } else { + String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(serverId), String.class, -1); + System.out.println("rpcString " + rpcString); + if (null == rpcString) { + LOGGER.error("serverAddress not exist"); + } + String thriftIp = rpcString.split(":")[0]; + String thriftPort = rpcString.split(":")[3]; + if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) { + LOGGER.error("serverAddress not exist"); + return -3; + } else { + String way = payWay.length == 0 ? payVo.getChannel() : payWay[0]; + + Result result = RPCClient.deliveryRecharge(thriftIp, thriftPort, uid, goodsId, openId, orderId, System.currentTimeMillis(), amount, ""); + if (result.getResultCode() != 1) { + LOGGER.error(result.getResultMsg()); + return -4; + } else { + LOGGER.info("pay " + orderId + " is ok "); + } + payVo.setStatus(1); + payVo.setPayWay(way); + payVo.setCporderId(cpOrderNo); + payVo.setSandbox(0); //正式订单 + payDao.upOder(payVo); + } + + } + return 1; + } + + /** + * 统一发货接口 新 + * + * @param orderId 游戏订单号 + * @param cpOrderNo 渠道订单号 + * @param amount 支付金额,单元分 + * @return 1 成功 + * -1 订单不存在 + * -2 订单参数错误 + * -3 服务器配置错误 + * -4 充值失败 + * @throws Exception + */ + public int processOrderNew(String orderId, String cpOrderNo,int amount, String... payWay) throws Exception { + return processOrderWithPlatform(orderId, cpOrderNo, amount, "", payWay); + } + + public int processOrderWithPlatform(String orderId, String cpOrderNo,int amount, String platform, String... payWay) throws Exception { + PayVo payVo = payDao.getOder(orderId); + if (payVo == null) { + LOGGER.error(orderId + " is not exit"); + return -1; + } + + //走游戏服配置验证,这里手动添加的验证去掉 +// int goodId = Integer.parseInt(payVo.getPay_item()); +// int priceAmount = priceAmount(goodId)*100; +// if(priceAmount != amount){ +// LOGGER.error( "充值金额与商品价格不一致 订单号:" + orderId + " (单位分):" + priceAmount + " 支付的金额:" + amount); +// return -4; +// } + + if(amount != 0) { + //判断提交金额和支付金额是否一致 + if (payVo.getMoney() != amount) { + LOGGER.error("订单号:" + orderId + " 提交的金额和支付的金额不一致 提交的金额(单位分):" + payVo.getMoney() + " 支付的金额:" + amount); + return -5; + } + }else { + LOGGER.error("订单号:" + orderId + " 提交的金额和支付的金额不一致,支付金额不能为0, 提交的金额(单位分):" + payVo.getMoney() + " 支付的金额:" + amount); + return -6; + } + + if (payVo.getStatus() == 1) { + return 1; + } + int serverId = payVo.getRegion(); + int uid = payVo.getUid(); + String goodsId = payVo.getPay_item(); + String openId = "0"; + //int amount = payVo.getMoney(); + MarkedVo marked = new MarkedVo(); + marked.setPartition(String.valueOf(serverId)); + CoreServerList coreServerList = serverListDao.findServer(marked); + if (null == coreServerList) { + LOGGER.error("应用不存在"); + return -2; + } else { + String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(serverId), String.class, -1); + System.out.println("rpcString " + rpcString); + if (null == rpcString) { + LOGGER.error("serverAddress not exist"); + } + String thriftIp = rpcString.split(":")[0]; + String thriftPort = rpcString.split(":")[3]; + if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) { + LOGGER.error("serverAddress not exist"); + return -3; + } else { + String way = payWay.length == 0 ? payVo.getChannel() : payWay[0]; + + Result result = RPCClient.deliveryRecharge(thriftIp, thriftPort, uid, goodsId, openId, orderId, System.currentTimeMillis(), amount, platform); + if (result.getResultCode() != 1) { + LOGGER.error(result.getResultMsg()); + return -4; + } else { + LOGGER.info("pay " + orderId + " is ok "); + } + payVo.setStatus(1); + payVo.setPayWay(way); + payVo.setCporderId(cpOrderNo); + payVo.setSandbox(0); //正式订单 + if(amount != 0) { + payVo.setAmount(amount); + } + payDao.upOder(payVo); + } + + } + return 1; + } + + /** + * 测试订单 + * @param orderId + * @param cpOrderNo + * @param payWay + * @return + * @throws Exception + */ + public int processOrderTest(String orderId, String cpOrderNo, String... payWay) throws Exception { + PayVo payVo = payDao.getOder(orderId); + if (payVo == null) { + LOGGER.error(orderId + " is not exit"); + return -1; + } + if (payVo.getStatus() == 1) { + return 1; + } + int serverId = payVo.getRegion(); + int uid = payVo.getUid(); + String goodsId = payVo.getPay_item(); + String openId = "0"; + int amount = payVo.getMoney(); + MarkedVo marked = new MarkedVo(); + marked.setPartition(String.valueOf(serverId)); + CoreServerList coreServerList = serverListDao.findServer(marked); + if (null == coreServerList) { + LOGGER.error("应用不存在"); + return -2; + } else { + String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(serverId), String.class, -1); + System.out.println("rpcString " + rpcString); + if (null == rpcString) { + LOGGER.error("serverAddress not exist"); + } + String thriftIp = rpcString.split(":")[0]; + String thriftPort = rpcString.split(":")[3]; + if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) { + LOGGER.error("serverAddress not exist"); + return -3; + } else { + String way = payWay.length == 0 ? payVo.getChannel() : payWay[0]; + payVo.setStatus(1); + payVo.setPayWay(way); + payVo.setCporderId(cpOrderNo); + payVo.setSandbox(1); //测试订单 (是否是测试订单,1:是: 0:否) + payDao.upOder(payVo); + Result result = RPCClient.deliveryRecharge(thriftIp, thriftPort, uid, goodsId, openId, orderId, System.currentTimeMillis(), amount, ""); + if (result.getResultCode() != 1) { + LOGGER.error(result.getResultMsg()); + return -4; + } else { + LOGGER.info("pay " + orderId + " is ok "); + } + } + + } + return 1; + } + + public int processCoupon(int gameUserId, int serverId,String couponCode,String title,String content, List itemId) throws Exception { + String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(serverId), String.class, -1); + System.out.println("rpcString " + rpcString); + if (null == rpcString) { + LOGGER.error("serverAddress not exist"); + } + String thriftIp = rpcString.split(":")[0]; + String thriftPort = rpcString.split(":")[3]; + if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) { + LOGGER.error("serverAddress not exist"); + return -2; + } else { + Result result = RPCClient.deliveryCoupon(thriftIp, thriftPort, gameUserId,couponCode,title,content, System.currentTimeMillis(), itemId); + if (result.getResultCode() != 1) { + LOGGER.error(result.getResultMsg()); + return -3; + } else { + LOGGER.info("processCoupon gameUserId=" + gameUserId + " couponCode = " + couponCode + " is ok "); + } + } + return 1; + } + + //public int processOrder(int uid, String goodsId,long orderTime,int serverId) throws Exception { + // String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(serverId), String.class, -1); + // System.out.println("rpcString " + rpcString); + // if (null == rpcString) { + // LOGGER.error("serverAddress not exist"); + // } + // String thriftIp = rpcString.split(":")[0]; + // String thriftPort = rpcString.split(":")[3]; + // if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) { + // LOGGER.error("serverAddress not exist"); + // return -2; + // } else { + // Result result = RPCClient.deliveryOrder(thriftIp, thriftPort, uid,goodsId, orderTime); + // if (result.getResultCode() != 1) { + // LOGGER.error(result.getResultMsg()); + // return -3; + // } else { + // LOGGER.info("processOrder uid=" + uid + " goodsId = " + goodsId + " orderTime = " + orderTime + " serverId = " + serverId + " is ok "); + // } + // } + // return 1; + //} + + //判断充值金额是否与商品表一致 + public int priceAmount(int goodId){ + Map priceMap = new HashMap<>(); + priceMap.put(304,128); + priceMap.put(305,328); + priceMap.put(306,648); + priceMap.put(318,128); + priceMap.put(319,328); + priceMap.put(320,648); + priceMap.put(332,128); + priceMap.put(333,328); + priceMap.put(334,648); + priceMap.put(346,128); + priceMap.put(347,328); + priceMap.put(348,648); + priceMap.put(360,128); + priceMap.put(361,328); + priceMap.put(362,648); + priceMap.put(374,128); + priceMap.put(375,328); + priceMap.put(376,648); + priceMap.put(388,128); + priceMap.put(389,328); + priceMap.put(390,648); + priceMap.put(504,128); + priceMap.put(505,328); + priceMap.put(506,648); + priceMap.put(515,198); + priceMap.put(516,328); + priceMap.put(517,648); + priceMap.put(518,128); + priceMap.put(519,328); + priceMap.put(520,648); + priceMap.put(521,6); + priceMap.put(522,30); + priceMap.put(523,68); + priceMap.put(524,128); + priceMap.put(525,198); + priceMap.put(526,328); + priceMap.put(527,648); + priceMap.put(532,128); + priceMap.put(533,328); + priceMap.put(534,648); + priceMap.put(535,6); + priceMap.put(536,30); + priceMap.put(537,68); + priceMap.put(538,128); + priceMap.put(539,198); + priceMap.put(540,328); + priceMap.put(541,648); + priceMap.put(546,128); + priceMap.put(547,328); + priceMap.put(548,648); + priceMap.put(555,128); + priceMap.put(556,198); + priceMap.put(557,328); + priceMap.put(558,648); + priceMap.put(559,128); + priceMap.put(560,328); + priceMap.put(561,648); + priceMap.put(569,128); + priceMap.put(570,198); + priceMap.put(571,328); + priceMap.put(572,648); + priceMap.put(573,128); + priceMap.put(574,328); + priceMap.put(575,648); + priceMap.put(576,6); + priceMap.put(577,30); + priceMap.put(578,68); + priceMap.put(579,128); + priceMap.put(580,198); + priceMap.put(581,328); + priceMap.put(582,648); + priceMap.put(583,128); + priceMap.put(584,198); + priceMap.put(585,328); + priceMap.put(586,648); + priceMap.put(587,128); + priceMap.put(588,328); + priceMap.put(589,648); + priceMap.put(596,128); + priceMap.put(597,198); + priceMap.put(598,328); + priceMap.put(599,648); + priceMap.put(600,128); + priceMap.put(601,328); + priceMap.put(602,648); + priceMap.put(603,6); + priceMap.put(604,30); + priceMap.put(605,68); + priceMap.put(606,128); + priceMap.put(608,328); + priceMap.put(609,648); + priceMap.put(614,128); + priceMap.put(615,328); + priceMap.put(616,648); + priceMap.put(617,6); + priceMap.put(618,30); + priceMap.put(619,68); + priceMap.put(620,128); + priceMap.put(621,198); + priceMap.put(622,328); + priceMap.put(623,648); + priceMap.put(624,128); + priceMap.put(625,198); + priceMap.put(626,328); + priceMap.put(627,648); + priceMap.put(628,128); + priceMap.put(629,328); + priceMap.put(630,648); + priceMap.put(631,128); + priceMap.put(632,198); + priceMap.put(633,328); + priceMap.put(634,648); + priceMap.put(635,128); + priceMap.put(636,328); + priceMap.put(637,648); + priceMap.put(638,128); + priceMap.put(639,198); + priceMap.put(640,328); + priceMap.put(641,648); + priceMap.put(642,128); + priceMap.put(643,328); + priceMap.put(644,648); + priceMap.put(645,128); + priceMap.put(646,198); + priceMap.put(647,328); + priceMap.put(648,648); + priceMap.put(649,128); + priceMap.put(650,328); + priceMap.put(651,648); + priceMap.put(652,128); + priceMap.put(653,198); + priceMap.put(654,328); + priceMap.put(655,648); + priceMap.put(656,128); + priceMap.put(657,328); + priceMap.put(658,648); + priceMap.put(659,6); + priceMap.put(660,30); + priceMap.put(661,68); + priceMap.put(662,128); + priceMap.put(663,198); + priceMap.put(664,328); + priceMap.put(665,648); + priceMap.put(666,128); + priceMap.put(667,198); + priceMap.put(668,328); + priceMap.put(669,648); + priceMap.put(670,128); + priceMap.put(671,328); + priceMap.put(672,648); + priceMap.put(673,6); + priceMap.put(674,30); + priceMap.put(675,68); + priceMap.put(676,128); + priceMap.put(677,328); + priceMap.put(678,648); + priceMap.put(679,128); + priceMap.put(680,198); + priceMap.put(681,328); + priceMap.put(682,648); + priceMap.put(683,128); + priceMap.put(684,328); + priceMap.put(685,648); + priceMap.put(33,128); + priceMap.put(34,6); + priceMap.put(35,6); + priceMap.put(36,30); + priceMap.put(37,198); + priceMap.put(38,128); + priceMap.put(39,328); + priceMap.put(40,648); + priceMap.put(42,12); + priceMap.put(43,98); + priceMap.put(44,648); + priceMap.put(46,128); + priceMap.put(47,6); + priceMap.put(48,6); + priceMap.put(49,30); + priceMap.put(50,198); + priceMap.put(51,128); + priceMap.put(52,328); + priceMap.put(53,648); + priceMap.put(54,128); + priceMap.put(55,6); + priceMap.put(56,6); + priceMap.put(57,30); + priceMap.put(58,198); + priceMap.put(59,128); + priceMap.put(60,328); + priceMap.put(61,648); + priceMap.put(62,128); + priceMap.put(63,6); + priceMap.put(64,6); + priceMap.put(65,30); + priceMap.put(66,198); + priceMap.put(67,128); + priceMap.put(68,328); + priceMap.put(69,648); + priceMap.put(70,128); + priceMap.put(71,6); + priceMap.put(72,6); + priceMap.put(73,30); + priceMap.put(74,198); + priceMap.put(75,128); + priceMap.put(76,328); + priceMap.put(77,648); + priceMap.put(13,198); + priceMap.put(14,198); + priceMap.put(15,198); + priceMap.put(16,198); + priceMap.put(17,198); + priceMap.put(18,198); + priceMap.put(19,198); + priceMap.put(20,198); + priceMap.put(251,68); + priceMap.put(252,128); + priceMap.put(253,328); + priceMap.put(254,448); + priceMap.put(255,648); + priceMap.put(21,30); + priceMap.put(400,68); + priceMap.put(401,128); + priceMap.put(402,328); + priceMap.put(9,12); + priceMap.put(10,30); + priceMap.put(11,98); + priceMap.put(12,30); + priceMap.put(24,68); + priceMap.put(25,128); + priceMap.put(26,328); + priceMap.put(27,388); + priceMap.put(28,448); + priceMap.put(29,448); + priceMap.put(30,448); + priceMap.put(31,648); + priceMap.put(32,648); + priceMap.put(7000,68); + priceMap.put(7001,128); + priceMap.put(7002,328); + priceMap.put(7003,448); + priceMap.put(7004,648); + priceMap.put(7100,68); + priceMap.put(7101,128); + priceMap.put(7102,328); + priceMap.put(7103,448); + priceMap.put(7104,648); + priceMap.put(8000,648); + priceMap.put(8001,648); + priceMap.put(8003,648); + priceMap.put(9000,328); + priceMap.put(9001,328); + priceMap.put(1,6); + priceMap.put(2,30); + priceMap.put(3,98); + priceMap.put(4,198); + priceMap.put(5,328); + priceMap.put(6,648); + priceMap.put(78,128); + priceMap.put(79,328); + priceMap.put(7801,128); + priceMap.put(7901,328); + priceMap.put(7802,128); + priceMap.put(7902,328); + priceMap.put(1001,6); + priceMap.put(1002,12); + priceMap.put(1003,30); + priceMap.put(1005,68); + priceMap.put(1004,98); + priceMap.put(1021,6); + priceMap.put(1022,12); + priceMap.put(1023,30); + priceMap.put(1025,68); + priceMap.put(1024,98); + priceMap.put(2000,0); + priceMap.put(2001,6); + priceMap.put(2002,30); + priceMap.put(2003,68); + priceMap.put(2004,98); + priceMap.put(2005,198); + priceMap.put(2006,198); + priceMap.put(2007,328); + priceMap.put(2008,328); + priceMap.put(2009,448); + priceMap.put(2010,648); + priceMap.put(2011,198); + priceMap.put(2012,288); + priceMap.put(2013,328); + priceMap.put(2014,328); + priceMap.put(2015,488); + priceMap.put(2016,488); + priceMap.put(2017,648); + priceMap.put(3000,0); + priceMap.put(3001,12); + priceMap.put(3002,30); + priceMap.put(3003,68); + priceMap.put(3004,128); + priceMap.put(3005,328); + priceMap.put(3006,448); + priceMap.put(3007,648); + priceMap.put(3008,648); + priceMap.put(3009,648); + priceMap.put(3010,328); + priceMap.put(4000,12); + priceMap.put(4001,30); + priceMap.put(4002,68); + priceMap.put(4003,30); + priceMap.put(4004,30); + priceMap.put(4005,30); + priceMap.put(5001,198); + priceMap.put(5002,198); + priceMap.put(5003,198); + priceMap.put(101,98); + priceMap.put(102,98); + priceMap.put(103,98); + priceMap.put(104,98); + priceMap.put(105,98); + priceMap.put(106,198); + priceMap.put(201,68); + priceMap.put(202,328); + priceMap.put(203,98); + priceMap.put(204,198); + priceMap.put(205,198); + priceMap.put(206,30); + priceMap.put(207,198); + priceMap.put(208,68); + priceMap.put(209,328); + priceMap.put(210,198); + priceMap.put(211,198); + priceMap.put(212,68); + priceMap.put(213,98); + priceMap.put(214,98); + priceMap.put(227,98); + priceMap.put(215,128); + priceMap.put(216,128); + priceMap.put(217,128); + priceMap.put(218,128); + priceMap.put(219,128); + priceMap.put(220,198); + priceMap.put(221,198); + priceMap.put(222,198); + priceMap.put(223,328); + priceMap.put(224,328); + priceMap.put(225,328); + priceMap.put(226,648); + priceMap.put(300,30); + priceMap.put(301,68); + priceMap.put(302,128); + priceMap.put(303,328); + priceMap.put(314,30); + priceMap.put(315,68); + priceMap.put(316,128); + priceMap.put(317,328); + priceMap.put(610,98); + priceMap.put(611,128); + priceMap.put(612,198); + priceMap.put(613,328); + priceMap.put(328,98); + priceMap.put(329,198); + priceMap.put(330,328); + priceMap.put(331,488); + priceMap.put(342,98); + priceMap.put(343,128); + priceMap.put(344,198); + priceMap.put(345,328); + priceMap.put(356,30); + priceMap.put(357,68); + priceMap.put(358,128); + priceMap.put(359,328); + priceMap.put(370,30); + priceMap.put(371,68); + priceMap.put(372,128); + priceMap.put(373,328); + priceMap.put(384,98); + priceMap.put(385,128); + priceMap.put(386,198); + priceMap.put(387,328); + priceMap.put(500,98); + priceMap.put(501,198); + priceMap.put(502,328); + priceMap.put(503,488); + priceMap.put(528,98); + priceMap.put(529,128); + priceMap.put(530,198); + priceMap.put(531,328); + priceMap.put(542,98); + priceMap.put(543,198); + priceMap.put(544,328); + priceMap.put(545,488); + priceMap.put(507,68); + priceMap.put(508,98); + priceMap.put(509,128); + priceMap.put(510,328); + priceMap.put(511,648); + priceMap.put(512,128); + priceMap.put(513,198); + priceMap.put(514,328); + priceMap.put(562,6); + priceMap.put(563,30); + priceMap.put(564,68); + priceMap.put(565,128); + priceMap.put(566,198); + priceMap.put(567,328); + priceMap.put(568,648); + priceMap.put(349,6); + priceMap.put(350,30); + priceMap.put(351,68); + priceMap.put(352,128); + priceMap.put(353,198); + priceMap.put(354,328); + priceMap.put(355,648); + priceMap.put(363,68); + priceMap.put(364,98); + priceMap.put(365,128); + priceMap.put(366,328); + priceMap.put(367,648); + priceMap.put(368,198); + priceMap.put(369,328); + priceMap.put(549,6); + priceMap.put(550,30); + priceMap.put(551,68); + priceMap.put(552,128); + priceMap.put(553,198); + priceMap.put(554,328); + priceMap.put(377,68); + priceMap.put(378,98); + priceMap.put(379,128); + priceMap.put(380,328); + priceMap.put(381,648); + priceMap.put(382,328); + priceMap.put(383,648); + priceMap.put(391,6); + priceMap.put(392,30); + priceMap.put(393,68); + priceMap.put(394,128); + priceMap.put(395,198); + priceMap.put(396,328); + priceMap.put(397,648); + priceMap.put(307,6); + priceMap.put(308,30); + priceMap.put(309,68); + priceMap.put(310,68); + priceMap.put(311,128); + priceMap.put(312,198); + priceMap.put(313,328); + priceMap.put(590,6); + priceMap.put(591,30); + priceMap.put(592,68); + priceMap.put(593,128); + priceMap.put(594,198); + priceMap.put(595,328); + priceMap.put(321,6); + priceMap.put(322,30); + priceMap.put(323,68); + priceMap.put(324,128); + priceMap.put(325,198); + priceMap.put(326,328); + priceMap.put(327,648); + priceMap.put(335,6); + priceMap.put(336,30); + priceMap.put(337,68); + priceMap.put(338,128); + priceMap.put(339,198); + priceMap.put(340,328); + priceMap.put(341,648); + priceMap.put(6001,18); + priceMap.put(6002,50); + priceMap.put(6003,328); + priceMap.put(6004,12); + priceMap.put(6005,18); + priceMap.put(6006,30); + priceMap.put(6007,12); + priceMap.put(6008,18); + priceMap.put(6009,30); + priceMap.put(6010,12); + priceMap.put(6011,18); + priceMap.put(6012,30); + priceMap.put(6013,12); + priceMap.put(6014,18); + priceMap.put(6015,30); + priceMap.put(6016,12); + priceMap.put(6017,18); + priceMap.put(6018,30); + priceMap.put(6019,18); + priceMap.put(6020,60); + priceMap.put(6021,198); + priceMap.put(6101,6); + priceMap.put(6102,12); + priceMap.put(6103,30); + priceMap.put(6201,6); + priceMap.put(6202,12); + priceMap.put(6203,30); + priceMap.put(6301,12); + priceMap.put(6302,18); + priceMap.put(6303,30); + priceMap.put(6401,6); + priceMap.put(6402,12); + priceMap.put(6403,30); + priceMap.put(6501,12); + priceMap.put(6502,18); + priceMap.put(6503,30); + priceMap.put(6601,6); + priceMap.put(6602,12); + priceMap.put(6603,30); + priceMap.put(6701,6); + priceMap.put(6702,12); + priceMap.put(6703,30); + priceMap.put(10001,648); + priceMap.put(10002,648); + priceMap.put(20001,60); + priceMap.put(30500,30); + priceMap.put(30501,30); + priceMap.put(30502,60); + priceMap.put(30600,68); + priceMap.put(30601,98); + priceMap.put(30602,128); + priceMap.put(30700,128); + priceMap.put(30701,198); + priceMap.put(30800,198); + priceMap.put(30801,288); + priceMap.put(30900,198); + priceMap.put(30901,288); + priceMap.put(31000,328); + priceMap.put(31001,488); + priceMap.put(32000,98); + priceMap.put(33001,30); + priceMap.put(33002,60); + priceMap.put(33003,60); + priceMap.put(33004,60); + priceMap.put(33005,60); + priceMap.put(33006,98); + priceMap.put(33007,98); + priceMap.put(33008,98); + priceMap.put(33009,128); + priceMap.put(33010,128); + priceMap.put(33011,128); + priceMap.put(33012,198); + priceMap.put(33013,198); + priceMap.put(33014,128); + priceMap.put(33015,198); + priceMap.put(33016,198); + priceMap.put(33017,128); + priceMap.put(33018,328); + priceMap.put(33019,328); + priceMap.put(33020,328); + priceMap.put(33021,328); + priceMap.put(34001,30); + priceMap.put(34002,68); + priceMap.put(34003,98); + priceMap.put(34004,128); + priceMap.put(34005,198); + priceMap.put(34006,288); + priceMap.put(34007,60); + priceMap.put(34008,128); + priceMap.put(35001,18); + priceMap.put(35002,30); + priceMap.put(35003,60); + priceMap.put(35004,98); + priceMap.put(35005,128); + priceMap.put(35006,198); + priceMap.put(30503,128); + priceMap.put(30504,328); + priceMap.put(30505,648); + priceMap.put(30506,60); + priceMap.put(30507,128); + priceMap.put(30508,328); + priceMap.put(30509,648); + priceMap.put(30510,60); + priceMap.put(30511,128); + priceMap.put(30512,328); + priceMap.put(30513,648); + priceMap.put(30603,128); + priceMap.put(30604,198); + priceMap.put(30605,328); + priceMap.put(30606,128); + priceMap.put(30607,198); + priceMap.put(30608,328); + priceMap.put(30702,98); + priceMap.put(30703,128); + priceMap.put(30704,198); + priceMap.put(30705,328); + priceMap.put(30706,488); + priceMap.put(30707,648); + priceMap.put(30802,128); + priceMap.put(30803,198); + priceMap.put(30804,328); + priceMap.put(30805,328); + priceMap.put(30806,488); + priceMap.put(30807,648); + priceMap.put(30902,128); + priceMap.put(30903,198); + priceMap.put(30904,328); + priceMap.put(31002,198); + priceMap.put(31003,328); + priceMap.put(31004,648); + priceMap.put(32018,30); + priceMap.put(32001,60); + priceMap.put(32023,30); + priceMap.put(32029,60); + priceMap.put(32033,60); + priceMap.put(32037,98); + priceMap.put(32043,98); + priceMap.put(32002,98); + priceMap.put(32047,128); + priceMap.put(32053,128); + priceMap.put(32057,128); + priceMap.put(32063,198); + priceMap.put(32067,198); + priceMap.put(32003,128); + priceMap.put(32085,198); + priceMap.put(32004,128); + priceMap.put(32095,198); + priceMap.put(32100,328); + priceMap.put(32005,328); + priceMap.put(32110,328); + priceMap.put(32118,328); + priceMap.put(32006,648); + priceMap.put(32028,60); + priceMap.put(32048,68); + priceMap.put(32058,98); + priceMap.put(32068,98); + priceMap.put(32073,128); + priceMap.put(32078,128); + priceMap.put(32088,128); + priceMap.put(32098,198); + priceMap.put(32103,198); + priceMap.put(32113,328); + priceMap.put(35101,18); + priceMap.put(35102,30); + priceMap.put(35103,60); + priceMap.put(35104,98); + priceMap.put(35105,328); + priceMap.put(35106,648); + priceMap.put(35201,18); + priceMap.put(35202,30); + priceMap.put(35203,60); + priceMap.put(35204,98); + priceMap.put(35205,128); + priceMap.put(35206,648); + priceMap.put(35301,30); + priceMap.put(35302,60); + priceMap.put(35303,98); + priceMap.put(35304,128); + priceMap.put(35305,198); + priceMap.put(35306,328); + priceMap.put(35401,30); + priceMap.put(35402,60); + priceMap.put(35403,98); + priceMap.put(35404,128); + priceMap.put(35405,198); + priceMap.put(35406,328); + priceMap.put(36006,6); + priceMap.put(36012,12); + priceMap.put(36018,18); + priceMap.put(36030,30); + priceMap.put(36060,60); + priceMap.put(36098,98); + priceMap.put(36128,128); + priceMap.put(36198,198); + priceMap.put(36328,328); + priceMap.put(36488,328); + priceMap.put(36648,648); + priceMap.put(6801,12); + priceMap.put(6802,18); + priceMap.put(6803,30); + priceMap.put(6901,12); + priceMap.put(6902,18); + priceMap.put(6903,30); + priceMap.put(7201,12); + priceMap.put(7202,18); + priceMap.put(7203,30); + priceMap.put(7301,12); + priceMap.put(7302,18); + priceMap.put(7303,30); + priceMap.put(72001,198); + priceMap.put(55001,30); + priceMap.put(55002,68); + priceMap.put(55003,98); + priceMap.put(55004,128); + priceMap.put(55005,128); + priceMap.put(55011,30); + priceMap.put(55012,98); + priceMap.put(55013,128); + priceMap.put(55014,128); + priceMap.put(60001,18); + priceMap.put(60002,50); + priceMap.put(60003,98); + priceMap.put(60004,198); + priceMap.put(60005,288); + priceMap.put(60006,488); + priceMap.put(60007,288); + priceMap.put(60008,288); + priceMap.put(60009,288); + priceMap.put(60010,288); + priceMap.put(60011,288); + priceMap.put(61000,0); + priceMap.put(61001,6); + priceMap.put(61002,30); + priceMap.put(61003,68); + priceMap.put(61004,98); + priceMap.put(61005,128); + priceMap.put(61006,328); + priceMap.put(61007,648); + + Integer priceTemp = priceMap.get(goodId); + return priceTemp; + } + +} diff --git a/src/main/java/com/jmfy/handler/impl/ChangeRoleNameHandler.java b/src/main/java/com/jmfy/handler/impl/ChangeRoleNameHandler.java new file mode 100644 index 0000000..b14b50d --- /dev/null +++ b/src/main/java/com/jmfy/handler/impl/ChangeRoleNameHandler.java @@ -0,0 +1,69 @@ +package com.jmfy.handler.impl; + +import com.alibaba.fastjson.JSONObject; +import com.jmfy.dao.GSUserDao; +import com.jmfy.dao.RoleListDao; +import com.jmfy.dao.ServerListDao; +import com.jmfy.handler.BaseHandler; +import com.jmfy.handler.MarkedInfo; +import com.jmfy.model.CoreServerList; +import com.jmfy.model.CoreUserInfo; +import com.jmfy.model.GSUser; +import com.jmfy.modelVo.BaseVo; +import com.jmfy.modelVo.MarkedVo; +import com.jmfy.modelVo.RoleListVo; +import com.jmfy.util.SDK37Constans; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; + +@Component +public class ChangeRoleNameHandler extends BaseHandler { + private org.slf4j.Logger LOGGER = LoggerFactory.getLogger(ChangeRoleNameHandler.class); + + + @Override + public BaseVo execute(JSONObject jsonObject) throws Exception { + long time = 0; + String uid = ""; + String dsid = ""; + String roleId = ""; + String sign = ""; + + if (jsonObject.containsKey("timestamp") && jsonObject.containsKey("uid") && jsonObject.containsKey("roleid") && jsonObject.containsKey("partition") && jsonObject.containsKey("sign")) { + time = jsonObject.getLong("timestamp"); + uid = jsonObject.getString("uid"); + dsid = jsonObject.getString("partition"); + roleId = jsonObject.getString("roleid"); + sign = jsonObject.getString("sign"); + } else { + throw new Exception("缺少参数"); + } + + if (!validSign(String.valueOf(getPid()) + + String.valueOf(getGid()) + String.valueOf(time) + + String.valueOf(uid) + String.valueOf(dsid) + + String.valueOf(roleId) + + SDK37Constans.appkey, sign)) { + throw new Exception("签名错误"); + } + + BaseVo baseVo = new BaseVo(); + MarkedVo marked = MarkedInfo.getMarkedVo(jsonObject); + LOGGER.info("-->areaId={},platId={},openid={},serverId={}", marked.getAreaId(), marked.getPlatId(), marked.getOpenId(), marked.getPartition()); + + + baseVo.setState(1); + baseVo.setMsg("成功"); + return baseVo; + } + + @Override + public String getRequestURI() { + return "rolelist"; + } + +} diff --git a/src/main/java/com/jmfy/handler/impl/GMHandler.java b/src/main/java/com/jmfy/handler/impl/GMHandler.java new file mode 100644 index 0000000..4e2035f --- /dev/null +++ b/src/main/java/com/jmfy/handler/impl/GMHandler.java @@ -0,0 +1,198 @@ +package com.jmfy.handler.impl; + +import com.alibaba.fastjson.JSONObject; +import com.jmfy.dao.GSUserDao; +import com.jmfy.dao.RoleListDao; +import com.jmfy.dao.ServerListDao; +import com.jmfy.handler.BaseHandler; +import com.jmfy.model.CoreServerList; +import com.jmfy.model.CoreUserInfo; +import com.jmfy.modelVo.BaseVo; +import com.jmfy.modelVo.MarkedVo; +import com.jmfy.redisProperties.RedisUserKey; +import com.jmfy.util.RPCClient; +import com.jmfy.util.RedisUtil; +import com.jmfy.util.SDK37Constans; +import com.ljsd.jieling.thrift.idl.Result; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.List; + +@Component +public class GMHandler extends BaseHandler { + private org.slf4j.Logger LOGGER = LoggerFactory.getLogger(GMHandler.class); + + @Resource + private ServerListDao serverListDao; + @Resource + private RoleListDao roleListDao; + @Resource + private GSUserDao gsUserDao; + + public BaseVo execute(JSONObject jsonObject) throws Exception { + + int atime; + String uid; + String gid; + int dsid; + int treat_type; + String sign; + if (jsonObject.containsKey("atime") && jsonObject.containsKey("uid") && jsonObject.containsKey("gid") && jsonObject.containsKey("dsid") && jsonObject.containsKey("treat_type") && jsonObject.containsKey("sign")) { + atime = jsonObject.getIntValue("atime"); + uid = jsonObject.getString("uid"); + gid = jsonObject.getString("gid"); + dsid = jsonObject.getIntValue("dsid"); + treat_type = jsonObject.getIntValue("treat_type"); + sign = jsonObject.getString("sign"); + } else { + throw new Exception("缺少参数"); + } + + if (!BaseHandler.validSign(SDK37Constans.chatKey + String.valueOf(uid) + String.valueOf(gid) + String.valueOf(dsid) + String.valueOf(treat_type) + + String.valueOf(atime), sign)) { + throw new Exception("签名错误"); + } + + boolean allServer = false; + + String cmd = ""; + switch (treat_type){ + case 1: + if(!jsonObject.containsKey("actor_id")){ + throw new Exception("缺少参数"); + } + String actor_id_ban = jsonObject.getString("actor_id"); + cmd="silence "+actor_id_ban+" 1"; + break; + case 2: + if(!jsonObject.containsKey("actor_id")){ + throw new Exception("缺少参数"); + } + String actor_id_no_ban = jsonObject.getString("actor_id"); + cmd="silence "+actor_id_no_ban+" 0"; + break; + case 4: + if(dsid==0){ + allServer=true; + cmd="addblack "; + }else { + if(!jsonObject.containsKey("actor_id")){ + throw new Exception("缺少参数"); + } + String id = jsonObject.getString("actor_id"); + cmd="addblack "+id; + } + break; + case 5: + if(dsid==0){ + allServer=true; + cmd="reblack "; + }else { + if(!jsonObject.containsKey("actor_id")){ + throw new Exception("缺少参数"); + } + String id2 = jsonObject.getString("actor_id"); + cmd="reblack "+id2; + } + break; + case 3: + if(!jsonObject.containsKey("actor_id")){ + throw new Exception("缺少参数"); + } + String actor_id = jsonObject.getString("actor_id"); + cmd="kick "+actor_id; + break; + case 6: + if(!jsonObject.containsKey("actor_id")){ + throw new Exception("缺少参数"); + } + String actor_id2 = jsonObject.getString("actor_id"); + if(!jsonObject.containsKey("actor_name")){ + cmd="changename "+actor_id2; + }else { + String actor_name = jsonObject.getString("actor_name"); + cmd="changename "+actor_id2+" "+actor_name; + } + break; + + } + + if(allServer){ + MarkedVo marked = new MarkedVo(); + marked.setOpenId(String.valueOf(uid)); + List coreUserInfoList = roleListDao.findRoleList(marked); + if (coreUserInfoList == null) { + throw new Exception("帐号不存在"); + } else { + if (coreUserInfoList.size() == 0) + throw new Exception("帐号不存在"); + for (CoreUserInfo coreUserInfo : coreUserInfoList) { + MarkedVo marked2 = new MarkedVo(); + marked2.setPartition(String.valueOf(coreUserInfo.getServerid())); + CoreServerList coreServerList = serverListDao.findServer(marked2); + if (null == coreServerList) { + continue; + } else { + String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(coreUserInfo.getServerid()), String.class, -1); + if(null==rpcString){ + continue; + } + String thriftIp = rpcString.split(":")[0]; + String thriftPort = rpcString.split(":")[1]; + if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) { + continue; + } else { + cmd = cmd+coreUserInfo.getUid(); + Result result = RPCClient.gmSend(cmd, thriftIp, thriftPort); + //异常或者错误 +// if (result.getResultCode() != 0) { +// continue; +// } + } + } + } + } + + BaseVo baseVo = new BaseVo(); + baseVo.setState(1); + baseVo.setMsg("成功"); + return baseVo; + }else { + BaseVo baseVo = new BaseVo(); + MarkedVo marked = new MarkedVo(); + marked.setPartition(String.valueOf(dsid)); + CoreServerList coreServerList = serverListDao.findServer(marked); + if (null == coreServerList) { + throw new Exception("应用不存在"); + } else { + String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(dsid), String.class, -1); + if(null==rpcString){ + throw new Exception("serverAddress not exist"); + } + String thriftIp = rpcString.split(":")[0]; + String thriftPort = rpcString.split(":")[1]; + if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) { + throw new Exception("serverAddress not exist"); + } else { + + Result result = RPCClient.gmSend(cmd, thriftIp, thriftPort); + if (result.getResultCode() != 0) { + throw new Exception(result.getResultMsg()); + } + } + + } + baseVo.setState(1); + baseVo.setMsg("成功"); + return baseVo; + } + + } + + @Override + public String getRequestURI() { + return "gm"; + } +} diff --git a/src/main/java/com/jmfy/handler/impl/RoleListHandler.java b/src/main/java/com/jmfy/handler/impl/RoleListHandler.java new file mode 100644 index 0000000..baecec6 --- /dev/null +++ b/src/main/java/com/jmfy/handler/impl/RoleListHandler.java @@ -0,0 +1,101 @@ +package com.jmfy.handler.impl; + +import com.alibaba.fastjson.JSONObject; +import com.jmfy.dao.GSUserDao; +import com.jmfy.dao.RoleListDao; +import com.jmfy.dao.ServerListDao; +import com.jmfy.handler.BaseHandler; +import com.jmfy.handler.MarkedInfo; +import com.jmfy.model.CoreServerList; +import com.jmfy.model.CoreUserInfo; +import com.jmfy.model.GSUser; +import com.jmfy.modelVo.BaseVo; +import com.jmfy.modelVo.MarkedVo; +import com.jmfy.modelVo.RoleListVo; +import com.jmfy.util.SDK37Constans; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; + +@Component +public class RoleListHandler extends BaseHandler { + private org.slf4j.Logger LOGGER = LoggerFactory.getLogger(RoleListHandler.class); + + @Resource + private RoleListDao roleListDao; + @Resource + private ServerListDao serverListDao; + @Resource + private GSUserDao gsUserDao; + + @Override + public BaseVo execute(JSONObject jsonObject) throws Exception { + + long time; + String uid; + String sign; + if (jsonObject.containsKey("time") && jsonObject.containsKey("uid") && jsonObject.containsKey("sign")) { + time = jsonObject.getLong("time"); + uid = jsonObject.getString("uid"); + sign = jsonObject.getString("sign"); + } else { + throw new Exception("缺少参数"); + } + + if (!validSign(String.valueOf(time) + String.valueOf(getPid()) + + String.valueOf(getGid()) + String.valueOf(uid) + + SDK37Constans.appkey, sign)) { + throw new Exception("签名错误"); + } + + BaseVo baseVo = new BaseVo(); + MarkedVo marked = MarkedInfo.getMarkedVo(jsonObject); + LOGGER.info("-->areaId={},platId={},openid={},serverId={}", marked.getAreaId(), marked.getPlatId(), marked.getOpenId(), marked.getPartition()); + + List roleListVos = new ArrayList<>(); + + List coreUserInfoList = roleListDao.findRoleList(marked); + if (coreUserInfoList == null) { + throw new Exception("帐号不存在"); + } else { + if (coreUserInfoList.size() == 0) + throw new Exception("帐号不存在"); + for (CoreUserInfo coreUserInfo : coreUserInfoList) { + MarkedVo marked1 = new MarkedVo(); + marked1.setOpenId(coreUserInfo.getOpenId()); + marked1.setPartition(String.valueOf(coreUserInfo.getServerid())); + + RoleListVo roleListVo = new RoleListVo(); + + GSUser gsUser = gsUserDao.findUserInfo(marked1, coreUserInfo.getUid()); + if (null == gsUser) { + throw new Exception("帐号不存在"); + } + CoreServerList coreServerList = serverListDao.findServer(marked1); + if (null == coreServerList) { + throw new Exception("应用不存在"); + } + roleListVo.setDrlevel(String.valueOf(gsUser.getPlayerManager().getLevel())); + roleListVo.setDrname(gsUser.getPlayerManager().getNickName()); + roleListVo.setDrid(String.valueOf(coreUserInfo.getUid())); + roleListVo.setDsid(String.valueOf(coreUserInfo.getServerid())); + + roleListVo.setDsname(coreServerList.getName()); + roleListVos.add(roleListVo); + } + } + baseVo.setData(roleListVos); + baseVo.setState(1); + baseVo.setMsg("成功"); + return baseVo; + } + + @Override + public String getRequestURI() { + return "rolelist"; + } + +} diff --git a/src/main/java/com/jmfy/handler/impl/SDKHandler.java b/src/main/java/com/jmfy/handler/impl/SDKHandler.java new file mode 100644 index 0000000..695a862 --- /dev/null +++ b/src/main/java/com/jmfy/handler/impl/SDKHandler.java @@ -0,0 +1,88 @@ +package com.jmfy.handler.impl; + +import com.alibaba.fastjson.JSONObject; +import com.jmfy.dao.GSUserDao; +import com.jmfy.dao.RoleListDao; +import com.jmfy.dao.ServerListDao; +import com.jmfy.handler.BaseHandler; +import com.jmfy.model.CoreServerList; +import com.jmfy.modelVo.BaseVo; +import com.jmfy.modelVo.MarkedVo; +import com.jmfy.redisProperties.RedisUserKey; +import com.jmfy.util.RPCClient; +import com.jmfy.util.RedisUtil; +import com.ljsd.jieling.thrift.idl.Result; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; + +@Component +public class SDKHandler extends BaseHandler { + private org.slf4j.Logger LOGGER = LoggerFactory.getLogger(SDKHandler.class); + + @Resource + private ServerListDao serverListDao; + @Resource + private RoleListDao roleListDao; + @Resource + private GSUserDao gsUserDao; + + public BaseVo execute(JSONObject jsonObject) throws Exception { + int serverId; + int uid; + String goodsId; + String openId; + String orderId; + long orderTime; + int amount; + if (jsonObject.containsKey("serverId") && jsonObject.containsKey("uid") && jsonObject.containsKey("goodsId") && jsonObject.containsKey("openId") && jsonObject.containsKey("orderId") && jsonObject.containsKey("orderTime") && jsonObject.containsKey("amount")) { + serverId = jsonObject.getIntValue("serverId"); + uid = jsonObject.getIntValue("uid"); + goodsId = jsonObject.getString("goodsId"); + openId = jsonObject.getString("openId"); + orderId = jsonObject.getString("orderId"); + orderTime = jsonObject.getIntValue("orderTime"); + amount = jsonObject.getIntValue("amount"); + } else { + throw new Exception("缺少参数"); + } + BaseVo baseVo = new BaseVo(); + MarkedVo marked = new MarkedVo(); + marked.setPartition(String.valueOf(serverId)); + CoreServerList coreServerList = serverListDao.findServer(marked); + if (null == coreServerList) { + throw new Exception("应用不存在"); + } else { + String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(serverId), String.class, -1); + LOGGER.info("rpcString {}",rpcString); + if(null==rpcString){ + throw new Exception("serverAddress not exist"); + } + String thriftIp = rpcString.split(":")[0]; + String thriftPort = rpcString.split(":")[1]; + if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) { + throw new Exception("serverAddress not exist"); + } else { + Result result = RPCClient.deliveryRecharge(thriftIp, thriftPort,uid,goodsId,openId,orderId,orderTime,amount, ""); + if (result.getResultCode() != 0) { + throw new Exception(result.getResultMsg()); + } + } + + } + + + + + baseVo.setState(1); + baseVo.setMsg("成功"); + return baseVo; + + } + + @Override + public String getRequestURI() { + return "sdk"; + } +} diff --git a/src/main/java/com/jmfy/handler/impl/ServerListHandler.java b/src/main/java/com/jmfy/handler/impl/ServerListHandler.java new file mode 100644 index 0000000..3a8c98f --- /dev/null +++ b/src/main/java/com/jmfy/handler/impl/ServerListHandler.java @@ -0,0 +1,57 @@ +package com.jmfy.handler.impl; + +import com.alibaba.fastjson.JSONObject; +import com.jmfy.cenum.CommandEnm; +import com.jmfy.dao.ServerListDao; +import com.jmfy.handler.BaseHandler; +import com.jmfy.handler.MarkedInfo; +import com.jmfy.model.CoreServerList; +import com.jmfy.modelVo.*; +import com.jmfy.util.SDK37Constans; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.*; + +@Component +public class ServerListHandler extends BaseHandler { + private org.slf4j.Logger LOGGER = LoggerFactory.getLogger(ServerListHandler.class); + + @Resource + private ServerListDao serverListDao; + + @Override + public BaseVo execute(JSONObject jsonObject) throws Exception { + + int time = 0; + String sign = ""; + if (jsonObject.containsKey("time") && jsonObject.containsKey("sign")) { + time = jsonObject.getIntValue("time"); + sign = jsonObject.getString("sign"); + } else { + throw new Exception("缺少参数"); + } + if (!validSign(String.valueOf(time) + String.valueOf(getPid()) + String.valueOf(getGid()) + SDK37Constans.appkey, sign)) { + throw new Exception("签名错误"); + } + BaseVo baseVo = new BaseVo(); + List listBaseVo = new ArrayList(); + MarkedVo marked = MarkedInfo.getMarkedVo(jsonObject); + LOGGER.info("-->areaId={},platId={},openid={},serverId={}", marked.getAreaId(), marked.getPlatId(), marked.getOpenId(), marked.getPartition()); + List lists = serverListDao.findServerList(marked); + for (CoreServerList serverList : lists) { + listBaseVo.add(new ServerListVo(serverList.get_id(), serverList.getName())); + } + baseVo.setData(listBaseVo); + baseVo.setState(1); + baseVo.setMsg("成功"); + return baseVo; + } + + @Override + public String getRequestURI() { + return "serverlist"; + } + +} diff --git a/src/main/java/com/jmfy/handler/impl/ServerRoleInfoHandler.java b/src/main/java/com/jmfy/handler/impl/ServerRoleInfoHandler.java new file mode 100644 index 0000000..9dcee2d --- /dev/null +++ b/src/main/java/com/jmfy/handler/impl/ServerRoleInfoHandler.java @@ -0,0 +1,144 @@ +package com.jmfy.handler.impl; + +import com.alibaba.fastjson.JSONObject; +import com.jmfy.cenum.CommandEnm; +import com.jmfy.dao.GSUserDao; +import com.jmfy.dao.ServerListDao; +import com.jmfy.dao.ServerRoleInfoDao; +import com.jmfy.dao.ServerRoleListDao; +import com.jmfy.handler.BaseHandler; +import com.jmfy.handler.MarkedInfo; +import com.jmfy.model.CoreServerList; +import com.jmfy.model.CoreUserInfo; +import com.jmfy.model.GSUser; +import com.jmfy.modelVo.*; +import com.jmfy.util.SDK37Constans; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +@Component +public class ServerRoleInfoHandler extends BaseHandler { + private org.slf4j.Logger LOGGER = LoggerFactory.getLogger(ServerRoleInfoHandler.class); + + @Resource + private ServerRoleInfoDao serverRoleInfoDao; + @Resource + private GSUserDao gsUserDao; + @Resource + private ServerListDao serverListDao; + + @Override + public BaseVo execute(JSONObject jsonObject) throws Exception { + + long time = 0; + String uid = ""; + String dsid = ""; + String roleId = ""; + int type = 0; + String sign = ""; + + if (jsonObject.containsKey("timestamp") && jsonObject.containsKey("uid") && jsonObject.containsKey("roleid") && jsonObject.containsKey("partition") && jsonObject.containsKey("type") && jsonObject.containsKey("sign")) { + time = jsonObject.getLong("timestamp"); + uid = jsonObject.getString("uid"); + dsid = jsonObject.getString("partition"); + roleId = jsonObject.getString("roleid"); + type = jsonObject.getIntValue("type"); + sign = jsonObject.getString("sign"); + } else { + throw new Exception("缺少参数"); + } + + int date = 0; + if (type == 0 || type == 2) { + if (jsonObject.containsKey("date")) { + date = jsonObject.getIntValue("date"); + } else { + throw new Exception("缺少参数"); + } + } + int begin = 0; + int end = 0; + if (type == 0 || type == 3 || type == 4) { + if (jsonObject.containsKey("begin") && jsonObject.containsKey("end")) { + begin = jsonObject.getIntValue("begin"); + end = jsonObject.getIntValue("end"); + } else { + throw new Exception("缺少参数"); + } + } + + if (!validSign(String.valueOf(getPid()) + + String.valueOf(getGid()) + String.valueOf(time) + + String.valueOf(uid) + String.valueOf(dsid) + + String.valueOf(roleId) + String.valueOf(type) + + SDK37Constans.appkey, sign)) { + throw new Exception("签名错误"); + } + + BaseVo baseVo = new BaseVo(); + MarkedVo marked = MarkedInfo.getMarkedVo(jsonObject); + LOGGER.info("-->areaId={},platId={},openid={},serverId={}", marked.getAreaId(), marked.getPlatId(), marked.getOpenId(), marked.getPartition()); + + JSONObject jsonObject1 = new JSONObject(); + CoreUserInfo coreUserInfo = serverRoleInfoDao.findServerRoleInfo(marked, Integer.valueOf(roleId)); + if (coreUserInfo == null) { + throw new Exception("帐号不存在"); + } else { + + MarkedVo marked1 = new MarkedVo(); + marked1.setOpenId(coreUserInfo.getOpenId()); + marked1.setPartition(String.valueOf(coreUserInfo.getServerid())); + + CoreServerList coreServerList = serverListDao.findServer(marked1); + if (null == coreServerList) { + throw new Exception("应用不存在"); + } + GSUser gsUser = gsUserDao.findUserInfo(marked1, coreUserInfo.getUid()); + if (null == gsUser) { + throw new Exception("帐号不存在"); + } + + jsonObject1.put("dsid", String.valueOf(coreUserInfo.getServerid())); + jsonObject1.put("dsname", coreServerList.getName()); + jsonObject1.put("droleid", String.valueOf(gsUser.getId())); + jsonObject1.put("last_login_time", String.valueOf(gsUser.getPlayerManager().getLoginTime() / 1000)); + if (type == 0 || type == 2) { + Map onlineTimeOfDay = gsUser.getPlayerManager().getOnlineTimeOfDay(); + long sumTime = 0; + if (onlineTimeOfDay != null && onlineTimeOfDay.containsKey(date)) { + sumTime = onlineTimeOfDay.get(date); + } else { + sumTime = 0; + } + jsonObject1.put("online_time", sumTime); //todo 修改记录数据 + } + + jsonObject1.put("paynum", String.valueOf(gsUser.getPlayerManager().getRechargeInfo().getSaveAmt())); + + if (type == 5) { + jsonObject1.put("fight_value", String.valueOf(gsUser.getPlayerManager().getMaxForce())); + jsonObject1.put("level", String.valueOf(gsUser.getPlayerManager().getLevel())); + } + if (type == 6) { + jsonObject1.put("level", String.valueOf(gsUser.getPlayerManager().getLevel())); + jsonObject1.put("profession", ""); + jsonObject1.put("profession_name", ""); + } + } + baseVo.setData(jsonObject1); + baseVo.setState(1); + baseVo.setMsg("成功"); + return baseVo; + } + + @Override + public String getRequestURI() { + return "serverroleinfo"; + } + +} diff --git a/src/main/java/com/jmfy/handler/impl/ServerRoleListInServerHandler.java b/src/main/java/com/jmfy/handler/impl/ServerRoleListInServerHandler.java new file mode 100644 index 0000000..39f8641 --- /dev/null +++ b/src/main/java/com/jmfy/handler/impl/ServerRoleListInServerHandler.java @@ -0,0 +1,105 @@ +package com.jmfy.handler.impl; + +import com.alibaba.fastjson.JSONObject; +import com.jmfy.dao.GSUserDao; +import com.jmfy.dao.RoleListDao; +import com.jmfy.dao.ServerListDao; +import com.jmfy.dao.ServerRoleListDao; +import com.jmfy.handler.BaseHandler; +import com.jmfy.handler.MarkedInfo; +import com.jmfy.model.CoreServerList; +import com.jmfy.model.CoreUserInfo; +import com.jmfy.model.GSUser; +import com.jmfy.modelVo.BaseVo; +import com.jmfy.modelVo.MarkedVo; +import com.jmfy.modelVo.RoleListVo; +import com.jmfy.modelVo.ServerRoleListVo; +import com.jmfy.util.SDK37Constans; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; + +@Component +public class ServerRoleListInServerHandler extends BaseHandler { + private org.slf4j.Logger LOGGER = LoggerFactory.getLogger(ServerRoleListInServerHandler.class); + + @Resource + private ServerRoleListDao serverRoleListDao; + @Resource + private ServerListDao serverListDao; + @Resource + private GSUserDao gsUserDao; + + @Override + public BaseVo execute(JSONObject jsonObject) throws Exception { + + long time = 0; + String uid = ""; + String dsid = ""; + String sign = ""; + if (jsonObject.containsKey("time") && jsonObject.containsKey("uid") && jsonObject.containsKey("dsid") && jsonObject.containsKey("sign")) { + time = jsonObject.getLong("time"); + dsid = jsonObject.getString("dsid"); + uid = jsonObject.getString("uid"); + sign = jsonObject.getString("sign"); + } else { + throw new Exception("缺少参数"); + } + if (!validSign(String.valueOf(time) + String.valueOf(getPid()) + + String.valueOf(getGid()) + String.valueOf(dsid) + String.valueOf(uid) + + SDK37Constans.appkey, sign)) { + throw new Exception("签名错误"); + } + + BaseVo baseVo = new BaseVo(); + MarkedVo marked = MarkedInfo.getMarkedVo(jsonObject); + LOGGER.info("-->areaId={},platId={},openid={},serverId={}", marked.getAreaId(), marked.getPlatId(), marked.getOpenId(), marked.getPartition()); + + + List roleListVos = new ArrayList<>(); + + List coreUserInfoList = serverRoleListDao.findServerRoleList(marked); + if (coreUserInfoList == null) { + throw new Exception("openid does not exist"); + } else { + + for (CoreUserInfo coreUserInfo : coreUserInfoList) { + MarkedVo marked1 = new MarkedVo(); + marked1.setOpenId(coreUserInfo.getOpenId()); + marked1.setPartition(String.valueOf(coreUserInfo.getServerid())); + + RoleListVo roleListVo = new RoleListVo(); + + GSUser gsUser = gsUserDao.findUserInfo(marked1, coreUserInfo.getUid()); + + if (null == gsUser) { + throw new Exception("帐号不存在"); + } + roleListVo.setDrlevel(String.valueOf(gsUser.getPlayerManager().getLevel())); + roleListVo.setDrname(gsUser.getPlayerManager().getNickName()); + roleListVo.setDrid(String.valueOf(coreUserInfo.getUid())); + roleListVo.setDsid(String.valueOf(coreUserInfo.getServerid())); + CoreServerList coreServerList = serverListDao.findServer(marked1); + if (null == coreServerList) { + throw new Exception("应用不存在"); + } + roleListVo.setDsname(coreServerList.getName()); + roleListVos.add(roleListVo); + } + + } + baseVo.setData(roleListVos); + baseVo.setState(1); + baseVo.setMsg("成功"); + return baseVo; + } + + @Override + public String getRequestURI() { + return "serverrolelist"; + } + +} diff --git a/src/main/java/com/jmfy/model/BuriedPoint.java b/src/main/java/com/jmfy/model/BuriedPoint.java new file mode 100644 index 0000000..890ef22 --- /dev/null +++ b/src/main/java/com/jmfy/model/BuriedPoint.java @@ -0,0 +1,53 @@ +package com.jmfy.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.data.mongodb.core.mapping.Document; + + +@Document(collection = "user_buried_point") +public class BuriedPoint { + + @JsonProperty(value = "channelUserId") + private String channelUserId; + + @JsonProperty(value = "channel") + private String channel; + + @JsonProperty(value = "userId") + private int userId; + + @JsonProperty(value = "point") + private String point; + + public String getChannelUserId() { + return channelUserId; + } + + public void setChannelUserId(String channelUserId) { + this.channelUserId = channelUserId; + } + + public String getChannel() { + return channel; + } + + public void setChannel(String channel) { + this.channel = channel; + } + + public int getUserId() { + return userId; + } + + public void setUserId(int userId) { + this.userId = userId; + } + + public String getPoint() { + return point; + } + + public void setPoint(String point) { + this.point = point; + } +} diff --git a/src/main/java/com/jmfy/model/CAutoIncrement.java b/src/main/java/com/jmfy/model/CAutoIncrement.java new file mode 100644 index 0000000..88c5349 --- /dev/null +++ b/src/main/java/com/jmfy/model/CAutoIncrement.java @@ -0,0 +1,42 @@ +package com.jmfy.model; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; +import org.springframework.data.mongodb.core.mapping.Field; + + +@Document(collection="inc_c") +public class CAutoIncrement { + @Id + private String name; + + @Field(value = "uid") + private int uid; + + @Field(value = "server_id") + private int server_id; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getUid() { + return uid; + } + + public void setUid(int uid) { + this.uid = uid; + } + + public int getServer_id() { + return server_id; + } + + public void setServer_id(int server_id) { + this.server_id = server_id; + } +} diff --git a/src/main/java/com/jmfy/model/CDataBaseVersion.java b/src/main/java/com/jmfy/model/CDataBaseVersion.java new file mode 100644 index 0000000..9198818 --- /dev/null +++ b/src/main/java/com/jmfy/model/CDataBaseVersion.java @@ -0,0 +1,24 @@ +package com.jmfy.model; + +public class CDataBaseVersion { + + + private int version; + private String tables; + + public CDataBaseVersion(int version) { + this.version = version; + this.tables = ""; + } + + public CDataBaseVersion() { + } + + public int getVersion() { + return version; + } + + public String getTables() { + return tables; + } +} diff --git a/src/main/java/com/jmfy/model/CoreServerList.java b/src/main/java/com/jmfy/model/CoreServerList.java new file mode 100644 index 0000000..69a7617 --- /dev/null +++ b/src/main/java/com/jmfy/model/CoreServerList.java @@ -0,0 +1,55 @@ +package com.jmfy.model; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; +import org.springframework.data.mongodb.core.mapping.Field; + +/** + * Created by Administrator on 2017/8/11. + */ +@Document(collection="server_info") +public class CoreServerList { + @Id + private String _id;//ID + + @Field(value = "name") + private String name;//name + + @Field(value = "ip") + private String ip; + + @Field(value = "port") + private String port; + + public String get_id() { + return _id; + } + + public void set_id(String _id) { + this._id = _id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public String getPort() { + return port; + } + + public void setPort(String port) { + this.port = port; + } +} \ No newline at end of file diff --git a/src/main/java/com/jmfy/model/CoreUserInfo.java b/src/main/java/com/jmfy/model/CoreUserInfo.java new file mode 100644 index 0000000..3af38f9 --- /dev/null +++ b/src/main/java/com/jmfy/model/CoreUserInfo.java @@ -0,0 +1,68 @@ +package com.jmfy.model; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; +import org.springframework.data.mongodb.core.mapping.Field; + +import java.util.HashMap; +import java.util.Map; + +@Document(collection="user_info") +public class CoreUserInfo { + + @Id + private String id; + + @Field(value = "openId") + private String openId; + + @Field(value = "uid") + private int uid; + + @Field(value = "serverId") + private int serverid; + + @Field(value = "area") + private int area; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getOpenId() { + return openId; + } + + public void setOpenId(String openId) { + this.openId = openId; + } + + public int getUid() { + return uid; + } + + public void setUid(int uid) { + this.uid = uid; + } + + public int getServerid() { + return serverid; + } + + public void setServerid(int serverid) { + this.serverid = serverid; + } + + public int getArea() { + return area; + } + + public void setArea(int area) { + this.area = area; + } +} + diff --git a/src/main/java/com/jmfy/model/GSPlayerManagerBean.java b/src/main/java/com/jmfy/model/GSPlayerManagerBean.java new file mode 100644 index 0000000..6ea1914 --- /dev/null +++ b/src/main/java/com/jmfy/model/GSPlayerManagerBean.java @@ -0,0 +1,321 @@ +package com.jmfy.model; + + +import java.util.HashMap; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.CopyOnWriteArraySet; + + +public class GSPlayerManagerBean { + + private String openId; + + private String nickName; + + private int level; + + private int exp; + + private int vipLevel; + + private String head; + + private int mapId; + + private long createTime; //创建时间 + + private String clientVersion; + + private int maxStamina ; // 最大体力 + + private long offLineTime;// 离线时间 + + private long loginTime; + + private int hadTakeLevelBoxVip; //领取vip等级礼包 + + private int hadTakeDailyBoxVip=-1; //领取vip每日礼包 + + private int maxForce; //玩家历史最高战力 + + private Map guidePoints = new HashMap<>(); + + private Map vipInfo = new HashMap<>(); + + private Set reds = new CopyOnWriteArraySet<>(); + + private GSRechargeInfoBean rechargeInfo; + + private int headFrame; + + private int treasureScore; //孙龙的宝藏分数 + + private int hadBuyTreasure; //是否已购 + + private int guildId ;// 公会id + + private int sign;//月签到天数 + + private int signTotay;//今天是否签到 + + private int rechargedaily; + + private long onlineTime; + + private int isdayFirst = 0;//给客户端记录下 + + private Set fixIds = new CopyOnWriteArraySet<>(); + + private int sendDays; + + private Map onlineTimeOfDay = new HashMap<>(); // 20190808 + + public String getOpenId() { + return openId; + } + + public void setOpenId(String openId) { + this.openId = openId; + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public int getLevel() { + return level; + } + + public void setLevel(int level) { + this.level = level; + } + + public int getExp() { + return exp; + } + + public void setExp(int exp) { + this.exp = exp; + } + + public int getVipLevel() { + return vipLevel; + } + + public void setVipLevel(int vipLevel) { + this.vipLevel = vipLevel; + } + + public String getHead() { + return head; + } + + public void setHead(String head) { + this.head = head; + } + + public int getMapId() { + return mapId; + } + + public void setMapId(int mapId) { + this.mapId = mapId; + } + + public long getCreateTime() { + return createTime; + } + + public void setCreateTime(long createTime) { + this.createTime = createTime; + } + + public String getClientVersion() { + return clientVersion; + } + + public void setClientVersion(String clientVersion) { + this.clientVersion = clientVersion; + } + + public int getMaxStamina() { + return maxStamina; + } + + public void setMaxStamina(int maxStamina) { + this.maxStamina = maxStamina; + } + + public long getOffLineTime() { + return offLineTime; + } + + public void setOffLineTime(long offLineTime) { + this.offLineTime = offLineTime; + } + + public long getLoginTime() { + return loginTime; + } + + public void setLoginTime(long loginTime) { + this.loginTime = loginTime; + } + + public int getHadTakeLevelBoxVip() { + return hadTakeLevelBoxVip; + } + + public void setHadTakeLevelBoxVip(int hadTakeLevelBoxVip) { + this.hadTakeLevelBoxVip = hadTakeLevelBoxVip; + } + + public int getHadTakeDailyBoxVip() { + return hadTakeDailyBoxVip; + } + + public void setHadTakeDailyBoxVip(int hadTakeDailyBoxVip) { + this.hadTakeDailyBoxVip = hadTakeDailyBoxVip; + } + + public int getMaxForce() { + return maxForce; + } + + public void setMaxForce(int maxForce) { + this.maxForce = maxForce; + } + + public Map getGuidePoints() { + return guidePoints; + } + + public void setGuidePoints(Map guidePoints) { + this.guidePoints = guidePoints; + } + + public Map getVipInfo() { + return vipInfo; + } + + public void setVipInfo(Map vipInfo) { + this.vipInfo = vipInfo; + } + + public Set getReds() { + return reds; + } + + public void setReds(Set reds) { + this.reds = reds; + } + + public GSRechargeInfoBean getRechargeInfo() { + return rechargeInfo; + } + + public void setRechargeInfo(GSRechargeInfoBean rechargeInfo) { + this.rechargeInfo = rechargeInfo; + } + + public int getHeadFrame() { + return headFrame; + } + + public void setHeadFrame(int headFrame) { + this.headFrame = headFrame; + } + + public int getTreasureScore() { + return treasureScore; + } + + public void setTreasureScore(int treasureScore) { + this.treasureScore = treasureScore; + } + + public int getHadBuyTreasure() { + return hadBuyTreasure; + } + + public void setHadBuyTreasure(int hadBuyTreasure) { + this.hadBuyTreasure = hadBuyTreasure; + } + + public int getGuildId() { + return guildId; + } + + public void setGuildId(int guildId) { + this.guildId = guildId; + } + + public int getSign() { + return sign; + } + + public void setSign(int sign) { + this.sign = sign; + } + + public int getSignTotay() { + return signTotay; + } + + public void setSignTotay(int signTotay) { + this.signTotay = signTotay; + } + + public int getRechargedaily() { + return rechargedaily; + } + + public void setRechargedaily(int rechargedaily) { + this.rechargedaily = rechargedaily; + } + + public long getOnlineTime() { + return onlineTime; + } + + public void setOnlineTime(long onlineTime) { + this.onlineTime = onlineTime; + } + + public int getIsdayFirst() { + return isdayFirst; + } + + public void setIsdayFirst(int isdayFirst) { + this.isdayFirst = isdayFirst; + } + + public Set getFixIds() { + return fixIds; + } + + public void setFixIds(Set fixIds) { + this.fixIds = fixIds; + } + + public int getSendDays() { + return sendDays; + } + + public void setSendDays(int sendDays) { + this.sendDays = sendDays; + } + + public Map getOnlineTimeOfDay() { + return onlineTimeOfDay; + } + + public void setOnlineTimeOfDay(Map onlineTimeOfDay) { + this.onlineTimeOfDay = onlineTimeOfDay; + } +} diff --git a/src/main/java/com/jmfy/model/GSRechargeInfoBean.java b/src/main/java/com/jmfy/model/GSRechargeInfoBean.java new file mode 100644 index 0000000..94832c7 --- /dev/null +++ b/src/main/java/com/jmfy/model/GSRechargeInfoBean.java @@ -0,0 +1,97 @@ +package com.jmfy.model; + +import java.util.HashMap; +import java.util.Map; + +public class GSRechargeInfoBean { + + private int saveAmt;//累计充值 + private int isFirst; + private long createTime; + private int hadBuyFound; + private int isDayFirst; + + private Map levelBagMap = new HashMap<>(); + + private Map buyGoodsTimes = new HashMap<>(); + + private Map goodseDurationMap = new HashMap<>(); + + private Map goodseSendDailyMap = new HashMap<>(); + + public GSRechargeInfoBean(){ + + } + + public int getSaveAmt() { + return saveAmt; + } + + public void setSaveAmt(int saveAmt) { + this.saveAmt = saveAmt; + } + + public int getIsFirst() { + return isFirst; + } + + public void setIsFirst(int isFirst) { + this.isFirst = isFirst; + } + + public long getCreateTime() { + return createTime; + } + + public void setCreateTime(long createTime) { + this.createTime = createTime; + } + + public int getHadBuyFound() { + return hadBuyFound; + } + + public void setHadBuyFound(int hadBuyFound) { + this.hadBuyFound = hadBuyFound; + } + + public int getIsDayFirst() { + return isDayFirst; + } + + public void setIsDayFirst(int isDayFirst) { + this.isDayFirst = isDayFirst; + } + + public Map getLevelBagMap() { + return levelBagMap; + } + + public void setLevelBagMap(Map levelBagMap) { + this.levelBagMap = levelBagMap; + } + + public Map getBuyGoodsTimes() { + return buyGoodsTimes; + } + + public void setBuyGoodsTimes(Map buyGoodsTimes) { + this.buyGoodsTimes = buyGoodsTimes; + } + + public Map getGoodseDurationMap() { + return goodseDurationMap; + } + + public void setGoodseDurationMap(Map goodseDurationMap) { + this.goodseDurationMap = goodseDurationMap; + } + + public Map getGoodseSendDailyMap() { + return goodseSendDailyMap; + } + + public void setGoodseSendDailyMap(Map goodseSendDailyMap) { + this.goodseSendDailyMap = goodseSendDailyMap; + } +} diff --git a/src/main/java/com/jmfy/model/GSUser.java b/src/main/java/com/jmfy/model/GSUser.java new file mode 100644 index 0000000..9e2e38f --- /dev/null +++ b/src/main/java/com/jmfy/model/GSUser.java @@ -0,0 +1,30 @@ +package com.jmfy.model; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; +import org.springframework.data.mongodb.core.mapping.Field; + +@Document(collection = "user") +public class GSUser implements java.io.Serializable { + @Id + private int id; + + @Field(value = "playerManager") + private GSPlayerManagerBean playerManager; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public GSPlayerManagerBean getPlayerManager() { + return playerManager; + } + + public void setPlayerManager(GSPlayerManagerBean playerManager) { + this.playerManager = playerManager; + } +} diff --git a/src/main/java/com/jmfy/model/MainLevelManager.java b/src/main/java/com/jmfy/model/MainLevelManager.java new file mode 100644 index 0000000..1ba4a53 --- /dev/null +++ b/src/main/java/com/jmfy/model/MainLevelManager.java @@ -0,0 +1,13 @@ +package com.jmfy.model; + +public class MainLevelManager { + private int fightId; // 当前关卡id + + public int getFightId() { + return fightId; + } + + public void setFightId(int fightId) { + this.fightId = fightId; + } +} diff --git a/src/main/java/com/jmfy/model/MyKafkaProperties.java b/src/main/java/com/jmfy/model/MyKafkaProperties.java new file mode 100644 index 0000000..1f68059 --- /dev/null +++ b/src/main/java/com/jmfy/model/MyKafkaProperties.java @@ -0,0 +1,121 @@ +package com.jmfy.model; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Created by Marvin on 2017/9/20. + */ +@ConfigurationProperties(prefix = "kafka") +public class MyKafkaProperties { + + private String serversUri = "127.0.0.1:9092"; + + private String producerAcks = "all"; + + private int producerRetries = 0; + + private int producerBatchSize = 16384; + + private int producerLinger = 1; + + private int producerBufferMemory = 33554432; + + private String consumerGroupId = "ysj"; + + private boolean consumerEnableAutoCommit = true; + + private int consumerAutoCommitInterval = 1000; + + private int consumerSessionTimeout = 30000; + + private int consumerMaxPollRecords = 100; + + + public String getServersUri() { + return serversUri; + } + + public void setServersUri(String serversUri) { + this.serversUri = serversUri; + } + + public String getProducerAcks() { + return producerAcks; + } + + public void setProducerAcks(String producerAcks) { + this.producerAcks = producerAcks; + } + + public int getProducerRetries() { + return producerRetries; + } + + public void setProducerRetries(int producerRetries) { + this.producerRetries = producerRetries; + } + + public int getProducerBatchSize() { + return producerBatchSize; + } + + public void setProducerBatchSize(int producerBatchSize) { + this.producerBatchSize = producerBatchSize; + } + + public int getProducerLinger() { + return producerLinger; + } + + public void setProducerLinger(int producerLinger) { + this.producerLinger = producerLinger; + } + + public int getProducerBufferMemory() { + return producerBufferMemory; + } + + public void setProducerBufferMemory(int producerBufferMemory) { + this.producerBufferMemory = producerBufferMemory; + } + + public String getConsumerGroupId() { + return consumerGroupId; + } + + public void setConsumerGroupId(String consumerGroupId) { + this.consumerGroupId = consumerGroupId; + } + + public boolean isConsumerEnableAutoCommit() { + return consumerEnableAutoCommit; + } + + public void setConsumerEnableAutoCommit(boolean consumerEnableAutoCommit) { + this.consumerEnableAutoCommit = consumerEnableAutoCommit; + } + + public int getConsumerAutoCommitInterval() { + return consumerAutoCommitInterval; + } + + public void setConsumerAutoCommitInterval(int consumerAutoCommitInterval) { + this.consumerAutoCommitInterval = consumerAutoCommitInterval; + } + + public int getConsumerSessionTimeout() { + return consumerSessionTimeout; + } + + public void setConsumerSessionTimeout(int consumerSessionTimeout) { + this.consumerSessionTimeout = consumerSessionTimeout; + } + + public int getConsumerMaxPollRecords() { + return consumerMaxPollRecords; + } + + public void setConsumerMaxPollRecords(int consumerMaxPollRecords) { + this.consumerMaxPollRecords = consumerMaxPollRecords; + } +} diff --git a/src/main/java/com/jmfy/model/NettyProperties.java b/src/main/java/com/jmfy/model/NettyProperties.java new file mode 100644 index 0000000..dbd5261 --- /dev/null +++ b/src/main/java/com/jmfy/model/NettyProperties.java @@ -0,0 +1,105 @@ +package com.jmfy.model; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Created by justin on 14-8-2. + */ + +@ConfigurationProperties(prefix = "netty") +public class NettyProperties { + + private int tcpPort; + private int udpPort; + private String udpTargetIp; + private int udpTargetPort; + private int reconnectDelay=300000; + private int bossThreadCount=2; + private int workerThreadCount=2; + private int readTimeout=600; + private int writeTimeout=600; + private int allTimeout=1000; + + public NettyProperties(){} + + + public int getTcpPort() { + return tcpPort; + } + + public void setTcpPort(int tcpPort) { + this.tcpPort = tcpPort; + } + + public int getUdpPort() { + return udpPort; + } + + public void setUdpPort(int udpPort) { + this.udpPort = udpPort; + } + + public int getReconnectDelay() { + return reconnectDelay; + } + + public void setReconnectDelay(int reconnectDelay) { + this.reconnectDelay = reconnectDelay; + } + + public int getBossThreadCount() { + return bossThreadCount; + } + + public void setBossThreadCount(int bossThreadCount) { + this.bossThreadCount = bossThreadCount; + } + + public int getWorkerThreadCount() { + return workerThreadCount; + } + + public void setWorkerThreadCount(int workerThreadCount) { + this.workerThreadCount = workerThreadCount; + } + + public int getReadTimeout() { + return readTimeout; + } + + public void setReadTimeout(int readTimeout) { + this.readTimeout = readTimeout; + } + + public int getWriteTimeout() { + return writeTimeout; + } + + public void setWriteTimeout(int writeTimeout) { + this.writeTimeout = writeTimeout; + } + + public int getAllTimeout() { + return allTimeout; + } + + public void setAllTimeout(int allTimeout) { + this.allTimeout = allTimeout; + } + + public String getUdpTargetIp() { + return udpTargetIp; + } + + public void setUdpTargetIp(String udpTargetIp) { + this.udpTargetIp = udpTargetIp; + } + + public int getUdpTargetPort() { + return udpTargetPort; + } + + public void setUdpTargetPort(int udpTargetPort) { + this.udpTargetPort = udpTargetPort; + } +} diff --git a/src/main/java/com/jmfy/model/NoticeInfo.java b/src/main/java/com/jmfy/model/NoticeInfo.java new file mode 100644 index 0000000..a517fb2 --- /dev/null +++ b/src/main/java/com/jmfy/model/NoticeInfo.java @@ -0,0 +1,68 @@ +package com.jmfy.model; + + +/** + * + * @author Administrator + * @date 2015/8/13 + */ + +public class NoticeInfo { + + + private String _id; + private String content; + private String title; + private int leve; + private long startTime; + private long endTime; + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String get_id() { + return _id; + } + + public void set_id(String _id) { + this._id = _id; + } + + public int getLeve() { + return leve; + } + + public void setLeve(int leve) { + this.leve = leve; + } + + public long getStartTime() { + return startTime; + } + + public void setStartTime(long startTime) { + this.startTime = startTime; + } + + public long getEndTime() { + return endTime; + } + + public void setEndTime(long endTime) { + this.endTime = endTime; + } + +} diff --git a/src/main/java/com/jmfy/model/PlayerManager.java b/src/main/java/com/jmfy/model/PlayerManager.java new file mode 100644 index 0000000..ff4cc16 --- /dev/null +++ b/src/main/java/com/jmfy/model/PlayerManager.java @@ -0,0 +1,64 @@ +package com.jmfy.model; + +public class PlayerManager { + private String openId; + + private String nickName; + + private int level; + + private int maxForce; //玩家历史最高战力 + + private long createTime; //创建时间 + + + private RechargeInfo rechargeInfo; + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public int getLevel() { + return level; + } + + public void setLevel(int level) { + this.level = level; + } + + public int getMaxForce() { + return maxForce; + } + + public void setMaxForce(int maxForce) { + this.maxForce = maxForce; + } + + public RechargeInfo getRechargeInfo() { + return rechargeInfo; + } + + public void setRechargeInfo(RechargeInfo rechargeInfo) { + this.rechargeInfo = rechargeInfo; + } + + public String getOpenId() { + return openId; + } + + public void setOpenId(String openId) { + this.openId = openId; + } + + public long getCreateTime() { + return createTime; + } + + public void setCreateTime(long createTime) { + this.createTime = createTime; + } +} diff --git a/src/main/java/com/jmfy/model/RechargeInfo.java b/src/main/java/com/jmfy/model/RechargeInfo.java new file mode 100644 index 0000000..9ba99a5 --- /dev/null +++ b/src/main/java/com/jmfy/model/RechargeInfo.java @@ -0,0 +1,13 @@ +package com.jmfy.model; + +public class RechargeInfo { + private double saveAmt;//累计充值 + + public double getSaveAmt() { + return saveAmt; + } + + public void setSaveAmt(double saveAmt) { + this.saveAmt = saveAmt; + } +} diff --git a/src/main/java/com/jmfy/model/RoleInfo.java b/src/main/java/com/jmfy/model/RoleInfo.java new file mode 100644 index 0000000..5ebf91f --- /dev/null +++ b/src/main/java/com/jmfy/model/RoleInfo.java @@ -0,0 +1,46 @@ +package com.jmfy.model; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class RoleInfo { + @JsonProperty(value = "Partition") + private int partition; + @JsonProperty(value = "RoleId") + private int roleId; + @JsonProperty(value = "openId") + private String openId; + @JsonProperty(value = "Level") + private int level; + + public int getPartition() { + return partition; + } + + public void setPartition(int partition) { + this.partition = partition; + } + + public String getOpenId() { + return openId; + } + + public void setOpenId(String openId) { + this.openId = openId; + } + + public int getLevel() { + return level; + } + + public void setLevel(int level) { + this.level = level; + } + + public int getRoleId() { + return roleId; + } + + public void setRoleId(int roleId) { + this.roleId = roleId; + } +} diff --git a/src/main/java/com/jmfy/model/ServerInfo.java b/src/main/java/com/jmfy/model/ServerInfo.java new file mode 100644 index 0000000..43aaab3 --- /dev/null +++ b/src/main/java/com/jmfy/model/ServerInfo.java @@ -0,0 +1,277 @@ +package com.jmfy.model; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; +import org.springframework.data.mongodb.core.mapping.Field; + +/** + * + * @author Administrator + * @date 2015/8/13 + */ + +@Document(collection = "server_info") +public class ServerInfo { + @Id + private int _id; + + @Field(value = "server_id") + private int server_id; + + @Field(value = "real_server_id") + private int realServerId; + + @Field(value = "IP") + private String IP; + + @Field(value = "port") + private Integer port; + + @Field(value = "name") + private String name; + + @Field(value = "type") + private int type; + + @Field(value = "open_time") + private long open_time; + /* 人工配置服务器状态:维护(1),流畅(2),拥挤(3),爆满(4) */ + @Field(value = "status") + private int status; + + @Field(value = "info") + private String serverInfo; + + @Field(value = "channel") + private String channel; + + @Field(value = "sub_channel") + private String sub_channel; + + @Field(value = "plat") + private String plat; + //0新服 1 为旧服 + @Field(value = "is_new") + private int is_new; + + @Field(value = "isWhite") + private int isWhite ; + /* 服务器状态判断类型:人工配置(0),服务器自动判断(1) */ + @Field(value = "status_type") + private int status_type; + /* 自动判断参数总注册阀值(人) */ + @Field(value = "total_server_register") + private int total_server_register; + /* 自动判断同时在线阀值上限(人) */ + @Field(value = "high_oniline") + private int high_oniline; + /* 自动判断同时在线阀值下限(人) */ + @Field(value = "low_online") + private int low_online; + /* 推荐状态判断类型:人工配置(0),服务器自动判断(1) */ + @Field(value = "commend_type") + private int commend_type; + /* 是否推荐服:否(0),是(1) */ + @Field(value = "is_ommend") + private int is_ommend; + /* 自动判断参数总注册阀值(人) */ + @Field(value = "total_register") + private int total_register; + /* 自动判断同时在线阀值(人) */ + @Field(value = "online_gate") + private int online_gate; + @Field(value = "mongo_url") + private String mongoUrl; + + public int get_id() { + return _id; + } + + public void set_id(int _id) { + this._id = _id; + } + + public int getServer_id() { + return server_id; + } + + public void setServer_id(int server_id) { + this.server_id = server_id; + } + + public String getIP() { + return IP; + } + + public void setIP(String IP) { + this.IP = IP; + } + + public Integer getPort() { + return port; + } + + public void setPort(Integer port) { + this.port = port; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getType() { + return type; + } + + public void setType(int type) { + this.type = type; + } + + public long getOpen_time() { + return open_time; + } + + public void setOpen_time(long open_time) { + this.open_time = open_time; + } + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + + public String getServerInfo() { + return serverInfo; + } + + public void setServerInfo(String serverInfo) { + this.serverInfo = serverInfo; + } + + public String getChannel() { + return channel; + } + + public void setChannel(String channel) { + this.channel = channel; + } + + public String getSub_channel() { + return sub_channel; + } + + public void setSub_channel(String sub_channel) { + this.sub_channel = sub_channel; + } + + public String getPlat() { + return plat; + } + + public void setPlat(String plat) { + this.plat = plat; + } + + public int getIs_new() { + return is_new; + } + + public void setIs_new(int is_new) { + this.is_new = is_new; + } + + public int getIsWhite() { + return isWhite; + } + + public void setIsWhite(int isWhite) { + this.isWhite = isWhite; + } + + public int getStatus_type() { + return status_type; + } + + public void setStatus_type(int status_type) { + this.status_type = status_type; + } + + public int getTotal_server_register() { + return total_server_register; + } + + public void setTotal_server_register(int total_server_register) { + this.total_server_register = total_server_register; + } + + public int getHigh_oniline() { + return high_oniline; + } + + public void setHigh_oniline(int high_oniline) { + this.high_oniline = high_oniline; + } + + public int getLow_online() { + return low_online; + } + + public void setLow_online(int low_online) { + this.low_online = low_online; + } + + public int getCommend_type() { + return commend_type; + } + + public void setCommend_type(int commend_type) { + this.commend_type = commend_type; + } + + public int getIs_ommend() { + return is_ommend; + } + + public void setIs_ommend(int is_ommend) { + this.is_ommend = is_ommend; + } + + public int getTotal_register() { + return total_register; + } + + public void setTotal_register(int total_register) { + this.total_register = total_register; + } + + public int getOnline_gate() { + return online_gate; + } + + public void setOnline_gate(int online_gate) { + this.online_gate = online_gate; + } + + public String getMongoUrl() { + return mongoUrl; + } + + public void setMongoUrl(String mongoUrl) { + this.mongoUrl = mongoUrl; + } + + public int getRealServerId() { + return realServerId; + } + + public void setRealServerId(int realServerId) { + this.realServerId = realServerId; + } +} diff --git a/src/main/java/com/jmfy/model/User.java b/src/main/java/com/jmfy/model/User.java new file mode 100644 index 0000000..d1e179c --- /dev/null +++ b/src/main/java/com/jmfy/model/User.java @@ -0,0 +1,39 @@ +package com.jmfy.model; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; +import org.springframework.data.mongodb.core.mapping.Field; + +@Document(collection="user") +public class User { + @Id + private Integer id; + @Field(value = "playerManager") + private PlayerManager playerManager; + @Field(value = "mainLevelManager") + private MainLevelManager mainLevelManager; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public PlayerManager getPlayerManager() { + return playerManager; + } + + public void setPlayerManager(PlayerManager playerManager) { + this.playerManager = playerManager; + } + + public MainLevelManager getMainLevelManager() { + return mainLevelManager; + } + + public void setMainLevelManager(MainLevelManager mainLevelManager) { + this.mainLevelManager = mainLevelManager; + } +} diff --git a/src/main/java/com/jmfy/model/WhiteList.java b/src/main/java/com/jmfy/model/WhiteList.java new file mode 100644 index 0000000..d7f8eb1 --- /dev/null +++ b/src/main/java/com/jmfy/model/WhiteList.java @@ -0,0 +1,65 @@ +package com.jmfy.model; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; +import org.springframework.data.mongodb.core.mapping.Field; + +/** + * Created by Administrator on 2017/8/11. + */ +@Document(collection="white_list") +public class WhiteList { + @Id + private String id;//ID + + @Field(value = "white_openid") + private String white_openid;//用户openId + + @Field(value = "plat") + private String plat;//用户平台 + + @Field(value = "channel") + private String channel;//用户渠道 微信 , 手q + @Field(value = "serverid") + private int serverid; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getWhite_openid() { + return white_openid; + } + + public void setWhite_openid(String white_openid) { + this.white_openid = white_openid; + } + + public String getPlat() { + return plat; + } + + public void setPlat(String plat) { + this.plat = plat; + } + + public String getChannel() { + return channel; + } + + public void setChannel(String channel) { + this.channel = channel; + } + + public int getServerid() { + return serverid; + } + + public void setServerid(int serverid) { + this.serverid = serverid; + } +} \ No newline at end of file diff --git a/src/main/java/com/jmfy/model/sdk/Order.java b/src/main/java/com/jmfy/model/sdk/Order.java new file mode 100644 index 0000000..8f68769 --- /dev/null +++ b/src/main/java/com/jmfy/model/sdk/Order.java @@ -0,0 +1,92 @@ +package com.jmfy.model.sdk; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.data.mongodb.core.mapping.Document; + +@Document(collection = "order") +public class Order { + + @JsonProperty(value = "id") + private String id; + + @JsonProperty(value = "orderId") + private String orderId; + + private int serverId; + + private String uid; + + private String productCode; + + private String productName; + + private String productCount; + + private String payTime; + + + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getOrderId() { + return orderId; + } + + public void setOrderId(String orderId) { + this.orderId = orderId; + } + + public int getServerId() { + return serverId; + } + + public void setServerId(int serverId) { + this.serverId = serverId; + } + + public String getUid() { + return uid; + } + + public void setUid(String uid) { + this.uid = uid; + } + + public String getProductCode() { + return productCode; + } + + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public String getProductCount() { + return productCount; + } + + public void setProductCount(String productCount) { + this.productCount = productCount; + } + + public String getPayTime() { + return payTime; + } + + public void setPayTime(String payTime) { + this.payTime = payTime; + } +} diff --git a/src/main/java/com/jmfy/model/sdk/RegisterUser.java b/src/main/java/com/jmfy/model/sdk/RegisterUser.java new file mode 100644 index 0000000..265fad4 --- /dev/null +++ b/src/main/java/com/jmfy/model/sdk/RegisterUser.java @@ -0,0 +1,30 @@ +package com.jmfy.model.sdk; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.data.mongodb.core.mapping.Document; + +@Document(collection = "user_register_info") +public class RegisterUser { + + @JsonProperty(value = "id") + private String id; + + @JsonProperty(value = "openId") + private String openId; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getOpenId() { + return openId; + } + + public void setOpenId(String openId) { + this.openId = openId; + } +} diff --git a/src/main/java/com/jmfy/model/sdk6kw/Order.java b/src/main/java/com/jmfy/model/sdk6kw/Order.java new file mode 100644 index 0000000..7f69278 --- /dev/null +++ b/src/main/java/com/jmfy/model/sdk6kw/Order.java @@ -0,0 +1,92 @@ +package com.jmfy.model.sdk6kw; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.data.mongodb.core.mapping.Document; + +@Document(collection = "order") +public class Order { + + @JsonProperty(value = "id") + private String id; + + @JsonProperty(value = "orderId") + private String orderId; + + private int serverId; + + private String uid; + + private String productCode; + + private String productName; + + private String productCount; + + private String payTime; + + + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getOrderId() { + return orderId; + } + + public void setOrderId(String orderId) { + this.orderId = orderId; + } + + public int getServerId() { + return serverId; + } + + public void setServerId(int serverId) { + this.serverId = serverId; + } + + public String getUid() { + return uid; + } + + public void setUid(String uid) { + this.uid = uid; + } + + public String getProductCode() { + return productCode; + } + + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public String getProductCount() { + return productCount; + } + + public void setProductCount(String productCount) { + this.productCount = productCount; + } + + public String getPayTime() { + return payTime; + } + + public void setPayTime(String payTime) { + this.payTime = payTime; + } +} diff --git a/src/main/java/com/jmfy/model/sdk6kw/RegisterUser.java b/src/main/java/com/jmfy/model/sdk6kw/RegisterUser.java new file mode 100644 index 0000000..6fec817 --- /dev/null +++ b/src/main/java/com/jmfy/model/sdk6kw/RegisterUser.java @@ -0,0 +1,30 @@ +package com.jmfy.model.sdk6kw; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.data.mongodb.core.mapping.Document; + +@Document(collection = "user_register_info") +public class RegisterUser { + + @JsonProperty(value = "id") + private String id; + + @JsonProperty(value = "openId") + private String openId; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getOpenId() { + return openId; + } + + public void setOpenId(String openId) { + this.openId = openId; + } +} diff --git a/src/main/java/com/jmfy/model/xiaomi/Order.java b/src/main/java/com/jmfy/model/xiaomi/Order.java new file mode 100644 index 0000000..5e8f706 --- /dev/null +++ b/src/main/java/com/jmfy/model/xiaomi/Order.java @@ -0,0 +1,92 @@ +package com.jmfy.model.xiaomi; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.data.mongodb.core.mapping.Document; + +@Document(collection = "order") +public class Order { + + @JsonProperty(value = "id") + private String id; + + @JsonProperty(value = "orderId") + private String orderId; + + private int serverId; + + private String uid; + + private String productCode; + + private String productName; + + private String productCount; + + private String payTime; + + + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getOrderId() { + return orderId; + } + + public void setOrderId(String orderId) { + this.orderId = orderId; + } + + public int getServerId() { + return serverId; + } + + public void setServerId(int serverId) { + this.serverId = serverId; + } + + public String getUid() { + return uid; + } + + public void setUid(String uid) { + this.uid = uid; + } + + public String getProductCode() { + return productCode; + } + + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public String getProductCount() { + return productCount; + } + + public void setProductCount(String productCount) { + this.productCount = productCount; + } + + public String getPayTime() { + return payTime; + } + + public void setPayTime(String payTime) { + this.payTime = payTime; + } +} diff --git a/src/main/java/com/jmfy/model/xiaomi/RegisterUser.java b/src/main/java/com/jmfy/model/xiaomi/RegisterUser.java new file mode 100644 index 0000000..755f8b1 --- /dev/null +++ b/src/main/java/com/jmfy/model/xiaomi/RegisterUser.java @@ -0,0 +1,30 @@ +package com.jmfy.model.xiaomi; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.data.mongodb.core.mapping.Document; + +@Document(collection = "user_register_info") +public class RegisterUser { + + @JsonProperty(value = "id") + private String id; + + @JsonProperty(value = "openId") + private String openId; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getOpenId() { + return openId; + } + + public void setOpenId(String openId) { + this.openId = openId; + } +} diff --git a/src/main/java/com/jmfy/modelVo/BaseVo.java b/src/main/java/com/jmfy/modelVo/BaseVo.java new file mode 100644 index 0000000..8f62ad3 --- /dev/null +++ b/src/main/java/com/jmfy/modelVo/BaseVo.java @@ -0,0 +1,39 @@ +package com.jmfy.modelVo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class BaseVo implements IBaseVo{ + + @JsonProperty(value = "state") + private int state; + + @JsonProperty(value = "data") + private Object data; + + @JsonProperty(value = "msg") + private String msg; + + public int getState() { + return state; + } + + public void setState(int state) { + this.state = state; + } + + public Object getData() { + return data; + } + + public void setData(Object data) { + this.data = data; + } + + public void setMsg(String msg) { + this.msg = msg; + } + + public String getMsg() { + return msg; + } +} diff --git a/src/main/java/com/jmfy/modelVo/IBaseVo.java b/src/main/java/com/jmfy/modelVo/IBaseVo.java new file mode 100644 index 0000000..35b736b --- /dev/null +++ b/src/main/java/com/jmfy/modelVo/IBaseVo.java @@ -0,0 +1,4 @@ +package com.jmfy.modelVo; + +public interface IBaseVo { +} diff --git a/src/main/java/com/jmfy/modelVo/MarkedVo.java b/src/main/java/com/jmfy/modelVo/MarkedVo.java new file mode 100644 index 0000000..bc051b5 --- /dev/null +++ b/src/main/java/com/jmfy/modelVo/MarkedVo.java @@ -0,0 +1,47 @@ +package com.jmfy.modelVo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class MarkedVo { + + @JsonProperty(value = "AreaId") + private String areaId; + @JsonProperty(value = "PlatId") + private String platId; + @JsonProperty(value = "Partition") + private String partition; + @JsonProperty(value = "OpenId") + private String openId; + + public String getAreaId() { + return areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getPlatId() { + return platId; + } + + public void setPlatId(String platId) { + this.platId = platId; + } + + public String getPartition() { + return partition; + } + + public void setPartition(String partition) { + this.partition = partition; + } + + public String getOpenId() { + return openId; + } + + public void setOpenId(String openId) { + this.openId = openId; + } +} diff --git a/src/main/java/com/jmfy/modelVo/PayVo.java b/src/main/java/com/jmfy/modelVo/PayVo.java new file mode 100644 index 0000000..39daa0f --- /dev/null +++ b/src/main/java/com/jmfy/modelVo/PayVo.java @@ -0,0 +1,224 @@ +package com.jmfy.modelVo; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.data.mongodb.core.mapping.Document; + +@Document(collection = "pay") +public class PayVo { + private String id; + private String openid; + private int uid; + private int region; //区服 + private String channel;// 渠道 + private int status;// 状态 + private int handlestatus;// 状态 + private String pay_item;// 状态 + private String billno;// 订单号 + private int money = 0;// 人民币 + private int amount; //支付金额 单位分 + @JsonProperty(value = "gameorderId") + private String gameorderId; + @JsonProperty(value = "cporderId") + private String cporderId=""; + private int level = 0; + private int vipLevel = 0; + private String creattime; + private String callbaktime; + private String handletime; + private String CurrencyCode; + private String payWay; //支付方式 百度:·付款渠道, 0表示为微信支付, 1表示支付宝支付, 2表示苹果支付, 3表示谷歌支付,4 表示onestore, 5 表示mycard, + private int sandbox; //是否是测试订单,1:是: 0:否 + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getOpenid() { + return openid; + } + + public void setOpenid(String openid) { + this.openid = openid; + } + + public int getUid() { + return uid; + } + + public void setUid(int uid) { + this.uid = uid; + } + + public int getRegion() { + return region; + } + + public void setRegion(int region) { + this.region = region; + } + + public String getChannel() { + return channel; + } + + public void setChannel(String channel) { + this.channel = channel; + } + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + + public int getHandlestatus() { + return handlestatus; + } + + public void setHandlestatus(int handlestatus) { + this.handlestatus = handlestatus; + } + + public String getBillno() { + return billno; + } + + public void setBillno(String billno) { + this.billno = billno; + } + + public int getMoney() { + return money; + } + + public void setMoney(int money) { + this.money = money; + } + + public int getAmount() { + return amount; + } + + public void setAmount(int amount) { + this.amount = amount; + } + + public String getGameorderId() { + return gameorderId; + } + + public void setGameorderId(String gameorderId) { + this.gameorderId = gameorderId; + } + + public String getCporderId() { + return cporderId; + } + + public void setCporderId(String cporderId) { + this.cporderId = cporderId; + } + + public int getLevel() { + return level; + } + + public void setLevel(int level) { + this.level = level; + } + + public int getVipLevel() { + return vipLevel; + } + + public void setVipLevel(int vipLevel) { + this.vipLevel = vipLevel; + } + + public String getCreattime() { + return creattime; + } + + public void setCreattime(String creattime) { + this.creattime = creattime; + } + + public String getCallbaktime() { + return callbaktime; + } + + public void setCallbaktime(String callbaktime) { + this.callbaktime = callbaktime; + } + + public String getHandletime() { + return handletime; + } + + public void setHandletime(String handletime) { + this.handletime = handletime; + } + + public String getPay_item() { + return pay_item; + } + + public void setPay_item(String pay_item) { + this.pay_item = pay_item; + } + + public String getCurrencyCode() { + return CurrencyCode; + } + + public void setCurrencyCode(String currencyCode) { + CurrencyCode = currencyCode; + } + + + public String getPayWay() { + return payWay; + } + + public void setPayWay(String payWay) { + this.payWay = payWay; + } + + public int getSandbox() { + return sandbox; + } + + public void setSandbox(int sandbox) { + this.sandbox = sandbox; + } + + public PayVo() { + } + + public PayVo(String openid, int uid, int region, String channel, String pay_item, String creattime, int money) { + this.openid = openid; + this.uid = uid; + this.region = region; + this.channel = channel; + this.pay_item = pay_item; + this.creattime = creattime; + this.money=money; + } + + public PayVo(String openid, int uid, int region, String channel, String pay_item, String creattime, int money,String CurrencyCode) { + this.openid = openid; + this.uid = uid; + this.region = region; + this.channel = channel; + this.pay_item = pay_item; + this.creattime = creattime; + this.money=money; + this.CurrencyCode = CurrencyCode; + } +} diff --git a/src/main/java/com/jmfy/modelVo/RoleListVo.java b/src/main/java/com/jmfy/modelVo/RoleListVo.java new file mode 100644 index 0000000..97fb194 --- /dev/null +++ b/src/main/java/com/jmfy/modelVo/RoleListVo.java @@ -0,0 +1,62 @@ +package com.jmfy.modelVo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class RoleListVo implements IBaseVo { + + @JsonProperty(value = "dsid") + private String dsid; + + @JsonProperty(value = "dsname") + private String dsname; + + @JsonProperty(value = "drid") + private String drid; + + @JsonProperty(value = "drname") + private String drname; + + @JsonProperty(value = "drlevel") + private String drlevel; + + + public String getDsid() { + return dsid; + } + + public void setDsid(String dsid) { + this.dsid = dsid; + } + + public String getDsname() { + return dsname; + } + + public void setDsname(String dsname) { + this.dsname = dsname; + } + + public String getDrid() { + return drid; + } + + public void setDrid(String drid) { + this.drid = drid; + } + + public String getDrname() { + return drname; + } + + public void setDrname(String drname) { + this.drname = drname; + } + + public String getDrlevel() { + return drlevel; + } + + public void setDrlevel(String drlevel) { + this.drlevel = drlevel; + } +} diff --git a/src/main/java/com/jmfy/modelVo/ServerListVo.java b/src/main/java/com/jmfy/modelVo/ServerListVo.java new file mode 100644 index 0000000..2545999 --- /dev/null +++ b/src/main/java/com/jmfy/modelVo/ServerListVo.java @@ -0,0 +1,33 @@ +package com.jmfy.modelVo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ServerListVo implements IBaseVo { + + @JsonProperty(value = "dsid") + private String dsid; + + @JsonProperty(value = "dsname") + private String dsname; + + public ServerListVo(String dsid, String dsname) { + this.dsid = dsid; + this.dsname = dsname; + } + + public String getDsid() { + return dsid; + } + + public void setDsid(String dsid) { + this.dsid = dsid; + } + + public String getDsname() { + return dsname; + } + + public void setDsname(String dsname) { + this.dsname = dsname; + } +} diff --git a/src/main/java/com/jmfy/modelVo/ServerRoleInfoVo.java b/src/main/java/com/jmfy/modelVo/ServerRoleInfoVo.java new file mode 100644 index 0000000..1c1d650 --- /dev/null +++ b/src/main/java/com/jmfy/modelVo/ServerRoleInfoVo.java @@ -0,0 +1,120 @@ +package com.jmfy.modelVo; + +import com.alibaba.fastjson.JSONObject; +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ServerRoleInfoVo implements IBaseVo { + + @JsonProperty(value = "dsid") + private String dsid; + @JsonProperty(value = "dsname") + private String dsname; + @JsonProperty(value = "droleid") + private String droleid; + @JsonProperty(value = "last_login_time") + private String last_login_time; + @JsonProperty(value = "online_time") + private String online_time; + @JsonProperty(value = "paynum") + private String paynum; + @JsonProperty(value = "pronum") + private String pronum; + @JsonProperty(value = "level") + private String level; + @JsonProperty(value = "fight_value") + private String fight_value; + @JsonProperty(value = "profession") + private String profession; + @JsonProperty(value = "profession_name") + private String profession_name; + + public String getDsid() { + + + return dsid; + } + + public void setDsid(String dsid) { + this.dsid = dsid; + } + + public String getDsname() { + return dsname; + } + + public void setDsname(String dsname) { + this.dsname = dsname; + } + + public String getDroleid() { + return droleid; + } + + public void setDroleid(String droleid) { + this.droleid = droleid; + } + + public String getLast_login_time() { + return last_login_time; + } + + public void setLast_login_time(String last_login_time) { + this.last_login_time = last_login_time; + } + + public String getOnline_time() { + return online_time; + } + + public void setOnline_time(String online_time) { + this.online_time = online_time; + } + + public String getPaynum() { + return paynum; + } + + public void setPaynum(String paynum) { + this.paynum = paynum; + } + + public String getPronum() { + return pronum; + } + + public void setPronum(String pronum) { + this.pronum = pronum; + } + + public String getLevel() { + return level; + } + + public void setLevel(String level) { + this.level = level; + } + + public String getFight_value() { + return fight_value; + } + + public void setFight_value(String fight_value) { + this.fight_value = fight_value; + } + + public String getProfession() { + return profession; + } + + public void setProfession(String profession) { + this.profession = profession; + } + + public String getProfession_name() { + return profession_name; + } + + public void setProfession_name(String profession_name) { + this.profession_name = profession_name; + } +} diff --git a/src/main/java/com/jmfy/modelVo/ServerRoleListVo.java b/src/main/java/com/jmfy/modelVo/ServerRoleListVo.java new file mode 100644 index 0000000..967ee4e --- /dev/null +++ b/src/main/java/com/jmfy/modelVo/ServerRoleListVo.java @@ -0,0 +1,29 @@ +package com.jmfy.modelVo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ServerRoleListVo implements IBaseVo { + + @JsonProperty(value = "dsid") + private String dsid; + + @JsonProperty(value = "dsname") + private String dsname; + + + public String getDsid() { + return dsid; + } + + public void setDsid(String dsid) { + this.dsid = dsid; + } + + public String getDsname() { + return dsname; + } + + public void setDsname(String dsname) { + this.dsname = dsname; + } +} diff --git a/src/main/java/com/jmfy/modelVo/xiaomi/XiaoMiNotifyResponse.java b/src/main/java/com/jmfy/modelVo/xiaomi/XiaoMiNotifyResponse.java new file mode 100644 index 0000000..d16cd6f --- /dev/null +++ b/src/main/java/com/jmfy/modelVo/xiaomi/XiaoMiNotifyResponse.java @@ -0,0 +1,18 @@ +package com.jmfy.modelVo.xiaomi; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.jmfy.modelVo.IBaseVo; + +public class XiaoMiNotifyResponse implements IBaseVo{ + + @JsonProperty(value = "errcode") + private int errcode; + + public int getErrcode() { + return errcode; + } + + public void setErrcode(int errcode) { + this.errcode = errcode; + } +} diff --git a/src/main/java/com/jmfy/netty/NettyServerAutoConfiguration.java b/src/main/java/com/jmfy/netty/NettyServerAutoConfiguration.java new file mode 100644 index 0000000..e5e2fd1 --- /dev/null +++ b/src/main/java/com/jmfy/netty/NettyServerAutoConfiguration.java @@ -0,0 +1,21 @@ +package com.jmfy.netty; + +import com.jmfy.model.NettyProperties; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +/** + * Created by justin on 14-8-2. + */ +@Configuration +@EnableConfigurationProperties(NettyProperties.class) +public class NettyServerAutoConfiguration { + + @Autowired + private NettyProperties nettyProperties; + + public NettyProperties getNettyProperties() { + return nettyProperties; + } +} diff --git a/src/main/java/com/jmfy/netty/UDPClient.java b/src/main/java/com/jmfy/netty/UDPClient.java new file mode 100644 index 0000000..ff07846 --- /dev/null +++ b/src/main/java/com/jmfy/netty/UDPClient.java @@ -0,0 +1,46 @@ +package com.jmfy.netty; + +import com.jmfy.netty.UDPClientChannelFactory; +import org.jboss.netty.bootstrap.ConnectionlessBootstrap; +import org.jboss.netty.buffer.ChannelBuffer; +import org.jboss.netty.buffer.DynamicChannelBuffer; +import org.jboss.netty.channel.Channel; +import org.jboss.netty.channel.socket.nio.NioDatagramChannelFactory; + +import java.net.InetSocketAddress; + +/** + * Created by Administrator on 2017/7/11. + */ +public class UDPClient { + + private ConnectionlessBootstrap bootstrap; + + private Channel channel; + + private InetSocketAddress address; + + public static UDPClient getInstance() { + return Instance.udpClient; + } + + public static class Instance { + private static UDPClient udpClient = new UDPClient(); + } + + public void start(String ip, int port,int localPort){ + //init the bootstrap + bootstrap=new ConnectionlessBootstrap(new NioDatagramChannelFactory()); + bootstrap.setPipelineFactory(new UDPClientChannelFactory()); + bootstrap.setOption("localAddress", new InetSocketAddress(localPort)); + channel=bootstrap.bind(); + address = new InetSocketAddress(ip,port); + } + + public void writebytes(byte[] bt){ + ChannelBuffer responseBuffer= new DynamicChannelBuffer(1000); + responseBuffer.writeBytes(bt); + channel.write(responseBuffer, address); + } + +} diff --git a/src/main/java/com/jmfy/netty/UDPClientChannelFactory.java b/src/main/java/com/jmfy/netty/UDPClientChannelFactory.java new file mode 100644 index 0000000..ad72d7b --- /dev/null +++ b/src/main/java/com/jmfy/netty/UDPClientChannelFactory.java @@ -0,0 +1,18 @@ +package com.jmfy.netty; + +import org.jboss.netty.channel.ChannelPipeline; +import org.jboss.netty.channel.ChannelPipelineFactory; +import org.jboss.netty.channel.Channels; + +/** + * Created by Administrator on 2017/7/11. + */ +public class UDPClientChannelFactory implements ChannelPipelineFactory { + + @Override + public ChannelPipeline getPipeline() throws Exception { + ChannelPipeline pipeline = Channels.pipeline(); + pipeline.addLast("handler", new UDPClientHandler()); + return pipeline; + } +} diff --git a/src/main/java/com/jmfy/netty/UDPClientHandler.java b/src/main/java/com/jmfy/netty/UDPClientHandler.java new file mode 100644 index 0000000..2e7e09c --- /dev/null +++ b/src/main/java/com/jmfy/netty/UDPClientHandler.java @@ -0,0 +1,34 @@ +package com.jmfy.netty; + +import org.jboss.netty.buffer.ChannelBuffer; +import org.jboss.netty.channel.ChannelHandlerContext; +import org.jboss.netty.channel.ExceptionEvent; +import org.jboss.netty.channel.MessageEvent; +import org.jboss.netty.channel.SimpleChannelUpstreamHandler; + +/** + * Created by Administrator on 2017/7/11. + */ +public class UDPClientHandler extends SimpleChannelUpstreamHandler { + + @Override + public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) + throws Exception { + + ChannelBuffer buffer = (ChannelBuffer)e.getMessage(); + byte[] recByte=buffer.copy().toByteBuffer().array(); + + String msg=new String(recByte); + System.out.println("UDPClient get msg from server : "+msg); + + + super.messageReceived(ctx, e); + } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) + throws Exception { + super.exceptionCaught(ctx, e); + } + +} diff --git a/src/main/java/com/jmfy/redisProperties/RedisAutoConfiguration.java b/src/main/java/com/jmfy/redisProperties/RedisAutoConfiguration.java new file mode 100644 index 0000000..ca71b9a --- /dev/null +++ b/src/main/java/com/jmfy/redisProperties/RedisAutoConfiguration.java @@ -0,0 +1,24 @@ +package com.jmfy.redisProperties; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +/** + * Created by Administrator on 2016/3/17. + */ +@Configuration(value = "redisAutoConfiguration") +@EnableConfigurationProperties(RedisProperties.class) +public class RedisAutoConfiguration { + + @Autowired + private com.jmfy.redisProperties.RedisProperties RedisProperties; + + public com.jmfy.redisProperties.RedisProperties getRedisProperties() { + return RedisProperties; + } + + public void setRedisProperties(com.jmfy.redisProperties.RedisProperties RedisProperties) { + RedisProperties = RedisProperties; + } +} diff --git a/src/main/java/com/jmfy/redisProperties/RedisProperties.java b/src/main/java/com/jmfy/redisProperties/RedisProperties.java new file mode 100644 index 0000000..9b0bb10 --- /dev/null +++ b/src/main/java/com/jmfy/redisProperties/RedisProperties.java @@ -0,0 +1,189 @@ +package com.jmfy.redisProperties; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Created by Administrator on 2016/3/17. + */ +@ConfigurationProperties(prefix = "spring.redis") +public class RedisProperties { + + private String host; + + private int port; + + private String password; + + private int expireTime; // 过期时间,单位分钟 + private int database ; + //连接耗尽时是否阻塞, false报异常,ture阻塞直到超时, 默认true + private boolean blockWhenExhausted; + //是否启用pool的jmx管理功能, 默认true + private boolean jmxEnabled; + //是否启用后进先出, 默认true + private boolean lifo; + //最大空闲连接数, 默认8个 + private int maxIdle; + //最大连接数, 默认8个 + private int maxTotal; + //获取连接时的最大等待毫秒数(如果设置为阻塞时BlockWhenExhausted),如果超时就抛异常, 小于零:阻塞不确定的时间, 默认-1 + private int maxWaitMillis; + //逐出连接的最小空闲时间 默认1800000毫秒(30分钟) + private long minEvictableIdleTimeMillis; + //最小空闲连接数, 默认0 + private int minIdle; + //每次逐出检查时 逐出的最大数目 如果为负数就是 : 1/abs(n), 默认3 + private int numTestsPerEvictionRun; + //对象空闲多久后逐出, 当空闲时间>该值 且 空闲连接>最大空闲数 时直接逐出,不再根据MinEvictableIdleTimeMillis判断 (默认逐出策略) + private long softMinEvictableIdleTimeMillis; + //在获取连接的时候检查有效性, 默认false + private boolean testOnBorrow; + //在空闲时检查有效性, 默认false + private boolean testWhileIdle; + //逐出扫描的时间间隔(毫秒) 如果为负数,则不运行逐出线程, 默认-1 + private int timeBetweenEvictionRunsMillis; + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host; + } + + public int getPort() { + return port; + } + + public void setPort(int port) { + this.port = port; + } + + public String getPassword() { + return password; + } + + public int getExpireTime() { + return expireTime; + } + + public void setExpireTime(int expireTime) { + this.expireTime = expireTime; + } + + public void setPassword(String password) { + this.password = password; + } + + public boolean isBlockWhenExhausted() { + return blockWhenExhausted; + } + + public void setBlockWhenExhausted(boolean blockWhenExhausted) { + this.blockWhenExhausted = blockWhenExhausted; + } + + public boolean isJmxEnabled() { + return jmxEnabled; + } + + public void setJmxEnabled(boolean jmxEnabled) { + this.jmxEnabled = jmxEnabled; + } + + public boolean isLifo() { + return lifo; + } + + public void setLifo(boolean lifo) { + this.lifo = lifo; + } + + public int getMaxIdle() { + return maxIdle; + } + + public void setMaxIdle(int maxIdle) { + this.maxIdle = maxIdle; + } + + public int getMaxTotal() { + return maxTotal; + } + + public void setMaxTotal(int maxTotal) { + this.maxTotal = maxTotal; + } + + public int getMaxWaitMillis() { + return maxWaitMillis; + } + + public void setMaxWaitMillis(int maxWaitMillis) { + this.maxWaitMillis = maxWaitMillis; + } + + public long getMinEvictableIdleTimeMillis() { + return minEvictableIdleTimeMillis; + } + + public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis) { + this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis; + } + + public int getMinIdle() { + return minIdle; + } + + public void setMinIdle(int minIdle) { + this.minIdle = minIdle; + } + + public int getNumTestsPerEvictionRun() { + return numTestsPerEvictionRun; + } + + public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) { + this.numTestsPerEvictionRun = numTestsPerEvictionRun; + } + + public long getSoftMinEvictableIdleTimeMillis() { + return softMinEvictableIdleTimeMillis; + } + + public void setSoftMinEvictableIdleTimeMillis(long softMinEvictableIdleTimeMillis) { + this.softMinEvictableIdleTimeMillis = softMinEvictableIdleTimeMillis; + } + + public boolean isTestOnBorrow() { + return testOnBorrow; + } + + public void setTestOnBorrow(boolean testOnBorrow) { + this.testOnBorrow = testOnBorrow; + } + + public boolean isTestWhileIdle() { + return testWhileIdle; + } + + public void setTestWhileIdle(boolean testWhileIdle) { + this.testWhileIdle = testWhileIdle; + } + + public int getTimeBetweenEvictionRunsMillis() { + return timeBetweenEvictionRunsMillis; + } + + public void setTimeBetweenEvictionRunsMillis(int timeBetweenEvictionRunsMillis) { + this.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis; + } + + public int getDatabase() { + return database; + } + + public void setDatabase(int database) { + this.database = database; + } +} diff --git a/src/main/java/com/jmfy/redisProperties/RedisUserKey.java b/src/main/java/com/jmfy/redisProperties/RedisUserKey.java new file mode 100644 index 0000000..35568c9 --- /dev/null +++ b/src/main/java/com/jmfy/redisProperties/RedisUserKey.java @@ -0,0 +1,71 @@ +package com.jmfy.redisProperties; + +public class RedisUserKey { + + public final static String Delimiter_colon = ":"; + public final static String Delimiter_len = "|"; + public final static String Delimiter_code = "#"; + public final static String CUser_Key = "CUser_Key"; + public final static String CUser_Online_Key = "CUser_Online_Key"; + public final static String CHero_Key = "CHero_Key"; + public final static String CItem_Key = "CItem_Key"; + public final static String KICK_Old_key = "Kick_Old_Key"; + public final static String CMail_Key = "CMail_Key"; + public final static String Barage_Key = "Barage_Key"; + public final static String Title_Key = "Title_Key"; + public final static String Clear_Chat_Key = "Clear_Chat_Key"; + public final static String SendAllSVR_key = "SendAllSVR_key"; + public final static String Clight_Key = "Clight_Key"; + public final static String Notice_key = "Notice_key"; + public final static String HeroRandSwitch = "HeroRandSwitch"; + public final static String Server_GM = "Server_GM"; + public final static String CMind_Key = "CMind_Key"; + + public final static String Kick_old_User_key = "Kick_old_User_key"; + /** value key:roleUid,value:CBanInfo*/ + public final static String CBanInfo_Key = "CBanInfo_Key"; + + public final static String BlackList_key = "BlackList_key"; + public final static String UserInfo_key = "UserInfo_key"; + public final static String CTeam_Pos_Key = "CTeam_Pos_Key"; + public final static String SystemMaill_key = "SystemMaill_key"; + public final static String SERVER_OPEN_TIME_KEY = "Server_Open_Time_Key"; + public final static String CUser_ServerInfo_Key = "CUser_ServerInfo"; + //玩家普通困难关卡 + public final static String CFight_Key = "CFight_Key"; + //天幻圣境 关卡 + public final static String CActivityCopyFight_Key = "CActivityCopyFight_Key"; + + /** + * hash key:roleUid,hashKey:heroUid,value:cHero + */ + public final static String Login_Server_Info = "Login_Server_Info"; + public final static String Server_Info = "Server_Info"; + public final static String Total_Register = "Total_Register"; + + //防沉迷 + public final static String Adti_Addict = "Adti_Addict"; + //用户世家id + public final static String USER_FAMILY_ID = "USER_FAMILY_ID"; + public final static String C_AccountInfo_Key = "C_AccountInfo_Key"; + + public final static String CArenaInfo_Key = "CArenaInfo_Key"; + + public final static String CFamily_Info_Key = "CFamily_Info_Key"; + + public final static String CUser_Chat = "CUser_Chat"; + + public final static String Ban_Chat = "Ban_Chat"; + + public final static String Notice_WhiteList_isOpen = "Notice_WhiteList_isOpen"; + //道聚城白名单 + public final static String Notice_White_List = "Notice_White_List"; + + + public final static String RedisRecordMQ = "RedisRecordMQ"; + + public static final String LOGIC_SERVER_INFO = "LOGIC_SERVER_INFO"; + +} + + diff --git a/src/main/java/com/jmfy/sdk/HmacSHA1Encryption.java b/src/main/java/com/jmfy/sdk/HmacSHA1Encryption.java new file mode 100644 index 0000000..ee8026d --- /dev/null +++ b/src/main/java/com/jmfy/sdk/HmacSHA1Encryption.java @@ -0,0 +1,79 @@ +package com.jmfy.sdk; + +import javax.crypto.Mac; +import javax.crypto.SecretKey; +import javax.crypto.spec.SecretKeySpec; + +public class HmacSHA1Encryption { + + + private static final String MAC_NAME = "HmacSHA1"; + private static final String ENCODING = "UTF-8"; + /** + * 使用 HMAC-SHA1 签名方法对对encryptText进行签名 + * @param encryptText 被签名的字符串 + * @param encryptKey 密钥 + * @return 返回被加密后的字符串 + * @throws Exception + */ + public static String hmacSHA1Encrypt( String encryptText, String encryptKey ) throws Exception + { + byte[] data = encryptKey.getBytes( ENCODING ); + // 根据给定的字节数组构造一个密钥,第二参数指定一个密钥算法的名称 + SecretKey secretKey = new SecretKeySpec( data, MAC_NAME ); + // 生成一个指定 Mac 算法 的 Mac 对象 + Mac mac = Mac.getInstance( MAC_NAME ); + // 用给定密钥初始化 Mac 对象 + mac.init( secretKey ); + byte[] text = encryptText.getBytes( ENCODING ); + // 完成 Mac 操作 + byte[] digest = mac.doFinal( text ); + StringBuilder sBuilder = bytesToHexString( digest ); + return sBuilder.toString(); + } + /** + * 转换成Hex + * + * @param bytesArray + */ + public static StringBuilder bytesToHexString( byte[] bytesArray ) + { + if ( bytesArray == null ) + { + return null; + } + StringBuilder sBuilder = new StringBuilder(); + for ( byte b : bytesArray ) + { + String hv = String.format("%02x", b); +// String hv = Integer.toHexString( b & 0xFF ); + sBuilder.append( hv ); + } + return sBuilder; + } + /** + * 使用 HMAC-SHA1 签名方法对对encryptText进行签名 + * + * @param encryptData 被签名的字符串 + * @param encryptKey 密钥 + * @return 返回被加密后的字符串 + * @throws Exception + */ + public static String hmacSHA1Encrypt( byte[] encryptData, String encryptKey ) throws Exception + { + byte[] data = encryptKey.getBytes( ENCODING ); + // 根据给定的字节数组构造一个密钥,第二参数指定一个密钥算法的名称 + SecretKey secretKey = new SecretKeySpec( data, MAC_NAME ); + // 生成一个指定 Mac 算法 的 Mac 对象 + Mac mac = Mac.getInstance( MAC_NAME ); + // 用给定密钥初始化 Mac 对象 + mac.init( secretKey ); + + // 完成 Mac 操作 + byte[] digest = mac.doFinal( encryptData ); + + StringBuilder sBuilder = bytesToHexString( digest ); + + return sBuilder.toString(); + } +} diff --git a/src/main/java/com/jmfy/sdk/HttpUtil.java b/src/main/java/com/jmfy/sdk/HttpUtil.java new file mode 100644 index 0000000..c7e2bf0 --- /dev/null +++ b/src/main/java/com/jmfy/sdk/HttpUtil.java @@ -0,0 +1,152 @@ +package com.jmfy.sdk; + +import java.io.*; +import java.net.HttpURLConnection; +import java.net.URL; + +public class HttpUtil { + + private static int connectionTimeOut = 30 * 1000; + private static int timeOut = 30 * 1000; + + /** + * http get 請求 + * @param urlString 請求地址 + * @return 返回的內容 + */ + public static String doGet(String urlString) { + InputStream is = null; + BufferedReader reader = null; + try { + URL url = new URL(urlString); + HttpURLConnection conn = (HttpURLConnection)url.openConnection(); + + conn.setRequestProperty("Accept-Charset", "utf-8"); + conn.setRequestProperty("Content-Type", "application/json"); + conn.setConnectTimeout(connectionTimeOut); + conn.setReadTimeout(timeOut); + + StringBuffer buffer = new StringBuffer(); + String line = null; + + conn.connect(); + is = conn.getInputStream(); +// inputStreamReader = new InputStreamReader(inputStream); + reader = new BufferedReader(new InputStreamReader(is)); + + while ((line = reader.readLine()) != null) { + buffer.append(line); + } + tryClose(is); + tryClose(reader); + return buffer.toString(); + + } catch (Exception e) { + e.printStackTrace(); + } + + return null; + } + private static void tryClose(InputStream is ) { + try{ + if( null != is ) { + is.close(); + is = null; + } + } catch( Exception e ) { + e.printStackTrace(); + } + } + + /** + * 关闭Reader + * @param reader + */ + private static void tryClose(java.io.Reader reader ) { + try{ + if( null != reader ) { + reader.close(); + reader = null; + } + } catch( Exception e ) { + e.printStackTrace(); + } + } + + + + + + + + + public static String sendPost(String url,String Params,String sign)throws IOException { + OutputStreamWriter out = null; + BufferedReader reader = null; + String response=""; + try { + URL httpUrl = null; //HTTP URL类 用这个类来创建连接 + //创建URL + httpUrl = new URL(url); + //建立连接 + HttpURLConnection conn = (HttpURLConnection) httpUrl.openConnection(); + conn.setRequestMethod("POST"); + conn.setRequestProperty("Content-Type", "application/json"); + conn.setRequestProperty("connection", "keep-alive"); + conn.setRequestProperty("AUTH6KW", sign); + + + + + conn.setUseCaches(false);//设置不要缓存 + conn.setInstanceFollowRedirects(true); + conn.setDoOutput(true); + conn.setDoInput(true); + conn.connect(); + //POST请求 + out = new OutputStreamWriter( + conn.getOutputStream()); + out.write(Params); + out.flush(); + //读取响应 + reader = new BufferedReader(new InputStreamReader( + conn.getInputStream())); + String lines; + while ((lines = reader.readLine()) != null) { + lines = new String(lines.getBytes(), "utf-8"); + response+=lines; + } + reader.close(); + // 断开连接 + conn.disconnect(); + + } catch (Exception e) { + System.out.println("发送 POST 请求出现异常!"+e); + e.printStackTrace(); + } + //使用finally块来关闭输出流、输入流 + finally{ + try{ + if(out!=null){ + out.close(); + } + if(reader!=null){ + reader.close(); + } + } + catch(IOException ex){ + ex.printStackTrace(); + } + } + + return response; + } + + + + + + + + +} diff --git a/src/main/java/com/jmfy/sdk/ParamUtil.java b/src/main/java/com/jmfy/sdk/ParamUtil.java new file mode 100644 index 0000000..793368b --- /dev/null +++ b/src/main/java/com/jmfy/sdk/ParamUtil.java @@ -0,0 +1,28 @@ +package com.jmfy.sdk; + +import java.util.Arrays; +import java.util.Map; + +public class ParamUtil { + /** + * 获取得到排序好的查询字符串 + * @param params 请求参数 + * @param + * @return + */ + public static String getSortQueryString(Map params) throws Exception { + + Object[] keys = params.keySet().toArray(); + Arrays.sort(keys); + StringBuffer sb = new StringBuffer(); + for(Object key : keys){ + sb.append(String.valueOf(key)).append("=").append(params.get(String.valueOf(key))).append("&"); + } + + String text = sb.toString(); + if(text.endsWith("&")) { + text=text.substring(0,text.length()-1); + } + return text; + } +} diff --git a/src/main/java/com/jmfy/sdk/SdkSign.java b/src/main/java/com/jmfy/sdk/SdkSign.java new file mode 100644 index 0000000..953d89e --- /dev/null +++ b/src/main/java/com/jmfy/sdk/SdkSign.java @@ -0,0 +1,40 @@ +package com.jmfy.sdk; + +import com.jmfy.util.Constant; + +import java.util.Arrays; +import java.util.Map; + +public class SdkSign { + + /** + * 获取得到排序好的查询字符串 + * + * @param params 请求参数 + * @return + */ + public static String getSortQueryString(Map params) throws Exception { + + Object[] keys = params.keySet().toArray(); + Arrays.sort(keys); + StringBuffer sb = new StringBuffer(); + for (Object key : keys) { + sb.append(String.valueOf(key)).append("=").append(params.get(String.valueOf(key))).append("&"); + } + + String text = sb.toString(); + if (text.endsWith("&")) { + text = text.substring(0, text.length() - 1); + } + return text; + } + + public static String xiaomiSign(Map params, String appSeecrrt) throws Exception { + String signString = ParamUtil.getSortQueryString(params); + return HmacSHA1Encryption.hmacSHA1Encrypt(signString, appSeecrrt); + } + + public static String xiaomiSign(String signString, String appSeecrrt) throws Exception { + return HmacSHA1Encryption.hmacSHA1Encrypt(signString, appSeecrrt); + } +} diff --git a/src/main/java/com/jmfy/sdk/SdkVerfy.java b/src/main/java/com/jmfy/sdk/SdkVerfy.java new file mode 100644 index 0000000..2b830b9 --- /dev/null +++ b/src/main/java/com/jmfy/sdk/SdkVerfy.java @@ -0,0 +1,570 @@ +package com.jmfy.sdk; + +import com.alibaba.fastjson.JSON; +import com.jmfy.util.Constant; +import com.jmfy.util.HttpUtil; +import com.jmfy.util.MD5Util; +import net.sf.json.JSONObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.crypto.BadPaddingException; +import javax.crypto.Cipher; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.NoSuchPaddingException; +import javax.crypto.spec.IvParameterSpec; +import javax.crypto.spec.SecretKeySpec; +import java.io.IOException; +import java.net.URLEncoder; +import java.security.InvalidAlgorithmParameterException; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.util.Arrays; +import java.util.Base64; +import java.util.HashMap; +import java.util.Map; + +import static com.jmfy.util.MD5Util.encrypByMd5; + +public class SdkVerfy { + + private static final Logger LOGGER = LoggerFactory.getLogger(SdkVerfy.class); + + public static String testVerfy() { + return "1111"; + } + + public static String quickVerfy(String uid, String token) { + try { + Map Quickparams = new HashMap<>(); + Quickparams.put("uid", uid); + Quickparams.put("token", token); + String path = Constant.QUICK_URL; + String quicjask = HttpUtil.appendQueryParams(path, Quickparams); + System.out.println(quicjask); + String resurl = HttpUtil.get(quicjask); + JSONObject jsonObject = JSONObject.fromObject(resurl); + System.out.println("quick " + jsonObject.toString()); + boolean getStatus = jsonObject.getBoolean("status"); + if (!getStatus) { + return "-1"; + } + return uid; + } catch (Exception ex) { + ex.printStackTrace(); + } + return "-1"; + } + + public static String xiaomiVerfy(String uid, String token) { + try { + Map params = new HashMap(); + //params.put("appId",String.valueOf(Constant.APP_ID)); + params.put("appId", Constant.XIAOMIAPPID); + params.put("uid", uid); + params.put("session", token); + String xiaomiSign = SdkSign.xiaomiSign(params, Constant.XIAOMIAPPSECRET); + params.put("signature", xiaomiSign); + String xiaoMIUrl = HttpUtil.appendQueryParams(Constant.XIAOMIVERIFYSESSIONURL, params); + String res = HttpUtil.get(xiaoMIUrl); + JSONObject xiaomires = JSONObject.fromObject(res); + System.out.println(xiaomires.toString()); + int errcode = xiaomires.getInt("errcode"); + if (errcode == 200) { + return uid; + } + } catch (Exception exception) { + exception.printStackTrace(); + } + return "-1"; + } + + public static String weiweiVerfy(String userId, String sdktoken) { + try { + // 请求参数 + Map params = new HashMap(); + params.put("user_id", userId); + params.put("token", sdktoken); + // String jsonStr = JSON.toJSONString(params); + String resurl = HttpUtil.postForm(Constant.WEIWEIVERIFYURL, params); + JSONObject jsonObject = JSONObject.fromObject(resurl); + System.out.println("res="+jsonObject.toString()); + // code状态为200时 登陆成功 其他为失败 + if (jsonObject.getInt("code") == 200) { + return userId; + } + } catch (Exception e) { + e.printStackTrace(); + } + return "-1"; + } + + public static String weiwei4366Verfy(String userId, String sdktoken) { +// try { +// // 请求参数 +// Map params = new HashMap(); +// params.put("user_id", userId); +// params.put("token", sdktoken); +// // String jsonStr = JSON.toJSONString(params); +// String resurl = HttpUtil.postForm(Constant.WEIWEI_4366_VERIFY_URL, params); +// JSONObject jsonObject = JSONObject.fromObject(resurl); +// System.out.println("res="+jsonObject.toString()); +// // code状态为200时 登陆成功 其他为失败 +// if (jsonObject.getInt("code") == 200) { +// return userId; +// } +// } catch (Exception e) { +// e.printStackTrace(); +// } +// return "-1"; + + + try { + // 请求参数 + Map params = new HashMap(); + params.put("access_token", sdktoken); + params.put("game_id", String.valueOf(Constant.WEIWEI_4366_GameID)); + String currentTimeMillis = Long.toString(System.currentTimeMillis()/100L); //时间戳 + params.put("timestamp", currentTimeMillis); + String signStr = sdktoken + currentTimeMillis + Constant.WEIWEI_4366_SECRET_KEY; + String urlString = URLEncoder.encode(signStr, "utf-8"); + String mySign=MD5Util.encrypByMd5(urlString); + LOGGER.info("signStr {} urlString {} mySign{}",signStr,urlString,mySign); + params.put("sign", mySign); + String resurl = HttpUtil.postForm(Constant.WEIWEI_4366_VERIFY_URL, params); + JSONObject jsonresObject = JSONObject.fromObject(resurl); + LOGGER.info("res="+jsonresObject.toString()); + // code状态为1时 登陆成功 其他为失败 + if (jsonresObject.getInt("code") == 1) { + return jsonresObject.getJSONObject("data").getString("user_id"); + } + } catch (Exception e) { + e.printStackTrace(); + } + return "-1"; + + + /* try { + String currentTimeMillis = Long.toString(System.currentTimeMillis()/100L); //时间戳 + //签名算法 md5( access_token + timestamp + secretKey) 其中+ 为字符串连接符,secretKey 即签名密钥,双方协商决定 除了签名校验,请做好时间戳的校验,保证登录链接只在一段时间内有效,如 1 分钟内 + String context = sdktoken + currentTimeMillis + Constant.WEIWEI_4366_SECRET_KEY; + String mySign = MD5Util.encrypByMd5(context); + + //应钦要求注释掉,说ios得不到sdksign,没办法传此参数 +// if (!mySign.equals(sdksign)) { +// LOGGER.error("sdk:verify:baiduVerfy,sign err, sign={},mySign={}", sdksign, mySign); +// return "-1"; +// } + + // 请求参数 + Map headers = new HashMap<>(); + headers.put("Content-Type", "application/x-www-form-urlencoded"); + String body = String.format("access_token=%s&game_id=%s×tamp=%s&sign=%s", sdktoken, Constant.WEIWEI_4366_GameID,currentTimeMillis, mySign); + String resurl = HttpUtil.fetch("POST", Constant.WEIWEI_4366_VERIFY_URL, body, headers); + JSONObject jsonObject = JSONObject.fromObject(resurl); + System.out.println("res="+jsonObject.toString()); + // 结果编号: -1参数错误或appid未审核;0 请求ip不在白名单或accesstoken过期;1 accesstoken合法有效 + if (jsonObject.getInt("code") == 1) { + return userId; + }else { + LOGGER.info("错误编号:" + jsonObject.getInt("code")); + } + } catch (Exception e) { + e.printStackTrace(); + } + return "-1";*/ + } + + /** + * 赤兔 + * @param userId + * @param sdktoken + * @return + */ + public static String chiTuVerfy(String userId,String sdksign, String sdktoken) { + try { + // 请求参数 +// Map params = new HashMap(); +// params.put("access_token", sdktoken); +// params.put("game_id", String.valueOf(Constant.CHITU_GAMEID)); +// String currentTimeMillis = Long.toString(System.currentTimeMillis()/100L); //时间戳 +// params.put("timestamp", currentTimeMillis); +// String signStr = sdktoken + currentTimeMillis + Constant.CHITU_SECRET_KEY; +// String urlString = URLEncoder.encode(signStr, "utf-8"); +// String mySign=MD5Util.encrypByMd5(urlString); +// LOGGER.info("signStr {} urlString {} mySign{}",signStr,urlString,mySign); +// params.put("sign", mySign); + //String resurl = HttpUtil.postForm(Constant.CHITU_VERIFY_URL, params); +// JSONObject jsonresObject = JSONObject.fromObject(resurl); +// LOGGER.info("res="+jsonresObject.toString()); + +// // code状态为1时 登陆成功 其他为失败 +// if (jsonresObject.getInt("code") == 1) { +// return jsonresObject.getJSONObject("data").getString("user_id"); +// } + + String signStr = userId + sdksign + Constant.CHITU_SECRET_KEY; + String urlString = URLEncoder.encode(signStr, "utf-8"); + String mySign=MD5Util.encrypByMd5(urlString); + + if(mySign.equals(sdktoken)){ + return userId; + } + } catch (Exception e) { + e.printStackTrace(); + } + return "-1"; + } + + /** + * 韩国正式 + * @param userId + * @param sdksign + * @param sdktoken + * @return + */ + public static String ilodVerfy(String userId,String sdksign, String sdktoken) { + try { + + // 请求参数 + Map params = new HashMap(); + params.put("projectId", Constant.ILOD_PROJECT_ID); + params.put("memberId", userId); + params.put("token", sdktoken); + + String resurl = HttpUtil.postForm(Constant.ILOD_LOGIN_VERIFY_URL, params); + + JSONObject jsonresObject = JSONObject.fromObject(resurl); + LOGGER.info("res="+jsonresObject.toString()); + + // code状态为1时 登陆成功 其他为失败 + if (jsonresObject.getInt("status") == 1) { + return userId; + } + + LOGGER.info("错误信息: status={},message={}",jsonresObject.getString("status"),jsonresObject.getString("message")); + return jsonresObject.getString("status"); + + } catch (Exception e) { + e.printStackTrace(); + } + return "-1"; + } + + public static String sixkwVerfy(String userId, String sessionID,String appId,String url,String exam) { + try { + + String requestUrl = url + appId ; + //apikey + //String exam = Constant.SIXKW_SECRET; + // 请求参数 + Map params = new HashMap(); + params.put("token", sessionID); + String jsonStr = JSON.toJSONString(params); + //sign + String sign = encrypByMd5("uscpcheck/" + appId + jsonStr + exam); + //请求 + LOGGER.info("requestUrl {} jsonStr {} sign {}", requestUrl, jsonStr, sign); + String result = com.jmfy.sdk.HttpUtil.sendPost(requestUrl, jsonStr, sign); + LOGGER.info(result); + com.alibaba.fastjson.JSONObject obj = JSON.parseObject(result); + int errcode = obj.getIntValue("code"); + if (1 == errcode) { + return obj.getJSONObject("data").getString("uid"); + } + } catch (Exception e) { + e.printStackTrace(); + } + return "-1"; + } + + /** + * 6kw聚合渠道 + * @param userId + * @param sessionID + * @return + */ + public static String sixkwOtherVerfy(String userId, String sessionID) { + try { + // 请求参数 + JSONObject jsonObject=new JSONObject(); + jsonObject.put("sid",sessionID); + jsonObject.put("username",userId); + String jsonbodye=jsonObject.toString(); + Map params = new HashMap(); + params.put("service", "sdk.game.checkenter"); + params.put("appid", String.valueOf(Constant.SIXKW_OTHER_APPID)); + params.put("data", jsonbodye); + String signStr=Constant.SIXKW_OTHER_APPID+"sdk.game.checkenter"+"sid="+sessionID+"&username="+userId+Constant.SIXKW_OTHER_LOGIN_SECRET; + String urlString = URLEncoder.encode(signStr, "utf-8"); + String sign=MD5Util.encrypByMd5(urlString); + LOGGER.info("signdate {} signres {} sign{}",signStr,urlString,sign); + params.put("sign", sign); + String resurl = HttpUtil.postForm(Constant.SIXKW_OTHER_VERIFY_URL, params); + JSONObject jsonresObject = JSONObject.fromObject(resurl); + LOGGER.info("res="+jsonresObject.toString()); + // code状态为200时 登陆成功 其他为失败 + if (jsonresObject.getJSONObject("state").getInt("code")==1) { + return jsonresObject.getJSONObject("data").getString("uid"); + } + } catch (Exception e) { + e.printStackTrace(); + } + return "-1"; + } + + public static String baiduVerfy(String userId,String sdktoken,String sdksign) { + try { + String context = Constant.BAIDU_APPID + sdktoken + Constant.BAIDU_SECRET_KEY; + String mySign = MD5Util.encrypByMd5(context); + + //应钦要求注释掉,说ios得不到sdksign,没办法传此参数 +// if (!mySign.equals(sdksign)) { +// LOGGER.error("sdk:verify:baiduVerfy,sign err, sign={},mySign={}", sdksign, mySign); +// return "-1"; +// } + + // 请求参数 + Map headers = new HashMap<>(); + headers.put("Content-Type", "application/x-www-form-urlencoded"); + //String body = "AppID=" + Constant.BAIDU_APPID + "&AccessToken=" + sdktoken + "&Sign=" + mySign; + String body = String.format("AppID=%s&AccessToken=%s&Sign=%s", Constant.BAIDU_APPID, sdktoken, mySign); + String resurl = HttpUtil.fetch("POST", Constant.BAIDU_VERIFY_URL, body, headers); + JSONObject jsonObject = JSONObject.fromObject(resurl); + LOGGER.info("res="+jsonObject.toString()); + // 结果编号: -1参数错误或appid未审核;0 请求ip不在白名单或accesstoken过期;1 accesstoken合法有效 + if (jsonObject.getInt("ResultCode") == 1) { + return userId; + }else { + LOGGER.info("错误编号:" + jsonObject.getInt("ResultCode")); + } + } catch (Exception e) { + e.printStackTrace(); + } + return "-1"; + } + + public static String baiduTestVerfy(String userId,String sdktoken,String sdksign) { + try { + String context = Constant.BAIDU_TEST_APPID + sdktoken + Constant.BAIDU_TEST_SECRET_KEY; + String mySign = MD5Util.encrypByMd5(context); + + //应钦要求注释掉,说ios得不到sdksign,没办法传此参数 +// if (!mySign.equals(sdksign)) { +// LOGGER.error("sdk:verify:baiduVerfy,sign err, sign={},mySign={}", sdksign, mySign); +// return "-1"; +// } + + // 请求参数 + Map headers = new HashMap<>(); + headers.put("Content-Type", "application/x-www-form-urlencoded"); + //String body = "AppID=" + Constant.BAIDU_APPID + "&AccessToken=" + sdktoken + "&Sign=" + mySign; + String body = String.format("AppID=%s&AccessToken=%s&Sign=%s", Constant.BAIDU_TEST_APPID, sdktoken, mySign); + String resurl = HttpUtil.fetch("POST", Constant.BAIDU_TEST_VERIFY_URL, body, headers); + JSONObject jsonObject = JSONObject.fromObject(resurl); + System.out.println("res="+jsonObject.toString()); + // 结果编号: -1参数错误或appid未审核;0 请求ip不在白名单或accesstoken过期;1 accesstoken合法有效 + if (jsonObject.getInt("ResultCode") == 1) { + return userId; + }else { + LOGGER.info("错误编号:" + jsonObject.getInt("ResultCode")); + } + } catch (Exception e) { + e.printStackTrace(); + } + return "-1"; + } + + /** + * 国内渠道QuickGame Android + * @param userId + * @param sdksign + * @param sdktoken + * @return + */ + public static String quickGameVerfy(String userId,String sdksign, String sdktoken) { + try { + // 请求参数 + Map params = new HashMap(); + params.put("product_code", Constant.PRODUCT_CODE); + params.put("uid", userId); + params.put("token", sdktoken); + + String resurl = HttpUtil.postForm(Constant.QUICK_LOGIN_VERIFY_URL, params); + LOGGER.info("res=" + resurl); + if(resurl.equals("1")){ + return userId; + } + } catch (Exception e) { + e.printStackTrace(); + } + return "-1"; + } + + /** + * 国内渠道QuickGame IOS + * @param userId + * @param sdksign + * @param sdktoken + * @return + */ + public static String quickGameVerfy_IOS(String userId,String sdksign, String sdktoken) { + try { + // 请求参数 + Map params = new HashMap(); + params.put("product_code", Constant.QUICK_IOS_PRODUCT_CODE); + params.put("uid", userId); + params.put("token", sdktoken); + + String resurl = HttpUtil.postForm(Constant.QUICK_IOS_QUICK_LOGIN_VERIFY_URL, params); + LOGGER.info("res=" + resurl); + Boolean status = JSON.parseObject(resurl).getBoolean("status"); + if(status){ + return userId; + }else { + LOGGER.info("res={},status={},message={}",resurl,status,JSON.parseObject(resurl).getString("message")); + } + } catch (Exception e) { + e.printStackTrace(); + } + return "-1"; + } + + /** + * 国内--九九互动渠道 + * @param userId + * @param sdksign 客户端 这个值传的是 appid值,因为appid值是变动的,所以需要客户端传 + * @param sdktoken + * @return + */ + public static String jjChannelVerfy(String userId,String sdksign, String sdktoken) { + try { + // 请求参数 + Map headers = new HashMap(); + headers.put("ContentType","application/x-www-form-urlencoded"); + + String body = String.format("appid=%s&mt_key=%s&fn_uid=%s", sdksign, sdktoken, userId); + + String resurl = HttpUtil.fetch("POST", Constant.JJCHANNEL_LOGIN_VERIFY_URL, body, headers); + + JSONObject jsonresObject = JSONObject.fromObject(resurl); + LOGGER.info("res="+jsonresObject.toString()); + // ret为 0成功,非0失败 + if (jsonresObject.getInt("ret") == 0) { + return jsonresObject.getJSONObject("data").getString("fn_uid"); + }else { + LOGGER.info("错误编号:" + jsonresObject.getInt("ret")); + } + } catch (Exception e) { + e.printStackTrace(); + } + return "-1"; + } + + /** + * 长尾渠道 + * @param userId + * @param sdksign + * @param sdktoken + * @return + */ + public static String changWeiGameVerify(String userId,String sdksign, String sdktoken) { + try { + // 请求参数 + Map params = new HashMap(); + params.put("token", sdktoken); + params.put("uid", userId); + params.put("product_code", Constant.CHANGWEI_PRODUCT_CODE); + + String resurl = HttpUtil.postForm(Constant.CHANGWEI_LOGIN_VERIFY_URL, params); + LOGGER.info("res=" + resurl); + if(resurl.equals("1")){ + return userId; + } + } catch (Exception e) { + e.printStackTrace(); + } + return "-1"; + } + + public static String xiaoQiVerify(String sdktoken, com.alibaba.fastjson.JSONObject returnResult) { + try { + // 请求参数 + Map params = new HashMap(); + String sign = MD5Util.encrypByMd5(Constant.X7_APP_KEY + sdktoken).toLowerCase(); + params.put("sign", sign); + params.put("tokenkey", sdktoken); + // String jsonStr = JSON.toJSONString(params); + String resurl = HttpUtil.postForm(Constant.X7_VERIFY_URL, params); + JSONObject jsonObject = JSONObject.fromObject(resurl); + LOGGER.info("res:{}", jsonObject.toString()); + // code状态为200时 登陆成功 其他为失败 + if (jsonObject.getInt("errorno") == 0) { + return jsonObject.getJSONObject("data").getString("guid"); + } + LOGGER.error("verify fail, errormsg:{}", jsonObject.getString("errormsg")); + returnResult.put("errMessage", jsonObject.getString("errormsg")); + return "-1"; + } catch (Exception e) { + e.printStackTrace(); + } + return "-1"; + } + + public static String aikenVerify(String sdkToken) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException { + SecretKeySpec keySpec = new SecretKeySpec(Constant.AIKEN_SERVER_KEY.getBytes(),"AES"); + Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); + cipher.init(Cipher.DECRYPT_MODE, keySpec, new IvParameterSpec(Constant.AIKEN_SERVER_KEY.getBytes())); + String decryptData = new String(cipher.doFinal(Base64.getDecoder().decode(sdkToken.replaceAll(" ", "+")))); + LOGGER.info("aiken verify, sdkToken:{}, decryptData:{}", sdkToken, decryptData); + return decryptData.split("\\|")[1]; + } + + public static String qianqianVerify(String userId, String sdkToken){ + Map params = new HashMap(); + params.put("userId", userId); + params.put("token", sdkToken); + params.put("appId", Constant.QIANQIAN_APP_ID); + try { + String res = HttpUtil.postForm(Constant.QIANQIAN_VERIFY_URL, params); + if (res.equals("1")){ + return userId; + } + } catch (IOException e) { + LOGGER.error("qianqian verify error, userId:{}", userId, e); + } + return "-1"; + } + + public static String quickVerify(String userId, String sdkToken){ + Map params = new HashMap(); + params.put("uid", userId); + params.put("token", sdkToken); + params.put("product_code", Constant.QUICK_PRODUCT_CODE); + try { + String res = HttpUtil.postForm(Constant.QUICK_VERIFY_URL, params); + if (res.equals("1")){ + return userId; + } + } catch (IOException e) { + LOGGER.error("quick verify error, userId:{}", userId, e); + } + return "-1"; + } + + public static String quickVerify2(String userId, String sdkToken){ + Map params = new HashMap(); + params.put("uid", userId); + params.put("token", sdkToken); + params.put("product_code", Constant.QUICK_PRODUCT_CODE_2); + try { + String res = HttpUtil.postForm(Constant.QUICK_VERIFY_URL_2, params); + if (res.equals("1")){ + return userId; + } + } catch (IOException e) { + LOGGER.error("quick verify error, userId:{}", userId, e); + } + return "-1"; + } +} diff --git a/src/main/java/com/jmfy/sdk/ServerDemo.java b/src/main/java/com/jmfy/sdk/ServerDemo.java new file mode 100644 index 0000000..e127e22 --- /dev/null +++ b/src/main/java/com/jmfy/sdk/ServerDemo.java @@ -0,0 +1,359 @@ +package com.jmfy.sdk; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.jmfy.Application; +import com.jmfy.dao.MongoConnectDao; +import com.jmfy.dao.PayDao; +import com.jmfy.dao.ServerListDao; +import com.jmfy.handler.PayHandler; +import com.jmfy.model.CoreServerList; +import com.jmfy.model.sdk.Order; +import com.jmfy.model.sdk.RegisterUser; +import com.jmfy.modelVo.MarkedVo; +import com.jmfy.modelVo.PayVo; +import com.jmfy.redisProperties.RedisUserKey; +import com.jmfy.util.Constant; +import com.jmfy.util.MD5Util; +import com.jmfy.util.RPCClient; +import com.jmfy.util.RedisUtil; +import com.jmfy.util.loginRedis.TimeUtil; +import com.ljsd.jieling.thrift.idl.Result; +import com.mongodb.BasicDBObject; +import com.mongodb.DBCollection; +import com.mongodb.DBObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.data.mongodb.core.query.Update; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.BufferedReader; +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Random; + +import static com.jmfy.util.MD5Util.encrypByMd5; + +@RestController +public class ServerDemo { + + public static final Logger LOGGER = LoggerFactory.getLogger(ServerDemo.class); + + private String verifySessionUrl = "https://uscpcheck.6kw.com/uscpcheck/"; + + private String queryOrderUrl = "http://mis.migc.sdk6kw.com/api/biz/service/queryOrder.do"; + + + private static final String _COLLECTION_NAME = "user_register_info"; + + private static final String _COLLECTION_NAME_Order = "order"; + + @Resource + private MongoConnectDao mongoConnectDao; + @Resource + private ServerListDao serverListDao; + @Resource + private PayDao payDao; + @Resource + private PayHandler payHandler; + /** + * 验证用户登录信息 + */ + //http://192.168.2.122:9076/idip/sfzb/6kw/verify?appId=***&token=*** + @RequestMapping(value = "/6kw/verify", method = {RequestMethod.GET, RequestMethod.POST}) + public void verify(String appId, String session, HttpServletResponse response) { + try { + String requestUrl = verifySessionUrl + appId; + //apikey + String exam = "415cef5fbd3335d753639855d3e4fe92"; + // 请求参数 + Map params = new HashMap(); + params.put("token", session); + String jsonStr = JSON.toJSONString(params); + //sign + String sign = encrypByMd5("uscpcheck/" + appId + jsonStr + exam); + //请求 + LOGGER.info("requestUrl {} jsonStr {} sign {}", requestUrl, jsonStr, sign); + String result = HttpUtil.sendPost(requestUrl, jsonStr, sign); + LOGGER.info(result); + JSONObject obj = JSON.parseObject(result); + int errcode = obj.getIntValue("code"); + if (1 == errcode) { + //注册流程 + String name = obj.getJSONObject("data").getString("uid"); + String password = "1"; + String openId; + //查询 + MongoTemplate mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + Query query = new Query(); + Criteria cr = new Criteria(); + cr.andOperator(Criteria.where("_id").is(name)); + query.addCriteria(cr); + RegisterUser registerUser = mongoTemplate.findOne(query, RegisterUser.class); + //是否注册过 + if (registerUser == null) { + String salt = "d13b3e8e`f74bf72d8aafce3a1c8672a0"; + String mySign = encrypByMd5(name + password + salt); + DBObject doc = new BasicDBObject(); + doc.put("_id", name); + doc.put("password", password); + int random = new Random(1024).nextInt(); + openId = encrypByMd5(mySign + random); + doc.put("openId", openId); + doc.put("regTime", TimeUtil.getTimeStamp(System.currentTimeMillis())); + //存储 + mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + DBCollection dBCollection = mongoTemplate.getCollection(_COLLECTION_NAME); + dBCollection.save(doc); + } else { + openId = registerUser.getOpenId(); + } + //登录流程 + JSONObject returnResult = new JSONObject(); + returnResult.put("openId", openId); + int myToken = new Random().nextInt(1024) + 10000; + returnResult.put("token", Integer.toString(myToken)); + RedisUtil.getInstence().putObject("JL_LOGIN_TOKEN", openId, myToken, -1); + LOGGER.info("/sdk6kw/verify openId {} token {}", returnResult.get("openId"), returnResult.get("token")); + + + response.setContentType("application/json"); + response.getOutputStream().write(returnResult.toJSONString().getBytes()); + return; + } + + + JSONObject obj1 = new JSONObject(); + obj1.put("errcode", errcode); + response.setContentType("application/json"); + response.getOutputStream().write(obj1.toJSONString().getBytes()); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + //http://192.168.2.122:9076/idip/sfzb/6kw/genOrder?uid=*** + //生成订单号 + @RequestMapping(value = "/6kw/genOrder", method = {RequestMethod.GET, RequestMethod.POST}) + public void genOrder(String uid, HttpServletResponse response) { + try { + String orderId = uid + getOrderIdByTime(); + MongoTemplate mongoTemplate; + DBObject doc = new BasicDBObject(); + //doc.put("_id", name); + doc.put("uid", uid); + doc.put("gameOrder", orderId); + //存储 + mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + DBCollection dBCollection = mongoTemplate.getCollection(_COLLECTION_NAME_Order); + dBCollection.save(doc); + + JSONObject returnResult = new JSONObject(); + returnResult.put("gameOrder", orderId); + LOGGER.info("/sdk6kw/verify uid {} gameOrder {}", uid, returnResult.get("gameOrder")); + + response.setContentType("application/json"); + response.getOutputStream().write(returnResult.toJSONString().getBytes()); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public static String getOrderIdByTime() { + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); + String newDate = sdf.format(new Date()); + String result = ""; + Random random = new Random(); + for (int i = 0; i < 3; i++) { + result += random.nextInt(10); + } + return newDate + result; + } + + + + + + /** + * 订单回调处理方法,用于接收平台发送的订单信息 + * + * @param request HttpServletRequest对象 + * @param response HttpServletResponse对象 + * @throws IOException + */ + //http://192.168.2.122:9076/idip/sfzb/6kw/notify + @RequestMapping(value = "/6kw/notify", method = {RequestMethod.GET, RequestMethod.POST}) + public String notify(HttpServletRequest request, HttpServletResponse response) throws IOException { + +// try{ +// processOrder(null); +// return; +// }catch(Exception e){ +// e.printStackTrace(); +// } + + JSONObject responseObj = new JSONObject(); + int resultCode = Constant.CODE_SUCCESS; + try { + BufferedReader br; + br = request.getReader(); + String str, wholeStr = ""; + while ((str = br.readLine()) != null) { + wholeStr += str; + } + String jsonStr = wholeStr; + String exam = "afd8f0ae75f31d0e338b3245b43ccd7f"; + String tmpSign = encrypByMd5(jsonStr + exam); + String sign = request.getHeader("AUTH6KW"); + + + LOGGER.info("notify jsonStr {} tmpSign {} sign {}", jsonStr, tmpSign, sign); + if (tmpSign.equals(sign)) { + try { + JSONObject obj = JSON.parseObject(jsonStr); + + Map map = new HashMap<>(); + map.put("extension", obj.getString("extension")); + map.put("gameOrder", obj.getString("gameOrder")); + map.put("orderID", obj.getString("orderID")); + map.put("productID", obj.getString("productID")); + map.put("roleID", obj.getString("roleID")); + map.put("serverID", obj.getString("serverID")); + map.put("total", obj.getString("total")); + map.put("uid", obj.getString("uid")); + + + //判断走新旧充值逻辑 + PayVo payVo = payDao.getOder(obj.getString("gameOrder")); + if (payVo != null) { + int payres = payHandler.processOrder(obj.getString("gameOrder"), obj.getString("orderID")); //orderId 游戏订单号 out_trade_no 渠道订单号 + // 成功 + if (payres == 1) { + return "SUCCESS"; + } else if (payres == -1) { + LOGGER.error("pay:gameNoticeInterface, {} 订单不存在,", obj.getString("gameOrder")); + } else if (payres == -2) { + LOGGER.error("pay:gameNoticeInterface, {} 订单参数错误,", obj.getString("gameOrder")); + } else if (payres == -3) { + LOGGER.error("pay:gameNoticeInterface, {} 服务器配置错误,", obj.getString("gameOrder")); + } else if (payres == -4) { + LOGGER.error("pay:gameNoticeInterface, {} 充值失败,", obj.getString("gameOrder")); + } else { + LOGGER.error("pay:gameNoticeInterface, {} 返回错误,", obj.getString("gameOrder")); + return "err"; + } + } + + //判断是否充值过 + MongoTemplate mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + Query query = new Query(); + Criteria cr = new Criteria(); + cr.andOperator(Criteria.where("gameOrder").is(map.get("gameOrder"))); + query.addCriteria(cr); + Order order = mongoTemplate.findOne(query, Order.class); + + resultCode = Constant.CODE_SYS_ERROR; + responseObj.put("errcode", resultCode); + if (order == null) { + LOGGER.info("订单不存在" + order); + responseObj.put("msg", "订单不存在"); + return responseObj.toString(); + } else if (order.getOrderId() != null) { + return "SUCCESS"; + } else { + boolean isSuccess = processOrder(map); + if (isSuccess) { + //记录订单信息到数据库 + Update update = new Update(); + update.set("orderId", map.get("orderID")); + update.set("payTime", System.currentTimeMillis()); + mongoTemplate.updateFirst(query, update, _COLLECTION_NAME_Order); + return "SUCCESS"; + } else { + resultCode = Constant.CODE_SYS_ERROR; + } + } + } catch (Exception e) { + e.printStackTrace(); + } + } else { + resultCode = Constant.CODE_SIGN_ERROR; + } + } catch (Exception e) { + resultCode = Constant.CODE_SYS_ERROR; + e.printStackTrace(); + } + + + return responseObj.toString(); + } + + + + // + private boolean processOrder(Map order) throws Exception { + //TODO: 订单处理逻辑由开发者自己处理,这里未实现 + + + System.out.println("order info " + order.toString()); + int serverId = Integer.valueOf(order.get("serverID")); + int uid = Integer.valueOf(order.get("roleID")); + String goodsId = order.get("productID"); + String openId = "0"; + String orderId = order.get("gameOrder"); + String cporderId = order.get("orderID"); + String total = order.get("total"); + long orderTime = System.currentTimeMillis(); + int amount = Integer.valueOf(order.get("total")); + + PayVo payVo = new PayVo(openId, uid, serverId, "6kw", goodsId, TimeUtil.getTimeStamp(System.currentTimeMillis()), Integer.valueOf(total)); + payVo.setBillno(orderId); + payVo.setStatus(1); + payVo.setCallbaktime(TimeUtil.getTimeStamp(System.currentTimeMillis())); + payVo.setCporderId(cporderId); + MongoTemplate mongoTemplate = mongoConnectDao.getConnect().getMongoTemplete(Application.coreDb); + mongoTemplate.insert(payVo); + + MarkedVo marked = new MarkedVo(); + marked.setPartition(String.valueOf(serverId)); + CoreServerList coreServerList = serverListDao.findServer(marked); + if (null == coreServerList) { + throw new Exception("应用不存在"); + } else { + String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(serverId), String.class, -1); + System.out.println("rpcString " + rpcString); + if (null == rpcString) { + throw new Exception("serverAddress not exist"); + } + String thriftIp = rpcString.split(":")[0]; + String thriftPort = rpcString.split(":")[3]; +// if(thriftPort.equals("7904")){ +// thriftPort="7905"; +// } + if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) { + throw new Exception("serverAddress not exist"); + } else { + Result result = RPCClient.deliveryRecharge(thriftIp, thriftPort, uid, goodsId, openId, orderId, orderTime, amount, ""); + if (result.getResultCode() != 1) { + throw new Exception(result.getResultMsg()); + } else { + System.out.println("pay " + orderId + " is ok "); + } + } + + } + + + return true; + } +} diff --git a/src/main/java/com/jmfy/server/ServerConfiguration.java b/src/main/java/com/jmfy/server/ServerConfiguration.java new file mode 100644 index 0000000..fd35ab9 --- /dev/null +++ b/src/main/java/com/jmfy/server/ServerConfiguration.java @@ -0,0 +1,21 @@ +package com.jmfy.server; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +/** + * Created by a on 2017/7/5. + */ +@Configuration(value = "serverConfiguration") +@EnableConfigurationProperties(ServerProperties.class) +public class ServerConfiguration { + + @Autowired + private ServerProperties serverProperties; + + public ServerProperties getServerProperties() { + return serverProperties; + } + +} diff --git a/src/main/java/com/jmfy/server/ServerProperties.java b/src/main/java/com/jmfy/server/ServerProperties.java new file mode 100644 index 0000000..a94b0db --- /dev/null +++ b/src/main/java/com/jmfy/server/ServerProperties.java @@ -0,0 +1,116 @@ +package com.jmfy.server; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Created by a on 2017/7/5. + */ +@ConfigurationProperties(prefix = "server") +public class ServerProperties { + + private int id; + + private String plat; + + private String channel; + + private int cacheTime; + + private int isLAN; + + private String coreAddressName; + + private String chatAddressName; + + private int chargeZone; + + private String coredb; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getPlat() { + return plat; + } + + public void setPlat(String plat) { + this.plat = plat; + } + + public String getChannel() { + return channel; + } + + public void setChannel(String channel) { + this.channel = channel; + } + + public int getCacheTime() { + return cacheTime; + } + + public void setCacheTime(int cacheTime) { + this.cacheTime = cacheTime; + } + + public int getIsLAN() { + return isLAN; + } + + public void setIsLAN(int isLAN) { + this.isLAN = isLAN; + } + + public String getCoreAddressName() { + return coreAddressName; + } + + public void setCoreAddressName(String coreAddressName) { + this.coreAddressName = coreAddressName; + } + + public String getChatAddressName() { + return chatAddressName; + } + + public void setChatAddressName(String chatAddressName) { + this.chatAddressName = chatAddressName; + } + + public int getChargeZone() { + return chargeZone; + } + + public void setChargeZone(int chargeZone) { + this.chargeZone = chargeZone; + } + + + public String getCoredb() { + return coredb; + } + + public void setCoredb(String coredb) { + this.coredb = coredb; + } + + @Override + public String toString() { + return "ServerProperties{" + + "id=" + id + + ", plat='" + plat + '\'' + + ", channel='" + channel + '\'' + + ", cacheTime=" + cacheTime + + ", isLAN=" + isLAN + + ", coreAddressName='" + coreAddressName + '\'' + + ", chatAddressName='" + chatAddressName + '\'' + + ", chargeZone=" + chargeZone + + ", coredb=" + coredb + + '}'; + } +} diff --git a/src/main/java/com/jmfy/thrift/pool/ClientAdapterPo.java b/src/main/java/com/jmfy/thrift/pool/ClientAdapterPo.java new file mode 100644 index 0000000..36edb09 --- /dev/null +++ b/src/main/java/com/jmfy/thrift/pool/ClientAdapterPo.java @@ -0,0 +1,61 @@ +package com.jmfy.thrift.pool; + + +import org.apache.commons.pool2.impl.GenericKeyedObjectPool; +import org.apache.thrift.protocol.TBinaryProtocol; +import org.apache.thrift.protocol.TProtocol; +import org.apache.thrift.transport.TTransport; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Created by Administrator on 2015/4/7. + */ +public class ClientAdapterPo { + + private static final Logger LOGGER = LoggerFactory.getLogger(ClientAdapterPo.class); + + private TTransport tTransport; + + private T client; + + private final static GenericKeyedObjectPool pool = ThriftPoolUtils.getInstance().getThriftPool(); + + public static ClientAdapterPo getClientAdapterPo(String key) throws Exception { + ClientAdapterPo clientPo = new ClientAdapterPo(); + TTransport transport = pool.borrowObject(key); + TProtocol protocol = new TBinaryProtocol(transport); + Object object = getClientByEnum(key, protocol); + clientPo.setClient(object); + clientPo.settTransport(transport); + return clientPo; + } + + private static Object getClientByEnum(String serviceKey, TProtocol protocol) { + String[] key = serviceKey.trim().split("\\|"); + if (key[0].equals(ServiceKey.RPCCore)) { + return new com.ljsd.jieling.thrift.idl.RPCRequestIFace.Client(protocol); + } + return null; + } + + + public void returnObject(String keyEnum) { + pool.returnObject(keyEnum, tTransport); + } + + private void settTransport(TTransport tTransport) { + this.tTransport = tTransport; + } + + public T getClient() { + return client; + } + + private void setClient(T client) { + this.client = client; + } + + private ClientAdapterPo() { + } +} diff --git a/src/main/java/com/jmfy/thrift/pool/ServiceKey.java b/src/main/java/com/jmfy/thrift/pool/ServiceKey.java new file mode 100644 index 0000000..ccfecac --- /dev/null +++ b/src/main/java/com/jmfy/thrift/pool/ServiceKey.java @@ -0,0 +1,11 @@ +package com.jmfy.thrift.pool; + +/** + * Created by Administrator on 2015/8/12. + */ +public class ServiceKey { + + public static final String RPCCore = "RPCCORE"; + + +} diff --git a/src/main/java/com/jmfy/thrift/pool/ThriftFactory.java b/src/main/java/com/jmfy/thrift/pool/ThriftFactory.java new file mode 100644 index 0000000..10c3100 --- /dev/null +++ b/src/main/java/com/jmfy/thrift/pool/ThriftFactory.java @@ -0,0 +1,130 @@ +package com.jmfy.thrift.pool; + +import org.apache.commons.pool2.BaseKeyedPooledObjectFactory; +import org.apache.commons.pool2.PooledObject; +import org.apache.commons.pool2.impl.DefaultPooledObject; +import org.apache.thrift.transport.TSocket; +import org.apache.thrift.transport.TTransport; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +/** + * ************************************************************************* + *

+ * Copyright (c) 15/2/9 justin + *

+ * The MIT License (MIT) + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + *

+ * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * ************************************************************************** + */ +@Component +public class ThriftFactory extends BaseKeyedPooledObjectFactory +{ + private static final Logger LOGGER = LoggerFactory.getLogger(ThriftFactory.class); + + + + @Override + public TTransport create(String serviceKey) throws Exception { + String[] key = serviceKey.trim().split("\\|"); + return create0(key[0],key[1],Integer.parseInt(key[2])); + } + + public TTransport create0(String key, String host, int port) throws Exception { + + TTransport transport = null; + + if (key.equals(ServiceKey.RPCCore)){ + transport = new TSocket(host, port); + } + + if (transport!=null){ + try{ + transport.open(); + }catch (Exception e){ + e.printStackTrace(); + transport = null; + LOGGER.error("connect failed, services is "+key); + } + }else{ + LOGGER.error("connect failed, services is "+key); + } + return transport; + } + + /** + * 这里我们销毁这个对象。不用这个对象了,这个方法得在业务使用过程中主动调用。 + * 在调用完这个方法过后,对象已经被销毁,但是在Object pool里面还是存在这个对象的 + * 只是这个对象是null而已。所以在调用完destroyObject过后,要记得把pool清空一下。 + */ + @Override + public void destroyObject(String key, PooledObject p) throws Exception { + + passivateObject(key,p); + p.markAbandoned(); + + super.destroyObject(key, p); + } + + /** + * 这里,在我们使用完每个对象过后,要做的就是归还,在归还后就要调用这个方法。 + * 简单的说,在还款凭证上面签个大名 + */ + @Override + public void passivateObject(String key, PooledObject p) throws Exception { + p.getObject().flush(); + p.getObject().close(); + super.passivateObject(key, p); + } + + /** + * 这里,在业务中第一次借对象的时候,这里要初始化一个,如果初始的都被借了,那就要继续初始 + * 这里创建的对象将被存到pool里面 + */ + @Override + public PooledObject makeObject(String key) throws Exception { + return super.makeObject(key); + } + + @Override + public PooledObject wrap(TTransport value) { + + return new DefaultPooledObject(value); + } + + @Override + public boolean validateObject(String key, PooledObject p) { + + if(p!=null && p.getObject().isOpen()){ + return true; + }else { + return false; + } + + } + + @Override + public void activateObject(String key, PooledObject p) throws Exception { + if (!p.getObject().isOpen()) { + p.getObject().open(); + } + super.activateObject(key, p); + } +} diff --git a/src/main/java/com/jmfy/thrift/pool/ThriftPoolAutoConfiguration.java b/src/main/java/com/jmfy/thrift/pool/ThriftPoolAutoConfiguration.java new file mode 100644 index 0000000..6ee40e9 --- /dev/null +++ b/src/main/java/com/jmfy/thrift/pool/ThriftPoolAutoConfiguration.java @@ -0,0 +1,75 @@ +package com.jmfy.thrift.pool; + + +import org.apache.commons.pool2.impl.GenericKeyedObjectPool; +import org.apache.commons.pool2.impl.GenericKeyedObjectPoolConfig; +import org.apache.thrift.transport.TTransport; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +/** + * ************************************************************************* + *

+ * Copyright (c) 15/2/9 justin + *

+ * The MIT License (MIT) + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + *

+ * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * ************************************************************************** + */ +@Configuration +@EnableConfigurationProperties(ThriftPoolSettings.class) +public class ThriftPoolAutoConfiguration { + + private static final Logger LOGGER = LoggerFactory.getLogger(ThriftPoolAutoConfiguration.class); + + @Autowired + private ThriftFactory thriftFactory; + + @Autowired + private ThriftPoolSettings thriftPoolSettings; + + + public GenericKeyedObjectPool thriftPool(){ + + GenericKeyedObjectPool pool = new GenericKeyedObjectPool(thriftFactory); + + GenericKeyedObjectPoolConfig config = new GenericKeyedObjectPoolConfig(); + config.setMaxTotal(thriftPoolSettings.getMaxTotal()); //整个池最大值 + config.setMaxTotalPerKey(thriftPoolSettings.getMaxTotalPerKey()); //每个key的最大 + config.setBlockWhenExhausted(thriftPoolSettings.isBlockWhenExhausted()); + config.setMinIdlePerKey(thriftPoolSettings.getMinIdlePerKey()); + config.setMaxIdlePerKey(thriftPoolSettings.getMaxIdlePerKey()); + config.setMaxWaitMillis(thriftPoolSettings.getMaxWaitMillis()); //获取不到永远等待 + config.setNumTestsPerEvictionRun(Integer.MAX_VALUE); // always test all idle objects + config.setTestOnBorrow(thriftPoolSettings.isTestOnBorrow()); + config.setTestOnReturn(thriftPoolSettings.isTestOnReturn()); + config.setTestWhileIdle(thriftPoolSettings.isTestWhileIdle()); + config.setTimeBetweenEvictionRunsMillis(thriftPoolSettings.getTimeBetweenEvictionRunsMillis()); //-1不启动。默认1min一次 + config.setMinEvictableIdleTimeMillis(thriftPoolSettings.getMinEvictableIdleTimeMillis()); //可发呆的时间,10mins + config.setTestWhileIdle(thriftPoolSettings.isTestWhileIdle()); //发呆过长移除的时候是否test一下先 + + pool.setConfig(config); +// LOGGER.debug("======> MaxTotal:" + thriftPoolSettings.getMaxTotal()); + return pool; + + } +} diff --git a/src/main/java/com/jmfy/thrift/pool/ThriftPoolSettings.java b/src/main/java/com/jmfy/thrift/pool/ThriftPoolSettings.java new file mode 100644 index 0000000..f338651 --- /dev/null +++ b/src/main/java/com/jmfy/thrift/pool/ThriftPoolSettings.java @@ -0,0 +1,143 @@ +package com.jmfy.thrift.pool; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * ************************************************************************* + *

+ * Copyright (c) 15/2/10 justin + *

+ * The MIT License (MIT) + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + *

+ * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * ************************************************************************** + */ + +@ConfigurationProperties(prefix = "services.pool") +public class ThriftPoolSettings { + + private int maxTotal = 700000; //整个池最大值 + private int maxTotalPerKey = 100000;//每个key的最大 + private boolean blockWhenExhausted = true; + private int minIdlePerKey = 0; + private int maxIdlePerKey = 0; + private int maxWaitMillis = -1;//获取不到永远等待 + private int numTestsPerEvictionRun = Integer.MAX_VALUE; // always test all idle objects + private boolean testOnBorrow = true; + private boolean testOnReturn = false; + private long timeBetweenEvictionRunsMillis = 1 * 6000L; //-1不启动。默认1min一次 + private long minEvictableIdleTimeMillis = 10 * 6000L;//可发呆的时间,10mins + private boolean testWhileIdle = false; //发呆过长移除的时候是否test一下先 + + + public int getMaxTotal() { + return maxTotal; + } + + public void setMaxTotal(int maxTotal) { + this.maxTotal = maxTotal; + } + + public int getMaxTotalPerKey() { + return maxTotalPerKey; + } + + public void setMaxTotalPerKey(int maxTotalPerKey) { + this.maxTotalPerKey = maxTotalPerKey; + } + + public boolean isBlockWhenExhausted() { + return blockWhenExhausted; + } + + public void setBlockWhenExhausted(boolean blockWhenExhausted) { + this.blockWhenExhausted = blockWhenExhausted; + } + + public int getMinIdlePerKey() { + return minIdlePerKey; + } + + public void setMinIdlePerKey(int minIdlePerKey) { + this.minIdlePerKey = minIdlePerKey; + } + + public int getMaxWaitMillis() { + return maxWaitMillis; + } + + public void setMaxWaitMillis(int maxWaitMillis) { + this.maxWaitMillis = maxWaitMillis; + } + + public int getNumTestsPerEvictionRun() { + return numTestsPerEvictionRun; + } + + public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) { + this.numTestsPerEvictionRun = numTestsPerEvictionRun; + } + + public boolean isTestOnBorrow() { + return testOnBorrow; + } + + public void setTestOnBorrow(boolean testOnBorrow) { + this.testOnBorrow = testOnBorrow; + } + + public boolean isTestOnReturn() { + return testOnReturn; + } + + public void setTestOnReturn(boolean testOnReturn) { + this.testOnReturn = testOnReturn; + } + + public long getTimeBetweenEvictionRunsMillis() { + return timeBetweenEvictionRunsMillis; + } + + public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis) { + this.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis; + } + + public long getMinEvictableIdleTimeMillis() { + return minEvictableIdleTimeMillis; + } + + public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis) { + this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis; + } + + public boolean isTestWhileIdle() { + return testWhileIdle; + } + + public void setTestWhileIdle(boolean testWhileIdle) { + this.testWhileIdle = testWhileIdle; + } + + public int getMaxIdlePerKey() { + return maxIdlePerKey; + } + + public void setMaxIdlePerKey(int maxIdlePerKey) { + this.maxIdlePerKey = maxIdlePerKey; + } +} diff --git a/src/main/java/com/jmfy/thrift/pool/ThriftPoolUtils.java b/src/main/java/com/jmfy/thrift/pool/ThriftPoolUtils.java new file mode 100644 index 0000000..b300ea0 --- /dev/null +++ b/src/main/java/com/jmfy/thrift/pool/ThriftPoolUtils.java @@ -0,0 +1,61 @@ +package com.jmfy.thrift.pool; + +import org.apache.commons.pool2.impl.GenericKeyedObjectPool; +import org.apache.thrift.transport.TTransport; +import org.springframework.context.ConfigurableApplicationContext; + +/** + * ************************************************************************* + *

+ * Copyright (c) 15/2/27 justin + *

+ * The MIT License (MIT) + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + *

+ * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * ************************************************************************** + */ +public class ThriftPoolUtils { + + private static ThriftPoolUtils instance; + private ConfigurableApplicationContext configurableApplicationContext; + + GenericKeyedObjectPool pool = null; + + private ThriftPoolUtils() {} + public static ThriftPoolUtils getInstance(){ + if (instance == null){ + instance = new ThriftPoolUtils(); + } + return instance; + } + public void initContext(ConfigurableApplicationContext configurableApplicationContext){ + this.configurableApplicationContext = configurableApplicationContext; + ThriftPoolAutoConfiguration thriftPool = configurableApplicationContext.getBean(ThriftPoolAutoConfiguration.class); + + pool = thriftPool.thriftPool(); + } + + /** + * 获取连接池 + * @return + */ + public GenericKeyedObjectPool getThriftPool(){ + return pool; + } + +} diff --git a/src/main/java/com/jmfy/thrift/services/core/config/CoreServerAutoConfiguration.java b/src/main/java/com/jmfy/thrift/services/core/config/CoreServerAutoConfiguration.java new file mode 100644 index 0000000..818680b --- /dev/null +++ b/src/main/java/com/jmfy/thrift/services/core/config/CoreServerAutoConfiguration.java @@ -0,0 +1,19 @@ +package com.jmfy.thrift.services.core.config; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +/** + * Created by Administrator on 2016/3/29. + */ +@Configuration +@EnableConfigurationProperties({CoreSettings.class}) +public class CoreServerAutoConfiguration { + @Autowired + private CoreSettings coreSettings; + + public CoreSettings getConfig(){ + return coreSettings; + } +} diff --git a/src/main/java/com/jmfy/thrift/services/core/config/CoreSettings.java b/src/main/java/com/jmfy/thrift/services/core/config/CoreSettings.java new file mode 100644 index 0000000..13870f7 --- /dev/null +++ b/src/main/java/com/jmfy/thrift/services/core/config/CoreSettings.java @@ -0,0 +1,56 @@ +package com.jmfy.thrift.services.core.config; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Created by Administrator on 2016/3/29. + */ +@ConfigurationProperties(prefix = "services.core") +public class CoreSettings { + + private String ip; + private int port; + private int area; + private int id; + private int weight; + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public int getWeight() { + return weight; + } + + public void setWeight(int weight) { + this.weight = weight; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public int getArea() { + return area; + } + + public void setArea(int area) { + this.area = area; + } + + public int getPort() { + return port; + } + + public void setPort(int port) { + this.port = port; + } +} diff --git a/src/main/java/com/jmfy/thrift/services/fight/config/FightServerAutoConfiguration.java b/src/main/java/com/jmfy/thrift/services/fight/config/FightServerAutoConfiguration.java new file mode 100644 index 0000000..d72ae6e --- /dev/null +++ b/src/main/java/com/jmfy/thrift/services/fight/config/FightServerAutoConfiguration.java @@ -0,0 +1,45 @@ +package com.jmfy.thrift.services.fight.config; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +/** + * ************************************************************************* + *

+ * Copyright (c) 15/2/10 justin + *

+ * The MIT License (MIT) + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + *

+ * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * ************************************************************************** + */ +@Configuration +@EnableConfigurationProperties({FightSettings.class}) +public class FightServerAutoConfiguration { + + @Autowired + private FightSettings fightSettings; + + + public FightSettings getConfig(){ + + + return fightSettings; + } +} diff --git a/src/main/java/com/jmfy/thrift/services/fight/config/FightSettings.java b/src/main/java/com/jmfy/thrift/services/fight/config/FightSettings.java new file mode 100644 index 0000000..a41e0ec --- /dev/null +++ b/src/main/java/com/jmfy/thrift/services/fight/config/FightSettings.java @@ -0,0 +1,43 @@ +package com.jmfy.thrift.services.fight.config; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * ************************************************************************* + *

+ * Copyright (c) 15/2/10 justin + *

+ * The MIT License (MIT) + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + *

+ * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * ************************************************************************** + */ + +@ConfigurationProperties(prefix = "services.fight") +public class FightSettings { + + private String key; + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } +} diff --git a/src/main/java/com/jmfy/util/AdapterKit.java b/src/main/java/com/jmfy/util/AdapterKit.java new file mode 100644 index 0000000..72038a9 --- /dev/null +++ b/src/main/java/com/jmfy/util/AdapterKit.java @@ -0,0 +1,223 @@ +package com.jmfy.util; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.*; + +/** + * Created by Administrator on 2015/7/15. + * proto 和 thrift 及实例化的对象相互转化时的一些适配工具类 + */ +public class AdapterKit { + + private static final Logger LOGGER = LoggerFactory.getLogger(AdapterKit.class); + + + public final static Map getMap(List values){ + Map map = new HashMap<>(); + if(values!=null) { + for (V value : values) { + map.put((K) value.getKey(), value); + } + } + return map; + } + + public final static List getList(Map map) { + List list = new ArrayList<>(); + for(V value : map.values()){ + list.add(value); + } + return list; + } + + public final static Map getMap(V[] values){ + Map map = new HashMap<>(); + if(values!=null) { + for (V value : values) { + map.put((K) value.getKey(), value); + } + } + return map; + } + + /** + * key 有顺序 + * @param values + * @param + * @param + * @return + */ + public final static ,V extends MapEntry>Map getNestingMap(List values){ + Map nestingMap = new HashMap<>(); + if(values!=null&&!values.isEmpty()&&values.get(0).getKey() instanceof List) { + List targetKeys = (List)values.get(0).getKey(); + int keySize = targetKeys.size(),index = 0,targetIndex = 0; + Map targetValueMap = null; + + for(V v:values){ + targetKeys = (List)v.getKey(); + for(index=0;index()); + } + targetValueMap = (Map)targetValueMap.get(targetIndex); + //否则是值 + }else{ + targetValueMap.put(targetIndex, v); + } + } + } + } + return nestingMap; + } + + public final static ,V extends MapEntry>Map getNestingListMap(List values){ + Map> nestingMap = new HashMap<>(); + if(values!=null&&!values.isEmpty()&&values.get(0).getKey() instanceof List) { + List targetKeys = (List)values.get(0).getKey(); + int keySize = targetKeys.size(),index = 0,targetIndex = 0; + Map targetValueMap = null; + List handleList = null; + + for(V v:values){ + targetKeys = (List)v.getKey(); + for(index=0;index()); + } + targetValueMap = (Map)targetValueMap.get(targetIndex); + //否则是值 + }else{ + handleList = (List)targetValueMap.get(targetIndex); + if(handleList==null) { + handleList = new ArrayList<>(); + targetValueMap.put(targetIndex,handleList); + } + handleList.add(v); + } + } + } + } + return nestingMap; + } + + + + public final static float getResultByFluma(String des,int level){ + int levelThree = (int)Math.pow(level,3); + int levelPow = (int)Math.pow(level,2); + String[] deses = des.split("#"); + if(deses.length<4) { + throw new RuntimeException("wrong Floma param : " + des); + } + float a = Float.parseFloat(deses[0]); + float b = Float.parseFloat(deses[1]); + float c = Float.parseFloat(deses[2]); + float d = Float.parseFloat(deses[3]); + return a*levelThree+b*levelPow+c*level+d; + } + /** + * @param des abcd计算公式系数 + * @param x 未知数 + * @return 获取到计算公式得到的值 + */ + public final static double getValueByLength(String des,int x){ + String []infos = des.split("#"); + double value = 0; + int size = infos.length; + for(int i = 0;iString linkString(String beforStr,String endStr,String spliteStr,Collection collection){ + StringBuilder sb = new StringBuilder(beforStr); + if(collection!=null&&!collection.isEmpty()){ + Iterator iterator = collection.iterator(); + boolean isFirst = true; + while(iterator.hasNext()){ + if (!isFirst){ + sb.append(spliteStr); + }else{ + isFirst=false; + } + sb.append(iterator.next().toString()); + } + } + sb.append(endStr); + return sb.toString(); + } + + public final static String linkString(String beforStr,String endStr,String spliteStr,E[] es){ + StringBuilder sb = new StringBuilder(beforStr); + if(es!=null&&es.length>0){ + boolean isFirst = true; + for(E e:es){ + if (!isFirst){ + sb.append(spliteStr); + }else{ + isFirst=false; + } + if(e instanceof Number){ + sb.append(((Number) e).intValue()); + }else{ + sb.append("\"" + e.toString() + "\""); + } + } + } + sb.append(endStr); + return sb.toString(); + } + public final static String linkString(String beforStr,String endStr,String spliteStr,int[] es){ + StringBuilder sb = new StringBuilder(beforStr); + if(es!=null&&es.length>0){ + boolean isFirst = true; + for(int e:es){ + if (!isFirst){ + sb.append(spliteStr); + }else{ + isFirst=false; + } + sb.append(e); + } + } + sb.append(endStr); + return sb.toString(); + } + + +} diff --git a/src/main/java/com/jmfy/util/Connect.java b/src/main/java/com/jmfy/util/Connect.java new file mode 100644 index 0000000..5aac01b --- /dev/null +++ b/src/main/java/com/jmfy/util/Connect.java @@ -0,0 +1,103 @@ +package com.jmfy.util; + +import com.jmfy.Application; +import com.mongodb.MongoClient; +import com.mongodb.MongoClientURI; +import com.mongodb.client.MongoIterable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.stereotype.Component; + +import javax.annotation.PostConstruct; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * @author Administrator + */ +@Component +public class Connect { + private static final Logger LOGGER = LoggerFactory.getLogger(Connect.class); + @Value("${spring.data.oldMongodb.uri}") + private String oldMongoClient; + @Value("${spring.data.mongodb.uri}") + private String newMongoClient; + private Map oldMongomaps = new ConcurrentHashMap<>(); + private Map newMongomaps = new ConcurrentHashMap<>(); + @PostConstruct + public void init() { + MongoClient mongoClient = new MongoClient(new MongoClientURI(oldMongoClient)); + MongoIterable databaseNames = mongoClient.listDatabaseNames(); + for (String dbName : databaseNames) { + LOGGER.info("oldMongomaps-->dbName={}", dbName); + MongoTemplate mongoTemplate = new MongoTemplate(mongoClient, dbName); + oldMongomaps.put(dbName, mongoTemplate); + } + initNewMongoClient(); + } + + private void initNewMongoClient() { + MongoClient mongoClient = new MongoClient(new MongoClientURI(newMongoClient)); + MongoIterable databaseNames = mongoClient.listDatabaseNames(); + for (String dbName : databaseNames) { + if (dbName.equals("ysj_core")){ + LOGGER.info("addMongoClinent-->newMongomaps={}",dbName); + MongoTemplate mongoTemplate = new MongoTemplate(mongoClient, dbName); + newMongomaps.put(dbName, mongoTemplate); + } + } + } + + public MongoTemplate getNewMongoTemplete(String dbName) throws Exception { + if (!newMongomaps.containsKey(dbName)) { + throw new Exception(dbName + " does not exist"); + } + MongoTemplate mongoTemplate = newMongomaps.get(dbName); + return mongoTemplate; + } + public MongoTemplate getMongoTemplete(String dbName) throws Exception { + MongoTemplate mongoTemplate; + if (Application.isLAN ==0){ + mongoTemplate = newMongomaps.get(dbName); + if (mongoTemplate == null){ + MongoClient mongoClient = new MongoClient(new MongoClientURI(newMongoClient)); + mongoTemplate = new MongoTemplate(mongoClient, dbName); + newMongomaps.put(dbName, mongoTemplate); + } + }else { + mongoTemplate = oldMongomaps.get(dbName); + if (mongoTemplate == null){ + MongoClient mongoClient = new MongoClient(new MongoClientURI(oldMongoClient)); + mongoTemplate = new MongoTemplate(mongoClient, dbName); + oldMongomaps.put(dbName, mongoTemplate); + } + } + return mongoTemplate; + } + + public boolean addMongoClinent(String mongoUrl,int serverId) { + boolean isSuccess = false; + String dbName = "ysj_"+serverId; + try { + MongoClient mongoClient = new MongoClient(new MongoClientURI(mongoUrl)); + MongoTemplate mongoTemplate = new MongoTemplate(mongoClient, dbName); + newMongomaps.put(dbName, mongoTemplate); + LOGGER.info("addMongoClinent-->dbName={}",dbName); + isSuccess =true; +// MongoIterable databaseNames = mongoClient.listDatabaseNames(); +// for (String dbName : databaseNames) { +// if (name.equals(dbName)){ +// LOGGER.info("addMongoClinent-->dbName={}",dbName); +// MongoTemplate mongoTemplate = new MongoTemplate(mongoClient, dbName); +// newMongomaps.put(dbName, mongoTemplate); +// isSuccess = true; +// } +// } + } catch (Exception e) { + LOGGER.info("msg=" + e); + } + return isSuccess; + } +} diff --git a/src/main/java/com/jmfy/util/Constant.java b/src/main/java/com/jmfy/util/Constant.java new file mode 100644 index 0000000..3d6bf08 --- /dev/null +++ b/src/main/java/com/jmfy/util/Constant.java @@ -0,0 +1,140 @@ +package com.jmfy.util; + +public class Constant { + + public static final long APP_ID = 2882303761517239138l; + + public static final String AppSecret = "N9nUNcpOAWpxVnbrfQB01A=="; + + public static final int CODE_SUCCESS = 200; + public static final int CODE_SYS_ERROR = 1001; + public static final int CODE_SIGN_ERROR = 1525; + + public static final String SALT="d13b3e8ef74bf72d8aafce3a1c8672a0"; + + //quick + public static final String QUICK_URL="http://sdk.api.monstergameplay.com/webapi/checkUserInfo"; + public static final String QUICK_KEY="56649255762004141203894112644440"; + + //小米 + public static final String XIAOMIAPPID = "2882303761519985783"; + public static final String XIAOMIAPPKEY = "5751998519783"; + public static final String XIAOMIAPPSECRET = "N9nUNcpOAWpxVnbrfQB01A=="; + public static final String XIAOMIVERIFYSESSIONURL = "http://mis.migc.xiaomi.com/api/biz/service/verifySession.do"; + public static final String XIAOMIQUERYORDERURL = "http://mis.migc.xiaomi.com/api/biz/service/queryOrder.do"; + + //唯唯 + public static final String WEIWEIVERIFYURL = "http://wwsdk.emiplay.com/api/login/verify"; //www.fzsyouxi.com 换成 wwsdk.emiplay.com + public static final String WEIWEIORDERKEY = "0358F7315A55AB17E8"; + + //唯唯4366 + public static final int WEIWEI_4366_GameID = 859; + public static final String WEIWEI_4366_VERIFY_URL = "https://api-pt.4366.com/user/cpToken"; //验证地址 + public static final String WEIWEI_4366_SECRET_KEY = "a7e554c4-9c5f-4511-a29b-5094ce6ff375"; //密钥 + + //赤兔 + public static final int CHITU_GAMEID = 1944; + public static final String CHITU_VERIFY_URL = ""; //验证地址 + public static final String CHITU_SECRET_KEY = "3dfaeca8d84ea9bd6289cb408181c99d"; //密钥 + + //韩国正式 + public static final String ILOD_GAMEID = "project-l-ff054"; + public static final String ILOD_VERIFY_URL = "project-l-ff054.appspot.com"; //验证地址 + public static final String ILOD_SECRET_KEY = "AIzaSyBJp4gqU_9vmcoLMupLSncxVYaJ-7zchcQ"; //密钥 + + public static final String ILOD_PROJECT_ID = "e17a069c-edad-4c31-8ad1-11faaa82e467"; //项目Id + public static final String ILOD_LOGIN_VERIFY_URL = "https://gamepot.apigw.ntruss.com/gpapps/v1/loginauth"; //登录验证地址 + //public static final String LOD_APPKEY = "q5TzYg9OSUVuZoYTD1GiV3jt"; + + //百度 + public static final int BAIDU_APPID = 24729330; + //public static final String BAIDU_VERIFY_URL = "https://game-pub.net/member-union/game/cploginstatequery"; //V2.0.3版本 + public static final String BAIDU_VERIFY_URL = "https://game-pub.net/union/game/cploginstatequery"; //V2.0.6版本 + public static final String BAIDU_SECRET_KEY = "W70xo8VyfRAyrfYRTVSPIUAk1FoZh6Xy"; //密钥 + public static final String BAIDU_APPKEY = "0PrsSVgqf6Ip13xFxv5LuP2f"; + + //百度 测试 + public static final int BAIDU_TEST_APPID = 25304533; + public static final String BAIDU_TEST_VERIFY_URL = "https://game-pub.net/union/game/cploginstatequery"; //V2.0.6版本 + public static final String BAIDU_TEST_SECRET_KEY = "8mZTmkWViTn93ycL4o8Ld17Rk8nZKTPZ"; //密钥 + public static final String BAIDU_TEST_APPKEY = "q5TzYg9OSUVuZoYTD1GiV3jt"; + + //6kw聚合 + public static final int SIXKW_OTHER_APPID = 1055; + public static final String SIXKW_OTHER_VERIFY_URL = "http://qd.6kw.com"; + public static final String SIXKW_OTHER_LOGIN_SECRET = "415cef5fbd3335d753639855d3e4fe92"; //密钥 + public static final String SIXKW_OTHER_PAY_SECRER = "afd8f0ae75f31d0e338b3245b43ccd7f";//6kw聚合 + + //6kw + public static final String SIXKW_APPID = "1169"; + public static final String SIXKW_VERIFY_URL = "https://uscpcheck.6kw.com/uscpcheck/"; + public static final String SIXKW_SECRET = "42ab1bf861b110756b34e5823c7de3c1"; //密钥 + public static final String SIXKW_PAY_SECRER = "18d0cfb239632ba234991f44953580d5"; + + + //6kw + public static final String SIXKW_MAIN_APPID = "1055"; + public static final String SIXKW_MAIN_VERIFY_URL = "https://uscpcheck.6kw.com/uscpcheck/"; + public static final String SIXKW_MAIN_LOGIN_SECRET = "415cef5fbd3335d753639855d3e4fe92"; //密钥 + public static final String SIXKW_MAIN_PAY_SECRER = "afd8f0ae75f31d0e338b3245b43ccd7f";//6kw聚合 + + //国内渠道 QuickGame Android + public static final String PRODUCT_CODE = "97600749950592832394231573804243"; + public static final String PRODUCT_KEY = "91498998"; + public static final String CALLBACK_KEY = "49341184589720293197341255244129"; //用来解码通知的密文 + public static final String MD5_KEY = "5cpglhgi6a2jbkhytgloit5hskjus0ry"; //用来验证签名 + public static final String QUICK_LOGIN_VERIFY_URL = "http://checkuser.sdk.quicksdk.net/v2/checkUserInfo"; //登录验证地址 + + //国内渠道 QuickGame IOS + public static final String QUICK_IOS_PRODUCT_CODE = "35830695725172284797896935402546"; + public static final String QUICK_IOS_CALLBACK_KEY = "13929976238051898777747091027588"; //用来解码通知的密文 + public static final String QUICK_IOS_MD5_KEY = "04065854631479470507185076954555"; //用来验证签名 + public static final String QUICK_IOS_QUICK_LOGIN_VERIFY_URL = "http://quickgame.sdk.quicksdk.net/webapi/checkUserInfo"; //登录验证地址 + + //国内渠道 九九互动渠道 + public static final String JJCHANNEL_APP_ID = "wxe42883f5be5ee3b2"; //微信Appid + public static final String JJCHANNEL_APP_SECRET = "7ee5f1a542a4ecdc2fa54753a2555c9b"; //App secret + public static final String JJCHANNEL_SIGN = "4614257bce0d9e185263e5f5d74e2ae5"; //应用签名 + public static final String JJCHANNEL_LOGIN_VERIFY_URL = "https://mprogram.boomegg.cn/box/app/check_unionid"; //登录验证地址 + public static final String JJCHANNEL_ORDER_SEARCH_URL = "https://mprogram.boomegg.cn/wxpay/v2/orders"; //订单查询接口(GET) + + //长尾渠道-国内 + public static final String CHANGWEI_PRODUCT_CODE = "28786303682695343992261367010082"; + public static final String CHANGWEI_PRODUCT_KEY = "85149286"; + public static final String CHANGWEI_CALLBACK_KEY = "01296640542703171181264126618588"; //用来解码通知的密文 + public static final String CHANGWEI_MD5_KEY = "d6pjjfkifb4k0bs6ohjfvnq8pvjd172e"; //用来验证签名 + public static final String CHANGWEI_LOGIN_VERIFY_URL = "http://checkuser.sdk.quicksdk.net/v2/checkUserInfo"; //登录验证地址 + + //Bt渠道-superSDK + public static final String SUPER_VERIFY_URL = "https://supersdk.7pa.com/login/checkuserinfo"; + public static final String SUPER_ORDER_KEY = "ce64276404445baf4a3991c2ed225bab"; + public static final String SUPER_ITEM_KEY = "ux8mq09ocw89majqikj9aras7g6zs0pb"; + + + + //xiao7渠道-x7SDK + public static final String X7_VERIFY_URL = "https://api.x7sy.com/user/check_v4_login"; + public static final String X7_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC/ABikDniMPWJfocn93RUUysbLwtoQzFYkl22QW/OZIPmguFVeCbgCJEPgs9iVecbxzM3KmV8ZuCuS5j1q0VZNnwHj4GQkr1hUB/n435kdaLFJd9i/NbaXHobdMM65d/msVNu0tYTBilUwJZpJDLhV/Ol69qd1UHj0iNc0OOPYlQIDAQAB"; + public static final String X7_APP_KEY = "587c8700923f42176a376bd00c0bb763"; + public static final String X7_SERVER_KEY = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCglAPYi0skzAPdbCag8i/1FnRZFLHCU4Gm1rdCZxmEHEWX9aTM6ctErgM3kgq+WQMVr6Vp1WxmhqYDS8VagfaLSjzgQl6P0+I5qCN4hqxXuGfCCQZdwl6UJqgKIwDGxgOu8U6EQlpWiuuCdgYdR3ELsahe9/9zUjZhR16I6CsG1Rzs8HKY1Jl5VB8cgjtrxTBK2gvg66Pl9TxeG1EM/5Dw+qvzswuWtaS/rO6aBDLK2fenmQ0umARD9Wsf9arbyaTvB+0bgT5QhNOxJpsJz6J9Aopsyev3DFvLTE0dP1a4+MgRst3v6pFi0LVWXqthOeZ5ojytXYLnjUpFgq34HpQtAgMBAAECggEAM12lrUtBik/InLfP04QlWx0Hsscv5Z2Yx6m/jXo1a1Ev4eAuC25uG1YeqVQKI8GNfw5kt2oR9unziPJf+we/uebReltArHl20EK8tf0+fAD9D9CbPLrETlffQP7ZbLxCyV9fYmdnRm/BzkW6xvrnano2BcsG5/jQdGXEE79QpCpdTgYoj37kXtzOmJui2y2TV7JjHW9f4/a8jC7OOZ1Jd6QEu5J3k4vIfziNY0l6ja0EUbj38qYv2+lfMzh0JbuIYeT86L4fyHkHDGL7I5in+vwsbAiSNWi9YZ9z0MqPlKblMJ8kCtzFJpLQgwoijxR0uP54htRvhbr3pTSpP/jW8QKBgQDiGoMezEirD1SWBx2PUWK++lGzlKSksgBTxtrwt6NM+VOX5w/Y0yPLfIjAd+E/tmDYc336FQEaDrh6bVQhcg/qiyo4nfYWxY2B/mKMhskXXxzx08aLHEy9Ny3+xCgq2625MISpGwqPDuIvx2GBj1fEMIdghz3Fb8CQ96MAVtRXbwKBgQC1z4C8gP00uvhJ3CrxenVprdsBmV/LVkNZMXcN0/lpwzkfSfLTvA4pChOptvunuLKKPV7mmzMkNgEp/InnOAEp1qL1VhaNsjpj2gNRTRo7vzts1Fk4umBvHuDwODA5gIFNmnKuCr3qKEOfOo0kCo5qN61H1nHrKTm7Av1YrgNgIwKBgQDHNCyJmdn8PAl+FM7KUh35vHj3CuLz54+6P9ztcB2D17b6gizID13eDd4+FGBzza8NhNNc3dyWpJmL437X6LJ1Jh8Qurrx3SOLgCA7RxUsbjQGK1slfM1vd4oih5gMCnfITSLUCmsHF0nYZoVVrIDa7RaYyQ53QLob/tGxns5+KQKBgC8EPlKBOPnN8C+JlEFmXb66iwxa0X8QC9KhDByzWKiVJ8yDnxxKYY8TYApfm6zAAsvlGwmf0RXoMVzeRftZbFOZggLYBHUYRilUU89OlR4mUgPO1lPpPs79uUXmAfKc3NNowYdol7xaNUKULbPIVxP42gLd3g/mVVubZlDsj0rpAoGAGYfZBwkT/QE9DnZ63EtzA5PGNJ/TyqAE8op4OwrL3Yq+h8buLBuz1QZEcXOR778QrjTMtixHfQpbOKA3t7rJY/JeejK5gSZpgGdkMmPRDmudbjqbYv2rDP+4Jbk2zBr4vCnGpXalhJFyTFQSL3ww7xdV+ceZ+Hn8nrbN2revAu4="; + + //艾肯sdk + public static final String AIKEN_SERVER_KEY = "qh8TgKuPie1N1QZh"; + + //千千官方sdk + public static final String QIANQIAN_VERIFY_URL = "http://serapi.ymtnet.com/apiu/checkUserInfo"; + public static final String QIANQIAN_APP_ID = "1276"; + public static final String QIANQIAN_KEY = "b1f4d53edec8a27ffdd99115bf90d614"; + + //千千quick sdk + public static final String QUICK_VERIFY_URL = "http://qkcheckuser.ymtnet.com/v2/checkUserInfo"; + public static final String QUICK_PRODUCT_CODE = "32041853828755310324773444198651"; + public static final String QUICK_MD5_KEY = "slchdm7hlniswyrvyyke6iqoixv3fjh8"; + public static final String QUICK_CALLBACK_KEY = "43998218632415859958619675617132"; + + //0.1 quick sdk + public static final String QUICK_VERIFY_URL_2 = "http://checkuser.quickapi.net/v2/checkUserInfo"; + public static final String QUICK_PRODUCT_CODE_2 = "19804280896394556877394266362523"; + public static final String QUICK_MD5_KEY_2 = "lgnyk8tgfaa9iait77scencrxb1vemgp"; + public static final String QUICK_CALLBACK_KEY_2 = "27512079957341517989513927959071"; +} diff --git a/src/main/java/com/jmfy/util/CreateUniqueCodeManager.java b/src/main/java/com/jmfy/util/CreateUniqueCodeManager.java new file mode 100644 index 0000000..c3262e3 --- /dev/null +++ b/src/main/java/com/jmfy/util/CreateUniqueCodeManager.java @@ -0,0 +1,39 @@ +package com.jmfy.util; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Random; + +public class CreateUniqueCodeManager { + + /* + * 生成订单号[格式:17位日期+2位mysqlID+3位渠道ID+2位支付类型ID+4位随机数]共29位 + * + * @param channel + * @param itemId + * @return + */ + public static synchronized String createBillno(int channel, int itemId) { + Random random = new Random(); + SimpleDateFormat sdf17 = new SimpleDateFormat("yyyyMMddHHmmssSSS"); + String datePre = sdf17.format(new Date()); + return datePre + int2String(channel, 3) + int2String(itemId, 2) + int2String(random.nextInt(999), 3); + } + + + /** + * 将数字转换成前面补齐0的字符串 + * + * @param + * @param + * @return + */ + private static String int2String(int num, int size) { + String prefix = ""; + for (int i = Integer.toString(num).length(); i < size; i++) { + prefix += "0"; + } + return prefix + num; + } + +} diff --git a/src/main/java/com/jmfy/util/EncryptUtil.java b/src/main/java/com/jmfy/util/EncryptUtil.java new file mode 100644 index 0000000..3472f49 --- /dev/null +++ b/src/main/java/com/jmfy/util/EncryptUtil.java @@ -0,0 +1,31 @@ +package com.jmfy.util; + +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; + +public class EncryptUtil { + + public static String encrypt(String context, String algorithm) { + try { + MessageDigest md = MessageDigest.getInstance(algorithm); + md.update(context.getBytes());//update处理 + byte [] encryContext = md.digest();//调用该方法完成计算 + + int i; + StringBuffer buf = new StringBuffer(""); + for (int offset = 0; offset < encryContext.length; offset++) {//做相应的转化(十六进制) + i = encryContext[offset]; + if (i < 0) i += 256; + if (i < 16) buf.append("0"); + buf.append(Integer.toHexString(i)); + } + + return buf.toString().toLowerCase(); + + } catch (NoSuchAlgorithmException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return ""; + } +} diff --git a/src/main/java/com/jmfy/util/GlobalsDef.java b/src/main/java/com/jmfy/util/GlobalsDef.java new file mode 100644 index 0000000..a081c66 --- /dev/null +++ b/src/main/java/com/jmfy/util/GlobalsDef.java @@ -0,0 +1,17 @@ +package com.jmfy.util; + +/** + * Created by admin on 2014/11/26. + */ +public interface GlobalsDef { + int REDIS_OVER_TIME = 3600 * 24 * 7; + + int REDIS_OVER_FOREVER = -1; + + int BAN_ALL_INFO_TYPE = 99; + + int DAY_TIME = 24 * 60 * 60; + + String FAMILY_MSG = "push_idip"; + +} diff --git a/src/main/java/com/jmfy/util/HttpUtil.java b/src/main/java/com/jmfy/util/HttpUtil.java new file mode 100644 index 0000000..b2a6ebe --- /dev/null +++ b/src/main/java/com/jmfy/util/HttpUtil.java @@ -0,0 +1,636 @@ +/** + * @file HttpUtil.java + * + * @brief + * HttpUtil is a single class containing methods to conveniently perform HTTP + * requests. HttpUtil only uses regular java io and net functionality and does + * not depend on external libraries. + * The class contains methods to perform a get, post, put, and delete request, + * and supports posting forms. Optionally, one can provide headers. + * + * Example usage: + * + * // get + * String res = HttpUtil.get("http://www.google.com"); + * + * // post + * String res = HttpUtil.post("http://sendmedata.com", "This is the data"); + * + * // post form + * Map params = new HashMap(); + * params.put("firstname", "Joe"); + * params.put("lastname", "Smith"); + * params.put("age", "28"); + * String res = HttpUtil.postForm("http://site.com/newuser", params); + * + * // append query parameters to url + * String url = "http://mydatabase.com/users"; + * Map params = new HashMap(); + * params.put("orderby", "name"); + * params.put("limit", "10"); + * String fullUrl = HttpUtil.appendQueryParams(url, params); + * // fullUrl = "http://mydatabase.com/user?orderby=name&limit=10" + * + * @license + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + * + * Copyright (c) 2012 Almende B.V. + * + * @author kui_ye + * @date 2012-05-14 + */ + +package com.jmfy.util; + +import javax.net.ssl.*; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLDecoder; +import java.net.URLEncoder; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.util.HashMap; +import java.util.Map; +import java.util.zip.GZIPInputStream; +import java.util.zip.GZIPOutputStream; + +public class HttpUtil { + /** + * Send a get request + * @param url + * @return response + * @throws IOException + */ + //fetchcode + + static public String get(String url) throws IOException { + return get(url, null); + } + + + static public String getcode(String url) throws IOException { + return getcode(url, null); + } + + /** + * Send a get request + * @param url Url as string + * @param headers Optional map with headers + * @return response Response as string + * @throws IOException + */ + static public String get(String url, + Map headers) throws IOException { + return fetch("GET", url, null, headers); + } + + + static public String getcode(String url, + Map headers) throws IOException { + return fetchcode("GET", url, null, headers); + } + /** + * Send a post request + * @param url Url as string + * @param body Request body as string + * @param headers Optional map with headers + * @return response Response as string + * @throws IOException + */ + static public String post(String url, String body, + Map headers) throws IOException { + return fetch("POST", url, body, headers); + } + + static public String postWithgzip(String url, String body, + Map headers) throws IOException { + return fetchWithgzip("POST", url, body, headers); + } + + static public String postWithOutSSL(String url, String body, + Map headers) throws Exception { + return fetchWihtOutSSL("POST", url, body, headers); + } + + /** + * Send a post request + * @param url Url as string + * @param body Request body as string + * @return response Response as string + * @throws IOException + */ + static public String post(String url, String body) throws IOException { + return post(url, body, null); + } + + static public String postWithgzip(String url, String body) throws IOException { + return postWithgzip(url, body, null); + } + + /** + * Post a form with parameters + * @param url Url as string + * @param params map with parameters/values + * @return response Response as string + * @throws IOException + */ + static public String postForm(String url, Map params) + throws IOException { + return postForm(url, params, null); + } + + static public String postheaderForm(String url, Map params, Map paramheard) + throws IOException { + return postForm(url, params, paramheard); + } + + /** + * Post a form with parameters + * @param url Url as string + * @param params Map with parameters/values + * @param headers Optional map with headers + * @return response Response as string + * @throws IOException + */ + static public String postForm(String url, Map params, Map headers) throws IOException { + // set content type + if (headers == null) { + headers = new HashMap(); + } + headers.put("Content-Type", "application/x-www-form-urlencoded"); + + // parse parameters + String body = ""; + if (params != null) { + boolean first = true; + for (String param : params.keySet()) { + if (first) { + first = false; + } + else { + body += "&"; + } + String value = params.get(param); + body += URLEncoder.encode(param, "UTF-8") + "="; + body += URLEncoder.encode(value, "UTF-8"); + } + } + + return post(url, body, headers); + } + + static public String postJsonFormRealName(String url, String params, Map headers) throws IOException { + // set content type + if (headers == null) { + headers = new HashMap(); + } + headers.put("Content-Type", "application/json;charset=utf-8"); + //headers.put("timestamps",String.valueOf(System.currentTimeMillis())); + // parse parameters + + return post(url, params, headers); + } + + static public String postFormWithOutSSL(String url, Map params, Map headers) throws Exception { + // set content type + if (headers == null) { + headers = new HashMap(); + } + headers.put("Content-Type", "application/x-www-form-urlencoded"); + + // parse parameters + String body = ""; + if (params != null) { + boolean first = true; + for (String param : params.keySet()) { + if (first) { + first = false; + } + else { + body += "&"; + } + String value = params.get(param); + body += URLEncoder.encode(param, "UTF-8") + "="; + body += URLEncoder.encode(value, "UTF-8"); + } + } + + return postWithOutSSL(url, body, headers); + } + /** + * Send a put request + * @param url Url as string + * @param body Request body as string + * @param headers Optional map with headers + * @return response Response as string + * @throws IOException + */ + static public String put(String url, String body, + Map headers) throws IOException { + return fetch("PUT", url, body, headers); + } + + /** + * Send a put request + * @param url Url as string + * @return response Response as string + * @throws IOException + */ + static public String put(String url, String body) throws IOException { + return put(url, body, null); + } + + /** + * Send a delete request + * @param url Url as string + * @param headers Optional map with headers + * @return response Response as string + * @throws IOException + */ + static public String delete(String url, + Map headers) throws IOException { + return fetch("DELETE", url, null, headers); + } + + /** + * Send a delete request + * @param url Url as string + * @return response Response as string + * @throws IOException + */ + static public String delete(String url) throws IOException { + return delete(url, null); + } + + /** + * Append query parameters to given url + * @param url Url as string + * @param params Map with query parameters + * @return url Url with query parameters appended + * @throws IOException + */ + static public String appendQueryParams(String url, + Map params) throws IOException { + String fullUrl = url; + if (params != null) { + boolean first = (fullUrl.indexOf('?') == -1); + for (String param : params.keySet()) { + if (first) { + fullUrl += '?'; + first = false; + } + else { + fullUrl += '&'; + } + String value = params.get(param); + fullUrl += URLEncoder.encode(param, "UTF-8") + '='; + fullUrl += URLEncoder.encode(value, "UTF-8"); + } + } + + return fullUrl; + } + + /** + * Retrieve the query parameters from given url + * @param url Url containing query parameters + * @return params Map with query parameters + * @throws IOException + */ + static public Map getQueryParams(String url) + throws IOException { + Map params = new HashMap(); + + int start = url.indexOf('?'); + while (start != -1) { + // read parameter name + int equals = url.indexOf('=', start); + String param = ""; + if (equals != -1) { + param = url.substring(start + 1, equals); + } + else { + param = url.substring(start + 1); + } + + // read parameter value + String value = ""; + if (equals != -1) { + start = url.indexOf('&', equals); + if (start != -1) { + value = url.substring(equals + 1, start); + } + else { + value = url.substring(equals + 1); + } + } + + params.put(URLDecoder.decode(param, "UTF-8"), + URLDecoder.decode(value, "UTF-8")); + } + + return params; + } + + /** + * Returns the url without query parameters + * @param url Url containing query parameters + * @return url Url without query parameters + * @throws IOException + */ + static public String removeQueryParams(String url) + throws IOException { + int q = url.indexOf('?'); + if (q != -1) { + return url.substring(0, q); + } + else { + return url; + } + } + + /** + * Send a request + * @param method HTTP method, for example "GET" or "POST" + * @param url Url as string + * @param body Request body as string + * @param headers Optional map with headers + * @return response Response as string + * @throws IOException + */ + static public String fetch(String method, String url, String body, + Map headers) throws IOException { + // connection + URL u = new URL(url); + HttpURLConnection conn = (HttpURLConnection)u.openConnection(); + conn.setConnectTimeout(10000); + conn.setReadTimeout(10000); + + // method + if (method != null) { + conn.setRequestMethod(method); + } + // headers + if (headers != null) { + for(String key : headers.keySet()) { + conn.addRequestProperty(key, headers.get(key)); + } + } + + // body + if (body != null) { + conn.setDoOutput(true); + OutputStream os = conn.getOutputStream(); + os.write(body.getBytes()); + os.flush(); + os.close(); + } + + // response + InputStream is = conn.getInputStream(); + String response = streamToString(is); + is.close(); + + // handle redirects + if (conn.getResponseCode() == 301) { + String location = conn.getHeaderField("Location"); + return fetch(method, location, body, headers); + } + + return response; + } + + static public String fetchWithgzip(String method, String url, String body, + Map headers) throws IOException { + // connection + URL u = new URL(url); + HttpURLConnection conn = (HttpURLConnection)u.openConnection(); + conn.setConnectTimeout(10000); + conn.setReadTimeout(10000); + + // method + if (method != null) { + conn.setRequestMethod(method); + } + // headers + if (headers != null) { + for(String key : headers.keySet()) { + conn.addRequestProperty(key, headers.get(key)); + } + } + + // body + if (body != null) { + conn.setDoOutput(true); + OutputStream os = conn.getOutputStream(); + byte[] bodys=compress(body,"utf-8"); + os.write(bodys); + os.flush(); + os.close(); + } + + // response + InputStream is = conn.getInputStream(); + String response = gzipUncompress(is); + is.close(); + + // handle redirects + if (conn.getResponseCode() == 301) { + String location = conn.getHeaderField("Location"); + return fetch(method, location, body, headers); + } + + return response; + } + + static public String fetchWihtOutSSL(String method, String url, String body, + Map headers) throws Exception { + // connection + URL u = new URL(url); + if ("https".equalsIgnoreCase(u.getProtocol())) { + miTM.ignoreSsl(); + } + HttpURLConnection conn = (HttpURLConnection)u.openConnection(); + conn.setConnectTimeout(10000); + conn.setReadTimeout(10000); + + // method + if (method != null) { + conn.setRequestMethod(method); + } + // headers + if (headers != null) { + for(String key : headers.keySet()) { + conn.addRequestProperty(key, headers.get(key)); + } + } + + // body + if (body != null) { + conn.setDoOutput(true); + OutputStream os = conn.getOutputStream(); + os.write(body.getBytes()); + os.flush(); + os.close(); + } + + // response + InputStream is = conn.getInputStream(); + String response = streamToString(is); + is.close(); + + // handle redirects + if (conn.getResponseCode() == 301) { + String location = conn.getHeaderField("Location"); + return fetch(method, location, body, headers); + } + + return response; + } + + static public String fetchcode(String method, String url, String body, + Map headers) throws IOException { + // connection + URL u = new URL(url); + HttpURLConnection conn = (HttpURLConnection)u.openConnection(); + conn.setConnectTimeout(10000); + conn.setReadTimeout(10000); + + // method + if (method != null) { + conn.setRequestMethod(method); + } + // headers + if (headers != null) { + for(String key : headers.keySet()) { + conn.addRequestProperty(key, headers.get(key)); + } + } + + // body + if (body != null) { + conn.setDoOutput(true); + OutputStream os = conn.getOutputStream(); + os.write(body.getBytes()); + os.flush(); + os.close(); + } + + // response + InputStream is = conn.getInputStream(); + String response = streamToString(is); + is.close(); + + // handle redirects + if (conn.getResponseCode() == 301) { + String location = conn.getHeaderField("Location"); + return fetch(method, location, body, headers); + } + + return String.valueOf(conn.getResponseCode()); + } + + /** + * Read an input stream into a string + * @param in + * @return + * @throws IOException + */ + static public String streamToString(InputStream in) throws IOException { + StringBuffer out = new StringBuffer(); + byte[] b = new byte[4096]; + for (int n; (n = in.read(b)) != -1;) { + out.append(new String(b, 0, n)); + } + return out.toString(); + } + + + public static String gzipUncompress(InputStream inputStream) throws IOException{ + ByteArrayOutputStream out = new ByteArrayOutputStream(); + GZIPInputStream gunzip = new GZIPInputStream(inputStream); + byte[] buffer = new byte[256]; + int n; + while ((n = gunzip.read(buffer)) >= 0) { + out.write(buffer, 0, n); + } + // toString()使用平台默认编码,也可以显式的指定如toString("GBK") + return out.toString(); + } + + public static byte[] compress(String str, String encoding) { + if (str == null || str.length() == 0) { + return null; + } + ByteArrayOutputStream out = new ByteArrayOutputStream(); + GZIPOutputStream gzip; + try { + gzip = new GZIPOutputStream(out); + gzip.write(str.getBytes(encoding)); + gzip.close(); + } catch ( Exception e) { + e.printStackTrace(); + } + return out.toByteArray(); + } + + + private static void trustAllHttpsCertificates() throws Exception { + TrustManager[] trustAllCerts = new TrustManager[1]; + TrustManager tm = new miTM(); + trustAllCerts[0] = tm; + SSLContext sc = SSLContext.getInstance("SSL"); + sc.init(null, trustAllCerts, null); + HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); + } + + static class miTM implements TrustManager, X509TrustManager { + public X509Certificate[] getAcceptedIssuers() { + return null; + } + + public boolean isServerTrusted(X509Certificate[] certs) { + return true; + } + + public boolean isClientTrusted(X509Certificate[] certs) { + return true; + } + + public void checkServerTrusted(X509Certificate[] certs, String authType) + throws CertificateException { + return; + } + + public void checkClientTrusted(X509Certificate[] certs, String authType) + throws CertificateException { + return; + } + + public static void ignoreSsl() throws Exception { + HostnameVerifier hv = new HostnameVerifier() { + public boolean verify(String urlHostName, SSLSession session) { + System.out.println("Warning: URL Host: " + urlHostName + + " vs. " + session.getPeerHost()); + return true; + } + }; + trustAllHttpsCertificates(); + HttpsURLConnection.setDefaultHostnameVerifier(hv); + } + } +} diff --git a/src/main/java/com/jmfy/util/ItemType.java b/src/main/java/com/jmfy/util/ItemType.java new file mode 100644 index 0000000..1959917 --- /dev/null +++ b/src/main/java/com/jmfy/util/ItemType.java @@ -0,0 +1,41 @@ +package com.jmfy.util; + +/** + * Created by Administrator on 2016/11/18. + */ +public class ItemType { + public final static int gold = 1; + public final static int gem = 2; + public final static int friend_point = 3; + public final static int voicher = 24;//神券 + public final static int stamina = 17; + public final static int skill_point = 20; + public final static int honor_point = 23; + public final static int equip = 26; + public final static int yaofu = 33;//事件卡 + public final static int hero_type = 34;//掉落英雄 + public final static int hero_skin = 39;//掉落英雄皮肤 + public final static int head = 40;//头像 + public final static int head_frame = 41;//头像框 + public final static int skin_gold = 46; + public final static int user_exp = 49;//用户经验 + public final static int mind_soul = 50; // 心魂 + public final static int random_item_box = 51;//随机箱子 + public final static int mind_box = 53;// 随机心魂箱 + + public final static int material_e = 10; + public final static int material_s = 11; + public final static int exp_stone = 12; + public final static int soul_stone = 14; + public final static int family_attribute = 29; + public final static int army_star = 7; + public final static int equip_jewel = 5; + public final static int equip_fm = 9; + public final static int genius_ticket = 30; + public final static int challenge_ticket = 28; + public final static int equip_piece = 36; + public final static int whole_buff = 42; + public final static int exp_card = 48; + + +} diff --git a/src/main/java/com/jmfy/util/KafkaProducerHandler.java b/src/main/java/com/jmfy/util/KafkaProducerHandler.java new file mode 100644 index 0000000..432ae25 --- /dev/null +++ b/src/main/java/com/jmfy/util/KafkaProducerHandler.java @@ -0,0 +1,46 @@ +package com.jmfy.util; + +import com.jmfy.model.MyKafkaProperties; +import org.apache.kafka.clients.producer.KafkaProducer; +import org.apache.kafka.clients.producer.Producer; +import org.apache.kafka.clients.producer.ProducerRecord; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import java.util.Properties; + +/** + * Created by Marvin on 2017/9/13. + */ +@Component +public class KafkaProducerHandler { + + private static final Logger LOGGER = LoggerFactory.getLogger(KafkaProducerHandler.class); + + private static Producer producer; + + public static void init(MyKafkaProperties myKafkaProperties){ + Properties properties = new Properties(); + properties.put("bootstrap.servers", myKafkaProperties.getServersUri()); + properties.put("acks", myKafkaProperties.getProducerAcks()); + properties.put("retries",myKafkaProperties.getProducerRetries()); + properties.put("batch.size", myKafkaProperties.getProducerBatchSize()); + properties.put("linger.ms", myKafkaProperties.getProducerLinger()); + properties.put("buffer.memory", myKafkaProperties.getProducerBufferMemory()); + properties.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer"); + properties.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer"); + producer = new KafkaProducer<>(properties); + LOGGER.info("kafka address={},kafka init ...",myKafkaProperties.getServersUri()); + } + + public static void sendMessage(int serverId, String key, String msgContent){ + String topic = serverId +":idip"; +// ProducerRecord msg = new ProducerRecord(topic, key, msgContent); +// producer.send(msg); + RedisRecord redisRecord = new RedisRecord(topic,key, msgContent); + RedisRecordSendThread.getInstance().addEntry(redisRecord); + + LOGGER.info("kafka send success ..."); + } +} diff --git a/src/main/java/com/jmfy/util/LogUtils.java b/src/main/java/com/jmfy/util/LogUtils.java new file mode 100644 index 0000000..e416396 --- /dev/null +++ b/src/main/java/com/jmfy/util/LogUtils.java @@ -0,0 +1,87 @@ +package com.jmfy.util; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Created by Administrator on 2017/5/16. + */ +public class LogUtils { + + /** + * 错误输入日志 + */ + public static final Logger log = LoggerFactory.getLogger(LogUtils.class); + + public static final Logger biLog = LoggerFactory.getLogger("BILog"); + /** + * 记录一直 info信息 + * + * @param message + */ + public static void logInfo(String message) { + StringBuilder s = new StringBuilder(); + s.append((message)); + log.info(s.toString()); + } + + public static void logInfo(String message, Throwable e) { + StringBuilder s = new StringBuilder(); + s.append(("exception : -->>")); + s.append((message)); + log.info(s.toString(), e); + } + + public static void logWarn(String message) { + StringBuilder s = new StringBuilder(); + s.append((message)); + + log.warn(s.toString()); + } + + public static void logWarn(String message, Throwable e) { + StringBuilder s = new StringBuilder(); + s.append(("exception : -->>")); + s.append((message)); + log.warn(s.toString(), e); + } + + public static void logDebug(String message) { + StringBuilder s = new StringBuilder(); + s.append((message)); + log.debug(s.toString()); + } + + public static void logDebug(String message, Throwable e) { + StringBuilder s = new StringBuilder(); + s.append(("exception : -->>")); + s.append((message)); + log.debug(s.toString(), e); + } + + public static void logBI(String message) { + StringBuilder s = new StringBuilder(); + s.append(message); + biLog.info(s.toString()); + } + + public static void logError(String message) { + StringBuilder s = new StringBuilder(); + s.append(message); + log.error(s.toString()); + } + + /** + * 记录日志错误信息 + * + * @param message + * @param e + */ + public static void logError(String message, Throwable e) { + StringBuilder s = new StringBuilder(); + s.append(("exception : -->>")); + s.append((message)); + log.error(s.toString(), e); + } + +} diff --git a/src/main/java/com/jmfy/util/MD5Util.java b/src/main/java/com/jmfy/util/MD5Util.java new file mode 100644 index 0000000..086f3ec --- /dev/null +++ b/src/main/java/com/jmfy/util/MD5Util.java @@ -0,0 +1,35 @@ +package com.jmfy.util; + +import java.io.UnsupportedEncodingException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; + +public class MD5Util { + + public static String encrypByMd5(String context) { + try { + MessageDigest md = MessageDigest.getInstance("MD5"); + md.update(context.getBytes());//update处理 + byte [] encryContext = md.digest();//调用该方法完成计算 + + int i; + StringBuffer buf = new StringBuffer(""); + for (int offset = 0; offset < encryContext.length; offset++) {//做相应的转化(十六进制) + i = encryContext[offset]; + if (i < 0) i += 256; + if (i < 16) buf.append("0"); + buf.append(Integer.toHexString(i)); + } + + return buf.toString().toLowerCase(); + + } catch (NoSuchAlgorithmException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return ""; + } +} diff --git a/src/main/java/com/jmfy/util/MapEntry.java b/src/main/java/com/jmfy/util/MapEntry.java new file mode 100644 index 0000000..bd4b20a --- /dev/null +++ b/src/main/java/com/jmfy/util/MapEntry.java @@ -0,0 +1,9 @@ +package com.jmfy.util; + +/** + * Created by admin on 2015/12/23. + */ +public interface MapEntry { + public K getKey(); + public V getValue(); +} diff --git a/src/main/java/com/jmfy/util/MongoName.java b/src/main/java/com/jmfy/util/MongoName.java new file mode 100644 index 0000000..9bcfe1f --- /dev/null +++ b/src/main/java/com/jmfy/util/MongoName.java @@ -0,0 +1,17 @@ +package com.jmfy.util; + +import com.jmfy.modelVo.MarkedVo; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +//TODO 常量应走配置jl_? +public class MongoName { + private static final Logger LOGGER = LoggerFactory.getLogger(MongoName.class); + + public static String + getMongoDBName(MarkedVo marked) { + String dbName = "jieling_" + marked.getPartition(); + LOGGER.info("Connect database----->" + dbName); + return dbName; + } +} \ No newline at end of file diff --git a/src/main/java/com/jmfy/util/MyKafkaConfiguration.java b/src/main/java/com/jmfy/util/MyKafkaConfiguration.java new file mode 100644 index 0000000..a641a70 --- /dev/null +++ b/src/main/java/com/jmfy/util/MyKafkaConfiguration.java @@ -0,0 +1,24 @@ +package com.jmfy.util; + +import com.jmfy.model.MyKafkaProperties; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +/** + * Created by Marvin on 2017/9/20. + */ +@Configuration(value = "myKafkaConfiguration") +@EnableConfigurationProperties(MyKafkaProperties.class) +public class MyKafkaConfiguration { + + @Autowired + private MyKafkaProperties myKafkaProperties; + public MyKafkaProperties getMyKafkaProperties() { + return myKafkaProperties; + } + + public void setMyKafkaProperties(MyKafkaProperties myKafkaProperties) { + this.myKafkaProperties = myKafkaProperties; + } +} diff --git a/src/main/java/com/jmfy/util/QuickSDKUtil.java b/src/main/java/com/jmfy/util/QuickSDKUtil.java new file mode 100644 index 0000000..28fef5f --- /dev/null +++ b/src/main/java/com/jmfy/util/QuickSDKUtil.java @@ -0,0 +1,63 @@ +package com.jmfy.util; + +import java.io.UnsupportedEncodingException; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class QuickSDKUtil { + private final static Pattern pattern = Pattern.compile("\\d+"); + + private final static String charset="utf-8"; + + public static String encode(String src,String key) { + try { + byte[] data = src.getBytes(charset); + byte[] keys = key.getBytes(); + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < data.length; i++) { + int n = (0xff & data[i]) + (0xff & keys[i % keys.length]); + sb.append("@" + n); + } + return sb.toString(); + }catch (UnsupportedEncodingException e){ + e.printStackTrace(); + } + return src; + } + + public static String decode(String src,String key) { + if(src == null || src.length() == 0){ + return src; + } + Matcher m = pattern.matcher(src); + List list = new ArrayList(); + while (m.find()) { + try { + String group = m.group(); + list.add(Integer.valueOf(group)); + } catch (Exception e) { + e.printStackTrace(); + return src; + } + } + + if (list.size() > 0) { + try { + byte[] data = new byte[list.size()]; + byte[] keys = key.getBytes(); + + for (int i = 0; i < data.length; i++) { + data[i] = (byte) (list.get(i) - (0xff & keys[i % keys.length])); + } + return new String(data, charset); + } catch (UnsupportedEncodingException e){ + e.printStackTrace(); + } + return src; + } else { + return src; + } + } +} diff --git a/src/main/java/com/jmfy/util/RPCClient.java b/src/main/java/com/jmfy/util/RPCClient.java new file mode 100644 index 0000000..615772b --- /dev/null +++ b/src/main/java/com/jmfy/util/RPCClient.java @@ -0,0 +1,217 @@ +package com.jmfy.util; + +import com.jmfy.thrift.pool.ClientAdapterPo; +import com.jmfy.thrift.pool.ServiceKey; +import com.ljsd.jieling.thrift.idl.ItemConfig; +import com.ljsd.jieling.thrift.idl.RPCRequestIFace; +import com.ljsd.jieling.thrift.idl.Result; +import com.ljsd.jieling.thrift.idl.itemData; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.List; + + +public class RPCClient { + + private static final Logger LOGGER = LoggerFactory.getLogger(RPCClient.class); + + public static String getServiceKey(String serviceName, String host, String port) { + StringBuilder sb = new StringBuilder(); + return sb.append(serviceName).append("|") + .append(host).append("|") + .append(port).toString(); + } + + public static Result gmSend(String cmd, String ip, String port) throws Exception { + Result result = null; + ClientAdapterPo rPCClient = null; + String serviceKey = RPCClient.getServiceKey(ServiceKey.RPCCore, ip, port); + try { + rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey); + //result = rPCClient.getClient().idipGm("", cmd); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (null != rPCClient) { + rPCClient.returnObject(serviceKey); + } + } + return null == result ? new Result().setResultCode(-1).setResultMsg("应用不存在") : result; + } + + public static Result deliveryRecharge(String ip, String port, int uid, String goodsId, String openId, String orderId, long orderTime, int amount, String platform) throws Exception { + Result result = null; + ClientAdapterPo rPCClient = null; + String serviceKey = RPCClient.getServiceKey(ServiceKey.RPCCore, ip, port); + try { + rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey); + result = rPCClient.getClient().deliveryRecharge(uid,goodsId,openId,orderId,orderTime,amount, platform); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (null != rPCClient) { + rPCClient.returnObject(serviceKey); + } + } + LOGGER.info("rpcClient ip {} port {}",ip,port); + if(result!=null){ + LOGGER.info("result {}",result.toString()); + } + + return null == result ? new Result().setResultCode(-1).setResultMsg("通信失败") : result; + } + + public static Result deliveryCoupon(String ip, String port,int gameUserId,String couponCode,String title,String content,long orderTime, List itemId) throws Exception { + Result result = null; + ClientAdapterPo rPCClient = null; + String serviceKey = RPCClient.getServiceKey(ServiceKey.RPCCore, ip, port); + try { + rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey); + result = rPCClient.getClient().deliveryCoupon(gameUserId,couponCode,title,content,orderTime,itemId); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (null != rPCClient) { + rPCClient.returnObject(serviceKey); + } + } + LOGGER.info("rpcClient ip {} port {}",ip,port); + if(result!=null){ + LOGGER.info("result {}",result.toString()); + } + + return null == result ? new Result().setResultCode(-1).setResultMsg("通信失败") : result; + } + + public static Result deliveryOrder(String ip, String port, int uid, String goodsId, long orderTime, String orderId, int devalueId) throws Exception { + Result result = null; + ClientAdapterPo rPCClient = null; + String serviceKey = RPCClient.getServiceKey(ServiceKey.RPCCore, ip, port); + try { + rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey); + result = rPCClient.getClient().deliveryOrder(uid,goodsId,orderTime, orderId, devalueId); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (null != rPCClient) { + rPCClient.returnObject(serviceKey); + } + } + LOGGER.info("rpcClient ip {} port {}",ip,port); + if(result!=null){ + LOGGER.info("result {}",result.toString()); + } + + return null == result ? new Result().setResultCode(-1).setResultMsg("通信失败") : result; + } + + public static Result sendMailToRole(String ip, String port, String uids,String title,String content,String reward) throws Exception { + Result result = null; + ClientAdapterPo rPCClient = null; + String serviceKey = RPCClient.getServiceKey(ServiceKey.RPCCore, ip, port); + try { + rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey); + result = rPCClient.getClient().sendMailToRole(uids,title,content,reward); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (null != rPCClient) { + rPCClient.returnObject(serviceKey); + } + } + LOGGER.info("rpcClient ip {} port {}",ip,port); + if(result!=null){ + LOGGER.info("result {}",result.toString()); + } + + return null == result ? new Result().setResultCode(-1).setResultMsg("通信失败") : result; + } + public static Result operateUser(String ip, String port, int uid, int opStatus) throws Exception { + Result result = null; + ClientAdapterPo rPCClient = null; + String serviceKey = RPCClient.getServiceKey(ServiceKey.RPCCore, ip, port); + try { + rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey); + result = rPCClient.getClient().operateUser(uid, opStatus); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (null != rPCClient) { + rPCClient.returnObject(serviceKey); + } + } + LOGGER.info("rpcClient ip {} port {}",ip,port); + if(result!=null){ + LOGGER.info("result {}",result.toString()); + } + + return null == result ? new Result().setResultCode(-1).setResultMsg("通信失败") : result; + } + + public static List getItemConfig(String ip, String port, List itemIds) throws Exception { + List result = null; + ClientAdapterPo rPCClient = null; + String serviceKey = RPCClient.getServiceKey(ServiceKey.RPCCore, ip, port); + try { + rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey); + result = rPCClient.getClient().getItemConfigs(itemIds); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (null != rPCClient) { + rPCClient.returnObject(serviceKey); + } + } + + if(result!=null){ + LOGGER.info("result {}",result.toString()); + } + + return result; + } + + public static Result giftCode(String ip, String port, int uid,String giftCode) throws Exception { + Result result = null; + ClientAdapterPo rPCClient = null; + String serviceKey = RPCClient.getServiceKey(ServiceKey.RPCCore, ip, port); + try { + rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey); + result = rPCClient.getClient().giftCode(uid, giftCode); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (null != rPCClient) { + rPCClient.returnObject(serviceKey); + } + } + LOGGER.info("rpcClient ip {} port {}",ip,port); + if(result!=null){ + LOGGER.info("result {}",result.toString()); + } + + return null == result ? new Result().setResultCode(-1).setResultMsg("通信失败") : result; + } + + public static Result deliveryRecharge2(String ip, String port, int uid, String goodsId, String currency, double amount) throws Exception { + Result result = null; + ClientAdapterPo rPCClient = null; + String serviceKey = RPCClient.getServiceKey(ServiceKey.RPCCore, ip, port); + try { + rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey); + result = rPCClient.getClient().deliveryRecharge2(uid, goodsId, currency, amount); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (null != rPCClient) { + rPCClient.returnObject(serviceKey); + } + } + LOGGER.info("rpcClient ip {} port {}",ip,port); + if(result!=null){ + LOGGER.info("result {}",result.toString()); + } + + return null == result ? new Result().setResultCode(-1).setResultMsg("通信失败") : result; + } +} diff --git a/src/main/java/com/jmfy/util/RedisRecord.java b/src/main/java/com/jmfy/util/RedisRecord.java new file mode 100644 index 0000000..c7919fc --- /dev/null +++ b/src/main/java/com/jmfy/util/RedisRecord.java @@ -0,0 +1,33 @@ +package com.jmfy.util; + +public class RedisRecord { + private String key; + private String value; + private String topic; + private long msgNum; + public RedisRecord(String topic, String key, String value) { + this.topic = topic; + this.key = key; + this.value = value; + } + + public String value(){ + return value; + } + + public String key(){ + return key; + } + + public String getTopic() { + return topic; + } + + public long getMsgNum() { + return msgNum; + } + + public void setMsgNum(long msgNum) { + this.msgNum = msgNum; + } +} diff --git a/src/main/java/com/jmfy/util/RedisRecordSendThread.java b/src/main/java/com/jmfy/util/RedisRecordSendThread.java new file mode 100644 index 0000000..712d274 --- /dev/null +++ b/src/main/java/com/jmfy/util/RedisRecordSendThread.java @@ -0,0 +1,69 @@ +package com.jmfy.util; + +import com.google.gson.Gson; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.redis.core.DefaultTypedTuple; +import org.springframework.data.redis.core.ZSetOperations; + +import java.util.*; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.BlockingQueue; + +public class RedisRecordSendThread extends Thread{ + private static final Logger LOGGER = LoggerFactory.getLogger(RedisRecordSendThread.class); + private final BlockingQueue redisRecords = new ArrayBlockingQueue(500); + + private Gson gson = new Gson(); + public static RedisRecordSendThread getInstance() { + return RedisRecordSendThread.Instance.instance; + } + + public static class Instance { + public final static RedisRecordSendThread instance = new RedisRecordSendThread(); + } + + private RedisRecordSendThread(){ + + } + + public void run() { + while (true){ + dowork(); + } + } + private void dowork() { + try { + List willSend = new ArrayList<>(); + redisRecords.drainTo(willSend,10); + if(willSend.isEmpty()){ + try { + Thread.sleep(2); + return; + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + Map>> map = new HashMap<>(); + for(RedisRecord redisRecord : willSend){ + String topic = redisRecord.getTopic(); + if(!map.containsKey(topic)){ + map.put(topic,new LinkedHashSet<>()); + } + long increment = RedisUtil.getInstence().increment(topic+"_num"); + redisRecord.setMsgNum(increment); + String itemInfo = gson.toJson(redisRecord); + map.get(topic).add(new DefaultTypedTuple<>(itemInfo, (double) increment)); + } + for(String topic : map.keySet()){ + RedisUtil.getInstence().zsetAddAall(topic,map.get(topic)); + } + + }catch (Exception e){ + LOGGER.error("the exception",e); + } + } + public void addEntry(RedisRecord redisRecord){ + redisRecords.add(redisRecord); + } +} diff --git a/src/main/java/com/jmfy/util/RedisRunTimeException.java b/src/main/java/com/jmfy/util/RedisRunTimeException.java new file mode 100644 index 0000000..eb236db --- /dev/null +++ b/src/main/java/com/jmfy/util/RedisRunTimeException.java @@ -0,0 +1,15 @@ +package com.jmfy.util; + +public class RedisRunTimeException extends RuntimeException{ + public RedisRunTimeException() + { + super(); + } + public RedisRunTimeException(String msg){ + super(msg); + } + public RedisRunTimeException(Throwable cau) + { + super(cau); + } +} diff --git a/src/main/java/com/jmfy/util/RedisUtil.java b/src/main/java/com/jmfy/util/RedisUtil.java new file mode 100644 index 0000000..b8f2d93 --- /dev/null +++ b/src/main/java/com/jmfy/util/RedisUtil.java @@ -0,0 +1,337 @@ +package com.jmfy.util; + +import com.google.gson.Gson; +import com.jmfy.redisProperties.RedisProperties; +import com.jmfy.redisProperties.RedisUserKey; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.redis.RedisConnectionFailureException; +import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; +import org.springframework.data.redis.core.StringRedisTemplate; +import org.springframework.data.redis.core.ZSetOperations; +import redis.clients.jedis.JedisPoolConfig; + +import java.util.*; +import java.util.concurrent.TimeUnit; + + +/** + * 用来储存返回改前端的respose的实体 当断线重连时下次请求直接返回缓存中的数据 + *

+ * 添加储存玩家常用数据 + */ +public class RedisUtil { + + private static final Logger LOGGER = LoggerFactory.getLogger(RedisUtil.class); + + private static int MAX_TRY_TIMES = 3; //最大尝试次数,保障获取/存储成功 + private static int FAILED_SLEEP = 2; //每次失败最大停顿时间 + + private StringRedisTemplate redisObjectTemplate; + + public RedisUtil() { + } + + private static RedisUtil redisUtil; + private Gson gson = new Gson(); + + public static RedisUtil getInstence() { + if (redisUtil == null) { + redisUtil = InnerClass.SINGLETON; + } + return redisUtil; + } + + private static class InnerClass { + private static final RedisUtil SINGLETON = new RedisUtil(); + } + + public void init(RedisProperties redisProperties) { + try { + //initStringCacheDb(0, redisProperties); + initUserCacheDb(0, redisProperties); + LOGGER.info("redis Host={},port={},redis init ..", redisProperties.getHost(), redisProperties.getPort()); + + } catch (Exception e) { + LOGGER.error("------------------Redis 未启动------------------"); + } + + + } + + private void initUserCacheDb(int dbIndex, RedisProperties redisProperties) { + //实例化链接工厂 + JedisConnectionFactory connectionFactory = new JedisConnectionFactory(); + //设置host + connectionFactory.setHostName(redisProperties.getHost()); + //设置端口 + connectionFactory.setPort(redisProperties.getPort()); + // 分库 + connectionFactory.setDatabase(dbIndex); + //设置密码 + connectionFactory.setPassword(redisProperties.getPassword()); + // 设置参数 + JedisPoolConfig config = new JedisPoolConfig(); + //连接耗尽时是否阻塞, false报异常,ture阻塞直到超时, 默认true + config.setBlockWhenExhausted(true); + //设置的逐出策略类名, 默认DefaultEvictionPolicy(当连接超过最大空闲时间,或连接数超过最大空闲连接数) + config.setEvictionPolicyClassName("org.apache.commons.pool2.impl.DefaultEvictionPolicy"); + //是否启用pool的jmx管理功能, 默认true + config.setJmxEnabled(true); + //MBean ObjectName = new ObjectName("org.apache.commons.pool2:type=GenericObjectPool,name=" + "pool" + i); 默 认为"pool", JMX不熟,具体不知道是干啥的...默认就好. + config.setJmxNamePrefix("pool"); + //是否启用后进先出, 默认true + config.setLifo(true); + //最大空闲连接数, 默认8个 + config.setMaxIdle(8); + //最大连接数, 默认8个 + config.setMaxTotal(1000); + //获取连接时的最大等待毫秒数(如果设置为阻塞时BlockWhenExhausted),如果超时就抛异常, 小于零:阻塞不确定的时间, 默认-1 + config.setMaxWaitMillis(-1); + //逐出连接的最小空闲时间 默认1800000毫秒(30分钟) + config.setMinEvictableIdleTimeMillis(1800000); + //最小空闲连接数, 默认0 + config.setMinIdle(0); + //每次逐出检查时 逐出的最大数目 如果为负数就是 : 1/abs(n), 默认3 + config.setNumTestsPerEvictionRun(3); + //对象空闲多久后逐出, 当空闲时间>该值 且 空闲连接>最大空闲数 时直接逐出,不再根据MinEvictableIdleTimeMillis判断 (默认逐出策略) + config.setSoftMinEvictableIdleTimeMillis(1800000); + //在获取连接的时候检查有效性, 默认false + config.setTestOnBorrow(false); + //在空闲时检查有效性, 默认false + config.setTestWhileIdle(false); + //逐出扫描的时间间隔(毫秒) 如果为负数,则不运行逐出线程, 默认-1 + config.setTimeBetweenEvictionRunsMillis(-1); + + connectionFactory.setPoolConfig(config); + + //初始化connectionFactory + connectionFactory.afterPropertiesSet(); + //实例化 + redisObjectTemplate = new StringRedisTemplate(connectionFactory); +// redisObjectTemplate.setConnectionFactory(connectionFactory); + redisObjectTemplate.afterPropertiesSet(); + } + + /** + * 获取Object + * + * @param key + * @return + */ + public T getObject(String type, String key, Class clazz, int expireTime) { + try { + String valueStr = redisObjectTemplate.opsForValue().get(type + RedisUserKey.Delimiter_colon + key); + if (valueStr == null) { + return null; + } + if (expireTime > 0) { + redisObjectTemplate.expire(type + key, expireTime, TimeUnit.SECONDS); + } + return gson.fromJson(valueStr, clazz); + } catch (RedisConnectionFailureException e) { + LOGGER.error("------------------Redis 连接失败------------------msg={}", e); + } + return null; + } + + public void delHash(String type, String key, String mapId) { + redisObjectTemplate.opsForHash().delete(type + ":" + key, mapId); + } + + /** + * 更新Object + * + * @param key + * @param value + */ + public void putObject(String type, String key, T value, int expireTime) { + try { + String valueStr = gson.toJson(value); + redisObjectTemplate.opsForValue().set(type + RedisUserKey.Delimiter_colon + key, valueStr); + if (expireTime > 0) { + redisObjectTemplate.expire(type + RedisUserKey.Delimiter_colon + key, expireTime, TimeUnit.SECONDS); + } + } catch (RedisConnectionFailureException e) { + LOGGER.error("------------------Redis 连接失败-----------------msg={}", e); + delObject(type, key); + return; + } + } + + /** + * 更新Map某hashKey + * + * @param type + * @param key + * @param mapKey + * @param value + */ + public void putMapEntry(String type, String key, String mapKey, T value, int expireTime) { + try { + String valueStr = gson.toJson(value); + redisObjectTemplate.opsForHash().put(type + RedisUserKey.Delimiter_colon + key, mapKey, valueStr); + if (expireTime > 0) { + redisObjectTemplate.expire(type + RedisUserKey.Delimiter_colon + key, expireTime, TimeUnit.SECONDS); + } + } catch (RedisConnectionFailureException e) { + LOGGER.error("------------------Redis 连接失败-----------------msg={}", e); + delObject(type, key); + } + } + public void putMap(String type, String key, String mapKey, String value, int expireTime) { + try { + redisObjectTemplate.opsForHash().put(type + RedisUserKey.Delimiter_colon + key, mapKey, value); + if (expireTime > 0) { + redisObjectTemplate.expire(type + RedisUserKey.Delimiter_colon + key, expireTime, TimeUnit.SECONDS); + } + } catch (RedisConnectionFailureException e) { + LOGGER.error("------------------Redis 连接失败-----------------msg={}", e); + delObject(type, key); + } + } + + /** + * 删除Map中某hashKey值 + * + * @param type + * @param key + * @param mapKey + */ + public void delMapKey(String type, String key, String... mapKey) { + try { + redisObjectTemplate.opsForHash().delete(type + RedisUserKey.Delimiter_colon + key, mapKey); + } catch (RedisConnectionFailureException e) { + LOGGER.error("------------------Redis 连接失败----------------msg={}", e); + } + } + + /** + * 删除Object + * + * @param type + * @param key + */ + public void delObject(String type, String key) { + try { + redisObjectTemplate.delete(type + RedisUserKey.Delimiter_colon + key); + } catch (RedisConnectionFailureException e) { + LOGGER.error("------------------Redis 连接失败----------------msg={}", e); + } catch (Exception e) { + redisObjectTemplate.delete(type + RedisUserKey.Delimiter_colon + key); + } + } + + /** + * 获取Map + * + * @param key + * @return + */ + public Map getMap(String key, Class clazz, int expireTime) { + try { + Map reslut = new HashMap<>(); + Map map = redisObjectTemplate.opsForHash().entries(key); + for (Map.Entry entry : map.entrySet()) { + reslut.put((String) entry.getKey(), gson.fromJson((String) entry.getValue(), clazz)); + } + if (expireTime > 0) { + redisObjectTemplate.expire(key, expireTime, TimeUnit.SECONDS); + } + return reslut; + } catch (RedisConnectionFailureException e) { + LOGGER.error("------------------Redis 连接失败----------------msg={}", e); + } + return null; + } + + /** + * 获取Map中某hashKey值 + * + * @param type + * @param key + * @param mapKey + * @return + */ + public T getMapValue(String type, String key, String mapKey, Class clazz, int expireTime) { + try { + String valueStr = (String) redisObjectTemplate.opsForHash().get(type + key, mapKey); + if (valueStr == null) { + return null; + } +// if(expireTime > 0){ +// redisObjectTemplate.expire(getKey(type, key), expireTime, TimeUnit.SECONDS); +// } + return gson.fromJson(valueStr, clazz); + } catch (RedisConnectionFailureException e) { + e.printStackTrace(); + LOGGER.error("------------------Redis 连接失败---------------msg={}", e); + } + return null; + } + + /** + * 更新Map + * + * @param type + * @param key + * @param value + */ + public void putMap(String type, String key, Map value, int expireTime) { + try { + Map map = new HashMap<>(); + for (Map.Entry entry : value.entrySet()) { + String valueStr = gson.toJson(entry.getValue()); + map.put(entry.getKey(), valueStr); + } + redisObjectTemplate.opsForHash().putAll(type + key, map); +// if (expireTime > 0) { +// redisObjectTemplate.expire(getKey(type, key), expireTime, TimeUnit.SECONDS); +// } + } catch (RedisConnectionFailureException e) { + e.printStackTrace(); + LOGGER.error("------------------Redis 连接失败---------------msg={}", e); + delObject(type, key); + } + } + + public long increment(String rkey) { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + try { + return redisObjectTemplate.opsForValue().increment(rkey, 1); + } catch (Exception e) { + sleep(FAILED_SLEEP); + } + } + throw new RedisRunTimeException("redisGetKeys excepiton" + rkey); + } + + public void zsetAddAall(String rkey, Set> items){ + for (int i = 0; i < MAX_TRY_TIMES; i++) { + try { + redisObjectTemplate.opsForZSet().add(rkey,items); + return; + } catch (Exception e) { + sleep(FAILED_SLEEP); + } + } + throw new RedisRunTimeException("redisGetKeys excepiton" + rkey); + } + + + + public String redisGetValue(String key) { + return redisObjectTemplate.opsForValue().get(key); + } + public void addSetValue(String key,int uid,int startTime) { + redisObjectTemplate.opsForZSet().add(key, String.valueOf(uid), startTime); + } + + public static void sleep(long millis) { + try { + Thread.sleep(millis); + } catch (Exception e) { + LOGGER.error("sleep->msg=null", e.getMessage(), e); + } + } +} diff --git a/src/main/java/com/jmfy/util/SDK37Constans.java b/src/main/java/com/jmfy/util/SDK37Constans.java new file mode 100644 index 0000000..fde64e1 --- /dev/null +++ b/src/main/java/com/jmfy/util/SDK37Constans.java @@ -0,0 +1,9 @@ +package com.jmfy.util; + +public class SDK37Constans { + public static String gid = "1006856"; + public static String pid = "1"; + public static String appkey = "$5wl2BKfodm4nqxVIC0XeHPb9ZRLQFz?"; + public static String payKey = "cxSeo5IBl6;kdPOJRgjEYHp9LsQMf+1V"; + public static String chatKey = "37opkldcs341"; +} diff --git a/src/main/java/com/jmfy/util/STableManager.java b/src/main/java/com/jmfy/util/STableManager.java new file mode 100644 index 0000000..65445ed --- /dev/null +++ b/src/main/java/com/jmfy/util/STableManager.java @@ -0,0 +1,114 @@ +package com.jmfy.util; + +import com.mongodb.DBObject; +import com.mongodb.util.JSON; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.data.mapping.context.MappingContext; +import org.springframework.data.mongodb.core.convert.MongoConverter; +import org.springframework.data.mongodb.core.mapping.MongoPersistentEntity; +import org.springframework.data.mongodb.core.mapping.MongoPersistentProperty; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.lang.reflect.Method; +import java.util.*; + +/** + * + * @author admin + * @date 2016/5/6 + */ +public class STableManager { + + private static final Logger LOGGER = LoggerFactory.getLogger(STableManager.class); + private MongoConverter mongoConverter; + private MappingContext, MongoPersistentProperty> mappingContext; + + public static STableManager getInstance() { + return Instance.instance; + } + + private static class Instance { + final static STableManager instance = new STableManager(); + } + private Map tableToMethodMap = new HashMap<>(); + private String path; + + public void init(ConfigurableApplicationContext applicationContext) { + mongoConverter = applicationContext.getBean(MongoConverter.class); + mappingContext = mongoConverter.getMappingContext(); + String osName = System.getProperty("os.name"); + if (osName.matches("^(?i)Windows.*$")) {// Window 系统 + path = "conf/jsonconf/"; + } else {// Linux 系统 + path = "./config/jsonconf/"; + } + } + public void initSTable() { + try { + + } catch (Exception e) { + LOGGER.error("initSTable->msg={}", e.getMessage(), e); + } + } + + + + private List findAll(Class clazz) { + List result = new ArrayList<>(); + MongoPersistentEntity entity = mappingContext.getPersistentEntity(clazz); + String collection = entity.getCollection(); + String line; + File file = new File(path + collection + ".json"); + if (!file.exists()) { + LOGGER.error("the table->={} is not exist", collection); + return result; + } + try (BufferedReader bufferedReader = new BufferedReader(new FileReader(file));) { + while ((line = bufferedReader.readLine()) != null) { + DBObject parse = (DBObject) JSON.parse(line); + T read = mongoConverter.read(clazz, parse); + result.add(read); + } + } catch (IOException e) { + e.printStackTrace(); + } + return result; + } + public void initSTable(String tables) { + String[] tableList = tables.split("\\|"); + Set methods = new HashSet<>(); + for (int i = 0; i < tableList.length; i++) { + if (tableList[i].isEmpty()) { + continue; + } + if (tableToMethodMap.get(tableList[i]) != null) { + methods.add(tableToMethodMap.get(tableList[i])); + LOGGER.info("tableList[i]->{}", tableList[i]); + } + } + for (String methodName : methods) { + try { + LOGGER.info("methodName->{}", methodName); + //TODO + if (methodName.trim().equals("initSActivityFriendRecall")) { + if (tableToMethodMap.get("s_c_activity").trim().equals("initSActivityFriendRecall")) { + tableToMethodMap.put("s_c_activity", "initSActivity"); + tableToMethodMap.put("s_c_activity_friend_recall", "initSActivityFriendRecall"); + methodName = "initSActivity"; + LOGGER.info("fix methodName success"); + } + } + Method method = this.getClass().getMethod(methodName); + method.invoke(getInstance()); + } catch (Exception e) { + LOGGER.error("initSTable->msg={}", e.getMessage(), e); + } finally { + } + } + } +} diff --git a/src/main/java/com/jmfy/util/SdkUtil.java b/src/main/java/com/jmfy/util/SdkUtil.java new file mode 100644 index 0000000..29e3f66 --- /dev/null +++ b/src/main/java/com/jmfy/util/SdkUtil.java @@ -0,0 +1,18 @@ +package com.jmfy.util; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Random; + +public class SdkUtil { + public static String getOrderIdByTime() { + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); + String newDate = sdf.format(new Date()); + String result = ""; + Random random = new Random(); + for (int i = 0; i < 3; i++) { + result += random.nextInt(10); + } + return newDate + result; + } +} diff --git a/src/main/java/com/jmfy/util/SeqUtils.java b/src/main/java/com/jmfy/util/SeqUtils.java new file mode 100644 index 0000000..a9dd589 --- /dev/null +++ b/src/main/java/com/jmfy/util/SeqUtils.java @@ -0,0 +1,45 @@ +package com.jmfy.util; + +import com.jmfy.model.CAutoIncrement; +import com.jmfy.modelVo.MarkedVo; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.data.mongodb.core.query.Update; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; + +/** + * Created by Administrator on 2015/10/23. + */ +@Component +public class SeqUtils { + @Resource + private Connect connect ; +// public int getSequence(MarkedVo marked ,String name) throws Exception { +// MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName); +// int cnt = 0; +// Query query = new Query(Criteria.where("name").is(name)); +// Update update = new Update().inc("cnt", 1); +// CAutoIncrement sequence = mongoTemplate.findAndModify(query, update, CAutoIncrement.class); +// if (sequence == null){ +// saveSeq(marked,name); +// cnt = 1; +// }else { +// cnt = sequence.getCnt(); +// } +// return cnt; +// } +// public static final String dbName ="ysj_core"; +// private void saveSeq(MarkedVo marked ,String name) throws Exception { +// MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName); +// CAutoIncrement sequence = new CAutoIncrement(name,2); +// mongoTemplate.insert(sequence); +// } + /* public void init() + { + instance = this; + instance.monTemplate = this.monTemplate; + }*/ +} diff --git a/src/main/java/com/jmfy/util/StringUtil.java b/src/main/java/com/jmfy/util/StringUtil.java new file mode 100644 index 0000000..754bb68 --- /dev/null +++ b/src/main/java/com/jmfy/util/StringUtil.java @@ -0,0 +1,217 @@ +package com.jmfy.util; + +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.regex.PatternSyntaxException; + +public class StringUtil { + + public static boolean isEmpty(String value) { + return value == null || "" == value || "".equals(value) || value.length() == 0; + } + + public static int string2Int(String value, int defaultValue) { + try { + return Integer.parseInt(value); + } catch (Exception e) { + return defaultValue; + } + } + + public static long string2Long(String value, long defaultValue) { + try { + return Long.parseLong(value); + } catch (Exception e) { + return defaultValue; + } + } + + public static float string2Float(String value, float defaultValue) { + try { + return Float.parseFloat(value); + } catch (Exception e) { + return defaultValue; + } + } + + public static String StringFilter(String str) throws PatternSyntaxException { + // 只允许字母和数字 + // String regEx = "[^a-zA-Z0-9]"; + // 清除掉所有特殊字符 + String regEx = "[`~!\"@#$%^&*()+=|{}':;',//[//].<>/?~!@#¥%……&*()——+|{}【】‘;:”“’。,、?ゞ詤_訁╪]"; + Pattern p = Pattern.compile(regEx); + Matcher m = p.matcher(str); + return m.replaceAll("").trim(); + } + + /** + * 判断字符串是数字 + * + * @param source + * @return + */ + public static boolean isDigital(String source) { + for (int i = source.length(); --i >= 0; ) { + if (!Character.isDigit(source.charAt(i))) { + return false; + } + } + return true; + } + + /** + * 随机生成长度的字符串 + * + * @param length + * @return + */ + public static final String randomString(int length) { + if (length < 1) { + length = 4; + } + Random randGen = new Random(); + String numbers = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789abcdefghjklmnpqrstuvwxyz"; + char[] numbersAndLetters = numbers.toCharArray(); + + char[] randBuffer = new char[length]; + for (int i = 0; i < randBuffer.length; i++) { + randBuffer[i] = numbersAndLetters[randGen.nextInt(numbersAndLetters.length)]; + } + return new String(randBuffer); + } + + /** + * 获取支付类型 + * + * @param type + * @return + */ + public static String getMoneyType(String type) { + if ("IAP".equals(type)) { + return "1"; //内购 + } else if ("WXAPP".equals(type)) { + return "2"; //微信 + } else if ("ALIPAY".equals(type)) { + return "3"; //支付宝 + } else { + return "-1";//未知 + } + } + + //unicode转换成中文 + public static String decodeUnicode(String theString) { + char aChar; + int len = theString.length(); + StringBuffer outBuffer = new StringBuffer(len); + for (int x = 0; x < len; ) { + aChar = theString.charAt(x++); + if (aChar == '\\') { + aChar = theString.charAt(x++); + if (aChar == 'u') { + // Read the xxxx + int value = 0; + for (int i = 0; i < 4; i++) { + aChar = theString.charAt(x++); + switch (aChar) { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + value = (value << 4) + aChar - '0'; + break; + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + value = (value << 4) + 10 + aChar - 'a'; + break; + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + value = (value << 4) + 10 + aChar - 'A'; + break; + default: + throw new IllegalArgumentException( + "Malformed \\uxxxx encoding."); + } + + } + outBuffer.append((char) value); + } else { + if (aChar == 't') + aChar = '\t'; + else if (aChar == 'r') + aChar = '\r'; + else if (aChar == 'n') + aChar = '\n'; + else if (aChar == 'f') + aChar = '\f'; + outBuffer.append(aChar); + } + } else + outBuffer.append(aChar); + } + return outBuffer.toString(); + } + + public static String unescapeUnicode(String str) { + StringBuffer b = new StringBuffer(); + Matcher m = Pattern.compile("\\\\u([0-9a-fA-F]{4})").matcher(str); + while (m.find()) + b.append((char) Integer.parseInt(m.group(1), 16)); + return b.toString(); + } + + public String toQueryString(List> list) { + StringBuilder builder = new StringBuilder(); + for (Map.Entry entry : list) { + String value = entry.getValue(); + if (value == null || value.isEmpty()) { + continue; + } + builder.append((builder.length() == 0 ? "" : "&") + entry.getKey() + "=" + value); + } + return builder.toString(); + } + + public static String mapToString(Map params){ + StringBuffer content = new StringBuffer(); + + // 按照key做排序 + List keys = new ArrayList(params.keySet()); + Collections.sort(keys); + + for (int i = 0; i < keys.size(); i++) + { + String key = (String) keys.get(i); + if ("sign".equals(key)) + { + continue; + } + String value = (String) params.get(key); + if (value != null) + { + content.append((i == 0 ? "" : "&") + key + "=" + value); + } + else + { + content.append((i == 0 ? "" : "&") + key + "="); + } + + } + return content.toString(); + } + +} diff --git a/src/main/java/com/jmfy/util/loginRedis/RedisApp.java b/src/main/java/com/jmfy/util/loginRedis/RedisApp.java new file mode 100644 index 0000000..6e577a2 --- /dev/null +++ b/src/main/java/com/jmfy/util/loginRedis/RedisApp.java @@ -0,0 +1,303 @@ +package com.jmfy.util.loginRedis; + +import com.google.gson.Gson; + + +import java.util.*; + +public class RedisApp { + private final static String Delimiter_colon = ":"; + private RedisUtil redisUtil; + private Gson gson = new Gson(); + private String areaId = "0"; + + public RedisApp(RedisUtil redisUtil) { + redisUtil = redisUtil; + } + + private String getKey(String type, K key, boolean withServerId) { + if (withServerId) { + return areaId + Delimiter_colon + type + Delimiter_colon + String.valueOf(key); + } else { + return type + Delimiter_colon + String.valueOf(key); + } + } + + /***************************************普通键值对操作***************************************/ + //设置键值 + public void set(final String type, final K key, T value, final int seconds, boolean withServerId) throws Exception { + String strValue = gson.toJson(value); + String fullKey = getKey(type, key, withServerId); + if (seconds <= 0) { + redisUtil.set(fullKey, strValue); + } else { + redisUtil.setex(fullKey, seconds, strValue); + } + } + + public void set(final String type, final String key, T value, final int seconds) throws Exception { + set(type, key, value, seconds, true); + } + + //取得键值 + public T get(final String type, final K key, final Class clazz, final int seconds, + boolean withServerId) throws Exception { + String fullKey = getKey(type, key, withServerId); + String strValue = redisUtil.get(fullKey); + if (strValue == null) { + return null; + } + return gson.fromJson(strValue,clazz); + } + + public T get(final String type, final K key, final Class clazz, final int seconds) throws Exception { + return get(type, key, clazz, seconds, false); + } + + //取得键值 + public void del(final String type, final K key, final boolean withServerId) throws Exception { + String fullKey = getKey(type, key, withServerId); + redisUtil.del(fullKey); + } + + public void del(final String type, final K key) throws Exception { + del(type, key, true); + } + + public boolean exists(final String type, final K key, final boolean withServerId) throws Exception { + String fullKey = getKey(type, key, withServerId); + return redisUtil.exists(fullKey); + } + + public boolean exists(final String type, final K key) throws Exception { + return exists(type, key, true); + } + + //设置过期时间 + public void expire(final String type, final K key, final int seconds, boolean withServerId) throws Exception { + String fullKey = getKey(type, key, withServerId); + redisUtil.expire(fullKey, seconds); + } + + public void expire(final String type, final String key, final int seconds) throws Exception { + expire(type, key, seconds, true); + } + + /***************************************以下是map操作***************************************/ + //转换map对象类型 + private Map converStringMap(Map mapValues) { + Map map = new HashMap(); + for (Map.Entry entry : mapValues.entrySet()) { + String strKey = String.valueOf(entry.getKey()); + String strValue = gson.toJson(entry.getValue()); + map.put(strKey, strValue); + } + return map; + } + + //设置map的 + public void hmset(final String type, final K key, final Map hash, int seconds, + boolean withServerId) throws Exception { + String fullKey = getKey(type, key, withServerId); + Map strHash = converStringMap(hash); + redisUtil.hmset(fullKey, strHash, seconds); + } + + public void hmset(final String type, final K key, final Map hash, final int seconds) throws Exception { + hmset(type, key, hash, seconds, true); + } + + //取得map下的子key + public Set hkeys(final String type, final K key, final int seconds, boolean withServerId) throws Exception { + String fullKey = getKey(type, key, withServerId); + return redisUtil.hkeys(fullKey); + } + + public Set hkeys(final String type, final K key, final int seconds) throws Exception { + return hkeys(type, key, seconds, true); + } + + //设置redis map一个键值 下的子key下的值 + public void hset(final String type, final K key, final String field, final T value, int seconds, + boolean withServerId) throws Exception { + String fullKey = getKey(type, key, withServerId); + String strValue = gson.toJson(value); + redisUtil.hset(fullKey, field, strValue, seconds); + } + + public void hset(final String type, final K key, final String field, final T value, int seconds) throws Exception { + hset(type, key, field, value, seconds, true); + } + + //转换map对象类型 + private Map converClassMap(final Map mapValues, final Class valueClazz) { + Map map = new HashMap<>(); + for (Map.Entry entry : mapValues.entrySet()) { + T value = gson.fromJson(entry.getValue(), valueClazz); + map.put(entry.getKey(), value); + } + return map; + } + + //取redis map全部数据的直接方法 + public Map hgetAll(final String type, final String key, + final Class valueClazz, int seconds, + boolean withServerId) throws Exception { + String fullKey = getKey(type, key, withServerId); + Map mapValues = redisUtil.hgetAll(fullKey); + return converClassMap(mapValues, valueClazz); + } + + public Map hgetAll(final String type, final String key, + final Class valueClazz, int seconds) throws Exception { + return hgetAll(type, key, valueClazz, seconds, true); + } + + //获取redis map下一个key的值的直接方法 + public T hmget(final String type, final K key, final SK field, final Class clazz, int seconds, + boolean withServerId) throws Exception { + String fullKey = getKey(type, key, withServerId); + String strField = String.valueOf(field); + List listStrs = redisUtil.hmget(fullKey, strField); + if (listStrs == null || listStrs.size() <= 0) { + return null; + } + return gson.fromJson(listStrs.get(0), clazz); + } + + public T hmget(final String type, final K key, final SK field, final Class clazz, int seconds) throws Exception { + return hmget(type, key, field, clazz, seconds, true); + } + + //删除子key + public void hdel(final String type, final K key, final SK field, boolean withServerId) throws Exception { + String fullKey = getKey(type, key, withServerId); + String strField = String.valueOf(field); + redisUtil.hdel(fullKey, strField); + } + + public void hdel(final String type, final String key, final String field) throws Exception { + hdel(type, key, field, true); + } + + /***************************************以下是list操作***************************************/ + //添加list数据 + public long lpush(final String type, final K key, final int seconds, boolean withServerId, + final T... strings) throws Exception { + String fullKey = getKey(type, key, withServerId); + String[] strValues = new String[strings.length]; + for (int i = 0; i < strings.length; i++) { + strValues[i] = gson.toJson(strings[i]); + } + return redisUtil.lpush(fullKey, seconds, strValues); + } + + public long lpush(final String type, final K key, final int seconds, final T... strings) throws Exception { + return lpush(type, key, seconds, true, strings); + } + + + //从左面保留 + public void ltrimLeft(final String type, final K key, final int start, final int end) throws Exception { + String fullKey = getKey(type, key, true); + redisUtil.ltrim(fullKey, start, end); + } + + //移除最早的元素 + public T rpop(final String type, final K key, final Class clazz, boolean withServerId) throws Exception { + String fullKey = getKey(type, key, withServerId); + String strValue = redisUtil.rpop(fullKey); + return gson.fromJson(strValue, clazz); + } + + public T rpop(final String type, final K key, final Class clazz) throws Exception { + return rpop(type, key, clazz); + } + + //添加一个新的元素,如果list超过了count,则删除最早的 + public long lpushRpop(final String type, final String key, + final T value, final int count, final int seconds, boolean withServerId) throws Exception { + String fullKey = getKey(type, key, withServerId); + long len = redisUtil.llen(fullKey); + if (count > 0 && len >= count) { + for (int i = 0; i < len - count + 1; i++) { + redisUtil.rpop(fullKey); + } + } + String strValue = gson.toJson(value); + return redisUtil.lpush(fullKey, seconds, strValue); + } + + public long lpushRpop(final String type, final String key, final T value, + final int count, final int seconds) throws Exception { + return lpushRpop(type, key, value, count, seconds, true); + } + + private List converClassList(final List listValues, final Class clazz) { + List list = new ArrayList<>(); + for (String strValue : listValues) { + T value = gson.fromJson(strValue, clazz); + list.add(value); + } + + return list; + } + + //从头开始,向未取数据 + public List lrange(final String type, final K key, final Class clazz, + final long start, final long end, + final int seconds, boolean withServerId) throws Exception { + String fullKey = getKey(type, key, withServerId); + List listValues = redisUtil.lrange(fullKey, start, end); + return converClassList(listValues, clazz); + } + + public List lrange(final String type, final K key, final Class clazz, + final long start, final long end, final int seconds) throws Exception { + return lrange(type, key, clazz, start, end, seconds, true); + } + + //取得list的全部数据 + public List lgetAll(final String type, final K key, final Class clazz, final int seconds, + boolean withServerId) throws Exception { + return lrange(type, key, clazz, 0, -1, seconds, withServerId); + } + + public List lgetAll(final String type, final K key, final Class clazz, final int seconds) throws Exception { + return lgetAll(type, key, clazz, seconds, true); + } + + //自增 + public Long incr(final String type, final String key, final boolean withServerId) throws Exception { + String fullKey = getKey(type, key, withServerId); + return redisUtil.incr(fullKey); + } + + public Long incr(final String type, final String key) throws Exception { + return incr(type, key, true); + } + + //redis分布式锁,加锁 + public boolean tryGetDistributedLock(final String type, final String key, final String requestId, + final int expireTime, final boolean withServerId) throws Exception { + String fullKey = getKey(type, key, withServerId); + return redisUtil.tryGetDistributedLock(fullKey, requestId, expireTime); + } + + public boolean tryGetDistributedLock(final String type, final String key, final String requestId, + final int expireTime) throws Exception { +// String fullKey = getKey(type, key, true); + return tryGetDistributedLock(type, key, requestId, expireTime, true); + } + + //redis分布式锁,解锁 + public boolean releaseDistributedLock(final String type, final String key, final String requestId, + final boolean withServerId) throws Exception { + String fullKey = getKey(type, key, withServerId); + return redisUtil.releaseDistributedLock(fullKey, requestId); + } + + public boolean releaseDistributedLock(final String type, final String key, final String requestId) throws Exception { + return releaseDistributedLock(type, key, requestId, true); + } +} diff --git a/src/main/java/com/jmfy/util/loginRedis/RedisKey.java b/src/main/java/com/jmfy/util/loginRedis/RedisKey.java new file mode 100644 index 0000000..9c324f3 --- /dev/null +++ b/src/main/java/com/jmfy/util/loginRedis/RedisKey.java @@ -0,0 +1,18 @@ +package com.jmfy.util.loginRedis; + +public interface RedisKey { + String TOKEN = "JL_TOKEN"; + String PIDGIDTEMP = "PIDGIDTEMP"; + String LOGIN_TOKEN = "JL_LOGIN_TOKEN"; + + /** + * 最近登录服务器列表 + */ + String USER_SERVER_INFO = "JL_USER_SERVER_INFO"; + + /** + * 公告列表 + */ + String NOTICE = "NOTICE"; + String GLOBAL_SYS_PRO= "GLOBAL_SYS_PRO"; +} diff --git a/src/main/java/com/jmfy/util/loginRedis/RedisUtil.java b/src/main/java/com/jmfy/util/loginRedis/RedisUtil.java new file mode 100644 index 0000000..b87d282 --- /dev/null +++ b/src/main/java/com/jmfy/util/loginRedis/RedisUtil.java @@ -0,0 +1,411 @@ +package com.jmfy.util.loginRedis; + + + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import redis.clients.jedis.Jedis; +import redis.clients.jedis.JedisPool; +import redis.clients.jedis.JedisPoolConfig; + +import java.util.*; + +public class RedisUtil { + private static final Logger LOGGER = LoggerFactory.getLogger(RedisUtil.class); + + private static int MAX_TRY_TIMES = 3; //最大尝试次数,保障获取/存储成功 + private static int FAILED_SLEEP = 2; //每次失败最大停顿时间 + + private JedisPool jedisPool;//非切片连接池 + + protected void init() { + + } + + /***************************************普通键值对操作***************************************/ + //设置键值 + protected void set(final String key, String value) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + jedis.set(key, value); + return; + } catch (Exception e) { + LOGGER.error("set->i={}: key={}, value={}", i, key, value, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + throw new Exception("RedisUtil::set exception"); + } + + //设置键值,带过期时间 + protected void setex(final String key, final int seconds, final String value) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + jedis.setex(key, seconds, value); + return; + } catch (Exception e) { + LOGGER.error("setex->i={},key={},value={},seconds={}", i, key, value, seconds, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + throw new Exception("RedisUtil::setex exception"); + } + + //取得键的值 + protected String get(final String key) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + return jedis.get(key); + } catch (Exception e) { + LOGGER.error("get->i={},key={}", i, key, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + throw new Exception("RedisUtil::get exception"); + } + + //删除键值 + protected void del(String key) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + jedis.del(key); + return; + } catch (Exception e) { + LOGGER.error("del->i={},key={}", i, key, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + throw new Exception("RedisUtil::del exception"); + } + + //删除键值 + protected boolean exists(String key) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + return jedis.exists(key); + } catch (Exception e) { + LOGGER.error("exists->i={},key={}", i, key, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + throw new Exception("RedisUtil::exists exception"); + } + + //设置过期时间 + protected Long expire(final String key, final int seconds) throws Exception { + if (seconds <= 0) { + return 0L; + } + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + return jedis.expire(key, seconds); + } catch (Exception e) { + LOGGER.error("expire->i={},key={},seconds={}", i, key, seconds, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + throw new Exception("RedisUtil::del exception"); + } + + /***************************************以下是map操作***************************************/ + //添加redis map + protected void hmset(final String key, final Map hash, int seconds) throws Exception { + int i; + for (i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + jedis.hmset(key, hash); + break; + } catch (Exception e) { + LOGGER.error("hmset->i={},key={}", i, key, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + expire(key, seconds); + if (i >= MAX_TRY_TIMES) { + throw new Exception("RedisUtil::hmset exception"); + } + } + + //取得主key下的所有子key + protected Set hkeys(final String key) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + Set keySet = jedis.hkeys(key); + return keySet; + } catch (Exception e) { + LOGGER.error("hkeys->i={},key={}", i, key, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + throw new Exception("RedisUtil::hkeys exception"); + } + + //设置redis map一个键值 下的子key下的值 + protected void hset(final String key, final String field, final String value, int seconds) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + jedis.hset(key, field, value); + return; + } catch (Exception e) { + LOGGER.error("hset->i={},key={},field={},value={}", i, key, field, value, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + expire(key, seconds); + throw new Exception("RedisUtil::hset exception"); + } + + //取redis map全部数据的直接方法 + protected Map hgetAll(final String key) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + return jedis.hgetAll(key); + } catch (Exception e) { + LOGGER.error("hgetAll->i={},key={}", i, key, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + throw new Exception("RedisUtil::hgetAll exception"); + } + + //获取redis map下一个key的值的直接方法 + protected List hmget(final String key, final String... fields) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + return jedis.hmget(key, fields); + } catch (Exception e) { + LOGGER.error("hmget->i={},key={}", i, key, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + throw new Exception("RedisUtil::hmget exception"); + } + + //删除子key + protected void hdel(final String key, final String... fields) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + jedis.hdel(key, fields); + return; + } catch (Exception e) { + LOGGER.error("hdel->i={},key={},fields={}", i, key, fields, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + throw new Exception("RedisUtil::hdel exception"); + } + + /***************************************以下是list操作***************************************/ + //添加list数据 + protected long lpush(final String key, final int seconds, final String... strings) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + return jedis.lpush(key, strings); + } catch (Exception e) { + LOGGER.error("lpush->i={},key={},value={}", i, key, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + expire(key, seconds); + throw new Exception("RedisUtil::lpush exception"); + } + + protected void ltrim(final String key, final int start, final int end) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + jedis.ltrim(key, start, end); + return; + } catch (Exception e) { + LOGGER.error("lpush->i={},key={},value={}", i, key, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + throw new Exception("RedisUtil::ltrim exception"); + } + + + //删除元素 + protected void lrem(final String key, final long count, final String value) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + jedis.lrem(key, count, value); + return; + } catch (Exception e) { + LOGGER.error("lrem->i={},key={},count={},value={}", i, key, count, value, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + throw new Exception("RedisUtil::lrem exception"); + } + + //移除最好的元素 + protected String rpop(final String key) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + return jedis.rpop(key); + } catch (Exception e) { + LOGGER.error("rpop->i={},key={}", i, key, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + throw new Exception("RedisUtil::rpop exception"); + } + + //取得指定范围的元素 + protected List lrange(final String key, final long start, final long end) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + return jedis.lrange(key, start, end); + } catch (Exception e) { + LOGGER.error("lrange->i={},key={},start={},end={}", i, key, start, end, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + throw new Exception("RedisUtil::lrange exception"); + } + + //取得list的长度 + protected Long llen(final String key) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + return jedis.llen(key); + } catch (Exception e) { + LOGGER.error("llen->i={},key={}", i, key, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + throw new Exception("RedisUtil::llen exception"); + } + + //自增 + protected Long incr(final String key) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + return jedis.incr(key); + } catch (Exception e) { + LOGGER.error("incr->i={},key={}", i, key, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + throw new Exception("RedisUtil::incr exception"); + } + + private static final String LOCK_SUCCESS = "OK"; + private static final String SET_IF_NOT_EXIST = "NX"; + private static final String SET_WITH_EXPIRE_TIME = "PX"; + + /** + * 尝试获取分布式锁 + * + * @param lockKey 锁 + * @param requestId 请求标识 + * @param expireTime 超期时间,理论上应该比较短,一次请求在500毫秒内即可完成,因此过期时间不应大于1秒 + * @return 是否获取成功 + */ + protected boolean tryGetDistributedLock(String lockKey, String requestId, int expireTime) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + String result = jedis.set(lockKey, requestId, SET_IF_NOT_EXIST, SET_WITH_EXPIRE_TIME, expireTime); + if (LOCK_SUCCESS.equals(result)) { + return true; + } + LOGGER.error("tryGetDistributedLock->i={},key={};failed", i, lockKey); + TimeUtil.sleep(200); //理论上锁冲突的几率很小,如果连续三次加锁失败,直接抛出异常 + } catch (Exception e) { + LOGGER.error("tryGetDistributedLock->i={},key={}", i, lockKey, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + throw new Exception("RedisUtil::tryGetDistributedLock exception"); + } + + private static final Long RELEASE_SUCCESS = 1L; + + /** + * 释放分布式锁 + * + * @param lockKey 锁 + * @param requestId 请求标识 + * @return 是否释放成功 + */ + protected boolean releaseDistributedLock(String lockKey, String requestId) throws Exception { + for (int i = 0; i < MAX_TRY_TIMES; i++) { + Jedis jedis = jedisPool.getResource(); + try { + String script = "if redis.call('get', KEYS[1]) == ARGV[1] then return redis.call('del', KEYS[1]) else return 0 end"; + Object result = jedis.eval(script, Collections.singletonList(lockKey), Collections.singletonList(requestId)); + + if (RELEASE_SUCCESS.equals(result)) { + return true; + } + return false; //解锁失败,等待过期自动解锁即可 + } catch (Exception e) { + LOGGER.error("releaseDistributedLock->i={},key={}", i, lockKey, e); + TimeUtil.sleep(FAILED_SLEEP); + } finally { + jedis.close(); + } + } + throw new Exception("RedisUtil::releaseDistributedLock exception"); + } +} diff --git a/src/main/java/com/jmfy/util/loginRedis/TimeUtil.java b/src/main/java/com/jmfy/util/loginRedis/TimeUtil.java new file mode 100644 index 0000000..0f3ebd4 --- /dev/null +++ b/src/main/java/com/jmfy/util/loginRedis/TimeUtil.java @@ -0,0 +1,84 @@ +package com.jmfy.util.loginRedis; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; + + +/** + * 时间的工具类 + */ +public class TimeUtil { + + private static final Logger LOGGER = LoggerFactory.getLogger(TimeUtil.class); + + private final static SimpleDateFormat sdf = new SimpleDateFormat("YYYY-MM-DD hh:mm:ss"); + private static final DateFormat ymdhmsFormat_new = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + public static void sleep(long millis) { + try { + Thread.sleep(millis); + } catch (Exception e) { + LOGGER.error("sleep->msg=null", e.getMessage(), e); + } + } + + public static boolean inCorrectTime(String startTime, String endTime) throws Exception { + long now = System.currentTimeMillis(); + long start = sdf.parse(startTime).getTime(); + long end = sdf.parse(endTime).getTime(); + if (now < start) { + return false; + } + if (now > end) { + return false; + } + return true; + } + + public static long fixTime(String fixTime) { + String[] temp = fixTime.split(":"); + int hour = Integer.parseInt(temp[0]); + int minute = Integer.parseInt(temp[1]); + int second = Integer.parseInt(temp[2]); + + Calendar c = Calendar.getInstance(); + c.set(Calendar.HOUR_OF_DAY, hour); + c.set(Calendar.MINUTE, minute); + c.set(Calendar.SECOND, second); + c.set(Calendar.MILLISECOND, 0); + return c.getTimeInMillis(); + } + + /** + * 获取周几 + * + * @return + */ + public static int getDayOfWeek() { + Calendar calendar = Calendar.getInstance(); + calendar.setTimeInMillis(System.currentTimeMillis()); + int week = calendar.get(Calendar.DAY_OF_WEEK) - 1; + return (week == 0) ? 7 : week; + } + + /** + * 获取指定时间 周几 + * + * @return + */ + public static int getDayOfWeek(long time) { + Calendar calendar = Calendar.getInstance(); + calendar.setTimeInMillis(time); + int week = calendar.get(Calendar.DAY_OF_WEEK) - 1; + return (week == 0) ? 7 : week; + } + + public static String getTimeStamp(Long time) { + Date data = new Date(time); + return ymdhmsFormat_new.format(data); + } +} \ No newline at end of file diff --git a/src/main/java/com/jmfy/util/mongo/AddMongoClient.java b/src/main/java/com/jmfy/util/mongo/AddMongoClient.java new file mode 100644 index 0000000..fc9d5b8 --- /dev/null +++ b/src/main/java/com/jmfy/util/mongo/AddMongoClient.java @@ -0,0 +1,124 @@ +package com.jmfy.util.mongo; + +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.jmfy.Application; +import com.jmfy.dao.ServerInfoDao; +import com.jmfy.dao.impl.ServerInfoDaoImpl; +import com.jmfy.handler.MarkedInfo; +import com.jmfy.model.CDataBaseVersion; +import com.jmfy.model.ServerInfo; +import com.jmfy.modelVo.MarkedVo; +import com.jmfy.util.Connect; +import com.jmfy.util.STableManager; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.ConfigurableApplicationContext; + +import java.io.*; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; + +/** + * @author Administrator + */ +public class AddMongoClient extends Thread { + private static AddMongoClient addMongoClient = null; + private static Connect connect = null; + private static ServerInfoDao serverDao = null; + private int currentDbVersion; + private static final Logger LOGGER = LoggerFactory.getLogger(AddMongoClient.class); + public static List serverIdList = new CopyOnWriteArrayList<>(); + + private AddMongoClient() { + + } + + @Override + public void run() { + while (true) { + try { + List addServerInfo = new ArrayList<>(); + MarkedVo markedVo = new MarkedVo(); + List serverInfoList; + if (Application.isLAN == 0) { + markedVo.setPlatId(Application.plat); + serverInfoList = serverDao.findServerInfoByPlat(markedVo); + if (serverInfoList != null) { + addServerInfo.addAll(serverInfoList); + for (ServerInfo serverInfo : addServerInfo) { + if (!serverIdList.contains(serverInfo.getServer_id())) { + String mongoUrl = MarkedInfo.getMongoUrl(serverInfo.getServer_id()); + boolean isSuccess = connect.addMongoClinent(mongoUrl, serverInfo.getServer_id()); + if (!isSuccess) { + continue; + } + serverIdList.add(serverInfo.getServer_id()); + LOGGER.info("add serverId:{},mongo url:{}", serverInfo.getServer_id(), mongoUrl); + } + } + } + } + //静态表热更新 + updateSTables(); + } catch (Exception e) { + LOGGER.error("run->msg={}", e.getMessage(), e); + } finally { + try { + int time = 60 * 1000; + Thread.sleep(time); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + } + } + public void updateSTables() { + CDataBaseVersion version = getCDataBaseVersion(); + if (version != null && currentDbVersion != version.getVersion()) { + LOGGER.info("currentVersion is {} , dbVersion is {} ,so stable will update ... ", currentDbVersion, version.getVersion()); + if (!version.getTables().isEmpty()) { + STableManager.getInstance().initSTable(version.getTables()); + } else { + STableManager.getInstance().initSTable(); + } + setCurrentDbVersion(version.getVersion()); + LOGGER.info("stable has update finished"); + } + } + public void setCurrentDbVersion(int currentDbVersion) { + this.currentDbVersion = currentDbVersion; + } + private CDataBaseVersion getCDataBaseVersion() { + File file ; + if (Application.isLAN ==0 || Application.isLAN ==1){ + file = new File("./config/jsonconf/c_database_version.json"); + }else{ + file = new File("conf/jsonconf/c_database_version.json"); + } + if (!file.exists()) { + LOGGER.info("the c_database_version is not exist"); + return null; + } + try (InputStream in = new FileInputStream(file)) { + ObjectMapper mapper = new ObjectMapper(); + mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + return mapper.readValue(in, CDataBaseVersion.class); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + return null; + + } + + public static void startAddMongoClient(ConfigurableApplicationContext configurableApplicationContext) { + serverDao = configurableApplicationContext.getBean(ServerInfoDaoImpl.class); + connect = configurableApplicationContext.getBean(Connect.class); + addMongoClient = new AddMongoClient(); + addMongoClient.setName("addMongoClient"); + addMongoClient.start(); + } +} diff --git a/src/main/java/com/ljsd/jieling/thrift/idl/InvalidOperException.java b/src/main/java/com/ljsd/jieling/thrift/idl/InvalidOperException.java new file mode 100644 index 0000000..e631d1a --- /dev/null +++ b/src/main/java/com/ljsd/jieling/thrift/idl/InvalidOperException.java @@ -0,0 +1,504 @@ +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.ljsd.jieling.thrift.idl; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +/** + * Structs can also be exceptions, if they are nasty. + */ +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2023-7-10") +public class InvalidOperException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidOperException"); + + private static final org.apache.thrift.protocol.TField ERROR_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("errorCode", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField ERROR_MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("errorMessage", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new InvalidOperExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new InvalidOperExceptionTupleSchemeFactory()); + } + + public int errorCode; // required + public String errorMessage; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ERROR_CODE((short)1, "errorCode"), + ERROR_MESSAGE((short)2, "errorMessage"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ERROR_CODE + return ERROR_CODE; + case 2: // ERROR_MESSAGE + return ERROR_MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ERRORCODE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ERROR_CODE, new org.apache.thrift.meta_data.FieldMetaData("errorCode", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.ERROR_MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("errorMessage", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidOperException.class, metaDataMap); + } + + public InvalidOperException() { + } + + public InvalidOperException( + int errorCode, + String errorMessage) + { + this(); + this.errorCode = errorCode; + setErrorCodeIsSet(true); + this.errorMessage = errorMessage; + } + + /** + * Performs a deep copy on other. + */ + public InvalidOperException(InvalidOperException other) { + __isset_bitfield = other.__isset_bitfield; + this.errorCode = other.errorCode; + if (other.isSetErrorMessage()) { + this.errorMessage = other.errorMessage; + } + } + + public InvalidOperException deepCopy() { + return new InvalidOperException(this); + } + + @Override + public void clear() { + setErrorCodeIsSet(false); + this.errorCode = 0; + this.errorMessage = null; + } + + public int getErrorCode() { + return this.errorCode; + } + + public InvalidOperException setErrorCode(int errorCode) { + this.errorCode = errorCode; + setErrorCodeIsSet(true); + return this; + } + + public void unsetErrorCode() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ERRORCODE_ISSET_ID); + } + + /** Returns true if field errorCode is set (has been assigned a value) and false otherwise */ + public boolean isSetErrorCode() { + return EncodingUtils.testBit(__isset_bitfield, __ERRORCODE_ISSET_ID); + } + + public void setErrorCodeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ERRORCODE_ISSET_ID, value); + } + + public String getErrorMessage() { + return this.errorMessage; + } + + public InvalidOperException setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + public void unsetErrorMessage() { + this.errorMessage = null; + } + + /** Returns true if field errorMessage is set (has been assigned a value) and false otherwise */ + public boolean isSetErrorMessage() { + return this.errorMessage != null; + } + + public void setErrorMessageIsSet(boolean value) { + if (!value) { + this.errorMessage = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ERROR_CODE: + if (value == null) { + unsetErrorCode(); + } else { + setErrorCode((Integer)value); + } + break; + + case ERROR_MESSAGE: + if (value == null) { + unsetErrorMessage(); + } else { + setErrorMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ERROR_CODE: + return Integer.valueOf(getErrorCode()); + + case ERROR_MESSAGE: + return getErrorMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ERROR_CODE: + return isSetErrorCode(); + case ERROR_MESSAGE: + return isSetErrorMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof InvalidOperException) + return this.equals((InvalidOperException)that); + return false; + } + + public boolean equals(InvalidOperException that) { + if (that == null) + return false; + + boolean this_present_errorCode = true; + boolean that_present_errorCode = true; + if (this_present_errorCode || that_present_errorCode) { + if (!(this_present_errorCode && that_present_errorCode)) + return false; + if (this.errorCode != that.errorCode) + return false; + } + + boolean this_present_errorMessage = true && this.isSetErrorMessage(); + boolean that_present_errorMessage = true && that.isSetErrorMessage(); + if (this_present_errorMessage || that_present_errorMessage) { + if (!(this_present_errorMessage && that_present_errorMessage)) + return false; + if (!this.errorMessage.equals(that.errorMessage)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_errorCode = true; + list.add(present_errorCode); + if (present_errorCode) + list.add(errorCode); + + boolean present_errorMessage = true && (isSetErrorMessage()); + list.add(present_errorMessage); + if (present_errorMessage) + list.add(errorMessage); + + return list.hashCode(); + } + + @Override + public int compareTo(InvalidOperException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(other.isSetErrorCode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetErrorCode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCode, other.errorCode); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetErrorMessage()).compareTo(other.isSetErrorMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetErrorMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorMessage, other.errorMessage); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("InvalidOperException("); + boolean first = true; + + sb.append("errorCode:"); + sb.append(this.errorCode); + first = false; + if (!first) sb.append(", "); + sb.append("errorMessage:"); + if (this.errorMessage == null) { + sb.append("null"); + } else { + sb.append(this.errorMessage); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class InvalidOperExceptionStandardSchemeFactory implements SchemeFactory { + public InvalidOperExceptionStandardScheme getScheme() { + return new InvalidOperExceptionStandardScheme(); + } + } + + private static class InvalidOperExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidOperException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ERROR_CODE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.errorCode = iprot.readI32(); + struct.setErrorCodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ERROR_MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.errorMessage = iprot.readString(); + struct.setErrorMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, InvalidOperException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC); + oprot.writeI32(struct.errorCode); + oprot.writeFieldEnd(); + if (struct.errorMessage != null) { + oprot.writeFieldBegin(ERROR_MESSAGE_FIELD_DESC); + oprot.writeString(struct.errorMessage); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class InvalidOperExceptionTupleSchemeFactory implements SchemeFactory { + public InvalidOperExceptionTupleScheme getScheme() { + return new InvalidOperExceptionTupleScheme(); + } + } + + private static class InvalidOperExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, InvalidOperException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetErrorCode()) { + optionals.set(0); + } + if (struct.isSetErrorMessage()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetErrorCode()) { + oprot.writeI32(struct.errorCode); + } + if (struct.isSetErrorMessage()) { + oprot.writeString(struct.errorMessage); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, InvalidOperException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.errorCode = iprot.readI32(); + struct.setErrorCodeIsSet(true); + } + if (incoming.get(1)) { + struct.errorMessage = iprot.readString(); + struct.setErrorMessageIsSet(true); + } + } + } + +} + diff --git a/src/main/java/com/ljsd/jieling/thrift/idl/ItemConfig.java b/src/main/java/com/ljsd/jieling/thrift/idl/ItemConfig.java new file mode 100644 index 0000000..a704544 --- /dev/null +++ b/src/main/java/com/ljsd/jieling/thrift/idl/ItemConfig.java @@ -0,0 +1,717 @@ +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.ljsd.jieling.thrift.idl; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2023-10-9") +public class ItemConfig implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ItemConfig"); + + private static final org.apache.thrift.protocol.TField PROP_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("propCode", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField PROP_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("propName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PROP_DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("propDesc", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField PROP_ICON_FIELD_DESC = new org.apache.thrift.protocol.TField("propIcon", org.apache.thrift.protocol.TType.STRING, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ItemConfigStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ItemConfigTupleSchemeFactory()); + } + + public String propCode; // optional + public String propName; // optional + public String propDesc; // optional + public String propIcon; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PROP_CODE((short)1, "propCode"), + PROP_NAME((short)2, "propName"), + PROP_DESC((short)3, "propDesc"), + PROP_ICON((short)4, "propIcon"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PROP_CODE + return PROP_CODE; + case 2: // PROP_NAME + return PROP_NAME; + case 3: // PROP_DESC + return PROP_DESC; + case 4: // PROP_ICON + return PROP_ICON; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.PROP_CODE,_Fields.PROP_NAME,_Fields.PROP_DESC,_Fields.PROP_ICON}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.PROP_CODE, new org.apache.thrift.meta_data.FieldMetaData("propCode", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PROP_NAME, new org.apache.thrift.meta_data.FieldMetaData("propName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PROP_DESC, new org.apache.thrift.meta_data.FieldMetaData("propDesc", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PROP_ICON, new org.apache.thrift.meta_data.FieldMetaData("propIcon", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ItemConfig.class, metaDataMap); + } + + public ItemConfig() { + } + + /** + * Performs a deep copy on other. + */ + public ItemConfig(ItemConfig other) { + if (other.isSetPropCode()) { + this.propCode = other.propCode; + } + if (other.isSetPropName()) { + this.propName = other.propName; + } + if (other.isSetPropDesc()) { + this.propDesc = other.propDesc; + } + if (other.isSetPropIcon()) { + this.propIcon = other.propIcon; + } + } + + public ItemConfig deepCopy() { + return new ItemConfig(this); + } + + @Override + public void clear() { + this.propCode = null; + this.propName = null; + this.propDesc = null; + this.propIcon = null; + } + + public String getPropCode() { + return this.propCode; + } + + public ItemConfig setPropCode(String propCode) { + this.propCode = propCode; + return this; + } + + public void unsetPropCode() { + this.propCode = null; + } + + /** Returns true if field propCode is set (has been assigned a value) and false otherwise */ + public boolean isSetPropCode() { + return this.propCode != null; + } + + public void setPropCodeIsSet(boolean value) { + if (!value) { + this.propCode = null; + } + } + + public String getPropName() { + return this.propName; + } + + public ItemConfig setPropName(String propName) { + this.propName = propName; + return this; + } + + public void unsetPropName() { + this.propName = null; + } + + /** Returns true if field propName is set (has been assigned a value) and false otherwise */ + public boolean isSetPropName() { + return this.propName != null; + } + + public void setPropNameIsSet(boolean value) { + if (!value) { + this.propName = null; + } + } + + public String getPropDesc() { + return this.propDesc; + } + + public ItemConfig setPropDesc(String propDesc) { + this.propDesc = propDesc; + return this; + } + + public void unsetPropDesc() { + this.propDesc = null; + } + + /** Returns true if field propDesc is set (has been assigned a value) and false otherwise */ + public boolean isSetPropDesc() { + return this.propDesc != null; + } + + public void setPropDescIsSet(boolean value) { + if (!value) { + this.propDesc = null; + } + } + + public String getPropIcon() { + return this.propIcon; + } + + public ItemConfig setPropIcon(String propIcon) { + this.propIcon = propIcon; + return this; + } + + public void unsetPropIcon() { + this.propIcon = null; + } + + /** Returns true if field propIcon is set (has been assigned a value) and false otherwise */ + public boolean isSetPropIcon() { + return this.propIcon != null; + } + + public void setPropIconIsSet(boolean value) { + if (!value) { + this.propIcon = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PROP_CODE: + if (value == null) { + unsetPropCode(); + } else { + setPropCode((String)value); + } + break; + + case PROP_NAME: + if (value == null) { + unsetPropName(); + } else { + setPropName((String)value); + } + break; + + case PROP_DESC: + if (value == null) { + unsetPropDesc(); + } else { + setPropDesc((String)value); + } + break; + + case PROP_ICON: + if (value == null) { + unsetPropIcon(); + } else { + setPropIcon((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PROP_CODE: + return getPropCode(); + + case PROP_NAME: + return getPropName(); + + case PROP_DESC: + return getPropDesc(); + + case PROP_ICON: + return getPropIcon(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PROP_CODE: + return isSetPropCode(); + case PROP_NAME: + return isSetPropName(); + case PROP_DESC: + return isSetPropDesc(); + case PROP_ICON: + return isSetPropIcon(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ItemConfig) + return this.equals((ItemConfig)that); + return false; + } + + public boolean equals(ItemConfig that) { + if (that == null) + return false; + + boolean this_present_propCode = true && this.isSetPropCode(); + boolean that_present_propCode = true && that.isSetPropCode(); + if (this_present_propCode || that_present_propCode) { + if (!(this_present_propCode && that_present_propCode)) + return false; + if (!this.propCode.equals(that.propCode)) + return false; + } + + boolean this_present_propName = true && this.isSetPropName(); + boolean that_present_propName = true && that.isSetPropName(); + if (this_present_propName || that_present_propName) { + if (!(this_present_propName && that_present_propName)) + return false; + if (!this.propName.equals(that.propName)) + return false; + } + + boolean this_present_propDesc = true && this.isSetPropDesc(); + boolean that_present_propDesc = true && that.isSetPropDesc(); + if (this_present_propDesc || that_present_propDesc) { + if (!(this_present_propDesc && that_present_propDesc)) + return false; + if (!this.propDesc.equals(that.propDesc)) + return false; + } + + boolean this_present_propIcon = true && this.isSetPropIcon(); + boolean that_present_propIcon = true && that.isSetPropIcon(); + if (this_present_propIcon || that_present_propIcon) { + if (!(this_present_propIcon && that_present_propIcon)) + return false; + if (!this.propIcon.equals(that.propIcon)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_propCode = true && (isSetPropCode()); + list.add(present_propCode); + if (present_propCode) + list.add(propCode); + + boolean present_propName = true && (isSetPropName()); + list.add(present_propName); + if (present_propName) + list.add(propName); + + boolean present_propDesc = true && (isSetPropDesc()); + list.add(present_propDesc); + if (present_propDesc) + list.add(propDesc); + + boolean present_propIcon = true && (isSetPropIcon()); + list.add(present_propIcon); + if (present_propIcon) + list.add(propIcon); + + return list.hashCode(); + } + + @Override + public int compareTo(ItemConfig other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPropCode()).compareTo(other.isSetPropCode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPropCode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.propCode, other.propCode); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPropName()).compareTo(other.isSetPropName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPropName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.propName, other.propName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPropDesc()).compareTo(other.isSetPropDesc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPropDesc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.propDesc, other.propDesc); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPropIcon()).compareTo(other.isSetPropIcon()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPropIcon()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.propIcon, other.propIcon); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ItemConfig("); + boolean first = true; + + if (isSetPropCode()) { + sb.append("propCode:"); + if (this.propCode == null) { + sb.append("null"); + } else { + sb.append(this.propCode); + } + first = false; + } + if (isSetPropName()) { + if (!first) sb.append(", "); + sb.append("propName:"); + if (this.propName == null) { + sb.append("null"); + } else { + sb.append(this.propName); + } + first = false; + } + if (isSetPropDesc()) { + if (!first) sb.append(", "); + sb.append("propDesc:"); + if (this.propDesc == null) { + sb.append("null"); + } else { + sb.append(this.propDesc); + } + first = false; + } + if (isSetPropIcon()) { + if (!first) sb.append(", "); + sb.append("propIcon:"); + if (this.propIcon == null) { + sb.append("null"); + } else { + sb.append(this.propIcon); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class ItemConfigStandardSchemeFactory implements SchemeFactory { + public ItemConfigStandardScheme getScheme() { + return new ItemConfigStandardScheme(); + } + } + + private static class ItemConfigStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ItemConfig struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PROP_CODE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.propCode = iprot.readString(); + struct.setPropCodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PROP_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.propName = iprot.readString(); + struct.setPropNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PROP_DESC + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.propDesc = iprot.readString(); + struct.setPropDescIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // PROP_ICON + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.propIcon = iprot.readString(); + struct.setPropIconIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ItemConfig struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.propCode != null) { + if (struct.isSetPropCode()) { + oprot.writeFieldBegin(PROP_CODE_FIELD_DESC); + oprot.writeString(struct.propCode); + oprot.writeFieldEnd(); + } + } + if (struct.propName != null) { + if (struct.isSetPropName()) { + oprot.writeFieldBegin(PROP_NAME_FIELD_DESC); + oprot.writeString(struct.propName); + oprot.writeFieldEnd(); + } + } + if (struct.propDesc != null) { + if (struct.isSetPropDesc()) { + oprot.writeFieldBegin(PROP_DESC_FIELD_DESC); + oprot.writeString(struct.propDesc); + oprot.writeFieldEnd(); + } + } + if (struct.propIcon != null) { + if (struct.isSetPropIcon()) { + oprot.writeFieldBegin(PROP_ICON_FIELD_DESC); + oprot.writeString(struct.propIcon); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ItemConfigTupleSchemeFactory implements SchemeFactory { + public ItemConfigTupleScheme getScheme() { + return new ItemConfigTupleScheme(); + } + } + + private static class ItemConfigTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ItemConfig struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPropCode()) { + optionals.set(0); + } + if (struct.isSetPropName()) { + optionals.set(1); + } + if (struct.isSetPropDesc()) { + optionals.set(2); + } + if (struct.isSetPropIcon()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetPropCode()) { + oprot.writeString(struct.propCode); + } + if (struct.isSetPropName()) { + oprot.writeString(struct.propName); + } + if (struct.isSetPropDesc()) { + oprot.writeString(struct.propDesc); + } + if (struct.isSetPropIcon()) { + oprot.writeString(struct.propIcon); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ItemConfig struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.propCode = iprot.readString(); + struct.setPropCodeIsSet(true); + } + if (incoming.get(1)) { + struct.propName = iprot.readString(); + struct.setPropNameIsSet(true); + } + if (incoming.get(2)) { + struct.propDesc = iprot.readString(); + struct.setPropDescIsSet(true); + } + if (incoming.get(3)) { + struct.propIcon = iprot.readString(); + struct.setPropIconIsSet(true); + } + } + } + +} + diff --git a/src/main/java/com/ljsd/jieling/thrift/idl/RPCRequestIFace.java b/src/main/java/com/ljsd/jieling/thrift/idl/RPCRequestIFace.java new file mode 100644 index 0000000..6fddb0d --- /dev/null +++ b/src/main/java/com/ljsd/jieling/thrift/idl/RPCRequestIFace.java @@ -0,0 +1,11521 @@ +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.ljsd.jieling.thrift.idl; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2023-11-14") +public class RPCRequestIFace { + + public interface Iface { + + public Result deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount, String platform) throws InvalidOperException, org.apache.thrift.TException; + + public Result deliveryRecharge2(int uid, String goodsId, String currency, double amount) throws org.apache.thrift.TException; + + public RechargeResult getRecharge(int uid) throws org.apache.thrift.TException; + + public void mathcRoomAdressInfo(int uid, int type, String address) throws org.apache.thrift.TException; + + public Result sendMailToRole(String uids, String title, String content, String reward) throws org.apache.thrift.TException; + + public Result deliveryCoupon(int gameUserId, String couponCode, String title, String content, long orderTime, List itemId) throws org.apache.thrift.TException; + + public Result deliveryOrder(int uid, String goodsId, long orderTime, String orderId, int devalueId) throws org.apache.thrift.TException; + + public Result operateUser(int uid, int opStatus) throws org.apache.thrift.TException; + + public List getItemConfigs(List itemIds) throws org.apache.thrift.TException; + + public Result giftCode(int uid, String giftCode) throws org.apache.thrift.TException; + + } + + public interface AsyncIface { + + public void deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount, String platform, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deliveryRecharge2(int uid, String goodsId, String currency, double amount, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getRecharge(int uid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void mathcRoomAdressInfo(int uid, int type, String address, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void sendMailToRole(String uids, String title, String content, String reward, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deliveryCoupon(int gameUserId, String couponCode, String title, String content, long orderTime, List itemId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deliveryOrder(int uid, String goodsId, long orderTime, String orderId, int devalueId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void operateUser(int uid, int opStatus, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getItemConfigs(List itemIds, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void giftCode(int uid, String giftCode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + } + + public static class Client extends org.apache.thrift.TServiceClient implements Iface { + public static class Factory implements org.apache.thrift.TServiceClientFactory { + public Factory() {} + public Client getClient(org.apache.thrift.protocol.TProtocol prot) { + return new Client(prot); + } + public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { + return new Client(iprot, oprot); + } + } + + public Client(org.apache.thrift.protocol.TProtocol prot) + { + super(prot, prot); + } + + public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { + super(iprot, oprot); + } + + public Result deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount, String platform) throws InvalidOperException, org.apache.thrift.TException + { + send_deliveryRecharge(uid, goodsId, openId, orderId, orderTime, amount, platform); + return recv_deliveryRecharge(); + } + + public void send_deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount, String platform) throws org.apache.thrift.TException + { + deliveryRecharge_args args = new deliveryRecharge_args(); + args.setUid(uid); + args.setGoodsId(goodsId); + args.setOpenId(openId); + args.setOrderId(orderId); + args.setOrderTime(orderTime); + args.setAmount(amount); + args.setPlatform(platform); + sendBase("deliveryRecharge", args); + } + + public Result recv_deliveryRecharge() throws InvalidOperException, org.apache.thrift.TException + { + deliveryRecharge_result result = new deliveryRecharge_result(); + receiveBase(result, "deliveryRecharge"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.ouch != null) { + throw result.ouch; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deliveryRecharge failed: unknown result"); + } + + public Result deliveryRecharge2(int uid, String goodsId, String currency, double amount) throws org.apache.thrift.TException + { + send_deliveryRecharge2(uid, goodsId, currency, amount); + return recv_deliveryRecharge2(); + } + + public void send_deliveryRecharge2(int uid, String goodsId, String currency, double amount) throws org.apache.thrift.TException + { + deliveryRecharge2_args args = new deliveryRecharge2_args(); + args.setUid(uid); + args.setGoodsId(goodsId); + args.setCurrency(currency); + args.setAmount(amount); + sendBase("deliveryRecharge2", args); + } + + public Result recv_deliveryRecharge2() throws org.apache.thrift.TException + { + deliveryRecharge2_result result = new deliveryRecharge2_result(); + receiveBase(result, "deliveryRecharge2"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deliveryRecharge2 failed: unknown result"); + } + + public RechargeResult getRecharge(int uid) throws org.apache.thrift.TException + { + send_getRecharge(uid); + return recv_getRecharge(); + } + + public void send_getRecharge(int uid) throws org.apache.thrift.TException + { + getRecharge_args args = new getRecharge_args(); + args.setUid(uid); + sendBase("getRecharge", args); + } + + public RechargeResult recv_getRecharge() throws org.apache.thrift.TException + { + getRecharge_result result = new getRecharge_result(); + receiveBase(result, "getRecharge"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRecharge failed: unknown result"); + } + + public void mathcRoomAdressInfo(int uid, int type, String address) throws org.apache.thrift.TException + { + send_mathcRoomAdressInfo(uid, type, address); + recv_mathcRoomAdressInfo(); + } + + public void send_mathcRoomAdressInfo(int uid, int type, String address) throws org.apache.thrift.TException + { + mathcRoomAdressInfo_args args = new mathcRoomAdressInfo_args(); + args.setUid(uid); + args.setType(type); + args.setAddress(address); + sendBase("mathcRoomAdressInfo", args); + } + + public void recv_mathcRoomAdressInfo() throws org.apache.thrift.TException + { + mathcRoomAdressInfo_result result = new mathcRoomAdressInfo_result(); + receiveBase(result, "mathcRoomAdressInfo"); + return; + } + + public Result sendMailToRole(String uids, String title, String content, String reward) throws org.apache.thrift.TException + { + send_sendMailToRole(uids, title, content, reward); + return recv_sendMailToRole(); + } + + public void send_sendMailToRole(String uids, String title, String content, String reward) throws org.apache.thrift.TException + { + sendMailToRole_args args = new sendMailToRole_args(); + args.setUids(uids); + args.setTitle(title); + args.setContent(content); + args.setReward(reward); + sendBase("sendMailToRole", args); + } + + public Result recv_sendMailToRole() throws org.apache.thrift.TException + { + sendMailToRole_result result = new sendMailToRole_result(); + receiveBase(result, "sendMailToRole"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "sendMailToRole failed: unknown result"); + } + + public Result deliveryCoupon(int gameUserId, String couponCode, String title, String content, long orderTime, List itemId) throws org.apache.thrift.TException + { + send_deliveryCoupon(gameUserId, couponCode, title, content, orderTime, itemId); + return recv_deliveryCoupon(); + } + + public void send_deliveryCoupon(int gameUserId, String couponCode, String title, String content, long orderTime, List itemId) throws org.apache.thrift.TException + { + deliveryCoupon_args args = new deliveryCoupon_args(); + args.setGameUserId(gameUserId); + args.setCouponCode(couponCode); + args.setTitle(title); + args.setContent(content); + args.setOrderTime(orderTime); + args.setItemId(itemId); + sendBase("deliveryCoupon", args); + } + + public Result recv_deliveryCoupon() throws org.apache.thrift.TException + { + deliveryCoupon_result result = new deliveryCoupon_result(); + receiveBase(result, "deliveryCoupon"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deliveryCoupon failed: unknown result"); + } + + public Result deliveryOrder(int uid, String goodsId, long orderTime, String orderId, int devalueId) throws org.apache.thrift.TException + { + send_deliveryOrder(uid, goodsId, orderTime, orderId, devalueId); + return recv_deliveryOrder(); + } + + public void send_deliveryOrder(int uid, String goodsId, long orderTime, String orderId, int devalueId) throws org.apache.thrift.TException + { + deliveryOrder_args args = new deliveryOrder_args(); + args.setUid(uid); + args.setGoodsId(goodsId); + args.setOrderTime(orderTime); + args.setOrderId(orderId); + args.setDevalueId(devalueId); + sendBase("deliveryOrder", args); + } + + public Result recv_deliveryOrder() throws org.apache.thrift.TException + { + deliveryOrder_result result = new deliveryOrder_result(); + receiveBase(result, "deliveryOrder"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deliveryOrder failed: unknown result"); + } + + public Result operateUser(int uid, int opStatus) throws org.apache.thrift.TException + { + send_operateUser(uid, opStatus); + return recv_operateUser(); + } + + public void send_operateUser(int uid, int opStatus) throws org.apache.thrift.TException + { + operateUser_args args = new operateUser_args(); + args.setUid(uid); + args.setOpStatus(opStatus); + sendBase("operateUser", args); + } + + public Result recv_operateUser() throws org.apache.thrift.TException + { + operateUser_result result = new operateUser_result(); + receiveBase(result, "operateUser"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "operateUser failed: unknown result"); + } + + public List getItemConfigs(List itemIds) throws org.apache.thrift.TException + { + send_getItemConfigs(itemIds); + return recv_getItemConfigs(); + } + + public void send_getItemConfigs(List itemIds) throws org.apache.thrift.TException + { + getItemConfigs_args args = new getItemConfigs_args(); + args.setItemIds(itemIds); + sendBase("getItemConfigs", args); + } + + public List recv_getItemConfigs() throws org.apache.thrift.TException + { + getItemConfigs_result result = new getItemConfigs_result(); + receiveBase(result, "getItemConfigs"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemConfigs failed: unknown result"); + } + + public Result giftCode(int uid, String giftCode) throws org.apache.thrift.TException + { + send_giftCode(uid, giftCode); + return recv_giftCode(); + } + + public void send_giftCode(int uid, String giftCode) throws org.apache.thrift.TException + { + giftCode_args args = new giftCode_args(); + args.setUid(uid); + args.setGiftCode(giftCode); + sendBase("giftCode", args); + } + + public Result recv_giftCode() throws org.apache.thrift.TException + { + giftCode_result result = new giftCode_result(); + receiveBase(result, "giftCode"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "giftCode failed: unknown result"); + } + + } + public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { + public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { + private org.apache.thrift.async.TAsyncClientManager clientManager; + private org.apache.thrift.protocol.TProtocolFactory protocolFactory; + public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { + this.clientManager = clientManager; + this.protocolFactory = protocolFactory; + } + public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { + return new AsyncClient(protocolFactory, clientManager, transport); + } + } + + public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { + super(protocolFactory, clientManager, transport); + } + + public void deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount, String platform, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deliveryRecharge_call method_call = new deliveryRecharge_call(uid, goodsId, openId, orderId, orderTime, amount, platform, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deliveryRecharge_call extends org.apache.thrift.async.TAsyncMethodCall { + private int uid; + private String goodsId; + private String openId; + private String orderId; + private long orderTime; + private int amount; + private String platform; + public deliveryRecharge_call(int uid, String goodsId, String openId, String orderId, long orderTime, int amount, String platform, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.uid = uid; + this.goodsId = goodsId; + this.openId = openId; + this.orderId = orderId; + this.orderTime = orderTime; + this.amount = amount; + this.platform = platform; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deliveryRecharge", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deliveryRecharge_args args = new deliveryRecharge_args(); + args.setUid(uid); + args.setGoodsId(goodsId); + args.setOpenId(openId); + args.setOrderId(orderId); + args.setOrderTime(orderTime); + args.setAmount(amount); + args.setPlatform(platform); + args.write(prot); + prot.writeMessageEnd(); + } + + public Result getResult() throws InvalidOperException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_deliveryRecharge(); + } + } + + public void deliveryRecharge2(int uid, String goodsId, String currency, double amount, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deliveryRecharge2_call method_call = new deliveryRecharge2_call(uid, goodsId, currency, amount, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deliveryRecharge2_call extends org.apache.thrift.async.TAsyncMethodCall { + private int uid; + private String goodsId; + private String currency; + private double amount; + public deliveryRecharge2_call(int uid, String goodsId, String currency, double amount, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.uid = uid; + this.goodsId = goodsId; + this.currency = currency; + this.amount = amount; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deliveryRecharge2", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deliveryRecharge2_args args = new deliveryRecharge2_args(); + args.setUid(uid); + args.setGoodsId(goodsId); + args.setCurrency(currency); + args.setAmount(amount); + args.write(prot); + prot.writeMessageEnd(); + } + + public Result getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_deliveryRecharge2(); + } + } + + public void getRecharge(int uid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getRecharge_call method_call = new getRecharge_call(uid, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getRecharge_call extends org.apache.thrift.async.TAsyncMethodCall { + private int uid; + public getRecharge_call(int uid, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.uid = uid; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRecharge", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getRecharge_args args = new getRecharge_args(); + args.setUid(uid); + args.write(prot); + prot.writeMessageEnd(); + } + + public RechargeResult getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getRecharge(); + } + } + + public void mathcRoomAdressInfo(int uid, int type, String address, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + mathcRoomAdressInfo_call method_call = new mathcRoomAdressInfo_call(uid, type, address, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class mathcRoomAdressInfo_call extends org.apache.thrift.async.TAsyncMethodCall { + private int uid; + private int type; + private String address; + public mathcRoomAdressInfo_call(int uid, int type, String address, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.uid = uid; + this.type = type; + this.address = address; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mathcRoomAdressInfo", org.apache.thrift.protocol.TMessageType.CALL, 0)); + mathcRoomAdressInfo_args args = new mathcRoomAdressInfo_args(); + args.setUid(uid); + args.setType(type); + args.setAddress(address); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_mathcRoomAdressInfo(); + } + } + + public void sendMailToRole(String uids, String title, String content, String reward, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + sendMailToRole_call method_call = new sendMailToRole_call(uids, title, content, reward, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class sendMailToRole_call extends org.apache.thrift.async.TAsyncMethodCall { + private String uids; + private String title; + private String content; + private String reward; + public sendMailToRole_call(String uids, String title, String content, String reward, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.uids = uids; + this.title = title; + this.content = content; + this.reward = reward; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sendMailToRole", org.apache.thrift.protocol.TMessageType.CALL, 0)); + sendMailToRole_args args = new sendMailToRole_args(); + args.setUids(uids); + args.setTitle(title); + args.setContent(content); + args.setReward(reward); + args.write(prot); + prot.writeMessageEnd(); + } + + public Result getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_sendMailToRole(); + } + } + + public void deliveryCoupon(int gameUserId, String couponCode, String title, String content, long orderTime, List itemId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deliveryCoupon_call method_call = new deliveryCoupon_call(gameUserId, couponCode, title, content, orderTime, itemId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deliveryCoupon_call extends org.apache.thrift.async.TAsyncMethodCall { + private int gameUserId; + private String couponCode; + private String title; + private String content; + private long orderTime; + private List itemId; + public deliveryCoupon_call(int gameUserId, String couponCode, String title, String content, long orderTime, List itemId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.gameUserId = gameUserId; + this.couponCode = couponCode; + this.title = title; + this.content = content; + this.orderTime = orderTime; + this.itemId = itemId; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deliveryCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deliveryCoupon_args args = new deliveryCoupon_args(); + args.setGameUserId(gameUserId); + args.setCouponCode(couponCode); + args.setTitle(title); + args.setContent(content); + args.setOrderTime(orderTime); + args.setItemId(itemId); + args.write(prot); + prot.writeMessageEnd(); + } + + public Result getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_deliveryCoupon(); + } + } + + public void deliveryOrder(int uid, String goodsId, long orderTime, String orderId, int devalueId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deliveryOrder_call method_call = new deliveryOrder_call(uid, goodsId, orderTime, orderId, devalueId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deliveryOrder_call extends org.apache.thrift.async.TAsyncMethodCall { + private int uid; + private String goodsId; + private long orderTime; + private String orderId; + private int devalueId; + public deliveryOrder_call(int uid, String goodsId, long orderTime, String orderId, int devalueId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.uid = uid; + this.goodsId = goodsId; + this.orderTime = orderTime; + this.orderId = orderId; + this.devalueId = devalueId; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deliveryOrder", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deliveryOrder_args args = new deliveryOrder_args(); + args.setUid(uid); + args.setGoodsId(goodsId); + args.setOrderTime(orderTime); + args.setOrderId(orderId); + args.setDevalueId(devalueId); + args.write(prot); + prot.writeMessageEnd(); + } + + public Result getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_deliveryOrder(); + } + } + + public void operateUser(int uid, int opStatus, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + operateUser_call method_call = new operateUser_call(uid, opStatus, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class operateUser_call extends org.apache.thrift.async.TAsyncMethodCall { + private int uid; + private int opStatus; + public operateUser_call(int uid, int opStatus, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.uid = uid; + this.opStatus = opStatus; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("operateUser", org.apache.thrift.protocol.TMessageType.CALL, 0)); + operateUser_args args = new operateUser_args(); + args.setUid(uid); + args.setOpStatus(opStatus); + args.write(prot); + prot.writeMessageEnd(); + } + + public Result getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_operateUser(); + } + } + + public void getItemConfigs(List itemIds, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getItemConfigs_call method_call = new getItemConfigs_call(itemIds, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getItemConfigs_call extends org.apache.thrift.async.TAsyncMethodCall { + private List itemIds; + public getItemConfigs_call(List itemIds, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.itemIds = itemIds; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemConfigs", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getItemConfigs_args args = new getItemConfigs_args(); + args.setItemIds(itemIds); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getItemConfigs(); + } + } + + public void giftCode(int uid, String giftCode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + giftCode_call method_call = new giftCode_call(uid, giftCode, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class giftCode_call extends org.apache.thrift.async.TAsyncMethodCall { + private int uid; + private String giftCode; + public giftCode_call(int uid, String giftCode, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.uid = uid; + this.giftCode = giftCode; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("giftCode", org.apache.thrift.protocol.TMessageType.CALL, 0)); + giftCode_args args = new giftCode_args(); + args.setUid(uid); + args.setGiftCode(giftCode); + args.write(prot); + prot.writeMessageEnd(); + } + + public Result getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_giftCode(); + } + } + + } + + public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { + private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); + public Processor(I iface) { + super(iface, getProcessMap(new HashMap>())); + } + + protected Processor(I iface, Map> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static Map> getProcessMap(Map> processMap) { + processMap.put("deliveryRecharge", new deliveryRecharge()); + processMap.put("deliveryRecharge2", new deliveryRecharge2()); + processMap.put("getRecharge", new getRecharge()); + processMap.put("mathcRoomAdressInfo", new mathcRoomAdressInfo()); + processMap.put("sendMailToRole", new sendMailToRole()); + processMap.put("deliveryCoupon", new deliveryCoupon()); + processMap.put("deliveryOrder", new deliveryOrder()); + processMap.put("operateUser", new operateUser()); + processMap.put("getItemConfigs", new getItemConfigs()); + processMap.put("giftCode", new giftCode()); + return processMap; + } + + public static class deliveryRecharge extends org.apache.thrift.ProcessFunction { + public deliveryRecharge() { + super("deliveryRecharge"); + } + + public deliveryRecharge_args getEmptyArgsInstance() { + return new deliveryRecharge_args(); + } + + protected boolean isOneway() { + return false; + } + + public deliveryRecharge_result getResult(I iface, deliveryRecharge_args args) throws org.apache.thrift.TException { + deliveryRecharge_result result = new deliveryRecharge_result(); + try { + result.success = iface.deliveryRecharge(args.uid, args.goodsId, args.openId, args.orderId, args.orderTime, args.amount, args.platform); + } catch (InvalidOperException ouch) { + result.ouch = ouch; + } + return result; + } + } + + public static class deliveryRecharge2 extends org.apache.thrift.ProcessFunction { + public deliveryRecharge2() { + super("deliveryRecharge2"); + } + + public deliveryRecharge2_args getEmptyArgsInstance() { + return new deliveryRecharge2_args(); + } + + protected boolean isOneway() { + return false; + } + + public deliveryRecharge2_result getResult(I iface, deliveryRecharge2_args args) throws org.apache.thrift.TException { + deliveryRecharge2_result result = new deliveryRecharge2_result(); + result.success = iface.deliveryRecharge2(args.uid, args.goodsId, args.currency, args.amount); + return result; + } + } + + public static class getRecharge extends org.apache.thrift.ProcessFunction { + public getRecharge() { + super("getRecharge"); + } + + public getRecharge_args getEmptyArgsInstance() { + return new getRecharge_args(); + } + + protected boolean isOneway() { + return false; + } + + public getRecharge_result getResult(I iface, getRecharge_args args) throws org.apache.thrift.TException { + getRecharge_result result = new getRecharge_result(); + result.success = iface.getRecharge(args.uid); + return result; + } + } + + public static class mathcRoomAdressInfo extends org.apache.thrift.ProcessFunction { + public mathcRoomAdressInfo() { + super("mathcRoomAdressInfo"); + } + + public mathcRoomAdressInfo_args getEmptyArgsInstance() { + return new mathcRoomAdressInfo_args(); + } + + protected boolean isOneway() { + return false; + } + + public mathcRoomAdressInfo_result getResult(I iface, mathcRoomAdressInfo_args args) throws org.apache.thrift.TException { + mathcRoomAdressInfo_result result = new mathcRoomAdressInfo_result(); + iface.mathcRoomAdressInfo(args.uid, args.type, args.address); + return result; + } + } + + public static class sendMailToRole extends org.apache.thrift.ProcessFunction { + public sendMailToRole() { + super("sendMailToRole"); + } + + public sendMailToRole_args getEmptyArgsInstance() { + return new sendMailToRole_args(); + } + + protected boolean isOneway() { + return false; + } + + public sendMailToRole_result getResult(I iface, sendMailToRole_args args) throws org.apache.thrift.TException { + sendMailToRole_result result = new sendMailToRole_result(); + result.success = iface.sendMailToRole(args.uids, args.title, args.content, args.reward); + return result; + } + } + + public static class deliveryCoupon extends org.apache.thrift.ProcessFunction { + public deliveryCoupon() { + super("deliveryCoupon"); + } + + public deliveryCoupon_args getEmptyArgsInstance() { + return new deliveryCoupon_args(); + } + + protected boolean isOneway() { + return false; + } + + public deliveryCoupon_result getResult(I iface, deliveryCoupon_args args) throws org.apache.thrift.TException { + deliveryCoupon_result result = new deliveryCoupon_result(); + result.success = iface.deliveryCoupon(args.gameUserId, args.couponCode, args.title, args.content, args.orderTime, args.itemId); + return result; + } + } + + public static class deliveryOrder extends org.apache.thrift.ProcessFunction { + public deliveryOrder() { + super("deliveryOrder"); + } + + public deliveryOrder_args getEmptyArgsInstance() { + return new deliveryOrder_args(); + } + + protected boolean isOneway() { + return false; + } + + public deliveryOrder_result getResult(I iface, deliveryOrder_args args) throws org.apache.thrift.TException { + deliveryOrder_result result = new deliveryOrder_result(); + result.success = iface.deliveryOrder(args.uid, args.goodsId, args.orderTime, args.orderId, args.devalueId); + return result; + } + } + + public static class operateUser extends org.apache.thrift.ProcessFunction { + public operateUser() { + super("operateUser"); + } + + public operateUser_args getEmptyArgsInstance() { + return new operateUser_args(); + } + + protected boolean isOneway() { + return false; + } + + public operateUser_result getResult(I iface, operateUser_args args) throws org.apache.thrift.TException { + operateUser_result result = new operateUser_result(); + result.success = iface.operateUser(args.uid, args.opStatus); + return result; + } + } + + public static class getItemConfigs extends org.apache.thrift.ProcessFunction { + public getItemConfigs() { + super("getItemConfigs"); + } + + public getItemConfigs_args getEmptyArgsInstance() { + return new getItemConfigs_args(); + } + + protected boolean isOneway() { + return false; + } + + public getItemConfigs_result getResult(I iface, getItemConfigs_args args) throws org.apache.thrift.TException { + getItemConfigs_result result = new getItemConfigs_result(); + result.success = iface.getItemConfigs(args.itemIds); + return result; + } + } + + public static class giftCode extends org.apache.thrift.ProcessFunction { + public giftCode() { + super("giftCode"); + } + + public giftCode_args getEmptyArgsInstance() { + return new giftCode_args(); + } + + protected boolean isOneway() { + return false; + } + + public giftCode_result getResult(I iface, giftCode_args args) throws org.apache.thrift.TException { + giftCode_result result = new giftCode_result(); + result.success = iface.giftCode(args.uid, args.giftCode); + return result; + } + } + + } + + public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { + private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); + public AsyncProcessor(I iface) { + super(iface, getProcessMap(new HashMap>())); + } + + protected AsyncProcessor(I iface, Map> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static Map> getProcessMap(Map> processMap) { + processMap.put("deliveryRecharge", new deliveryRecharge()); + processMap.put("deliveryRecharge2", new deliveryRecharge2()); + processMap.put("getRecharge", new getRecharge()); + processMap.put("mathcRoomAdressInfo", new mathcRoomAdressInfo()); + processMap.put("sendMailToRole", new sendMailToRole()); + processMap.put("deliveryCoupon", new deliveryCoupon()); + processMap.put("deliveryOrder", new deliveryOrder()); + processMap.put("operateUser", new operateUser()); + processMap.put("getItemConfigs", new getItemConfigs()); + processMap.put("giftCode", new giftCode()); + return processMap; + } + + public static class deliveryRecharge extends org.apache.thrift.AsyncProcessFunction { + public deliveryRecharge() { + super("deliveryRecharge"); + } + + public deliveryRecharge_args getEmptyArgsInstance() { + return new deliveryRecharge_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Result o) { + deliveryRecharge_result result = new deliveryRecharge_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + deliveryRecharge_result result = new deliveryRecharge_result(); + if (e instanceof InvalidOperException) { + result.ouch = (InvalidOperException) e; + result.setOuchIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, deliveryRecharge_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.deliveryRecharge(args.uid, args.goodsId, args.openId, args.orderId, args.orderTime, args.amount, args.platform,resultHandler); + } + } + + public static class deliveryRecharge2 extends org.apache.thrift.AsyncProcessFunction { + public deliveryRecharge2() { + super("deliveryRecharge2"); + } + + public deliveryRecharge2_args getEmptyArgsInstance() { + return new deliveryRecharge2_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Result o) { + deliveryRecharge2_result result = new deliveryRecharge2_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + deliveryRecharge2_result result = new deliveryRecharge2_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, deliveryRecharge2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.deliveryRecharge2(args.uid, args.goodsId, args.currency, args.amount,resultHandler); + } + } + + public static class getRecharge extends org.apache.thrift.AsyncProcessFunction { + public getRecharge() { + super("getRecharge"); + } + + public getRecharge_args getEmptyArgsInstance() { + return new getRecharge_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(RechargeResult o) { + getRecharge_result result = new getRecharge_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getRecharge_result result = new getRecharge_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getRecharge_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getRecharge(args.uid,resultHandler); + } + } + + public static class mathcRoomAdressInfo extends org.apache.thrift.AsyncProcessFunction { + public mathcRoomAdressInfo() { + super("mathcRoomAdressInfo"); + } + + public mathcRoomAdressInfo_args getEmptyArgsInstance() { + return new mathcRoomAdressInfo_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + mathcRoomAdressInfo_result result = new mathcRoomAdressInfo_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + mathcRoomAdressInfo_result result = new mathcRoomAdressInfo_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, mathcRoomAdressInfo_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.mathcRoomAdressInfo(args.uid, args.type, args.address,resultHandler); + } + } + + public static class sendMailToRole extends org.apache.thrift.AsyncProcessFunction { + public sendMailToRole() { + super("sendMailToRole"); + } + + public sendMailToRole_args getEmptyArgsInstance() { + return new sendMailToRole_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Result o) { + sendMailToRole_result result = new sendMailToRole_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + sendMailToRole_result result = new sendMailToRole_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, sendMailToRole_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.sendMailToRole(args.uids, args.title, args.content, args.reward,resultHandler); + } + } + + public static class deliveryCoupon extends org.apache.thrift.AsyncProcessFunction { + public deliveryCoupon() { + super("deliveryCoupon"); + } + + public deliveryCoupon_args getEmptyArgsInstance() { + return new deliveryCoupon_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Result o) { + deliveryCoupon_result result = new deliveryCoupon_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + deliveryCoupon_result result = new deliveryCoupon_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, deliveryCoupon_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.deliveryCoupon(args.gameUserId, args.couponCode, args.title, args.content, args.orderTime, args.itemId,resultHandler); + } + } + + public static class deliveryOrder extends org.apache.thrift.AsyncProcessFunction { + public deliveryOrder() { + super("deliveryOrder"); + } + + public deliveryOrder_args getEmptyArgsInstance() { + return new deliveryOrder_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Result o) { + deliveryOrder_result result = new deliveryOrder_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + deliveryOrder_result result = new deliveryOrder_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, deliveryOrder_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.deliveryOrder(args.uid, args.goodsId, args.orderTime, args.orderId, args.devalueId,resultHandler); + } + } + + public static class operateUser extends org.apache.thrift.AsyncProcessFunction { + public operateUser() { + super("operateUser"); + } + + public operateUser_args getEmptyArgsInstance() { + return new operateUser_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Result o) { + operateUser_result result = new operateUser_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + operateUser_result result = new operateUser_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, operateUser_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.operateUser(args.uid, args.opStatus,resultHandler); + } + } + + public static class getItemConfigs extends org.apache.thrift.AsyncProcessFunction> { + public getItemConfigs() { + super("getItemConfigs"); + } + + public getItemConfigs_args getEmptyArgsInstance() { + return new getItemConfigs_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getItemConfigs_result result = new getItemConfigs_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getItemConfigs_result result = new getItemConfigs_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getItemConfigs_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getItemConfigs(args.itemIds,resultHandler); + } + } + + public static class giftCode extends org.apache.thrift.AsyncProcessFunction { + public giftCode() { + super("giftCode"); + } + + public giftCode_args getEmptyArgsInstance() { + return new giftCode_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Result o) { + giftCode_result result = new giftCode_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + giftCode_result result = new giftCode_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, giftCode_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.giftCode(args.uid, args.giftCode,resultHandler); + } + } + + } + + public static class deliveryRecharge_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deliveryRecharge_args"); + + private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("uid", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField GOODS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("goodsId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField OPEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("openId", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField ORDER_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("orderTime", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("amount", org.apache.thrift.protocol.TType.I32, (short)6); + private static final org.apache.thrift.protocol.TField PLATFORM_FIELD_DESC = new org.apache.thrift.protocol.TField("platform", org.apache.thrift.protocol.TType.STRING, (short)7); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deliveryRecharge_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deliveryRecharge_argsTupleSchemeFactory()); + } + + public int uid; // required + public String goodsId; // required + public String openId; // required + public String orderId; // required + public long orderTime; // required + public int amount; // required + public String platform; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UID((short)1, "uid"), + GOODS_ID((short)2, "goodsId"), + OPEN_ID((short)3, "openId"), + ORDER_ID((short)4, "orderId"), + ORDER_TIME((short)5, "orderTime"), + AMOUNT((short)6, "amount"), + PLATFORM((short)7, "platform"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UID + return UID; + case 2: // GOODS_ID + return GOODS_ID; + case 3: // OPEN_ID + return OPEN_ID; + case 4: // ORDER_ID + return ORDER_ID; + case 5: // ORDER_TIME + return ORDER_TIME; + case 6: // AMOUNT + return AMOUNT; + case 7: // PLATFORM + return PLATFORM; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __UID_ISSET_ID = 0; + private static final int __ORDERTIME_ISSET_ID = 1; + private static final int __AMOUNT_ISSET_ID = 2; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("uid", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.GOODS_ID, new org.apache.thrift.meta_data.FieldMetaData("goodsId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.OPEN_ID, new org.apache.thrift.meta_data.FieldMetaData("openId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ORDER_TIME, new org.apache.thrift.meta_data.FieldMetaData("orderTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.PLATFORM, new org.apache.thrift.meta_data.FieldMetaData("platform", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deliveryRecharge_args.class, metaDataMap); + } + + public deliveryRecharge_args() { + } + + public deliveryRecharge_args( + int uid, + String goodsId, + String openId, + String orderId, + long orderTime, + int amount, + String platform) + { + this(); + this.uid = uid; + setUidIsSet(true); + this.goodsId = goodsId; + this.openId = openId; + this.orderId = orderId; + this.orderTime = orderTime; + setOrderTimeIsSet(true); + this.amount = amount; + setAmountIsSet(true); + this.platform = platform; + } + + /** + * Performs a deep copy on other. + */ + public deliveryRecharge_args(deliveryRecharge_args other) { + __isset_bitfield = other.__isset_bitfield; + this.uid = other.uid; + if (other.isSetGoodsId()) { + this.goodsId = other.goodsId; + } + if (other.isSetOpenId()) { + this.openId = other.openId; + } + if (other.isSetOrderId()) { + this.orderId = other.orderId; + } + this.orderTime = other.orderTime; + this.amount = other.amount; + if (other.isSetPlatform()) { + this.platform = other.platform; + } + } + + public deliveryRecharge_args deepCopy() { + return new deliveryRecharge_args(this); + } + + @Override + public void clear() { + setUidIsSet(false); + this.uid = 0; + this.goodsId = null; + this.openId = null; + this.orderId = null; + setOrderTimeIsSet(false); + this.orderTime = 0; + setAmountIsSet(false); + this.amount = 0; + this.platform = null; + } + + public int getUid() { + return this.uid; + } + + public deliveryRecharge_args setUid(int uid) { + this.uid = uid; + setUidIsSet(true); + return this; + } + + public void unsetUid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UID_ISSET_ID); + } + + /** Returns true if field uid is set (has been assigned a value) and false otherwise */ + public boolean isSetUid() { + return EncodingUtils.testBit(__isset_bitfield, __UID_ISSET_ID); + } + + public void setUidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID_ISSET_ID, value); + } + + public String getGoodsId() { + return this.goodsId; + } + + public deliveryRecharge_args setGoodsId(String goodsId) { + this.goodsId = goodsId; + return this; + } + + public void unsetGoodsId() { + this.goodsId = null; + } + + /** Returns true if field goodsId is set (has been assigned a value) and false otherwise */ + public boolean isSetGoodsId() { + return this.goodsId != null; + } + + public void setGoodsIdIsSet(boolean value) { + if (!value) { + this.goodsId = null; + } + } + + public String getOpenId() { + return this.openId; + } + + public deliveryRecharge_args setOpenId(String openId) { + this.openId = openId; + return this; + } + + public void unsetOpenId() { + this.openId = null; + } + + /** Returns true if field openId is set (has been assigned a value) and false otherwise */ + public boolean isSetOpenId() { + return this.openId != null; + } + + public void setOpenIdIsSet(boolean value) { + if (!value) { + this.openId = null; + } + } + + public String getOrderId() { + return this.orderId; + } + + public deliveryRecharge_args setOrderId(String orderId) { + this.orderId = orderId; + return this; + } + + public void unsetOrderId() { + this.orderId = null; + } + + /** Returns true if field orderId is set (has been assigned a value) and false otherwise */ + public boolean isSetOrderId() { + return this.orderId != null; + } + + public void setOrderIdIsSet(boolean value) { + if (!value) { + this.orderId = null; + } + } + + public long getOrderTime() { + return this.orderTime; + } + + public deliveryRecharge_args setOrderTime(long orderTime) { + this.orderTime = orderTime; + setOrderTimeIsSet(true); + return this; + } + + public void unsetOrderTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ORDERTIME_ISSET_ID); + } + + /** Returns true if field orderTime is set (has been assigned a value) and false otherwise */ + public boolean isSetOrderTime() { + return EncodingUtils.testBit(__isset_bitfield, __ORDERTIME_ISSET_ID); + } + + public void setOrderTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ORDERTIME_ISSET_ID, value); + } + + public int getAmount() { + return this.amount; + } + + public deliveryRecharge_args setAmount(int amount) { + this.amount = amount; + setAmountIsSet(true); + return this; + } + + public void unsetAmount() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AMOUNT_ISSET_ID); + } + + /** Returns true if field amount is set (has been assigned a value) and false otherwise */ + public boolean isSetAmount() { + return EncodingUtils.testBit(__isset_bitfield, __AMOUNT_ISSET_ID); + } + + public void setAmountIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AMOUNT_ISSET_ID, value); + } + + public String getPlatform() { + return this.platform; + } + + public deliveryRecharge_args setPlatform(String platform) { + this.platform = platform; + return this; + } + + public void unsetPlatform() { + this.platform = null; + } + + /** Returns true if field platform is set (has been assigned a value) and false otherwise */ + public boolean isSetPlatform() { + return this.platform != null; + } + + public void setPlatformIsSet(boolean value) { + if (!value) { + this.platform = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UID: + if (value == null) { + unsetUid(); + } else { + setUid((Integer)value); + } + break; + + case GOODS_ID: + if (value == null) { + unsetGoodsId(); + } else { + setGoodsId((String)value); + } + break; + + case OPEN_ID: + if (value == null) { + unsetOpenId(); + } else { + setOpenId((String)value); + } + break; + + case ORDER_ID: + if (value == null) { + unsetOrderId(); + } else { + setOrderId((String)value); + } + break; + + case ORDER_TIME: + if (value == null) { + unsetOrderTime(); + } else { + setOrderTime((Long)value); + } + break; + + case AMOUNT: + if (value == null) { + unsetAmount(); + } else { + setAmount((Integer)value); + } + break; + + case PLATFORM: + if (value == null) { + unsetPlatform(); + } else { + setPlatform((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UID: + return Integer.valueOf(getUid()); + + case GOODS_ID: + return getGoodsId(); + + case OPEN_ID: + return getOpenId(); + + case ORDER_ID: + return getOrderId(); + + case ORDER_TIME: + return Long.valueOf(getOrderTime()); + + case AMOUNT: + return Integer.valueOf(getAmount()); + + case PLATFORM: + return getPlatform(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UID: + return isSetUid(); + case GOODS_ID: + return isSetGoodsId(); + case OPEN_ID: + return isSetOpenId(); + case ORDER_ID: + return isSetOrderId(); + case ORDER_TIME: + return isSetOrderTime(); + case AMOUNT: + return isSetAmount(); + case PLATFORM: + return isSetPlatform(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deliveryRecharge_args) + return this.equals((deliveryRecharge_args)that); + return false; + } + + public boolean equals(deliveryRecharge_args that) { + if (that == null) + return false; + + boolean this_present_uid = true; + boolean that_present_uid = true; + if (this_present_uid || that_present_uid) { + if (!(this_present_uid && that_present_uid)) + return false; + if (this.uid != that.uid) + return false; + } + + boolean this_present_goodsId = true && this.isSetGoodsId(); + boolean that_present_goodsId = true && that.isSetGoodsId(); + if (this_present_goodsId || that_present_goodsId) { + if (!(this_present_goodsId && that_present_goodsId)) + return false; + if (!this.goodsId.equals(that.goodsId)) + return false; + } + + boolean this_present_openId = true && this.isSetOpenId(); + boolean that_present_openId = true && that.isSetOpenId(); + if (this_present_openId || that_present_openId) { + if (!(this_present_openId && that_present_openId)) + return false; + if (!this.openId.equals(that.openId)) + return false; + } + + boolean this_present_orderId = true && this.isSetOrderId(); + boolean that_present_orderId = true && that.isSetOrderId(); + if (this_present_orderId || that_present_orderId) { + if (!(this_present_orderId && that_present_orderId)) + return false; + if (!this.orderId.equals(that.orderId)) + return false; + } + + boolean this_present_orderTime = true; + boolean that_present_orderTime = true; + if (this_present_orderTime || that_present_orderTime) { + if (!(this_present_orderTime && that_present_orderTime)) + return false; + if (this.orderTime != that.orderTime) + return false; + } + + boolean this_present_amount = true; + boolean that_present_amount = true; + if (this_present_amount || that_present_amount) { + if (!(this_present_amount && that_present_amount)) + return false; + if (this.amount != that.amount) + return false; + } + + boolean this_present_platform = true && this.isSetPlatform(); + boolean that_present_platform = true && that.isSetPlatform(); + if (this_present_platform || that_present_platform) { + if (!(this_present_platform && that_present_platform)) + return false; + if (!this.platform.equals(that.platform)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_uid = true; + list.add(present_uid); + if (present_uid) + list.add(uid); + + boolean present_goodsId = true && (isSetGoodsId()); + list.add(present_goodsId); + if (present_goodsId) + list.add(goodsId); + + boolean present_openId = true && (isSetOpenId()); + list.add(present_openId); + if (present_openId) + list.add(openId); + + boolean present_orderId = true && (isSetOrderId()); + list.add(present_orderId); + if (present_orderId) + list.add(orderId); + + boolean present_orderTime = true; + list.add(present_orderTime); + if (present_orderTime) + list.add(orderTime); + + boolean present_amount = true; + list.add(present_amount); + if (present_amount) + list.add(amount); + + boolean present_platform = true && (isSetPlatform()); + list.add(present_platform); + if (present_platform) + list.add(platform); + + return list.hashCode(); + } + + @Override + public int compareTo(deliveryRecharge_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uid, other.uid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGoodsId()).compareTo(other.isSetGoodsId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGoodsId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.goodsId, other.goodsId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOpenId()).compareTo(other.isSetOpenId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOpenId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.openId, other.openId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(other.isSetOrderId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOrderId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, other.orderId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOrderTime()).compareTo(other.isSetOrderTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOrderTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderTime, other.orderTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAmount()).compareTo(other.isSetAmount()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAmount()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, other.amount); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPlatform()).compareTo(other.isSetPlatform()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPlatform()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.platform, other.platform); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deliveryRecharge_args("); + boolean first = true; + + sb.append("uid:"); + sb.append(this.uid); + first = false; + if (!first) sb.append(", "); + sb.append("goodsId:"); + if (this.goodsId == null) { + sb.append("null"); + } else { + sb.append(this.goodsId); + } + first = false; + if (!first) sb.append(", "); + sb.append("openId:"); + if (this.openId == null) { + sb.append("null"); + } else { + sb.append(this.openId); + } + first = false; + if (!first) sb.append(", "); + sb.append("orderId:"); + if (this.orderId == null) { + sb.append("null"); + } else { + sb.append(this.orderId); + } + first = false; + if (!first) sb.append(", "); + sb.append("orderTime:"); + sb.append(this.orderTime); + first = false; + if (!first) sb.append(", "); + sb.append("amount:"); + sb.append(this.amount); + first = false; + if (!first) sb.append(", "); + sb.append("platform:"); + if (this.platform == null) { + sb.append("null"); + } else { + sb.append(this.platform); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deliveryRecharge_argsStandardSchemeFactory implements SchemeFactory { + public deliveryRecharge_argsStandardScheme getScheme() { + return new deliveryRecharge_argsStandardScheme(); + } + } + + private static class deliveryRecharge_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deliveryRecharge_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // UID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // GOODS_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.goodsId = iprot.readString(); + struct.setGoodsIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // OPEN_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.openId = iprot.readString(); + struct.setOpenIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ORDER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.orderId = iprot.readString(); + struct.setOrderIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // ORDER_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.orderTime = iprot.readI64(); + struct.setOrderTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // AMOUNT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.amount = iprot.readI32(); + struct.setAmountIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // PLATFORM + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.platform = iprot.readString(); + struct.setPlatformIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deliveryRecharge_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(UID_FIELD_DESC); + oprot.writeI32(struct.uid); + oprot.writeFieldEnd(); + if (struct.goodsId != null) { + oprot.writeFieldBegin(GOODS_ID_FIELD_DESC); + oprot.writeString(struct.goodsId); + oprot.writeFieldEnd(); + } + if (struct.openId != null) { + oprot.writeFieldBegin(OPEN_ID_FIELD_DESC); + oprot.writeString(struct.openId); + oprot.writeFieldEnd(); + } + if (struct.orderId != null) { + oprot.writeFieldBegin(ORDER_ID_FIELD_DESC); + oprot.writeString(struct.orderId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(ORDER_TIME_FIELD_DESC); + oprot.writeI64(struct.orderTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(AMOUNT_FIELD_DESC); + oprot.writeI32(struct.amount); + oprot.writeFieldEnd(); + if (struct.platform != null) { + oprot.writeFieldBegin(PLATFORM_FIELD_DESC); + oprot.writeString(struct.platform); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deliveryRecharge_argsTupleSchemeFactory implements SchemeFactory { + public deliveryRecharge_argsTupleScheme getScheme() { + return new deliveryRecharge_argsTupleScheme(); + } + } + + private static class deliveryRecharge_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deliveryRecharge_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUid()) { + optionals.set(0); + } + if (struct.isSetGoodsId()) { + optionals.set(1); + } + if (struct.isSetOpenId()) { + optionals.set(2); + } + if (struct.isSetOrderId()) { + optionals.set(3); + } + if (struct.isSetOrderTime()) { + optionals.set(4); + } + if (struct.isSetAmount()) { + optionals.set(5); + } + if (struct.isSetPlatform()) { + optionals.set(6); + } + oprot.writeBitSet(optionals, 7); + if (struct.isSetUid()) { + oprot.writeI32(struct.uid); + } + if (struct.isSetGoodsId()) { + oprot.writeString(struct.goodsId); + } + if (struct.isSetOpenId()) { + oprot.writeString(struct.openId); + } + if (struct.isSetOrderId()) { + oprot.writeString(struct.orderId); + } + if (struct.isSetOrderTime()) { + oprot.writeI64(struct.orderTime); + } + if (struct.isSetAmount()) { + oprot.writeI32(struct.amount); + } + if (struct.isSetPlatform()) { + oprot.writeString(struct.platform); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deliveryRecharge_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(7); + if (incoming.get(0)) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } + if (incoming.get(1)) { + struct.goodsId = iprot.readString(); + struct.setGoodsIdIsSet(true); + } + if (incoming.get(2)) { + struct.openId = iprot.readString(); + struct.setOpenIdIsSet(true); + } + if (incoming.get(3)) { + struct.orderId = iprot.readString(); + struct.setOrderIdIsSet(true); + } + if (incoming.get(4)) { + struct.orderTime = iprot.readI64(); + struct.setOrderTimeIsSet(true); + } + if (incoming.get(5)) { + struct.amount = iprot.readI32(); + struct.setAmountIsSet(true); + } + if (incoming.get(6)) { + struct.platform = iprot.readString(); + struct.setPlatformIsSet(true); + } + } + } + + } + + public static class deliveryRecharge_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deliveryRecharge_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deliveryRecharge_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deliveryRecharge_resultTupleSchemeFactory()); + } + + public Result success; // required + public InvalidOperException ouch; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + OUCH((short)1, "ouch"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // OUCH + return OUCH; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Result.class))); + tmpMap.put(_Fields.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deliveryRecharge_result.class, metaDataMap); + } + + public deliveryRecharge_result() { + } + + public deliveryRecharge_result( + Result success, + InvalidOperException ouch) + { + this(); + this.success = success; + this.ouch = ouch; + } + + /** + * Performs a deep copy on other. + */ + public deliveryRecharge_result(deliveryRecharge_result other) { + if (other.isSetSuccess()) { + this.success = new Result(other.success); + } + if (other.isSetOuch()) { + this.ouch = new InvalidOperException(other.ouch); + } + } + + public deliveryRecharge_result deepCopy() { + return new deliveryRecharge_result(this); + } + + @Override + public void clear() { + this.success = null; + this.ouch = null; + } + + public Result getSuccess() { + return this.success; + } + + public deliveryRecharge_result setSuccess(Result success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public InvalidOperException getOuch() { + return this.ouch; + } + + public deliveryRecharge_result setOuch(InvalidOperException ouch) { + this.ouch = ouch; + return this; + } + + public void unsetOuch() { + this.ouch = null; + } + + /** Returns true if field ouch is set (has been assigned a value) and false otherwise */ + public boolean isSetOuch() { + return this.ouch != null; + } + + public void setOuchIsSet(boolean value) { + if (!value) { + this.ouch = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Result)value); + } + break; + + case OUCH: + if (value == null) { + unsetOuch(); + } else { + setOuch((InvalidOperException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case OUCH: + return getOuch(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case OUCH: + return isSetOuch(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deliveryRecharge_result) + return this.equals((deliveryRecharge_result)that); + return false; + } + + public boolean equals(deliveryRecharge_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_ouch = true && this.isSetOuch(); + boolean that_present_ouch = true && that.isSetOuch(); + if (this_present_ouch || that_present_ouch) { + if (!(this_present_ouch && that_present_ouch)) + return false; + if (!this.ouch.equals(that.ouch)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_ouch = true && (isSetOuch()); + list.add(present_ouch); + if (present_ouch) + list.add(ouch); + + return list.hashCode(); + } + + @Override + public int compareTo(deliveryRecharge_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOuch()).compareTo(other.isSetOuch()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOuch()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, other.ouch); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deliveryRecharge_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("ouch:"); + if (this.ouch == null) { + sb.append("null"); + } else { + sb.append(this.ouch); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deliveryRecharge_resultStandardSchemeFactory implements SchemeFactory { + public deliveryRecharge_resultStandardScheme getScheme() { + return new deliveryRecharge_resultStandardScheme(); + } + } + + private static class deliveryRecharge_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deliveryRecharge_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // OUCH + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ouch = new InvalidOperException(); + struct.ouch.read(iprot); + struct.setOuchIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deliveryRecharge_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ouch != null) { + oprot.writeFieldBegin(OUCH_FIELD_DESC); + struct.ouch.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deliveryRecharge_resultTupleSchemeFactory implements SchemeFactory { + public deliveryRecharge_resultTupleScheme getScheme() { + return new deliveryRecharge_resultTupleScheme(); + } + } + + private static class deliveryRecharge_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deliveryRecharge_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetOuch()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetOuch()) { + struct.ouch.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deliveryRecharge_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.ouch = new InvalidOperException(); + struct.ouch.read(iprot); + struct.setOuchIsSet(true); + } + } + } + + } + + public static class deliveryRecharge2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deliveryRecharge2_args"); + + private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("uid", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField GOODS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("goodsId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField CURRENCY_FIELD_DESC = new org.apache.thrift.protocol.TField("currency", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("amount", org.apache.thrift.protocol.TType.DOUBLE, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deliveryRecharge2_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deliveryRecharge2_argsTupleSchemeFactory()); + } + + public int uid; // required + public String goodsId; // required + public String currency; // required + public double amount; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UID((short)1, "uid"), + GOODS_ID((short)2, "goodsId"), + CURRENCY((short)3, "currency"), + AMOUNT((short)4, "amount"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UID + return UID; + case 2: // GOODS_ID + return GOODS_ID; + case 3: // CURRENCY + return CURRENCY; + case 4: // AMOUNT + return AMOUNT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __UID_ISSET_ID = 0; + private static final int __AMOUNT_ISSET_ID = 1; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("uid", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.GOODS_ID, new org.apache.thrift.meta_data.FieldMetaData("goodsId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CURRENCY, new org.apache.thrift.meta_data.FieldMetaData("currency", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deliveryRecharge2_args.class, metaDataMap); + } + + public deliveryRecharge2_args() { + } + + public deliveryRecharge2_args( + int uid, + String goodsId, + String currency, + double amount) + { + this(); + this.uid = uid; + setUidIsSet(true); + this.goodsId = goodsId; + this.currency = currency; + this.amount = amount; + setAmountIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public deliveryRecharge2_args(deliveryRecharge2_args other) { + __isset_bitfield = other.__isset_bitfield; + this.uid = other.uid; + if (other.isSetGoodsId()) { + this.goodsId = other.goodsId; + } + if (other.isSetCurrency()) { + this.currency = other.currency; + } + this.amount = other.amount; + } + + public deliveryRecharge2_args deepCopy() { + return new deliveryRecharge2_args(this); + } + + @Override + public void clear() { + setUidIsSet(false); + this.uid = 0; + this.goodsId = null; + this.currency = null; + setAmountIsSet(false); + this.amount = 0.0; + } + + public int getUid() { + return this.uid; + } + + public deliveryRecharge2_args setUid(int uid) { + this.uid = uid; + setUidIsSet(true); + return this; + } + + public void unsetUid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UID_ISSET_ID); + } + + /** Returns true if field uid is set (has been assigned a value) and false otherwise */ + public boolean isSetUid() { + return EncodingUtils.testBit(__isset_bitfield, __UID_ISSET_ID); + } + + public void setUidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID_ISSET_ID, value); + } + + public String getGoodsId() { + return this.goodsId; + } + + public deliveryRecharge2_args setGoodsId(String goodsId) { + this.goodsId = goodsId; + return this; + } + + public void unsetGoodsId() { + this.goodsId = null; + } + + /** Returns true if field goodsId is set (has been assigned a value) and false otherwise */ + public boolean isSetGoodsId() { + return this.goodsId != null; + } + + public void setGoodsIdIsSet(boolean value) { + if (!value) { + this.goodsId = null; + } + } + + public String getCurrency() { + return this.currency; + } + + public deliveryRecharge2_args setCurrency(String currency) { + this.currency = currency; + return this; + } + + public void unsetCurrency() { + this.currency = null; + } + + /** Returns true if field currency is set (has been assigned a value) and false otherwise */ + public boolean isSetCurrency() { + return this.currency != null; + } + + public void setCurrencyIsSet(boolean value) { + if (!value) { + this.currency = null; + } + } + + public double getAmount() { + return this.amount; + } + + public deliveryRecharge2_args setAmount(double amount) { + this.amount = amount; + setAmountIsSet(true); + return this; + } + + public void unsetAmount() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AMOUNT_ISSET_ID); + } + + /** Returns true if field amount is set (has been assigned a value) and false otherwise */ + public boolean isSetAmount() { + return EncodingUtils.testBit(__isset_bitfield, __AMOUNT_ISSET_ID); + } + + public void setAmountIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AMOUNT_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UID: + if (value == null) { + unsetUid(); + } else { + setUid((Integer)value); + } + break; + + case GOODS_ID: + if (value == null) { + unsetGoodsId(); + } else { + setGoodsId((String)value); + } + break; + + case CURRENCY: + if (value == null) { + unsetCurrency(); + } else { + setCurrency((String)value); + } + break; + + case AMOUNT: + if (value == null) { + unsetAmount(); + } else { + setAmount((Double)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UID: + return Integer.valueOf(getUid()); + + case GOODS_ID: + return getGoodsId(); + + case CURRENCY: + return getCurrency(); + + case AMOUNT: + return Double.valueOf(getAmount()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UID: + return isSetUid(); + case GOODS_ID: + return isSetGoodsId(); + case CURRENCY: + return isSetCurrency(); + case AMOUNT: + return isSetAmount(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deliveryRecharge2_args) + return this.equals((deliveryRecharge2_args)that); + return false; + } + + public boolean equals(deliveryRecharge2_args that) { + if (that == null) + return false; + + boolean this_present_uid = true; + boolean that_present_uid = true; + if (this_present_uid || that_present_uid) { + if (!(this_present_uid && that_present_uid)) + return false; + if (this.uid != that.uid) + return false; + } + + boolean this_present_goodsId = true && this.isSetGoodsId(); + boolean that_present_goodsId = true && that.isSetGoodsId(); + if (this_present_goodsId || that_present_goodsId) { + if (!(this_present_goodsId && that_present_goodsId)) + return false; + if (!this.goodsId.equals(that.goodsId)) + return false; + } + + boolean this_present_currency = true && this.isSetCurrency(); + boolean that_present_currency = true && that.isSetCurrency(); + if (this_present_currency || that_present_currency) { + if (!(this_present_currency && that_present_currency)) + return false; + if (!this.currency.equals(that.currency)) + return false; + } + + boolean this_present_amount = true; + boolean that_present_amount = true; + if (this_present_amount || that_present_amount) { + if (!(this_present_amount && that_present_amount)) + return false; + if (this.amount != that.amount) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_uid = true; + list.add(present_uid); + if (present_uid) + list.add(uid); + + boolean present_goodsId = true && (isSetGoodsId()); + list.add(present_goodsId); + if (present_goodsId) + list.add(goodsId); + + boolean present_currency = true && (isSetCurrency()); + list.add(present_currency); + if (present_currency) + list.add(currency); + + boolean present_amount = true; + list.add(present_amount); + if (present_amount) + list.add(amount); + + return list.hashCode(); + } + + @Override + public int compareTo(deliveryRecharge2_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uid, other.uid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGoodsId()).compareTo(other.isSetGoodsId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGoodsId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.goodsId, other.goodsId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCurrency()).compareTo(other.isSetCurrency()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCurrency()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.currency, other.currency); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAmount()).compareTo(other.isSetAmount()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAmount()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, other.amount); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deliveryRecharge2_args("); + boolean first = true; + + sb.append("uid:"); + sb.append(this.uid); + first = false; + if (!first) sb.append(", "); + sb.append("goodsId:"); + if (this.goodsId == null) { + sb.append("null"); + } else { + sb.append(this.goodsId); + } + first = false; + if (!first) sb.append(", "); + sb.append("currency:"); + if (this.currency == null) { + sb.append("null"); + } else { + sb.append(this.currency); + } + first = false; + if (!first) sb.append(", "); + sb.append("amount:"); + sb.append(this.amount); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deliveryRecharge2_argsStandardSchemeFactory implements SchemeFactory { + public deliveryRecharge2_argsStandardScheme getScheme() { + return new deliveryRecharge2_argsStandardScheme(); + } + } + + private static class deliveryRecharge2_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deliveryRecharge2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // UID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // GOODS_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.goodsId = iprot.readString(); + struct.setGoodsIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // CURRENCY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.currency = iprot.readString(); + struct.setCurrencyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // AMOUNT + if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { + struct.amount = iprot.readDouble(); + struct.setAmountIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deliveryRecharge2_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(UID_FIELD_DESC); + oprot.writeI32(struct.uid); + oprot.writeFieldEnd(); + if (struct.goodsId != null) { + oprot.writeFieldBegin(GOODS_ID_FIELD_DESC); + oprot.writeString(struct.goodsId); + oprot.writeFieldEnd(); + } + if (struct.currency != null) { + oprot.writeFieldBegin(CURRENCY_FIELD_DESC); + oprot.writeString(struct.currency); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(AMOUNT_FIELD_DESC); + oprot.writeDouble(struct.amount); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deliveryRecharge2_argsTupleSchemeFactory implements SchemeFactory { + public deliveryRecharge2_argsTupleScheme getScheme() { + return new deliveryRecharge2_argsTupleScheme(); + } + } + + private static class deliveryRecharge2_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deliveryRecharge2_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUid()) { + optionals.set(0); + } + if (struct.isSetGoodsId()) { + optionals.set(1); + } + if (struct.isSetCurrency()) { + optionals.set(2); + } + if (struct.isSetAmount()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetUid()) { + oprot.writeI32(struct.uid); + } + if (struct.isSetGoodsId()) { + oprot.writeString(struct.goodsId); + } + if (struct.isSetCurrency()) { + oprot.writeString(struct.currency); + } + if (struct.isSetAmount()) { + oprot.writeDouble(struct.amount); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deliveryRecharge2_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } + if (incoming.get(1)) { + struct.goodsId = iprot.readString(); + struct.setGoodsIdIsSet(true); + } + if (incoming.get(2)) { + struct.currency = iprot.readString(); + struct.setCurrencyIsSet(true); + } + if (incoming.get(3)) { + struct.amount = iprot.readDouble(); + struct.setAmountIsSet(true); + } + } + } + + } + + public static class deliveryRecharge2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deliveryRecharge2_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deliveryRecharge2_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deliveryRecharge2_resultTupleSchemeFactory()); + } + + public Result success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Result.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deliveryRecharge2_result.class, metaDataMap); + } + + public deliveryRecharge2_result() { + } + + public deliveryRecharge2_result( + Result success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public deliveryRecharge2_result(deliveryRecharge2_result other) { + if (other.isSetSuccess()) { + this.success = new Result(other.success); + } + } + + public deliveryRecharge2_result deepCopy() { + return new deliveryRecharge2_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public Result getSuccess() { + return this.success; + } + + public deliveryRecharge2_result setSuccess(Result success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Result)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deliveryRecharge2_result) + return this.equals((deliveryRecharge2_result)that); + return false; + } + + public boolean equals(deliveryRecharge2_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(deliveryRecharge2_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deliveryRecharge2_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deliveryRecharge2_resultStandardSchemeFactory implements SchemeFactory { + public deliveryRecharge2_resultStandardScheme getScheme() { + return new deliveryRecharge2_resultStandardScheme(); + } + } + + private static class deliveryRecharge2_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deliveryRecharge2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deliveryRecharge2_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deliveryRecharge2_resultTupleSchemeFactory implements SchemeFactory { + public deliveryRecharge2_resultTupleScheme getScheme() { + return new deliveryRecharge2_resultTupleScheme(); + } + } + + private static class deliveryRecharge2_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deliveryRecharge2_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deliveryRecharge2_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class getRecharge_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRecharge_args"); + + private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("uid", org.apache.thrift.protocol.TType.I32, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRecharge_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRecharge_argsTupleSchemeFactory()); + } + + public int uid; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UID((short)1, "uid"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UID + return UID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __UID_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("uid", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRecharge_args.class, metaDataMap); + } + + public getRecharge_args() { + } + + public getRecharge_args( + int uid) + { + this(); + this.uid = uid; + setUidIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public getRecharge_args(getRecharge_args other) { + __isset_bitfield = other.__isset_bitfield; + this.uid = other.uid; + } + + public getRecharge_args deepCopy() { + return new getRecharge_args(this); + } + + @Override + public void clear() { + setUidIsSet(false); + this.uid = 0; + } + + public int getUid() { + return this.uid; + } + + public getRecharge_args setUid(int uid) { + this.uid = uid; + setUidIsSet(true); + return this; + } + + public void unsetUid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UID_ISSET_ID); + } + + /** Returns true if field uid is set (has been assigned a value) and false otherwise */ + public boolean isSetUid() { + return EncodingUtils.testBit(__isset_bitfield, __UID_ISSET_ID); + } + + public void setUidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UID: + if (value == null) { + unsetUid(); + } else { + setUid((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UID: + return Integer.valueOf(getUid()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UID: + return isSetUid(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRecharge_args) + return this.equals((getRecharge_args)that); + return false; + } + + public boolean equals(getRecharge_args that) { + if (that == null) + return false; + + boolean this_present_uid = true; + boolean that_present_uid = true; + if (this_present_uid || that_present_uid) { + if (!(this_present_uid && that_present_uid)) + return false; + if (this.uid != that.uid) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_uid = true; + list.add(present_uid); + if (present_uid) + list.add(uid); + + return list.hashCode(); + } + + @Override + public int compareTo(getRecharge_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uid, other.uid); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRecharge_args("); + boolean first = true; + + sb.append("uid:"); + sb.append(this.uid); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRecharge_argsStandardSchemeFactory implements SchemeFactory { + public getRecharge_argsStandardScheme getScheme() { + return new getRecharge_argsStandardScheme(); + } + } + + private static class getRecharge_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRecharge_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // UID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRecharge_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(UID_FIELD_DESC); + oprot.writeI32(struct.uid); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRecharge_argsTupleSchemeFactory implements SchemeFactory { + public getRecharge_argsTupleScheme getScheme() { + return new getRecharge_argsTupleScheme(); + } + } + + private static class getRecharge_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRecharge_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUid()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetUid()) { + oprot.writeI32(struct.uid); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRecharge_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } + } + } + + } + + public static class getRecharge_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRecharge_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRecharge_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRecharge_resultTupleSchemeFactory()); + } + + public RechargeResult success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RechargeResult.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRecharge_result.class, metaDataMap); + } + + public getRecharge_result() { + } + + public getRecharge_result( + RechargeResult success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public getRecharge_result(getRecharge_result other) { + if (other.isSetSuccess()) { + this.success = new RechargeResult(other.success); + } + } + + public getRecharge_result deepCopy() { + return new getRecharge_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public RechargeResult getSuccess() { + return this.success; + } + + public getRecharge_result setSuccess(RechargeResult success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((RechargeResult)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRecharge_result) + return this.equals((getRecharge_result)that); + return false; + } + + public boolean equals(getRecharge_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(getRecharge_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRecharge_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRecharge_resultStandardSchemeFactory implements SchemeFactory { + public getRecharge_resultStandardScheme getScheme() { + return new getRecharge_resultStandardScheme(); + } + } + + private static class getRecharge_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRecharge_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new RechargeResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRecharge_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRecharge_resultTupleSchemeFactory implements SchemeFactory { + public getRecharge_resultTupleScheme getScheme() { + return new getRecharge_resultTupleScheme(); + } + } + + private static class getRecharge_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRecharge_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRecharge_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new RechargeResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class mathcRoomAdressInfo_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mathcRoomAdressInfo_args"); + + private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("uid", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)2); + private static final org.apache.thrift.protocol.TField ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("address", org.apache.thrift.protocol.TType.STRING, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new mathcRoomAdressInfo_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mathcRoomAdressInfo_argsTupleSchemeFactory()); + } + + public int uid; // required + public int type; // required + public String address; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UID((short)1, "uid"), + TYPE((short)2, "type"), + ADDRESS((short)3, "address"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UID + return UID; + case 2: // TYPE + return TYPE; + case 3: // ADDRESS + return ADDRESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __UID_ISSET_ID = 0; + private static final int __TYPE_ISSET_ID = 1; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("uid", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("address", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mathcRoomAdressInfo_args.class, metaDataMap); + } + + public mathcRoomAdressInfo_args() { + } + + public mathcRoomAdressInfo_args( + int uid, + int type, + String address) + { + this(); + this.uid = uid; + setUidIsSet(true); + this.type = type; + setTypeIsSet(true); + this.address = address; + } + + /** + * Performs a deep copy on other. + */ + public mathcRoomAdressInfo_args(mathcRoomAdressInfo_args other) { + __isset_bitfield = other.__isset_bitfield; + this.uid = other.uid; + this.type = other.type; + if (other.isSetAddress()) { + this.address = other.address; + } + } + + public mathcRoomAdressInfo_args deepCopy() { + return new mathcRoomAdressInfo_args(this); + } + + @Override + public void clear() { + setUidIsSet(false); + this.uid = 0; + setTypeIsSet(false); + this.type = 0; + this.address = null; + } + + public int getUid() { + return this.uid; + } + + public mathcRoomAdressInfo_args setUid(int uid) { + this.uid = uid; + setUidIsSet(true); + return this; + } + + public void unsetUid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UID_ISSET_ID); + } + + /** Returns true if field uid is set (has been assigned a value) and false otherwise */ + public boolean isSetUid() { + return EncodingUtils.testBit(__isset_bitfield, __UID_ISSET_ID); + } + + public void setUidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID_ISSET_ID, value); + } + + public int getType() { + return this.type; + } + + public mathcRoomAdressInfo_args setType(int type) { + this.type = type; + setTypeIsSet(true); + return this; + } + + public void unsetType() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TYPE_ISSET_ID); + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return EncodingUtils.testBit(__isset_bitfield, __TYPE_ISSET_ID); + } + + public void setTypeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TYPE_ISSET_ID, value); + } + + public String getAddress() { + return this.address; + } + + public mathcRoomAdressInfo_args setAddress(String address) { + this.address = address; + return this; + } + + public void unsetAddress() { + this.address = null; + } + + /** Returns true if field address is set (has been assigned a value) and false otherwise */ + public boolean isSetAddress() { + return this.address != null; + } + + public void setAddressIsSet(boolean value) { + if (!value) { + this.address = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UID: + if (value == null) { + unsetUid(); + } else { + setUid((Integer)value); + } + break; + + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((Integer)value); + } + break; + + case ADDRESS: + if (value == null) { + unsetAddress(); + } else { + setAddress((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UID: + return Integer.valueOf(getUid()); + + case TYPE: + return Integer.valueOf(getType()); + + case ADDRESS: + return getAddress(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UID: + return isSetUid(); + case TYPE: + return isSetType(); + case ADDRESS: + return isSetAddress(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof mathcRoomAdressInfo_args) + return this.equals((mathcRoomAdressInfo_args)that); + return false; + } + + public boolean equals(mathcRoomAdressInfo_args that) { + if (that == null) + return false; + + boolean this_present_uid = true; + boolean that_present_uid = true; + if (this_present_uid || that_present_uid) { + if (!(this_present_uid && that_present_uid)) + return false; + if (this.uid != that.uid) + return false; + } + + boolean this_present_type = true; + boolean that_present_type = true; + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (this.type != that.type) + return false; + } + + boolean this_present_address = true && this.isSetAddress(); + boolean that_present_address = true && that.isSetAddress(); + if (this_present_address || that_present_address) { + if (!(this_present_address && that_present_address)) + return false; + if (!this.address.equals(that.address)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_uid = true; + list.add(present_uid); + if (present_uid) + list.add(uid); + + boolean present_type = true; + list.add(present_type); + if (present_type) + list.add(type); + + boolean present_address = true && (isSetAddress()); + list.add(present_address); + if (present_address) + list.add(address); + + return list.hashCode(); + } + + @Override + public int compareTo(mathcRoomAdressInfo_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uid, other.uid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAddress()).compareTo(other.isSetAddress()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAddress()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.address, other.address); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("mathcRoomAdressInfo_args("); + boolean first = true; + + sb.append("uid:"); + sb.append(this.uid); + first = false; + if (!first) sb.append(", "); + sb.append("type:"); + sb.append(this.type); + first = false; + if (!first) sb.append(", "); + sb.append("address:"); + if (this.address == null) { + sb.append("null"); + } else { + sb.append(this.address); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class mathcRoomAdressInfo_argsStandardSchemeFactory implements SchemeFactory { + public mathcRoomAdressInfo_argsStandardScheme getScheme() { + return new mathcRoomAdressInfo_argsStandardScheme(); + } + } + + private static class mathcRoomAdressInfo_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, mathcRoomAdressInfo_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // UID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.type = iprot.readI32(); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ADDRESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.address = iprot.readString(); + struct.setAddressIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, mathcRoomAdressInfo_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(UID_FIELD_DESC); + oprot.writeI32(struct.uid); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI32(struct.type); + oprot.writeFieldEnd(); + if (struct.address != null) { + oprot.writeFieldBegin(ADDRESS_FIELD_DESC); + oprot.writeString(struct.address); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class mathcRoomAdressInfo_argsTupleSchemeFactory implements SchemeFactory { + public mathcRoomAdressInfo_argsTupleScheme getScheme() { + return new mathcRoomAdressInfo_argsTupleScheme(); + } + } + + private static class mathcRoomAdressInfo_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, mathcRoomAdressInfo_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUid()) { + optionals.set(0); + } + if (struct.isSetType()) { + optionals.set(1); + } + if (struct.isSetAddress()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetUid()) { + oprot.writeI32(struct.uid); + } + if (struct.isSetType()) { + oprot.writeI32(struct.type); + } + if (struct.isSetAddress()) { + oprot.writeString(struct.address); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, mathcRoomAdressInfo_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } + if (incoming.get(1)) { + struct.type = iprot.readI32(); + struct.setTypeIsSet(true); + } + if (incoming.get(2)) { + struct.address = iprot.readString(); + struct.setAddressIsSet(true); + } + } + } + + } + + public static class mathcRoomAdressInfo_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mathcRoomAdressInfo_result"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new mathcRoomAdressInfo_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mathcRoomAdressInfo_resultTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mathcRoomAdressInfo_result.class, metaDataMap); + } + + public mathcRoomAdressInfo_result() { + } + + /** + * Performs a deep copy on other. + */ + public mathcRoomAdressInfo_result(mathcRoomAdressInfo_result other) { + } + + public mathcRoomAdressInfo_result deepCopy() { + return new mathcRoomAdressInfo_result(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof mathcRoomAdressInfo_result) + return this.equals((mathcRoomAdressInfo_result)that); + return false; + } + + public boolean equals(mathcRoomAdressInfo_result that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(mathcRoomAdressInfo_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("mathcRoomAdressInfo_result("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class mathcRoomAdressInfo_resultStandardSchemeFactory implements SchemeFactory { + public mathcRoomAdressInfo_resultStandardScheme getScheme() { + return new mathcRoomAdressInfo_resultStandardScheme(); + } + } + + private static class mathcRoomAdressInfo_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, mathcRoomAdressInfo_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, mathcRoomAdressInfo_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class mathcRoomAdressInfo_resultTupleSchemeFactory implements SchemeFactory { + public mathcRoomAdressInfo_resultTupleScheme getScheme() { + return new mathcRoomAdressInfo_resultTupleScheme(); + } + } + + private static class mathcRoomAdressInfo_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, mathcRoomAdressInfo_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, mathcRoomAdressInfo_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class sendMailToRole_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sendMailToRole_args"); + + private static final org.apache.thrift.protocol.TField UIDS_FIELD_DESC = new org.apache.thrift.protocol.TField("uids", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TITLE_FIELD_DESC = new org.apache.thrift.protocol.TField("title", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField CONTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("content", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField REWARD_FIELD_DESC = new org.apache.thrift.protocol.TField("reward", org.apache.thrift.protocol.TType.STRING, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new sendMailToRole_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new sendMailToRole_argsTupleSchemeFactory()); + } + + public String uids; // required + public String title; // required + public String content; // required + public String reward; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UIDS((short)1, "uids"), + TITLE((short)2, "title"), + CONTENT((short)3, "content"), + REWARD((short)4, "reward"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UIDS + return UIDS; + case 2: // TITLE + return TITLE; + case 3: // CONTENT + return CONTENT; + case 4: // REWARD + return REWARD; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.UIDS, new org.apache.thrift.meta_data.FieldMetaData("uids", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TITLE, new org.apache.thrift.meta_data.FieldMetaData("title", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CONTENT, new org.apache.thrift.meta_data.FieldMetaData("content", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.REWARD, new org.apache.thrift.meta_data.FieldMetaData("reward", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendMailToRole_args.class, metaDataMap); + } + + public sendMailToRole_args() { + } + + public sendMailToRole_args( + String uids, + String title, + String content, + String reward) + { + this(); + this.uids = uids; + this.title = title; + this.content = content; + this.reward = reward; + } + + /** + * Performs a deep copy on other. + */ + public sendMailToRole_args(sendMailToRole_args other) { + if (other.isSetUids()) { + this.uids = other.uids; + } + if (other.isSetTitle()) { + this.title = other.title; + } + if (other.isSetContent()) { + this.content = other.content; + } + if (other.isSetReward()) { + this.reward = other.reward; + } + } + + public sendMailToRole_args deepCopy() { + return new sendMailToRole_args(this); + } + + @Override + public void clear() { + this.uids = null; + this.title = null; + this.content = null; + this.reward = null; + } + + public String getUids() { + return this.uids; + } + + public sendMailToRole_args setUids(String uids) { + this.uids = uids; + return this; + } + + public void unsetUids() { + this.uids = null; + } + + /** Returns true if field uids is set (has been assigned a value) and false otherwise */ + public boolean isSetUids() { + return this.uids != null; + } + + public void setUidsIsSet(boolean value) { + if (!value) { + this.uids = null; + } + } + + public String getTitle() { + return this.title; + } + + public sendMailToRole_args setTitle(String title) { + this.title = title; + return this; + } + + public void unsetTitle() { + this.title = null; + } + + /** Returns true if field title is set (has been assigned a value) and false otherwise */ + public boolean isSetTitle() { + return this.title != null; + } + + public void setTitleIsSet(boolean value) { + if (!value) { + this.title = null; + } + } + + public String getContent() { + return this.content; + } + + public sendMailToRole_args setContent(String content) { + this.content = content; + return this; + } + + public void unsetContent() { + this.content = null; + } + + /** Returns true if field content is set (has been assigned a value) and false otherwise */ + public boolean isSetContent() { + return this.content != null; + } + + public void setContentIsSet(boolean value) { + if (!value) { + this.content = null; + } + } + + public String getReward() { + return this.reward; + } + + public sendMailToRole_args setReward(String reward) { + this.reward = reward; + return this; + } + + public void unsetReward() { + this.reward = null; + } + + /** Returns true if field reward is set (has been assigned a value) and false otherwise */ + public boolean isSetReward() { + return this.reward != null; + } + + public void setRewardIsSet(boolean value) { + if (!value) { + this.reward = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UIDS: + if (value == null) { + unsetUids(); + } else { + setUids((String)value); + } + break; + + case TITLE: + if (value == null) { + unsetTitle(); + } else { + setTitle((String)value); + } + break; + + case CONTENT: + if (value == null) { + unsetContent(); + } else { + setContent((String)value); + } + break; + + case REWARD: + if (value == null) { + unsetReward(); + } else { + setReward((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UIDS: + return getUids(); + + case TITLE: + return getTitle(); + + case CONTENT: + return getContent(); + + case REWARD: + return getReward(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UIDS: + return isSetUids(); + case TITLE: + return isSetTitle(); + case CONTENT: + return isSetContent(); + case REWARD: + return isSetReward(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof sendMailToRole_args) + return this.equals((sendMailToRole_args)that); + return false; + } + + public boolean equals(sendMailToRole_args that) { + if (that == null) + return false; + + boolean this_present_uids = true && this.isSetUids(); + boolean that_present_uids = true && that.isSetUids(); + if (this_present_uids || that_present_uids) { + if (!(this_present_uids && that_present_uids)) + return false; + if (!this.uids.equals(that.uids)) + return false; + } + + boolean this_present_title = true && this.isSetTitle(); + boolean that_present_title = true && that.isSetTitle(); + if (this_present_title || that_present_title) { + if (!(this_present_title && that_present_title)) + return false; + if (!this.title.equals(that.title)) + return false; + } + + boolean this_present_content = true && this.isSetContent(); + boolean that_present_content = true && that.isSetContent(); + if (this_present_content || that_present_content) { + if (!(this_present_content && that_present_content)) + return false; + if (!this.content.equals(that.content)) + return false; + } + + boolean this_present_reward = true && this.isSetReward(); + boolean that_present_reward = true && that.isSetReward(); + if (this_present_reward || that_present_reward) { + if (!(this_present_reward && that_present_reward)) + return false; + if (!this.reward.equals(that.reward)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_uids = true && (isSetUids()); + list.add(present_uids); + if (present_uids) + list.add(uids); + + boolean present_title = true && (isSetTitle()); + list.add(present_title); + if (present_title) + list.add(title); + + boolean present_content = true && (isSetContent()); + list.add(present_content); + if (present_content) + list.add(content); + + boolean present_reward = true && (isSetReward()); + list.add(present_reward); + if (present_reward) + list.add(reward); + + return list.hashCode(); + } + + @Override + public int compareTo(sendMailToRole_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUids()).compareTo(other.isSetUids()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUids()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uids, other.uids); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTitle()).compareTo(other.isSetTitle()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTitle()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.title, other.title); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetContent()).compareTo(other.isSetContent()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetContent()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.content, other.content); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetReward()).compareTo(other.isSetReward()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReward()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reward, other.reward); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("sendMailToRole_args("); + boolean first = true; + + sb.append("uids:"); + if (this.uids == null) { + sb.append("null"); + } else { + sb.append(this.uids); + } + first = false; + if (!first) sb.append(", "); + sb.append("title:"); + if (this.title == null) { + sb.append("null"); + } else { + sb.append(this.title); + } + first = false; + if (!first) sb.append(", "); + sb.append("content:"); + if (this.content == null) { + sb.append("null"); + } else { + sb.append(this.content); + } + first = false; + if (!first) sb.append(", "); + sb.append("reward:"); + if (this.reward == null) { + sb.append("null"); + } else { + sb.append(this.reward); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class sendMailToRole_argsStandardSchemeFactory implements SchemeFactory { + public sendMailToRole_argsStandardScheme getScheme() { + return new sendMailToRole_argsStandardScheme(); + } + } + + private static class sendMailToRole_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, sendMailToRole_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // UIDS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.uids = iprot.readString(); + struct.setUidsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TITLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.title = iprot.readString(); + struct.setTitleIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // CONTENT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.content = iprot.readString(); + struct.setContentIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // REWARD + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.reward = iprot.readString(); + struct.setRewardIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, sendMailToRole_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.uids != null) { + oprot.writeFieldBegin(UIDS_FIELD_DESC); + oprot.writeString(struct.uids); + oprot.writeFieldEnd(); + } + if (struct.title != null) { + oprot.writeFieldBegin(TITLE_FIELD_DESC); + oprot.writeString(struct.title); + oprot.writeFieldEnd(); + } + if (struct.content != null) { + oprot.writeFieldBegin(CONTENT_FIELD_DESC); + oprot.writeString(struct.content); + oprot.writeFieldEnd(); + } + if (struct.reward != null) { + oprot.writeFieldBegin(REWARD_FIELD_DESC); + oprot.writeString(struct.reward); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class sendMailToRole_argsTupleSchemeFactory implements SchemeFactory { + public sendMailToRole_argsTupleScheme getScheme() { + return new sendMailToRole_argsTupleScheme(); + } + } + + private static class sendMailToRole_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, sendMailToRole_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUids()) { + optionals.set(0); + } + if (struct.isSetTitle()) { + optionals.set(1); + } + if (struct.isSetContent()) { + optionals.set(2); + } + if (struct.isSetReward()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetUids()) { + oprot.writeString(struct.uids); + } + if (struct.isSetTitle()) { + oprot.writeString(struct.title); + } + if (struct.isSetContent()) { + oprot.writeString(struct.content); + } + if (struct.isSetReward()) { + oprot.writeString(struct.reward); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, sendMailToRole_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.uids = iprot.readString(); + struct.setUidsIsSet(true); + } + if (incoming.get(1)) { + struct.title = iprot.readString(); + struct.setTitleIsSet(true); + } + if (incoming.get(2)) { + struct.content = iprot.readString(); + struct.setContentIsSet(true); + } + if (incoming.get(3)) { + struct.reward = iprot.readString(); + struct.setRewardIsSet(true); + } + } + } + + } + + public static class sendMailToRole_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sendMailToRole_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new sendMailToRole_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new sendMailToRole_resultTupleSchemeFactory()); + } + + public Result success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Result.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendMailToRole_result.class, metaDataMap); + } + + public sendMailToRole_result() { + } + + public sendMailToRole_result( + Result success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public sendMailToRole_result(sendMailToRole_result other) { + if (other.isSetSuccess()) { + this.success = new Result(other.success); + } + } + + public sendMailToRole_result deepCopy() { + return new sendMailToRole_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public Result getSuccess() { + return this.success; + } + + public sendMailToRole_result setSuccess(Result success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Result)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof sendMailToRole_result) + return this.equals((sendMailToRole_result)that); + return false; + } + + public boolean equals(sendMailToRole_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(sendMailToRole_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("sendMailToRole_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class sendMailToRole_resultStandardSchemeFactory implements SchemeFactory { + public sendMailToRole_resultStandardScheme getScheme() { + return new sendMailToRole_resultStandardScheme(); + } + } + + private static class sendMailToRole_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, sendMailToRole_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, sendMailToRole_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class sendMailToRole_resultTupleSchemeFactory implements SchemeFactory { + public sendMailToRole_resultTupleScheme getScheme() { + return new sendMailToRole_resultTupleScheme(); + } + } + + private static class sendMailToRole_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, sendMailToRole_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, sendMailToRole_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class deliveryCoupon_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deliveryCoupon_args"); + + private static final org.apache.thrift.protocol.TField GAME_USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gameUserId", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField TITLE_FIELD_DESC = new org.apache.thrift.protocol.TField("title", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField CONTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("content", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField ORDER_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("orderTime", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.LIST, (short)6); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deliveryCoupon_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deliveryCoupon_argsTupleSchemeFactory()); + } + + public int gameUserId; // required + public String couponCode; // required + public String title; // required + public String content; // required + public long orderTime; // required + public List itemId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + GAME_USER_ID((short)1, "gameUserId"), + COUPON_CODE((short)2, "couponCode"), + TITLE((short)3, "title"), + CONTENT((short)4, "content"), + ORDER_TIME((short)5, "orderTime"), + ITEM_ID((short)6, "itemId"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // GAME_USER_ID + return GAME_USER_ID; + case 2: // COUPON_CODE + return COUPON_CODE; + case 3: // TITLE + return TITLE; + case 4: // CONTENT + return CONTENT; + case 5: // ORDER_TIME + return ORDER_TIME; + case 6: // ITEM_ID + return ITEM_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __GAMEUSERID_ISSET_ID = 0; + private static final int __ORDERTIME_ISSET_ID = 1; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.GAME_USER_ID, new org.apache.thrift.meta_data.FieldMetaData("gameUserId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TITLE, new org.apache.thrift.meta_data.FieldMetaData("title", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CONTENT, new org.apache.thrift.meta_data.FieldMetaData("content", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ORDER_TIME, new org.apache.thrift.meta_data.FieldMetaData("orderTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, itemData.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deliveryCoupon_args.class, metaDataMap); + } + + public deliveryCoupon_args() { + } + + public deliveryCoupon_args( + int gameUserId, + String couponCode, + String title, + String content, + long orderTime, + List itemId) + { + this(); + this.gameUserId = gameUserId; + setGameUserIdIsSet(true); + this.couponCode = couponCode; + this.title = title; + this.content = content; + this.orderTime = orderTime; + setOrderTimeIsSet(true); + this.itemId = itemId; + } + + /** + * Performs a deep copy on other. + */ + public deliveryCoupon_args(deliveryCoupon_args other) { + __isset_bitfield = other.__isset_bitfield; + this.gameUserId = other.gameUserId; + if (other.isSetCouponCode()) { + this.couponCode = other.couponCode; + } + if (other.isSetTitle()) { + this.title = other.title; + } + if (other.isSetContent()) { + this.content = other.content; + } + this.orderTime = other.orderTime; + if (other.isSetItemId()) { + List __this__itemId = new ArrayList(other.itemId.size()); + for (itemData other_element : other.itemId) { + __this__itemId.add(new itemData(other_element)); + } + this.itemId = __this__itemId; + } + } + + public deliveryCoupon_args deepCopy() { + return new deliveryCoupon_args(this); + } + + @Override + public void clear() { + setGameUserIdIsSet(false); + this.gameUserId = 0; + this.couponCode = null; + this.title = null; + this.content = null; + setOrderTimeIsSet(false); + this.orderTime = 0; + this.itemId = null; + } + + public int getGameUserId() { + return this.gameUserId; + } + + public deliveryCoupon_args setGameUserId(int gameUserId) { + this.gameUserId = gameUserId; + setGameUserIdIsSet(true); + return this; + } + + public void unsetGameUserId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GAMEUSERID_ISSET_ID); + } + + /** Returns true if field gameUserId is set (has been assigned a value) and false otherwise */ + public boolean isSetGameUserId() { + return EncodingUtils.testBit(__isset_bitfield, __GAMEUSERID_ISSET_ID); + } + + public void setGameUserIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GAMEUSERID_ISSET_ID, value); + } + + public String getCouponCode() { + return this.couponCode; + } + + public deliveryCoupon_args setCouponCode(String couponCode) { + this.couponCode = couponCode; + return this; + } + + public void unsetCouponCode() { + this.couponCode = null; + } + + /** Returns true if field couponCode is set (has been assigned a value) and false otherwise */ + public boolean isSetCouponCode() { + return this.couponCode != null; + } + + public void setCouponCodeIsSet(boolean value) { + if (!value) { + this.couponCode = null; + } + } + + public String getTitle() { + return this.title; + } + + public deliveryCoupon_args setTitle(String title) { + this.title = title; + return this; + } + + public void unsetTitle() { + this.title = null; + } + + /** Returns true if field title is set (has been assigned a value) and false otherwise */ + public boolean isSetTitle() { + return this.title != null; + } + + public void setTitleIsSet(boolean value) { + if (!value) { + this.title = null; + } + } + + public String getContent() { + return this.content; + } + + public deliveryCoupon_args setContent(String content) { + this.content = content; + return this; + } + + public void unsetContent() { + this.content = null; + } + + /** Returns true if field content is set (has been assigned a value) and false otherwise */ + public boolean isSetContent() { + return this.content != null; + } + + public void setContentIsSet(boolean value) { + if (!value) { + this.content = null; + } + } + + public long getOrderTime() { + return this.orderTime; + } + + public deliveryCoupon_args setOrderTime(long orderTime) { + this.orderTime = orderTime; + setOrderTimeIsSet(true); + return this; + } + + public void unsetOrderTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ORDERTIME_ISSET_ID); + } + + /** Returns true if field orderTime is set (has been assigned a value) and false otherwise */ + public boolean isSetOrderTime() { + return EncodingUtils.testBit(__isset_bitfield, __ORDERTIME_ISSET_ID); + } + + public void setOrderTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ORDERTIME_ISSET_ID, value); + } + + public int getItemIdSize() { + return (this.itemId == null) ? 0 : this.itemId.size(); + } + + public java.util.Iterator getItemIdIterator() { + return (this.itemId == null) ? null : this.itemId.iterator(); + } + + public void addToItemId(itemData elem) { + if (this.itemId == null) { + this.itemId = new ArrayList(); + } + this.itemId.add(elem); + } + + public List getItemId() { + return this.itemId; + } + + public deliveryCoupon_args setItemId(List itemId) { + this.itemId = itemId; + return this; + } + + public void unsetItemId() { + this.itemId = null; + } + + /** Returns true if field itemId is set (has been assigned a value) and false otherwise */ + public boolean isSetItemId() { + return this.itemId != null; + } + + public void setItemIdIsSet(boolean value) { + if (!value) { + this.itemId = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case GAME_USER_ID: + if (value == null) { + unsetGameUserId(); + } else { + setGameUserId((Integer)value); + } + break; + + case COUPON_CODE: + if (value == null) { + unsetCouponCode(); + } else { + setCouponCode((String)value); + } + break; + + case TITLE: + if (value == null) { + unsetTitle(); + } else { + setTitle((String)value); + } + break; + + case CONTENT: + if (value == null) { + unsetContent(); + } else { + setContent((String)value); + } + break; + + case ORDER_TIME: + if (value == null) { + unsetOrderTime(); + } else { + setOrderTime((Long)value); + } + break; + + case ITEM_ID: + if (value == null) { + unsetItemId(); + } else { + setItemId((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case GAME_USER_ID: + return Integer.valueOf(getGameUserId()); + + case COUPON_CODE: + return getCouponCode(); + + case TITLE: + return getTitle(); + + case CONTENT: + return getContent(); + + case ORDER_TIME: + return Long.valueOf(getOrderTime()); + + case ITEM_ID: + return getItemId(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case GAME_USER_ID: + return isSetGameUserId(); + case COUPON_CODE: + return isSetCouponCode(); + case TITLE: + return isSetTitle(); + case CONTENT: + return isSetContent(); + case ORDER_TIME: + return isSetOrderTime(); + case ITEM_ID: + return isSetItemId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deliveryCoupon_args) + return this.equals((deliveryCoupon_args)that); + return false; + } + + public boolean equals(deliveryCoupon_args that) { + if (that == null) + return false; + + boolean this_present_gameUserId = true; + boolean that_present_gameUserId = true; + if (this_present_gameUserId || that_present_gameUserId) { + if (!(this_present_gameUserId && that_present_gameUserId)) + return false; + if (this.gameUserId != that.gameUserId) + return false; + } + + boolean this_present_couponCode = true && this.isSetCouponCode(); + boolean that_present_couponCode = true && that.isSetCouponCode(); + if (this_present_couponCode || that_present_couponCode) { + if (!(this_present_couponCode && that_present_couponCode)) + return false; + if (!this.couponCode.equals(that.couponCode)) + return false; + } + + boolean this_present_title = true && this.isSetTitle(); + boolean that_present_title = true && that.isSetTitle(); + if (this_present_title || that_present_title) { + if (!(this_present_title && that_present_title)) + return false; + if (!this.title.equals(that.title)) + return false; + } + + boolean this_present_content = true && this.isSetContent(); + boolean that_present_content = true && that.isSetContent(); + if (this_present_content || that_present_content) { + if (!(this_present_content && that_present_content)) + return false; + if (!this.content.equals(that.content)) + return false; + } + + boolean this_present_orderTime = true; + boolean that_present_orderTime = true; + if (this_present_orderTime || that_present_orderTime) { + if (!(this_present_orderTime && that_present_orderTime)) + return false; + if (this.orderTime != that.orderTime) + return false; + } + + boolean this_present_itemId = true && this.isSetItemId(); + boolean that_present_itemId = true && that.isSetItemId(); + if (this_present_itemId || that_present_itemId) { + if (!(this_present_itemId && that_present_itemId)) + return false; + if (!this.itemId.equals(that.itemId)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_gameUserId = true; + list.add(present_gameUserId); + if (present_gameUserId) + list.add(gameUserId); + + boolean present_couponCode = true && (isSetCouponCode()); + list.add(present_couponCode); + if (present_couponCode) + list.add(couponCode); + + boolean present_title = true && (isSetTitle()); + list.add(present_title); + if (present_title) + list.add(title); + + boolean present_content = true && (isSetContent()); + list.add(present_content); + if (present_content) + list.add(content); + + boolean present_orderTime = true; + list.add(present_orderTime); + if (present_orderTime) + list.add(orderTime); + + boolean present_itemId = true && (isSetItemId()); + list.add(present_itemId); + if (present_itemId) + list.add(itemId); + + return list.hashCode(); + } + + @Override + public int compareTo(deliveryCoupon_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetGameUserId()).compareTo(other.isSetGameUserId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGameUserId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gameUserId, other.gameUserId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(other.isSetCouponCode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCouponCode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, other.couponCode); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTitle()).compareTo(other.isSetTitle()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTitle()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.title, other.title); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetContent()).compareTo(other.isSetContent()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetContent()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.content, other.content); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOrderTime()).compareTo(other.isSetOrderTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOrderTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderTime, other.orderTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetItemId()).compareTo(other.isSetItemId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetItemId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, other.itemId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deliveryCoupon_args("); + boolean first = true; + + sb.append("gameUserId:"); + sb.append(this.gameUserId); + first = false; + if (!first) sb.append(", "); + sb.append("couponCode:"); + if (this.couponCode == null) { + sb.append("null"); + } else { + sb.append(this.couponCode); + } + first = false; + if (!first) sb.append(", "); + sb.append("title:"); + if (this.title == null) { + sb.append("null"); + } else { + sb.append(this.title); + } + first = false; + if (!first) sb.append(", "); + sb.append("content:"); + if (this.content == null) { + sb.append("null"); + } else { + sb.append(this.content); + } + first = false; + if (!first) sb.append(", "); + sb.append("orderTime:"); + sb.append(this.orderTime); + first = false; + if (!first) sb.append(", "); + sb.append("itemId:"); + if (this.itemId == null) { + sb.append("null"); + } else { + sb.append(this.itemId); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deliveryCoupon_argsStandardSchemeFactory implements SchemeFactory { + public deliveryCoupon_argsStandardScheme getScheme() { + return new deliveryCoupon_argsStandardScheme(); + } + } + + private static class deliveryCoupon_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deliveryCoupon_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // GAME_USER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.gameUserId = iprot.readI32(); + struct.setGameUserIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // COUPON_CODE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.couponCode = iprot.readString(); + struct.setCouponCodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TITLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.title = iprot.readString(); + struct.setTitleIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // CONTENT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.content = iprot.readString(); + struct.setContentIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // ORDER_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.orderTime = iprot.readI64(); + struct.setOrderTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // ITEM_ID + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); + struct.itemId = new ArrayList(_list8.size); + itemData _elem9; + for (int _i10 = 0; _i10 < _list8.size; ++_i10) + { + _elem9 = new itemData(); + _elem9.read(iprot); + struct.itemId.add(_elem9); + } + iprot.readListEnd(); + } + struct.setItemIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deliveryCoupon_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(GAME_USER_ID_FIELD_DESC); + oprot.writeI32(struct.gameUserId); + oprot.writeFieldEnd(); + if (struct.couponCode != null) { + oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC); + oprot.writeString(struct.couponCode); + oprot.writeFieldEnd(); + } + if (struct.title != null) { + oprot.writeFieldBegin(TITLE_FIELD_DESC); + oprot.writeString(struct.title); + oprot.writeFieldEnd(); + } + if (struct.content != null) { + oprot.writeFieldBegin(CONTENT_FIELD_DESC); + oprot.writeString(struct.content); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(ORDER_TIME_FIELD_DESC); + oprot.writeI64(struct.orderTime); + oprot.writeFieldEnd(); + if (struct.itemId != null) { + oprot.writeFieldBegin(ITEM_ID_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.itemId.size())); + for (itemData _iter11 : struct.itemId) + { + _iter11.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deliveryCoupon_argsTupleSchemeFactory implements SchemeFactory { + public deliveryCoupon_argsTupleScheme getScheme() { + return new deliveryCoupon_argsTupleScheme(); + } + } + + private static class deliveryCoupon_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deliveryCoupon_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetGameUserId()) { + optionals.set(0); + } + if (struct.isSetCouponCode()) { + optionals.set(1); + } + if (struct.isSetTitle()) { + optionals.set(2); + } + if (struct.isSetContent()) { + optionals.set(3); + } + if (struct.isSetOrderTime()) { + optionals.set(4); + } + if (struct.isSetItemId()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetGameUserId()) { + oprot.writeI32(struct.gameUserId); + } + if (struct.isSetCouponCode()) { + oprot.writeString(struct.couponCode); + } + if (struct.isSetTitle()) { + oprot.writeString(struct.title); + } + if (struct.isSetContent()) { + oprot.writeString(struct.content); + } + if (struct.isSetOrderTime()) { + oprot.writeI64(struct.orderTime); + } + if (struct.isSetItemId()) { + { + oprot.writeI32(struct.itemId.size()); + for (itemData _iter12 : struct.itemId) + { + _iter12.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deliveryCoupon_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.gameUserId = iprot.readI32(); + struct.setGameUserIdIsSet(true); + } + if (incoming.get(1)) { + struct.couponCode = iprot.readString(); + struct.setCouponCodeIsSet(true); + } + if (incoming.get(2)) { + struct.title = iprot.readString(); + struct.setTitleIsSet(true); + } + if (incoming.get(3)) { + struct.content = iprot.readString(); + struct.setContentIsSet(true); + } + if (incoming.get(4)) { + struct.orderTime = iprot.readI64(); + struct.setOrderTimeIsSet(true); + } + if (incoming.get(5)) { + { + org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.itemId = new ArrayList(_list13.size); + itemData _elem14; + for (int _i15 = 0; _i15 < _list13.size; ++_i15) + { + _elem14 = new itemData(); + _elem14.read(iprot); + struct.itemId.add(_elem14); + } + } + struct.setItemIdIsSet(true); + } + } + } + + } + + public static class deliveryCoupon_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deliveryCoupon_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deliveryCoupon_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deliveryCoupon_resultTupleSchemeFactory()); + } + + public Result success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Result.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deliveryCoupon_result.class, metaDataMap); + } + + public deliveryCoupon_result() { + } + + public deliveryCoupon_result( + Result success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public deliveryCoupon_result(deliveryCoupon_result other) { + if (other.isSetSuccess()) { + this.success = new Result(other.success); + } + } + + public deliveryCoupon_result deepCopy() { + return new deliveryCoupon_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public Result getSuccess() { + return this.success; + } + + public deliveryCoupon_result setSuccess(Result success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Result)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deliveryCoupon_result) + return this.equals((deliveryCoupon_result)that); + return false; + } + + public boolean equals(deliveryCoupon_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(deliveryCoupon_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deliveryCoupon_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deliveryCoupon_resultStandardSchemeFactory implements SchemeFactory { + public deliveryCoupon_resultStandardScheme getScheme() { + return new deliveryCoupon_resultStandardScheme(); + } + } + + private static class deliveryCoupon_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deliveryCoupon_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deliveryCoupon_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deliveryCoupon_resultTupleSchemeFactory implements SchemeFactory { + public deliveryCoupon_resultTupleScheme getScheme() { + return new deliveryCoupon_resultTupleScheme(); + } + } + + private static class deliveryCoupon_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deliveryCoupon_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deliveryCoupon_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class deliveryOrder_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deliveryOrder_args"); + + private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("uid", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField GOODS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("goodsId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField ORDER_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("orderTime", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField DEVALUE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("devalueId", org.apache.thrift.protocol.TType.I32, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deliveryOrder_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deliveryOrder_argsTupleSchemeFactory()); + } + + public int uid; // required + public String goodsId; // required + public long orderTime; // required + public String orderId; // required + public int devalueId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UID((short)1, "uid"), + GOODS_ID((short)2, "goodsId"), + ORDER_TIME((short)3, "orderTime"), + ORDER_ID((short)4, "orderId"), + DEVALUE_ID((short)5, "devalueId"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UID + return UID; + case 2: // GOODS_ID + return GOODS_ID; + case 3: // ORDER_TIME + return ORDER_TIME; + case 4: // ORDER_ID + return ORDER_ID; + case 5: // DEVALUE_ID + return DEVALUE_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __UID_ISSET_ID = 0; + private static final int __ORDERTIME_ISSET_ID = 1; + private static final int __DEVALUEID_ISSET_ID = 2; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("uid", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.GOODS_ID, new org.apache.thrift.meta_data.FieldMetaData("goodsId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ORDER_TIME, new org.apache.thrift.meta_data.FieldMetaData("orderTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DEVALUE_ID, new org.apache.thrift.meta_data.FieldMetaData("devalueId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deliveryOrder_args.class, metaDataMap); + } + + public deliveryOrder_args() { + } + + public deliveryOrder_args( + int uid, + String goodsId, + long orderTime, + String orderId, + int devalueId) + { + this(); + this.uid = uid; + setUidIsSet(true); + this.goodsId = goodsId; + this.orderTime = orderTime; + setOrderTimeIsSet(true); + this.orderId = orderId; + this.devalueId = devalueId; + setDevalueIdIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public deliveryOrder_args(deliveryOrder_args other) { + __isset_bitfield = other.__isset_bitfield; + this.uid = other.uid; + if (other.isSetGoodsId()) { + this.goodsId = other.goodsId; + } + this.orderTime = other.orderTime; + if (other.isSetOrderId()) { + this.orderId = other.orderId; + } + this.devalueId = other.devalueId; + } + + public deliveryOrder_args deepCopy() { + return new deliveryOrder_args(this); + } + + @Override + public void clear() { + setUidIsSet(false); + this.uid = 0; + this.goodsId = null; + setOrderTimeIsSet(false); + this.orderTime = 0; + this.orderId = null; + setDevalueIdIsSet(false); + this.devalueId = 0; + } + + public int getUid() { + return this.uid; + } + + public deliveryOrder_args setUid(int uid) { + this.uid = uid; + setUidIsSet(true); + return this; + } + + public void unsetUid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UID_ISSET_ID); + } + + /** Returns true if field uid is set (has been assigned a value) and false otherwise */ + public boolean isSetUid() { + return EncodingUtils.testBit(__isset_bitfield, __UID_ISSET_ID); + } + + public void setUidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID_ISSET_ID, value); + } + + public String getGoodsId() { + return this.goodsId; + } + + public deliveryOrder_args setGoodsId(String goodsId) { + this.goodsId = goodsId; + return this; + } + + public void unsetGoodsId() { + this.goodsId = null; + } + + /** Returns true if field goodsId is set (has been assigned a value) and false otherwise */ + public boolean isSetGoodsId() { + return this.goodsId != null; + } + + public void setGoodsIdIsSet(boolean value) { + if (!value) { + this.goodsId = null; + } + } + + public long getOrderTime() { + return this.orderTime; + } + + public deliveryOrder_args setOrderTime(long orderTime) { + this.orderTime = orderTime; + setOrderTimeIsSet(true); + return this; + } + + public void unsetOrderTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ORDERTIME_ISSET_ID); + } + + /** Returns true if field orderTime is set (has been assigned a value) and false otherwise */ + public boolean isSetOrderTime() { + return EncodingUtils.testBit(__isset_bitfield, __ORDERTIME_ISSET_ID); + } + + public void setOrderTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ORDERTIME_ISSET_ID, value); + } + + public String getOrderId() { + return this.orderId; + } + + public deliveryOrder_args setOrderId(String orderId) { + this.orderId = orderId; + return this; + } + + public void unsetOrderId() { + this.orderId = null; + } + + /** Returns true if field orderId is set (has been assigned a value) and false otherwise */ + public boolean isSetOrderId() { + return this.orderId != null; + } + + public void setOrderIdIsSet(boolean value) { + if (!value) { + this.orderId = null; + } + } + + public int getDevalueId() { + return this.devalueId; + } + + public deliveryOrder_args setDevalueId(int devalueId) { + this.devalueId = devalueId; + setDevalueIdIsSet(true); + return this; + } + + public void unsetDevalueId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEVALUEID_ISSET_ID); + } + + /** Returns true if field devalueId is set (has been assigned a value) and false otherwise */ + public boolean isSetDevalueId() { + return EncodingUtils.testBit(__isset_bitfield, __DEVALUEID_ISSET_ID); + } + + public void setDevalueIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEVALUEID_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UID: + if (value == null) { + unsetUid(); + } else { + setUid((Integer)value); + } + break; + + case GOODS_ID: + if (value == null) { + unsetGoodsId(); + } else { + setGoodsId((String)value); + } + break; + + case ORDER_TIME: + if (value == null) { + unsetOrderTime(); + } else { + setOrderTime((Long)value); + } + break; + + case ORDER_ID: + if (value == null) { + unsetOrderId(); + } else { + setOrderId((String)value); + } + break; + + case DEVALUE_ID: + if (value == null) { + unsetDevalueId(); + } else { + setDevalueId((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UID: + return Integer.valueOf(getUid()); + + case GOODS_ID: + return getGoodsId(); + + case ORDER_TIME: + return Long.valueOf(getOrderTime()); + + case ORDER_ID: + return getOrderId(); + + case DEVALUE_ID: + return Integer.valueOf(getDevalueId()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UID: + return isSetUid(); + case GOODS_ID: + return isSetGoodsId(); + case ORDER_TIME: + return isSetOrderTime(); + case ORDER_ID: + return isSetOrderId(); + case DEVALUE_ID: + return isSetDevalueId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deliveryOrder_args) + return this.equals((deliveryOrder_args)that); + return false; + } + + public boolean equals(deliveryOrder_args that) { + if (that == null) + return false; + + boolean this_present_uid = true; + boolean that_present_uid = true; + if (this_present_uid || that_present_uid) { + if (!(this_present_uid && that_present_uid)) + return false; + if (this.uid != that.uid) + return false; + } + + boolean this_present_goodsId = true && this.isSetGoodsId(); + boolean that_present_goodsId = true && that.isSetGoodsId(); + if (this_present_goodsId || that_present_goodsId) { + if (!(this_present_goodsId && that_present_goodsId)) + return false; + if (!this.goodsId.equals(that.goodsId)) + return false; + } + + boolean this_present_orderTime = true; + boolean that_present_orderTime = true; + if (this_present_orderTime || that_present_orderTime) { + if (!(this_present_orderTime && that_present_orderTime)) + return false; + if (this.orderTime != that.orderTime) + return false; + } + + boolean this_present_orderId = true && this.isSetOrderId(); + boolean that_present_orderId = true && that.isSetOrderId(); + if (this_present_orderId || that_present_orderId) { + if (!(this_present_orderId && that_present_orderId)) + return false; + if (!this.orderId.equals(that.orderId)) + return false; + } + + boolean this_present_devalueId = true; + boolean that_present_devalueId = true; + if (this_present_devalueId || that_present_devalueId) { + if (!(this_present_devalueId && that_present_devalueId)) + return false; + if (this.devalueId != that.devalueId) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_uid = true; + list.add(present_uid); + if (present_uid) + list.add(uid); + + boolean present_goodsId = true && (isSetGoodsId()); + list.add(present_goodsId); + if (present_goodsId) + list.add(goodsId); + + boolean present_orderTime = true; + list.add(present_orderTime); + if (present_orderTime) + list.add(orderTime); + + boolean present_orderId = true && (isSetOrderId()); + list.add(present_orderId); + if (present_orderId) + list.add(orderId); + + boolean present_devalueId = true; + list.add(present_devalueId); + if (present_devalueId) + list.add(devalueId); + + return list.hashCode(); + } + + @Override + public int compareTo(deliveryOrder_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uid, other.uid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGoodsId()).compareTo(other.isSetGoodsId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGoodsId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.goodsId, other.goodsId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOrderTime()).compareTo(other.isSetOrderTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOrderTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderTime, other.orderTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(other.isSetOrderId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOrderId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, other.orderId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDevalueId()).compareTo(other.isSetDevalueId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDevalueId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.devalueId, other.devalueId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deliveryOrder_args("); + boolean first = true; + + sb.append("uid:"); + sb.append(this.uid); + first = false; + if (!first) sb.append(", "); + sb.append("goodsId:"); + if (this.goodsId == null) { + sb.append("null"); + } else { + sb.append(this.goodsId); + } + first = false; + if (!first) sb.append(", "); + sb.append("orderTime:"); + sb.append(this.orderTime); + first = false; + if (!first) sb.append(", "); + sb.append("orderId:"); + if (this.orderId == null) { + sb.append("null"); + } else { + sb.append(this.orderId); + } + first = false; + if (!first) sb.append(", "); + sb.append("devalueId:"); + sb.append(this.devalueId); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deliveryOrder_argsStandardSchemeFactory implements SchemeFactory { + public deliveryOrder_argsStandardScheme getScheme() { + return new deliveryOrder_argsStandardScheme(); + } + } + + private static class deliveryOrder_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deliveryOrder_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // UID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // GOODS_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.goodsId = iprot.readString(); + struct.setGoodsIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ORDER_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.orderTime = iprot.readI64(); + struct.setOrderTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ORDER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.orderId = iprot.readString(); + struct.setOrderIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // DEVALUE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.devalueId = iprot.readI32(); + struct.setDevalueIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deliveryOrder_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(UID_FIELD_DESC); + oprot.writeI32(struct.uid); + oprot.writeFieldEnd(); + if (struct.goodsId != null) { + oprot.writeFieldBegin(GOODS_ID_FIELD_DESC); + oprot.writeString(struct.goodsId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(ORDER_TIME_FIELD_DESC); + oprot.writeI64(struct.orderTime); + oprot.writeFieldEnd(); + if (struct.orderId != null) { + oprot.writeFieldBegin(ORDER_ID_FIELD_DESC); + oprot.writeString(struct.orderId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DEVALUE_ID_FIELD_DESC); + oprot.writeI32(struct.devalueId); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deliveryOrder_argsTupleSchemeFactory implements SchemeFactory { + public deliveryOrder_argsTupleScheme getScheme() { + return new deliveryOrder_argsTupleScheme(); + } + } + + private static class deliveryOrder_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deliveryOrder_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUid()) { + optionals.set(0); + } + if (struct.isSetGoodsId()) { + optionals.set(1); + } + if (struct.isSetOrderTime()) { + optionals.set(2); + } + if (struct.isSetOrderId()) { + optionals.set(3); + } + if (struct.isSetDevalueId()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetUid()) { + oprot.writeI32(struct.uid); + } + if (struct.isSetGoodsId()) { + oprot.writeString(struct.goodsId); + } + if (struct.isSetOrderTime()) { + oprot.writeI64(struct.orderTime); + } + if (struct.isSetOrderId()) { + oprot.writeString(struct.orderId); + } + if (struct.isSetDevalueId()) { + oprot.writeI32(struct.devalueId); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deliveryOrder_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } + if (incoming.get(1)) { + struct.goodsId = iprot.readString(); + struct.setGoodsIdIsSet(true); + } + if (incoming.get(2)) { + struct.orderTime = iprot.readI64(); + struct.setOrderTimeIsSet(true); + } + if (incoming.get(3)) { + struct.orderId = iprot.readString(); + struct.setOrderIdIsSet(true); + } + if (incoming.get(4)) { + struct.devalueId = iprot.readI32(); + struct.setDevalueIdIsSet(true); + } + } + } + + } + + public static class deliveryOrder_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deliveryOrder_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deliveryOrder_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deliveryOrder_resultTupleSchemeFactory()); + } + + public Result success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Result.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deliveryOrder_result.class, metaDataMap); + } + + public deliveryOrder_result() { + } + + public deliveryOrder_result( + Result success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public deliveryOrder_result(deliveryOrder_result other) { + if (other.isSetSuccess()) { + this.success = new Result(other.success); + } + } + + public deliveryOrder_result deepCopy() { + return new deliveryOrder_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public Result getSuccess() { + return this.success; + } + + public deliveryOrder_result setSuccess(Result success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Result)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deliveryOrder_result) + return this.equals((deliveryOrder_result)that); + return false; + } + + public boolean equals(deliveryOrder_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(deliveryOrder_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deliveryOrder_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deliveryOrder_resultStandardSchemeFactory implements SchemeFactory { + public deliveryOrder_resultStandardScheme getScheme() { + return new deliveryOrder_resultStandardScheme(); + } + } + + private static class deliveryOrder_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deliveryOrder_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deliveryOrder_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deliveryOrder_resultTupleSchemeFactory implements SchemeFactory { + public deliveryOrder_resultTupleScheme getScheme() { + return new deliveryOrder_resultTupleScheme(); + } + } + + private static class deliveryOrder_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deliveryOrder_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deliveryOrder_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class operateUser_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("operateUser_args"); + + private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("uid", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField OP_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("opStatus", org.apache.thrift.protocol.TType.I32, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new operateUser_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new operateUser_argsTupleSchemeFactory()); + } + + public int uid; // required + public int opStatus; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UID((short)1, "uid"), + OP_STATUS((short)2, "opStatus"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UID + return UID; + case 2: // OP_STATUS + return OP_STATUS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __UID_ISSET_ID = 0; + private static final int __OPSTATUS_ISSET_ID = 1; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("uid", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.OP_STATUS, new org.apache.thrift.meta_data.FieldMetaData("opStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(operateUser_args.class, metaDataMap); + } + + public operateUser_args() { + } + + public operateUser_args( + int uid, + int opStatus) + { + this(); + this.uid = uid; + setUidIsSet(true); + this.opStatus = opStatus; + setOpStatusIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public operateUser_args(operateUser_args other) { + __isset_bitfield = other.__isset_bitfield; + this.uid = other.uid; + this.opStatus = other.opStatus; + } + + public operateUser_args deepCopy() { + return new operateUser_args(this); + } + + @Override + public void clear() { + setUidIsSet(false); + this.uid = 0; + setOpStatusIsSet(false); + this.opStatus = 0; + } + + public int getUid() { + return this.uid; + } + + public operateUser_args setUid(int uid) { + this.uid = uid; + setUidIsSet(true); + return this; + } + + public void unsetUid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UID_ISSET_ID); + } + + /** Returns true if field uid is set (has been assigned a value) and false otherwise */ + public boolean isSetUid() { + return EncodingUtils.testBit(__isset_bitfield, __UID_ISSET_ID); + } + + public void setUidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID_ISSET_ID, value); + } + + public int getOpStatus() { + return this.opStatus; + } + + public operateUser_args setOpStatus(int opStatus) { + this.opStatus = opStatus; + setOpStatusIsSet(true); + return this; + } + + public void unsetOpStatus() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OPSTATUS_ISSET_ID); + } + + /** Returns true if field opStatus is set (has been assigned a value) and false otherwise */ + public boolean isSetOpStatus() { + return EncodingUtils.testBit(__isset_bitfield, __OPSTATUS_ISSET_ID); + } + + public void setOpStatusIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OPSTATUS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UID: + if (value == null) { + unsetUid(); + } else { + setUid((Integer)value); + } + break; + + case OP_STATUS: + if (value == null) { + unsetOpStatus(); + } else { + setOpStatus((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UID: + return Integer.valueOf(getUid()); + + case OP_STATUS: + return Integer.valueOf(getOpStatus()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UID: + return isSetUid(); + case OP_STATUS: + return isSetOpStatus(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof operateUser_args) + return this.equals((operateUser_args)that); + return false; + } + + public boolean equals(operateUser_args that) { + if (that == null) + return false; + + boolean this_present_uid = true; + boolean that_present_uid = true; + if (this_present_uid || that_present_uid) { + if (!(this_present_uid && that_present_uid)) + return false; + if (this.uid != that.uid) + return false; + } + + boolean this_present_opStatus = true; + boolean that_present_opStatus = true; + if (this_present_opStatus || that_present_opStatus) { + if (!(this_present_opStatus && that_present_opStatus)) + return false; + if (this.opStatus != that.opStatus) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_uid = true; + list.add(present_uid); + if (present_uid) + list.add(uid); + + boolean present_opStatus = true; + list.add(present_opStatus); + if (present_opStatus) + list.add(opStatus); + + return list.hashCode(); + } + + @Override + public int compareTo(operateUser_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uid, other.uid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOpStatus()).compareTo(other.isSetOpStatus()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOpStatus()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.opStatus, other.opStatus); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("operateUser_args("); + boolean first = true; + + sb.append("uid:"); + sb.append(this.uid); + first = false; + if (!first) sb.append(", "); + sb.append("opStatus:"); + sb.append(this.opStatus); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class operateUser_argsStandardSchemeFactory implements SchemeFactory { + public operateUser_argsStandardScheme getScheme() { + return new operateUser_argsStandardScheme(); + } + } + + private static class operateUser_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, operateUser_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // UID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // OP_STATUS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.opStatus = iprot.readI32(); + struct.setOpStatusIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, operateUser_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(UID_FIELD_DESC); + oprot.writeI32(struct.uid); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(OP_STATUS_FIELD_DESC); + oprot.writeI32(struct.opStatus); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class operateUser_argsTupleSchemeFactory implements SchemeFactory { + public operateUser_argsTupleScheme getScheme() { + return new operateUser_argsTupleScheme(); + } + } + + private static class operateUser_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, operateUser_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUid()) { + optionals.set(0); + } + if (struct.isSetOpStatus()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUid()) { + oprot.writeI32(struct.uid); + } + if (struct.isSetOpStatus()) { + oprot.writeI32(struct.opStatus); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, operateUser_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } + if (incoming.get(1)) { + struct.opStatus = iprot.readI32(); + struct.setOpStatusIsSet(true); + } + } + } + + } + + public static class operateUser_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("operateUser_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new operateUser_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new operateUser_resultTupleSchemeFactory()); + } + + public Result success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Result.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(operateUser_result.class, metaDataMap); + } + + public operateUser_result() { + } + + public operateUser_result( + Result success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public operateUser_result(operateUser_result other) { + if (other.isSetSuccess()) { + this.success = new Result(other.success); + } + } + + public operateUser_result deepCopy() { + return new operateUser_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public Result getSuccess() { + return this.success; + } + + public operateUser_result setSuccess(Result success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Result)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof operateUser_result) + return this.equals((operateUser_result)that); + return false; + } + + public boolean equals(operateUser_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(operateUser_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("operateUser_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class operateUser_resultStandardSchemeFactory implements SchemeFactory { + public operateUser_resultStandardScheme getScheme() { + return new operateUser_resultStandardScheme(); + } + } + + private static class operateUser_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, operateUser_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, operateUser_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class operateUser_resultTupleSchemeFactory implements SchemeFactory { + public operateUser_resultTupleScheme getScheme() { + return new operateUser_resultTupleScheme(); + } + } + + private static class operateUser_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, operateUser_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, operateUser_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class getItemConfigs_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemConfigs_args"); + + private static final org.apache.thrift.protocol.TField ITEM_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("itemIds", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getItemConfigs_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getItemConfigs_argsTupleSchemeFactory()); + } + + public List itemIds; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ITEM_IDS((short)1, "itemIds"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ITEM_IDS + return ITEM_IDS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ITEM_IDS, new org.apache.thrift.meta_data.FieldMetaData("itemIds", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemConfigs_args.class, metaDataMap); + } + + public getItemConfigs_args() { + } + + public getItemConfigs_args( + List itemIds) + { + this(); + this.itemIds = itemIds; + } + + /** + * Performs a deep copy on other. + */ + public getItemConfigs_args(getItemConfigs_args other) { + if (other.isSetItemIds()) { + List __this__itemIds = new ArrayList(other.itemIds); + this.itemIds = __this__itemIds; + } + } + + public getItemConfigs_args deepCopy() { + return new getItemConfigs_args(this); + } + + @Override + public void clear() { + this.itemIds = null; + } + + public int getItemIdsSize() { + return (this.itemIds == null) ? 0 : this.itemIds.size(); + } + + public java.util.Iterator getItemIdsIterator() { + return (this.itemIds == null) ? null : this.itemIds.iterator(); + } + + public void addToItemIds(String elem) { + if (this.itemIds == null) { + this.itemIds = new ArrayList(); + } + this.itemIds.add(elem); + } + + public List getItemIds() { + return this.itemIds; + } + + public getItemConfigs_args setItemIds(List itemIds) { + this.itemIds = itemIds; + return this; + } + + public void unsetItemIds() { + this.itemIds = null; + } + + /** Returns true if field itemIds is set (has been assigned a value) and false otherwise */ + public boolean isSetItemIds() { + return this.itemIds != null; + } + + public void setItemIdsIsSet(boolean value) { + if (!value) { + this.itemIds = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ITEM_IDS: + if (value == null) { + unsetItemIds(); + } else { + setItemIds((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ITEM_IDS: + return getItemIds(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ITEM_IDS: + return isSetItemIds(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getItemConfigs_args) + return this.equals((getItemConfigs_args)that); + return false; + } + + public boolean equals(getItemConfigs_args that) { + if (that == null) + return false; + + boolean this_present_itemIds = true && this.isSetItemIds(); + boolean that_present_itemIds = true && that.isSetItemIds(); + if (this_present_itemIds || that_present_itemIds) { + if (!(this_present_itemIds && that_present_itemIds)) + return false; + if (!this.itemIds.equals(that.itemIds)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_itemIds = true && (isSetItemIds()); + list.add(present_itemIds); + if (present_itemIds) + list.add(itemIds); + + return list.hashCode(); + } + + @Override + public int compareTo(getItemConfigs_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetItemIds()).compareTo(other.isSetItemIds()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetItemIds()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemIds, other.itemIds); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getItemConfigs_args("); + boolean first = true; + + sb.append("itemIds:"); + if (this.itemIds == null) { + sb.append("null"); + } else { + sb.append(this.itemIds); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getItemConfigs_argsStandardSchemeFactory implements SchemeFactory { + public getItemConfigs_argsStandardScheme getScheme() { + return new getItemConfigs_argsStandardScheme(); + } + } + + private static class getItemConfigs_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getItemConfigs_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ITEM_IDS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list16 = iprot.readListBegin(); + struct.itemIds = new ArrayList(_list16.size); + String _elem17; + for (int _i18 = 0; _i18 < _list16.size; ++_i18) + { + _elem17 = iprot.readString(); + struct.itemIds.add(_elem17); + } + iprot.readListEnd(); + } + struct.setItemIdsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getItemConfigs_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.itemIds != null) { + oprot.writeFieldBegin(ITEM_IDS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.itemIds.size())); + for (String _iter19 : struct.itemIds) + { + oprot.writeString(_iter19); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getItemConfigs_argsTupleSchemeFactory implements SchemeFactory { + public getItemConfigs_argsTupleScheme getScheme() { + return new getItemConfigs_argsTupleScheme(); + } + } + + private static class getItemConfigs_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getItemConfigs_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetItemIds()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetItemIds()) { + { + oprot.writeI32(struct.itemIds.size()); + for (String _iter20 : struct.itemIds) + { + oprot.writeString(_iter20); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getItemConfigs_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.itemIds = new ArrayList(_list21.size); + String _elem22; + for (int _i23 = 0; _i23 < _list21.size; ++_i23) + { + _elem22 = iprot.readString(); + struct.itemIds.add(_elem22); + } + } + struct.setItemIdsIsSet(true); + } + } + } + + } + + public static class getItemConfigs_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemConfigs_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getItemConfigs_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getItemConfigs_resultTupleSchemeFactory()); + } + + public List success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ItemConfig.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemConfigs_result.class, metaDataMap); + } + + public getItemConfigs_result() { + } + + public getItemConfigs_result( + List success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public getItemConfigs_result(getItemConfigs_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (ItemConfig other_element : other.success) { + __this__success.add(new ItemConfig(other_element)); + } + this.success = __this__success; + } + } + + public getItemConfigs_result deepCopy() { + return new getItemConfigs_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(ItemConfig elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getItemConfigs_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getItemConfigs_result) + return this.equals((getItemConfigs_result)that); + return false; + } + + public boolean equals(getItemConfigs_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(getItemConfigs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getItemConfigs_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getItemConfigs_resultStandardSchemeFactory implements SchemeFactory { + public getItemConfigs_resultStandardScheme getScheme() { + return new getItemConfigs_resultStandardScheme(); + } + } + + private static class getItemConfigs_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getItemConfigs_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list24 = iprot.readListBegin(); + struct.success = new ArrayList(_list24.size); + ItemConfig _elem25; + for (int _i26 = 0; _i26 < _list24.size; ++_i26) + { + _elem25 = new ItemConfig(); + _elem25.read(iprot); + struct.success.add(_elem25); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getItemConfigs_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (ItemConfig _iter27 : struct.success) + { + _iter27.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getItemConfigs_resultTupleSchemeFactory implements SchemeFactory { + public getItemConfigs_resultTupleScheme getScheme() { + return new getItemConfigs_resultTupleScheme(); + } + } + + private static class getItemConfigs_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getItemConfigs_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (ItemConfig _iter28 : struct.success) + { + _iter28.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getItemConfigs_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list29.size); + ItemConfig _elem30; + for (int _i31 = 0; _i31 < _list29.size; ++_i31) + { + _elem30 = new ItemConfig(); + _elem30.read(iprot); + struct.success.add(_elem30); + } + } + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class giftCode_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("giftCode_args"); + + private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("uid", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField GIFT_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("giftCode", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new giftCode_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new giftCode_argsTupleSchemeFactory()); + } + + public int uid; // required + public String giftCode; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UID((short)1, "uid"), + GIFT_CODE((short)2, "giftCode"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UID + return UID; + case 2: // GIFT_CODE + return GIFT_CODE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __UID_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("uid", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.GIFT_CODE, new org.apache.thrift.meta_data.FieldMetaData("giftCode", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(giftCode_args.class, metaDataMap); + } + + public giftCode_args() { + } + + public giftCode_args( + int uid, + String giftCode) + { + this(); + this.uid = uid; + setUidIsSet(true); + this.giftCode = giftCode; + } + + /** + * Performs a deep copy on other. + */ + public giftCode_args(giftCode_args other) { + __isset_bitfield = other.__isset_bitfield; + this.uid = other.uid; + if (other.isSetGiftCode()) { + this.giftCode = other.giftCode; + } + } + + public giftCode_args deepCopy() { + return new giftCode_args(this); + } + + @Override + public void clear() { + setUidIsSet(false); + this.uid = 0; + this.giftCode = null; + } + + public int getUid() { + return this.uid; + } + + public giftCode_args setUid(int uid) { + this.uid = uid; + setUidIsSet(true); + return this; + } + + public void unsetUid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UID_ISSET_ID); + } + + /** Returns true if field uid is set (has been assigned a value) and false otherwise */ + public boolean isSetUid() { + return EncodingUtils.testBit(__isset_bitfield, __UID_ISSET_ID); + } + + public void setUidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID_ISSET_ID, value); + } + + public String getGiftCode() { + return this.giftCode; + } + + public giftCode_args setGiftCode(String giftCode) { + this.giftCode = giftCode; + return this; + } + + public void unsetGiftCode() { + this.giftCode = null; + } + + /** Returns true if field giftCode is set (has been assigned a value) and false otherwise */ + public boolean isSetGiftCode() { + return this.giftCode != null; + } + + public void setGiftCodeIsSet(boolean value) { + if (!value) { + this.giftCode = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UID: + if (value == null) { + unsetUid(); + } else { + setUid((Integer)value); + } + break; + + case GIFT_CODE: + if (value == null) { + unsetGiftCode(); + } else { + setGiftCode((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UID: + return Integer.valueOf(getUid()); + + case GIFT_CODE: + return getGiftCode(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UID: + return isSetUid(); + case GIFT_CODE: + return isSetGiftCode(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof giftCode_args) + return this.equals((giftCode_args)that); + return false; + } + + public boolean equals(giftCode_args that) { + if (that == null) + return false; + + boolean this_present_uid = true; + boolean that_present_uid = true; + if (this_present_uid || that_present_uid) { + if (!(this_present_uid && that_present_uid)) + return false; + if (this.uid != that.uid) + return false; + } + + boolean this_present_giftCode = true && this.isSetGiftCode(); + boolean that_present_giftCode = true && that.isSetGiftCode(); + if (this_present_giftCode || that_present_giftCode) { + if (!(this_present_giftCode && that_present_giftCode)) + return false; + if (!this.giftCode.equals(that.giftCode)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_uid = true; + list.add(present_uid); + if (present_uid) + list.add(uid); + + boolean present_giftCode = true && (isSetGiftCode()); + list.add(present_giftCode); + if (present_giftCode) + list.add(giftCode); + + return list.hashCode(); + } + + @Override + public int compareTo(giftCode_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uid, other.uid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGiftCode()).compareTo(other.isSetGiftCode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGiftCode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.giftCode, other.giftCode); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("giftCode_args("); + boolean first = true; + + sb.append("uid:"); + sb.append(this.uid); + first = false; + if (!first) sb.append(", "); + sb.append("giftCode:"); + if (this.giftCode == null) { + sb.append("null"); + } else { + sb.append(this.giftCode); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class giftCode_argsStandardSchemeFactory implements SchemeFactory { + public giftCode_argsStandardScheme getScheme() { + return new giftCode_argsStandardScheme(); + } + } + + private static class giftCode_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, giftCode_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // UID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // GIFT_CODE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.giftCode = iprot.readString(); + struct.setGiftCodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, giftCode_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(UID_FIELD_DESC); + oprot.writeI32(struct.uid); + oprot.writeFieldEnd(); + if (struct.giftCode != null) { + oprot.writeFieldBegin(GIFT_CODE_FIELD_DESC); + oprot.writeString(struct.giftCode); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class giftCode_argsTupleSchemeFactory implements SchemeFactory { + public giftCode_argsTupleScheme getScheme() { + return new giftCode_argsTupleScheme(); + } + } + + private static class giftCode_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, giftCode_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUid()) { + optionals.set(0); + } + if (struct.isSetGiftCode()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUid()) { + oprot.writeI32(struct.uid); + } + if (struct.isSetGiftCode()) { + oprot.writeString(struct.giftCode); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, giftCode_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } + if (incoming.get(1)) { + struct.giftCode = iprot.readString(); + struct.setGiftCodeIsSet(true); + } + } + } + + } + + public static class giftCode_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("giftCode_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new giftCode_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new giftCode_resultTupleSchemeFactory()); + } + + public Result success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Result.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(giftCode_result.class, metaDataMap); + } + + public giftCode_result() { + } + + public giftCode_result( + Result success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public giftCode_result(giftCode_result other) { + if (other.isSetSuccess()) { + this.success = new Result(other.success); + } + } + + public giftCode_result deepCopy() { + return new giftCode_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public Result getSuccess() { + return this.success; + } + + public giftCode_result setSuccess(Result success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Result)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof giftCode_result) + return this.equals((giftCode_result)that); + return false; + } + + public boolean equals(giftCode_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(giftCode_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("giftCode_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class giftCode_resultStandardSchemeFactory implements SchemeFactory { + public giftCode_resultStandardScheme getScheme() { + return new giftCode_resultStandardScheme(); + } + } + + private static class giftCode_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, giftCode_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, giftCode_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class giftCode_resultTupleSchemeFactory implements SchemeFactory { + public giftCode_resultTupleScheme getScheme() { + return new giftCode_resultTupleScheme(); + } + } + + private static class giftCode_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, giftCode_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, giftCode_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + +} diff --git a/src/main/java/com/ljsd/jieling/thrift/idl/RechargeResult.java b/src/main/java/com/ljsd/jieling/thrift/idl/RechargeResult.java new file mode 100644 index 0000000..aed7e29 --- /dev/null +++ b/src/main/java/com/ljsd/jieling/thrift/idl/RechargeResult.java @@ -0,0 +1,656 @@ +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.ljsd.jieling.thrift.idl; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2023-7-10") +public class RechargeResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RechargeResult"); + + private static final org.apache.thrift.protocol.TField RESULT_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("resultCode", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField RESULT_MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("resultMsg", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField SUB_NODE_SET_FIELD_DESC = new org.apache.thrift.protocol.TField("subNodeSet", org.apache.thrift.protocol.TType.SET, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new RechargeResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new RechargeResultTupleSchemeFactory()); + } + + public int resultCode; // optional + public String resultMsg; // optional + public Set subNodeSet; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RESULT_CODE((short)1, "resultCode"), + RESULT_MSG((short)2, "resultMsg"), + SUB_NODE_SET((short)3, "subNodeSet"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RESULT_CODE + return RESULT_CODE; + case 2: // RESULT_MSG + return RESULT_MSG; + case 3: // SUB_NODE_SET + return SUB_NODE_SET; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __RESULTCODE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.RESULT_CODE,_Fields.RESULT_MSG,_Fields.SUB_NODE_SET}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.RESULT_CODE, new org.apache.thrift.meta_data.FieldMetaData("resultCode", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.RESULT_MSG, new org.apache.thrift.meta_data.FieldMetaData("resultMsg", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SUB_NODE_SET, new org.apache.thrift.meta_data.FieldMetaData("subNodeSet", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RechargeResult.class, metaDataMap); + } + + public RechargeResult() { + } + + /** + * Performs a deep copy on other. + */ + public RechargeResult(RechargeResult other) { + __isset_bitfield = other.__isset_bitfield; + this.resultCode = other.resultCode; + if (other.isSetResultMsg()) { + this.resultMsg = other.resultMsg; + } + if (other.isSetSubNodeSet()) { + Set __this__subNodeSet = new HashSet(other.subNodeSet); + this.subNodeSet = __this__subNodeSet; + } + } + + public RechargeResult deepCopy() { + return new RechargeResult(this); + } + + @Override + public void clear() { + setResultCodeIsSet(false); + this.resultCode = 0; + this.resultMsg = null; + this.subNodeSet = null; + } + + public int getResultCode() { + return this.resultCode; + } + + public RechargeResult setResultCode(int resultCode) { + this.resultCode = resultCode; + setResultCodeIsSet(true); + return this; + } + + public void unsetResultCode() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESULTCODE_ISSET_ID); + } + + /** Returns true if field resultCode is set (has been assigned a value) and false otherwise */ + public boolean isSetResultCode() { + return EncodingUtils.testBit(__isset_bitfield, __RESULTCODE_ISSET_ID); + } + + public void setResultCodeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESULTCODE_ISSET_ID, value); + } + + public String getResultMsg() { + return this.resultMsg; + } + + public RechargeResult setResultMsg(String resultMsg) { + this.resultMsg = resultMsg; + return this; + } + + public void unsetResultMsg() { + this.resultMsg = null; + } + + /** Returns true if field resultMsg is set (has been assigned a value) and false otherwise */ + public boolean isSetResultMsg() { + return this.resultMsg != null; + } + + public void setResultMsgIsSet(boolean value) { + if (!value) { + this.resultMsg = null; + } + } + + public int getSubNodeSetSize() { + return (this.subNodeSet == null) ? 0 : this.subNodeSet.size(); + } + + public java.util.Iterator getSubNodeSetIterator() { + return (this.subNodeSet == null) ? null : this.subNodeSet.iterator(); + } + + public void addToSubNodeSet(int elem) { + if (this.subNodeSet == null) { + this.subNodeSet = new HashSet(); + } + this.subNodeSet.add(elem); + } + + public Set getSubNodeSet() { + return this.subNodeSet; + } + + public RechargeResult setSubNodeSet(Set subNodeSet) { + this.subNodeSet = subNodeSet; + return this; + } + + public void unsetSubNodeSet() { + this.subNodeSet = null; + } + + /** Returns true if field subNodeSet is set (has been assigned a value) and false otherwise */ + public boolean isSetSubNodeSet() { + return this.subNodeSet != null; + } + + public void setSubNodeSetIsSet(boolean value) { + if (!value) { + this.subNodeSet = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RESULT_CODE: + if (value == null) { + unsetResultCode(); + } else { + setResultCode((Integer)value); + } + break; + + case RESULT_MSG: + if (value == null) { + unsetResultMsg(); + } else { + setResultMsg((String)value); + } + break; + + case SUB_NODE_SET: + if (value == null) { + unsetSubNodeSet(); + } else { + setSubNodeSet((Set)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RESULT_CODE: + return Integer.valueOf(getResultCode()); + + case RESULT_MSG: + return getResultMsg(); + + case SUB_NODE_SET: + return getSubNodeSet(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RESULT_CODE: + return isSetResultCode(); + case RESULT_MSG: + return isSetResultMsg(); + case SUB_NODE_SET: + return isSetSubNodeSet(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof RechargeResult) + return this.equals((RechargeResult)that); + return false; + } + + public boolean equals(RechargeResult that) { + if (that == null) + return false; + + boolean this_present_resultCode = true && this.isSetResultCode(); + boolean that_present_resultCode = true && that.isSetResultCode(); + if (this_present_resultCode || that_present_resultCode) { + if (!(this_present_resultCode && that_present_resultCode)) + return false; + if (this.resultCode != that.resultCode) + return false; + } + + boolean this_present_resultMsg = true && this.isSetResultMsg(); + boolean that_present_resultMsg = true && that.isSetResultMsg(); + if (this_present_resultMsg || that_present_resultMsg) { + if (!(this_present_resultMsg && that_present_resultMsg)) + return false; + if (!this.resultMsg.equals(that.resultMsg)) + return false; + } + + boolean this_present_subNodeSet = true && this.isSetSubNodeSet(); + boolean that_present_subNodeSet = true && that.isSetSubNodeSet(); + if (this_present_subNodeSet || that_present_subNodeSet) { + if (!(this_present_subNodeSet && that_present_subNodeSet)) + return false; + if (!this.subNodeSet.equals(that.subNodeSet)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_resultCode = true && (isSetResultCode()); + list.add(present_resultCode); + if (present_resultCode) + list.add(resultCode); + + boolean present_resultMsg = true && (isSetResultMsg()); + list.add(present_resultMsg); + if (present_resultMsg) + list.add(resultMsg); + + boolean present_subNodeSet = true && (isSetSubNodeSet()); + list.add(present_subNodeSet); + if (present_subNodeSet) + list.add(subNodeSet); + + return list.hashCode(); + } + + @Override + public int compareTo(RechargeResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetResultCode()).compareTo(other.isSetResultCode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetResultCode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resultCode, other.resultCode); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetResultMsg()).compareTo(other.isSetResultMsg()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetResultMsg()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resultMsg, other.resultMsg); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSubNodeSet()).compareTo(other.isSetSubNodeSet()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSubNodeSet()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.subNodeSet, other.subNodeSet); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("RechargeResult("); + boolean first = true; + + if (isSetResultCode()) { + sb.append("resultCode:"); + sb.append(this.resultCode); + first = false; + } + if (isSetResultMsg()) { + if (!first) sb.append(", "); + sb.append("resultMsg:"); + if (this.resultMsg == null) { + sb.append("null"); + } else { + sb.append(this.resultMsg); + } + first = false; + } + if (isSetSubNodeSet()) { + if (!first) sb.append(", "); + sb.append("subNodeSet:"); + if (this.subNodeSet == null) { + sb.append("null"); + } else { + sb.append(this.subNodeSet); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class RechargeResultStandardSchemeFactory implements SchemeFactory { + public RechargeResultStandardScheme getScheme() { + return new RechargeResultStandardScheme(); + } + } + + private static class RechargeResultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, RechargeResult struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // RESULT_CODE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.resultCode = iprot.readI32(); + struct.setResultCodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // RESULT_MSG + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.resultMsg = iprot.readString(); + struct.setResultMsgIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // SUB_NODE_SET + if (schemeField.type == org.apache.thrift.protocol.TType.SET) { + { + org.apache.thrift.protocol.TSet _set0 = iprot.readSetBegin(); + struct.subNodeSet = new HashSet(2*_set0.size); + int _elem1; + for (int _i2 = 0; _i2 < _set0.size; ++_i2) + { + _elem1 = iprot.readI32(); + struct.subNodeSet.add(_elem1); + } + iprot.readSetEnd(); + } + struct.setSubNodeSetIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, RechargeResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetResultCode()) { + oprot.writeFieldBegin(RESULT_CODE_FIELD_DESC); + oprot.writeI32(struct.resultCode); + oprot.writeFieldEnd(); + } + if (struct.resultMsg != null) { + if (struct.isSetResultMsg()) { + oprot.writeFieldBegin(RESULT_MSG_FIELD_DESC); + oprot.writeString(struct.resultMsg); + oprot.writeFieldEnd(); + } + } + if (struct.subNodeSet != null) { + if (struct.isSetSubNodeSet()) { + oprot.writeFieldBegin(SUB_NODE_SET_FIELD_DESC); + { + oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, struct.subNodeSet.size())); + for (int _iter3 : struct.subNodeSet) + { + oprot.writeI32(_iter3); + } + oprot.writeSetEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class RechargeResultTupleSchemeFactory implements SchemeFactory { + public RechargeResultTupleScheme getScheme() { + return new RechargeResultTupleScheme(); + } + } + + private static class RechargeResultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, RechargeResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetResultCode()) { + optionals.set(0); + } + if (struct.isSetResultMsg()) { + optionals.set(1); + } + if (struct.isSetSubNodeSet()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetResultCode()) { + oprot.writeI32(struct.resultCode); + } + if (struct.isSetResultMsg()) { + oprot.writeString(struct.resultMsg); + } + if (struct.isSetSubNodeSet()) { + { + oprot.writeI32(struct.subNodeSet.size()); + for (int _iter4 : struct.subNodeSet) + { + oprot.writeI32(_iter4); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, RechargeResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.resultCode = iprot.readI32(); + struct.setResultCodeIsSet(true); + } + if (incoming.get(1)) { + struct.resultMsg = iprot.readString(); + struct.setResultMsgIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TSet _set5 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + struct.subNodeSet = new HashSet(2*_set5.size); + int _elem6; + for (int _i7 = 0; _i7 < _set5.size; ++_i7) + { + _elem6 = iprot.readI32(); + struct.subNodeSet.add(_elem6); + } + } + struct.setSubNodeSetIsSet(true); + } + } + } + +} + diff --git a/src/main/java/com/ljsd/jieling/thrift/idl/Result.java b/src/main/java/com/ljsd/jieling/thrift/idl/Result.java new file mode 100644 index 0000000..3dd4337 --- /dev/null +++ b/src/main/java/com/ljsd/jieling/thrift/idl/Result.java @@ -0,0 +1,500 @@ +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.ljsd.jieling.thrift.idl; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2023-7-10") +public class Result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Result"); + + private static final org.apache.thrift.protocol.TField RESULT_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("resultCode", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField RESULT_MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("resultMsg", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ResultTupleSchemeFactory()); + } + + public int resultCode; // optional + public String resultMsg; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RESULT_CODE((short)1, "resultCode"), + RESULT_MSG((short)2, "resultMsg"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RESULT_CODE + return RESULT_CODE; + case 2: // RESULT_MSG + return RESULT_MSG; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __RESULTCODE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.RESULT_CODE,_Fields.RESULT_MSG}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.RESULT_CODE, new org.apache.thrift.meta_data.FieldMetaData("resultCode", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.RESULT_MSG, new org.apache.thrift.meta_data.FieldMetaData("resultMsg", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Result.class, metaDataMap); + } + + public Result() { + } + + /** + * Performs a deep copy on other. + */ + public Result(Result other) { + __isset_bitfield = other.__isset_bitfield; + this.resultCode = other.resultCode; + if (other.isSetResultMsg()) { + this.resultMsg = other.resultMsg; + } + } + + public Result deepCopy() { + return new Result(this); + } + + @Override + public void clear() { + setResultCodeIsSet(false); + this.resultCode = 0; + this.resultMsg = null; + } + + public int getResultCode() { + return this.resultCode; + } + + public Result setResultCode(int resultCode) { + this.resultCode = resultCode; + setResultCodeIsSet(true); + return this; + } + + public void unsetResultCode() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESULTCODE_ISSET_ID); + } + + /** Returns true if field resultCode is set (has been assigned a value) and false otherwise */ + public boolean isSetResultCode() { + return EncodingUtils.testBit(__isset_bitfield, __RESULTCODE_ISSET_ID); + } + + public void setResultCodeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESULTCODE_ISSET_ID, value); + } + + public String getResultMsg() { + return this.resultMsg; + } + + public Result setResultMsg(String resultMsg) { + this.resultMsg = resultMsg; + return this; + } + + public void unsetResultMsg() { + this.resultMsg = null; + } + + /** Returns true if field resultMsg is set (has been assigned a value) and false otherwise */ + public boolean isSetResultMsg() { + return this.resultMsg != null; + } + + public void setResultMsgIsSet(boolean value) { + if (!value) { + this.resultMsg = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RESULT_CODE: + if (value == null) { + unsetResultCode(); + } else { + setResultCode((Integer)value); + } + break; + + case RESULT_MSG: + if (value == null) { + unsetResultMsg(); + } else { + setResultMsg((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RESULT_CODE: + return Integer.valueOf(getResultCode()); + + case RESULT_MSG: + return getResultMsg(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RESULT_CODE: + return isSetResultCode(); + case RESULT_MSG: + return isSetResultMsg(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Result) + return this.equals((Result)that); + return false; + } + + public boolean equals(Result that) { + if (that == null) + return false; + + boolean this_present_resultCode = true && this.isSetResultCode(); + boolean that_present_resultCode = true && that.isSetResultCode(); + if (this_present_resultCode || that_present_resultCode) { + if (!(this_present_resultCode && that_present_resultCode)) + return false; + if (this.resultCode != that.resultCode) + return false; + } + + boolean this_present_resultMsg = true && this.isSetResultMsg(); + boolean that_present_resultMsg = true && that.isSetResultMsg(); + if (this_present_resultMsg || that_present_resultMsg) { + if (!(this_present_resultMsg && that_present_resultMsg)) + return false; + if (!this.resultMsg.equals(that.resultMsg)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_resultCode = true && (isSetResultCode()); + list.add(present_resultCode); + if (present_resultCode) + list.add(resultCode); + + boolean present_resultMsg = true && (isSetResultMsg()); + list.add(present_resultMsg); + if (present_resultMsg) + list.add(resultMsg); + + return list.hashCode(); + } + + @Override + public int compareTo(Result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetResultCode()).compareTo(other.isSetResultCode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetResultCode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resultCode, other.resultCode); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetResultMsg()).compareTo(other.isSetResultMsg()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetResultMsg()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resultMsg, other.resultMsg); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Result("); + boolean first = true; + + if (isSetResultCode()) { + sb.append("resultCode:"); + sb.append(this.resultCode); + first = false; + } + if (isSetResultMsg()) { + if (!first) sb.append(", "); + sb.append("resultMsg:"); + if (this.resultMsg == null) { + sb.append("null"); + } else { + sb.append(this.resultMsg); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class ResultStandardSchemeFactory implements SchemeFactory { + public ResultStandardScheme getScheme() { + return new ResultStandardScheme(); + } + } + + private static class ResultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // RESULT_CODE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.resultCode = iprot.readI32(); + struct.setResultCodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // RESULT_MSG + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.resultMsg = iprot.readString(); + struct.setResultMsgIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetResultCode()) { + oprot.writeFieldBegin(RESULT_CODE_FIELD_DESC); + oprot.writeI32(struct.resultCode); + oprot.writeFieldEnd(); + } + if (struct.resultMsg != null) { + if (struct.isSetResultMsg()) { + oprot.writeFieldBegin(RESULT_MSG_FIELD_DESC); + oprot.writeString(struct.resultMsg); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ResultTupleSchemeFactory implements SchemeFactory { + public ResultTupleScheme getScheme() { + return new ResultTupleScheme(); + } + } + + private static class ResultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetResultCode()) { + optionals.set(0); + } + if (struct.isSetResultMsg()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetResultCode()) { + oprot.writeI32(struct.resultCode); + } + if (struct.isSetResultMsg()) { + oprot.writeString(struct.resultMsg); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.resultCode = iprot.readI32(); + struct.setResultCodeIsSet(true); + } + if (incoming.get(1)) { + struct.resultMsg = iprot.readString(); + struct.setResultMsgIsSet(true); + } + } + } + +} + diff --git a/src/main/java/com/ljsd/jieling/thrift/idl/itemData.java b/src/main/java/com/ljsd/jieling/thrift/idl/itemData.java new file mode 100644 index 0000000..efde9a0 --- /dev/null +++ b/src/main/java/com/ljsd/jieling/thrift/idl/itemData.java @@ -0,0 +1,607 @@ +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.ljsd.jieling.thrift.idl; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2023-10-9") +public class itemData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("itemData"); + + private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField STORE_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("store_item_id", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("count", org.apache.thrift.protocol.TType.I32, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new itemDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new itemDataTupleSchemeFactory()); + } + + public String item_id; // optional + public String store_item_id; // optional + public int count; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ITEM_ID((short)1, "item_id"), + STORE_ITEM_ID((short)2, "store_item_id"), + COUNT((short)3, "count"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ITEM_ID + return ITEM_ID; + case 2: // STORE_ITEM_ID + return STORE_ITEM_ID; + case 3: // COUNT + return COUNT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __COUNT_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.ITEM_ID,_Fields.STORE_ITEM_ID,_Fields.COUNT}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.STORE_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("store_item_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COUNT, new org.apache.thrift.meta_data.FieldMetaData("count", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(itemData.class, metaDataMap); + } + + public itemData() { + } + + /** + * Performs a deep copy on other. + */ + public itemData(itemData other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetItem_id()) { + this.item_id = other.item_id; + } + if (other.isSetStore_item_id()) { + this.store_item_id = other.store_item_id; + } + this.count = other.count; + } + + public itemData deepCopy() { + return new itemData(this); + } + + @Override + public void clear() { + this.item_id = null; + this.store_item_id = null; + setCountIsSet(false); + this.count = 0; + } + + public String getItem_id() { + return this.item_id; + } + + public itemData setItem_id(String item_id) { + this.item_id = item_id; + return this; + } + + public void unsetItem_id() { + this.item_id = null; + } + + /** Returns true if field item_id is set (has been assigned a value) and false otherwise */ + public boolean isSetItem_id() { + return this.item_id != null; + } + + public void setItem_idIsSet(boolean value) { + if (!value) { + this.item_id = null; + } + } + + public String getStore_item_id() { + return this.store_item_id; + } + + public itemData setStore_item_id(String store_item_id) { + this.store_item_id = store_item_id; + return this; + } + + public void unsetStore_item_id() { + this.store_item_id = null; + } + + /** Returns true if field store_item_id is set (has been assigned a value) and false otherwise */ + public boolean isSetStore_item_id() { + return this.store_item_id != null; + } + + public void setStore_item_idIsSet(boolean value) { + if (!value) { + this.store_item_id = null; + } + } + + public int getCount() { + return this.count; + } + + public itemData setCount(int count) { + this.count = count; + setCountIsSet(true); + return this; + } + + public void unsetCount() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COUNT_ISSET_ID); + } + + /** Returns true if field count is set (has been assigned a value) and false otherwise */ + public boolean isSetCount() { + return EncodingUtils.testBit(__isset_bitfield, __COUNT_ISSET_ID); + } + + public void setCountIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COUNT_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ITEM_ID: + if (value == null) { + unsetItem_id(); + } else { + setItem_id((String)value); + } + break; + + case STORE_ITEM_ID: + if (value == null) { + unsetStore_item_id(); + } else { + setStore_item_id((String)value); + } + break; + + case COUNT: + if (value == null) { + unsetCount(); + } else { + setCount((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ITEM_ID: + return getItem_id(); + + case STORE_ITEM_ID: + return getStore_item_id(); + + case COUNT: + return Integer.valueOf(getCount()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ITEM_ID: + return isSetItem_id(); + case STORE_ITEM_ID: + return isSetStore_item_id(); + case COUNT: + return isSetCount(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof itemData) + return this.equals((itemData)that); + return false; + } + + public boolean equals(itemData that) { + if (that == null) + return false; + + boolean this_present_item_id = true && this.isSetItem_id(); + boolean that_present_item_id = true && that.isSetItem_id(); + if (this_present_item_id || that_present_item_id) { + if (!(this_present_item_id && that_present_item_id)) + return false; + if (!this.item_id.equals(that.item_id)) + return false; + } + + boolean this_present_store_item_id = true && this.isSetStore_item_id(); + boolean that_present_store_item_id = true && that.isSetStore_item_id(); + if (this_present_store_item_id || that_present_store_item_id) { + if (!(this_present_store_item_id && that_present_store_item_id)) + return false; + if (!this.store_item_id.equals(that.store_item_id)) + return false; + } + + boolean this_present_count = true && this.isSetCount(); + boolean that_present_count = true && that.isSetCount(); + if (this_present_count || that_present_count) { + if (!(this_present_count && that_present_count)) + return false; + if (this.count != that.count) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_item_id = true && (isSetItem_id()); + list.add(present_item_id); + if (present_item_id) + list.add(item_id); + + boolean present_store_item_id = true && (isSetStore_item_id()); + list.add(present_store_item_id); + if (present_store_item_id) + list.add(store_item_id); + + boolean present_count = true && (isSetCount()); + list.add(present_count); + if (present_count) + list.add(count); + + return list.hashCode(); + } + + @Override + public int compareTo(itemData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(other.isSetItem_id()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetItem_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, other.item_id); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStore_item_id()).compareTo(other.isSetStore_item_id()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStore_item_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.store_item_id, other.store_item_id); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCount()).compareTo(other.isSetCount()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCount()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.count, other.count); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("itemData("); + boolean first = true; + + if (isSetItem_id()) { + sb.append("item_id:"); + if (this.item_id == null) { + sb.append("null"); + } else { + sb.append(this.item_id); + } + first = false; + } + if (isSetStore_item_id()) { + if (!first) sb.append(", "); + sb.append("store_item_id:"); + if (this.store_item_id == null) { + sb.append("null"); + } else { + sb.append(this.store_item_id); + } + first = false; + } + if (isSetCount()) { + if (!first) sb.append(", "); + sb.append("count:"); + sb.append(this.count); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class itemDataStandardSchemeFactory implements SchemeFactory { + public itemDataStandardScheme getScheme() { + return new itemDataStandardScheme(); + } + } + + private static class itemDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, itemData struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ITEM_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.item_id = iprot.readString(); + struct.setItem_idIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STORE_ITEM_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.store_item_id = iprot.readString(); + struct.setStore_item_idIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COUNT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.count = iprot.readI32(); + struct.setCountIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, itemData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.item_id != null) { + if (struct.isSetItem_id()) { + oprot.writeFieldBegin(ITEM_ID_FIELD_DESC); + oprot.writeString(struct.item_id); + oprot.writeFieldEnd(); + } + } + if (struct.store_item_id != null) { + if (struct.isSetStore_item_id()) { + oprot.writeFieldBegin(STORE_ITEM_ID_FIELD_DESC); + oprot.writeString(struct.store_item_id); + oprot.writeFieldEnd(); + } + } + if (struct.isSetCount()) { + oprot.writeFieldBegin(COUNT_FIELD_DESC); + oprot.writeI32(struct.count); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class itemDataTupleSchemeFactory implements SchemeFactory { + public itemDataTupleScheme getScheme() { + return new itemDataTupleScheme(); + } + } + + private static class itemDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, itemData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetItem_id()) { + optionals.set(0); + } + if (struct.isSetStore_item_id()) { + optionals.set(1); + } + if (struct.isSetCount()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetItem_id()) { + oprot.writeString(struct.item_id); + } + if (struct.isSetStore_item_id()) { + oprot.writeString(struct.store_item_id); + } + if (struct.isSetCount()) { + oprot.writeI32(struct.count); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, itemData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.item_id = iprot.readString(); + struct.setItem_idIsSet(true); + } + if (incoming.get(1)) { + struct.store_item_id = iprot.readString(); + struct.setStore_item_idIsSet(true); + } + if (incoming.get(2)) { + struct.count = iprot.readI32(); + struct.setCountIsSet(true); + } + } + } + +} + diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties new file mode 100644 index 0000000..2a0d521 --- /dev/null +++ b/src/main/resources/application.properties @@ -0,0 +1,26 @@ +#server.port=9076 +#百度线上 +server.port=8081 +server.plat = android +server.isLAN = 2 +#server.coredb=m5_core +#百度线上 +server.coredb=m5_x1_login +##contextPath +server.context-path=/idip/sfzb +#mongo +#spring.data.mongodb.uri = mongodb://admin:123456@120.92.119.145:27020/m5_core?authSource=admin +#spring.data.oldMongodb.uri = mongodb://admin:123456@120.92.119.145:27020/m5_core?authSource=admin +#spring.data.mongodb.uri = mongodb://admin:123456@10.0.0.24:27020/m5_core?authSource=admin +#spring.data.oldMongodb.uri = mongodb://admin:123456@10.0.0.24:27020/m5_core?authSource=admin +#百度线上 +spring.data.mongodb.uri = mongodb://root:kaifa&9517@154.8.193.157:27017/m5_x1_login?authSource=admin +spring.data.oldMongodb.uri = mongodb://root:kaifa&9517@154.8.193.157:27017/m5_x1_login?authSource=admin + +# redis config +#spring.redis.host = 120.92.119.145 +spring.redis.host = 154.8.193.157 +##spring.redis.host = 10.0.0.24 +spring.redis.port = 6379 +spring.redis.password = jieling666 +spring.redis.expireTime = -1 \ No newline at end of file diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml new file mode 100644 index 0000000..ea52f09 --- /dev/null +++ b/src/main/resources/logback.xml @@ -0,0 +1,102 @@ + + YSJLogging + + + + + + + + + + + [%level] - %d{yyyy-MM-dd HH:mm:ss.SSS} - [%thread] - %logger{0}#%line - ${tip}:%msg%n + + + INFO + ACCEPT + ACCEPT + + + + + + + + [%level] - %d{yyyy-MM-dd HH:mm:ss.SSS} - [%thread] - %logger{0}#%line - ${tip}:%msg%n + + + + + + ${log_dir}/%d{yyyy-MM-dd}/idipLog%i.log + + ${maxHistory} + 200MB + + + + + + + + + + + + ERROR + ACCEPT + DENY + + + + + ${log_dir}/%d{yyyy-MM-dd}/error-log.log + + ${maxHistory} + + + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{0} - %msg%n + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/thrift/idl/buildIdl.bat b/src/main/thrift/idl/buildIdl.bat new file mode 100644 index 0000000..8be406a --- /dev/null +++ b/src/main/thrift/idl/buildIdl.bat @@ -0,0 +1,13 @@ +echo off +echo "======first del java src files======" +del E:\server\idip\src\main\thrift\idl\gen-java\com\ljsd\jieling\thrift\idl\*.java +del E:\server\idip\src\main\java\com\ljsd\jieling\thrift\idl\*.java + +echo "======gen java src files======" +for %%i in (".\*.thrift") do thrift-0.9.2 --gen java %%i + + +echo "=======begin to copy src files======" +copy .\gen-java\com\ljsd\jieling\thrift\idl\*.java E:\server\idip\src\main\java\com\ljsd\jieling\thrift\idl\ /y +echo on +pause \ No newline at end of file diff --git a/src/main/thrift/idl/buildIdl.zip b/src/main/thrift/idl/buildIdl.zip new file mode 100644 index 0000000..acf26b2 Binary files /dev/null and b/src/main/thrift/idl/buildIdl.zip differ diff --git a/src/main/thrift/idl/buildIdl/buildIdl.bat b/src/main/thrift/idl/buildIdl/buildIdl.bat new file mode 100644 index 0000000..2203ced --- /dev/null +++ b/src/main/thrift/idl/buildIdl/buildIdl.bat @@ -0,0 +1,11 @@ +echo off +echo "======first del java src files======" +del D:\jmfy_msy\gameserver\core\src\main\thrift\idl\gen-java\com\jmfy\xianxia\thrift\idl\*.java +del D:\jmfy_msy\gameserver\core\src\main\java\com\jmfy\xianxia\thrift\idl\*.java + +echo "======gen java src files======" +for %%i in (".\*.thrift") do thrift-0.9.2 --gen java %%i +echo "=======begin to copy src files======" +copy .\gen-java\com\jmfy\xianxia\thrift\idl\*.java D:\jmfy_msy\gameserver\core\src\main\java\com\jmfy\xianxia\thrift\idl\ /y +echo on +pause \ No newline at end of file diff --git a/src/main/thrift/idl/core.thrift b/src/main/thrift/idl/core.thrift new file mode 100644 index 0000000..8900b47 --- /dev/null +++ b/src/main/thrift/idl/core.thrift @@ -0,0 +1,46 @@ +namespace java com.ljsd.jieling.thrift.idl + +/** + * Structs can also be exceptions, if they are nasty. + */ +exception InvalidOperException { + 1: i32 errorCode;//0:error;1:success + 2: string errorMessage; +} + +struct Result { + 1:optional i32 resultCode; + 2:optional string resultMsg; +} + +struct RechargeResult { + 1:optional i32 resultCode; + 2:optional string resultMsg; + 3:optional set subNodeSet; +} + +struct itemData { + 1:optional string item_id; + 2:optional string store_item_id; + 3:optional i32 count; +} + +struct ItemConfig{ + 1:optional string propCode; + 2:optional string propName; + 3:optional string propDesc; + 4:optional string propIcon; +} + +service RPCRequestIFace{ + Result deliveryRecharge(1:i32 uid, 2:string goodsId,3: string openId,4: string orderId,5: i64 orderTime, 6:i32 amount, 7:string platform) throws (1:InvalidOperException ouch); + Result deliveryRecharge2(1:i32 uid, 2:string goodsId, 3:string currency, 4:double amount); + RechargeResult getRecharge(1:i32 uid); + void mathcRoomAdressInfo(1:i32 uid,2:i32 type,3:string address); + Result sendMailToRole(1:string uids, 2:string title,3:string content, 4:string reward); + Result deliveryCoupon(1:i32 gameUserId,2:string couponCode,3:string title, 4:string content,5:i64 orderTime,6: list itemId); + Result deliveryOrder(1:i32 uid, 2:string goodsId,3: i64 orderTime, 4: string orderId, 5:i32 devalueId); + Result operateUser(1:i32 uid, 2:i32 opStatus); + list getItemConfigs(1:list itemIds); + Result giftCode(1:i32 uid, 2:string giftCode); +} diff --git a/src/main/thrift/idl/gen-java/com/ljsd/jieling/thrift/idl/InvalidOperException.java b/src/main/thrift/idl/gen-java/com/ljsd/jieling/thrift/idl/InvalidOperException.java new file mode 100644 index 0000000..e631d1a --- /dev/null +++ b/src/main/thrift/idl/gen-java/com/ljsd/jieling/thrift/idl/InvalidOperException.java @@ -0,0 +1,504 @@ +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.ljsd.jieling.thrift.idl; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +/** + * Structs can also be exceptions, if they are nasty. + */ +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2023-7-10") +public class InvalidOperException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidOperException"); + + private static final org.apache.thrift.protocol.TField ERROR_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("errorCode", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField ERROR_MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("errorMessage", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new InvalidOperExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new InvalidOperExceptionTupleSchemeFactory()); + } + + public int errorCode; // required + public String errorMessage; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ERROR_CODE((short)1, "errorCode"), + ERROR_MESSAGE((short)2, "errorMessage"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ERROR_CODE + return ERROR_CODE; + case 2: // ERROR_MESSAGE + return ERROR_MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ERRORCODE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ERROR_CODE, new org.apache.thrift.meta_data.FieldMetaData("errorCode", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.ERROR_MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("errorMessage", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidOperException.class, metaDataMap); + } + + public InvalidOperException() { + } + + public InvalidOperException( + int errorCode, + String errorMessage) + { + this(); + this.errorCode = errorCode; + setErrorCodeIsSet(true); + this.errorMessage = errorMessage; + } + + /** + * Performs a deep copy on other. + */ + public InvalidOperException(InvalidOperException other) { + __isset_bitfield = other.__isset_bitfield; + this.errorCode = other.errorCode; + if (other.isSetErrorMessage()) { + this.errorMessage = other.errorMessage; + } + } + + public InvalidOperException deepCopy() { + return new InvalidOperException(this); + } + + @Override + public void clear() { + setErrorCodeIsSet(false); + this.errorCode = 0; + this.errorMessage = null; + } + + public int getErrorCode() { + return this.errorCode; + } + + public InvalidOperException setErrorCode(int errorCode) { + this.errorCode = errorCode; + setErrorCodeIsSet(true); + return this; + } + + public void unsetErrorCode() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ERRORCODE_ISSET_ID); + } + + /** Returns true if field errorCode is set (has been assigned a value) and false otherwise */ + public boolean isSetErrorCode() { + return EncodingUtils.testBit(__isset_bitfield, __ERRORCODE_ISSET_ID); + } + + public void setErrorCodeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ERRORCODE_ISSET_ID, value); + } + + public String getErrorMessage() { + return this.errorMessage; + } + + public InvalidOperException setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + public void unsetErrorMessage() { + this.errorMessage = null; + } + + /** Returns true if field errorMessage is set (has been assigned a value) and false otherwise */ + public boolean isSetErrorMessage() { + return this.errorMessage != null; + } + + public void setErrorMessageIsSet(boolean value) { + if (!value) { + this.errorMessage = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ERROR_CODE: + if (value == null) { + unsetErrorCode(); + } else { + setErrorCode((Integer)value); + } + break; + + case ERROR_MESSAGE: + if (value == null) { + unsetErrorMessage(); + } else { + setErrorMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ERROR_CODE: + return Integer.valueOf(getErrorCode()); + + case ERROR_MESSAGE: + return getErrorMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ERROR_CODE: + return isSetErrorCode(); + case ERROR_MESSAGE: + return isSetErrorMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof InvalidOperException) + return this.equals((InvalidOperException)that); + return false; + } + + public boolean equals(InvalidOperException that) { + if (that == null) + return false; + + boolean this_present_errorCode = true; + boolean that_present_errorCode = true; + if (this_present_errorCode || that_present_errorCode) { + if (!(this_present_errorCode && that_present_errorCode)) + return false; + if (this.errorCode != that.errorCode) + return false; + } + + boolean this_present_errorMessage = true && this.isSetErrorMessage(); + boolean that_present_errorMessage = true && that.isSetErrorMessage(); + if (this_present_errorMessage || that_present_errorMessage) { + if (!(this_present_errorMessage && that_present_errorMessage)) + return false; + if (!this.errorMessage.equals(that.errorMessage)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_errorCode = true; + list.add(present_errorCode); + if (present_errorCode) + list.add(errorCode); + + boolean present_errorMessage = true && (isSetErrorMessage()); + list.add(present_errorMessage); + if (present_errorMessage) + list.add(errorMessage); + + return list.hashCode(); + } + + @Override + public int compareTo(InvalidOperException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(other.isSetErrorCode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetErrorCode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCode, other.errorCode); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetErrorMessage()).compareTo(other.isSetErrorMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetErrorMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorMessage, other.errorMessage); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("InvalidOperException("); + boolean first = true; + + sb.append("errorCode:"); + sb.append(this.errorCode); + first = false; + if (!first) sb.append(", "); + sb.append("errorMessage:"); + if (this.errorMessage == null) { + sb.append("null"); + } else { + sb.append(this.errorMessage); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class InvalidOperExceptionStandardSchemeFactory implements SchemeFactory { + public InvalidOperExceptionStandardScheme getScheme() { + return new InvalidOperExceptionStandardScheme(); + } + } + + private static class InvalidOperExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidOperException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ERROR_CODE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.errorCode = iprot.readI32(); + struct.setErrorCodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ERROR_MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.errorMessage = iprot.readString(); + struct.setErrorMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, InvalidOperException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC); + oprot.writeI32(struct.errorCode); + oprot.writeFieldEnd(); + if (struct.errorMessage != null) { + oprot.writeFieldBegin(ERROR_MESSAGE_FIELD_DESC); + oprot.writeString(struct.errorMessage); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class InvalidOperExceptionTupleSchemeFactory implements SchemeFactory { + public InvalidOperExceptionTupleScheme getScheme() { + return new InvalidOperExceptionTupleScheme(); + } + } + + private static class InvalidOperExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, InvalidOperException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetErrorCode()) { + optionals.set(0); + } + if (struct.isSetErrorMessage()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetErrorCode()) { + oprot.writeI32(struct.errorCode); + } + if (struct.isSetErrorMessage()) { + oprot.writeString(struct.errorMessage); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, InvalidOperException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.errorCode = iprot.readI32(); + struct.setErrorCodeIsSet(true); + } + if (incoming.get(1)) { + struct.errorMessage = iprot.readString(); + struct.setErrorMessageIsSet(true); + } + } + } + +} + diff --git a/src/main/thrift/idl/gen-java/com/ljsd/jieling/thrift/idl/ItemConfig.java b/src/main/thrift/idl/gen-java/com/ljsd/jieling/thrift/idl/ItemConfig.java new file mode 100644 index 0000000..a704544 --- /dev/null +++ b/src/main/thrift/idl/gen-java/com/ljsd/jieling/thrift/idl/ItemConfig.java @@ -0,0 +1,717 @@ +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.ljsd.jieling.thrift.idl; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2023-10-9") +public class ItemConfig implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ItemConfig"); + + private static final org.apache.thrift.protocol.TField PROP_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("propCode", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField PROP_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("propName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PROP_DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("propDesc", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField PROP_ICON_FIELD_DESC = new org.apache.thrift.protocol.TField("propIcon", org.apache.thrift.protocol.TType.STRING, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ItemConfigStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ItemConfigTupleSchemeFactory()); + } + + public String propCode; // optional + public String propName; // optional + public String propDesc; // optional + public String propIcon; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PROP_CODE((short)1, "propCode"), + PROP_NAME((short)2, "propName"), + PROP_DESC((short)3, "propDesc"), + PROP_ICON((short)4, "propIcon"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PROP_CODE + return PROP_CODE; + case 2: // PROP_NAME + return PROP_NAME; + case 3: // PROP_DESC + return PROP_DESC; + case 4: // PROP_ICON + return PROP_ICON; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.PROP_CODE,_Fields.PROP_NAME,_Fields.PROP_DESC,_Fields.PROP_ICON}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.PROP_CODE, new org.apache.thrift.meta_data.FieldMetaData("propCode", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PROP_NAME, new org.apache.thrift.meta_data.FieldMetaData("propName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PROP_DESC, new org.apache.thrift.meta_data.FieldMetaData("propDesc", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PROP_ICON, new org.apache.thrift.meta_data.FieldMetaData("propIcon", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ItemConfig.class, metaDataMap); + } + + public ItemConfig() { + } + + /** + * Performs a deep copy on other. + */ + public ItemConfig(ItemConfig other) { + if (other.isSetPropCode()) { + this.propCode = other.propCode; + } + if (other.isSetPropName()) { + this.propName = other.propName; + } + if (other.isSetPropDesc()) { + this.propDesc = other.propDesc; + } + if (other.isSetPropIcon()) { + this.propIcon = other.propIcon; + } + } + + public ItemConfig deepCopy() { + return new ItemConfig(this); + } + + @Override + public void clear() { + this.propCode = null; + this.propName = null; + this.propDesc = null; + this.propIcon = null; + } + + public String getPropCode() { + return this.propCode; + } + + public ItemConfig setPropCode(String propCode) { + this.propCode = propCode; + return this; + } + + public void unsetPropCode() { + this.propCode = null; + } + + /** Returns true if field propCode is set (has been assigned a value) and false otherwise */ + public boolean isSetPropCode() { + return this.propCode != null; + } + + public void setPropCodeIsSet(boolean value) { + if (!value) { + this.propCode = null; + } + } + + public String getPropName() { + return this.propName; + } + + public ItemConfig setPropName(String propName) { + this.propName = propName; + return this; + } + + public void unsetPropName() { + this.propName = null; + } + + /** Returns true if field propName is set (has been assigned a value) and false otherwise */ + public boolean isSetPropName() { + return this.propName != null; + } + + public void setPropNameIsSet(boolean value) { + if (!value) { + this.propName = null; + } + } + + public String getPropDesc() { + return this.propDesc; + } + + public ItemConfig setPropDesc(String propDesc) { + this.propDesc = propDesc; + return this; + } + + public void unsetPropDesc() { + this.propDesc = null; + } + + /** Returns true if field propDesc is set (has been assigned a value) and false otherwise */ + public boolean isSetPropDesc() { + return this.propDesc != null; + } + + public void setPropDescIsSet(boolean value) { + if (!value) { + this.propDesc = null; + } + } + + public String getPropIcon() { + return this.propIcon; + } + + public ItemConfig setPropIcon(String propIcon) { + this.propIcon = propIcon; + return this; + } + + public void unsetPropIcon() { + this.propIcon = null; + } + + /** Returns true if field propIcon is set (has been assigned a value) and false otherwise */ + public boolean isSetPropIcon() { + return this.propIcon != null; + } + + public void setPropIconIsSet(boolean value) { + if (!value) { + this.propIcon = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PROP_CODE: + if (value == null) { + unsetPropCode(); + } else { + setPropCode((String)value); + } + break; + + case PROP_NAME: + if (value == null) { + unsetPropName(); + } else { + setPropName((String)value); + } + break; + + case PROP_DESC: + if (value == null) { + unsetPropDesc(); + } else { + setPropDesc((String)value); + } + break; + + case PROP_ICON: + if (value == null) { + unsetPropIcon(); + } else { + setPropIcon((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PROP_CODE: + return getPropCode(); + + case PROP_NAME: + return getPropName(); + + case PROP_DESC: + return getPropDesc(); + + case PROP_ICON: + return getPropIcon(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PROP_CODE: + return isSetPropCode(); + case PROP_NAME: + return isSetPropName(); + case PROP_DESC: + return isSetPropDesc(); + case PROP_ICON: + return isSetPropIcon(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ItemConfig) + return this.equals((ItemConfig)that); + return false; + } + + public boolean equals(ItemConfig that) { + if (that == null) + return false; + + boolean this_present_propCode = true && this.isSetPropCode(); + boolean that_present_propCode = true && that.isSetPropCode(); + if (this_present_propCode || that_present_propCode) { + if (!(this_present_propCode && that_present_propCode)) + return false; + if (!this.propCode.equals(that.propCode)) + return false; + } + + boolean this_present_propName = true && this.isSetPropName(); + boolean that_present_propName = true && that.isSetPropName(); + if (this_present_propName || that_present_propName) { + if (!(this_present_propName && that_present_propName)) + return false; + if (!this.propName.equals(that.propName)) + return false; + } + + boolean this_present_propDesc = true && this.isSetPropDesc(); + boolean that_present_propDesc = true && that.isSetPropDesc(); + if (this_present_propDesc || that_present_propDesc) { + if (!(this_present_propDesc && that_present_propDesc)) + return false; + if (!this.propDesc.equals(that.propDesc)) + return false; + } + + boolean this_present_propIcon = true && this.isSetPropIcon(); + boolean that_present_propIcon = true && that.isSetPropIcon(); + if (this_present_propIcon || that_present_propIcon) { + if (!(this_present_propIcon && that_present_propIcon)) + return false; + if (!this.propIcon.equals(that.propIcon)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_propCode = true && (isSetPropCode()); + list.add(present_propCode); + if (present_propCode) + list.add(propCode); + + boolean present_propName = true && (isSetPropName()); + list.add(present_propName); + if (present_propName) + list.add(propName); + + boolean present_propDesc = true && (isSetPropDesc()); + list.add(present_propDesc); + if (present_propDesc) + list.add(propDesc); + + boolean present_propIcon = true && (isSetPropIcon()); + list.add(present_propIcon); + if (present_propIcon) + list.add(propIcon); + + return list.hashCode(); + } + + @Override + public int compareTo(ItemConfig other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPropCode()).compareTo(other.isSetPropCode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPropCode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.propCode, other.propCode); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPropName()).compareTo(other.isSetPropName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPropName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.propName, other.propName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPropDesc()).compareTo(other.isSetPropDesc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPropDesc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.propDesc, other.propDesc); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPropIcon()).compareTo(other.isSetPropIcon()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPropIcon()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.propIcon, other.propIcon); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ItemConfig("); + boolean first = true; + + if (isSetPropCode()) { + sb.append("propCode:"); + if (this.propCode == null) { + sb.append("null"); + } else { + sb.append(this.propCode); + } + first = false; + } + if (isSetPropName()) { + if (!first) sb.append(", "); + sb.append("propName:"); + if (this.propName == null) { + sb.append("null"); + } else { + sb.append(this.propName); + } + first = false; + } + if (isSetPropDesc()) { + if (!first) sb.append(", "); + sb.append("propDesc:"); + if (this.propDesc == null) { + sb.append("null"); + } else { + sb.append(this.propDesc); + } + first = false; + } + if (isSetPropIcon()) { + if (!first) sb.append(", "); + sb.append("propIcon:"); + if (this.propIcon == null) { + sb.append("null"); + } else { + sb.append(this.propIcon); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class ItemConfigStandardSchemeFactory implements SchemeFactory { + public ItemConfigStandardScheme getScheme() { + return new ItemConfigStandardScheme(); + } + } + + private static class ItemConfigStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ItemConfig struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PROP_CODE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.propCode = iprot.readString(); + struct.setPropCodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PROP_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.propName = iprot.readString(); + struct.setPropNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PROP_DESC + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.propDesc = iprot.readString(); + struct.setPropDescIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // PROP_ICON + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.propIcon = iprot.readString(); + struct.setPropIconIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ItemConfig struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.propCode != null) { + if (struct.isSetPropCode()) { + oprot.writeFieldBegin(PROP_CODE_FIELD_DESC); + oprot.writeString(struct.propCode); + oprot.writeFieldEnd(); + } + } + if (struct.propName != null) { + if (struct.isSetPropName()) { + oprot.writeFieldBegin(PROP_NAME_FIELD_DESC); + oprot.writeString(struct.propName); + oprot.writeFieldEnd(); + } + } + if (struct.propDesc != null) { + if (struct.isSetPropDesc()) { + oprot.writeFieldBegin(PROP_DESC_FIELD_DESC); + oprot.writeString(struct.propDesc); + oprot.writeFieldEnd(); + } + } + if (struct.propIcon != null) { + if (struct.isSetPropIcon()) { + oprot.writeFieldBegin(PROP_ICON_FIELD_DESC); + oprot.writeString(struct.propIcon); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ItemConfigTupleSchemeFactory implements SchemeFactory { + public ItemConfigTupleScheme getScheme() { + return new ItemConfigTupleScheme(); + } + } + + private static class ItemConfigTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ItemConfig struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPropCode()) { + optionals.set(0); + } + if (struct.isSetPropName()) { + optionals.set(1); + } + if (struct.isSetPropDesc()) { + optionals.set(2); + } + if (struct.isSetPropIcon()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetPropCode()) { + oprot.writeString(struct.propCode); + } + if (struct.isSetPropName()) { + oprot.writeString(struct.propName); + } + if (struct.isSetPropDesc()) { + oprot.writeString(struct.propDesc); + } + if (struct.isSetPropIcon()) { + oprot.writeString(struct.propIcon); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ItemConfig struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.propCode = iprot.readString(); + struct.setPropCodeIsSet(true); + } + if (incoming.get(1)) { + struct.propName = iprot.readString(); + struct.setPropNameIsSet(true); + } + if (incoming.get(2)) { + struct.propDesc = iprot.readString(); + struct.setPropDescIsSet(true); + } + if (incoming.get(3)) { + struct.propIcon = iprot.readString(); + struct.setPropIconIsSet(true); + } + } + } + +} + diff --git a/src/main/thrift/idl/gen-java/com/ljsd/jieling/thrift/idl/RPCRequestIFace.java b/src/main/thrift/idl/gen-java/com/ljsd/jieling/thrift/idl/RPCRequestIFace.java new file mode 100644 index 0000000..6fddb0d --- /dev/null +++ b/src/main/thrift/idl/gen-java/com/ljsd/jieling/thrift/idl/RPCRequestIFace.java @@ -0,0 +1,11521 @@ +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.ljsd.jieling.thrift.idl; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2023-11-14") +public class RPCRequestIFace { + + public interface Iface { + + public Result deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount, String platform) throws InvalidOperException, org.apache.thrift.TException; + + public Result deliveryRecharge2(int uid, String goodsId, String currency, double amount) throws org.apache.thrift.TException; + + public RechargeResult getRecharge(int uid) throws org.apache.thrift.TException; + + public void mathcRoomAdressInfo(int uid, int type, String address) throws org.apache.thrift.TException; + + public Result sendMailToRole(String uids, String title, String content, String reward) throws org.apache.thrift.TException; + + public Result deliveryCoupon(int gameUserId, String couponCode, String title, String content, long orderTime, List itemId) throws org.apache.thrift.TException; + + public Result deliveryOrder(int uid, String goodsId, long orderTime, String orderId, int devalueId) throws org.apache.thrift.TException; + + public Result operateUser(int uid, int opStatus) throws org.apache.thrift.TException; + + public List getItemConfigs(List itemIds) throws org.apache.thrift.TException; + + public Result giftCode(int uid, String giftCode) throws org.apache.thrift.TException; + + } + + public interface AsyncIface { + + public void deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount, String platform, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deliveryRecharge2(int uid, String goodsId, String currency, double amount, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getRecharge(int uid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void mathcRoomAdressInfo(int uid, int type, String address, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void sendMailToRole(String uids, String title, String content, String reward, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deliveryCoupon(int gameUserId, String couponCode, String title, String content, long orderTime, List itemId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deliveryOrder(int uid, String goodsId, long orderTime, String orderId, int devalueId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void operateUser(int uid, int opStatus, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getItemConfigs(List itemIds, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void giftCode(int uid, String giftCode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + } + + public static class Client extends org.apache.thrift.TServiceClient implements Iface { + public static class Factory implements org.apache.thrift.TServiceClientFactory { + public Factory() {} + public Client getClient(org.apache.thrift.protocol.TProtocol prot) { + return new Client(prot); + } + public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { + return new Client(iprot, oprot); + } + } + + public Client(org.apache.thrift.protocol.TProtocol prot) + { + super(prot, prot); + } + + public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { + super(iprot, oprot); + } + + public Result deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount, String platform) throws InvalidOperException, org.apache.thrift.TException + { + send_deliveryRecharge(uid, goodsId, openId, orderId, orderTime, amount, platform); + return recv_deliveryRecharge(); + } + + public void send_deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount, String platform) throws org.apache.thrift.TException + { + deliveryRecharge_args args = new deliveryRecharge_args(); + args.setUid(uid); + args.setGoodsId(goodsId); + args.setOpenId(openId); + args.setOrderId(orderId); + args.setOrderTime(orderTime); + args.setAmount(amount); + args.setPlatform(platform); + sendBase("deliveryRecharge", args); + } + + public Result recv_deliveryRecharge() throws InvalidOperException, org.apache.thrift.TException + { + deliveryRecharge_result result = new deliveryRecharge_result(); + receiveBase(result, "deliveryRecharge"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.ouch != null) { + throw result.ouch; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deliveryRecharge failed: unknown result"); + } + + public Result deliveryRecharge2(int uid, String goodsId, String currency, double amount) throws org.apache.thrift.TException + { + send_deliveryRecharge2(uid, goodsId, currency, amount); + return recv_deliveryRecharge2(); + } + + public void send_deliveryRecharge2(int uid, String goodsId, String currency, double amount) throws org.apache.thrift.TException + { + deliveryRecharge2_args args = new deliveryRecharge2_args(); + args.setUid(uid); + args.setGoodsId(goodsId); + args.setCurrency(currency); + args.setAmount(amount); + sendBase("deliveryRecharge2", args); + } + + public Result recv_deliveryRecharge2() throws org.apache.thrift.TException + { + deliveryRecharge2_result result = new deliveryRecharge2_result(); + receiveBase(result, "deliveryRecharge2"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deliveryRecharge2 failed: unknown result"); + } + + public RechargeResult getRecharge(int uid) throws org.apache.thrift.TException + { + send_getRecharge(uid); + return recv_getRecharge(); + } + + public void send_getRecharge(int uid) throws org.apache.thrift.TException + { + getRecharge_args args = new getRecharge_args(); + args.setUid(uid); + sendBase("getRecharge", args); + } + + public RechargeResult recv_getRecharge() throws org.apache.thrift.TException + { + getRecharge_result result = new getRecharge_result(); + receiveBase(result, "getRecharge"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRecharge failed: unknown result"); + } + + public void mathcRoomAdressInfo(int uid, int type, String address) throws org.apache.thrift.TException + { + send_mathcRoomAdressInfo(uid, type, address); + recv_mathcRoomAdressInfo(); + } + + public void send_mathcRoomAdressInfo(int uid, int type, String address) throws org.apache.thrift.TException + { + mathcRoomAdressInfo_args args = new mathcRoomAdressInfo_args(); + args.setUid(uid); + args.setType(type); + args.setAddress(address); + sendBase("mathcRoomAdressInfo", args); + } + + public void recv_mathcRoomAdressInfo() throws org.apache.thrift.TException + { + mathcRoomAdressInfo_result result = new mathcRoomAdressInfo_result(); + receiveBase(result, "mathcRoomAdressInfo"); + return; + } + + public Result sendMailToRole(String uids, String title, String content, String reward) throws org.apache.thrift.TException + { + send_sendMailToRole(uids, title, content, reward); + return recv_sendMailToRole(); + } + + public void send_sendMailToRole(String uids, String title, String content, String reward) throws org.apache.thrift.TException + { + sendMailToRole_args args = new sendMailToRole_args(); + args.setUids(uids); + args.setTitle(title); + args.setContent(content); + args.setReward(reward); + sendBase("sendMailToRole", args); + } + + public Result recv_sendMailToRole() throws org.apache.thrift.TException + { + sendMailToRole_result result = new sendMailToRole_result(); + receiveBase(result, "sendMailToRole"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "sendMailToRole failed: unknown result"); + } + + public Result deliveryCoupon(int gameUserId, String couponCode, String title, String content, long orderTime, List itemId) throws org.apache.thrift.TException + { + send_deliveryCoupon(gameUserId, couponCode, title, content, orderTime, itemId); + return recv_deliveryCoupon(); + } + + public void send_deliveryCoupon(int gameUserId, String couponCode, String title, String content, long orderTime, List itemId) throws org.apache.thrift.TException + { + deliveryCoupon_args args = new deliveryCoupon_args(); + args.setGameUserId(gameUserId); + args.setCouponCode(couponCode); + args.setTitle(title); + args.setContent(content); + args.setOrderTime(orderTime); + args.setItemId(itemId); + sendBase("deliveryCoupon", args); + } + + public Result recv_deliveryCoupon() throws org.apache.thrift.TException + { + deliveryCoupon_result result = new deliveryCoupon_result(); + receiveBase(result, "deliveryCoupon"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deliveryCoupon failed: unknown result"); + } + + public Result deliveryOrder(int uid, String goodsId, long orderTime, String orderId, int devalueId) throws org.apache.thrift.TException + { + send_deliveryOrder(uid, goodsId, orderTime, orderId, devalueId); + return recv_deliveryOrder(); + } + + public void send_deliveryOrder(int uid, String goodsId, long orderTime, String orderId, int devalueId) throws org.apache.thrift.TException + { + deliveryOrder_args args = new deliveryOrder_args(); + args.setUid(uid); + args.setGoodsId(goodsId); + args.setOrderTime(orderTime); + args.setOrderId(orderId); + args.setDevalueId(devalueId); + sendBase("deliveryOrder", args); + } + + public Result recv_deliveryOrder() throws org.apache.thrift.TException + { + deliveryOrder_result result = new deliveryOrder_result(); + receiveBase(result, "deliveryOrder"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deliveryOrder failed: unknown result"); + } + + public Result operateUser(int uid, int opStatus) throws org.apache.thrift.TException + { + send_operateUser(uid, opStatus); + return recv_operateUser(); + } + + public void send_operateUser(int uid, int opStatus) throws org.apache.thrift.TException + { + operateUser_args args = new operateUser_args(); + args.setUid(uid); + args.setOpStatus(opStatus); + sendBase("operateUser", args); + } + + public Result recv_operateUser() throws org.apache.thrift.TException + { + operateUser_result result = new operateUser_result(); + receiveBase(result, "operateUser"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "operateUser failed: unknown result"); + } + + public List getItemConfigs(List itemIds) throws org.apache.thrift.TException + { + send_getItemConfigs(itemIds); + return recv_getItemConfigs(); + } + + public void send_getItemConfigs(List itemIds) throws org.apache.thrift.TException + { + getItemConfigs_args args = new getItemConfigs_args(); + args.setItemIds(itemIds); + sendBase("getItemConfigs", args); + } + + public List recv_getItemConfigs() throws org.apache.thrift.TException + { + getItemConfigs_result result = new getItemConfigs_result(); + receiveBase(result, "getItemConfigs"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemConfigs failed: unknown result"); + } + + public Result giftCode(int uid, String giftCode) throws org.apache.thrift.TException + { + send_giftCode(uid, giftCode); + return recv_giftCode(); + } + + public void send_giftCode(int uid, String giftCode) throws org.apache.thrift.TException + { + giftCode_args args = new giftCode_args(); + args.setUid(uid); + args.setGiftCode(giftCode); + sendBase("giftCode", args); + } + + public Result recv_giftCode() throws org.apache.thrift.TException + { + giftCode_result result = new giftCode_result(); + receiveBase(result, "giftCode"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "giftCode failed: unknown result"); + } + + } + public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { + public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { + private org.apache.thrift.async.TAsyncClientManager clientManager; + private org.apache.thrift.protocol.TProtocolFactory protocolFactory; + public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { + this.clientManager = clientManager; + this.protocolFactory = protocolFactory; + } + public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { + return new AsyncClient(protocolFactory, clientManager, transport); + } + } + + public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { + super(protocolFactory, clientManager, transport); + } + + public void deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount, String platform, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deliveryRecharge_call method_call = new deliveryRecharge_call(uid, goodsId, openId, orderId, orderTime, amount, platform, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deliveryRecharge_call extends org.apache.thrift.async.TAsyncMethodCall { + private int uid; + private String goodsId; + private String openId; + private String orderId; + private long orderTime; + private int amount; + private String platform; + public deliveryRecharge_call(int uid, String goodsId, String openId, String orderId, long orderTime, int amount, String platform, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.uid = uid; + this.goodsId = goodsId; + this.openId = openId; + this.orderId = orderId; + this.orderTime = orderTime; + this.amount = amount; + this.platform = platform; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deliveryRecharge", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deliveryRecharge_args args = new deliveryRecharge_args(); + args.setUid(uid); + args.setGoodsId(goodsId); + args.setOpenId(openId); + args.setOrderId(orderId); + args.setOrderTime(orderTime); + args.setAmount(amount); + args.setPlatform(platform); + args.write(prot); + prot.writeMessageEnd(); + } + + public Result getResult() throws InvalidOperException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_deliveryRecharge(); + } + } + + public void deliveryRecharge2(int uid, String goodsId, String currency, double amount, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deliveryRecharge2_call method_call = new deliveryRecharge2_call(uid, goodsId, currency, amount, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deliveryRecharge2_call extends org.apache.thrift.async.TAsyncMethodCall { + private int uid; + private String goodsId; + private String currency; + private double amount; + public deliveryRecharge2_call(int uid, String goodsId, String currency, double amount, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.uid = uid; + this.goodsId = goodsId; + this.currency = currency; + this.amount = amount; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deliveryRecharge2", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deliveryRecharge2_args args = new deliveryRecharge2_args(); + args.setUid(uid); + args.setGoodsId(goodsId); + args.setCurrency(currency); + args.setAmount(amount); + args.write(prot); + prot.writeMessageEnd(); + } + + public Result getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_deliveryRecharge2(); + } + } + + public void getRecharge(int uid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getRecharge_call method_call = new getRecharge_call(uid, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getRecharge_call extends org.apache.thrift.async.TAsyncMethodCall { + private int uid; + public getRecharge_call(int uid, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.uid = uid; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRecharge", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getRecharge_args args = new getRecharge_args(); + args.setUid(uid); + args.write(prot); + prot.writeMessageEnd(); + } + + public RechargeResult getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getRecharge(); + } + } + + public void mathcRoomAdressInfo(int uid, int type, String address, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + mathcRoomAdressInfo_call method_call = new mathcRoomAdressInfo_call(uid, type, address, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class mathcRoomAdressInfo_call extends org.apache.thrift.async.TAsyncMethodCall { + private int uid; + private int type; + private String address; + public mathcRoomAdressInfo_call(int uid, int type, String address, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.uid = uid; + this.type = type; + this.address = address; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mathcRoomAdressInfo", org.apache.thrift.protocol.TMessageType.CALL, 0)); + mathcRoomAdressInfo_args args = new mathcRoomAdressInfo_args(); + args.setUid(uid); + args.setType(type); + args.setAddress(address); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_mathcRoomAdressInfo(); + } + } + + public void sendMailToRole(String uids, String title, String content, String reward, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + sendMailToRole_call method_call = new sendMailToRole_call(uids, title, content, reward, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class sendMailToRole_call extends org.apache.thrift.async.TAsyncMethodCall { + private String uids; + private String title; + private String content; + private String reward; + public sendMailToRole_call(String uids, String title, String content, String reward, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.uids = uids; + this.title = title; + this.content = content; + this.reward = reward; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sendMailToRole", org.apache.thrift.protocol.TMessageType.CALL, 0)); + sendMailToRole_args args = new sendMailToRole_args(); + args.setUids(uids); + args.setTitle(title); + args.setContent(content); + args.setReward(reward); + args.write(prot); + prot.writeMessageEnd(); + } + + public Result getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_sendMailToRole(); + } + } + + public void deliveryCoupon(int gameUserId, String couponCode, String title, String content, long orderTime, List itemId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deliveryCoupon_call method_call = new deliveryCoupon_call(gameUserId, couponCode, title, content, orderTime, itemId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deliveryCoupon_call extends org.apache.thrift.async.TAsyncMethodCall { + private int gameUserId; + private String couponCode; + private String title; + private String content; + private long orderTime; + private List itemId; + public deliveryCoupon_call(int gameUserId, String couponCode, String title, String content, long orderTime, List itemId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.gameUserId = gameUserId; + this.couponCode = couponCode; + this.title = title; + this.content = content; + this.orderTime = orderTime; + this.itemId = itemId; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deliveryCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deliveryCoupon_args args = new deliveryCoupon_args(); + args.setGameUserId(gameUserId); + args.setCouponCode(couponCode); + args.setTitle(title); + args.setContent(content); + args.setOrderTime(orderTime); + args.setItemId(itemId); + args.write(prot); + prot.writeMessageEnd(); + } + + public Result getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_deliveryCoupon(); + } + } + + public void deliveryOrder(int uid, String goodsId, long orderTime, String orderId, int devalueId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deliveryOrder_call method_call = new deliveryOrder_call(uid, goodsId, orderTime, orderId, devalueId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deliveryOrder_call extends org.apache.thrift.async.TAsyncMethodCall { + private int uid; + private String goodsId; + private long orderTime; + private String orderId; + private int devalueId; + public deliveryOrder_call(int uid, String goodsId, long orderTime, String orderId, int devalueId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.uid = uid; + this.goodsId = goodsId; + this.orderTime = orderTime; + this.orderId = orderId; + this.devalueId = devalueId; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deliveryOrder", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deliveryOrder_args args = new deliveryOrder_args(); + args.setUid(uid); + args.setGoodsId(goodsId); + args.setOrderTime(orderTime); + args.setOrderId(orderId); + args.setDevalueId(devalueId); + args.write(prot); + prot.writeMessageEnd(); + } + + public Result getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_deliveryOrder(); + } + } + + public void operateUser(int uid, int opStatus, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + operateUser_call method_call = new operateUser_call(uid, opStatus, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class operateUser_call extends org.apache.thrift.async.TAsyncMethodCall { + private int uid; + private int opStatus; + public operateUser_call(int uid, int opStatus, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.uid = uid; + this.opStatus = opStatus; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("operateUser", org.apache.thrift.protocol.TMessageType.CALL, 0)); + operateUser_args args = new operateUser_args(); + args.setUid(uid); + args.setOpStatus(opStatus); + args.write(prot); + prot.writeMessageEnd(); + } + + public Result getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_operateUser(); + } + } + + public void getItemConfigs(List itemIds, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getItemConfigs_call method_call = new getItemConfigs_call(itemIds, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getItemConfigs_call extends org.apache.thrift.async.TAsyncMethodCall { + private List itemIds; + public getItemConfigs_call(List itemIds, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.itemIds = itemIds; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemConfigs", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getItemConfigs_args args = new getItemConfigs_args(); + args.setItemIds(itemIds); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getItemConfigs(); + } + } + + public void giftCode(int uid, String giftCode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + giftCode_call method_call = new giftCode_call(uid, giftCode, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class giftCode_call extends org.apache.thrift.async.TAsyncMethodCall { + private int uid; + private String giftCode; + public giftCode_call(int uid, String giftCode, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.uid = uid; + this.giftCode = giftCode; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("giftCode", org.apache.thrift.protocol.TMessageType.CALL, 0)); + giftCode_args args = new giftCode_args(); + args.setUid(uid); + args.setGiftCode(giftCode); + args.write(prot); + prot.writeMessageEnd(); + } + + public Result getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_giftCode(); + } + } + + } + + public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { + private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); + public Processor(I iface) { + super(iface, getProcessMap(new HashMap>())); + } + + protected Processor(I iface, Map> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static Map> getProcessMap(Map> processMap) { + processMap.put("deliveryRecharge", new deliveryRecharge()); + processMap.put("deliveryRecharge2", new deliveryRecharge2()); + processMap.put("getRecharge", new getRecharge()); + processMap.put("mathcRoomAdressInfo", new mathcRoomAdressInfo()); + processMap.put("sendMailToRole", new sendMailToRole()); + processMap.put("deliveryCoupon", new deliveryCoupon()); + processMap.put("deliveryOrder", new deliveryOrder()); + processMap.put("operateUser", new operateUser()); + processMap.put("getItemConfigs", new getItemConfigs()); + processMap.put("giftCode", new giftCode()); + return processMap; + } + + public static class deliveryRecharge extends org.apache.thrift.ProcessFunction { + public deliveryRecharge() { + super("deliveryRecharge"); + } + + public deliveryRecharge_args getEmptyArgsInstance() { + return new deliveryRecharge_args(); + } + + protected boolean isOneway() { + return false; + } + + public deliveryRecharge_result getResult(I iface, deliveryRecharge_args args) throws org.apache.thrift.TException { + deliveryRecharge_result result = new deliveryRecharge_result(); + try { + result.success = iface.deliveryRecharge(args.uid, args.goodsId, args.openId, args.orderId, args.orderTime, args.amount, args.platform); + } catch (InvalidOperException ouch) { + result.ouch = ouch; + } + return result; + } + } + + public static class deliveryRecharge2 extends org.apache.thrift.ProcessFunction { + public deliveryRecharge2() { + super("deliveryRecharge2"); + } + + public deliveryRecharge2_args getEmptyArgsInstance() { + return new deliveryRecharge2_args(); + } + + protected boolean isOneway() { + return false; + } + + public deliveryRecharge2_result getResult(I iface, deliveryRecharge2_args args) throws org.apache.thrift.TException { + deliveryRecharge2_result result = new deliveryRecharge2_result(); + result.success = iface.deliveryRecharge2(args.uid, args.goodsId, args.currency, args.amount); + return result; + } + } + + public static class getRecharge extends org.apache.thrift.ProcessFunction { + public getRecharge() { + super("getRecharge"); + } + + public getRecharge_args getEmptyArgsInstance() { + return new getRecharge_args(); + } + + protected boolean isOneway() { + return false; + } + + public getRecharge_result getResult(I iface, getRecharge_args args) throws org.apache.thrift.TException { + getRecharge_result result = new getRecharge_result(); + result.success = iface.getRecharge(args.uid); + return result; + } + } + + public static class mathcRoomAdressInfo extends org.apache.thrift.ProcessFunction { + public mathcRoomAdressInfo() { + super("mathcRoomAdressInfo"); + } + + public mathcRoomAdressInfo_args getEmptyArgsInstance() { + return new mathcRoomAdressInfo_args(); + } + + protected boolean isOneway() { + return false; + } + + public mathcRoomAdressInfo_result getResult(I iface, mathcRoomAdressInfo_args args) throws org.apache.thrift.TException { + mathcRoomAdressInfo_result result = new mathcRoomAdressInfo_result(); + iface.mathcRoomAdressInfo(args.uid, args.type, args.address); + return result; + } + } + + public static class sendMailToRole extends org.apache.thrift.ProcessFunction { + public sendMailToRole() { + super("sendMailToRole"); + } + + public sendMailToRole_args getEmptyArgsInstance() { + return new sendMailToRole_args(); + } + + protected boolean isOneway() { + return false; + } + + public sendMailToRole_result getResult(I iface, sendMailToRole_args args) throws org.apache.thrift.TException { + sendMailToRole_result result = new sendMailToRole_result(); + result.success = iface.sendMailToRole(args.uids, args.title, args.content, args.reward); + return result; + } + } + + public static class deliveryCoupon extends org.apache.thrift.ProcessFunction { + public deliveryCoupon() { + super("deliveryCoupon"); + } + + public deliveryCoupon_args getEmptyArgsInstance() { + return new deliveryCoupon_args(); + } + + protected boolean isOneway() { + return false; + } + + public deliveryCoupon_result getResult(I iface, deliveryCoupon_args args) throws org.apache.thrift.TException { + deliveryCoupon_result result = new deliveryCoupon_result(); + result.success = iface.deliveryCoupon(args.gameUserId, args.couponCode, args.title, args.content, args.orderTime, args.itemId); + return result; + } + } + + public static class deliveryOrder extends org.apache.thrift.ProcessFunction { + public deliveryOrder() { + super("deliveryOrder"); + } + + public deliveryOrder_args getEmptyArgsInstance() { + return new deliveryOrder_args(); + } + + protected boolean isOneway() { + return false; + } + + public deliveryOrder_result getResult(I iface, deliveryOrder_args args) throws org.apache.thrift.TException { + deliveryOrder_result result = new deliveryOrder_result(); + result.success = iface.deliveryOrder(args.uid, args.goodsId, args.orderTime, args.orderId, args.devalueId); + return result; + } + } + + public static class operateUser extends org.apache.thrift.ProcessFunction { + public operateUser() { + super("operateUser"); + } + + public operateUser_args getEmptyArgsInstance() { + return new operateUser_args(); + } + + protected boolean isOneway() { + return false; + } + + public operateUser_result getResult(I iface, operateUser_args args) throws org.apache.thrift.TException { + operateUser_result result = new operateUser_result(); + result.success = iface.operateUser(args.uid, args.opStatus); + return result; + } + } + + public static class getItemConfigs extends org.apache.thrift.ProcessFunction { + public getItemConfigs() { + super("getItemConfigs"); + } + + public getItemConfigs_args getEmptyArgsInstance() { + return new getItemConfigs_args(); + } + + protected boolean isOneway() { + return false; + } + + public getItemConfigs_result getResult(I iface, getItemConfigs_args args) throws org.apache.thrift.TException { + getItemConfigs_result result = new getItemConfigs_result(); + result.success = iface.getItemConfigs(args.itemIds); + return result; + } + } + + public static class giftCode extends org.apache.thrift.ProcessFunction { + public giftCode() { + super("giftCode"); + } + + public giftCode_args getEmptyArgsInstance() { + return new giftCode_args(); + } + + protected boolean isOneway() { + return false; + } + + public giftCode_result getResult(I iface, giftCode_args args) throws org.apache.thrift.TException { + giftCode_result result = new giftCode_result(); + result.success = iface.giftCode(args.uid, args.giftCode); + return result; + } + } + + } + + public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { + private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); + public AsyncProcessor(I iface) { + super(iface, getProcessMap(new HashMap>())); + } + + protected AsyncProcessor(I iface, Map> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static Map> getProcessMap(Map> processMap) { + processMap.put("deliveryRecharge", new deliveryRecharge()); + processMap.put("deliveryRecharge2", new deliveryRecharge2()); + processMap.put("getRecharge", new getRecharge()); + processMap.put("mathcRoomAdressInfo", new mathcRoomAdressInfo()); + processMap.put("sendMailToRole", new sendMailToRole()); + processMap.put("deliveryCoupon", new deliveryCoupon()); + processMap.put("deliveryOrder", new deliveryOrder()); + processMap.put("operateUser", new operateUser()); + processMap.put("getItemConfigs", new getItemConfigs()); + processMap.put("giftCode", new giftCode()); + return processMap; + } + + public static class deliveryRecharge extends org.apache.thrift.AsyncProcessFunction { + public deliveryRecharge() { + super("deliveryRecharge"); + } + + public deliveryRecharge_args getEmptyArgsInstance() { + return new deliveryRecharge_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Result o) { + deliveryRecharge_result result = new deliveryRecharge_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + deliveryRecharge_result result = new deliveryRecharge_result(); + if (e instanceof InvalidOperException) { + result.ouch = (InvalidOperException) e; + result.setOuchIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, deliveryRecharge_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.deliveryRecharge(args.uid, args.goodsId, args.openId, args.orderId, args.orderTime, args.amount, args.platform,resultHandler); + } + } + + public static class deliveryRecharge2 extends org.apache.thrift.AsyncProcessFunction { + public deliveryRecharge2() { + super("deliveryRecharge2"); + } + + public deliveryRecharge2_args getEmptyArgsInstance() { + return new deliveryRecharge2_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Result o) { + deliveryRecharge2_result result = new deliveryRecharge2_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + deliveryRecharge2_result result = new deliveryRecharge2_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, deliveryRecharge2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.deliveryRecharge2(args.uid, args.goodsId, args.currency, args.amount,resultHandler); + } + } + + public static class getRecharge extends org.apache.thrift.AsyncProcessFunction { + public getRecharge() { + super("getRecharge"); + } + + public getRecharge_args getEmptyArgsInstance() { + return new getRecharge_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(RechargeResult o) { + getRecharge_result result = new getRecharge_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getRecharge_result result = new getRecharge_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getRecharge_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getRecharge(args.uid,resultHandler); + } + } + + public static class mathcRoomAdressInfo extends org.apache.thrift.AsyncProcessFunction { + public mathcRoomAdressInfo() { + super("mathcRoomAdressInfo"); + } + + public mathcRoomAdressInfo_args getEmptyArgsInstance() { + return new mathcRoomAdressInfo_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + mathcRoomAdressInfo_result result = new mathcRoomAdressInfo_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + mathcRoomAdressInfo_result result = new mathcRoomAdressInfo_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, mathcRoomAdressInfo_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.mathcRoomAdressInfo(args.uid, args.type, args.address,resultHandler); + } + } + + public static class sendMailToRole extends org.apache.thrift.AsyncProcessFunction { + public sendMailToRole() { + super("sendMailToRole"); + } + + public sendMailToRole_args getEmptyArgsInstance() { + return new sendMailToRole_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Result o) { + sendMailToRole_result result = new sendMailToRole_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + sendMailToRole_result result = new sendMailToRole_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, sendMailToRole_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.sendMailToRole(args.uids, args.title, args.content, args.reward,resultHandler); + } + } + + public static class deliveryCoupon extends org.apache.thrift.AsyncProcessFunction { + public deliveryCoupon() { + super("deliveryCoupon"); + } + + public deliveryCoupon_args getEmptyArgsInstance() { + return new deliveryCoupon_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Result o) { + deliveryCoupon_result result = new deliveryCoupon_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + deliveryCoupon_result result = new deliveryCoupon_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, deliveryCoupon_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.deliveryCoupon(args.gameUserId, args.couponCode, args.title, args.content, args.orderTime, args.itemId,resultHandler); + } + } + + public static class deliveryOrder extends org.apache.thrift.AsyncProcessFunction { + public deliveryOrder() { + super("deliveryOrder"); + } + + public deliveryOrder_args getEmptyArgsInstance() { + return new deliveryOrder_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Result o) { + deliveryOrder_result result = new deliveryOrder_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + deliveryOrder_result result = new deliveryOrder_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, deliveryOrder_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.deliveryOrder(args.uid, args.goodsId, args.orderTime, args.orderId, args.devalueId,resultHandler); + } + } + + public static class operateUser extends org.apache.thrift.AsyncProcessFunction { + public operateUser() { + super("operateUser"); + } + + public operateUser_args getEmptyArgsInstance() { + return new operateUser_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Result o) { + operateUser_result result = new operateUser_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + operateUser_result result = new operateUser_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, operateUser_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.operateUser(args.uid, args.opStatus,resultHandler); + } + } + + public static class getItemConfigs extends org.apache.thrift.AsyncProcessFunction> { + public getItemConfigs() { + super("getItemConfigs"); + } + + public getItemConfigs_args getEmptyArgsInstance() { + return new getItemConfigs_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getItemConfigs_result result = new getItemConfigs_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getItemConfigs_result result = new getItemConfigs_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getItemConfigs_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getItemConfigs(args.itemIds,resultHandler); + } + } + + public static class giftCode extends org.apache.thrift.AsyncProcessFunction { + public giftCode() { + super("giftCode"); + } + + public giftCode_args getEmptyArgsInstance() { + return new giftCode_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Result o) { + giftCode_result result = new giftCode_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + giftCode_result result = new giftCode_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, giftCode_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.giftCode(args.uid, args.giftCode,resultHandler); + } + } + + } + + public static class deliveryRecharge_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deliveryRecharge_args"); + + private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("uid", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField GOODS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("goodsId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField OPEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("openId", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField ORDER_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("orderTime", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("amount", org.apache.thrift.protocol.TType.I32, (short)6); + private static final org.apache.thrift.protocol.TField PLATFORM_FIELD_DESC = new org.apache.thrift.protocol.TField("platform", org.apache.thrift.protocol.TType.STRING, (short)7); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deliveryRecharge_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deliveryRecharge_argsTupleSchemeFactory()); + } + + public int uid; // required + public String goodsId; // required + public String openId; // required + public String orderId; // required + public long orderTime; // required + public int amount; // required + public String platform; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UID((short)1, "uid"), + GOODS_ID((short)2, "goodsId"), + OPEN_ID((short)3, "openId"), + ORDER_ID((short)4, "orderId"), + ORDER_TIME((short)5, "orderTime"), + AMOUNT((short)6, "amount"), + PLATFORM((short)7, "platform"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UID + return UID; + case 2: // GOODS_ID + return GOODS_ID; + case 3: // OPEN_ID + return OPEN_ID; + case 4: // ORDER_ID + return ORDER_ID; + case 5: // ORDER_TIME + return ORDER_TIME; + case 6: // AMOUNT + return AMOUNT; + case 7: // PLATFORM + return PLATFORM; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __UID_ISSET_ID = 0; + private static final int __ORDERTIME_ISSET_ID = 1; + private static final int __AMOUNT_ISSET_ID = 2; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("uid", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.GOODS_ID, new org.apache.thrift.meta_data.FieldMetaData("goodsId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.OPEN_ID, new org.apache.thrift.meta_data.FieldMetaData("openId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ORDER_TIME, new org.apache.thrift.meta_data.FieldMetaData("orderTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.PLATFORM, new org.apache.thrift.meta_data.FieldMetaData("platform", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deliveryRecharge_args.class, metaDataMap); + } + + public deliveryRecharge_args() { + } + + public deliveryRecharge_args( + int uid, + String goodsId, + String openId, + String orderId, + long orderTime, + int amount, + String platform) + { + this(); + this.uid = uid; + setUidIsSet(true); + this.goodsId = goodsId; + this.openId = openId; + this.orderId = orderId; + this.orderTime = orderTime; + setOrderTimeIsSet(true); + this.amount = amount; + setAmountIsSet(true); + this.platform = platform; + } + + /** + * Performs a deep copy on other. + */ + public deliveryRecharge_args(deliveryRecharge_args other) { + __isset_bitfield = other.__isset_bitfield; + this.uid = other.uid; + if (other.isSetGoodsId()) { + this.goodsId = other.goodsId; + } + if (other.isSetOpenId()) { + this.openId = other.openId; + } + if (other.isSetOrderId()) { + this.orderId = other.orderId; + } + this.orderTime = other.orderTime; + this.amount = other.amount; + if (other.isSetPlatform()) { + this.platform = other.platform; + } + } + + public deliveryRecharge_args deepCopy() { + return new deliveryRecharge_args(this); + } + + @Override + public void clear() { + setUidIsSet(false); + this.uid = 0; + this.goodsId = null; + this.openId = null; + this.orderId = null; + setOrderTimeIsSet(false); + this.orderTime = 0; + setAmountIsSet(false); + this.amount = 0; + this.platform = null; + } + + public int getUid() { + return this.uid; + } + + public deliveryRecharge_args setUid(int uid) { + this.uid = uid; + setUidIsSet(true); + return this; + } + + public void unsetUid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UID_ISSET_ID); + } + + /** Returns true if field uid is set (has been assigned a value) and false otherwise */ + public boolean isSetUid() { + return EncodingUtils.testBit(__isset_bitfield, __UID_ISSET_ID); + } + + public void setUidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID_ISSET_ID, value); + } + + public String getGoodsId() { + return this.goodsId; + } + + public deliveryRecharge_args setGoodsId(String goodsId) { + this.goodsId = goodsId; + return this; + } + + public void unsetGoodsId() { + this.goodsId = null; + } + + /** Returns true if field goodsId is set (has been assigned a value) and false otherwise */ + public boolean isSetGoodsId() { + return this.goodsId != null; + } + + public void setGoodsIdIsSet(boolean value) { + if (!value) { + this.goodsId = null; + } + } + + public String getOpenId() { + return this.openId; + } + + public deliveryRecharge_args setOpenId(String openId) { + this.openId = openId; + return this; + } + + public void unsetOpenId() { + this.openId = null; + } + + /** Returns true if field openId is set (has been assigned a value) and false otherwise */ + public boolean isSetOpenId() { + return this.openId != null; + } + + public void setOpenIdIsSet(boolean value) { + if (!value) { + this.openId = null; + } + } + + public String getOrderId() { + return this.orderId; + } + + public deliveryRecharge_args setOrderId(String orderId) { + this.orderId = orderId; + return this; + } + + public void unsetOrderId() { + this.orderId = null; + } + + /** Returns true if field orderId is set (has been assigned a value) and false otherwise */ + public boolean isSetOrderId() { + return this.orderId != null; + } + + public void setOrderIdIsSet(boolean value) { + if (!value) { + this.orderId = null; + } + } + + public long getOrderTime() { + return this.orderTime; + } + + public deliveryRecharge_args setOrderTime(long orderTime) { + this.orderTime = orderTime; + setOrderTimeIsSet(true); + return this; + } + + public void unsetOrderTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ORDERTIME_ISSET_ID); + } + + /** Returns true if field orderTime is set (has been assigned a value) and false otherwise */ + public boolean isSetOrderTime() { + return EncodingUtils.testBit(__isset_bitfield, __ORDERTIME_ISSET_ID); + } + + public void setOrderTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ORDERTIME_ISSET_ID, value); + } + + public int getAmount() { + return this.amount; + } + + public deliveryRecharge_args setAmount(int amount) { + this.amount = amount; + setAmountIsSet(true); + return this; + } + + public void unsetAmount() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AMOUNT_ISSET_ID); + } + + /** Returns true if field amount is set (has been assigned a value) and false otherwise */ + public boolean isSetAmount() { + return EncodingUtils.testBit(__isset_bitfield, __AMOUNT_ISSET_ID); + } + + public void setAmountIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AMOUNT_ISSET_ID, value); + } + + public String getPlatform() { + return this.platform; + } + + public deliveryRecharge_args setPlatform(String platform) { + this.platform = platform; + return this; + } + + public void unsetPlatform() { + this.platform = null; + } + + /** Returns true if field platform is set (has been assigned a value) and false otherwise */ + public boolean isSetPlatform() { + return this.platform != null; + } + + public void setPlatformIsSet(boolean value) { + if (!value) { + this.platform = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UID: + if (value == null) { + unsetUid(); + } else { + setUid((Integer)value); + } + break; + + case GOODS_ID: + if (value == null) { + unsetGoodsId(); + } else { + setGoodsId((String)value); + } + break; + + case OPEN_ID: + if (value == null) { + unsetOpenId(); + } else { + setOpenId((String)value); + } + break; + + case ORDER_ID: + if (value == null) { + unsetOrderId(); + } else { + setOrderId((String)value); + } + break; + + case ORDER_TIME: + if (value == null) { + unsetOrderTime(); + } else { + setOrderTime((Long)value); + } + break; + + case AMOUNT: + if (value == null) { + unsetAmount(); + } else { + setAmount((Integer)value); + } + break; + + case PLATFORM: + if (value == null) { + unsetPlatform(); + } else { + setPlatform((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UID: + return Integer.valueOf(getUid()); + + case GOODS_ID: + return getGoodsId(); + + case OPEN_ID: + return getOpenId(); + + case ORDER_ID: + return getOrderId(); + + case ORDER_TIME: + return Long.valueOf(getOrderTime()); + + case AMOUNT: + return Integer.valueOf(getAmount()); + + case PLATFORM: + return getPlatform(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UID: + return isSetUid(); + case GOODS_ID: + return isSetGoodsId(); + case OPEN_ID: + return isSetOpenId(); + case ORDER_ID: + return isSetOrderId(); + case ORDER_TIME: + return isSetOrderTime(); + case AMOUNT: + return isSetAmount(); + case PLATFORM: + return isSetPlatform(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deliveryRecharge_args) + return this.equals((deliveryRecharge_args)that); + return false; + } + + public boolean equals(deliveryRecharge_args that) { + if (that == null) + return false; + + boolean this_present_uid = true; + boolean that_present_uid = true; + if (this_present_uid || that_present_uid) { + if (!(this_present_uid && that_present_uid)) + return false; + if (this.uid != that.uid) + return false; + } + + boolean this_present_goodsId = true && this.isSetGoodsId(); + boolean that_present_goodsId = true && that.isSetGoodsId(); + if (this_present_goodsId || that_present_goodsId) { + if (!(this_present_goodsId && that_present_goodsId)) + return false; + if (!this.goodsId.equals(that.goodsId)) + return false; + } + + boolean this_present_openId = true && this.isSetOpenId(); + boolean that_present_openId = true && that.isSetOpenId(); + if (this_present_openId || that_present_openId) { + if (!(this_present_openId && that_present_openId)) + return false; + if (!this.openId.equals(that.openId)) + return false; + } + + boolean this_present_orderId = true && this.isSetOrderId(); + boolean that_present_orderId = true && that.isSetOrderId(); + if (this_present_orderId || that_present_orderId) { + if (!(this_present_orderId && that_present_orderId)) + return false; + if (!this.orderId.equals(that.orderId)) + return false; + } + + boolean this_present_orderTime = true; + boolean that_present_orderTime = true; + if (this_present_orderTime || that_present_orderTime) { + if (!(this_present_orderTime && that_present_orderTime)) + return false; + if (this.orderTime != that.orderTime) + return false; + } + + boolean this_present_amount = true; + boolean that_present_amount = true; + if (this_present_amount || that_present_amount) { + if (!(this_present_amount && that_present_amount)) + return false; + if (this.amount != that.amount) + return false; + } + + boolean this_present_platform = true && this.isSetPlatform(); + boolean that_present_platform = true && that.isSetPlatform(); + if (this_present_platform || that_present_platform) { + if (!(this_present_platform && that_present_platform)) + return false; + if (!this.platform.equals(that.platform)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_uid = true; + list.add(present_uid); + if (present_uid) + list.add(uid); + + boolean present_goodsId = true && (isSetGoodsId()); + list.add(present_goodsId); + if (present_goodsId) + list.add(goodsId); + + boolean present_openId = true && (isSetOpenId()); + list.add(present_openId); + if (present_openId) + list.add(openId); + + boolean present_orderId = true && (isSetOrderId()); + list.add(present_orderId); + if (present_orderId) + list.add(orderId); + + boolean present_orderTime = true; + list.add(present_orderTime); + if (present_orderTime) + list.add(orderTime); + + boolean present_amount = true; + list.add(present_amount); + if (present_amount) + list.add(amount); + + boolean present_platform = true && (isSetPlatform()); + list.add(present_platform); + if (present_platform) + list.add(platform); + + return list.hashCode(); + } + + @Override + public int compareTo(deliveryRecharge_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uid, other.uid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGoodsId()).compareTo(other.isSetGoodsId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGoodsId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.goodsId, other.goodsId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOpenId()).compareTo(other.isSetOpenId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOpenId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.openId, other.openId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(other.isSetOrderId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOrderId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, other.orderId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOrderTime()).compareTo(other.isSetOrderTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOrderTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderTime, other.orderTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAmount()).compareTo(other.isSetAmount()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAmount()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, other.amount); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPlatform()).compareTo(other.isSetPlatform()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPlatform()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.platform, other.platform); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deliveryRecharge_args("); + boolean first = true; + + sb.append("uid:"); + sb.append(this.uid); + first = false; + if (!first) sb.append(", "); + sb.append("goodsId:"); + if (this.goodsId == null) { + sb.append("null"); + } else { + sb.append(this.goodsId); + } + first = false; + if (!first) sb.append(", "); + sb.append("openId:"); + if (this.openId == null) { + sb.append("null"); + } else { + sb.append(this.openId); + } + first = false; + if (!first) sb.append(", "); + sb.append("orderId:"); + if (this.orderId == null) { + sb.append("null"); + } else { + sb.append(this.orderId); + } + first = false; + if (!first) sb.append(", "); + sb.append("orderTime:"); + sb.append(this.orderTime); + first = false; + if (!first) sb.append(", "); + sb.append("amount:"); + sb.append(this.amount); + first = false; + if (!first) sb.append(", "); + sb.append("platform:"); + if (this.platform == null) { + sb.append("null"); + } else { + sb.append(this.platform); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deliveryRecharge_argsStandardSchemeFactory implements SchemeFactory { + public deliveryRecharge_argsStandardScheme getScheme() { + return new deliveryRecharge_argsStandardScheme(); + } + } + + private static class deliveryRecharge_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deliveryRecharge_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // UID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // GOODS_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.goodsId = iprot.readString(); + struct.setGoodsIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // OPEN_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.openId = iprot.readString(); + struct.setOpenIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ORDER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.orderId = iprot.readString(); + struct.setOrderIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // ORDER_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.orderTime = iprot.readI64(); + struct.setOrderTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // AMOUNT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.amount = iprot.readI32(); + struct.setAmountIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // PLATFORM + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.platform = iprot.readString(); + struct.setPlatformIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deliveryRecharge_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(UID_FIELD_DESC); + oprot.writeI32(struct.uid); + oprot.writeFieldEnd(); + if (struct.goodsId != null) { + oprot.writeFieldBegin(GOODS_ID_FIELD_DESC); + oprot.writeString(struct.goodsId); + oprot.writeFieldEnd(); + } + if (struct.openId != null) { + oprot.writeFieldBegin(OPEN_ID_FIELD_DESC); + oprot.writeString(struct.openId); + oprot.writeFieldEnd(); + } + if (struct.orderId != null) { + oprot.writeFieldBegin(ORDER_ID_FIELD_DESC); + oprot.writeString(struct.orderId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(ORDER_TIME_FIELD_DESC); + oprot.writeI64(struct.orderTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(AMOUNT_FIELD_DESC); + oprot.writeI32(struct.amount); + oprot.writeFieldEnd(); + if (struct.platform != null) { + oprot.writeFieldBegin(PLATFORM_FIELD_DESC); + oprot.writeString(struct.platform); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deliveryRecharge_argsTupleSchemeFactory implements SchemeFactory { + public deliveryRecharge_argsTupleScheme getScheme() { + return new deliveryRecharge_argsTupleScheme(); + } + } + + private static class deliveryRecharge_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deliveryRecharge_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUid()) { + optionals.set(0); + } + if (struct.isSetGoodsId()) { + optionals.set(1); + } + if (struct.isSetOpenId()) { + optionals.set(2); + } + if (struct.isSetOrderId()) { + optionals.set(3); + } + if (struct.isSetOrderTime()) { + optionals.set(4); + } + if (struct.isSetAmount()) { + optionals.set(5); + } + if (struct.isSetPlatform()) { + optionals.set(6); + } + oprot.writeBitSet(optionals, 7); + if (struct.isSetUid()) { + oprot.writeI32(struct.uid); + } + if (struct.isSetGoodsId()) { + oprot.writeString(struct.goodsId); + } + if (struct.isSetOpenId()) { + oprot.writeString(struct.openId); + } + if (struct.isSetOrderId()) { + oprot.writeString(struct.orderId); + } + if (struct.isSetOrderTime()) { + oprot.writeI64(struct.orderTime); + } + if (struct.isSetAmount()) { + oprot.writeI32(struct.amount); + } + if (struct.isSetPlatform()) { + oprot.writeString(struct.platform); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deliveryRecharge_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(7); + if (incoming.get(0)) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } + if (incoming.get(1)) { + struct.goodsId = iprot.readString(); + struct.setGoodsIdIsSet(true); + } + if (incoming.get(2)) { + struct.openId = iprot.readString(); + struct.setOpenIdIsSet(true); + } + if (incoming.get(3)) { + struct.orderId = iprot.readString(); + struct.setOrderIdIsSet(true); + } + if (incoming.get(4)) { + struct.orderTime = iprot.readI64(); + struct.setOrderTimeIsSet(true); + } + if (incoming.get(5)) { + struct.amount = iprot.readI32(); + struct.setAmountIsSet(true); + } + if (incoming.get(6)) { + struct.platform = iprot.readString(); + struct.setPlatformIsSet(true); + } + } + } + + } + + public static class deliveryRecharge_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deliveryRecharge_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deliveryRecharge_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deliveryRecharge_resultTupleSchemeFactory()); + } + + public Result success; // required + public InvalidOperException ouch; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + OUCH((short)1, "ouch"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // OUCH + return OUCH; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Result.class))); + tmpMap.put(_Fields.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deliveryRecharge_result.class, metaDataMap); + } + + public deliveryRecharge_result() { + } + + public deliveryRecharge_result( + Result success, + InvalidOperException ouch) + { + this(); + this.success = success; + this.ouch = ouch; + } + + /** + * Performs a deep copy on other. + */ + public deliveryRecharge_result(deliveryRecharge_result other) { + if (other.isSetSuccess()) { + this.success = new Result(other.success); + } + if (other.isSetOuch()) { + this.ouch = new InvalidOperException(other.ouch); + } + } + + public deliveryRecharge_result deepCopy() { + return new deliveryRecharge_result(this); + } + + @Override + public void clear() { + this.success = null; + this.ouch = null; + } + + public Result getSuccess() { + return this.success; + } + + public deliveryRecharge_result setSuccess(Result success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public InvalidOperException getOuch() { + return this.ouch; + } + + public deliveryRecharge_result setOuch(InvalidOperException ouch) { + this.ouch = ouch; + return this; + } + + public void unsetOuch() { + this.ouch = null; + } + + /** Returns true if field ouch is set (has been assigned a value) and false otherwise */ + public boolean isSetOuch() { + return this.ouch != null; + } + + public void setOuchIsSet(boolean value) { + if (!value) { + this.ouch = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Result)value); + } + break; + + case OUCH: + if (value == null) { + unsetOuch(); + } else { + setOuch((InvalidOperException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case OUCH: + return getOuch(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case OUCH: + return isSetOuch(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deliveryRecharge_result) + return this.equals((deliveryRecharge_result)that); + return false; + } + + public boolean equals(deliveryRecharge_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_ouch = true && this.isSetOuch(); + boolean that_present_ouch = true && that.isSetOuch(); + if (this_present_ouch || that_present_ouch) { + if (!(this_present_ouch && that_present_ouch)) + return false; + if (!this.ouch.equals(that.ouch)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_ouch = true && (isSetOuch()); + list.add(present_ouch); + if (present_ouch) + list.add(ouch); + + return list.hashCode(); + } + + @Override + public int compareTo(deliveryRecharge_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOuch()).compareTo(other.isSetOuch()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOuch()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, other.ouch); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deliveryRecharge_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("ouch:"); + if (this.ouch == null) { + sb.append("null"); + } else { + sb.append(this.ouch); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deliveryRecharge_resultStandardSchemeFactory implements SchemeFactory { + public deliveryRecharge_resultStandardScheme getScheme() { + return new deliveryRecharge_resultStandardScheme(); + } + } + + private static class deliveryRecharge_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deliveryRecharge_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // OUCH + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ouch = new InvalidOperException(); + struct.ouch.read(iprot); + struct.setOuchIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deliveryRecharge_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ouch != null) { + oprot.writeFieldBegin(OUCH_FIELD_DESC); + struct.ouch.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deliveryRecharge_resultTupleSchemeFactory implements SchemeFactory { + public deliveryRecharge_resultTupleScheme getScheme() { + return new deliveryRecharge_resultTupleScheme(); + } + } + + private static class deliveryRecharge_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deliveryRecharge_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetOuch()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetOuch()) { + struct.ouch.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deliveryRecharge_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.ouch = new InvalidOperException(); + struct.ouch.read(iprot); + struct.setOuchIsSet(true); + } + } + } + + } + + public static class deliveryRecharge2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deliveryRecharge2_args"); + + private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("uid", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField GOODS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("goodsId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField CURRENCY_FIELD_DESC = new org.apache.thrift.protocol.TField("currency", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("amount", org.apache.thrift.protocol.TType.DOUBLE, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deliveryRecharge2_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deliveryRecharge2_argsTupleSchemeFactory()); + } + + public int uid; // required + public String goodsId; // required + public String currency; // required + public double amount; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UID((short)1, "uid"), + GOODS_ID((short)2, "goodsId"), + CURRENCY((short)3, "currency"), + AMOUNT((short)4, "amount"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UID + return UID; + case 2: // GOODS_ID + return GOODS_ID; + case 3: // CURRENCY + return CURRENCY; + case 4: // AMOUNT + return AMOUNT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __UID_ISSET_ID = 0; + private static final int __AMOUNT_ISSET_ID = 1; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("uid", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.GOODS_ID, new org.apache.thrift.meta_data.FieldMetaData("goodsId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CURRENCY, new org.apache.thrift.meta_data.FieldMetaData("currency", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deliveryRecharge2_args.class, metaDataMap); + } + + public deliveryRecharge2_args() { + } + + public deliveryRecharge2_args( + int uid, + String goodsId, + String currency, + double amount) + { + this(); + this.uid = uid; + setUidIsSet(true); + this.goodsId = goodsId; + this.currency = currency; + this.amount = amount; + setAmountIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public deliveryRecharge2_args(deliveryRecharge2_args other) { + __isset_bitfield = other.__isset_bitfield; + this.uid = other.uid; + if (other.isSetGoodsId()) { + this.goodsId = other.goodsId; + } + if (other.isSetCurrency()) { + this.currency = other.currency; + } + this.amount = other.amount; + } + + public deliveryRecharge2_args deepCopy() { + return new deliveryRecharge2_args(this); + } + + @Override + public void clear() { + setUidIsSet(false); + this.uid = 0; + this.goodsId = null; + this.currency = null; + setAmountIsSet(false); + this.amount = 0.0; + } + + public int getUid() { + return this.uid; + } + + public deliveryRecharge2_args setUid(int uid) { + this.uid = uid; + setUidIsSet(true); + return this; + } + + public void unsetUid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UID_ISSET_ID); + } + + /** Returns true if field uid is set (has been assigned a value) and false otherwise */ + public boolean isSetUid() { + return EncodingUtils.testBit(__isset_bitfield, __UID_ISSET_ID); + } + + public void setUidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID_ISSET_ID, value); + } + + public String getGoodsId() { + return this.goodsId; + } + + public deliveryRecharge2_args setGoodsId(String goodsId) { + this.goodsId = goodsId; + return this; + } + + public void unsetGoodsId() { + this.goodsId = null; + } + + /** Returns true if field goodsId is set (has been assigned a value) and false otherwise */ + public boolean isSetGoodsId() { + return this.goodsId != null; + } + + public void setGoodsIdIsSet(boolean value) { + if (!value) { + this.goodsId = null; + } + } + + public String getCurrency() { + return this.currency; + } + + public deliveryRecharge2_args setCurrency(String currency) { + this.currency = currency; + return this; + } + + public void unsetCurrency() { + this.currency = null; + } + + /** Returns true if field currency is set (has been assigned a value) and false otherwise */ + public boolean isSetCurrency() { + return this.currency != null; + } + + public void setCurrencyIsSet(boolean value) { + if (!value) { + this.currency = null; + } + } + + public double getAmount() { + return this.amount; + } + + public deliveryRecharge2_args setAmount(double amount) { + this.amount = amount; + setAmountIsSet(true); + return this; + } + + public void unsetAmount() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AMOUNT_ISSET_ID); + } + + /** Returns true if field amount is set (has been assigned a value) and false otherwise */ + public boolean isSetAmount() { + return EncodingUtils.testBit(__isset_bitfield, __AMOUNT_ISSET_ID); + } + + public void setAmountIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AMOUNT_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UID: + if (value == null) { + unsetUid(); + } else { + setUid((Integer)value); + } + break; + + case GOODS_ID: + if (value == null) { + unsetGoodsId(); + } else { + setGoodsId((String)value); + } + break; + + case CURRENCY: + if (value == null) { + unsetCurrency(); + } else { + setCurrency((String)value); + } + break; + + case AMOUNT: + if (value == null) { + unsetAmount(); + } else { + setAmount((Double)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UID: + return Integer.valueOf(getUid()); + + case GOODS_ID: + return getGoodsId(); + + case CURRENCY: + return getCurrency(); + + case AMOUNT: + return Double.valueOf(getAmount()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UID: + return isSetUid(); + case GOODS_ID: + return isSetGoodsId(); + case CURRENCY: + return isSetCurrency(); + case AMOUNT: + return isSetAmount(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deliveryRecharge2_args) + return this.equals((deliveryRecharge2_args)that); + return false; + } + + public boolean equals(deliveryRecharge2_args that) { + if (that == null) + return false; + + boolean this_present_uid = true; + boolean that_present_uid = true; + if (this_present_uid || that_present_uid) { + if (!(this_present_uid && that_present_uid)) + return false; + if (this.uid != that.uid) + return false; + } + + boolean this_present_goodsId = true && this.isSetGoodsId(); + boolean that_present_goodsId = true && that.isSetGoodsId(); + if (this_present_goodsId || that_present_goodsId) { + if (!(this_present_goodsId && that_present_goodsId)) + return false; + if (!this.goodsId.equals(that.goodsId)) + return false; + } + + boolean this_present_currency = true && this.isSetCurrency(); + boolean that_present_currency = true && that.isSetCurrency(); + if (this_present_currency || that_present_currency) { + if (!(this_present_currency && that_present_currency)) + return false; + if (!this.currency.equals(that.currency)) + return false; + } + + boolean this_present_amount = true; + boolean that_present_amount = true; + if (this_present_amount || that_present_amount) { + if (!(this_present_amount && that_present_amount)) + return false; + if (this.amount != that.amount) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_uid = true; + list.add(present_uid); + if (present_uid) + list.add(uid); + + boolean present_goodsId = true && (isSetGoodsId()); + list.add(present_goodsId); + if (present_goodsId) + list.add(goodsId); + + boolean present_currency = true && (isSetCurrency()); + list.add(present_currency); + if (present_currency) + list.add(currency); + + boolean present_amount = true; + list.add(present_amount); + if (present_amount) + list.add(amount); + + return list.hashCode(); + } + + @Override + public int compareTo(deliveryRecharge2_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uid, other.uid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGoodsId()).compareTo(other.isSetGoodsId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGoodsId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.goodsId, other.goodsId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCurrency()).compareTo(other.isSetCurrency()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCurrency()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.currency, other.currency); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAmount()).compareTo(other.isSetAmount()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAmount()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, other.amount); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deliveryRecharge2_args("); + boolean first = true; + + sb.append("uid:"); + sb.append(this.uid); + first = false; + if (!first) sb.append(", "); + sb.append("goodsId:"); + if (this.goodsId == null) { + sb.append("null"); + } else { + sb.append(this.goodsId); + } + first = false; + if (!first) sb.append(", "); + sb.append("currency:"); + if (this.currency == null) { + sb.append("null"); + } else { + sb.append(this.currency); + } + first = false; + if (!first) sb.append(", "); + sb.append("amount:"); + sb.append(this.amount); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deliveryRecharge2_argsStandardSchemeFactory implements SchemeFactory { + public deliveryRecharge2_argsStandardScheme getScheme() { + return new deliveryRecharge2_argsStandardScheme(); + } + } + + private static class deliveryRecharge2_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deliveryRecharge2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // UID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // GOODS_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.goodsId = iprot.readString(); + struct.setGoodsIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // CURRENCY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.currency = iprot.readString(); + struct.setCurrencyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // AMOUNT + if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { + struct.amount = iprot.readDouble(); + struct.setAmountIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deliveryRecharge2_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(UID_FIELD_DESC); + oprot.writeI32(struct.uid); + oprot.writeFieldEnd(); + if (struct.goodsId != null) { + oprot.writeFieldBegin(GOODS_ID_FIELD_DESC); + oprot.writeString(struct.goodsId); + oprot.writeFieldEnd(); + } + if (struct.currency != null) { + oprot.writeFieldBegin(CURRENCY_FIELD_DESC); + oprot.writeString(struct.currency); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(AMOUNT_FIELD_DESC); + oprot.writeDouble(struct.amount); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deliveryRecharge2_argsTupleSchemeFactory implements SchemeFactory { + public deliveryRecharge2_argsTupleScheme getScheme() { + return new deliveryRecharge2_argsTupleScheme(); + } + } + + private static class deliveryRecharge2_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deliveryRecharge2_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUid()) { + optionals.set(0); + } + if (struct.isSetGoodsId()) { + optionals.set(1); + } + if (struct.isSetCurrency()) { + optionals.set(2); + } + if (struct.isSetAmount()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetUid()) { + oprot.writeI32(struct.uid); + } + if (struct.isSetGoodsId()) { + oprot.writeString(struct.goodsId); + } + if (struct.isSetCurrency()) { + oprot.writeString(struct.currency); + } + if (struct.isSetAmount()) { + oprot.writeDouble(struct.amount); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deliveryRecharge2_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } + if (incoming.get(1)) { + struct.goodsId = iprot.readString(); + struct.setGoodsIdIsSet(true); + } + if (incoming.get(2)) { + struct.currency = iprot.readString(); + struct.setCurrencyIsSet(true); + } + if (incoming.get(3)) { + struct.amount = iprot.readDouble(); + struct.setAmountIsSet(true); + } + } + } + + } + + public static class deliveryRecharge2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deliveryRecharge2_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deliveryRecharge2_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deliveryRecharge2_resultTupleSchemeFactory()); + } + + public Result success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Result.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deliveryRecharge2_result.class, metaDataMap); + } + + public deliveryRecharge2_result() { + } + + public deliveryRecharge2_result( + Result success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public deliveryRecharge2_result(deliveryRecharge2_result other) { + if (other.isSetSuccess()) { + this.success = new Result(other.success); + } + } + + public deliveryRecharge2_result deepCopy() { + return new deliveryRecharge2_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public Result getSuccess() { + return this.success; + } + + public deliveryRecharge2_result setSuccess(Result success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Result)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deliveryRecharge2_result) + return this.equals((deliveryRecharge2_result)that); + return false; + } + + public boolean equals(deliveryRecharge2_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(deliveryRecharge2_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deliveryRecharge2_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deliveryRecharge2_resultStandardSchemeFactory implements SchemeFactory { + public deliveryRecharge2_resultStandardScheme getScheme() { + return new deliveryRecharge2_resultStandardScheme(); + } + } + + private static class deliveryRecharge2_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deliveryRecharge2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deliveryRecharge2_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deliveryRecharge2_resultTupleSchemeFactory implements SchemeFactory { + public deliveryRecharge2_resultTupleScheme getScheme() { + return new deliveryRecharge2_resultTupleScheme(); + } + } + + private static class deliveryRecharge2_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deliveryRecharge2_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deliveryRecharge2_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class getRecharge_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRecharge_args"); + + private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("uid", org.apache.thrift.protocol.TType.I32, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRecharge_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRecharge_argsTupleSchemeFactory()); + } + + public int uid; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UID((short)1, "uid"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UID + return UID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __UID_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("uid", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRecharge_args.class, metaDataMap); + } + + public getRecharge_args() { + } + + public getRecharge_args( + int uid) + { + this(); + this.uid = uid; + setUidIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public getRecharge_args(getRecharge_args other) { + __isset_bitfield = other.__isset_bitfield; + this.uid = other.uid; + } + + public getRecharge_args deepCopy() { + return new getRecharge_args(this); + } + + @Override + public void clear() { + setUidIsSet(false); + this.uid = 0; + } + + public int getUid() { + return this.uid; + } + + public getRecharge_args setUid(int uid) { + this.uid = uid; + setUidIsSet(true); + return this; + } + + public void unsetUid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UID_ISSET_ID); + } + + /** Returns true if field uid is set (has been assigned a value) and false otherwise */ + public boolean isSetUid() { + return EncodingUtils.testBit(__isset_bitfield, __UID_ISSET_ID); + } + + public void setUidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UID: + if (value == null) { + unsetUid(); + } else { + setUid((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UID: + return Integer.valueOf(getUid()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UID: + return isSetUid(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRecharge_args) + return this.equals((getRecharge_args)that); + return false; + } + + public boolean equals(getRecharge_args that) { + if (that == null) + return false; + + boolean this_present_uid = true; + boolean that_present_uid = true; + if (this_present_uid || that_present_uid) { + if (!(this_present_uid && that_present_uid)) + return false; + if (this.uid != that.uid) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_uid = true; + list.add(present_uid); + if (present_uid) + list.add(uid); + + return list.hashCode(); + } + + @Override + public int compareTo(getRecharge_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uid, other.uid); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRecharge_args("); + boolean first = true; + + sb.append("uid:"); + sb.append(this.uid); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRecharge_argsStandardSchemeFactory implements SchemeFactory { + public getRecharge_argsStandardScheme getScheme() { + return new getRecharge_argsStandardScheme(); + } + } + + private static class getRecharge_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRecharge_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // UID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRecharge_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(UID_FIELD_DESC); + oprot.writeI32(struct.uid); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRecharge_argsTupleSchemeFactory implements SchemeFactory { + public getRecharge_argsTupleScheme getScheme() { + return new getRecharge_argsTupleScheme(); + } + } + + private static class getRecharge_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRecharge_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUid()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetUid()) { + oprot.writeI32(struct.uid); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRecharge_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } + } + } + + } + + public static class getRecharge_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRecharge_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRecharge_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRecharge_resultTupleSchemeFactory()); + } + + public RechargeResult success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RechargeResult.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRecharge_result.class, metaDataMap); + } + + public getRecharge_result() { + } + + public getRecharge_result( + RechargeResult success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public getRecharge_result(getRecharge_result other) { + if (other.isSetSuccess()) { + this.success = new RechargeResult(other.success); + } + } + + public getRecharge_result deepCopy() { + return new getRecharge_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public RechargeResult getSuccess() { + return this.success; + } + + public getRecharge_result setSuccess(RechargeResult success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((RechargeResult)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRecharge_result) + return this.equals((getRecharge_result)that); + return false; + } + + public boolean equals(getRecharge_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(getRecharge_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRecharge_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRecharge_resultStandardSchemeFactory implements SchemeFactory { + public getRecharge_resultStandardScheme getScheme() { + return new getRecharge_resultStandardScheme(); + } + } + + private static class getRecharge_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRecharge_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new RechargeResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRecharge_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRecharge_resultTupleSchemeFactory implements SchemeFactory { + public getRecharge_resultTupleScheme getScheme() { + return new getRecharge_resultTupleScheme(); + } + } + + private static class getRecharge_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRecharge_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRecharge_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new RechargeResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class mathcRoomAdressInfo_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mathcRoomAdressInfo_args"); + + private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("uid", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)2); + private static final org.apache.thrift.protocol.TField ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("address", org.apache.thrift.protocol.TType.STRING, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new mathcRoomAdressInfo_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mathcRoomAdressInfo_argsTupleSchemeFactory()); + } + + public int uid; // required + public int type; // required + public String address; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UID((short)1, "uid"), + TYPE((short)2, "type"), + ADDRESS((short)3, "address"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UID + return UID; + case 2: // TYPE + return TYPE; + case 3: // ADDRESS + return ADDRESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __UID_ISSET_ID = 0; + private static final int __TYPE_ISSET_ID = 1; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("uid", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("address", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mathcRoomAdressInfo_args.class, metaDataMap); + } + + public mathcRoomAdressInfo_args() { + } + + public mathcRoomAdressInfo_args( + int uid, + int type, + String address) + { + this(); + this.uid = uid; + setUidIsSet(true); + this.type = type; + setTypeIsSet(true); + this.address = address; + } + + /** + * Performs a deep copy on other. + */ + public mathcRoomAdressInfo_args(mathcRoomAdressInfo_args other) { + __isset_bitfield = other.__isset_bitfield; + this.uid = other.uid; + this.type = other.type; + if (other.isSetAddress()) { + this.address = other.address; + } + } + + public mathcRoomAdressInfo_args deepCopy() { + return new mathcRoomAdressInfo_args(this); + } + + @Override + public void clear() { + setUidIsSet(false); + this.uid = 0; + setTypeIsSet(false); + this.type = 0; + this.address = null; + } + + public int getUid() { + return this.uid; + } + + public mathcRoomAdressInfo_args setUid(int uid) { + this.uid = uid; + setUidIsSet(true); + return this; + } + + public void unsetUid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UID_ISSET_ID); + } + + /** Returns true if field uid is set (has been assigned a value) and false otherwise */ + public boolean isSetUid() { + return EncodingUtils.testBit(__isset_bitfield, __UID_ISSET_ID); + } + + public void setUidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID_ISSET_ID, value); + } + + public int getType() { + return this.type; + } + + public mathcRoomAdressInfo_args setType(int type) { + this.type = type; + setTypeIsSet(true); + return this; + } + + public void unsetType() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TYPE_ISSET_ID); + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return EncodingUtils.testBit(__isset_bitfield, __TYPE_ISSET_ID); + } + + public void setTypeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TYPE_ISSET_ID, value); + } + + public String getAddress() { + return this.address; + } + + public mathcRoomAdressInfo_args setAddress(String address) { + this.address = address; + return this; + } + + public void unsetAddress() { + this.address = null; + } + + /** Returns true if field address is set (has been assigned a value) and false otherwise */ + public boolean isSetAddress() { + return this.address != null; + } + + public void setAddressIsSet(boolean value) { + if (!value) { + this.address = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UID: + if (value == null) { + unsetUid(); + } else { + setUid((Integer)value); + } + break; + + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((Integer)value); + } + break; + + case ADDRESS: + if (value == null) { + unsetAddress(); + } else { + setAddress((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UID: + return Integer.valueOf(getUid()); + + case TYPE: + return Integer.valueOf(getType()); + + case ADDRESS: + return getAddress(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UID: + return isSetUid(); + case TYPE: + return isSetType(); + case ADDRESS: + return isSetAddress(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof mathcRoomAdressInfo_args) + return this.equals((mathcRoomAdressInfo_args)that); + return false; + } + + public boolean equals(mathcRoomAdressInfo_args that) { + if (that == null) + return false; + + boolean this_present_uid = true; + boolean that_present_uid = true; + if (this_present_uid || that_present_uid) { + if (!(this_present_uid && that_present_uid)) + return false; + if (this.uid != that.uid) + return false; + } + + boolean this_present_type = true; + boolean that_present_type = true; + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (this.type != that.type) + return false; + } + + boolean this_present_address = true && this.isSetAddress(); + boolean that_present_address = true && that.isSetAddress(); + if (this_present_address || that_present_address) { + if (!(this_present_address && that_present_address)) + return false; + if (!this.address.equals(that.address)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_uid = true; + list.add(present_uid); + if (present_uid) + list.add(uid); + + boolean present_type = true; + list.add(present_type); + if (present_type) + list.add(type); + + boolean present_address = true && (isSetAddress()); + list.add(present_address); + if (present_address) + list.add(address); + + return list.hashCode(); + } + + @Override + public int compareTo(mathcRoomAdressInfo_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uid, other.uid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAddress()).compareTo(other.isSetAddress()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAddress()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.address, other.address); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("mathcRoomAdressInfo_args("); + boolean first = true; + + sb.append("uid:"); + sb.append(this.uid); + first = false; + if (!first) sb.append(", "); + sb.append("type:"); + sb.append(this.type); + first = false; + if (!first) sb.append(", "); + sb.append("address:"); + if (this.address == null) { + sb.append("null"); + } else { + sb.append(this.address); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class mathcRoomAdressInfo_argsStandardSchemeFactory implements SchemeFactory { + public mathcRoomAdressInfo_argsStandardScheme getScheme() { + return new mathcRoomAdressInfo_argsStandardScheme(); + } + } + + private static class mathcRoomAdressInfo_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, mathcRoomAdressInfo_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // UID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.type = iprot.readI32(); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ADDRESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.address = iprot.readString(); + struct.setAddressIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, mathcRoomAdressInfo_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(UID_FIELD_DESC); + oprot.writeI32(struct.uid); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI32(struct.type); + oprot.writeFieldEnd(); + if (struct.address != null) { + oprot.writeFieldBegin(ADDRESS_FIELD_DESC); + oprot.writeString(struct.address); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class mathcRoomAdressInfo_argsTupleSchemeFactory implements SchemeFactory { + public mathcRoomAdressInfo_argsTupleScheme getScheme() { + return new mathcRoomAdressInfo_argsTupleScheme(); + } + } + + private static class mathcRoomAdressInfo_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, mathcRoomAdressInfo_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUid()) { + optionals.set(0); + } + if (struct.isSetType()) { + optionals.set(1); + } + if (struct.isSetAddress()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetUid()) { + oprot.writeI32(struct.uid); + } + if (struct.isSetType()) { + oprot.writeI32(struct.type); + } + if (struct.isSetAddress()) { + oprot.writeString(struct.address); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, mathcRoomAdressInfo_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } + if (incoming.get(1)) { + struct.type = iprot.readI32(); + struct.setTypeIsSet(true); + } + if (incoming.get(2)) { + struct.address = iprot.readString(); + struct.setAddressIsSet(true); + } + } + } + + } + + public static class mathcRoomAdressInfo_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mathcRoomAdressInfo_result"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new mathcRoomAdressInfo_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mathcRoomAdressInfo_resultTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mathcRoomAdressInfo_result.class, metaDataMap); + } + + public mathcRoomAdressInfo_result() { + } + + /** + * Performs a deep copy on other. + */ + public mathcRoomAdressInfo_result(mathcRoomAdressInfo_result other) { + } + + public mathcRoomAdressInfo_result deepCopy() { + return new mathcRoomAdressInfo_result(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof mathcRoomAdressInfo_result) + return this.equals((mathcRoomAdressInfo_result)that); + return false; + } + + public boolean equals(mathcRoomAdressInfo_result that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(mathcRoomAdressInfo_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("mathcRoomAdressInfo_result("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class mathcRoomAdressInfo_resultStandardSchemeFactory implements SchemeFactory { + public mathcRoomAdressInfo_resultStandardScheme getScheme() { + return new mathcRoomAdressInfo_resultStandardScheme(); + } + } + + private static class mathcRoomAdressInfo_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, mathcRoomAdressInfo_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, mathcRoomAdressInfo_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class mathcRoomAdressInfo_resultTupleSchemeFactory implements SchemeFactory { + public mathcRoomAdressInfo_resultTupleScheme getScheme() { + return new mathcRoomAdressInfo_resultTupleScheme(); + } + } + + private static class mathcRoomAdressInfo_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, mathcRoomAdressInfo_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, mathcRoomAdressInfo_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class sendMailToRole_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sendMailToRole_args"); + + private static final org.apache.thrift.protocol.TField UIDS_FIELD_DESC = new org.apache.thrift.protocol.TField("uids", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TITLE_FIELD_DESC = new org.apache.thrift.protocol.TField("title", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField CONTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("content", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField REWARD_FIELD_DESC = new org.apache.thrift.protocol.TField("reward", org.apache.thrift.protocol.TType.STRING, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new sendMailToRole_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new sendMailToRole_argsTupleSchemeFactory()); + } + + public String uids; // required + public String title; // required + public String content; // required + public String reward; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UIDS((short)1, "uids"), + TITLE((short)2, "title"), + CONTENT((short)3, "content"), + REWARD((short)4, "reward"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UIDS + return UIDS; + case 2: // TITLE + return TITLE; + case 3: // CONTENT + return CONTENT; + case 4: // REWARD + return REWARD; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.UIDS, new org.apache.thrift.meta_data.FieldMetaData("uids", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TITLE, new org.apache.thrift.meta_data.FieldMetaData("title", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CONTENT, new org.apache.thrift.meta_data.FieldMetaData("content", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.REWARD, new org.apache.thrift.meta_data.FieldMetaData("reward", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendMailToRole_args.class, metaDataMap); + } + + public sendMailToRole_args() { + } + + public sendMailToRole_args( + String uids, + String title, + String content, + String reward) + { + this(); + this.uids = uids; + this.title = title; + this.content = content; + this.reward = reward; + } + + /** + * Performs a deep copy on other. + */ + public sendMailToRole_args(sendMailToRole_args other) { + if (other.isSetUids()) { + this.uids = other.uids; + } + if (other.isSetTitle()) { + this.title = other.title; + } + if (other.isSetContent()) { + this.content = other.content; + } + if (other.isSetReward()) { + this.reward = other.reward; + } + } + + public sendMailToRole_args deepCopy() { + return new sendMailToRole_args(this); + } + + @Override + public void clear() { + this.uids = null; + this.title = null; + this.content = null; + this.reward = null; + } + + public String getUids() { + return this.uids; + } + + public sendMailToRole_args setUids(String uids) { + this.uids = uids; + return this; + } + + public void unsetUids() { + this.uids = null; + } + + /** Returns true if field uids is set (has been assigned a value) and false otherwise */ + public boolean isSetUids() { + return this.uids != null; + } + + public void setUidsIsSet(boolean value) { + if (!value) { + this.uids = null; + } + } + + public String getTitle() { + return this.title; + } + + public sendMailToRole_args setTitle(String title) { + this.title = title; + return this; + } + + public void unsetTitle() { + this.title = null; + } + + /** Returns true if field title is set (has been assigned a value) and false otherwise */ + public boolean isSetTitle() { + return this.title != null; + } + + public void setTitleIsSet(boolean value) { + if (!value) { + this.title = null; + } + } + + public String getContent() { + return this.content; + } + + public sendMailToRole_args setContent(String content) { + this.content = content; + return this; + } + + public void unsetContent() { + this.content = null; + } + + /** Returns true if field content is set (has been assigned a value) and false otherwise */ + public boolean isSetContent() { + return this.content != null; + } + + public void setContentIsSet(boolean value) { + if (!value) { + this.content = null; + } + } + + public String getReward() { + return this.reward; + } + + public sendMailToRole_args setReward(String reward) { + this.reward = reward; + return this; + } + + public void unsetReward() { + this.reward = null; + } + + /** Returns true if field reward is set (has been assigned a value) and false otherwise */ + public boolean isSetReward() { + return this.reward != null; + } + + public void setRewardIsSet(boolean value) { + if (!value) { + this.reward = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UIDS: + if (value == null) { + unsetUids(); + } else { + setUids((String)value); + } + break; + + case TITLE: + if (value == null) { + unsetTitle(); + } else { + setTitle((String)value); + } + break; + + case CONTENT: + if (value == null) { + unsetContent(); + } else { + setContent((String)value); + } + break; + + case REWARD: + if (value == null) { + unsetReward(); + } else { + setReward((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UIDS: + return getUids(); + + case TITLE: + return getTitle(); + + case CONTENT: + return getContent(); + + case REWARD: + return getReward(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UIDS: + return isSetUids(); + case TITLE: + return isSetTitle(); + case CONTENT: + return isSetContent(); + case REWARD: + return isSetReward(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof sendMailToRole_args) + return this.equals((sendMailToRole_args)that); + return false; + } + + public boolean equals(sendMailToRole_args that) { + if (that == null) + return false; + + boolean this_present_uids = true && this.isSetUids(); + boolean that_present_uids = true && that.isSetUids(); + if (this_present_uids || that_present_uids) { + if (!(this_present_uids && that_present_uids)) + return false; + if (!this.uids.equals(that.uids)) + return false; + } + + boolean this_present_title = true && this.isSetTitle(); + boolean that_present_title = true && that.isSetTitle(); + if (this_present_title || that_present_title) { + if (!(this_present_title && that_present_title)) + return false; + if (!this.title.equals(that.title)) + return false; + } + + boolean this_present_content = true && this.isSetContent(); + boolean that_present_content = true && that.isSetContent(); + if (this_present_content || that_present_content) { + if (!(this_present_content && that_present_content)) + return false; + if (!this.content.equals(that.content)) + return false; + } + + boolean this_present_reward = true && this.isSetReward(); + boolean that_present_reward = true && that.isSetReward(); + if (this_present_reward || that_present_reward) { + if (!(this_present_reward && that_present_reward)) + return false; + if (!this.reward.equals(that.reward)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_uids = true && (isSetUids()); + list.add(present_uids); + if (present_uids) + list.add(uids); + + boolean present_title = true && (isSetTitle()); + list.add(present_title); + if (present_title) + list.add(title); + + boolean present_content = true && (isSetContent()); + list.add(present_content); + if (present_content) + list.add(content); + + boolean present_reward = true && (isSetReward()); + list.add(present_reward); + if (present_reward) + list.add(reward); + + return list.hashCode(); + } + + @Override + public int compareTo(sendMailToRole_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUids()).compareTo(other.isSetUids()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUids()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uids, other.uids); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTitle()).compareTo(other.isSetTitle()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTitle()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.title, other.title); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetContent()).compareTo(other.isSetContent()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetContent()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.content, other.content); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetReward()).compareTo(other.isSetReward()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReward()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reward, other.reward); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("sendMailToRole_args("); + boolean first = true; + + sb.append("uids:"); + if (this.uids == null) { + sb.append("null"); + } else { + sb.append(this.uids); + } + first = false; + if (!first) sb.append(", "); + sb.append("title:"); + if (this.title == null) { + sb.append("null"); + } else { + sb.append(this.title); + } + first = false; + if (!first) sb.append(", "); + sb.append("content:"); + if (this.content == null) { + sb.append("null"); + } else { + sb.append(this.content); + } + first = false; + if (!first) sb.append(", "); + sb.append("reward:"); + if (this.reward == null) { + sb.append("null"); + } else { + sb.append(this.reward); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class sendMailToRole_argsStandardSchemeFactory implements SchemeFactory { + public sendMailToRole_argsStandardScheme getScheme() { + return new sendMailToRole_argsStandardScheme(); + } + } + + private static class sendMailToRole_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, sendMailToRole_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // UIDS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.uids = iprot.readString(); + struct.setUidsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TITLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.title = iprot.readString(); + struct.setTitleIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // CONTENT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.content = iprot.readString(); + struct.setContentIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // REWARD + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.reward = iprot.readString(); + struct.setRewardIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, sendMailToRole_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.uids != null) { + oprot.writeFieldBegin(UIDS_FIELD_DESC); + oprot.writeString(struct.uids); + oprot.writeFieldEnd(); + } + if (struct.title != null) { + oprot.writeFieldBegin(TITLE_FIELD_DESC); + oprot.writeString(struct.title); + oprot.writeFieldEnd(); + } + if (struct.content != null) { + oprot.writeFieldBegin(CONTENT_FIELD_DESC); + oprot.writeString(struct.content); + oprot.writeFieldEnd(); + } + if (struct.reward != null) { + oprot.writeFieldBegin(REWARD_FIELD_DESC); + oprot.writeString(struct.reward); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class sendMailToRole_argsTupleSchemeFactory implements SchemeFactory { + public sendMailToRole_argsTupleScheme getScheme() { + return new sendMailToRole_argsTupleScheme(); + } + } + + private static class sendMailToRole_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, sendMailToRole_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUids()) { + optionals.set(0); + } + if (struct.isSetTitle()) { + optionals.set(1); + } + if (struct.isSetContent()) { + optionals.set(2); + } + if (struct.isSetReward()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetUids()) { + oprot.writeString(struct.uids); + } + if (struct.isSetTitle()) { + oprot.writeString(struct.title); + } + if (struct.isSetContent()) { + oprot.writeString(struct.content); + } + if (struct.isSetReward()) { + oprot.writeString(struct.reward); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, sendMailToRole_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.uids = iprot.readString(); + struct.setUidsIsSet(true); + } + if (incoming.get(1)) { + struct.title = iprot.readString(); + struct.setTitleIsSet(true); + } + if (incoming.get(2)) { + struct.content = iprot.readString(); + struct.setContentIsSet(true); + } + if (incoming.get(3)) { + struct.reward = iprot.readString(); + struct.setRewardIsSet(true); + } + } + } + + } + + public static class sendMailToRole_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sendMailToRole_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new sendMailToRole_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new sendMailToRole_resultTupleSchemeFactory()); + } + + public Result success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Result.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendMailToRole_result.class, metaDataMap); + } + + public sendMailToRole_result() { + } + + public sendMailToRole_result( + Result success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public sendMailToRole_result(sendMailToRole_result other) { + if (other.isSetSuccess()) { + this.success = new Result(other.success); + } + } + + public sendMailToRole_result deepCopy() { + return new sendMailToRole_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public Result getSuccess() { + return this.success; + } + + public sendMailToRole_result setSuccess(Result success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Result)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof sendMailToRole_result) + return this.equals((sendMailToRole_result)that); + return false; + } + + public boolean equals(sendMailToRole_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(sendMailToRole_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("sendMailToRole_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class sendMailToRole_resultStandardSchemeFactory implements SchemeFactory { + public sendMailToRole_resultStandardScheme getScheme() { + return new sendMailToRole_resultStandardScheme(); + } + } + + private static class sendMailToRole_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, sendMailToRole_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, sendMailToRole_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class sendMailToRole_resultTupleSchemeFactory implements SchemeFactory { + public sendMailToRole_resultTupleScheme getScheme() { + return new sendMailToRole_resultTupleScheme(); + } + } + + private static class sendMailToRole_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, sendMailToRole_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, sendMailToRole_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class deliveryCoupon_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deliveryCoupon_args"); + + private static final org.apache.thrift.protocol.TField GAME_USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gameUserId", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField TITLE_FIELD_DESC = new org.apache.thrift.protocol.TField("title", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField CONTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("content", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField ORDER_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("orderTime", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.LIST, (short)6); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deliveryCoupon_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deliveryCoupon_argsTupleSchemeFactory()); + } + + public int gameUserId; // required + public String couponCode; // required + public String title; // required + public String content; // required + public long orderTime; // required + public List itemId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + GAME_USER_ID((short)1, "gameUserId"), + COUPON_CODE((short)2, "couponCode"), + TITLE((short)3, "title"), + CONTENT((short)4, "content"), + ORDER_TIME((short)5, "orderTime"), + ITEM_ID((short)6, "itemId"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // GAME_USER_ID + return GAME_USER_ID; + case 2: // COUPON_CODE + return COUPON_CODE; + case 3: // TITLE + return TITLE; + case 4: // CONTENT + return CONTENT; + case 5: // ORDER_TIME + return ORDER_TIME; + case 6: // ITEM_ID + return ITEM_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __GAMEUSERID_ISSET_ID = 0; + private static final int __ORDERTIME_ISSET_ID = 1; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.GAME_USER_ID, new org.apache.thrift.meta_data.FieldMetaData("gameUserId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TITLE, new org.apache.thrift.meta_data.FieldMetaData("title", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CONTENT, new org.apache.thrift.meta_data.FieldMetaData("content", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ORDER_TIME, new org.apache.thrift.meta_data.FieldMetaData("orderTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, itemData.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deliveryCoupon_args.class, metaDataMap); + } + + public deliveryCoupon_args() { + } + + public deliveryCoupon_args( + int gameUserId, + String couponCode, + String title, + String content, + long orderTime, + List itemId) + { + this(); + this.gameUserId = gameUserId; + setGameUserIdIsSet(true); + this.couponCode = couponCode; + this.title = title; + this.content = content; + this.orderTime = orderTime; + setOrderTimeIsSet(true); + this.itemId = itemId; + } + + /** + * Performs a deep copy on other. + */ + public deliveryCoupon_args(deliveryCoupon_args other) { + __isset_bitfield = other.__isset_bitfield; + this.gameUserId = other.gameUserId; + if (other.isSetCouponCode()) { + this.couponCode = other.couponCode; + } + if (other.isSetTitle()) { + this.title = other.title; + } + if (other.isSetContent()) { + this.content = other.content; + } + this.orderTime = other.orderTime; + if (other.isSetItemId()) { + List __this__itemId = new ArrayList(other.itemId.size()); + for (itemData other_element : other.itemId) { + __this__itemId.add(new itemData(other_element)); + } + this.itemId = __this__itemId; + } + } + + public deliveryCoupon_args deepCopy() { + return new deliveryCoupon_args(this); + } + + @Override + public void clear() { + setGameUserIdIsSet(false); + this.gameUserId = 0; + this.couponCode = null; + this.title = null; + this.content = null; + setOrderTimeIsSet(false); + this.orderTime = 0; + this.itemId = null; + } + + public int getGameUserId() { + return this.gameUserId; + } + + public deliveryCoupon_args setGameUserId(int gameUserId) { + this.gameUserId = gameUserId; + setGameUserIdIsSet(true); + return this; + } + + public void unsetGameUserId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GAMEUSERID_ISSET_ID); + } + + /** Returns true if field gameUserId is set (has been assigned a value) and false otherwise */ + public boolean isSetGameUserId() { + return EncodingUtils.testBit(__isset_bitfield, __GAMEUSERID_ISSET_ID); + } + + public void setGameUserIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GAMEUSERID_ISSET_ID, value); + } + + public String getCouponCode() { + return this.couponCode; + } + + public deliveryCoupon_args setCouponCode(String couponCode) { + this.couponCode = couponCode; + return this; + } + + public void unsetCouponCode() { + this.couponCode = null; + } + + /** Returns true if field couponCode is set (has been assigned a value) and false otherwise */ + public boolean isSetCouponCode() { + return this.couponCode != null; + } + + public void setCouponCodeIsSet(boolean value) { + if (!value) { + this.couponCode = null; + } + } + + public String getTitle() { + return this.title; + } + + public deliveryCoupon_args setTitle(String title) { + this.title = title; + return this; + } + + public void unsetTitle() { + this.title = null; + } + + /** Returns true if field title is set (has been assigned a value) and false otherwise */ + public boolean isSetTitle() { + return this.title != null; + } + + public void setTitleIsSet(boolean value) { + if (!value) { + this.title = null; + } + } + + public String getContent() { + return this.content; + } + + public deliveryCoupon_args setContent(String content) { + this.content = content; + return this; + } + + public void unsetContent() { + this.content = null; + } + + /** Returns true if field content is set (has been assigned a value) and false otherwise */ + public boolean isSetContent() { + return this.content != null; + } + + public void setContentIsSet(boolean value) { + if (!value) { + this.content = null; + } + } + + public long getOrderTime() { + return this.orderTime; + } + + public deliveryCoupon_args setOrderTime(long orderTime) { + this.orderTime = orderTime; + setOrderTimeIsSet(true); + return this; + } + + public void unsetOrderTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ORDERTIME_ISSET_ID); + } + + /** Returns true if field orderTime is set (has been assigned a value) and false otherwise */ + public boolean isSetOrderTime() { + return EncodingUtils.testBit(__isset_bitfield, __ORDERTIME_ISSET_ID); + } + + public void setOrderTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ORDERTIME_ISSET_ID, value); + } + + public int getItemIdSize() { + return (this.itemId == null) ? 0 : this.itemId.size(); + } + + public java.util.Iterator getItemIdIterator() { + return (this.itemId == null) ? null : this.itemId.iterator(); + } + + public void addToItemId(itemData elem) { + if (this.itemId == null) { + this.itemId = new ArrayList(); + } + this.itemId.add(elem); + } + + public List getItemId() { + return this.itemId; + } + + public deliveryCoupon_args setItemId(List itemId) { + this.itemId = itemId; + return this; + } + + public void unsetItemId() { + this.itemId = null; + } + + /** Returns true if field itemId is set (has been assigned a value) and false otherwise */ + public boolean isSetItemId() { + return this.itemId != null; + } + + public void setItemIdIsSet(boolean value) { + if (!value) { + this.itemId = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case GAME_USER_ID: + if (value == null) { + unsetGameUserId(); + } else { + setGameUserId((Integer)value); + } + break; + + case COUPON_CODE: + if (value == null) { + unsetCouponCode(); + } else { + setCouponCode((String)value); + } + break; + + case TITLE: + if (value == null) { + unsetTitle(); + } else { + setTitle((String)value); + } + break; + + case CONTENT: + if (value == null) { + unsetContent(); + } else { + setContent((String)value); + } + break; + + case ORDER_TIME: + if (value == null) { + unsetOrderTime(); + } else { + setOrderTime((Long)value); + } + break; + + case ITEM_ID: + if (value == null) { + unsetItemId(); + } else { + setItemId((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case GAME_USER_ID: + return Integer.valueOf(getGameUserId()); + + case COUPON_CODE: + return getCouponCode(); + + case TITLE: + return getTitle(); + + case CONTENT: + return getContent(); + + case ORDER_TIME: + return Long.valueOf(getOrderTime()); + + case ITEM_ID: + return getItemId(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case GAME_USER_ID: + return isSetGameUserId(); + case COUPON_CODE: + return isSetCouponCode(); + case TITLE: + return isSetTitle(); + case CONTENT: + return isSetContent(); + case ORDER_TIME: + return isSetOrderTime(); + case ITEM_ID: + return isSetItemId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deliveryCoupon_args) + return this.equals((deliveryCoupon_args)that); + return false; + } + + public boolean equals(deliveryCoupon_args that) { + if (that == null) + return false; + + boolean this_present_gameUserId = true; + boolean that_present_gameUserId = true; + if (this_present_gameUserId || that_present_gameUserId) { + if (!(this_present_gameUserId && that_present_gameUserId)) + return false; + if (this.gameUserId != that.gameUserId) + return false; + } + + boolean this_present_couponCode = true && this.isSetCouponCode(); + boolean that_present_couponCode = true && that.isSetCouponCode(); + if (this_present_couponCode || that_present_couponCode) { + if (!(this_present_couponCode && that_present_couponCode)) + return false; + if (!this.couponCode.equals(that.couponCode)) + return false; + } + + boolean this_present_title = true && this.isSetTitle(); + boolean that_present_title = true && that.isSetTitle(); + if (this_present_title || that_present_title) { + if (!(this_present_title && that_present_title)) + return false; + if (!this.title.equals(that.title)) + return false; + } + + boolean this_present_content = true && this.isSetContent(); + boolean that_present_content = true && that.isSetContent(); + if (this_present_content || that_present_content) { + if (!(this_present_content && that_present_content)) + return false; + if (!this.content.equals(that.content)) + return false; + } + + boolean this_present_orderTime = true; + boolean that_present_orderTime = true; + if (this_present_orderTime || that_present_orderTime) { + if (!(this_present_orderTime && that_present_orderTime)) + return false; + if (this.orderTime != that.orderTime) + return false; + } + + boolean this_present_itemId = true && this.isSetItemId(); + boolean that_present_itemId = true && that.isSetItemId(); + if (this_present_itemId || that_present_itemId) { + if (!(this_present_itemId && that_present_itemId)) + return false; + if (!this.itemId.equals(that.itemId)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_gameUserId = true; + list.add(present_gameUserId); + if (present_gameUserId) + list.add(gameUserId); + + boolean present_couponCode = true && (isSetCouponCode()); + list.add(present_couponCode); + if (present_couponCode) + list.add(couponCode); + + boolean present_title = true && (isSetTitle()); + list.add(present_title); + if (present_title) + list.add(title); + + boolean present_content = true && (isSetContent()); + list.add(present_content); + if (present_content) + list.add(content); + + boolean present_orderTime = true; + list.add(present_orderTime); + if (present_orderTime) + list.add(orderTime); + + boolean present_itemId = true && (isSetItemId()); + list.add(present_itemId); + if (present_itemId) + list.add(itemId); + + return list.hashCode(); + } + + @Override + public int compareTo(deliveryCoupon_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetGameUserId()).compareTo(other.isSetGameUserId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGameUserId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gameUserId, other.gameUserId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(other.isSetCouponCode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCouponCode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, other.couponCode); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTitle()).compareTo(other.isSetTitle()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTitle()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.title, other.title); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetContent()).compareTo(other.isSetContent()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetContent()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.content, other.content); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOrderTime()).compareTo(other.isSetOrderTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOrderTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderTime, other.orderTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetItemId()).compareTo(other.isSetItemId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetItemId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, other.itemId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deliveryCoupon_args("); + boolean first = true; + + sb.append("gameUserId:"); + sb.append(this.gameUserId); + first = false; + if (!first) sb.append(", "); + sb.append("couponCode:"); + if (this.couponCode == null) { + sb.append("null"); + } else { + sb.append(this.couponCode); + } + first = false; + if (!first) sb.append(", "); + sb.append("title:"); + if (this.title == null) { + sb.append("null"); + } else { + sb.append(this.title); + } + first = false; + if (!first) sb.append(", "); + sb.append("content:"); + if (this.content == null) { + sb.append("null"); + } else { + sb.append(this.content); + } + first = false; + if (!first) sb.append(", "); + sb.append("orderTime:"); + sb.append(this.orderTime); + first = false; + if (!first) sb.append(", "); + sb.append("itemId:"); + if (this.itemId == null) { + sb.append("null"); + } else { + sb.append(this.itemId); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deliveryCoupon_argsStandardSchemeFactory implements SchemeFactory { + public deliveryCoupon_argsStandardScheme getScheme() { + return new deliveryCoupon_argsStandardScheme(); + } + } + + private static class deliveryCoupon_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deliveryCoupon_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // GAME_USER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.gameUserId = iprot.readI32(); + struct.setGameUserIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // COUPON_CODE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.couponCode = iprot.readString(); + struct.setCouponCodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TITLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.title = iprot.readString(); + struct.setTitleIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // CONTENT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.content = iprot.readString(); + struct.setContentIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // ORDER_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.orderTime = iprot.readI64(); + struct.setOrderTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // ITEM_ID + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); + struct.itemId = new ArrayList(_list8.size); + itemData _elem9; + for (int _i10 = 0; _i10 < _list8.size; ++_i10) + { + _elem9 = new itemData(); + _elem9.read(iprot); + struct.itemId.add(_elem9); + } + iprot.readListEnd(); + } + struct.setItemIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deliveryCoupon_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(GAME_USER_ID_FIELD_DESC); + oprot.writeI32(struct.gameUserId); + oprot.writeFieldEnd(); + if (struct.couponCode != null) { + oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC); + oprot.writeString(struct.couponCode); + oprot.writeFieldEnd(); + } + if (struct.title != null) { + oprot.writeFieldBegin(TITLE_FIELD_DESC); + oprot.writeString(struct.title); + oprot.writeFieldEnd(); + } + if (struct.content != null) { + oprot.writeFieldBegin(CONTENT_FIELD_DESC); + oprot.writeString(struct.content); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(ORDER_TIME_FIELD_DESC); + oprot.writeI64(struct.orderTime); + oprot.writeFieldEnd(); + if (struct.itemId != null) { + oprot.writeFieldBegin(ITEM_ID_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.itemId.size())); + for (itemData _iter11 : struct.itemId) + { + _iter11.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deliveryCoupon_argsTupleSchemeFactory implements SchemeFactory { + public deliveryCoupon_argsTupleScheme getScheme() { + return new deliveryCoupon_argsTupleScheme(); + } + } + + private static class deliveryCoupon_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deliveryCoupon_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetGameUserId()) { + optionals.set(0); + } + if (struct.isSetCouponCode()) { + optionals.set(1); + } + if (struct.isSetTitle()) { + optionals.set(2); + } + if (struct.isSetContent()) { + optionals.set(3); + } + if (struct.isSetOrderTime()) { + optionals.set(4); + } + if (struct.isSetItemId()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetGameUserId()) { + oprot.writeI32(struct.gameUserId); + } + if (struct.isSetCouponCode()) { + oprot.writeString(struct.couponCode); + } + if (struct.isSetTitle()) { + oprot.writeString(struct.title); + } + if (struct.isSetContent()) { + oprot.writeString(struct.content); + } + if (struct.isSetOrderTime()) { + oprot.writeI64(struct.orderTime); + } + if (struct.isSetItemId()) { + { + oprot.writeI32(struct.itemId.size()); + for (itemData _iter12 : struct.itemId) + { + _iter12.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deliveryCoupon_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.gameUserId = iprot.readI32(); + struct.setGameUserIdIsSet(true); + } + if (incoming.get(1)) { + struct.couponCode = iprot.readString(); + struct.setCouponCodeIsSet(true); + } + if (incoming.get(2)) { + struct.title = iprot.readString(); + struct.setTitleIsSet(true); + } + if (incoming.get(3)) { + struct.content = iprot.readString(); + struct.setContentIsSet(true); + } + if (incoming.get(4)) { + struct.orderTime = iprot.readI64(); + struct.setOrderTimeIsSet(true); + } + if (incoming.get(5)) { + { + org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.itemId = new ArrayList(_list13.size); + itemData _elem14; + for (int _i15 = 0; _i15 < _list13.size; ++_i15) + { + _elem14 = new itemData(); + _elem14.read(iprot); + struct.itemId.add(_elem14); + } + } + struct.setItemIdIsSet(true); + } + } + } + + } + + public static class deliveryCoupon_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deliveryCoupon_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deliveryCoupon_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deliveryCoupon_resultTupleSchemeFactory()); + } + + public Result success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Result.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deliveryCoupon_result.class, metaDataMap); + } + + public deliveryCoupon_result() { + } + + public deliveryCoupon_result( + Result success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public deliveryCoupon_result(deliveryCoupon_result other) { + if (other.isSetSuccess()) { + this.success = new Result(other.success); + } + } + + public deliveryCoupon_result deepCopy() { + return new deliveryCoupon_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public Result getSuccess() { + return this.success; + } + + public deliveryCoupon_result setSuccess(Result success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Result)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deliveryCoupon_result) + return this.equals((deliveryCoupon_result)that); + return false; + } + + public boolean equals(deliveryCoupon_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(deliveryCoupon_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deliveryCoupon_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deliveryCoupon_resultStandardSchemeFactory implements SchemeFactory { + public deliveryCoupon_resultStandardScheme getScheme() { + return new deliveryCoupon_resultStandardScheme(); + } + } + + private static class deliveryCoupon_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deliveryCoupon_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deliveryCoupon_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deliveryCoupon_resultTupleSchemeFactory implements SchemeFactory { + public deliveryCoupon_resultTupleScheme getScheme() { + return new deliveryCoupon_resultTupleScheme(); + } + } + + private static class deliveryCoupon_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deliveryCoupon_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deliveryCoupon_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class deliveryOrder_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deliveryOrder_args"); + + private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("uid", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField GOODS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("goodsId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField ORDER_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("orderTime", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField DEVALUE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("devalueId", org.apache.thrift.protocol.TType.I32, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deliveryOrder_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deliveryOrder_argsTupleSchemeFactory()); + } + + public int uid; // required + public String goodsId; // required + public long orderTime; // required + public String orderId; // required + public int devalueId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UID((short)1, "uid"), + GOODS_ID((short)2, "goodsId"), + ORDER_TIME((short)3, "orderTime"), + ORDER_ID((short)4, "orderId"), + DEVALUE_ID((short)5, "devalueId"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UID + return UID; + case 2: // GOODS_ID + return GOODS_ID; + case 3: // ORDER_TIME + return ORDER_TIME; + case 4: // ORDER_ID + return ORDER_ID; + case 5: // DEVALUE_ID + return DEVALUE_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __UID_ISSET_ID = 0; + private static final int __ORDERTIME_ISSET_ID = 1; + private static final int __DEVALUEID_ISSET_ID = 2; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("uid", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.GOODS_ID, new org.apache.thrift.meta_data.FieldMetaData("goodsId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ORDER_TIME, new org.apache.thrift.meta_data.FieldMetaData("orderTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DEVALUE_ID, new org.apache.thrift.meta_data.FieldMetaData("devalueId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deliveryOrder_args.class, metaDataMap); + } + + public deliveryOrder_args() { + } + + public deliveryOrder_args( + int uid, + String goodsId, + long orderTime, + String orderId, + int devalueId) + { + this(); + this.uid = uid; + setUidIsSet(true); + this.goodsId = goodsId; + this.orderTime = orderTime; + setOrderTimeIsSet(true); + this.orderId = orderId; + this.devalueId = devalueId; + setDevalueIdIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public deliveryOrder_args(deliveryOrder_args other) { + __isset_bitfield = other.__isset_bitfield; + this.uid = other.uid; + if (other.isSetGoodsId()) { + this.goodsId = other.goodsId; + } + this.orderTime = other.orderTime; + if (other.isSetOrderId()) { + this.orderId = other.orderId; + } + this.devalueId = other.devalueId; + } + + public deliveryOrder_args deepCopy() { + return new deliveryOrder_args(this); + } + + @Override + public void clear() { + setUidIsSet(false); + this.uid = 0; + this.goodsId = null; + setOrderTimeIsSet(false); + this.orderTime = 0; + this.orderId = null; + setDevalueIdIsSet(false); + this.devalueId = 0; + } + + public int getUid() { + return this.uid; + } + + public deliveryOrder_args setUid(int uid) { + this.uid = uid; + setUidIsSet(true); + return this; + } + + public void unsetUid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UID_ISSET_ID); + } + + /** Returns true if field uid is set (has been assigned a value) and false otherwise */ + public boolean isSetUid() { + return EncodingUtils.testBit(__isset_bitfield, __UID_ISSET_ID); + } + + public void setUidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID_ISSET_ID, value); + } + + public String getGoodsId() { + return this.goodsId; + } + + public deliveryOrder_args setGoodsId(String goodsId) { + this.goodsId = goodsId; + return this; + } + + public void unsetGoodsId() { + this.goodsId = null; + } + + /** Returns true if field goodsId is set (has been assigned a value) and false otherwise */ + public boolean isSetGoodsId() { + return this.goodsId != null; + } + + public void setGoodsIdIsSet(boolean value) { + if (!value) { + this.goodsId = null; + } + } + + public long getOrderTime() { + return this.orderTime; + } + + public deliveryOrder_args setOrderTime(long orderTime) { + this.orderTime = orderTime; + setOrderTimeIsSet(true); + return this; + } + + public void unsetOrderTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ORDERTIME_ISSET_ID); + } + + /** Returns true if field orderTime is set (has been assigned a value) and false otherwise */ + public boolean isSetOrderTime() { + return EncodingUtils.testBit(__isset_bitfield, __ORDERTIME_ISSET_ID); + } + + public void setOrderTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ORDERTIME_ISSET_ID, value); + } + + public String getOrderId() { + return this.orderId; + } + + public deliveryOrder_args setOrderId(String orderId) { + this.orderId = orderId; + return this; + } + + public void unsetOrderId() { + this.orderId = null; + } + + /** Returns true if field orderId is set (has been assigned a value) and false otherwise */ + public boolean isSetOrderId() { + return this.orderId != null; + } + + public void setOrderIdIsSet(boolean value) { + if (!value) { + this.orderId = null; + } + } + + public int getDevalueId() { + return this.devalueId; + } + + public deliveryOrder_args setDevalueId(int devalueId) { + this.devalueId = devalueId; + setDevalueIdIsSet(true); + return this; + } + + public void unsetDevalueId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEVALUEID_ISSET_ID); + } + + /** Returns true if field devalueId is set (has been assigned a value) and false otherwise */ + public boolean isSetDevalueId() { + return EncodingUtils.testBit(__isset_bitfield, __DEVALUEID_ISSET_ID); + } + + public void setDevalueIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEVALUEID_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UID: + if (value == null) { + unsetUid(); + } else { + setUid((Integer)value); + } + break; + + case GOODS_ID: + if (value == null) { + unsetGoodsId(); + } else { + setGoodsId((String)value); + } + break; + + case ORDER_TIME: + if (value == null) { + unsetOrderTime(); + } else { + setOrderTime((Long)value); + } + break; + + case ORDER_ID: + if (value == null) { + unsetOrderId(); + } else { + setOrderId((String)value); + } + break; + + case DEVALUE_ID: + if (value == null) { + unsetDevalueId(); + } else { + setDevalueId((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UID: + return Integer.valueOf(getUid()); + + case GOODS_ID: + return getGoodsId(); + + case ORDER_TIME: + return Long.valueOf(getOrderTime()); + + case ORDER_ID: + return getOrderId(); + + case DEVALUE_ID: + return Integer.valueOf(getDevalueId()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UID: + return isSetUid(); + case GOODS_ID: + return isSetGoodsId(); + case ORDER_TIME: + return isSetOrderTime(); + case ORDER_ID: + return isSetOrderId(); + case DEVALUE_ID: + return isSetDevalueId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deliveryOrder_args) + return this.equals((deliveryOrder_args)that); + return false; + } + + public boolean equals(deliveryOrder_args that) { + if (that == null) + return false; + + boolean this_present_uid = true; + boolean that_present_uid = true; + if (this_present_uid || that_present_uid) { + if (!(this_present_uid && that_present_uid)) + return false; + if (this.uid != that.uid) + return false; + } + + boolean this_present_goodsId = true && this.isSetGoodsId(); + boolean that_present_goodsId = true && that.isSetGoodsId(); + if (this_present_goodsId || that_present_goodsId) { + if (!(this_present_goodsId && that_present_goodsId)) + return false; + if (!this.goodsId.equals(that.goodsId)) + return false; + } + + boolean this_present_orderTime = true; + boolean that_present_orderTime = true; + if (this_present_orderTime || that_present_orderTime) { + if (!(this_present_orderTime && that_present_orderTime)) + return false; + if (this.orderTime != that.orderTime) + return false; + } + + boolean this_present_orderId = true && this.isSetOrderId(); + boolean that_present_orderId = true && that.isSetOrderId(); + if (this_present_orderId || that_present_orderId) { + if (!(this_present_orderId && that_present_orderId)) + return false; + if (!this.orderId.equals(that.orderId)) + return false; + } + + boolean this_present_devalueId = true; + boolean that_present_devalueId = true; + if (this_present_devalueId || that_present_devalueId) { + if (!(this_present_devalueId && that_present_devalueId)) + return false; + if (this.devalueId != that.devalueId) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_uid = true; + list.add(present_uid); + if (present_uid) + list.add(uid); + + boolean present_goodsId = true && (isSetGoodsId()); + list.add(present_goodsId); + if (present_goodsId) + list.add(goodsId); + + boolean present_orderTime = true; + list.add(present_orderTime); + if (present_orderTime) + list.add(orderTime); + + boolean present_orderId = true && (isSetOrderId()); + list.add(present_orderId); + if (present_orderId) + list.add(orderId); + + boolean present_devalueId = true; + list.add(present_devalueId); + if (present_devalueId) + list.add(devalueId); + + return list.hashCode(); + } + + @Override + public int compareTo(deliveryOrder_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uid, other.uid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGoodsId()).compareTo(other.isSetGoodsId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGoodsId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.goodsId, other.goodsId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOrderTime()).compareTo(other.isSetOrderTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOrderTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderTime, other.orderTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(other.isSetOrderId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOrderId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, other.orderId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDevalueId()).compareTo(other.isSetDevalueId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDevalueId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.devalueId, other.devalueId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deliveryOrder_args("); + boolean first = true; + + sb.append("uid:"); + sb.append(this.uid); + first = false; + if (!first) sb.append(", "); + sb.append("goodsId:"); + if (this.goodsId == null) { + sb.append("null"); + } else { + sb.append(this.goodsId); + } + first = false; + if (!first) sb.append(", "); + sb.append("orderTime:"); + sb.append(this.orderTime); + first = false; + if (!first) sb.append(", "); + sb.append("orderId:"); + if (this.orderId == null) { + sb.append("null"); + } else { + sb.append(this.orderId); + } + first = false; + if (!first) sb.append(", "); + sb.append("devalueId:"); + sb.append(this.devalueId); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deliveryOrder_argsStandardSchemeFactory implements SchemeFactory { + public deliveryOrder_argsStandardScheme getScheme() { + return new deliveryOrder_argsStandardScheme(); + } + } + + private static class deliveryOrder_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deliveryOrder_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // UID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // GOODS_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.goodsId = iprot.readString(); + struct.setGoodsIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ORDER_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.orderTime = iprot.readI64(); + struct.setOrderTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ORDER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.orderId = iprot.readString(); + struct.setOrderIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // DEVALUE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.devalueId = iprot.readI32(); + struct.setDevalueIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deliveryOrder_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(UID_FIELD_DESC); + oprot.writeI32(struct.uid); + oprot.writeFieldEnd(); + if (struct.goodsId != null) { + oprot.writeFieldBegin(GOODS_ID_FIELD_DESC); + oprot.writeString(struct.goodsId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(ORDER_TIME_FIELD_DESC); + oprot.writeI64(struct.orderTime); + oprot.writeFieldEnd(); + if (struct.orderId != null) { + oprot.writeFieldBegin(ORDER_ID_FIELD_DESC); + oprot.writeString(struct.orderId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DEVALUE_ID_FIELD_DESC); + oprot.writeI32(struct.devalueId); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deliveryOrder_argsTupleSchemeFactory implements SchemeFactory { + public deliveryOrder_argsTupleScheme getScheme() { + return new deliveryOrder_argsTupleScheme(); + } + } + + private static class deliveryOrder_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deliveryOrder_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUid()) { + optionals.set(0); + } + if (struct.isSetGoodsId()) { + optionals.set(1); + } + if (struct.isSetOrderTime()) { + optionals.set(2); + } + if (struct.isSetOrderId()) { + optionals.set(3); + } + if (struct.isSetDevalueId()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetUid()) { + oprot.writeI32(struct.uid); + } + if (struct.isSetGoodsId()) { + oprot.writeString(struct.goodsId); + } + if (struct.isSetOrderTime()) { + oprot.writeI64(struct.orderTime); + } + if (struct.isSetOrderId()) { + oprot.writeString(struct.orderId); + } + if (struct.isSetDevalueId()) { + oprot.writeI32(struct.devalueId); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deliveryOrder_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } + if (incoming.get(1)) { + struct.goodsId = iprot.readString(); + struct.setGoodsIdIsSet(true); + } + if (incoming.get(2)) { + struct.orderTime = iprot.readI64(); + struct.setOrderTimeIsSet(true); + } + if (incoming.get(3)) { + struct.orderId = iprot.readString(); + struct.setOrderIdIsSet(true); + } + if (incoming.get(4)) { + struct.devalueId = iprot.readI32(); + struct.setDevalueIdIsSet(true); + } + } + } + + } + + public static class deliveryOrder_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deliveryOrder_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deliveryOrder_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deliveryOrder_resultTupleSchemeFactory()); + } + + public Result success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Result.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deliveryOrder_result.class, metaDataMap); + } + + public deliveryOrder_result() { + } + + public deliveryOrder_result( + Result success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public deliveryOrder_result(deliveryOrder_result other) { + if (other.isSetSuccess()) { + this.success = new Result(other.success); + } + } + + public deliveryOrder_result deepCopy() { + return new deliveryOrder_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public Result getSuccess() { + return this.success; + } + + public deliveryOrder_result setSuccess(Result success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Result)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deliveryOrder_result) + return this.equals((deliveryOrder_result)that); + return false; + } + + public boolean equals(deliveryOrder_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(deliveryOrder_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deliveryOrder_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deliveryOrder_resultStandardSchemeFactory implements SchemeFactory { + public deliveryOrder_resultStandardScheme getScheme() { + return new deliveryOrder_resultStandardScheme(); + } + } + + private static class deliveryOrder_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deliveryOrder_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deliveryOrder_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deliveryOrder_resultTupleSchemeFactory implements SchemeFactory { + public deliveryOrder_resultTupleScheme getScheme() { + return new deliveryOrder_resultTupleScheme(); + } + } + + private static class deliveryOrder_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deliveryOrder_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deliveryOrder_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class operateUser_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("operateUser_args"); + + private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("uid", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField OP_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("opStatus", org.apache.thrift.protocol.TType.I32, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new operateUser_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new operateUser_argsTupleSchemeFactory()); + } + + public int uid; // required + public int opStatus; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UID((short)1, "uid"), + OP_STATUS((short)2, "opStatus"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UID + return UID; + case 2: // OP_STATUS + return OP_STATUS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __UID_ISSET_ID = 0; + private static final int __OPSTATUS_ISSET_ID = 1; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("uid", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.OP_STATUS, new org.apache.thrift.meta_data.FieldMetaData("opStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(operateUser_args.class, metaDataMap); + } + + public operateUser_args() { + } + + public operateUser_args( + int uid, + int opStatus) + { + this(); + this.uid = uid; + setUidIsSet(true); + this.opStatus = opStatus; + setOpStatusIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public operateUser_args(operateUser_args other) { + __isset_bitfield = other.__isset_bitfield; + this.uid = other.uid; + this.opStatus = other.opStatus; + } + + public operateUser_args deepCopy() { + return new operateUser_args(this); + } + + @Override + public void clear() { + setUidIsSet(false); + this.uid = 0; + setOpStatusIsSet(false); + this.opStatus = 0; + } + + public int getUid() { + return this.uid; + } + + public operateUser_args setUid(int uid) { + this.uid = uid; + setUidIsSet(true); + return this; + } + + public void unsetUid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UID_ISSET_ID); + } + + /** Returns true if field uid is set (has been assigned a value) and false otherwise */ + public boolean isSetUid() { + return EncodingUtils.testBit(__isset_bitfield, __UID_ISSET_ID); + } + + public void setUidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID_ISSET_ID, value); + } + + public int getOpStatus() { + return this.opStatus; + } + + public operateUser_args setOpStatus(int opStatus) { + this.opStatus = opStatus; + setOpStatusIsSet(true); + return this; + } + + public void unsetOpStatus() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OPSTATUS_ISSET_ID); + } + + /** Returns true if field opStatus is set (has been assigned a value) and false otherwise */ + public boolean isSetOpStatus() { + return EncodingUtils.testBit(__isset_bitfield, __OPSTATUS_ISSET_ID); + } + + public void setOpStatusIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OPSTATUS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UID: + if (value == null) { + unsetUid(); + } else { + setUid((Integer)value); + } + break; + + case OP_STATUS: + if (value == null) { + unsetOpStatus(); + } else { + setOpStatus((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UID: + return Integer.valueOf(getUid()); + + case OP_STATUS: + return Integer.valueOf(getOpStatus()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UID: + return isSetUid(); + case OP_STATUS: + return isSetOpStatus(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof operateUser_args) + return this.equals((operateUser_args)that); + return false; + } + + public boolean equals(operateUser_args that) { + if (that == null) + return false; + + boolean this_present_uid = true; + boolean that_present_uid = true; + if (this_present_uid || that_present_uid) { + if (!(this_present_uid && that_present_uid)) + return false; + if (this.uid != that.uid) + return false; + } + + boolean this_present_opStatus = true; + boolean that_present_opStatus = true; + if (this_present_opStatus || that_present_opStatus) { + if (!(this_present_opStatus && that_present_opStatus)) + return false; + if (this.opStatus != that.opStatus) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_uid = true; + list.add(present_uid); + if (present_uid) + list.add(uid); + + boolean present_opStatus = true; + list.add(present_opStatus); + if (present_opStatus) + list.add(opStatus); + + return list.hashCode(); + } + + @Override + public int compareTo(operateUser_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uid, other.uid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOpStatus()).compareTo(other.isSetOpStatus()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOpStatus()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.opStatus, other.opStatus); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("operateUser_args("); + boolean first = true; + + sb.append("uid:"); + sb.append(this.uid); + first = false; + if (!first) sb.append(", "); + sb.append("opStatus:"); + sb.append(this.opStatus); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class operateUser_argsStandardSchemeFactory implements SchemeFactory { + public operateUser_argsStandardScheme getScheme() { + return new operateUser_argsStandardScheme(); + } + } + + private static class operateUser_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, operateUser_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // UID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // OP_STATUS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.opStatus = iprot.readI32(); + struct.setOpStatusIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, operateUser_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(UID_FIELD_DESC); + oprot.writeI32(struct.uid); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(OP_STATUS_FIELD_DESC); + oprot.writeI32(struct.opStatus); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class operateUser_argsTupleSchemeFactory implements SchemeFactory { + public operateUser_argsTupleScheme getScheme() { + return new operateUser_argsTupleScheme(); + } + } + + private static class operateUser_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, operateUser_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUid()) { + optionals.set(0); + } + if (struct.isSetOpStatus()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUid()) { + oprot.writeI32(struct.uid); + } + if (struct.isSetOpStatus()) { + oprot.writeI32(struct.opStatus); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, operateUser_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } + if (incoming.get(1)) { + struct.opStatus = iprot.readI32(); + struct.setOpStatusIsSet(true); + } + } + } + + } + + public static class operateUser_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("operateUser_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new operateUser_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new operateUser_resultTupleSchemeFactory()); + } + + public Result success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Result.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(operateUser_result.class, metaDataMap); + } + + public operateUser_result() { + } + + public operateUser_result( + Result success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public operateUser_result(operateUser_result other) { + if (other.isSetSuccess()) { + this.success = new Result(other.success); + } + } + + public operateUser_result deepCopy() { + return new operateUser_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public Result getSuccess() { + return this.success; + } + + public operateUser_result setSuccess(Result success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Result)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof operateUser_result) + return this.equals((operateUser_result)that); + return false; + } + + public boolean equals(operateUser_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(operateUser_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("operateUser_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class operateUser_resultStandardSchemeFactory implements SchemeFactory { + public operateUser_resultStandardScheme getScheme() { + return new operateUser_resultStandardScheme(); + } + } + + private static class operateUser_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, operateUser_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, operateUser_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class operateUser_resultTupleSchemeFactory implements SchemeFactory { + public operateUser_resultTupleScheme getScheme() { + return new operateUser_resultTupleScheme(); + } + } + + private static class operateUser_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, operateUser_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, operateUser_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class getItemConfigs_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemConfigs_args"); + + private static final org.apache.thrift.protocol.TField ITEM_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("itemIds", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getItemConfigs_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getItemConfigs_argsTupleSchemeFactory()); + } + + public List itemIds; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ITEM_IDS((short)1, "itemIds"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ITEM_IDS + return ITEM_IDS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ITEM_IDS, new org.apache.thrift.meta_data.FieldMetaData("itemIds", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemConfigs_args.class, metaDataMap); + } + + public getItemConfigs_args() { + } + + public getItemConfigs_args( + List itemIds) + { + this(); + this.itemIds = itemIds; + } + + /** + * Performs a deep copy on other. + */ + public getItemConfigs_args(getItemConfigs_args other) { + if (other.isSetItemIds()) { + List __this__itemIds = new ArrayList(other.itemIds); + this.itemIds = __this__itemIds; + } + } + + public getItemConfigs_args deepCopy() { + return new getItemConfigs_args(this); + } + + @Override + public void clear() { + this.itemIds = null; + } + + public int getItemIdsSize() { + return (this.itemIds == null) ? 0 : this.itemIds.size(); + } + + public java.util.Iterator getItemIdsIterator() { + return (this.itemIds == null) ? null : this.itemIds.iterator(); + } + + public void addToItemIds(String elem) { + if (this.itemIds == null) { + this.itemIds = new ArrayList(); + } + this.itemIds.add(elem); + } + + public List getItemIds() { + return this.itemIds; + } + + public getItemConfigs_args setItemIds(List itemIds) { + this.itemIds = itemIds; + return this; + } + + public void unsetItemIds() { + this.itemIds = null; + } + + /** Returns true if field itemIds is set (has been assigned a value) and false otherwise */ + public boolean isSetItemIds() { + return this.itemIds != null; + } + + public void setItemIdsIsSet(boolean value) { + if (!value) { + this.itemIds = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ITEM_IDS: + if (value == null) { + unsetItemIds(); + } else { + setItemIds((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ITEM_IDS: + return getItemIds(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ITEM_IDS: + return isSetItemIds(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getItemConfigs_args) + return this.equals((getItemConfigs_args)that); + return false; + } + + public boolean equals(getItemConfigs_args that) { + if (that == null) + return false; + + boolean this_present_itemIds = true && this.isSetItemIds(); + boolean that_present_itemIds = true && that.isSetItemIds(); + if (this_present_itemIds || that_present_itemIds) { + if (!(this_present_itemIds && that_present_itemIds)) + return false; + if (!this.itemIds.equals(that.itemIds)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_itemIds = true && (isSetItemIds()); + list.add(present_itemIds); + if (present_itemIds) + list.add(itemIds); + + return list.hashCode(); + } + + @Override + public int compareTo(getItemConfigs_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetItemIds()).compareTo(other.isSetItemIds()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetItemIds()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemIds, other.itemIds); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getItemConfigs_args("); + boolean first = true; + + sb.append("itemIds:"); + if (this.itemIds == null) { + sb.append("null"); + } else { + sb.append(this.itemIds); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getItemConfigs_argsStandardSchemeFactory implements SchemeFactory { + public getItemConfigs_argsStandardScheme getScheme() { + return new getItemConfigs_argsStandardScheme(); + } + } + + private static class getItemConfigs_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getItemConfigs_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ITEM_IDS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list16 = iprot.readListBegin(); + struct.itemIds = new ArrayList(_list16.size); + String _elem17; + for (int _i18 = 0; _i18 < _list16.size; ++_i18) + { + _elem17 = iprot.readString(); + struct.itemIds.add(_elem17); + } + iprot.readListEnd(); + } + struct.setItemIdsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getItemConfigs_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.itemIds != null) { + oprot.writeFieldBegin(ITEM_IDS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.itemIds.size())); + for (String _iter19 : struct.itemIds) + { + oprot.writeString(_iter19); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getItemConfigs_argsTupleSchemeFactory implements SchemeFactory { + public getItemConfigs_argsTupleScheme getScheme() { + return new getItemConfigs_argsTupleScheme(); + } + } + + private static class getItemConfigs_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getItemConfigs_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetItemIds()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetItemIds()) { + { + oprot.writeI32(struct.itemIds.size()); + for (String _iter20 : struct.itemIds) + { + oprot.writeString(_iter20); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getItemConfigs_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.itemIds = new ArrayList(_list21.size); + String _elem22; + for (int _i23 = 0; _i23 < _list21.size; ++_i23) + { + _elem22 = iprot.readString(); + struct.itemIds.add(_elem22); + } + } + struct.setItemIdsIsSet(true); + } + } + } + + } + + public static class getItemConfigs_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemConfigs_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getItemConfigs_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getItemConfigs_resultTupleSchemeFactory()); + } + + public List success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ItemConfig.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemConfigs_result.class, metaDataMap); + } + + public getItemConfigs_result() { + } + + public getItemConfigs_result( + List success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public getItemConfigs_result(getItemConfigs_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (ItemConfig other_element : other.success) { + __this__success.add(new ItemConfig(other_element)); + } + this.success = __this__success; + } + } + + public getItemConfigs_result deepCopy() { + return new getItemConfigs_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(ItemConfig elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getItemConfigs_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getItemConfigs_result) + return this.equals((getItemConfigs_result)that); + return false; + } + + public boolean equals(getItemConfigs_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(getItemConfigs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getItemConfigs_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getItemConfigs_resultStandardSchemeFactory implements SchemeFactory { + public getItemConfigs_resultStandardScheme getScheme() { + return new getItemConfigs_resultStandardScheme(); + } + } + + private static class getItemConfigs_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getItemConfigs_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list24 = iprot.readListBegin(); + struct.success = new ArrayList(_list24.size); + ItemConfig _elem25; + for (int _i26 = 0; _i26 < _list24.size; ++_i26) + { + _elem25 = new ItemConfig(); + _elem25.read(iprot); + struct.success.add(_elem25); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getItemConfigs_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (ItemConfig _iter27 : struct.success) + { + _iter27.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getItemConfigs_resultTupleSchemeFactory implements SchemeFactory { + public getItemConfigs_resultTupleScheme getScheme() { + return new getItemConfigs_resultTupleScheme(); + } + } + + private static class getItemConfigs_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getItemConfigs_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (ItemConfig _iter28 : struct.success) + { + _iter28.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getItemConfigs_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list29.size); + ItemConfig _elem30; + for (int _i31 = 0; _i31 < _list29.size; ++_i31) + { + _elem30 = new ItemConfig(); + _elem30.read(iprot); + struct.success.add(_elem30); + } + } + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class giftCode_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("giftCode_args"); + + private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("uid", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField GIFT_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("giftCode", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new giftCode_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new giftCode_argsTupleSchemeFactory()); + } + + public int uid; // required + public String giftCode; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UID((short)1, "uid"), + GIFT_CODE((short)2, "giftCode"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UID + return UID; + case 2: // GIFT_CODE + return GIFT_CODE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __UID_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("uid", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.GIFT_CODE, new org.apache.thrift.meta_data.FieldMetaData("giftCode", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(giftCode_args.class, metaDataMap); + } + + public giftCode_args() { + } + + public giftCode_args( + int uid, + String giftCode) + { + this(); + this.uid = uid; + setUidIsSet(true); + this.giftCode = giftCode; + } + + /** + * Performs a deep copy on other. + */ + public giftCode_args(giftCode_args other) { + __isset_bitfield = other.__isset_bitfield; + this.uid = other.uid; + if (other.isSetGiftCode()) { + this.giftCode = other.giftCode; + } + } + + public giftCode_args deepCopy() { + return new giftCode_args(this); + } + + @Override + public void clear() { + setUidIsSet(false); + this.uid = 0; + this.giftCode = null; + } + + public int getUid() { + return this.uid; + } + + public giftCode_args setUid(int uid) { + this.uid = uid; + setUidIsSet(true); + return this; + } + + public void unsetUid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UID_ISSET_ID); + } + + /** Returns true if field uid is set (has been assigned a value) and false otherwise */ + public boolean isSetUid() { + return EncodingUtils.testBit(__isset_bitfield, __UID_ISSET_ID); + } + + public void setUidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID_ISSET_ID, value); + } + + public String getGiftCode() { + return this.giftCode; + } + + public giftCode_args setGiftCode(String giftCode) { + this.giftCode = giftCode; + return this; + } + + public void unsetGiftCode() { + this.giftCode = null; + } + + /** Returns true if field giftCode is set (has been assigned a value) and false otherwise */ + public boolean isSetGiftCode() { + return this.giftCode != null; + } + + public void setGiftCodeIsSet(boolean value) { + if (!value) { + this.giftCode = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UID: + if (value == null) { + unsetUid(); + } else { + setUid((Integer)value); + } + break; + + case GIFT_CODE: + if (value == null) { + unsetGiftCode(); + } else { + setGiftCode((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UID: + return Integer.valueOf(getUid()); + + case GIFT_CODE: + return getGiftCode(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UID: + return isSetUid(); + case GIFT_CODE: + return isSetGiftCode(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof giftCode_args) + return this.equals((giftCode_args)that); + return false; + } + + public boolean equals(giftCode_args that) { + if (that == null) + return false; + + boolean this_present_uid = true; + boolean that_present_uid = true; + if (this_present_uid || that_present_uid) { + if (!(this_present_uid && that_present_uid)) + return false; + if (this.uid != that.uid) + return false; + } + + boolean this_present_giftCode = true && this.isSetGiftCode(); + boolean that_present_giftCode = true && that.isSetGiftCode(); + if (this_present_giftCode || that_present_giftCode) { + if (!(this_present_giftCode && that_present_giftCode)) + return false; + if (!this.giftCode.equals(that.giftCode)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_uid = true; + list.add(present_uid); + if (present_uid) + list.add(uid); + + boolean present_giftCode = true && (isSetGiftCode()); + list.add(present_giftCode); + if (present_giftCode) + list.add(giftCode); + + return list.hashCode(); + } + + @Override + public int compareTo(giftCode_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uid, other.uid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGiftCode()).compareTo(other.isSetGiftCode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGiftCode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.giftCode, other.giftCode); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("giftCode_args("); + boolean first = true; + + sb.append("uid:"); + sb.append(this.uid); + first = false; + if (!first) sb.append(", "); + sb.append("giftCode:"); + if (this.giftCode == null) { + sb.append("null"); + } else { + sb.append(this.giftCode); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class giftCode_argsStandardSchemeFactory implements SchemeFactory { + public giftCode_argsStandardScheme getScheme() { + return new giftCode_argsStandardScheme(); + } + } + + private static class giftCode_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, giftCode_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // UID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // GIFT_CODE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.giftCode = iprot.readString(); + struct.setGiftCodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, giftCode_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(UID_FIELD_DESC); + oprot.writeI32(struct.uid); + oprot.writeFieldEnd(); + if (struct.giftCode != null) { + oprot.writeFieldBegin(GIFT_CODE_FIELD_DESC); + oprot.writeString(struct.giftCode); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class giftCode_argsTupleSchemeFactory implements SchemeFactory { + public giftCode_argsTupleScheme getScheme() { + return new giftCode_argsTupleScheme(); + } + } + + private static class giftCode_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, giftCode_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUid()) { + optionals.set(0); + } + if (struct.isSetGiftCode()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUid()) { + oprot.writeI32(struct.uid); + } + if (struct.isSetGiftCode()) { + oprot.writeString(struct.giftCode); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, giftCode_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.uid = iprot.readI32(); + struct.setUidIsSet(true); + } + if (incoming.get(1)) { + struct.giftCode = iprot.readString(); + struct.setGiftCodeIsSet(true); + } + } + } + + } + + public static class giftCode_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("giftCode_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new giftCode_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new giftCode_resultTupleSchemeFactory()); + } + + public Result success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Result.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(giftCode_result.class, metaDataMap); + } + + public giftCode_result() { + } + + public giftCode_result( + Result success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public giftCode_result(giftCode_result other) { + if (other.isSetSuccess()) { + this.success = new Result(other.success); + } + } + + public giftCode_result deepCopy() { + return new giftCode_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public Result getSuccess() { + return this.success; + } + + public giftCode_result setSuccess(Result success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Result)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof giftCode_result) + return this.equals((giftCode_result)that); + return false; + } + + public boolean equals(giftCode_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(giftCode_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("giftCode_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class giftCode_resultStandardSchemeFactory implements SchemeFactory { + public giftCode_resultStandardScheme getScheme() { + return new giftCode_resultStandardScheme(); + } + } + + private static class giftCode_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, giftCode_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, giftCode_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class giftCode_resultTupleSchemeFactory implements SchemeFactory { + public giftCode_resultTupleScheme getScheme() { + return new giftCode_resultTupleScheme(); + } + } + + private static class giftCode_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, giftCode_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, giftCode_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new Result(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + +} diff --git a/src/main/thrift/idl/gen-java/com/ljsd/jieling/thrift/idl/RechargeResult.java b/src/main/thrift/idl/gen-java/com/ljsd/jieling/thrift/idl/RechargeResult.java new file mode 100644 index 0000000..aed7e29 --- /dev/null +++ b/src/main/thrift/idl/gen-java/com/ljsd/jieling/thrift/idl/RechargeResult.java @@ -0,0 +1,656 @@ +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.ljsd.jieling.thrift.idl; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2023-7-10") +public class RechargeResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RechargeResult"); + + private static final org.apache.thrift.protocol.TField RESULT_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("resultCode", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField RESULT_MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("resultMsg", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField SUB_NODE_SET_FIELD_DESC = new org.apache.thrift.protocol.TField("subNodeSet", org.apache.thrift.protocol.TType.SET, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new RechargeResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new RechargeResultTupleSchemeFactory()); + } + + public int resultCode; // optional + public String resultMsg; // optional + public Set subNodeSet; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RESULT_CODE((short)1, "resultCode"), + RESULT_MSG((short)2, "resultMsg"), + SUB_NODE_SET((short)3, "subNodeSet"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RESULT_CODE + return RESULT_CODE; + case 2: // RESULT_MSG + return RESULT_MSG; + case 3: // SUB_NODE_SET + return SUB_NODE_SET; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __RESULTCODE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.RESULT_CODE,_Fields.RESULT_MSG,_Fields.SUB_NODE_SET}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.RESULT_CODE, new org.apache.thrift.meta_data.FieldMetaData("resultCode", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.RESULT_MSG, new org.apache.thrift.meta_data.FieldMetaData("resultMsg", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SUB_NODE_SET, new org.apache.thrift.meta_data.FieldMetaData("subNodeSet", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RechargeResult.class, metaDataMap); + } + + public RechargeResult() { + } + + /** + * Performs a deep copy on other. + */ + public RechargeResult(RechargeResult other) { + __isset_bitfield = other.__isset_bitfield; + this.resultCode = other.resultCode; + if (other.isSetResultMsg()) { + this.resultMsg = other.resultMsg; + } + if (other.isSetSubNodeSet()) { + Set __this__subNodeSet = new HashSet(other.subNodeSet); + this.subNodeSet = __this__subNodeSet; + } + } + + public RechargeResult deepCopy() { + return new RechargeResult(this); + } + + @Override + public void clear() { + setResultCodeIsSet(false); + this.resultCode = 0; + this.resultMsg = null; + this.subNodeSet = null; + } + + public int getResultCode() { + return this.resultCode; + } + + public RechargeResult setResultCode(int resultCode) { + this.resultCode = resultCode; + setResultCodeIsSet(true); + return this; + } + + public void unsetResultCode() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESULTCODE_ISSET_ID); + } + + /** Returns true if field resultCode is set (has been assigned a value) and false otherwise */ + public boolean isSetResultCode() { + return EncodingUtils.testBit(__isset_bitfield, __RESULTCODE_ISSET_ID); + } + + public void setResultCodeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESULTCODE_ISSET_ID, value); + } + + public String getResultMsg() { + return this.resultMsg; + } + + public RechargeResult setResultMsg(String resultMsg) { + this.resultMsg = resultMsg; + return this; + } + + public void unsetResultMsg() { + this.resultMsg = null; + } + + /** Returns true if field resultMsg is set (has been assigned a value) and false otherwise */ + public boolean isSetResultMsg() { + return this.resultMsg != null; + } + + public void setResultMsgIsSet(boolean value) { + if (!value) { + this.resultMsg = null; + } + } + + public int getSubNodeSetSize() { + return (this.subNodeSet == null) ? 0 : this.subNodeSet.size(); + } + + public java.util.Iterator getSubNodeSetIterator() { + return (this.subNodeSet == null) ? null : this.subNodeSet.iterator(); + } + + public void addToSubNodeSet(int elem) { + if (this.subNodeSet == null) { + this.subNodeSet = new HashSet(); + } + this.subNodeSet.add(elem); + } + + public Set getSubNodeSet() { + return this.subNodeSet; + } + + public RechargeResult setSubNodeSet(Set subNodeSet) { + this.subNodeSet = subNodeSet; + return this; + } + + public void unsetSubNodeSet() { + this.subNodeSet = null; + } + + /** Returns true if field subNodeSet is set (has been assigned a value) and false otherwise */ + public boolean isSetSubNodeSet() { + return this.subNodeSet != null; + } + + public void setSubNodeSetIsSet(boolean value) { + if (!value) { + this.subNodeSet = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RESULT_CODE: + if (value == null) { + unsetResultCode(); + } else { + setResultCode((Integer)value); + } + break; + + case RESULT_MSG: + if (value == null) { + unsetResultMsg(); + } else { + setResultMsg((String)value); + } + break; + + case SUB_NODE_SET: + if (value == null) { + unsetSubNodeSet(); + } else { + setSubNodeSet((Set)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RESULT_CODE: + return Integer.valueOf(getResultCode()); + + case RESULT_MSG: + return getResultMsg(); + + case SUB_NODE_SET: + return getSubNodeSet(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RESULT_CODE: + return isSetResultCode(); + case RESULT_MSG: + return isSetResultMsg(); + case SUB_NODE_SET: + return isSetSubNodeSet(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof RechargeResult) + return this.equals((RechargeResult)that); + return false; + } + + public boolean equals(RechargeResult that) { + if (that == null) + return false; + + boolean this_present_resultCode = true && this.isSetResultCode(); + boolean that_present_resultCode = true && that.isSetResultCode(); + if (this_present_resultCode || that_present_resultCode) { + if (!(this_present_resultCode && that_present_resultCode)) + return false; + if (this.resultCode != that.resultCode) + return false; + } + + boolean this_present_resultMsg = true && this.isSetResultMsg(); + boolean that_present_resultMsg = true && that.isSetResultMsg(); + if (this_present_resultMsg || that_present_resultMsg) { + if (!(this_present_resultMsg && that_present_resultMsg)) + return false; + if (!this.resultMsg.equals(that.resultMsg)) + return false; + } + + boolean this_present_subNodeSet = true && this.isSetSubNodeSet(); + boolean that_present_subNodeSet = true && that.isSetSubNodeSet(); + if (this_present_subNodeSet || that_present_subNodeSet) { + if (!(this_present_subNodeSet && that_present_subNodeSet)) + return false; + if (!this.subNodeSet.equals(that.subNodeSet)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_resultCode = true && (isSetResultCode()); + list.add(present_resultCode); + if (present_resultCode) + list.add(resultCode); + + boolean present_resultMsg = true && (isSetResultMsg()); + list.add(present_resultMsg); + if (present_resultMsg) + list.add(resultMsg); + + boolean present_subNodeSet = true && (isSetSubNodeSet()); + list.add(present_subNodeSet); + if (present_subNodeSet) + list.add(subNodeSet); + + return list.hashCode(); + } + + @Override + public int compareTo(RechargeResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetResultCode()).compareTo(other.isSetResultCode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetResultCode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resultCode, other.resultCode); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetResultMsg()).compareTo(other.isSetResultMsg()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetResultMsg()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resultMsg, other.resultMsg); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSubNodeSet()).compareTo(other.isSetSubNodeSet()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSubNodeSet()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.subNodeSet, other.subNodeSet); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("RechargeResult("); + boolean first = true; + + if (isSetResultCode()) { + sb.append("resultCode:"); + sb.append(this.resultCode); + first = false; + } + if (isSetResultMsg()) { + if (!first) sb.append(", "); + sb.append("resultMsg:"); + if (this.resultMsg == null) { + sb.append("null"); + } else { + sb.append(this.resultMsg); + } + first = false; + } + if (isSetSubNodeSet()) { + if (!first) sb.append(", "); + sb.append("subNodeSet:"); + if (this.subNodeSet == null) { + sb.append("null"); + } else { + sb.append(this.subNodeSet); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class RechargeResultStandardSchemeFactory implements SchemeFactory { + public RechargeResultStandardScheme getScheme() { + return new RechargeResultStandardScheme(); + } + } + + private static class RechargeResultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, RechargeResult struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // RESULT_CODE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.resultCode = iprot.readI32(); + struct.setResultCodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // RESULT_MSG + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.resultMsg = iprot.readString(); + struct.setResultMsgIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // SUB_NODE_SET + if (schemeField.type == org.apache.thrift.protocol.TType.SET) { + { + org.apache.thrift.protocol.TSet _set0 = iprot.readSetBegin(); + struct.subNodeSet = new HashSet(2*_set0.size); + int _elem1; + for (int _i2 = 0; _i2 < _set0.size; ++_i2) + { + _elem1 = iprot.readI32(); + struct.subNodeSet.add(_elem1); + } + iprot.readSetEnd(); + } + struct.setSubNodeSetIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, RechargeResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetResultCode()) { + oprot.writeFieldBegin(RESULT_CODE_FIELD_DESC); + oprot.writeI32(struct.resultCode); + oprot.writeFieldEnd(); + } + if (struct.resultMsg != null) { + if (struct.isSetResultMsg()) { + oprot.writeFieldBegin(RESULT_MSG_FIELD_DESC); + oprot.writeString(struct.resultMsg); + oprot.writeFieldEnd(); + } + } + if (struct.subNodeSet != null) { + if (struct.isSetSubNodeSet()) { + oprot.writeFieldBegin(SUB_NODE_SET_FIELD_DESC); + { + oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, struct.subNodeSet.size())); + for (int _iter3 : struct.subNodeSet) + { + oprot.writeI32(_iter3); + } + oprot.writeSetEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class RechargeResultTupleSchemeFactory implements SchemeFactory { + public RechargeResultTupleScheme getScheme() { + return new RechargeResultTupleScheme(); + } + } + + private static class RechargeResultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, RechargeResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetResultCode()) { + optionals.set(0); + } + if (struct.isSetResultMsg()) { + optionals.set(1); + } + if (struct.isSetSubNodeSet()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetResultCode()) { + oprot.writeI32(struct.resultCode); + } + if (struct.isSetResultMsg()) { + oprot.writeString(struct.resultMsg); + } + if (struct.isSetSubNodeSet()) { + { + oprot.writeI32(struct.subNodeSet.size()); + for (int _iter4 : struct.subNodeSet) + { + oprot.writeI32(_iter4); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, RechargeResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.resultCode = iprot.readI32(); + struct.setResultCodeIsSet(true); + } + if (incoming.get(1)) { + struct.resultMsg = iprot.readString(); + struct.setResultMsgIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TSet _set5 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + struct.subNodeSet = new HashSet(2*_set5.size); + int _elem6; + for (int _i7 = 0; _i7 < _set5.size; ++_i7) + { + _elem6 = iprot.readI32(); + struct.subNodeSet.add(_elem6); + } + } + struct.setSubNodeSetIsSet(true); + } + } + } + +} + diff --git a/src/main/thrift/idl/gen-java/com/ljsd/jieling/thrift/idl/Result.java b/src/main/thrift/idl/gen-java/com/ljsd/jieling/thrift/idl/Result.java new file mode 100644 index 0000000..3dd4337 --- /dev/null +++ b/src/main/thrift/idl/gen-java/com/ljsd/jieling/thrift/idl/Result.java @@ -0,0 +1,500 @@ +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.ljsd.jieling.thrift.idl; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2023-7-10") +public class Result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Result"); + + private static final org.apache.thrift.protocol.TField RESULT_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("resultCode", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField RESULT_MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("resultMsg", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ResultTupleSchemeFactory()); + } + + public int resultCode; // optional + public String resultMsg; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RESULT_CODE((short)1, "resultCode"), + RESULT_MSG((short)2, "resultMsg"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RESULT_CODE + return RESULT_CODE; + case 2: // RESULT_MSG + return RESULT_MSG; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __RESULTCODE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.RESULT_CODE,_Fields.RESULT_MSG}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.RESULT_CODE, new org.apache.thrift.meta_data.FieldMetaData("resultCode", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.RESULT_MSG, new org.apache.thrift.meta_data.FieldMetaData("resultMsg", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Result.class, metaDataMap); + } + + public Result() { + } + + /** + * Performs a deep copy on other. + */ + public Result(Result other) { + __isset_bitfield = other.__isset_bitfield; + this.resultCode = other.resultCode; + if (other.isSetResultMsg()) { + this.resultMsg = other.resultMsg; + } + } + + public Result deepCopy() { + return new Result(this); + } + + @Override + public void clear() { + setResultCodeIsSet(false); + this.resultCode = 0; + this.resultMsg = null; + } + + public int getResultCode() { + return this.resultCode; + } + + public Result setResultCode(int resultCode) { + this.resultCode = resultCode; + setResultCodeIsSet(true); + return this; + } + + public void unsetResultCode() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESULTCODE_ISSET_ID); + } + + /** Returns true if field resultCode is set (has been assigned a value) and false otherwise */ + public boolean isSetResultCode() { + return EncodingUtils.testBit(__isset_bitfield, __RESULTCODE_ISSET_ID); + } + + public void setResultCodeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESULTCODE_ISSET_ID, value); + } + + public String getResultMsg() { + return this.resultMsg; + } + + public Result setResultMsg(String resultMsg) { + this.resultMsg = resultMsg; + return this; + } + + public void unsetResultMsg() { + this.resultMsg = null; + } + + /** Returns true if field resultMsg is set (has been assigned a value) and false otherwise */ + public boolean isSetResultMsg() { + return this.resultMsg != null; + } + + public void setResultMsgIsSet(boolean value) { + if (!value) { + this.resultMsg = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RESULT_CODE: + if (value == null) { + unsetResultCode(); + } else { + setResultCode((Integer)value); + } + break; + + case RESULT_MSG: + if (value == null) { + unsetResultMsg(); + } else { + setResultMsg((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RESULT_CODE: + return Integer.valueOf(getResultCode()); + + case RESULT_MSG: + return getResultMsg(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RESULT_CODE: + return isSetResultCode(); + case RESULT_MSG: + return isSetResultMsg(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Result) + return this.equals((Result)that); + return false; + } + + public boolean equals(Result that) { + if (that == null) + return false; + + boolean this_present_resultCode = true && this.isSetResultCode(); + boolean that_present_resultCode = true && that.isSetResultCode(); + if (this_present_resultCode || that_present_resultCode) { + if (!(this_present_resultCode && that_present_resultCode)) + return false; + if (this.resultCode != that.resultCode) + return false; + } + + boolean this_present_resultMsg = true && this.isSetResultMsg(); + boolean that_present_resultMsg = true && that.isSetResultMsg(); + if (this_present_resultMsg || that_present_resultMsg) { + if (!(this_present_resultMsg && that_present_resultMsg)) + return false; + if (!this.resultMsg.equals(that.resultMsg)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_resultCode = true && (isSetResultCode()); + list.add(present_resultCode); + if (present_resultCode) + list.add(resultCode); + + boolean present_resultMsg = true && (isSetResultMsg()); + list.add(present_resultMsg); + if (present_resultMsg) + list.add(resultMsg); + + return list.hashCode(); + } + + @Override + public int compareTo(Result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetResultCode()).compareTo(other.isSetResultCode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetResultCode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resultCode, other.resultCode); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetResultMsg()).compareTo(other.isSetResultMsg()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetResultMsg()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resultMsg, other.resultMsg); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Result("); + boolean first = true; + + if (isSetResultCode()) { + sb.append("resultCode:"); + sb.append(this.resultCode); + first = false; + } + if (isSetResultMsg()) { + if (!first) sb.append(", "); + sb.append("resultMsg:"); + if (this.resultMsg == null) { + sb.append("null"); + } else { + sb.append(this.resultMsg); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class ResultStandardSchemeFactory implements SchemeFactory { + public ResultStandardScheme getScheme() { + return new ResultStandardScheme(); + } + } + + private static class ResultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // RESULT_CODE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.resultCode = iprot.readI32(); + struct.setResultCodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // RESULT_MSG + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.resultMsg = iprot.readString(); + struct.setResultMsgIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetResultCode()) { + oprot.writeFieldBegin(RESULT_CODE_FIELD_DESC); + oprot.writeI32(struct.resultCode); + oprot.writeFieldEnd(); + } + if (struct.resultMsg != null) { + if (struct.isSetResultMsg()) { + oprot.writeFieldBegin(RESULT_MSG_FIELD_DESC); + oprot.writeString(struct.resultMsg); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ResultTupleSchemeFactory implements SchemeFactory { + public ResultTupleScheme getScheme() { + return new ResultTupleScheme(); + } + } + + private static class ResultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetResultCode()) { + optionals.set(0); + } + if (struct.isSetResultMsg()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetResultCode()) { + oprot.writeI32(struct.resultCode); + } + if (struct.isSetResultMsg()) { + oprot.writeString(struct.resultMsg); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.resultCode = iprot.readI32(); + struct.setResultCodeIsSet(true); + } + if (incoming.get(1)) { + struct.resultMsg = iprot.readString(); + struct.setResultMsgIsSet(true); + } + } + } + +} + diff --git a/src/main/thrift/idl/gen-java/com/ljsd/jieling/thrift/idl/itemData.java b/src/main/thrift/idl/gen-java/com/ljsd/jieling/thrift/idl/itemData.java new file mode 100644 index 0000000..efde9a0 --- /dev/null +++ b/src/main/thrift/idl/gen-java/com/ljsd/jieling/thrift/idl/itemData.java @@ -0,0 +1,607 @@ +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.ljsd.jieling.thrift.idl; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2023-10-9") +public class itemData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("itemData"); + + private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField STORE_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("store_item_id", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("count", org.apache.thrift.protocol.TType.I32, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new itemDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new itemDataTupleSchemeFactory()); + } + + public String item_id; // optional + public String store_item_id; // optional + public int count; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ITEM_ID((short)1, "item_id"), + STORE_ITEM_ID((short)2, "store_item_id"), + COUNT((short)3, "count"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ITEM_ID + return ITEM_ID; + case 2: // STORE_ITEM_ID + return STORE_ITEM_ID; + case 3: // COUNT + return COUNT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __COUNT_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.ITEM_ID,_Fields.STORE_ITEM_ID,_Fields.COUNT}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.STORE_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("store_item_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COUNT, new org.apache.thrift.meta_data.FieldMetaData("count", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(itemData.class, metaDataMap); + } + + public itemData() { + } + + /** + * Performs a deep copy on other. + */ + public itemData(itemData other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetItem_id()) { + this.item_id = other.item_id; + } + if (other.isSetStore_item_id()) { + this.store_item_id = other.store_item_id; + } + this.count = other.count; + } + + public itemData deepCopy() { + return new itemData(this); + } + + @Override + public void clear() { + this.item_id = null; + this.store_item_id = null; + setCountIsSet(false); + this.count = 0; + } + + public String getItem_id() { + return this.item_id; + } + + public itemData setItem_id(String item_id) { + this.item_id = item_id; + return this; + } + + public void unsetItem_id() { + this.item_id = null; + } + + /** Returns true if field item_id is set (has been assigned a value) and false otherwise */ + public boolean isSetItem_id() { + return this.item_id != null; + } + + public void setItem_idIsSet(boolean value) { + if (!value) { + this.item_id = null; + } + } + + public String getStore_item_id() { + return this.store_item_id; + } + + public itemData setStore_item_id(String store_item_id) { + this.store_item_id = store_item_id; + return this; + } + + public void unsetStore_item_id() { + this.store_item_id = null; + } + + /** Returns true if field store_item_id is set (has been assigned a value) and false otherwise */ + public boolean isSetStore_item_id() { + return this.store_item_id != null; + } + + public void setStore_item_idIsSet(boolean value) { + if (!value) { + this.store_item_id = null; + } + } + + public int getCount() { + return this.count; + } + + public itemData setCount(int count) { + this.count = count; + setCountIsSet(true); + return this; + } + + public void unsetCount() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COUNT_ISSET_ID); + } + + /** Returns true if field count is set (has been assigned a value) and false otherwise */ + public boolean isSetCount() { + return EncodingUtils.testBit(__isset_bitfield, __COUNT_ISSET_ID); + } + + public void setCountIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COUNT_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ITEM_ID: + if (value == null) { + unsetItem_id(); + } else { + setItem_id((String)value); + } + break; + + case STORE_ITEM_ID: + if (value == null) { + unsetStore_item_id(); + } else { + setStore_item_id((String)value); + } + break; + + case COUNT: + if (value == null) { + unsetCount(); + } else { + setCount((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ITEM_ID: + return getItem_id(); + + case STORE_ITEM_ID: + return getStore_item_id(); + + case COUNT: + return Integer.valueOf(getCount()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ITEM_ID: + return isSetItem_id(); + case STORE_ITEM_ID: + return isSetStore_item_id(); + case COUNT: + return isSetCount(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof itemData) + return this.equals((itemData)that); + return false; + } + + public boolean equals(itemData that) { + if (that == null) + return false; + + boolean this_present_item_id = true && this.isSetItem_id(); + boolean that_present_item_id = true && that.isSetItem_id(); + if (this_present_item_id || that_present_item_id) { + if (!(this_present_item_id && that_present_item_id)) + return false; + if (!this.item_id.equals(that.item_id)) + return false; + } + + boolean this_present_store_item_id = true && this.isSetStore_item_id(); + boolean that_present_store_item_id = true && that.isSetStore_item_id(); + if (this_present_store_item_id || that_present_store_item_id) { + if (!(this_present_store_item_id && that_present_store_item_id)) + return false; + if (!this.store_item_id.equals(that.store_item_id)) + return false; + } + + boolean this_present_count = true && this.isSetCount(); + boolean that_present_count = true && that.isSetCount(); + if (this_present_count || that_present_count) { + if (!(this_present_count && that_present_count)) + return false; + if (this.count != that.count) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_item_id = true && (isSetItem_id()); + list.add(present_item_id); + if (present_item_id) + list.add(item_id); + + boolean present_store_item_id = true && (isSetStore_item_id()); + list.add(present_store_item_id); + if (present_store_item_id) + list.add(store_item_id); + + boolean present_count = true && (isSetCount()); + list.add(present_count); + if (present_count) + list.add(count); + + return list.hashCode(); + } + + @Override + public int compareTo(itemData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(other.isSetItem_id()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetItem_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, other.item_id); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStore_item_id()).compareTo(other.isSetStore_item_id()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStore_item_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.store_item_id, other.store_item_id); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCount()).compareTo(other.isSetCount()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCount()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.count, other.count); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("itemData("); + boolean first = true; + + if (isSetItem_id()) { + sb.append("item_id:"); + if (this.item_id == null) { + sb.append("null"); + } else { + sb.append(this.item_id); + } + first = false; + } + if (isSetStore_item_id()) { + if (!first) sb.append(", "); + sb.append("store_item_id:"); + if (this.store_item_id == null) { + sb.append("null"); + } else { + sb.append(this.store_item_id); + } + first = false; + } + if (isSetCount()) { + if (!first) sb.append(", "); + sb.append("count:"); + sb.append(this.count); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class itemDataStandardSchemeFactory implements SchemeFactory { + public itemDataStandardScheme getScheme() { + return new itemDataStandardScheme(); + } + } + + private static class itemDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, itemData struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ITEM_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.item_id = iprot.readString(); + struct.setItem_idIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STORE_ITEM_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.store_item_id = iprot.readString(); + struct.setStore_item_idIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COUNT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.count = iprot.readI32(); + struct.setCountIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, itemData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.item_id != null) { + if (struct.isSetItem_id()) { + oprot.writeFieldBegin(ITEM_ID_FIELD_DESC); + oprot.writeString(struct.item_id); + oprot.writeFieldEnd(); + } + } + if (struct.store_item_id != null) { + if (struct.isSetStore_item_id()) { + oprot.writeFieldBegin(STORE_ITEM_ID_FIELD_DESC); + oprot.writeString(struct.store_item_id); + oprot.writeFieldEnd(); + } + } + if (struct.isSetCount()) { + oprot.writeFieldBegin(COUNT_FIELD_DESC); + oprot.writeI32(struct.count); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class itemDataTupleSchemeFactory implements SchemeFactory { + public itemDataTupleScheme getScheme() { + return new itemDataTupleScheme(); + } + } + + private static class itemDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, itemData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetItem_id()) { + optionals.set(0); + } + if (struct.isSetStore_item_id()) { + optionals.set(1); + } + if (struct.isSetCount()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetItem_id()) { + oprot.writeString(struct.item_id); + } + if (struct.isSetStore_item_id()) { + oprot.writeString(struct.store_item_id); + } + if (struct.isSetCount()) { + oprot.writeI32(struct.count); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, itemData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.item_id = iprot.readString(); + struct.setItem_idIsSet(true); + } + if (incoming.get(1)) { + struct.store_item_id = iprot.readString(); + struct.setStore_item_idIsSet(true); + } + if (incoming.get(2)) { + struct.count = iprot.readI32(); + struct.setCountIsSet(true); + } + } + } + +} +