feat(corp): 添加港区信息字段并优化用户统计查询

dev_visual_page
zhaokai 2026-07-24 15:07:57 +08:00
parent 816d82f23e
commit c4da5decd4
3 changed files with 16 additions and 2 deletions

View File

@ -69,6 +69,18 @@ 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("修改失败");

View File

@ -188,6 +188,8 @@ 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);

View File

@ -86,7 +86,7 @@
corpinfo_id,
COUNT(1) AS userCount
FROM user
WHERE delete_enum = 'FALSE'
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'
@ -116,7 +116,7 @@
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'
WHERE u.delete_enum = 'FALSE' and u.employment_flag=1
<if test="params.portArea != null">
AND c.port_area = #{params.portArea}
</if>