From 2e6f458b0d186c67032853384d5dc29ee792a5d0 Mon Sep 17 00:00:00 2001 From: huanghai <10402852@qq.com> Date: Thu, 23 Jul 2020 07:50:03 +0800 Subject: [PATCH 1/4] 'commit' --- dsBaseRpc/一键发布.cmd | 2 +- dsSso/一键发布.cmd | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dsBaseRpc/一键发布.cmd b/dsBaseRpc/一键发布.cmd index 26dd3b0a..53730fd1 100644 --- a/dsBaseRpc/一键发布.cmd +++ b/dsBaseRpc/一键发布.cmd @@ -5,7 +5,7 @@ go build -o ./WinBuild/Distribute.exe ./Tools/Distribute.go :: Linux汾 SET GOOS=linux SET GOARCH=amd64 -go build -o ./build/dsBaseRpc main.go +go build -gcflags "all=-N -l" -o ./build/dsBaseRpc main.go :: ѹһ :: .\Tools\upx.exe -9 ./build/dsBaseRpc diff --git a/dsSso/一键发布.cmd b/dsSso/一键发布.cmd index 2edd4334..4c89d777 100644 --- a/dsSso/一键发布.cmd +++ b/dsSso/一键发布.cmd @@ -11,8 +11,8 @@ swag init :: Linux汾 SET GOOS=linux SET GOARCH=amd64 -:: go build -gcflags "all=-N -l" -o ./build/dsSso main.go -go build -o ./build/dsSso main.go +go build -gcflags "all=-N -l" -o ./build/dsSso main.go +:: go build -o ./build/dsSso main.go :: ѹһ ::.\Tools\upx.exe -9 ./build/dsSso From 6bde53e7de43bd9d75e7b44d1bfe55f08a06017f Mon Sep 17 00:00:00 2001 From: huanghai <10402852@qq.com> Date: Thu, 23 Jul 2020 07:56:57 +0800 Subject: [PATCH 2/4] 'commit' --- dsBaseRpc/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dsBaseRpc/main.go b/dsBaseRpc/main.go index d7c3c8b1..a372b27b 100644 --- a/dsBaseRpc/main.go +++ b/dsBaseRpc/main.go @@ -74,7 +74,9 @@ func main() { defer c.Stop() //二、清除redis所有Rpc层使用的缓存(不包含统一认证使用的缓存) - SysKit.ClearRpcRedis() + go func() { + SysKit.ClearRpcRedis() + }() //三、初始化登录名的最大号 SysKit.InitLoginIdIntMax() From abe1734cf31dfba9c38fab9b95a8e7611467f3f7 Mon Sep 17 00:00:00 2001 From: huanghai <10402852@qq.com> Date: Thu, 23 Jul 2020 07:59:36 +0800 Subject: [PATCH 3/4] 'commit' --- dsBaseRpc/Linux上安装Go环境+配置DLV.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dsBaseRpc/Linux上安装Go环境+配置DLV.txt b/dsBaseRpc/Linux上安装Go环境+配置DLV.txt index 29dc5765..4de6d55b 100644 --- a/dsBaseRpc/Linux上安装Go环境+配置DLV.txt +++ b/dsBaseRpc/Linux上安装Go环境+配置DLV.txt @@ -25,5 +25,11 @@ https://www.jianshu.com/p/e74e940a64d9 dlv --listen=:2345 --headless=true --api-version=2 exec ./dsBaseRpc +# 构建 +:: 创建Linux发布版本 +SET GOOS=linux +SET GOARCH=amd64 +go build -gcflags "all=-N -l" -o ./build/dsBaseRpc main.go + //构建一个强制转换的错误~~~~ //panic(400) From b67e7f3897c4e4b9bc16eaff0cf4ce331ab21c77 Mon Sep 17 00:00:00 2001 From: huanghai <10402852@qq.com> Date: Thu, 23 Jul 2020 10:31:43 +0800 Subject: [PATCH 4/4] 'commit' --- .../BaseOrganizationService/BaseOrganizationService.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationService/BaseOrganizationService.go b/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationService/BaseOrganizationService.go index 4954d42a..f4638e3e 100644 --- a/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationService/BaseOrganizationService.go +++ b/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationService/BaseOrganizationService.go @@ -402,9 +402,9 @@ func (s *Rpc) UpdateBaseOrganization(ctx context.Context, in *BaseOrganizationPr if exist { reply.Success = false - if BaseOrganizationDao.IsBuMen(in.OrgId){ + if BaseOrganizationDao.IsBuMen(in.OrgId) { reply.Message = "部门代码已存在,无法修改!" - }else{ + } else { reply.Message = "单位代码已存在,无法修改!" } @@ -507,6 +507,9 @@ func (s *Rpc) UpdateBaseOrganization(ctx context.Context, in *BaseOrganizationPr LogUtil.Error(ErrorConst.SqlUpdateError, "执行UpdateOrgManager时发生严重错误:"+err.Error()) return nil, err } + } else { + //删除部门领导 + BaseOrganizationManagerDao.DeleteOrgManagerByOrgIds([]string{in.OrgId}) } //记录日志 ms, err := BaseOrganizationDao.GetByIds([]string{in.OrgId})