feat(corp): 添加港区信息字段并优化用户统计查询
parent
816d82f23e
commit
c4da5decd4
|
|
@ -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("修改失败");
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue