Compare commits
1 Commits
main
...
dev_user_import
| Author | SHA1 | Date |
|---|---|---|
|
|
095db304ab |
|
|
@ -63,6 +63,3 @@ dahua:
|
|||
password: qinan@202604
|
||||
clientId: mkmj_management
|
||||
clientSecret: 5ef82f7c-9926-46a3-8d07-136fd054849c
|
||||
nine:
|
||||
config:
|
||||
companyId: 2008712261453131776
|
||||
|
|
|
|||
|
|
@ -64,6 +64,3 @@ dahua:
|
|||
password: qinan@202604
|
||||
clientId: mkmj_management
|
||||
clientSecret: 5ef82f7c-9926-46a3-8d07-136fd054849c
|
||||
nine:
|
||||
config:
|
||||
companyId: 2590800828822460065
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<!doctype html><html lang="zh"><head data-built-info="@cqsjjb/scripts@2.0.0-alpha-1 Env/production (2025/11/18 09:02:47) App/basic_info"><meta charset="UTF-8"/><meta name="renderer" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/><meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"><title>--</title><script>(function () {
|
||||
const APP_ENV = {
|
||||
antd: {
|
||||
'ant-prefix': 'micro-temp',
|
||||
fontFamily: 'PingFangSC-Regular',
|
||||
colorPrimary: '#1677ff',
|
||||
borderRadius: parseInt('2')
|
||||
},
|
||||
appKey: '',
|
||||
basename: 'basic_info',
|
||||
API_HOST: 'http://192.168.20.100:30140'
|
||||
};
|
||||
APP_ENV.API_HOST = sessionStorage.API_HOST || APP_ENV.API_HOST || window.location.origin;
|
||||
window.process = {
|
||||
env: { app: APP_ENV },
|
||||
NODE_ENV: 'production'
|
||||
};
|
||||
window.__JJB_ENVIRONMENT__ = {
|
||||
API_HOST: APP_ENV.API_HOST,
|
||||
redirect: '',
|
||||
FRAMEWORK: APP_ENV.antd
|
||||
};
|
||||
})();</script><script src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=OElqFYoKiAH8KFtph8ftLKF5NlNrbCUr"></script><script defer="defer" src="/basic_info/static/js/418.4acf01f62b980642296e.js"></script><script defer="defer" src="/basic_info/static/js/586.dc79d84322ee91760317.js"></script><script defer="defer" src="/basic_info/static/js/main.6e93da79d33afd87c655.js"></script><link href="/basic_info/static/css/main.19d4da69d3868bd682cf.css" rel="stylesheet"></head><body><noscript>此网页需要开启JavaScript功能。</noscript><div id="root" style="width: 100%; height: 100%; position: relative"></div><script type="text/javascript">/* @cqsjjb/script 输出当前应用基本信息、构建时间 */console.log("%c@cqsjjb/scripts@2.0.0-alpha-1 Env/production (2025/11/18 09:02:47) App/basic_info Version/master Java/<branch-name>", "color: #1890ff; border-radius: 2px; padding: 0 4px; border: 1px solid #1890ff; background: #f9fcff")</script></body></html>
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
module.exports={compact:!1,plugins:[["@babel/plugin-proposal-decorators",{legacy:!0}]],presets:[["@babel/preset-env",{targets:{browsers:["ie >= 10"]}}],["@babel/preset-react",{runtime:"automatic"}]]};
|
||||
|
|
@ -0,0 +1 @@
|
|||
module.exports={javaGit:"<git-url>",javaGitName:"<git-name>",environment:{development:{javaGitBranch:"<branch-name>",API_HOST:"http://192.168.20.100:30140"},production:{javaGitBranch:"<branch-name>",API_HOST:"http://192.168.20.100:30140"}},appIdentifier:"basic_info",contextInject:{appKey:"",fileUrl:"http://192.168.20.240:9787/mnt"},windowInject:{title:"微应用模板",links:[],element:{root:{id:"root"}},scripts:["https://api.map.baidu.com/api?v=1.0&type=webgl&ak=OElqFYoKiAH8KFtph8ftLKF5NlNrbCUr"]},server:{port:"8080",host:"127.0.0.1",open:!0},framework:{antd:{"ant-prefix":"micro-temp",fontFamily:"PingFangSC-Regular",colorPrimary:"#1677ff",borderRadius:2}},webpackConfig:{htmlWebpackPluginOption:{inject:!0}}};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,125 @@
|
|||
/*!
|
||||
Copyright (c) 2018 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/
|
||||
|
||||
/*!
|
||||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* isobject <https://github.com/jonschlinkert/isobject>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
||||
|
||||
/** @preserve
|
||||
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
||||
* derived from CryptoJS.mode.CTR
|
||||
* Jan Hruby jhruby.web@gmail.com
|
||||
*/
|
||||
|
||||
/** @preserve
|
||||
(c) 2012 by Cédric Mesnil. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,79 @@
|
|||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* use-sync-external-store-shim.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v16.13.1
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v17.0.2
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "micro-app",
|
||||
"version": "2.0.0",
|
||||
"description": "建教帮微应用模板",
|
||||
"author": "JJB",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"serve": "node node_modules/@cqsjjb/scripts/webpack.dev.server.js",
|
||||
"build": "node node_modules/@cqsjjb/scripts/webpack.build.js",
|
||||
"push": "jjb-cmd push java production",
|
||||
"clean-cache": "rimraf node_modules/.cache/webpack",
|
||||
"serve:development": "cross-env NODE_ENV=development npm run serve",
|
||||
"serve:production": "cross-env NODE_ENV=production npm run serve",
|
||||
"build:development": "cross-env NODE_ENV=development npm run build",
|
||||
"build:production": "cross-env NODE_ENV=production npm run build",
|
||||
"code-optimization": "node node_modules/@cqsjjb/scripts/code-optimization.js",
|
||||
"lint": "eslint --ext .js,.jsx,.tsx --fix src"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ant-design/icons": "latest",
|
||||
"@ant-design/pro-components": "^2.8.10",
|
||||
"@cqsjjb/jjb-common-decorator": "latest",
|
||||
"@cqsjjb/jjb-common-lib": "latest",
|
||||
"@cqsjjb/jjb-dva-runtime": "latest",
|
||||
"@cqsjjb/jjb-react-admin-component": "latest",
|
||||
"ahooks": "^3.9.5",
|
||||
"antd": "latest",
|
||||
"dayjs": "^1.11.7",
|
||||
"lodash-es": "^4.17.21",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"zy-react-library": "^1.0.97"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^5.4.1",
|
||||
"@babel/plugin-proposal-decorators": "^7.19.3",
|
||||
"@cqsjjb/scripts": "latest",
|
||||
"@eslint-react/eslint-plugin": "^2.2.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^9.37.0",
|
||||
"eslint-plugin-format": "^1.0.2",
|
||||
"eslint-plugin-react-hooks": "^7.0.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.23",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
|
@ -90,13 +90,6 @@ public class CorpInfoController {
|
|||
}
|
||||
return SingleResponse.of(corpInfoService.info(id));
|
||||
}
|
||||
@ApiOperation("查询当前登录租户自身企业详情")
|
||||
@GetMapping("/info/self")
|
||||
public SingleResponse<CorpInfoCO> getSelfInfo() {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
Long tenantId = ssoUser.getTenantId();
|
||||
return SingleResponse.of(corpInfoService.info(tenantId));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("删除")
|
||||
|
|
@ -164,23 +157,5 @@ public class CorpInfoController {
|
|||
return SingleResponse.of(corpInfoService.getEncryInfo(userCheckPassWordCmd));
|
||||
}
|
||||
|
||||
@ApiOperation("可视化大屏-企业部门用户统计")
|
||||
@PostMapping("/corpUserStatisticPage")
|
||||
public PageResponse<CorpUserStatisticCO> corpUserStatisticPage(@Validated @RequestBody CorpUserStatisticQry qry) {
|
||||
return corpInfoService.corpUserStatisticPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("可视化大屏-企业用户汇总")
|
||||
@PostMapping("/corpUserSummary")
|
||||
public SingleResponse<CorpUserSummaryCO> corpUserSummary(@Validated @RequestBody CorpUserSummaryQry qry) {
|
||||
return SingleResponse.of(corpInfoService.corpUserSummary(qry));
|
||||
}
|
||||
|
||||
@ApiOperation("可视化大屏-企业列表")
|
||||
@PostMapping("/corpListAll")
|
||||
public MultiResponse<CorpInfoCO> corpListAll(@RequestBody CorpInfoQry corpInfoQry) {
|
||||
return corpInfoService.listAll(corpInfoQry);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,19 +81,6 @@ public class ImgFilesController {
|
|||
imgFilesService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
@ApiOperation("删除")
|
||||
@GetMapping("/getDelete")
|
||||
public Response getDelete(@RequestParam String filePath) {
|
||||
imgFilesService.removeFile(filePath);
|
||||
return Response.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@GetMapping("/getIds")
|
||||
public Response getIds(@RequestParam Long[] ids) {
|
||||
imgFilesService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
|
|
|
|||
|
|
@ -69,18 +69,6 @@ public class CorpInfoUpdateExe {
|
|||
}
|
||||
|
||||
BeanUtils.copyProperties(corpInfoUpdateCmd, corpInfoE);
|
||||
//
|
||||
if("1".equals(corpInfoE.getAreaCode())){
|
||||
//东港区
|
||||
corpInfoE.setPortArea(2);
|
||||
}
|
||||
if("2".equals(corpInfoE.getAreaCode())){
|
||||
//西港区
|
||||
corpInfoE.setPortArea(3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
boolean res = corpInfoGateway.update(corpInfoE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
|
|
|
|||
|
|
@ -395,9 +395,16 @@ public class UserUpdateExe {
|
|||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean updatePasswordFromApp(AppUserUpdatePassWordCmd cmd) {
|
||||
UserUpdatePassWordCmd userUpdatePassWordCmd = new UserUpdatePassWordCmd();
|
||||
BeanUtils.copyProperties(cmd, userUpdatePassWordCmd);
|
||||
executeUpdatePassword(userUpdatePassWordCmd);
|
||||
//新密码和旧密码不能相同
|
||||
if (cmd.getPassword().equals(cmd.getNewPassword())) {
|
||||
throw new BizException("新密码不能与旧密码相同");
|
||||
}
|
||||
UserE userE = new UserE();
|
||||
userE.checkPassword(cmd.getNewPassword(), cmd.getConfirmPassword());
|
||||
|
||||
BeanUtils.copyProperties(cmd, userE);
|
||||
userE.encryptionPassword();
|
||||
userGateway.updatePassword(userE);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -415,10 +422,6 @@ public class UserUpdateExe {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public Response executeUpdatePassword(UserUpdatePassWordCmd userUpdatePassWordCmd) {
|
||||
UserE userE = new UserE();
|
||||
if (userUpdatePassWordCmd.getPassword().equals(userUpdatePassWordCmd.getNewPassword())) {
|
||||
throw new BizException("新密码不能与旧密码相同");
|
||||
}
|
||||
userE.checkPassword(userUpdatePassWordCmd.getNewPassword(), userUpdatePassWordCmd.getConfirmPassword());
|
||||
BeanUtils.copyProperties(userUpdatePassWordCmd, userE);
|
||||
userE.encryptionPassword();
|
||||
return userGateway.updatePassword(userE);
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@ import com.zcloud.basic.info.dto.*;
|
|||
import com.zcloud.basic.info.dto.clientobject.CorpDepartmentCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.CorpInfoCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.CorpUserMiddleCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.CorpUserStatisticCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.CorpUserSummaryCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.UserCO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.*;
|
||||
import com.zcloud.basic.info.persistence.repository.*;
|
||||
|
|
@ -312,25 +310,6 @@ public class CorpInfoQueryExe {
|
|||
return true;
|
||||
}
|
||||
|
||||
public PageResponse<CorpUserStatisticCO> corpUserStatisticPage(CorpUserStatisticQry qry) {
|
||||
Map<String, Object> params = PageQueryHelper.toHashMap(qry);
|
||||
PageResponse<CorpUserStatisticDO> pageResponse = corpInfoRepository.corpUserStatisticPage(params);
|
||||
List<CorpUserStatisticCO> list = pageResponse.getData().stream().map(item -> {
|
||||
CorpUserStatisticCO co = new CorpUserStatisticCO();
|
||||
BeanUtils.copyProperties(item, co);
|
||||
return co;
|
||||
}).collect(Collectors.toList());
|
||||
return PageResponse.of(list, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||
}
|
||||
|
||||
public CorpUserSummaryCO corpUserSummary(CorpUserSummaryQry qry) {
|
||||
Map<String, Object> params = PageQueryHelper.toHashMap(qry);
|
||||
CorpUserSummaryDO corpUserSummaryDO = corpInfoRepository.corpUserSummary(params);
|
||||
CorpUserSummaryCO corpUserSummaryCO = new CorpUserSummaryCO();
|
||||
BeanUtils.copyProperties(corpUserSummaryDO, corpUserSummaryCO);
|
||||
return corpUserSummaryCO;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import com.jjb.saas.system.client.user.facade.UserFacade;
|
|||
import com.zcloud.basic.info.command.convertor.CorpInfoCoConvertor;
|
||||
import com.zcloud.basic.info.command.convertor.UserCoConvertor;
|
||||
import com.zcloud.basic.info.constant.RedisConstant;
|
||||
import com.zcloud.basic.info.domain.config.NineCompanyConfig;
|
||||
import com.zcloud.basic.info.domain.enums.UserEmploymentFlagEnum;
|
||||
import com.zcloud.basic.info.domain.enums.UserTypeEnum;
|
||||
import com.zcloud.basic.info.domain.gateway.UserGateway;
|
||||
|
|
@ -33,7 +32,6 @@ import com.zcloud.gbscommon.utils.PageQueryHelper;
|
|||
import com.zcloud.gbscommon.utils.Tools;
|
||||
import com.zcloud.gbscommon.utils.ZcloudRedisUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
@ -51,7 +49,6 @@ import java.util.stream.Collectors;
|
|||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
@Slf4j
|
||||
public class UserQueryExe {
|
||||
private final UserRepository userRepository;
|
||||
private final UserGateway userGateway;
|
||||
|
|
@ -60,7 +57,6 @@ public class UserQueryExe {
|
|||
private final CorpInfoCoConvertor corpInfoCoConvertor;
|
||||
private ZcloudRedisUtil zcloudRedisUtil;
|
||||
private final UserExpandInfoRepository userExpandInfoRepository;
|
||||
private final NineCompanyConfig nineCompanyConfig;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -240,14 +236,6 @@ public class UserQueryExe {
|
|||
UserDO userDO = userRepository.getInfoById(id);
|
||||
UserCO userCO = new UserCO();
|
||||
BeanUtils.copyProperties(userDO, userCO);
|
||||
try{
|
||||
Long nineCompanyId = nineCompanyConfig.getCompanyId();
|
||||
userCO.setNineCompanyFlag(nineCompanyId != null && nineCompanyId.equals(userCO.getCorpinfoId()));
|
||||
}catch (Exception e){
|
||||
log.error("获取九公司ID异常", e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return SingleResponse.of(userCO);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -146,15 +146,5 @@ public class CorpInfoServiceImpl implements CorpInfoServiceI {
|
|||
return corpInfoQueryExe.verifyCorpInfo();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResponse<CorpUserStatisticCO> corpUserStatisticPage(CorpUserStatisticQry qry) {
|
||||
return corpInfoQueryExe.corpUserStatisticPage(qry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CorpUserSummaryCO corpUserSummary(CorpUserSummaryQry qry) {
|
||||
return corpInfoQueryExe.corpUserSummary(qry);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,9 +55,5 @@ public interface CorpInfoServiceI {
|
|||
DecryptCmd getEncryInfo(UserCheckPassWordCmd userCheckPassWordCmd);
|
||||
|
||||
void deleteCorpAndDown(List<Long> ids);
|
||||
|
||||
PageResponse<CorpUserStatisticCO> corpUserStatisticPage(CorpUserStatisticQry qry);
|
||||
|
||||
CorpUserSummaryCO corpUserSummary(CorpUserSummaryQry qry);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,9 +66,6 @@ public class CorpInfoQry {
|
|||
@ApiModelProperty(value = "企业类型1:监管 2:企业 3:相关方", name = "enterpriseType", required = true)
|
||||
private Integer enterpriseType;
|
||||
|
||||
@ApiModelProperty(value = "港区,1:秦皇岛港区,2:秦皇岛东,3:秦皇岛西", name = "portArea")
|
||||
private Integer eqPortArea;
|
||||
|
||||
@ApiModelProperty(value = "企业类型1:监管 2:企业 3:相关方", name = "enterpriseTypeList", required = true)
|
||||
private List<Integer> enterpriseTypeList;
|
||||
@ApiModelProperty(value = "统一社会信用代码", name = "code", required = true)
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
package com.zcloud.basic.info.dto;
|
||||
|
||||
import com.alibaba.cola.dto.PageQuery;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 可视化大屏企业部门用户统计查询参数
|
||||
*/
|
||||
@Data
|
||||
public class CorpUserStatisticQry extends PageQuery {
|
||||
|
||||
@ApiModelProperty(value = "企业名称", name = "likeCorpName")
|
||||
private String likeCorpName;
|
||||
|
||||
@ApiModelProperty(value = "企业类型(0-普通企业,1-集团单位,2-股份单位,3-相关方企业,4-货主单位,5-驻港单位, 6-物资中心)", name = "inType")
|
||||
private List<Integer> inType;
|
||||
|
||||
@ApiModelProperty(value = "企业类型1:监管 2:企业 3:相关方", name = "enterpriseType")
|
||||
private Integer enterpriseType;
|
||||
|
||||
@ApiModelProperty(value = "港区,1:秦皇岛港区,2:秦皇岛东,3:秦皇岛西", name = "portArea")
|
||||
private Integer portArea;
|
||||
|
||||
@ApiModelProperty(value = "企业id", name = "corpinfoId")
|
||||
private Long corpinfoId;
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
package com.zcloud.basic.info.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 可视化大屏企业用户汇总查询参数
|
||||
*/
|
||||
@Data
|
||||
public class CorpUserSummaryQry {
|
||||
|
||||
@ApiModelProperty(value = "港区,1:秦皇岛港区,2:秦皇岛东,3:秦皇岛西", name = "portArea")
|
||||
private Integer portArea;
|
||||
|
||||
@ApiModelProperty(value = "企业id", name = "corpinfoId")
|
||||
private Long corpinfoId;
|
||||
}
|
||||
|
|
@ -30,8 +30,5 @@ public class UserUpdatePassWordCmd extends Command {
|
|||
@ApiModelProperty(value = "新密码", name = "newPassword")
|
||||
@NotEmpty(message = "新密码不能为空")
|
||||
private String newPassword;
|
||||
@ApiModelProperty(value = "确认密码", name = "confirmPassword")
|
||||
@NotEmpty(message = "确认密码不能为空")
|
||||
private String confirmPassword;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
package com.zcloud.basic.info.dto.clientobject;
|
||||
|
||||
import com.alibaba.cola.dto.ClientObject;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 可视化大屏企业部门用户统计
|
||||
*/
|
||||
@Data
|
||||
public class CorpUserStatisticCO extends ClientObject {
|
||||
|
||||
@ApiModelProperty(value = "企业id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private String corpName;
|
||||
|
||||
@ApiModelProperty(value = "部门数量")
|
||||
private Long departmentCount;
|
||||
|
||||
@ApiModelProperty(value = "用户数量")
|
||||
private Long userCount;
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
package com.zcloud.basic.info.dto.clientobject;
|
||||
|
||||
import com.alibaba.cola.dto.ClientObject;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 可视化大屏企业用户汇总
|
||||
*/
|
||||
@Data
|
||||
public class CorpUserSummaryCO extends ClientObject {
|
||||
|
||||
@ApiModelProperty(value = "分公司企业数")
|
||||
private Long branchCorpCount;
|
||||
|
||||
@ApiModelProperty(value = "相关方单位数")
|
||||
private Long relatedCorpCount;
|
||||
|
||||
@ApiModelProperty(value = "员工数")
|
||||
private Long userCount;
|
||||
}
|
||||
|
|
@ -218,8 +218,5 @@ public class UserCO extends ClientObject {
|
|||
private String payNumber;
|
||||
@ApiModelProperty(value = "是否缴纳其他人身伤害保险")
|
||||
private Integer isBf;
|
||||
|
||||
@ApiModelProperty(value = "是否九公司人员")
|
||||
private Boolean nineCompanyFlag;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
package com.zcloud.basic.info.domain.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "nine.config")
|
||||
@Data
|
||||
public class NineCompanyConfig {
|
||||
private Long companyId;
|
||||
}
|
||||
|
|
@ -13,7 +13,6 @@ import java.util.stream.Collectors;
|
|||
*/
|
||||
@Getter
|
||||
public enum CorpTypeEnum {
|
||||
// TODO 若修改默认密码通知前端同步修改
|
||||
OrdinaryEnterprises(0,"普通企业",UserTypeEnum.QY.getCode(), "Bb@12345678"),
|
||||
groupUnits(1, "集团单位",UserTypeEnum.QY.getCode(), "Bb@12345678"),
|
||||
share(2,"股份单位",UserTypeEnum.JG.getCode(), "Aa@12345678"),
|
||||
|
|
|
|||
|
|
@ -188,8 +188,6 @@ public class CorpInfoE extends BaseE {
|
|||
@ApiModelProperty(value = "经营范围", name = "natureBusiness")
|
||||
private String natureBusiness;
|
||||
|
||||
@ApiModelProperty(value = "港区,1:秦皇岛港区,2:秦皇岛东,3:秦皇岛西")
|
||||
private Integer portArea;
|
||||
public void initPassWord(Integer type) {
|
||||
String encrypt = Sm2Util.encryptHex(MD5.md5(CorpTypeEnum.getPasswordByCode(type)), publicKey);
|
||||
this.setPassword(encrypt);
|
||||
|
|
|
|||
|
|
@ -260,9 +260,5 @@ public class CorpInfoDO extends BaseDO {
|
|||
@ApiModelProperty(value = "经营范围", name = "natureBusiness")
|
||||
private String natureBusiness;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "港区,1:秦皇岛港区,2:秦皇岛东,3:秦皇岛西")
|
||||
private Integer portArea;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
package com.zcloud.basic.info.persistence.dataobject;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 可视化大屏企业部门用户统计查询结果
|
||||
*/
|
||||
@Data
|
||||
public class CorpUserStatisticDO {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String corpName;
|
||||
|
||||
private Long departmentCount;
|
||||
|
||||
private Long userCount;
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
package com.zcloud.basic.info.persistence.dataobject;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 可视化大屏企业用户汇总查询结果
|
||||
*/
|
||||
@Data
|
||||
public class CorpUserSummaryDO {
|
||||
|
||||
private Long branchCorpCount;
|
||||
|
||||
private Long relatedCorpCount;
|
||||
|
||||
private Long userCount;
|
||||
}
|
||||
|
|
@ -6,8 +6,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||
import com.jjb.saas.framework.datascope.annotation.DataScope;
|
||||
import com.jjb.saas.framework.datascope.annotation.DataScopes;
|
||||
import com.zcloud.basic.info.persistence.dataobject.CorpInfoDO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.CorpUserStatisticDO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.CorpUserSummaryDO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.UserDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
@ -34,9 +32,6 @@ public interface CorpInfoMapper extends BaseMapper<CorpInfoDO> {
|
|||
|
||||
IPage<CorpInfoDO> selectUserPageNoPms(IPage<CorpInfoDO> iPage, @Param("ew") QueryWrapper<CorpInfoDO> queryWrapper, String menuPerms);
|
||||
|
||||
IPage<CorpUserStatisticDO> corpUserStatisticPage(IPage<CorpUserStatisticDO> iPage, @Param("params") Map<String, Object> params);
|
||||
|
||||
CorpUserSummaryDO corpUserSummary(@Param("params") Map<String, Object> params);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@ package com.zcloud.basic.info.persistence.repository;
|
|||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
||||
import com.zcloud.basic.info.persistence.dataobject.CorpInfoDO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.CorpUserStatisticDO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.CorpUserSummaryDO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -46,9 +44,5 @@ public interface CorpInfoRepository extends BaseRepository<CorpInfoDO> {
|
|||
Boolean isSupper();
|
||||
|
||||
void deleteById(Long id);
|
||||
|
||||
PageResponse<CorpUserStatisticDO> corpUserStatisticPage(Map<String, Object> parmas);
|
||||
|
||||
CorpUserSummaryDO corpUserSummary(Map<String, Object> parmas);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@ import com.zcloud.basic.info.domain.enums.CorpTypeEnum;
|
|||
import com.zcloud.basic.info.domain.enums.CorpUseFlagEnum;
|
||||
import com.zcloud.basic.info.domain.enums.MenuEnum;
|
||||
import com.zcloud.basic.info.persistence.dataobject.CorpInfoDO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.CorpUserStatisticDO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.CorpUserSummaryDO;
|
||||
import com.zcloud.basic.info.persistence.mapper.CorpInfoMapper;
|
||||
import com.zcloud.basic.info.persistence.repository.CorpInfoRepository;
|
||||
import com.zcloud.basic.info.utils.Query;
|
||||
|
|
@ -138,7 +136,6 @@ public class CorpInfoRepositoryImpl extends BaseRepositoryImpl<CorpInfoMapper, C
|
|||
if (CollUtil.isNotEmpty(enterpriseType)) {
|
||||
queryWrapper.in("type", enterpriseType);
|
||||
}
|
||||
|
||||
if (params.get("enterpriseTypeList") != null
|
||||
&& params.get("enterpriseTypeList") instanceof List){
|
||||
List<Integer> enterpriseTypeList = (List<Integer>) params.get("enterpriseTypeList");
|
||||
|
|
@ -323,28 +320,5 @@ public class CorpInfoRepositoryImpl extends BaseRepositoryImpl<CorpInfoMapper, C
|
|||
updateWrapper.set("delete_enum", "TRUE");
|
||||
update(updateWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResponse<CorpUserStatisticDO> corpUserStatisticPage(Map<String, Object> params) {
|
||||
IPage<CorpUserStatisticDO> iPage = new Query<CorpUserStatisticDO>().getPage(params);
|
||||
if (ObjectUtil.isNotEmpty(params.get("enterpriseType"))) {
|
||||
List<Integer> enterpriseType = CorpTypeEnum.getCodesByEnterpriseType((Integer) params.get("enterpriseType"));
|
||||
if (CollUtil.isNotEmpty(enterpriseType)) {
|
||||
params.put("type", enterpriseType);
|
||||
}
|
||||
}
|
||||
List<Integer> inType = (List<Integer>) params.get("inType");
|
||||
if (CollUtil.isNotEmpty(inType)) {
|
||||
params.put("type", inType);
|
||||
}
|
||||
|
||||
IPage<CorpUserStatisticDO> result = corpInfoMapper.corpUserStatisticPage(iPage, params);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CorpUserSummaryDO corpUserSummary(Map<String, Object> params) {
|
||||
return corpInfoMapper.corpUserSummary(params);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -454,11 +454,15 @@ public class UserRepositoryImpl extends BaseRepositoryImpl<UserMapper, UserDO> i
|
|||
|
||||
@Override
|
||||
public void changePassword(Long id, String password) {
|
||||
//修改这个手机号下所有密码
|
||||
UserDO userDO = getById(id);
|
||||
if (userDO == null) {
|
||||
return;
|
||||
}
|
||||
for (UserDO userDO1 : listUsersForPasswordUpdate(userDO)) {
|
||||
String phone = userDO.getPhone();
|
||||
|
||||
List<UserDO> userDOList = getListByPhone(phone, null);
|
||||
for (UserDO userDO1 : userDOList) {
|
||||
userChangePassword(userDO1.getId(), password);
|
||||
}
|
||||
}
|
||||
|
|
@ -539,58 +543,50 @@ public class UserRepositoryImpl extends BaseRepositoryImpl<UserMapper, UserDO> i
|
|||
@Override
|
||||
public Response updatePassword(UserDO userDO) {
|
||||
UserDO oldUserDO = getById(userDO.getId());
|
||||
if (userDO.getPassword() == null || userDO.getPassword().isEmpty()) {
|
||||
throw new BizException("原密码不能为空");
|
||||
}
|
||||
SingleResponse<UserDetailCO> detail = null;
|
||||
try {
|
||||
log.info("updateXgf,GBS获取用户信息{}", userDO.getId());
|
||||
detail = userFacade.getDetail(userDO.getId());
|
||||
log.info("updateXgf,GBS获取用户信息返回: {}", JSONUtil.toJsonStr(detail));
|
||||
} catch (Exception e) {
|
||||
log.error("updateXgf,GBS获取用户信息失败: {}", e.getMessage());
|
||||
}
|
||||
if (detail.getData() != null) {
|
||||
AccountPasswordCheckCmd accountPasswordCheckCmd = new AccountPasswordCheckCmd();
|
||||
accountPasswordCheckCmd.setUserId(userDO.getId());
|
||||
accountPasswordCheckCmd.setPassword(userDO.getPassword());
|
||||
log.info("updateXgf,GBS验证用户密码请求:{}", JSONUtil.toJsonStr(accountPasswordCheckCmd));
|
||||
SingleResponse<Long> response = accountFacade.checkPassword(accountPasswordCheckCmd);
|
||||
log.info("updateXgf,GBS验证用户密码返回:{}", JSONUtil.toJsonStr(response));
|
||||
if (!response.isSuccess()) {
|
||||
throw new BizException("原密码不正确");
|
||||
// TODO 验证老密码是否正确
|
||||
if (userDO.getPassword() != null && !userDO.getPassword().equals("")) {
|
||||
SingleResponse<UserDetailCO> detail = null;
|
||||
try {
|
||||
log.info("updateXgf,GBS获取用户信息{}", userDO.getId());
|
||||
detail = userFacade.getDetail(userDO.getId());
|
||||
log.info("updateXgf,GBS获取用户信息返回: {}", JSONUtil.toJsonStr(detail));
|
||||
} catch (Exception e) {
|
||||
log.error("updateXgf,GBS获取用户信息失败: {}", e.getMessage());
|
||||
}
|
||||
if (detail.getData() != null) {
|
||||
AccountPasswordCheckCmd accountPasswordCheckCmd = new AccountPasswordCheckCmd();
|
||||
accountPasswordCheckCmd.setUserId(userDO.getId());
|
||||
accountPasswordCheckCmd.setPassword(userDO.getPassword());
|
||||
log.info("updateXgf,GBS验证用户密码请求:{}", JSONUtil.toJsonStr(accountPasswordCheckCmd));
|
||||
SingleResponse<Long> response = accountFacade.checkPassword(accountPasswordCheckCmd);
|
||||
log.info("updateXgf,GBS验证用户密码返回:{}", JSONUtil.toJsonStr(response));
|
||||
if (!response.isSuccess()) {
|
||||
throw new BizException("原密码不正确");
|
||||
}
|
||||
} else {
|
||||
//验证本地密码
|
||||
UserE userE = new UserE();
|
||||
Boolean checkUserPassword = userE.checkUserEncryptionPassword(userDO.getPassword(), oldUserDO.getPassword());
|
||||
log.info("updateXgf,验证用户本地密码结果:{}", checkUserPassword);
|
||||
if (!checkUserPassword) {
|
||||
throw new BizException("密码错误");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//验证本地密码
|
||||
UserE userE = new UserE();
|
||||
Boolean checkUserPassword = userE.checkUserEncryptionPassword(userDO.getPassword(), oldUserDO.getPassword());
|
||||
log.info("updateXgf,验证用户本地密码结果:{}", checkUserPassword);
|
||||
if (!checkUserPassword) {
|
||||
throw new BizException("密码错误");
|
||||
}
|
||||
log.info("updateXgf,密码为空,不进行密码验证");
|
||||
}
|
||||
|
||||
// 有手机号则同步修改同手机号账号,无手机号则只改当前账号
|
||||
for (UserDO userDO1 : listUsersForPasswordUpdate(oldUserDO)) {
|
||||
//修改多个密码
|
||||
String phone = oldUserDO.getPhone();
|
||||
|
||||
List<UserDO> userDOList = getListByPhone(phone, null);
|
||||
for (UserDO userDO1 : userDOList) {
|
||||
userChangePassword(userDO1.getId(), userDO.getNewPassword());
|
||||
}
|
||||
return Response.buildSuccess();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取需要同步更新密码的用户列表。主账号等无手机号场景仅更新当前用户。
|
||||
*/
|
||||
private List<UserDO> listUsersForPasswordUpdate(UserDO userDO) {
|
||||
if (StringUtils.hasText(userDO.getPhone())) {
|
||||
List<UserDO> userDOList = getListByPhone(userDO.getPhone(), null);
|
||||
if (CollUtil.isNotEmpty(userDOList)) {
|
||||
return userDOList;
|
||||
}
|
||||
}
|
||||
return Collections.singletonList(userDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateFaceUrl(UserDO userDO) {
|
||||
return updateById(userDO);
|
||||
|
|
|
|||
|
|
@ -65,73 +65,5 @@
|
|||
FROM corp_info
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="corpUserStatisticPage" resultType="com.zcloud.basic.info.persistence.dataobject.CorpUserStatisticDO">
|
||||
SELECT
|
||||
c.id,
|
||||
c.corp_name AS corpName,
|
||||
IFNULL(d.departmentCount, 0) AS departmentCount,
|
||||
IFNULL(u.userCount, 0) AS userCount
|
||||
FROM corp_info c
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
corpinfo_id,
|
||||
COUNT(1) AS departmentCount
|
||||
FROM department
|
||||
WHERE delete_enum = 'FALSE'
|
||||
GROUP BY corpinfo_id
|
||||
) d ON d.corpinfo_id = c.id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
corpinfo_id,
|
||||
COUNT(1) AS userCount
|
||||
FROM user
|
||||
WHERE delete_enum = 'FALSE' and id!=corpinfo_id and employment_flag=1
|
||||
GROUP BY corpinfo_id
|
||||
) u ON u.corpinfo_id = c.id
|
||||
WHERE c.delete_enum = 'FALSE'
|
||||
<if test="params.type != null and params.type.size() > 0">
|
||||
AND c.type IN
|
||||
<foreach collection="params.type" item="type" open="(" close=")" separator=",">
|
||||
#{type}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.likeCorpName != null and params.likeCorpName.trim() != ''">
|
||||
AND c.corp_name like concat('%',#{params.likeCorpName},'%')
|
||||
</if>
|
||||
<if test="params.portArea != null">
|
||||
AND c.port_area = #{params.portArea}
|
||||
</if>
|
||||
<if test="params.corpinfoId != null">
|
||||
AND c.id = #{params.corpinfoId}
|
||||
</if>
|
||||
ORDER BY IFNULL(u.userCount, 0) DESC, IFNULL(d.departmentCount, 0) DESC, c.corp_order ASC, c.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="corpUserSummary" resultType="com.zcloud.basic.info.persistence.dataobject.CorpUserSummaryDO">
|
||||
SELECT
|
||||
IFNULL(SUM(CASE WHEN c.type IN (0, 1, 6) THEN 1 ELSE 0 END), 0) AS branchCorpCount,
|
||||
IFNULL(SUM(CASE WHEN c.type IN (3, 4, 5) THEN 1 ELSE 0 END), 0) AS relatedCorpCount,
|
||||
IFNULL((
|
||||
SELECT COUNT(1)
|
||||
FROM user u
|
||||
INNER JOIN corp_info c ON c.id = u.corpinfo_id AND c.delete_enum = 'FALSE'
|
||||
WHERE u.delete_enum = 'FALSE' and u.employment_flag=1
|
||||
<if test="params.portArea != null">
|
||||
AND c.port_area = #{params.portArea}
|
||||
</if>
|
||||
<if test="params.corpinfoId != null">
|
||||
AND c.id = #{params.corpinfoId}
|
||||
</if>
|
||||
), 0) AS userCount
|
||||
FROM corp_info c
|
||||
WHERE c.delete_enum = 'FALSE'
|
||||
<if test="params.portArea != null">
|
||||
AND c.port_area = #{params.portArea}
|
||||
</if>
|
||||
<if test="params.corpinfoId != null">
|
||||
AND c.id = #{params.corpinfoId}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue