草庐IT

method-group

全部标签

group by去重,按条件去重

项目场景:提示:这里简述项目相关背景:当业务流程处理人为多人处理,公司业务处理会在流程处理表中针对每个人会在流程表中新增一条待处理数据(流程表关联项目表展示每个人对应需要处理的数据),当管理员,或者部门管理员身份查询数据时会出现两种情况:1:管理员身份需要查看对应身份权限下所有的数据。2:有可能管理员身份也是当前数据处理人问题描述提示:这里描述项目中遇到的问题:当管理员身份登入查询数据时,用流程表关联项目表查询,会出现多条数据(流程表中针对个人有存放权限信息,不是当前操作人列表页数据操作栏只允许查看),使用groupby针对项目id出重无法无法保证去重后的数据就是当前管理员需要处理的数据。解决

Postgresql聚合报错:column XXX must appear in the GROUP BY clause or be used in an aggregate function

postgresql聚合报错1参考文章2原因分析:3解决3.1例如:3.2查询语句3.3原因分析:3.4解决:1参考文章一篇文章写的很清晰,可参考:https://zhuanlan.zhihu.com/p/4573417062原因分析:聚合的本意是得到一个集合的某些属性值:最大值、最小值、平均值、总和。。。。这些属性都是原来列经过计算得出的新数据,当我们直接引用未处理的原表数据时就会有问题3解决3.1例如:求3个人花费的聚合user_namecosttom23jessy12tom33.2查询语句select user_name, cost,fromt_costgroupbyuser_namee

[linux小水滴]ubuntu系统adb连接手机出现“no permissions (user in plugdev group; are your udev rules wrong?);”问题解决

出现错误原因:没有把当前手机设备加入ubuntu系统的plugdevgroup,即当前ubuntu系统不认识这个device,不允许adb接入解决方法:1检查当前usb连接的设备idVendor号di.di@ubuntu:/etc/udev/rules.d$lsusbBus002Device001:ID1d6b:0003LinuxFoundation3.0roothubBus001Device018:ID22d9:2769Bus001Device099:ID30fa:0300Bus001Device110:ID258a:002aBus001Device001:ID1d6b:0002LinuxF

go - golang规范中方法值部分的 'non-interface method'是什么意思?

TheGoProgrammingLanguageSpecificationsays:Aswithselectors,areferencetoanon-interfacemethodwithavaluereceiverusingapointerwillautomaticallydereferencethatpointer:pt.Mvisequivalentto(*pt).Mv.和:Aswithmethodcalls,areferencetoanon-interfacemethodwithapointerreceiverusinganaddressablevaluewillautomati

go - golang规范中方法值部分的 'non-interface method'是什么意思?

TheGoProgrammingLanguageSpecificationsays:Aswithselectors,areferencetoanon-interfacemethodwithavaluereceiverusingapointerwillautomaticallydereferencethatpointer:pt.Mvisequivalentto(*pt).Mv.和:Aswithmethodcalls,areferencetoanon-interfacemethodwithapointerreceiverusinganaddressablevaluewillautomati

TortoiseGit clone项目时报错:No supported authentication methods available (server sent: publickey)

异常描述:使用TortoiseGit工具将gitee项目clone到本地目录时出现异常,错误提示是:Nosupportedauthenticationmethodsavailable(serversent:publickey),如下图所示:异常翻译:没有可用的支持的身份验证方法(服务器发送:公钥)解决方法:需要修改TortoiseGit网络的SSH客户端为git服务器的ssh.exe操作步骤:1、鼠标右键->TortoiseGit->Settings->Network->SSHClient项,如果TortoiseGit已安装中文语言包步骤为:鼠标右键->TortoiseGit->设置->网络-

ES聚合分页(group by分组后分页)

ES实现类似sql的groupby后如何分页?{"query":{......//搜索条件},"aggs":{"count":{//COUNT(*),统计GROUPBY后的总数"cardinality":{"field":"goods_id"//因为我这里GROUPBY的字段是goods_id,所以就用goods_id来计数了}},"goods_id":{"terms":{"field":"goods_id",//选择GROUPBY的字段"size":20//取出20条GROUPBY的数据。数量应设置为sql中offset+limit的数量。注:其实es聚合操作不是很支持分页,于是只能先将数据

uni-app调用微信小程序接口报错Component “pages/login/login“ does not have a method “onChooseAvatar“

项目场景:在uni-app中尝试使用接口获得用户头像但是出错了问题描述vue中template配置:buttonclass="avatar-wrapper"open-type="chooseAvatar"bind:chooseavatar="onChooseAvatar"> imageclass="avatar"src:avatarUrl>/image> /button>methods配置:buttonclass="avatar-wrapper"open-type="chooseAvatar"bind:chooseavatar="onChooseAvatar"> imageclass="ava

Required request parameter ‘name‘ for method parameter type String is not present 报错解决方法

注解支持的类型支持的请求类型支持的 Content-Type请求示例@PathVariableurlGET所有/test/{id}@RequestParamurlGET所有/test?id=1@RequestBodyBodyPOST/PUT/DELETE/PATCHjson{  "id":1}   

“error“ : “no handler found for uri [/test1/_doc/1/update?pretty=true] and method [POST]或者[GET]“

“error”:“nohandlerfoundforuri[/test1/_doc/1/update?pretty=true]andmethod[POST]或者[GET]”一、GET报错原因:type被弃用!PUT/test1/type/1{"name":"李华","age":18}报错:"error":"nohandlerfoundforuri[/test1/type/1?pretty=true]andmethod[PUT]"解决办法:将type修改为_doc,默认的数据类型PUT/test1/_doc/1{"name":"李华","age":18}PUT创建新的索引成功{"_index":