|
|
@@ -203,6 +203,29 @@ public class StorePlatformLoginServiceImpl extends ServiceImpl<StoreUserMapper,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public JSONObject getExpirationTime(Integer storeId) throws Exception {
|
|
|
+ try {
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ jsonObject.put("expirationTime", 0);
|
|
|
+ jsonObject.put("foodLicenceExpirationTime", 0);
|
|
|
+
|
|
|
+ StoreInfo storeInfo = storeInfoMapper.selectById(storeId);
|
|
|
+ if (storeInfo != null) {
|
|
|
+ if (storeInfo.getExpirationTime().compareTo(new Date()) > 0) {
|
|
|
+ jsonObject.put("expirationTime", 1);
|
|
|
+ }
|
|
|
+ if (storeInfo.getFoodLicenceExpirationTime().compareTo(new Date()) > 0) {
|
|
|
+ jsonObject.put("foodLicenceExpirationTime", 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return jsonObject;
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("StorePlatformLoginServiceImpl.getExpirationTime(): Error Msg={}", e.getMessage());
|
|
|
+ throw new RuntimeException(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void passwordVerification(String phone, String password, String newPassword, String confirmNewPassword) {
|
|
|
LambdaUpdateWrapper<StoreUser> wrapperFans = new LambdaUpdateWrapper<>();
|
|
|
wrapperFans.eq(StoreUser::getPhone, phone);
|