Browse Source

orgId改为agencyId

dev_shibei_match
yinzuomei 5 years ago
parent
commit
fd166da964
  1. 8
      epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java
  2. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/GovTokenDto.java
  3. 2
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StaffLoginAgencyRecordFormDTO.java
  4. 2
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffLatestAgencyResultDTO.java
  5. 18
      epmet-user/epmet-user-server/src/main/resources/mapper/StaffAgencyVisitedDao.xml

8
epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java

@ -156,7 +156,7 @@ public class GovLoginServiceImpl implements GovLoginService {
govTokenDto.setToken(token); govTokenDto.setToken(token);
govTokenDto.setUpdateTime(System.currentTimeMillis()); govTokenDto.setUpdateTime(System.currentTimeMillis());
govTokenDto.setExpireTime(jwtTokenUtils.getExpiration(token).getTime()); govTokenDto.setExpireTime(jwtTokenUtils.getExpiration(token).getTime());
govTokenDto.setOrgId(staffLatestAgency.getOrgId()); govTokenDto.setAgencyId(staffLatestAgency.getAgencyId());
govTokenDto.setCustomerId(staffLatestAgency.getCustomerId()); govTokenDto.setCustomerId(staffLatestAgency.getCustomerId());
cpUserDetailRedis.set(govTokenDto, expire); cpUserDetailRedis.set(govTokenDto, expire);
logger.info("截止时间:" + DateUtils.format(jwtTokenUtils.getExpiration(token), "yyyy-MM-dd HH:mm:ss")); logger.info("截止时间:" + DateUtils.format(jwtTokenUtils.getExpiration(token), "yyyy-MM-dd HH:mm:ss"));
@ -169,7 +169,7 @@ public class GovLoginServiceImpl implements GovLoginService {
staffLoginAgencyRecordFormDTO.setStaffId(latestStaffWechatLoginDTO.getStaffId()); staffLoginAgencyRecordFormDTO.setStaffId(latestStaffWechatLoginDTO.getStaffId());
staffLoginAgencyRecordFormDTO.setWxOpenId(latestStaffWechatLoginDTO.getWxOpenId()); staffLoginAgencyRecordFormDTO.setWxOpenId(latestStaffWechatLoginDTO.getWxOpenId());
staffLoginAgencyRecordFormDTO.setMobile(latestStaffWechatLoginDTO.getMobile()); staffLoginAgencyRecordFormDTO.setMobile(latestStaffWechatLoginDTO.getMobile());
staffLoginAgencyRecordFormDTO.setOrgId(latestStaffWechatLoginDTO.getOrgId()); staffLoginAgencyRecordFormDTO.setAgencyId(latestStaffWechatLoginDTO.getAgencyId());
Result staffLoginRecordResult = epmetUserFeignClient.saveStaffLoginRecord(staffLoginAgencyRecordFormDTO); Result staffLoginRecordResult = epmetUserFeignClient.saveStaffLoginRecord(staffLoginAgencyRecordFormDTO);
return staffLoginRecordResult; return staffLoginRecordResult;
} }
@ -208,7 +208,7 @@ public class GovLoginServiceImpl implements GovLoginService {
staffLoginAgencyRecordFormDTO.setStaffId(staffId); staffLoginAgencyRecordFormDTO.setStaffId(staffId);
staffLoginAgencyRecordFormDTO.setWxOpenId(openId); staffLoginAgencyRecordFormDTO.setWxOpenId(openId);
staffLoginAgencyRecordFormDTO.setMobile(formDTO.getMobile()); staffLoginAgencyRecordFormDTO.setMobile(formDTO.getMobile());
staffLoginAgencyRecordFormDTO.setOrgId(formDTO.getOrgId()); staffLoginAgencyRecordFormDTO.setAgencyId(formDTO.getOrgId());
Result staffLoginRecordResult = epmetUserFeignClient.saveStaffLoginRecord(staffLoginAgencyRecordFormDTO); Result staffLoginRecordResult = epmetUserFeignClient.saveStaffLoginRecord(staffLoginAgencyRecordFormDTO);
return staffLoginRecordResult; return staffLoginRecordResult;
} }
@ -263,7 +263,7 @@ public class GovLoginServiceImpl implements GovLoginService {
govTokenDto.setToken(token); govTokenDto.setToken(token);
govTokenDto.setUpdateTime(System.currentTimeMillis()); govTokenDto.setUpdateTime(System.currentTimeMillis());
govTokenDto.setExpireTime(jwtTokenUtils.getExpiration(token).getTime()); govTokenDto.setExpireTime(jwtTokenUtils.getExpiration(token).getTime());
govTokenDto.setOrgId(orgId); govTokenDto.setAgencyId(orgId);
govTokenDto.setCustomerId(customerId); govTokenDto.setCustomerId(customerId);
cpUserDetailRedis.set(govTokenDto, expire); cpUserDetailRedis.set(govTokenDto, expire);
logger.info("截止时间:" + DateUtils.format(jwtTokenUtils.getExpiration(token), "yyyy-MM-dd HH:mm:ss")); logger.info("截止时间:" + DateUtils.format(jwtTokenUtils.getExpiration(token), "yyyy-MM-dd HH:mm:ss"));

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/GovTokenDto.java

@ -65,7 +65,7 @@ public class GovTokenDto implements Serializable {
/** /**
* 当前登录的组织id(顶级) * 当前登录的组织id(顶级)
*/ */
private String orgId; private String agencyId;
/** /**
* 当前网格对应的组织结构id的全路径用:隔开 * 当前网格对应的组织结构id的全路径用:隔开

2
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StaffLoginAgencyRecordFormDTO.java

@ -34,7 +34,7 @@ public class StaffLoginAgencyRecordFormDTO implements Serializable {
/** /**
* 组织机构id * 组织机构id
*/ */
private String orgId; private String agencyId;
} }

2
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffLatestAgencyResultDTO.java

@ -36,6 +36,6 @@ public class StaffLatestAgencyResultDTO implements Serializable {
/** /**
* 组织机构id * 组织机构id
*/ */
private String orgId; private String agencyId;
} }

18
epmet-user/epmet-user-server/src/main/resources/mapper/StaffAgencyVisitedDao.xml

@ -21,18 +21,18 @@
<!-- 获取当前微信上次登录的账号信息 --> <!-- 获取当前微信上次登录的账号信息 -->
<select id="selectLatestStaffWechatLoginRecord" parameterType="java.lang.String" resultType="com.epmet.dto.result.StaffLatestAgencyResultDTO"> <select id="selectLatestStaffWechatLoginRecord" parameterType="java.lang.String" resultType="com.epmet.dto.result.StaffLatestAgencyResultDTO">
SELECT SELECT
sah.CUSTOMER_ID, sav.CUSTOMER_ID,
sah.STAFF_ID, sav.STAFF_ID,
sah.WX_OPEN_ID, sav.WX_OPEN_ID,
sah.MOBILE, sav.MOBILE,
sah.ORG_ID sav.AGENCY_ID
FROM FROM
staff_agency_history sah staff_agency_visited sav
WHERE WHERE
sah.DEL_FLAG = '0' sav.DEL_FLAG = '0'
AND sah.WX_OPEN_ID =#{openId} AND sav.WX_OPEN_ID =#{openId}
ORDER BY ORDER BY
sah.CREATED_TIME DESC sav.CREATED_TIME DESC
LIMIT 1 LIMIT 1
</select> </select>
</mapper> </mapper>
Loading…
Cancel
Save