WH01243 před 3 roky
rodič
revize
1dc00236b5

+ 1000 - 0
api/messagecenter/baidu_fsw.dict

@@ -0,0 +1,1000 @@
+台独
+tai独
+台du
+taidu
+全能神
+quan能神
+quanneng神
+quannengshen
+全neng神
+全negnshen
+全能shen
+藏du
+藏独
+zang独
+zangdu
+疆独
+jiang独
+疆du
+占中
+zhan中
+占zhong
+zhanzhong
+占领中环
+zhan领中环
+zhanling中环
+zhanlingzhong环
+zhanlingzhonghuan
+占ling中环
+占lingzhong环
+占lingzhonghuan
+占领zhong环
+占领zhonghuan
+占领中huan
+西藏独立
+枪支
+qiang支
+枪zhi
+一党
+多党
+专政
+自慰
+吹萧
+内裤
+底裤
+私处
+变态
+作爱
+鸡巴
+阴茎
+阳具
+开苞
+肛门
+阴道
+阴蒂
+荡妇
+阴囊
+干你
+干她
+干他
+手淫
+口淫
+阴户
+阴门
+下体
+龟头
+阴毛
+你妈逼
+大鸡巴
+红智
+法轮
+法论
+法沦
+法伦
+发轮
+发论
+发沦
+发伦
+轮功
+轮公
+轮攻
+沦功
+沦公
+沦攻
+论攻
+论功
+论公
+伦攻
+伦公
+民运
+新疆独立
+一黨
+多黨
+專政
+自慰
+吹蕭
+底褲
+私處
+變態
+造愛
+性愛
+做愛
+雞巴
+陰莖
+陽具
+開苞
+肛門
+陰道
+陰蒂
+蕩婦
+陰囊
+幹你
+幹他
+陰戶
+陰門
+下體
+龜頭
+陰毛
+你媽逼
+大雞巴
+大紀元
+紅志
+紅智
+法輪
+法論
+法淪
+法倫
+發輪
+發論
+發淪
+輪功
+輪公
+輪攻
+淪功
+淪公
+淪攻
+論攻
+論功
+論公
+倫攻
+倫功
+倫公
+民運
+台獨
+臺灣獨立
+藏獨
+西藏獨立
+疆獨
+新疆獨立
+專制
+賣淫
+八九
+八老
+巴赫
+白立朴
+白梦
+保钓
+鲍戈
+鲍彤
+暴乱
+暴政
+北大三角地论坛
+北韩
+北京当局
+北京之春
+北美自由论坛
+持不同政见
+赤匪
+赤化
+春夏自由论坛
+达赖
+大参考
+大纪元新闻网
+大纪园
+大家论坛
+大史
+大史记
+大史纪
+大中国论坛
+大中华论坛
+大众真人真事
+两岸三地论坛
+两个中国
+台盟
+台湾狗
+台湾建国运动组织
+台湾青年独立联盟
+台湾政论区
+台湾自由联盟
+太子党
+中国复兴论坛
+中国孤儿院
+中国论坛
+中国社会进步党
+中国社会论坛
+中国威胁论
+中国问题论坛
+中国真实内容
+中国之春
+中国猪
+中华大地
+中华大众
+中华讲清
+中华人民实话实说
+中华人民正邪
+中华时事
+中华养生益智功
+中华真实报道
+钟山风雨论坛
+自焚
+自民党
+自已的故事
+自由民主论坛
+253507912
+28315551
+308071906
+317474453
+326276498
+39864274
+507、6308
+70210989
+77手枪价格
+77手枪销售
+77手枪子弹电话qq
+77手枪子弹订购qq
+77手枪子弹供应qq
+77手枪子弹提供qq
+77手槍出售
+77手槍价格
+77手槍買賣銷售
+77手槍销售
+77手槍专卖
+77手槍子彈電話qq
+77手槍子彈訂購qq
+77手槍子彈供應
+77手槍子彈供應qq
+77手槍子彈提供qq
+78158909
+788.Lcn.cc
+799886.cn
+80w.sov.tw
+80色区
+81军刺专卖
+81軍刺专卖
+8558.wtianx.com
+865110933
+865110933.qzone.qq.com
+86864387
+876ok.com
+8818野战旅弓弩
+8898.52113.com
+891084598
+8996819
+909983805
+91taiji
+91UP快学堂
+920121460
+92woool2
+92猎枪買賣銷售
+92式9mm枪提供
+92式9mm手枪销售
+92式出售
+92式军用手枪出售
+92式军用手枪模型出售
+92式手枪出售
+92式手槍出售
+92式销售QQ
+92手qiang出售
+92手qiang价格
+92手qiang子弹出售
+92手qiang子弹电话
+92手qiang子弹电话qq
+92手qiang子弹订购
+92手qiang子弹订购qq
+92手qiang子弹供应
+92手qiang子弹供应qq
+92手qiang子弹提供
+92手qiang子弹提供qq
+92手qiang子弹销售
+92手qiang子彈出售
+92手qiang子彈電話
+92手qiang子彈電話qq
+92手qiang子彈訂購
+92手qiang子彈訂購qq
+92手qiang子彈供應
+92手qiang子彈供應qq
+92手qiang子彈提供
+92手qiang子彈提供qq
+92手qiang子彈銷售
+92手狗出售
+92手狗买卖
+92手枪出售
+92手枪价格
+92手枪销售
+92手枪子弹出售
+92手枪子弹电话
+92手枪子弹电话qq
+92手枪子弹订购
+92手枪子弹订购qq
+92手枪子弹供应
+92手枪子弹供应qq
+92手枪子弹提供
+92手枪子弹提供qq
+92手枪子弹销售
+92手枪子彈供应
+92手枪子彈供應
+92手槍出售
+92手槍价格
+92手槍買賣銷售
+92手槍销售
+92手槍专卖
+92手槍子弹訂購
+92手槍子彈出售
+92手槍子彈電話
+92手槍子彈電話qq
+92手槍子彈訂購
+92手槍子彈訂購qq
+92手槍子彈供應
+92手槍子彈供應qq
+92手槍子彈提供
+92手槍子彈提供qq
+92手槍子彈銷售
+93手狗买卖
+9533567644
+953538158
+95步枪子弹供应
+95步枪子彈供应
+95步枪子彈供應
+97614475
+97juhui.com
+97步枪子弹供应
+97步枪子彈供应
+97步枪子彈供應
+98148.com
+986824012
+99wed.com
+99结婚网
+a-level.hk
+a-levelbbs.com
+A4U人体艺术
+aa.cyxiu.com
+aaaljz
+ad.cyxiu.com
+ah.huatu.com
+ah930.com
+ahgwykw.com
+ahhome.com
+ahhqw.com
+ahons.cn
+ahyanjing.com
+ahzscom
+aibabaw
+aijms.com
+aixiaoshuow
+AK-47刺刀专卖
+AK-47军刀出售
+AKABEAR阿卡贝尔
+anhui.htexam.com
+anhuilala.cn
+anhuitc.com
+ASP甩棍专卖
+ATOM弹制造
+AV狼
+AV女优影片
+AV文檔
+av资源
+A片基地
+baixing.com
+bbs.0551.com
+bbs.6tie.com
+bbs.ahw.cc
+bbs.anhuinews.com
+bbs.hqdoor.com
+bbs.wulinlu.net
+bbs.zps.cc
+bjtuku
+blog.sina.com.cn/u/3265089003
+boqii
+BOTOX
+BUCK夜鹰平刃专卖
+BUCK夜鷹平刃专卖
+buliuming.com
+C4的制作方法
+C4塑胶炸药
+C4炸药的成分
+C4制作完全手册
+CBH
+CFX气枪出售
+CFX气枪销售
+chenming
+chinagop.com
+chinasqzx.cn
+ck108
+cndanbaifen
+CO2-A1000出货
+CO2-A1000到货
+CO2-A1000电话
+CO2-A1000订购
+CS狗出售
+cxxfcy.com
+D9军刺军刀
+daliniu.com
+dapao.cc
+df168.cn
+dinobicyle
+diyitouzhu
+DIY核弹
+DIY原子弹
+doubanhui
+dwz.cn/6MVJG
+e乐姿脱毛术
+E夜情
+e夜情俱乐部
+fangtoo.com
+fapiao大量供应
+fapiao销售
+fcw012.cn
+fei-news
+fenke.in
+FFX氣槍出售
+FFX氣槍銷售
+FlexiSPY代码
+FlexiSPY代碼
+FlexiSPY改良版
+FlexiSPY免费版
+FlexiSPY免费试用
+FlexiSPY免費版
+FlexiSPY免費試用
+FlexiSPY破解版
+Flexispy破解版
+FlexiSpy下载
+FlexiSPY源代码
+FlexiSPY源代碼
+FlexiSPY增強版
+FlexiSPY增强版
+FlexiSPY专业版
+FlexiSPY專業版
+FlexiSPY最新版
+focus.cn
+fsjml.com
+FX气皇出售
+FX气皇专卖
+geimysun
+goo.gl/Em62c6
+GO易尚网
+guancheng4s.com
+hefei.baixing.com
+hefei77
+hefeipk.com
+hefeitc.com
+hefeixz.cn
+hefeizsyy
+hefeizuche8.com
+hellohf.com
+hf.comcv.cn
+hf.ganji.com
+hf517
+hfbinhu
+hfchenming
+hffc365.com
+hffcxx.com
+hfgogo
+hfhqw.com
+hfkszs.com
+hftogo
+hfwangluo
+hfxxw.net
+hhyy.sov.tw
+high粉出货
+high粉到货
+high粉订购
+high粉配方
+high粉送货上门
+high粉销售
+home0551.cn
+houseren.com
+hqdoor
+http://blog.sina.com.cn/u/2746702742
+http://cnrdn.com/njY5
+http://ganyinghua.hzrd168.com
+http://www.0592taozai.com
+http://www.bangxuetang.com
+http://www.bluesky12.com
+http://www.chinajiuyutang.com/brand-367-c0.html
+http://www.cnpcdr.net/
+http://www.dxb1.com/ditu0.html
+http://www.fulinmendc.com
+http://www.gbxiehe.com/ygzx/
+http://www.huyikang.com/UpFile/201210/2012100959348813.png
+http://www.igo.cn
+http://www.jiandaov.com/baodian/379.html
+http://www.qyjlzx.com
+http://www.sbjkzx.com/zixun/
+http://www.shanghitv.com/
+http://www.shumeil.com
+http://www.stmingliu.cn/
+http://www.suoyinnet.org
+http://www.typmbl.com
+http://www.waterbaby.asia/
+http://www.zhf100.com
+huatu.com
+hwit.net
+hxs999.com
+IED炸弹制作
+images.55bbs.com
+img2081.poco.cn
+imini
+Inkever(盈克)软件
+jiajinliang@hotmail.com
+jianzhuan8
+jiayouhf
+jmwei.cn
+joycall.cn
+junlongzs.com
+jyclub.info
+jz.35114.cc
+J总病危
+K7娱乐城
+k8祛疤产品
+king粉出货
+king粉到货
+king粉订购
+king粉合成
+king粉配方
+king粉送货上门
+king粉销售
+kitopp
+kkwoool
+KOE理财团队
+ktv52.com
+ktv988.com
+kz.zqgame.com
+K粉qq
+K粉出货
+K粉出售
+k粉出售
+K粉到货
+k粉的价格
+k粉的制作技术方法
+K粉电话
+K粉订购
+K粉合成
+K粉技术转让
+K粉配方
+K粉手枪
+K粉送货上门
+K粉销售
+K粉摇头丸出售
+K粉制作
+k粉制作
+K粉製作
+K粉专卖
+lashou.com
+LB-M4型弹弓弩
+leidoo.com
+lezhi2.111n.com
+lhzhang.cn
+life0551.com
+LINK
+linxu
+liux168
+ljhua.cn
+llcckk.sov.tw
+longxun2car.com
+lpfwang.com
+LQB362qq
+LQB362出货
+LQB362到货
+LQB362电话
+LQB362订购
+LQB362技术
+LQB362图纸
+LQB362制造
+lryf1314.taobao
+M300出售
+M3长刺专卖
+M9-D80军刀专卖
+M9-D80軍刀专卖
+M92F式手槍出售
+M92F式手槍买卖
+M9长刺专卖
+M9军刀专卖
+macao388.com
+meituan.com
+MM视频裸聊
+mnop
+mohci
+MT-虎牙专卖
+newhouse.com.cn
+ohyeee
+ok.hfzone.cc
+oldyouth
+OM瑜伽
+ons22.com
+oo.cd.sd.cn
+oohyee
+ourh2
+p57
+paikebbs.com
+paranoidzhan.uu1001.com
+pba.com
+pcp气枪分解图纸
+PCP气枪专卖网
+PCP新贵出售
+popohefei
+PPK出售
+PPK销售
+qiang支出售
+qiang支弹药购买
+qi狗出售
+qi狗专卖
+qq.cd.sd.cn
+qq.hfzone.cc
+qq出售银行卡
+QQ订购high粉
+QQ订购king粉
+QQ订购K粉
+QQ订购白粉
+QQ订购白牙签
+QQ订购白牙簽
+QQ订购冰毒
+QQ订购冰砖
+QQ订购冰磚
+QQ订购大冰砖
+QQ订购大冰磚
+QQ订购海洛因
+QQ订购胡椒基甲酮
+QQ订购黃牙簽
+QQ订购黄牙签
+QQ订购甲卡西酮
+QQ订购间苯三酚
+QQ订购間苯三酚
+QQ订购氯胺酮
+QQ订购麻古
+QQ订购麻谷
+QQ订购麻黃素
+QQ订购麻黄素
+QQ订购麦角酸
+QQ订购麥角酸
+QQ订购迷魂粉
+QQ订购迷魂水
+QQ订购迷魂药
+QQ订购迷魂藥
+QQ订购奶油冰
+QQ订购鉆石冰
+QQ订购青蒿素
+QQ订购三唑侖
+QQ订购神仙水
+QQ订购神仙糖
+QQ订购小冰砖
+QQ订购小冰磚
+QQ订购盐酸羟亚胺
+qq订购盐酸羟亚胺
+QQ订购鹽酸羥亞胺
+QQ订购搖頭糖
+QQ订购搖頭丸
+QQ订购摇头糖
+QQ订购摇头丸
+QQ订购乙醚
+QQ订购钻石冰
+QQ订购左旋麻黃素
+QQ订购左旋麻黄素
+qq訂購鹽酸羥亞胺
+QQ供应high粉
+QQ供应king粉
+QQ供应K粉
+qq供应K粉
+QQ供应白粉
+QQ供应白牙签
+QQ供应白牙簽
+qq供应冰毒
+QQ供应冰鉆石
+QQ供应冰砖
+QQ供应冰磚
+QQ供应大冰砖
+QQ供应大冰磚
+QQ供应海洛因
+QQ供应胡椒基甲酮
+QQ供应黃牙簽
+QQ供应黄牙签
+QQ供应甲卡西酮
+QQ供应间苯三酚
+QQ供应間苯三酚
+QQ供应氯胺酮
+QQ供应麻古
+QQ供应麻谷
+QQ供应麻黃素
+QQ供应麻黄素
+QQ供应麦角酸
+QQ供应麥角酸
+QQ供应迷魂粉
+QQ供应迷魂水
+QQ供应迷魂药
+QQ供应迷魂藥
+QQ供应奶油冰
+QQ供应青蒿素
+QQ供应三唑侖
+QQ供应神仙水
+QQ供应神仙糖
+QQ供应小冰砖
+QQ供应小冰磚
+QQ供应盐酸羟亚胺
+QQ供应鹽酸羥亞胺
+QQ供应搖頭糖
+QQ供应搖頭丸
+QQ供应摇头糖
+QQ供应摇头丸
+QQ供应乙醚
+QQ供应钻石
+QQ供应钻石冰
+QQ供应左旋麻黃素
+QQ供应左旋麻黄素
+qq供應K粉
+qq供應冰毒
+QQ供應獵槍子彈
+QQ供應手槍子彈
+QQ假币出售
+QQ假钞出售
+qq假身份证办理
+QQ军刀网
+QQ裸聊
+qq裸聊
+QQ买卖冰毒
+qq买卖冰毒
+QQ买卖销售92手qiang
+qq买卖销售92手qiang
+qq买销售虎头猎枪
+qq買銷售虎頭獵槍
+QQ卖45MM狗粮
+qq卖45MM狗粮
+qq卖54式64式
+qq卖64式
+qq卖64式手枪
+qq卖64式手槍
+qq卖64手qiang
+qq卖64手qiang子弹
+qq卖64手qiang子彈
+qq卖64手枪
+qq卖64手枪子弹
+qq卖64手槍
+qq卖64手槍子彈
+qq卖77猎枪
+qq卖77猎槍
+qq卖92式
+qq卖92式手枪
+qq卖92式手槍
+qq卖92手qiang
+qq卖92手qiang子弹
+qq卖92手qiang子彈
+qq卖92手枪
+qq卖92手枪子弹
+qq卖92手槍
+qq卖92手槍子彈
+qq卖CFX气枪
+qq卖PCP新贵
+qq卖PPK
+qq卖步qiang
+qq卖步qiang子弹
+qq卖步槍
+qq卖出售双管猎枪
+qq卖单管猎枪
+qq卖娥眉气枪
+qq卖防身麻醉枪
+qq卖防身武器
+qq卖仿真狙击枪
+qq卖仿真来复枪
+qq卖仿真枪模
+qq卖仿真槍模
+qq卖钢珠狗
+qq卖钢珠猎狗
+qq卖高压狗
+qq卖高压气枪
+qq卖高壓氣槍
+qq卖工字牌汽枪
+qq卖工字牌汽槍
+qq卖工字牌氣槍
+qq卖广州三箭
+qq卖广州三箭气
+qq卖广州三箭气枪
+qq卖廣州三箭氣
+qq卖虎头猎枪
+qq卖虎头双管
+qq卖虎頭獵槍
+qq卖健卫小口径
+qq卖健衛小口徑
+qq卖金钟气枪
+qq卖进口汽狗
+qq卖立式双管猎枪
+qq卖猎枪
+qq卖獵qiang子彈
+qq卖獵槍
+qq卖獵槍麻醉槍
+qq卖獵槍手槍
+qq卖麻醉qiang
+qq卖麻醉枪
+qq卖美国秃鹰
+qq卖铅弹气枪
+qq卖鉛彈氣槍
+qq卖散弹狗
+qq卖散弹枪
+qq卖散弹槍
+QQ卖肾
+qq卖手狗
+qq卖手槍
+qq卖双管平式枪
+qq卖司马系列气狗
+qq卖台湾秃鹰
+qq卖禿鷹汽槍
+qq卖秃鹰汽枪
+qq卖瓦斯手狗
+qq卖袖珍手枪
+qq卖英国骚本气枪
+qq卖子弹
+qq卖自用电狗
+qq卖自製手狗
+qq卖左轮钢珠狗
+qq卖左轮手枪
+QQ賣45MM狗糧
+qq賣54式64式
+qq賣CFX氣槍
+qq賣防身武器
+qq賣仿真槍模
+qq賣高壓氣槍
+qq賣工字牌汽槍
+qq賣廣州三箭氣
+qq賣合成K粉
+qq賣虎頭雙管
+qq賣健衛小口徑
+qq賣金鐘氣槍
+qq賣進口汽狗
+qq賣獵槍
+qq賣鉛彈氣槍
+qq賣熱武器
+qq賣禿鷹汽槍
+qq賣瓦斯手狗
+qq賣左輪手槍
+qq群:287178308
+QQ视频裸聊
+QQ销售54手qiang
+QQ销售64手qiang
+QQ销售77手qiang
+QQ销售92手qiang
+QQ销售high粉
+QQ销售king粉
+QQ销售K粉
+qq销售K粉
+QQ销售白粉
+QQ销售白牙签
+QQ销售白牙簽
+QQ销售冰毒
+QQ销售冰砖
+QQ销售冰磚
+QQ销售冰钻
+QQ销售大冰砖
+QQ销售大冰磚
+QQ销售仿真枪
+QQ销售海洛因
+QQ销售胡椒基甲酮
+QQ销售黃牙簽
+QQ销售黄牙签
+QQ销售甲卡西酮
+QQ销售间苯三酚
+QQ销售間苯三酚
+QQ销售氯胺酮
+QQ销售麻古
+QQ销售麻谷
+QQ销售麻黃素
+QQ销售麻黄素
+QQ销售麦角酸
+QQ销售麥角酸
+QQ销售迷魂粉
+QQ销售迷魂水
+QQ销售迷魂药
+QQ销售迷魂藥
+QQ销售奶油冰
+QQ销售鉆石冰
+QQ销售青蒿素
+QQ销售三唑侖
+QQ销售神仙水
+QQ销售神仙糖
+QQ销售小冰砖
+QQ销售小冰磚
+QQ销售盐酸羟亚胺
+QQ销售鹽酸羥亞胺
+QQ销售搖頭糖
+QQ销售搖頭丸
+QQ销售摇头糖
+QQ销售摇头丸
+QQ销售乙醚
+QQ销售钻石冰
+QQ销售左旋麻黃素
+QQ销售左旋麻黄素
+qq銷售K粉
+QQ小口径手枪专卖
+qq小口径手枪专卖
+qq制作K粉
+qq制作冰毒
+qq製作K粉
+qq製作冰毒
+QQ专卖54手qiang
+QQ专卖64手qiang
+QQ专卖77手qiang
+QQ专卖92手qiang
+QQ专卖小口径步qiang
+qq专卖小口径步qiang
+QQ专卖小口径步枪
+qq专卖小口径步枪
+qq专卖小口径手qiang
+QQ专卖小口径手qiang
+qq专卖小口径手枪
+QQ专卖小口径手枪
+qq专业办假证
+qtwsj.cn
+qvod成人
+qyzyw.com
+qzheng.cn
+ra3811.com
+rbllt
+renchenwen
+resources.baomihua.com
+roombra
+sc.sina.com.cn/health
+SD-98遥控解码器
+secretchina
+sh1985
+shangfang
+shop33803734
+show.hifly.tv
+siminda
+sjjkqc.com
+skyshebei
+SM女王调教
+SN8遥控解码器
+snshf.cn
+soho.work@soho.work.info
+soufun
+spyflexispy软件
+spyflexispy下载
+ssq500w.cn
+ssq789.com
+sy01.net
+sydcch.com
+szxunyu.com
+t.cn
+t56
+tangyikang.net
+thyclub.cn
+tianya.www76xy.com/
+tinyurl.com
+tmall520.com
+tnt出售
+tnt的制作
+TNT配方
+TNT炸弹制作
+TNT炸弹制作方法
+tnt炸药成分
+tnt炸药配方
+TNT炸药制作方法
+TNT制作技术
+TNT制作完全手册
+TOGO网
+toguko
+TOPS钢鹰战斗刀专卖
+TOPS鋼鷹戰鬥刀专卖
+ttnjh
+tulesi
+tv365w.com
+ufotiy
+uoid.me/123456111
+url.cn/C0svWk
+usb电视棒QQ
+USB电视棒QQ
+usb电视棒出售
+usb电视棒电话
+usb电视棒手机
+vikki胶原蛋白
+wencongpan.cn
+win100319
+woderensheng
+woduyu.cn
+woool689
+wujie
+www.0551book.com.cn
+www.0551club.com/
+www.0551hi.com
+www.0551jcw.com
+www.0551spa.com
+www.0551ys.cn
+www.0579579.com
+www.099555.com
+www.100soft.net.cn
+www.10zk.com
+www.19lou.com
+www.1s8s.com
+www.35114.cc
+www.3658168.com
+www.52luoliao.com
+www.58.com
+www.58ggw.com
+www.5i28.cn
+www.64125.cn

+ 13 - 0
api/messagecenter/etc/messagecenter-api.yaml

@@ -12,3 +12,16 @@ Gateway:
   ServerCode: messagecenter
   Etcd:
     - 127.0.0.1:2379
+IsShunt: true
+ZhiCiUrl:
+  Pc: zcpc
+  App: zcapp
+  Wx: zcapp
+MessageUrl:
+  Pc: messagepc
+  App: messageapp
+  Wx: zcapp
+ShuntProbability: 70
+
+
+

+ 13 - 1
api/messagecenter/internal/config/config.go

@@ -12,5 +12,17 @@ type Config struct {
 		ServerCode string
 		Etcd       []string
 	}
-	WebRpcPort int64
+	WebRpcPort       int64
+	IsShunt          bool
+	ShuntProbability int64
+	ZhiCiUrl         struct {
+		Pc  string
+		App string
+		Wx  string
+	}
+	MessageUrl struct {
+		Pc  string
+		App string
+		Wx  string
+	}
 }

+ 5 - 0
api/messagecenter/internal/handler/routes.go

@@ -42,6 +42,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 				Path:    "/message/closeChatSession",
 				Handler: closeChatSessionHandler(serverCtx),
 			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/message/obtainShunt",
+				Handler: obtainShuntHandler(serverCtx),
+			},
 		},
 	)
 }

+ 5 - 5
api/messagecenter/internal/logic/closechatsessionlogic.go

@@ -1,13 +1,13 @@
 package logic
 
 import (
+	quitl "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
 	"context"
-	"messagecenter/rpc/messagecenter/messagecenter"
-
+	"github.com/zeromicro/go-zero/core/logx"
 	"messagecenter/api/messagecenter/internal/svc"
 	"messagecenter/api/messagecenter/internal/types"
-
-	"github.com/zeromicro/go-zero/core/logx"
+	"messagecenter/rpc/messagecenter/messagecenter"
 )
 
 type CloseChatSessionLogic struct {
@@ -25,7 +25,7 @@ func NewCloseChatSessionLogic(ctx context.Context, svcCtx *svc.ServiceContext) *
 }
 
 func (l *CloseChatSessionLogic) CloseChatSession(req *types.CloseSessionReq) (*types.CommonRes, error) {
-	chatMession := &messagecenter.CloseSessionReq{SessionId: req.SessionId}
+	chatMession := &messagecenter.CloseSessionReq{SessionId: quitl.Int64All(encrypt.SE.Decode4Hex(req.SessionId))}
 	resp, err := l.svcCtx.Message.CloseChatSession(l.ctx, chatMession)
 	if err != nil {
 		return nil, err

+ 11 - 8
api/messagecenter/internal/logic/createchatsessionlogic.go

@@ -1,13 +1,14 @@
 package logic
 
 import (
+	quitl "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
 	"context"
-	"messagecenter/rpc/messagecenter/messagecenter"
-
+	"fmt"
+	"github.com/zeromicro/go-zero/core/logx"
 	"messagecenter/api/messagecenter/internal/svc"
 	"messagecenter/api/messagecenter/internal/types"
-
-	"github.com/zeromicro/go-zero/core/logx"
+	"messagecenter/rpc/messagecenter/messagecenter"
 )
 
 type CreateChatSessionLogic struct {
@@ -29,22 +30,24 @@ func (l *CreateChatSessionLogic) CreateChatSession(req *types.ChatSessionReq) (*
 	if req.UserType == 1 {
 		//客服信息
 		if req.MsgType == 5 {
+			fmt.Println(req.EntUserId, req.EntId)
 			//客服建立连接
 			chatMession.AppId = req.AppId
-			chatMession.CustomerServiceId = req.EntUserId
-			chatMession.UserId = req.ReceiveId
+			chatMession.CustomerServiceId = quitl.Int64All(req.EntUserId)
+			chatMession.UserId = quitl.Int64All(encrypt.SE.Decode4Hex(quitl.InterfaceToStr(req.ReceiveId)))
 			chatMession.EntId = req.EntId
 		}
 	} else {
 		//用户建立会话
 		if req.MsgType == 4 {
 			//机器人
-			chatMession.AppId = req.ReceiveAppId
+			chatMession.AppId = req.AppId
 			chatMession.CustomerServiceId = 0
 			chatMession.UserId = req.NewUserId
-			chatMession.EntId = req.ReceiveEntId
+			chatMession.EntId = quitl.Int64All(encrypt.SE.Decode4Hex(req.ReceiveEntId))
 		}
 	}
+	chatMession.CustomerserviceName = req.CustomerserviceName
 	resp, err := l.svcCtx.Message.CreateChatSession(l.ctx, chatMession)
 	if err != nil {
 		return nil, err

+ 10 - 9
api/messagecenter/internal/logic/findmessagelogic.go

@@ -1,6 +1,8 @@
 package logic
 
 import (
+	quitl "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
 	"context"
 
 	"github.com/zeromicro/go-zero/core/logx"
@@ -26,15 +28,14 @@ func NewFindMessageLogic(ctx context.Context, svcCtx *svc.ServiceContext) *FindM
 func (l *FindMessageLogic) FindMessage(req *types.MessageReq) (*types.CommonRes, error) {
 	// todo: add your logic here and delete this line
 	resp, err := l.svcCtx.Message.FindMessage(l.ctx, &messagecenter.MessageReq{
-		UserType:      req.UserType,
-		MsgType:       req.MsgType,
-		SendId:        req.SendId,
-		PageIndex:     req.PageIndex,
-		PageSize:      req.PageSize,
-		EntUserId:     req.EntUserId,
-		EntId:         req.EntId,
-		CustomerEntId: req.CustomerEntId,
-		NewUserId:     req.NewUserId,
+		UserType:  req.UserType,
+		MsgType:   req.MsgType,
+		SendId:    quitl.Int64All(encrypt.SE.Decode4Hex(req.SendId)),
+		LastId:    req.LastId,
+		EntId:     req.EntId,
+		PageSize:  req.PageSize,
+		EntUserId: req.EntUserId,
+		NewUserId: req.NewUserId,
 	})
 	if err != nil {
 		return nil, err

+ 6 - 3
api/messagecenter/internal/logic/messageaddlogic.go

@@ -1,6 +1,9 @@
 package logic
 
 import (
+	quitl "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
+	"app.yhyue.com/moapp/jybase/fsw"
 	"context"
 	"messagecenter/rpc/messagecenter/messagecenter"
 
@@ -28,14 +31,14 @@ func (l *MessageAddLogic) MessageAdd(req *types.MessageEntity) (*types.CommonRes
 	resp, err := l.svcCtx.Message.SaveMessage(l.ctx, &messagecenter.MessageEntity{
 		OwnType:   req.OwnType,
 		Title:     req.Title,
-		SendId:    req.SendId,
-		Content:   req.Content,
+		SendId:    quitl.Int64All(encrypt.SE.Decode4Hex(req.SendId)),
+		Content:   fsw.Repl(req.Content),
 		Item:      req.Item,
 		Type:      req.Type,
 		Link:      req.Link,
 		Appid:     req.Appid,
 		ItemType:  req.ItemType,
-		ReceiveId: req.ReceiveId,
+		ReceiveId: quitl.Int64All(encrypt.SE.Decode4Hex(req.ReceiveId)),
 		NewUserId: req.NewUserId,
 		EntUserId: req.EntUserId,
 	})

+ 28 - 24
api/messagecenter/internal/types/types.go

@@ -18,7 +18,7 @@ type UserReq struct {
 	UserType  int64  `json:"userType"`
 	StartTime string `json:"startTime,optional"`
 	EndTime   string `json:"endTime,optional"`
-	NewUserId int64  `header:"newUserId,optional"`
+	NewUserId int64  `header:"newUserId"`
 	EntUserId int64  `header:"entUserId,optional"`
 }
 
@@ -29,24 +29,23 @@ type MessageEntity struct {
 	Item      int64  `json:"item"`
 	Type      int64  `json:"type"`
 	Link      string `json:"link"`
-	Appid     string `header:"appid"`
+	Appid     string `header:"appId"`
 	ItemType  int64  `json:"itemType"`
-	SendId    int64  `json:"sendId,optional"`
+	SendId    string `json:"sendId,optional"`
 	EntUserId int64  `header:"entUserId,optional"`
-	NewUserId int64  `header:"newUserId,optional"`
-	ReceiveId int64  `json:"receiveId,optional"`
+	NewUserId int64  `header:"newUserId"`
+	ReceiveId string `json:"receiveId,optional"`
 }
 
 type MessageReq struct {
-	MsgType       int64 `json:"msgType"`
-	UserType      int64 `json:"userType"`
-	SendId        int64 `json:"sendId,optional"`
-	PageIndex     int64 `json:"pageIndex"`
-	PageSize      int64 `json:"pageSize"`
-	NewUserId     int64 `header:"newUserId,optional"`
-	EntUserId     int64 `header:"entUserId,optional"`
-	EntId         int64 `header:"entId,optional"`
-	CustomerEntId int64 `json:"customerEntId,optional"`
+	MsgType   int64  `json:"msgType"`
+	UserType  int64  `json:"userType"`
+	SendId    string `json:"sendId,optional"`
+	LastId    int64  `json:"lastId,optional"`
+	PageSize  int64  `json:"pageSize"`
+	NewUserId int64  `header:"newUserId"`
+	EntUserId int64  `header:"entUserId,optional"`
+	EntId     int64  `header:"entId,optional"`
 }
 
 type CommonRes struct {
@@ -57,17 +56,22 @@ type CommonRes struct {
 }
 
 type ChatSessionReq struct {
-	MsgType      int64  `json:"msgType"`
-	UserType     int64  `json:"userType"`
-	EntId        int64  `header:"entId,optional"`
-	AppId        string `header:"appId,optional"`
-	ReceiveEntId int64  `json:"receiveEntId,optional"`
-	EntUserId    int64  `header:"entUserId,optional"`
-	NewUserId    int64  `header:"newUserId,optional"`
-	ReceiveAppId string `json:"receiveAppId,optional"`
-	ReceiveId    int64  `json:"receiveId,optional"`
+	MsgType             int64  `json:"msgType"`
+	UserType            int64  `json:"userType"`
+	EntId               int64  `header:"entId,optional"`
+	AppId               string `header:"appId"`
+	ReceiveEntId        string `json:"receiveEntId,optional"`
+	EntUserId           int64  `header:"entUserId,optional"`
+	NewUserId           int64  `header:"newUserId"`
+	ReceiveAppId        string `json:"receiveAppId,optional"`
+	ReceiveId           string `json:"receiveId,optional"`
+	CustomerserviceName string `json:"customerserviceName,optional"`
 }
 
 type CloseSessionReq struct {
-	SessionId int64 `json:"sessionId"`
+	SessionId string `json:"sessionId"`
+}
+
+type ShuntReq struct {
+	Type string `json:"type"`
 }

+ 29 - 24
api/messagecenter/messagecenter.api

@@ -14,7 +14,7 @@ type UserReq {
 	UserType  int64  `json:"userType"`
 	StartTime string `json:"startTime,optional"`
 	EndTime   string `json:"endTime,optional"`
-	NewUserId int64  `header:"newUserId,optional"`
+	NewUserId int64  `header:"newUserId"`
 	EntUserId int64  `header:"entUserId,optional"`
 }
 type MessageEntity {
@@ -24,23 +24,22 @@ type MessageEntity {
 	Item      int64  `json:"item"`
 	Type      int64  `json:"type"`
 	Link      string `json:"link"`
-	Appid     string `header:"appid"`
+	Appid     string `header:"appId"`
 	ItemType  int64  `json:"itemType"`
-	SendId    int64  `json:"sendId,optional"`
+	SendId    string `json:"sendId,optional"`
 	EntUserId int64  `header:"entUserId,optional"`
-	NewUserId int64  `header:"newUserId,optional"`
-	ReceiveId int64  `json:"receiveId,optional"`
+	NewUserId int64  `header:"newUserId"`
+	ReceiveId string `json:"receiveId,optional"`
 }
 type MessageReq {
-	MsgType       int64 `json:"msgType"`
-	UserType      int64 `json:"userType"`
-	SendId        int64 `json:"sendId,optional"`
-	PageIndex     int64 `json:"pageIndex"`
-	PageSize      int64 `json:"pageSize"`
-	NewUserId     int64 `header:"newUserId,optional"`
-	EntUserId     int64 `header:"entUserId,optional"`
-	EntId         int64 `header:"entId,optional"`
-	CustomerEntId int64 `json:"customerEntId,optional"`
+	MsgType   int64  `json:"msgType"`
+	UserType  int64  `json:"userType"`
+	SendId    string `json:"sendId,optional"`
+	LastId    int64  `json:"lastId,optional"`
+	PageSize  int64  `json:"pageSize"`
+	NewUserId int64  `header:"newUserId"`
+	EntUserId int64  `header:"entUserId,optional"`
+	EntId     int64  `header:"entId,optional"`
 }
 
 type CommonRes {
@@ -50,18 +49,22 @@ type CommonRes {
 	Count      int64       `json:"count"`
 }
 type ChatSessionReq {
-	MsgType      int64  `json:"msgType"`
-	UserType     int64  `json:"userType"`
-	EntId        int64  `header:"entId,optional"`
-	AppId        string `header:"appId,optional"`
-	ReceiveEntId int64  `json:"receiveEntId,optional"`
-	EntUserId    int64  `header:"entUserId,optional"`
-	NewUserId    int64  `header:"newUserId,optional"`
-	ReceiveAppId string `json:"receiveAppId,optional"`
-	ReceiveId    int64  `json:"receiveId,optional"`
+	MsgType             int64  `json:"msgType"`
+	UserType            int64  `json:"userType"`
+	EntId               int64  `header:"entId,optional"`
+	AppId               string `header:"appId"`
+	ReceiveEntId        string `json:"receiveEntId,optional"`
+	EntUserId           int64  `header:"entUserId,optional"`
+	NewUserId           int64  `header:"newUserId"`
+	ReceiveAppId        string `json:"receiveAppId,optional"`
+	ReceiveId           string `json:"receiveId,optional"`
+	CustomerserviceName string `json:"customerserviceName,optional"`
 }
 type CloseSessionReq {
-	SessionId int64 `json:"sessionId"`
+	SessionId string `json:"sessionId"`
+}
+type ShuntReq {
+	Type string `json:"type"`
 }
 service messagecenter-api {
 	@handler messageCount
@@ -76,4 +79,6 @@ service messagecenter-api {
 	post /message/createChatSession (ChatSessionReq) returns (CommonRes);
 	@handler closeChatSession
 	post /message/closeChatSession (CloseSessionReq) returns (CommonRes);
+	@handler obtainShunt
+	post /message/obtainShunt (ShuntReq) returns (CommonRes);
 }

+ 11 - 8
api/messagecenter/messagecenter.go

@@ -3,22 +3,26 @@ package main
 import (
 	mc "app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/endless"
+	"app.yhyue.com/moapp/jybase/fsw"
 	"app.yhyue.com/moapp/jybase/go-xweb/log"
+	"bp.jydev.jianyu360.cn/BaseService/gateway/core/node"
 	"fmt"
 	"github.com/zeromicro/go-zero/rest"
 	. "messagecenter/api/messagecenter/common"
 	_ "messagecenter/api/messagecenter/common"
 	"messagecenter/api/messagecenter/internal/handler"
 	"messagecenter/api/messagecenter/internal/svc"
+	"os"
+	"os/signal"
+	"syscall"
 )
 
 func main() {
 	//注册代理服务
-	/*closeNotify, err := node.NewNode(C.Gateway.Etcd...).Register(C.Gateway.ServerCode, mc.InterfaceToStr(C.Port))
+	closeNotify, err := node.NewNode(C.Gateway.Etcd...).Register(C.Gateway.ServerCode, mc.InterfaceToStr(C.Port))
 	if err != nil {
 		panic(err)
-	}*/
-	//
+	}
 	go func() {
 		err := endless.ListenAndServe(":"+mc.InterfaceToStr(C.WebRpcPort), nil, func() {})
 		if err != nil {
@@ -28,14 +32,13 @@ func main() {
 	ctx := svc.NewServiceContext(C)
 	server := rest.MustNewServer(C.RestConf)
 	defer server.Stop()
-
+	fsw.ReadFswDict("./baidu_fsw.dict")
+	fmt.Println(fsw.Repl("111台独"))
 	handler.RegisterHandlers(server, ctx)
-
 	fmt.Printf("Starting server at %s:%d...\n", C.Host, C.Port)
 	server.Start()
-
-	/*quit := make(chan os.Signal, 1)
+	quit := make(chan os.Signal, 1)
 	signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)
 	<-quit
-	closeNotify()*/
+	closeNotify()
 }

+ 3 - 3
go.mod

@@ -3,10 +3,10 @@ module messagecenter
 go 1.16
 
 require (
-	app.yhyue.com/moapp/jybase v0.0.0-20220617085837-48c1bf245c2f
+	app.yhyue.com/moapp/jybase v0.0.0-20220722023023-2a57d1ee061f
 	bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4
 	github.com/go-sql-driver/mysql v1.6.0
-	github.com/zeromicro/go-zero v1.3.4
-	google.golang.org/grpc v1.46.2
+	github.com/zeromicro/go-zero v1.3.5
+	google.golang.org/grpc v1.47.0
 	google.golang.org/protobuf v1.28.0
 )

+ 46 - 34
go.sum

@@ -3,8 +3,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20220415064050-37ce64b3e2d4/go.mod h1:qNRA0sHu
 app.yhyue.com/moapp/jybase v0.0.0-20220418104200-46c3fff161c7/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
 app.yhyue.com/moapp/jybase v0.0.0-20220420032112-668025915ee4/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
 app.yhyue.com/moapp/jybase v0.0.0-20220421060131-a1001013ba46/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
-app.yhyue.com/moapp/jybase v0.0.0-20220617085837-48c1bf245c2f h1:U8sVqWn/JH2gcsJqQcHFaCx/MtY1pGUwbUAc5dVkwto=
-app.yhyue.com/moapp/jybase v0.0.0-20220617085837-48c1bf245c2f/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
+app.yhyue.com/moapp/jybase v0.0.0-20220722023023-2a57d1ee061f h1:qKFSoL8wbWSS4f6bm6vQyJGf+LC2T7G5hjGwrVmFzE8=
+app.yhyue.com/moapp/jybase v0.0.0-20220722023023-2a57d1ee061f/go.mod h1:HelrO6tcD9TcKb/HOP2BLbzppyDz2kpQSFhPMQTUgbQ=
 bp.jydev.jianyu360.cn/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=
 bp.jydev.jianyu360.cn/BaseService/gateway v0.0.0-20220419090715-88ddb32961be/go.mod h1:Yj4oabIGItuMoF0BXYLz2XAnF581kxgXBrvlUtIJrkI=
 bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4 h1:zl5eZrKDBENVVBUiPpzyQQ0/SBdGUmZS3thXycSEO1g=
@@ -65,7 +65,7 @@ github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi
 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
 github.com/ClickHouse/clickhouse-go v1.5.1/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
 github.com/ClickHouse/clickhouse-go v1.5.4/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
-github.com/ClickHouse/clickhouse-go/v2 v2.0.14/go.mod h1:iq2DUGgpA4BBki2CVwrF8x43zqBjdgHtbexkFkh5a6M=
+github.com/ClickHouse/clickhouse-go/v2 v2.2.0/go.mod h1:8f2XZUi7XoeU+uPIytSi1cvx8fmJxi7vIgqpvYTF1+o=
 github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
 github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
 github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
@@ -81,8 +81,8 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5
 github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk=
 github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
 github.com/alicebob/miniredis/v2 v2.17.0/go.mod h1:gquAfGbzn92jvtrSC69+6zZnwSODVXVpYDRaGhWaL6I=
-github.com/alicebob/miniredis/v2 v2.21.0 h1:CdmwIlKUWFBDS+4464GtQiQ0R1vpzOgu4Vnd74rBL7M=
-github.com/alicebob/miniredis/v2 v2.21.0/go.mod h1:XNqvJdQJv5mSuVMc0ynneafpnL/zv52acZ6kqeS0t88=
+github.com/alicebob/miniredis/v2 v2.22.0 h1:lIHHiSkEyS1MkKHCHzN+0mWrA4YdbGdimE5iZ2sHSzo=
+github.com/alicebob/miniredis/v2 v2.22.0/go.mod h1:XNqvJdQJv5mSuVMc0ynneafpnL/zv52acZ6kqeS0t88=
 github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
 github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
 github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48=
@@ -182,6 +182,7 @@ github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jT
 github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
 github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
 github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
+github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
 github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
 github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
 github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
@@ -231,8 +232,8 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a
 github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
 github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
 github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
-github.com/golang-jwt/jwt/v4 v4.4.1 h1:pC5DB52sCeK48Wlb9oPcdhnjkz1TKt1D/P7WKJ0kUcQ=
-github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
+github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs=
+github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
 github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
 github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
@@ -281,8 +282,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
 github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
+github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
+github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
@@ -449,16 +451,16 @@ github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYr
 github.com/openzipkin/zipkin-go v0.3.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ=
 github.com/openzipkin/zipkin-go v0.4.0 h1:CtfRrOVZtbDj8rt1WXjklw0kqqJQwICrCKmlfUuBUUw=
 github.com/openzipkin/zipkin-go v0.4.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ=
-github.com/paulmach/orb v0.5.0/go.mod h1:FWRlTgl88VI1RBx/MkrwWDRhQ96ctqMCh8boXhmqB/A=
+github.com/paulmach/orb v0.7.1/go.mod h1:FWRlTgl88VI1RBx/MkrwWDRhQ96ctqMCh8boXhmqB/A=
 github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY=
 github.com/pelletier/go-toml v1.7.0 h1:7utD74fnzVc/cpcyy8sjrlFr5vYpypUixARcHIMIGuI=
 github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE=
-github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU=
-github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
+github.com/pelletier/go-toml/v2 v2.0.2 h1:+jQXlF3scKIcSEKkdHzXhCTDLPFi5r1wnK6yPS+49Gw=
+github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI=
 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
 github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
 github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
-github.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
+github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
 github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@@ -525,16 +527,20 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An
 github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=
 github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
+github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4=
+github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
 github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
 github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
 github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
 github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
 github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
+github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
+github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
 github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=
 github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
 github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk=
@@ -559,9 +565,10 @@ github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
 github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA=
 github.com/yuin/gopher-lua v0.0.0-20210529063254-f4c35e4016d9 h1:k/gmLsJDWwWqbLCur2yWnJzwQEKRcAHXo6seXGuSwWw=
 github.com/yuin/gopher-lua v0.0.0-20210529063254-f4c35e4016d9/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA=
+github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
 github.com/zeromicro/go-zero v1.3.2/go.mod h1:DEj3Fwj1Ui1ltsgf6YqwTL9nD4+tYzIRX0c1pWtQo1E=
-github.com/zeromicro/go-zero v1.3.4 h1:XeNdwcrOmnvHj891AmeCA9RrRj1PeN49//KKCK4WAXk=
-github.com/zeromicro/go-zero v1.3.4/go.mod h1:nEU/ITZSmxRxvr/JmSoJ48MNV62UpY6bqJz9Voba7Yw=
+github.com/zeromicro/go-zero v1.3.5 h1:+3T4Rx/5o/EgLuCE3Qo4X0i+3GCHRYEgkabmfKhhQ7Q=
+github.com/zeromicro/go-zero v1.3.5/go.mod h1:wh4o794b7Ul3W0k35Pw9nc3iB4O0OpaQTMQz/PJc1bc=
 go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A=
 go.etcd.io/etcd/api/v3 v3.5.4 h1:OHVyt3TopwtUQ2GKdd5wu3PmmipR4FTwCqoEjSyRdIc=
 go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A=
@@ -582,22 +589,24 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
 go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
 go.opentelemetry.io/otel v1.0.0/go.mod h1:AjRVh9A5/5DE7S+mZtTR6t8vpKKryam+0lREnfmS4cg=
 go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs=
-go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM=
 go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
+go.opentelemetry.io/otel v1.8.0 h1:zcvBFizPbpa1q7FehvFiHbQwGzmPILebO0tyqIR5Djg=
+go.opentelemetry.io/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM=
 go.opentelemetry.io/otel/exporters/jaeger v1.3.0/go.mod h1:KoYHi1BtkUPncGSRtCe/eh1ijsnePhSkxwzz07vU0Fc=
-go.opentelemetry.io/otel/exporters/jaeger v1.7.0 h1:wXgjiRldljksZkZrldGVe6XrG9u3kYDyQmkZwmm5dI0=
-go.opentelemetry.io/otel/exporters/jaeger v1.7.0/go.mod h1:PwQAOqBgqbLQRKlj466DuD2qyMjbtcPpfPfj+AqbSBs=
+go.opentelemetry.io/otel/exporters/jaeger v1.8.0 h1:TLLqD6kDhLPziEC7pgPrMvP9lAqdk3n1gf8DiFSnfW8=
+go.opentelemetry.io/otel/exporters/jaeger v1.8.0/go.mod h1:GbWg+ng88rDtx+id26C34QLqw2erqJeAjsCx9AFeHfE=
 go.opentelemetry.io/otel/exporters/zipkin v1.3.0/go.mod h1:LxGGfHIYbvsFnrJtBcazb0yG24xHdDGrT/H6RB9r3+8=
-go.opentelemetry.io/otel/exporters/zipkin v1.7.0 h1:X0FZj+kaIdLi29UiyrEGDhRTYsEXj9GdEW5Y39UQFEE=
-go.opentelemetry.io/otel/exporters/zipkin v1.7.0/go.mod h1:9YBXeOMFLQGwNEjsxMRiWPGoJX83usGMhbCmxUbNe5I=
+go.opentelemetry.io/otel/exporters/zipkin v1.8.0 h1:PIAiDdROZzATAFfxr5ASYuSOG0JIJxRq3GwlpJGbSYQ=
+go.opentelemetry.io/otel/exporters/zipkin v1.8.0/go.mod h1:0uYAyCuGT67MFV9Z/Mmx93wGuugHw0FbxMc74fs3LNo=
 go.opentelemetry.io/otel/sdk v1.0.0/go.mod h1:PCrDHlSy5x1kjezSdL37PhbFUMjrsLRshJ2zCzeXwbM=
 go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs=
-go.opentelemetry.io/otel/sdk v1.7.0 h1:4OmStpcKVOfvDOgCt7UriAPtKolwIhxpnSNI/yK+1B0=
-go.opentelemetry.io/otel/sdk v1.7.0/go.mod h1:uTEOTwaqIVuTGiJN7ii13Ibp75wJmYUDe374q6cZwUU=
+go.opentelemetry.io/otel/sdk v1.8.0 h1:xwu69/fNuwbSHWe/0PGS888RmjWY181OmcXDQKu7ZQk=
+go.opentelemetry.io/otel/sdk v1.8.0/go.mod h1:uPSfc+yfDH2StDM/Rm35WE8gXSNdvCg023J6HeGNO0c=
 go.opentelemetry.io/otel/trace v1.0.0/go.mod h1:PXTWqayeFUlJV1YDNhsJYB184+IvAH814St6o6ajzIs=
 go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk=
-go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJqC6o=
 go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
+go.opentelemetry.io/otel/trace v1.8.0 h1:cSy0DF9eGI5WIfNwZ1q2iUyGj00tGzP24dE1lOlHrfY=
+go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4=
 go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
 go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
 go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
@@ -703,8 +712,8 @@ golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qx
 golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
 golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
 golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
-golang.org/x/net v0.0.0-20220421235706-1d1ef9303861 h1:yssD99+7tqHWO5Gwh81phT+67hg+KttniBr6UnEXOY8=
-golang.org/x/net v0.0.0-20220421235706-1d1ef9303861/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220531201128-c960675eff93 h1:MYimHLfoXEpOhqd/zgoA/uoXzHB86AEky4LAx5ij9xA=
+golang.org/x/net v0.0.0-20220531201128-c960675eff93/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
 golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -745,6 +754,7 @@ golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -790,8 +800,9 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc
 golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220429233432-b5fbb4746d32 h1:Js08h5hqB5xyWR789+QqueR6sDE8mk+YvpETZ+F6X9Y=
 golang.org/x/sys v0.0.0-20220429233432-b5fbb4746d32/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k=
+golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@@ -870,7 +881,6 @@ golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
 google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
@@ -929,8 +939,8 @@ google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6D
 google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
 google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
 google.golang.org/genproto v0.0.0-20220228195345-15d65a4533f7/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
-google.golang.org/genproto v0.0.0-20220422154200-b37d22cd5731 h1:nquqdM9+ps0JZcIiI70+tqoaIFS5Ql4ZuK8UXnz3HfE=
-google.golang.org/genproto v0.0.0-20220422154200-b37d22cd5731/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
+google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM=
+google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To=
 google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
 google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
 google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@@ -949,8 +959,9 @@ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ
 google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k=
 google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
-google.golang.org/grpc v1.46.2 h1:u+MLGgVf7vRdjEYZ8wDFhAVNmhkbJ5hmrA1LMWK1CAQ=
 google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
+google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8=
+google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
 google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
 google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
 google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -995,8 +1006,9 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
 gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 gorm.io/driver/mysql v1.0.5 h1:WAAmvLK2rG0tCOqrf5XcLi2QUwugd4rcVJ/W3aoon9o=
 gorm.io/driver/mysql v1.0.5/go.mod h1:N1OIhHAIhx5SunkMGqWbGFVeh4yTNWKmMo1GOAsohLI=
 gorm.io/gorm v1.21.3 h1:qDFi55ZOsjZTwk5eN+uhAmHi8GysJ/qCTichM/yO7ME=
@@ -1027,8 +1039,8 @@ k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAG
 k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw=
 k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
-k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc=
-k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
+k8s.io/utils v0.0.0-20220706174534-f6158b442e7c h1:hFZO68mv/0xe8+V0gRT9BAq3/31cKjjeVv4nScriuBk=
+k8s.io/utils v0.0.0-20220706174534-f6158b442e7c/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
 rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=

+ 3 - 1
rpc/messagecenter/internal/logic/createchatsessionlogic.go

@@ -1,6 +1,8 @@
 package logic
 
 import (
+	quitl "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
 	"context"
 	"messagecenter/service"
 
@@ -36,7 +38,7 @@ func (l *CreateChatSessionLogic) CreateChatSession(in *messagecenter.ChatSession
 	return &messagecenter.ChatSessionResp{
 		ErrorCode: error_code,
 		ErrorMsg:  error_message,
-		SessionId: sessionId,
+		SessionId: encrypt.SE.Encode2Hex(quitl.InterfaceToStr(sessionId)),
 	}, nil
 
 }

+ 1 - 0
rpc/messagecenter/internal/logic/findmessagelogic.go

@@ -45,6 +45,7 @@ func (l *FindMessageLogic) FindMessage(in *messagecenter.MessageReq) (*messagece
 			RobotImg:   quitl.ObjToString(v["robotImg"]),
 			SetName:    quitl.ObjToString(v["setName"]),
 			OwnImg:     quitl.ObjToString(v["ownImg"]),
+			MessageId:  quitl.Int64All(v["messageId"]),
 		}
 		list = append(list, &messageEntity)
 	}

+ 2 - 2
rpc/messagecenter/internal/logic/userlistlogic.go

@@ -1,6 +1,7 @@
 package logic
 
 import (
+	"app.yhyue.com/moapp/jybase/encrypt"
 	"context"
 	"messagecenter/service"
 
@@ -44,8 +45,7 @@ func (l *UserListLogic) UserList(in *messagecenter.UserReq) (*messagecenter.User
 			CreateTime: quitl.ObjToString(v["create_time"]),
 			UserType:   quitl.Int64All(v["userType"]),
 			Number:     quitl.Int64All(v["number"]),
-			UserId:     quitl.Int64All(v["id"]),
-			AllNumber:  quitl.Int64All(v["allNumber"]),
+			UserId:     encrypt.SE.Encode2Hex(quitl.InterfaceToStr(v["id"])),
 			Headimg:    quitl.ObjToString(v["headimg"]),
 		}
 		result = append(result, &userResp)

+ 6 - 5
rpc/messagecenter/messagecenter.proto

@@ -28,7 +28,7 @@ message UserResp {
    string error_msg = 3; //响应消息
 }
 message UserEntity {
-  int64 userId = 1;
+  string userId = 1;
   string name= 2;
   string title = 3;
   int64 type= 4;
@@ -37,13 +37,12 @@ message UserEntity {
   int64 userType = 7;
   string create_time= 8;
   int64 number= 9;
-  int64 allNumber=10;
   string headimg=11;
 }
 message MessageReq {
   int64         msgType = 1;     // 消息类型 ;1:站内信消息 2:点对点消息 3:群消息 4:机器人消息 5:客服消息
   int64         userType=6;      //用户类型:2用户1客服
-  int64         pageIndex = 2;
+  int64         LastId = 2;
   int64         pageSize = 3;
   int64         sendId = 4;
   int64         newUserId = 5;
@@ -76,13 +75,15 @@ message MessageEntity {
   string        setName=15;
   int64         receiveId=17;
   string        ownImg=18;
+  int64         messageId=19;
 }
 
 message ChatSessionReq {
   int64         entId = 1;
   int64         customerServiceId= 2;
   int64         userId = 3;
-  string         appId = 4;
+  string        appId = 4;
+  string        customerserviceName=5;
 }
 message CloseSessionReq {
   int64         sessionId = 1;
@@ -90,7 +91,7 @@ message CloseSessionReq {
 message ChatSessionResp {
    int64 error_code = 2; //响应代码
    string error_msg = 1; //响应消息
-   int64  sessionId=3;
+   string  sessionId=3;
 }
 
 service messageCenter {

+ 139 - 129
rpc/messagecenter/messagecenter/messagecenter.pb.go

@@ -301,7 +301,7 @@ type UserEntity struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	UserId     int64  `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
+	UserId     string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
 	Name       string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
 	Title      string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
 	Type       int64  `protobuf:"varint,4,opt,name=type,proto3" json:"type,omitempty"`
@@ -310,7 +310,6 @@ type UserEntity struct {
 	UserType   int64  `protobuf:"varint,7,opt,name=userType,proto3" json:"userType,omitempty"`
 	CreateTime string `protobuf:"bytes,8,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
 	Number     int64  `protobuf:"varint,9,opt,name=number,proto3" json:"number,omitempty"`
-	AllNumber  int64  `protobuf:"varint,10,opt,name=allNumber,proto3" json:"allNumber,omitempty"`
 	Headimg    string `protobuf:"bytes,11,opt,name=headimg,proto3" json:"headimg,omitempty"`
 }
 
@@ -346,11 +345,11 @@ func (*UserEntity) Descriptor() ([]byte, []int) {
 	return file_messageCenter_proto_rawDescGZIP(), []int{4}
 }
 
-func (x *UserEntity) GetUserId() int64 {
+func (x *UserEntity) GetUserId() string {
 	if x != nil {
 		return x.UserId
 	}
-	return 0
+	return ""
 }
 
 func (x *UserEntity) GetName() string {
@@ -409,13 +408,6 @@ func (x *UserEntity) GetNumber() int64 {
 	return 0
 }
 
-func (x *UserEntity) GetAllNumber() int64 {
-	if x != nil {
-		return x.AllNumber
-	}
-	return 0
-}
-
 func (x *UserEntity) GetHeadimg() string {
 	if x != nil {
 		return x.Headimg
@@ -430,7 +422,7 @@ type MessageReq struct {
 
 	MsgType       int64 `protobuf:"varint,1,opt,name=msgType,proto3" json:"msgType,omitempty"`   // 消息类型 ;1:站内信消息 2:点对点消息 3:群消息 4:机器人消息 5:客服消息
 	UserType      int64 `protobuf:"varint,6,opt,name=userType,proto3" json:"userType,omitempty"` //用户类型:2用户1客服
-	PageIndex     int64 `protobuf:"varint,2,opt,name=pageIndex,proto3" json:"pageIndex,omitempty"`
+	LastId        int64 `protobuf:"varint,2,opt,name=LastId,proto3" json:"LastId,omitempty"`
 	PageSize      int64 `protobuf:"varint,3,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
 	SendId        int64 `protobuf:"varint,4,opt,name=sendId,proto3" json:"sendId,omitempty"`
 	NewUserId     int64 `protobuf:"varint,5,opt,name=newUserId,proto3" json:"newUserId,omitempty"`
@@ -485,9 +477,9 @@ func (x *MessageReq) GetUserType() int64 {
 	return 0
 }
 
-func (x *MessageReq) GetPageIndex() int64 {
+func (x *MessageReq) GetLastId() int64 {
 	if x != nil {
-		return x.PageIndex
+		return x.LastId
 	}
 	return 0
 }
@@ -628,6 +620,7 @@ type MessageEntity struct {
 	SetName    string `protobuf:"bytes,15,opt,name=setName,proto3" json:"setName,omitempty"`
 	ReceiveId  int64  `protobuf:"varint,17,opt,name=receiveId,proto3" json:"receiveId,omitempty"`
 	OwnImg     string `protobuf:"bytes,18,opt,name=ownImg,proto3" json:"ownImg,omitempty"`
+	MessageId  int64  `protobuf:"varint,19,opt,name=messageId,proto3" json:"messageId,omitempty"`
 }
 
 func (x *MessageEntity) Reset() {
@@ -788,15 +781,23 @@ func (x *MessageEntity) GetOwnImg() string {
 	return ""
 }
 
+func (x *MessageEntity) GetMessageId() int64 {
+	if x != nil {
+		return x.MessageId
+	}
+	return 0
+}
+
 type ChatSessionReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	EntId             int64  `protobuf:"varint,1,opt,name=entId,proto3" json:"entId,omitempty"`
-	CustomerServiceId int64  `protobuf:"varint,2,opt,name=customerServiceId,proto3" json:"customerServiceId,omitempty"`
-	UserId            int64  `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"`
-	AppId             string `protobuf:"bytes,4,opt,name=appId,proto3" json:"appId,omitempty"`
+	EntId               int64  `protobuf:"varint,1,opt,name=entId,proto3" json:"entId,omitempty"`
+	CustomerServiceId   int64  `protobuf:"varint,2,opt,name=customerServiceId,proto3" json:"customerServiceId,omitempty"`
+	UserId              int64  `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"`
+	AppId               string `protobuf:"bytes,4,opt,name=appId,proto3" json:"appId,omitempty"`
+	CustomerserviceName string `protobuf:"bytes,5,opt,name=customerserviceName,proto3" json:"customerserviceName,omitempty"`
 }
 
 func (x *ChatSessionReq) Reset() {
@@ -859,6 +860,13 @@ func (x *ChatSessionReq) GetAppId() string {
 	return ""
 }
 
+func (x *ChatSessionReq) GetCustomerserviceName() string {
+	if x != nil {
+		return x.CustomerserviceName
+	}
+	return ""
+}
+
 type CloseSessionReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -913,7 +921,7 @@ type ChatSessionResp struct {
 
 	ErrorCode int64  `protobuf:"varint,2,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` //响应代码
 	ErrorMsg  string `protobuf:"bytes,1,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"`     //响应消息
-	SessionId int64  `protobuf:"varint,3,opt,name=sessionId,proto3" json:"sessionId,omitempty"`
+	SessionId string `protobuf:"bytes,3,opt,name=sessionId,proto3" json:"sessionId,omitempty"`
 }
 
 func (x *ChatSessionResp) Reset() {
@@ -962,11 +970,11 @@ func (x *ChatSessionResp) GetErrorMsg() string {
 	return ""
 }
 
-func (x *ChatSessionResp) GetSessionId() int64 {
+func (x *ChatSessionResp) GetSessionId() string {
 	if x != nil {
 		return x.SessionId
 	}
-	return 0
+	return ""
 }
 
 var File_messageCenter_proto protoreflect.FileDescriptor
@@ -1005,8 +1013,8 @@ var file_messageCenter_proto_rawDesc = []byte{
 	0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43,
 	0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67,
 	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67,
-	0x22, 0x9d, 0x02, 0x0a, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12,
-	0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x22, 0xff, 0x01, 0x0a, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12,
+	0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
 	0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
 	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74,
 	0x69, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c,
@@ -1019,115 +1027,117 @@ var file_messageCenter_proto_rawDesc = []byte{
 	0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08,
 	0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65,
 	0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x4e,
-	0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x6c, 0x6c,
-	0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x69, 0x6d,
-	0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x69, 0x6d, 0x67,
-	0x22, 0x8c, 0x02, 0x0a, 0x0a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12,
-	0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65,
-	0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x75, 0x73, 0x65,
-	0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64,
-	0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e,
-	0x64, 0x65, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18,
-	0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12,
-	0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73,
-	0x65, 0x72, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x55,
-	0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72,
-	0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65,
-	0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x75, 0x73,
-	0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x49, 0x64, 0x22,
-	0x91, 0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12,
-	0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
-	0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20,
-	0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e,
-	0x74, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74,
-	0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72,
-	0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72,
-	0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
-	0x6d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72,
-	0x4d, 0x73, 0x67, 0x22, 0xdb, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45,
-	0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63,
-	0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f,
-	0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70,
-	0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a,
-	0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e,
-	0x6b, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65,
-	0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69,
-	0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x74, 0x65, 0x6d,
-	0x54, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x74, 0x65, 0x6d,
-	0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x09,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09,
-	0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65,
-	0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e,
-	0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x5f,
-	0x74, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x54,
-	0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6f, 0x6f, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28,
-	0x03, 0x52, 0x04, 0x66, 0x6f, 0x6f, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x6f, 0x62, 0x6f, 0x74,
-	0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x6f, 0x62, 0x6f,
-	0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x49, 0x6d,
-	0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x49, 0x6d,
-	0x67, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72,
-	0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x49, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
-	0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x77, 0x6e,
-	0x49, 0x6d, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x77, 0x6e, 0x49, 0x6d,
-	0x67, 0x22, 0x82, 0x01, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f,
-	0x6e, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x63, 0x75,
-	0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18,
-	0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53,
-	0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72,
-	0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
-	0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0x2f, 0x0a, 0x0f, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53,
-	0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73,
-	0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65,
-	0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x6b, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x74, 0x53,
-	0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72,
-	0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
-	0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72,
-	0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72,
-	0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f,
-	0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69,
-	0x6f, 0x6e, 0x49, 0x64, 0x32, 0xbf, 0x03, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12,
-	0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e,
-	0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
-	0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65,
-	0x73, 0x70, 0x12, 0x3b, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16,
-	0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x55,
-	0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12,
-	0x44, 0x0a, 0x0b, 0x46, 0x69, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19,
+	0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64,
+	0x69, 0x6d, 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x69,
+	0x6d, 0x67, 0x22, 0x86, 0x02, 0x0a, 0x0a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65,
+	0x71, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75,
+	0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x75,
+	0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x4c, 0x61, 0x73, 0x74, 0x49,
+	0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x64, 0x12,
+	0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73,
+	0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x65, 0x6e,
+	0x64, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
+	0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49,
+	0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x07,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12,
+	0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
+	0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
+	0x72, 0x45, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x75,
+	0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x91, 0x01, 0x0a, 0x0b,
+	0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x63,
+	0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e,
+	0x74, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
+	0x1c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e,
+	0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x04, 0x64,
+	0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64,
+	0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f,
+	0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x22,
+	0xf9, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74,
+	0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
+	0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
+	0x74, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e,
+	0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x1f, 0x0a,
+	0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14,
+	0x0a, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61,
+	0x70, 0x70, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65,
+	0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65,
+	0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55,
+	0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74,
+	0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65,
+	0x72, 0x49, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73,
+	0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65,
+	0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12,
+	0x12, 0x0a, 0x04, 0x66, 0x6f, 0x6f, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66,
+	0x6f, 0x6f, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x4e, 0x61, 0x6d, 0x65,
+	0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x4e, 0x61, 0x6d,
+	0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x49, 0x6d, 0x67, 0x18, 0x0e, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x49, 0x6d, 0x67, 0x12, 0x18, 0x0a,
+	0x07, 0x73, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
+	0x73, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x65, 0x69,
+	0x76, 0x65, 0x49, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x65, 0x63, 0x65,
+	0x69, 0x76, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x77, 0x6e, 0x49, 0x6d, 0x67, 0x18,
+	0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x77, 0x6e, 0x49, 0x6d, 0x67, 0x12, 0x1c, 0x0a,
+	0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x22, 0xb4, 0x01, 0x0a, 0x0e,
+	0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x14,
+	0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65,
+	0x6e, 0x74, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72,
+	0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+	0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70,
+	0x70, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64,
+	0x12, 0x30, 0x0a, 0x13, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x73, 0x65, 0x72, 0x76,
+	0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x63,
+	0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61,
+	0x6d, 0x65, 0x22, 0x2f, 0x0a, 0x0f, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69,
+	0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
+	0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f,
+	0x6e, 0x49, 0x64, 0x22, 0x6b, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69,
+	0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
+	0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f,
+	0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d,
+	0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d,
+	0x73, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64,
+	0x32, 0xbf, 0x03, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x65, 0x6e, 0x74,
+	0x65, 0x72, 0x12, 0x3a, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x2e, 0x6d, 0x65,
+	0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x75, 0x6e,
+	0x74, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65,
+	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3b,
+	0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x6d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52,
+	0x65, 0x71, 0x1a, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74,
+	0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x44, 0x0a, 0x0b, 0x46,
+	0x69, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x2e, 0x6d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61,
+	0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63,
+	0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73,
+	0x70, 0x12, 0x47, 0x0a, 0x0b, 0x53, 0x61, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+	0x12, 0x1c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72,
+	0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x1a, 0x1a,
 	0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x4d,
-	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73,
-	0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
-	0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x47, 0x0a, 0x0b, 0x53, 0x61, 0x76, 0x65, 0x4d, 0x65, 0x73,
-	0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65,
-	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69,
-	0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74,
-	0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x52,
-	0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73,
-	0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e,
-	0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x52, 0x0a, 0x11, 0x43, 0x72,
+	0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12,
+	0x1d, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e,
+	0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1e,
+	0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43,
+	0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x52,
+	0x0a, 0x10, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69,
+	0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74,
+	0x65, 0x72, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52,
 	0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74,
 	0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65,
-	0x73, 0x70, 0x12, 0x52, 0x0a, 0x10, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x68, 0x61, 0x74, 0x53,
-	0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, 0x73,
-	0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69,
-	0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x42, 0x11, 0x5a, 0x0f, 0x2e, 0x2f, 0x6d, 0x65, 0x73, 0x73,
-	0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
-	0x33,
+	0x73, 0x70, 0x42, 0x11, 0x5a, 0x0f, 0x2e, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63,
+	0x65, 0x6e, 0x74, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (

+ 34 - 17
rpc/messagecenter/test/message_test.go

@@ -1,8 +1,10 @@
 package test
 
 import (
+	"app.yhyue.com/moapp/jybase/encrypt"
 	"context"
 	"flag"
+	"fmt"
 	"github.com/zeromicro/go-zero/core/conf"
 	"github.com/zeromicro/go-zero/zrpc"
 	"log"
@@ -24,11 +26,7 @@ func Test_Count(t *testing.T) {
 	ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
 	TestSystem := messagecenter.NewMessageCenter(zrpc.MustNewClient(c.TestConf))
 	req := &messagecenter.CountReq{
-		MsgType:   5,
-		UserType:  2,
-		SendId:    "",
-		EntId:     10000,
-		ReceiveId: "2",
+		UserType: 2,
 	}
 	res, err := TestSystem.Count(ctx, req)
 	log.Println("res ", res)
@@ -40,11 +38,12 @@ func Test_UserList(t *testing.T) {
 	ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
 	TestSystem := messagecenter.NewMessageCenter(zrpc.MustNewClient(c.TestConf))
 	req := &messagecenter.UserReq{
-		Phone:             "",
-		UserType:          1,
-		StartTime:         "",
-		CustomerServiceId: "3",
-		EndTime:           "",
+		Phone:     "",
+		UserType:  1,
+		StartTime: "",
+		EndTime:   "",
+		NewUserId: 831,
+		EntUserId: 4271,
 	}
 	res, err := TestSystem.UserList(ctx, req)
 	log.Println("res ", res)
@@ -56,12 +55,11 @@ func Test_FindMessage(t *testing.T) {
 	ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
 	TestSystem := messagecenter.NewMessageCenter(zrpc.MustNewClient(c.TestConf))
 	req := &messagecenter.MessageReq{
-		MsgType:   5,
+		MsgType:   4,
 		UserType:  1,
-		SendId:    "2",
-		OwnId:     "3",
-		PageSize:  1,
-		PageIndex: 2,
+		SendId:    1180,
+		PageSize:  10,
+		NewUserId: 831,
 	}
 	res, err := TestSystem.FindMessage(ctx, req)
 	log.Println("res ", res)
@@ -79,8 +77,8 @@ func Test_SaveMessage(t *testing.T) {
 		ItemType:  4,
 		Link:      "1111",
 		Appid:     "10000",
-		ReceiveId: "2",
-		SendId:    "3",
+		ReceiveId: 2,
+		SendId:    3,
 		OwnType:   int64(2),
 		Type:      1,
 	}
@@ -88,3 +86,22 @@ func Test_SaveMessage(t *testing.T) {
 	log.Println("res ", res)
 	log.Println("err ", err)
 }
+
+//聊天保存
+func Test_test1(t *testing.T) {
+	a := encrypt.SE.Encode2HexByCheck("14184")
+	fmt.Println(a)
+	fmt.Println(encrypt.SE.Decode4HexByCheck(a))
+	fmt.Println(encrypt.SE.Decode4Hex("455b415651"))
+	/*for d := 0; d <10 ; d++ {
+		c:=0
+		for i := 0; i <= 10000; i++ {
+			b:=rand.New(rand.NewSource(time.Now().UnixNano())).Int63n(100)
+			if b<=50{
+				c++
+			}
+		}
+		fmt.Println(c)
+	}*/
+
+}

+ 93 - 38
service/message_mail_box.go

@@ -1,6 +1,7 @@
 package service
 
 import (
+	quitl "app.yhyue.com/moapp/jybase/common"
 	"database/sql"
 	"fmt"
 	"log"
@@ -36,8 +37,8 @@ func (b MessaggeService) UserList(in *messagecenter.UserReq) (data *[]map[string
 	sqlStr := ""
 	if in.UserType == 2 {
 		//用户的列表
-		sqlStr = "SELECT IF ( b.nickname = '', REPLACE(b.phone,SUBSTR(b.phone,4,4),'****'), b.nickname ) AS name, b.id, e.title, b.headimg, e.type, e.link, e.content, 2 AS userType, a.create_time, a.type AS itemType, ( SELECT  count( h.id )  FROM  socialize_message_mailbox h  WHERE  h.type = 2   AND h.own_id = ?   AND h.own_type = 2   AND ( h.receive_user_id = ? OR h.send_user_id = ? )   AND h.isread = 0  ) AS number  FROM socialize_message_mailbox a LEFT JOIN base_user b ON  b.id = a.receive_user_id or  b.id = a.send_user_id  LEFT JOIN socialize_message e ON e.id = a.messag_id  WHERE a.id IN ( SELECT  MAX( c.id ) AS id  FROM  socialize_message_mailbox c  WHERE  c.own_id = ?   AND c.type = 2   AND c.own_type = 2  GROUP BY  (  CASE        WHEN c.send_user_id > c.receive_user_id THEN    CONCAT( c.send_user_id, c.receive_user_id )     WHEN c.send_user_id < c.receive_user_id THEN    CONCAT( c.receive_user_id, c.send_user_id )    END    )   )   AND b.id != ? UNION ALL SELECT  '剑鱼标讯' AS name,    b.ent_id AS id,  e.title,'' AS headimg,  e.type,  e.link,  e.content,  5 AS userType,  a.create_time,  a.type AS itemType,  (  SELECT   count( h.id )   FROM   socialize_message_mailbox h   WHERE   ( h.type = 4 OR h.type = 5 or  h.type = 6 )    AND h.own_id = ?    AND h.own_type = 2   AND  IF   ( h.send_user_type = 1, h.receive_user_id = ?, h.send_user_id = ? )    AND h.isread = 0   ) AS number  FROM  socialize_message_mailbox a  LEFT JOIN socialize_chat_session b ON IF  ( a.send_user_type = 1, b.id = a.send_user_id, b.id = a.receive_user_id )  LEFT JOIN socialize_message e ON e.id = a.messag_id  WHERE  a.id IN (  SELECT   max( c.id )   FROM   socialize_message_mailbox c   LEFT JOIN socialize_chat_session d ON  IF   ( c.send_user_type = 1, d.id = c.send_user_id, d.id = c.receive_user_id )   WHERE   c.own_id = ?    AND ( c.type = 4 OR c.type = 5 OR c.type = 6 )    AND c.own_type = 2  and   d.user_id=c.own_id  GROUP BY   d.ent_id    )  ORDER BY create_time DESC"
-		v = append(v, in.NewUserId, in.NewUserId, in.NewUserId, in.NewUserId, in.NewUserId, in.NewUserId, in.NewUserId, in.NewUserId, in.NewUserId)
+		sqlStr = "SELECT IF ( b.nickname = '', REPLACE(b.phone,SUBSTR(b.phone,4,4),'****'), b.nickname ) AS name, b.id, e.title, b.headimg, e.type, e.link, e.content, 2 AS userType, a.create_time, a.type AS itemType, ( SELECT  count( h.id )  FROM  socialize_message_mailbox h  WHERE  h.type = 2   AND h.own_id = ?   AND h.own_type = 2   AND  h.receive_user_id = ? and   h.send_user_id=b.id   AND h.isread = 0  ) AS number  FROM socialize_message_mailbox a LEFT JOIN base_user b ON  b.id = a.receive_user_id or  b.id = a.send_user_id  LEFT JOIN socialize_message e ON e.id = a.messag_id  WHERE a.id IN ( SELECT  MAX( c.id ) AS id  FROM  socialize_message_mailbox c  WHERE  c.own_id = ?   AND c.type = 2   AND c.own_type = 2  GROUP BY  (  CASE        WHEN c.send_user_id > c.receive_user_id THEN    CONCAT( c.send_user_id, c.receive_user_id )     WHEN c.send_user_id < c.receive_user_id THEN    CONCAT( c.receive_user_id, c.send_user_id )    END    )   )   AND b.id != ? UNION ALL SELECT  '剑鱼标讯' AS name,    b.ent_id AS id,  e.title,'' AS headimg,  e.type,  e.link,  e.content,  1 AS userType,  a.create_time,  a.type AS itemType,  (  SELECT   count( h.id )   FROM   socialize_message_mailbox h   WHERE   ( h.type = 4 OR h.type = 5  )    AND h.own_id = ?    AND h.own_type = 2   AND  h.send_user_type = 1 and  h.receive_user_id = ?    AND h.isread = 0   ) AS number  FROM  socialize_message_mailbox a  LEFT JOIN socialize_chat_session b ON IF  ( a.send_user_type = 1, b.id = a.send_user_id, b.id = a.receive_user_id )  LEFT JOIN socialize_message e ON e.id = a.messag_id  WHERE  a.id IN (  SELECT   max( c.id )   FROM   socialize_message_mailbox c   LEFT JOIN socialize_chat_session d ON  IF   ( c.send_user_type = 1, d.id = c.send_user_id, d.id = c.receive_user_id )   WHERE   c.own_id = ?    AND ( c.type = 4 OR c.type = 5  )    AND c.own_type = 2  and   d.user_id=c.own_id  GROUP BY   d.ent_id    )  ORDER BY create_time DESC"
+		v = append(v, in.NewUserId, in.NewUserId, in.NewUserId, in.NewUserId, in.NewUserId, in.NewUserId, in.NewUserId)
 	} else {
 		phoneSql := ""
 		if in.Phone != "" {
@@ -45,20 +46,37 @@ func (b MessaggeService) UserList(in *messagecenter.UserReq) (data *[]map[string
 		}
 		startTimeSql := ""
 		if in.StartTime != "" {
-			startTimeSql = "and c.create_time >= '" + in.StartTime + "' "
+			startTimeSql = " and  DATE_FORMAT(c.create_time,'%Y-%m-%d') >= '" + in.StartTime + "' "
 		}
 		endTimeSql := ""
 		if in.EndTime != "" {
-			endTimeSql = "and c.create_time <= '" + in.EndTime + "' "
+			endTimeSql = " and DATE_FORMAT(c.create_time,'%Y-%m-%d') <= '" + in.EndTime + "' "
 		}
-		//客服的用户列表
-		sqlStr = "SELECT  IF  ( b.nickname = '', REPLACE(b.phone,SUBSTR(b.phone,4,4),'****'), b.nickname ) AS name,  b.id,  e.title,  b.headimg,  e.type,  e.link,  e.content,  a.create_time,  (  SELECT   count( h.id )   FROM   socialize_message_mailbox h   WHERE   ( h.type = 4 OR h.type = 5 OR h.type = 6 )    AND h.own_type = 1   AND  IF   ( h.send_user_type = 1, h.send_user_id = f.id, h.receive_user_id = f.id )    AND h.isread = 0   ) AS number,  (  SELECT   count( h.id )   FROM   socialize_message_mailbox h   WHERE   ( h.type = 4 OR h.type = 5 OR h.type = 6 )    AND h.own_type = 1   AND  IF   ( h.send_user_type = 1, h.send_user_id = f.id, h.receive_user_id = f.id )   ) AS allNumber   FROM  socialize_message_mailbox a  LEFT JOIN base_user b ON  IF  ( a.send_user_type = 1, b.id = a.receive_user_id, b.id = a.send_user_id )  LEFT JOIN socialize_message e ON e.id = a.messag_id  LEFT JOIN socialize_chat_session f ON  IF  ( a.send_user_type = 1, f.id = a.send_user_id, f.id = a.receive_user_id )   WHERE  a.id IN (  SELECT   MAX( c.id )   FROM   socialize_message_mailbox c   LEFT JOIN socialize_chat_session d ON  IF   ( c.send_user_type = 1, d.id = c.send_user_id, d.id = c.receive_user_id )   WHERE   c.own_type = 1    AND d.customer_service_id = ?    AND d.customer_service_id !=0    " + startTimeSql + endTimeSql + "   GROUP BY   (   CASE          WHEN c.send_user_id > c.receive_user_id THEN     CONCAT( c.send_user_id, c.receive_user_id )      WHEN c.send_user_id < c.receive_user_id THEN     CONCAT( c.receive_user_id, c.send_user_id )     END     )    ) " + phoneSql + "   ORDER BY  a.create_time DESC"
+		//先获取每个用户最后聊天记录
+		userSql := " SELECT   MAX( c.id ) as messageId   FROM   socialize_message_mailbox c   LEFT JOIN socialize_chat_session d ON  IF   ( c.send_user_type = 1, d.id = c.send_user_id, d.id = c.receive_user_id )   WHERE   c.own_type = 1    AND d.customer_service_id = ?   and ( c.type = 4 OR c.type = 5 )   AND d.customer_service_id !=0    " + startTimeSql + endTimeSql + "   GROUP BY   (   CASE          WHEN  c.send_user_type =2 THEN  CONCAT( c.send_user_id )   WHEN c.send_user_type =1 THEN  CONCAT( c.receive_user_id )     END     ) "
 		v = append(v, in.EntUserId)
-		fmt.Println(in.EntUserId)
+		log.Println(userSql, v)
+		data = Mysql.SelectBySql(userSql, v...)
+		if data != nil {
+			messId := ""
+			//最后一次数据处理
+			for k, m := range *data {
+				if k > 0 {
+					messId += `,`
+				}
+				messId += "'" + quitl.InterfaceToStr(m["messageId"]) + "'"
+			}
+			//客服的用户列表
+			sqlStr = "SELECT  IF  ( b.nickname = '', REPLACE(b.phone,SUBSTR(b.phone,4,4),'****'), b.nickname ) AS name,  b.id,  e.title,  b.headimg,  e.type,  e.link,  e.content,  a.create_time,  (  SELECT   count( h.id )   FROM   socialize_message_mailbox h   WHERE   ( h.type = 4 OR h.type = 5 )    AND h.own_type = 1   AND  IF   ( h.send_user_type = 1, h.send_user_id = f.id, h.receive_user_id = f.id )    AND h.isread = 0   ) AS number   FROM  socialize_message_mailbox a  LEFT JOIN base_user b ON  IF  ( a.send_user_type = 1, b.id = a.receive_user_id, b.id = a.send_user_id )  LEFT JOIN socialize_message e ON e.id = a.messag_id  LEFT JOIN socialize_chat_session f ON  IF  ( a.send_user_type = 1, f.id = a.send_user_id, f.id = a.receive_user_id )   WHERE  a.id IN  (" + messId + ")" + phoneSql + "   ORDER BY  a.create_time DESC"
+			fmt.Println(in.EntUserId)
+			v = make([]interface{}, 0)
+		}
+
+	}
+	if sqlStr != "" {
+		fmt.Println(sqlStr, v)
+		data = Mysql.SelectBySql(sqlStr, v...)
 	}
-	fmt.Println(sqlStr, v)
-	data = Mysql.SelectBySql(sqlStr, v...)
-	//机器人数据处理
 	return
 }
 func (b MessaggeService) SaveMessage(in *messagecenter.MessageEntity) (errorCode int64) {
@@ -90,7 +108,46 @@ func (b MessaggeService) SaveMessage(in *messagecenter.MessageEntity) (errorCode
 			"receive_isdel": 0,
 			"iswithdraw":    0,
 		}
-		if in.ItemType == 4 || in.ItemType == 5 || in.ItemType == 6 {
+		//系统信息处理
+		if in.ItemType == 6 {
+			messageMailBox = map[string]interface{}{
+				"appid":         in.Appid,
+				"messag_id":     ok,
+				"type":          in.ItemType,
+				"create_time":   time.Now().Local().Format(util.Date_Full_Layout),
+				"read_time":     time.Now().Local().Format(util.Date_Full_Layout),
+				"isread":        1,
+				"send_isdel":    0,
+				"receive_isdel": 0,
+				"iswithdraw":    0,
+			}
+			if in.OwnType == 1 {
+				//用户接受系统信息
+				messageMailBox["own_type"] = 2
+				messageMailBox["send_user_type"] = 1
+				messageMailBox["receive_user_type"] = 2
+				messageMailBox["own_id"] = in.NewUserId
+				messageMailBox["send_user_id"] = in.ReceiveId
+				messageMailBox["receive_user_id"] = in.NewUserId
+
+			} else {
+				//客服接受系统信息
+				messageMailBox["own_type"] = 1
+				messageMailBox["send_user_type"] = 2
+				messageMailBox["receive_user_type"] = 1
+				messageMailBox["own_id"] = in.SendId
+				messageMailBox["send_user_id"] = in.ReceiveId
+				messageMailBox["receive_user_id"] = in.SendId
+			}
+			receiveOk := Mysql.InsertByTx(tx, "socialize_message_mailbox", messageMailBox)
+			if receiveOk == 0 {
+				return false
+			} else {
+				return true
+			}
+		}
+
+		if in.ItemType == 4 || in.ItemType == 5 {
 			//客服或者机器人聊天
 			if in.OwnType == 1 {
 				// (用户发送)客服接受
@@ -121,10 +178,6 @@ func (b MessaggeService) SaveMessage(in *messagecenter.MessageEntity) (errorCode
 			messageMailBox["send_user_id"] = in.NewUserId
 			messageMailBox["receive_user_id"] = in.ReceiveId
 		}
-		if in.ItemType == 6 {
-			messageMailBox["isread"] = 1
-			messageMailBox["read_time"] = time.Now().Local().Format(util.Date_Full_Layout)
-		}
 		sendOk := Mysql.InsertByTx(tx, "socialize_message_mailbox", messageMailBox)
 		if sendOk == 0 {
 			return false
@@ -140,7 +193,7 @@ func (b MessaggeService) SaveMessage(in *messagecenter.MessageEntity) (errorCode
 			"receive_isdel": 0,
 			"iswithdraw":    0,
 		}
-		if in.ItemType == 4 || in.ItemType == 5 || in.ItemType == 6 {
+		if in.ItemType == 4 || in.ItemType == 5 {
 			//客服或者机器人聊天
 			if in.OwnType == 1 {
 				//用户发送(用户接受)
@@ -150,6 +203,7 @@ func (b MessaggeService) SaveMessage(in *messagecenter.MessageEntity) (errorCode
 				messageMailBox["own_id"] = in.NewUserId
 				messageMailBox["send_user_id"] = in.NewUserId
 				messageMailBox["receive_user_id"] = in.ReceiveId
+
 			} else {
 				//客服发送信息(用户接受)
 				messageMailBox["own_type"] = 1
@@ -170,10 +224,6 @@ func (b MessaggeService) SaveMessage(in *messagecenter.MessageEntity) (errorCode
 			messageMailBox["send_user_id"] = in.NewUserId
 			messageMailBox["receive_user_id"] = in.ReceiveId
 		}
-		if in.ItemType == 6 {
-			messageMailBox["isread"] = 1
-			messageMailBox["read_time"] = time.Now().Local().Format(util.Date_Full_Layout)
-		}
 		receiveOk := Mysql.InsertByTx(tx, "socialize_message_mailbox", messageMailBox)
 		if receiveOk == 0 {
 			return false
@@ -191,26 +241,30 @@ func (b MessaggeService) FindMessage(in *messagecenter.MessageReq) (*[]map[strin
 	countSql := ""
 	v := make([]interface{}, 0)
 	countV := make([]interface{}, 0)
+	lastStr := "  "
+	if in.LastId > 0 {
+		lastStr = " and  a.messag_id < " + quitl.InterfaceToStr(in.LastId)
+	}
 	switch in.MsgType {
 	case 2: //点对点聊天
-		sqlStr = "SELECT     b.* ,if(a.own_id = a.send_user_id,1,2) as fool     FROM     socialize_message_mailbox a     LEFT JOIN socialize_message b on  a.messag_id=b.id     left  join  base_user c on  c.id=a.send_user_id      left join  base_user d on  d.id=a.receive_user_id     where  a.own_id=? and ((a.send_user_id=? and   a.receive_user_id=?) or (a.send_user_id=? and  a.receive_user_id=?)) and  a.type=2  ORDER BY a.create_time desc limit ? , ? "
-		countSql = "SELECT     count(b.id)     FROM     socialize_message_mailbox a     LEFT JOIN socialize_message b on  a.messag_id=b.id     left  join  base_user c on  c.id=a.send_user_id      left join  base_user d on  d.id=a.receive_user_id     where  a.own_id=? and ((a.send_user_id=? and   a.receive_user_id=?) or (a.send_user_id=? and  a.receive_user_id=?)) and  a.type=2  ORDER BY a.create_time desc "
-		v = append(v, in.NewUserId, in.NewUserId, in.SendId, in.SendId, in.NewUserId, (in.PageIndex-1)*in.PageSize, in.PageSize)
+		sqlStr = "SELECT     a.messag_id as messageId,b.* ,if(a.own_id = a.send_user_id,1,2) as fool     FROM     socialize_message_mailbox a     LEFT JOIN socialize_message b on  a.messag_id=b.id     left  join  base_user c on  c.id=a.send_user_id      left join  base_user d on  d.id=a.receive_user_id     where  a.own_id=? and ((a.send_user_id=? and   a.receive_user_id=?) or (a.send_user_id=? and  a.receive_user_id=?)) and  a.type=2 " + lastStr + "  ORDER BY a.create_time desc ,a.id   asc limit ? , ? "
+		countSql = "SELECT     count(b.id)     FROM     socialize_message_mailbox a     LEFT JOIN socialize_message b on  a.messag_id=b.id     left  join  base_user c on  c.id=a.send_user_id      left join  base_user d on  d.id=a.receive_user_id     where  a.own_id=? and ((a.send_user_id=? and   a.receive_user_id=?) or (a.send_user_id=? and  a.receive_user_id=?)) and  a.type=2 " + lastStr
+		v = append(v, in.NewUserId, in.NewUserId, in.SendId, in.SendId, in.NewUserId, 0, in.PageSize)
 		countV = append(countV, in.NewUserId, in.NewUserId, in.SendId, in.SendId, in.NewUserId)
 		break
-	case 4, 5, 6: //客服聊天
+	case 4, 5, 6, 7: //客服聊天
 		if in.UserType == 1 {
 			//客服聊天记录查看
-			sqlStr = "SELECT   b.*,   IF   ( a.own_id = a.send_user_id, 1, 2 ) AS fool,   a.send_user_type,   a.type AS itemType,   d.nickname AS robotName,   d.headimage AS robotImg,   e.customer_service_name AS setName ,   c.user_id   FROM   socialize_message_mailbox a   LEFT JOIN socialize_message b ON a.messag_id = b.id   LEFT JOIN socialize_chat_session c ON   IF   ( a.send_user_type = 1, c.id = a.send_user_id, c.id = a.receive_user_id )   LEFT JOIN socialize_tenant_robot d ON c.ent_id = d.ent_id   LEFT JOIN socialize_tenant_seat e ON c.ent_id = e.ent_id    AND c.customer_service_id = e.customer_service_id    WHERE   a.own_type = 1    AND c.ent_id = ?    AND c.user_id = ?    AND (a.type = 5 or a.type=4 or  a.type=6)    ORDER BY a.create_time desc limit ? , ? "
-			v = append(v, in.EntId, in.SendId, (in.PageIndex-1)*in.PageSize, in.PageSize)
-			countSql = "SELECT  count(b.id)  FROM   socialize_message_mailbox a   LEFT JOIN socialize_message b ON a.messag_id = b.id   LEFT JOIN socialize_chat_session c ON   IF   ( a.send_user_type = 1, c.id = a.send_user_id, c.id = a.receive_user_id )   LEFT JOIN socialize_tenant_robot d ON c.ent_id = d.ent_id   LEFT JOIN socialize_tenant_seat e ON c.ent_id = e.ent_id    AND c.customer_service_id = e.customer_service_id    WHERE   a.own_type = 1    AND c.ent_id = ?    AND c.user_id = ?    AND (a.type = 5 or a.type=4)    "
+			sqlStr = "SELECT   a.messag_id as messageId,b.*,   IF   ( a.own_id = a.send_user_id, 1, 2 ) AS fool,   a.send_user_type,   a.type AS itemType,   d.nickname AS robotName,   d.headimage AS robotImg,   c.customer_service_name AS setName ,   c.user_id   FROM   socialize_message_mailbox a   LEFT JOIN socialize_message b ON a.messag_id = b.id   LEFT JOIN socialize_chat_session c ON   IF   ( a.send_user_type = 1, c.id = a.send_user_id, c.id = a.receive_user_id )   LEFT JOIN socialize_tenant_robot d ON c.ent_id = d.ent_id      WHERE   a.own_type = 1    AND c.ent_id = ?    AND c.user_id = ?    AND (a.type = 5 or a.type=4 or  a.type=6 or  a.type=7)  " + lastStr + "  ORDER BY a.create_time desc ,a.id   asc limit ? , ? "
+			v = append(v, in.EntId, in.SendId, 0, in.PageSize)
+			countSql = "SELECT  count(b.id)  FROM   socialize_message_mailbox a   LEFT JOIN socialize_message b ON a.messag_id = b.id   LEFT JOIN socialize_chat_session c ON   IF   ( a.send_user_type = 1, c.id = a.send_user_id, c.id = a.receive_user_id )   LEFT JOIN socialize_tenant_robot d ON c.ent_id = d.ent_id       WHERE   a.own_type = 1    AND c.ent_id = ?    AND c.user_id = ?    AND (a.type = 5 or a.type=4)  " + lastStr
 			countV = append(countV, in.EntId, in.SendId)
 		} else {
 			//用户聊天记录查看
-			sqlStr = "SELECT   b.*,   IF   ( a.own_id = a.send_user_id, 1, 2 ) AS fool ,   a.send_user_type,   a.type as  itemType,   d.nickname as  robotName,   d.headimage as  robotImg,   e.customer_service_name as  setName   FROM   socialize_message_mailbox a   LEFT JOIN socialize_message b ON a.messag_id = b.id   LEFT JOIN socialize_chat_session c ON   IF   ( a.send_user_type = 1, c.id = a.send_user_id, c.id = a.receive_user_id )    left join  socialize_tenant_robot d on  c.ent_id=d.ent_id    left join  socialize_tenant_seat  e on  c.ent_id=e.ent_id and  c.customer_service_id=e.customer_service_id   WHERE   a.own_type = 2    AND c.ent_id =?    AND a.own_id =?    AND ( a.type = 4 OR a.type = 5 or a.type=6 )     ORDER BY a.create_time desc limit ? , ? "
-			v = append(v, in.CustomerEntId, in.NewUserId, (in.PageIndex-1)*in.PageSize, in.PageSize)
-			countSql = "SELECT   count(a.id)  FROM   socialize_message_mailbox a   LEFT JOIN socialize_message b ON a.messag_id = b.id   LEFT JOIN socialize_chat_session c ON   IF   ( a.send_user_type = 1, c.id = a.send_user_id, c.id = a.receive_user_id )    left join  socialize_tenant_robot d on  c.ent_id=d.ent_id    left join  socialize_tenant_seat  e on  c.ent_id=e.ent_id and  c.customer_service_id=e.customer_service_id   WHERE   a.own_type = 2    AND c.ent_id =?    AND a.own_id =?    AND ( a.type = 4 OR a.type = 5  or a.type=6)   "
-			countV = append(countV, in.CustomerEntId, in.NewUserId)
+			sqlStr = "SELECT a.messag_id as messageId,  b.*,   IF   ( a.own_id = a.send_user_id, 1, 2 ) AS fool ,   a.send_user_type,   a.type as  itemType,   d.nickname as  robotName,   d.headimage as  robotImg,   c.customer_service_name as  setName   FROM   socialize_message_mailbox a   LEFT JOIN socialize_message b ON a.messag_id = b.id   LEFT JOIN socialize_chat_session c ON   IF   ( a.send_user_type = 1, c.id = a.send_user_id, c.id = a.receive_user_id )    left join  socialize_tenant_robot d on  c.ent_id=d.ent_id    WHERE   a.own_type = 2    AND c.ent_id =?    AND a.own_id =?    AND ( a.type = 4 OR a.type = 5 or a.type=6 or  a.type=7) " + lastStr + "    ORDER BY a.create_time desc ,a.id   asc limit ? , ? "
+			v = append(v, in.SendId, in.NewUserId, 0, in.PageSize)
+			countSql = "SELECT   count(a.id)  FROM   socialize_message_mailbox a   LEFT JOIN socialize_message b ON a.messag_id = b.id   LEFT JOIN socialize_chat_session c ON   IF   ( a.send_user_type = 1, c.id = a.send_user_id, c.id = a.receive_user_id )    left join  socialize_tenant_robot d on  c.ent_id=d.ent_id      WHERE   a.own_type = 2    AND c.ent_id =?    AND a.own_id =?    AND ( a.type = 4 OR a.type = 5  or a.type=6 or  a.type=7) " + lastStr
+			countV = append(countV, in.SendId, in.NewUserId)
 		}
 		break
 	}
@@ -243,7 +297,7 @@ func (b MessaggeService) FindMessage(in *messagecenter.MessageReq) (*[]map[strin
 			break
 		case 4, 5:
 			if in.UserType == 1 {
-				Mysql.UpdateOrDeleteBySql("UPDATE socialize_message_mailbox a     SET a.isread = 1,    a.read_time = now( )     WHERE    a.own_type = 1     AND a.type IN ( 4, 5 )     AND a.isread = 0    AND a.own_id IN ( SELECT b.id FROM socialize_chat_session b WHERE and  b.customer_service_id=? and    b.user_id=?  )", in.EntUserId, in.SendId)
+				Mysql.UpdateOrDeleteBySql("UPDATE socialize_message_mailbox a     SET a.isread = 1,    a.read_time = now( )     WHERE    a.own_type = 1     AND a.type IN ( 4, 5 )     AND a.isread = 0    AND a.own_id IN ( SELECT b.id FROM socialize_chat_session b WHERE   b.customer_service_id=? and    b.user_id=?  )", in.EntUserId, in.SendId)
 			} else {
 				Mysql.UpdateOrDeleteBySql("UPDATE socialize_message_mailbox a     SET a.isread = 1,    a.read_time = now( )     WHERE    a.own_type = 2     AND a.type IN ( 4, 5 )     AND a.isread = 0    AND a.own_id =?", in.NewUserId)
 			}
@@ -255,12 +309,13 @@ func (b MessaggeService) FindMessage(in *messagecenter.MessageReq) (*[]map[strin
 func (b MessaggeService) CreateChatSession(in *messagecenter.ChatSessionReq) (errorCode, sessionId int64) {
 	fool := Mysql.ExecTx("会话新建", func(tx *sql.Tx) bool {
 		chatMession := map[string]interface{}{
-			"handle_status":       0,
-			"start_time":          time.Now().Local().Format(util.Date_Full_Layout),
-			"appid":               in.AppId,
-			"ent_id":              in.EntId,
-			"customer_service_id": in.CustomerServiceId,
-			"user_id":             in.UserId,
+			"handle_status":         0,
+			"start_time":            time.Now().Local().Format(util.Date_Full_Layout),
+			"appid":                 in.AppId,
+			"ent_id":                in.EntId,
+			"customer_service_id":   in.CustomerServiceId,
+			"user_id":               in.UserId,
+			"customer_service_name": in.CustomerserviceName,
 		}
 		sessionId = Mysql.InsertByTx(tx, "socialize_chat_session", chatMession)
 		return sessionId > 0