Commit 84af5cc5 authored by liqin's avatar liqin 💬

Merge branch 'dev' of http://111.203.232.171:8888/lee/chnmuseum-party into dev

parents b0822d9b d4ad2df2
...@@ -64,7 +64,7 @@ public class MvcConfiguration extends WebMvcConfigurationSupport { ...@@ -64,7 +64,7 @@ public class MvcConfiguration extends WebMvcConfigurationSupport {
FastJsonConfig fastJsonConfig = new FastJsonConfig(); FastJsonConfig fastJsonConfig = new FastJsonConfig();
fastJsonConfig.setSerializerFeatures( fastJsonConfig.setSerializerFeatures(
SerializerFeature.PrettyFormat, // 结果格式化 SerializerFeature.PrettyFormat, // 结果格式化
// SerializerFeature.WriteMapNullValue, // 输出空值字段 SerializerFeature.WriteMapNullValue, // 输出空值字段
SerializerFeature.WriteNullStringAsEmpty, // String如果为null,输出为"",而不是null SerializerFeature.WriteNullStringAsEmpty, // String如果为null,输出为"",而不是null
SerializerFeature.DisableCircularReferenceDetect, // 消除对同一对象循环引用的问题 SerializerFeature.DisableCircularReferenceDetect, // 消除对同一对象循环引用的问题
SerializerFeature.WriteNullListAsEmpty, // List集合如果为null,输出为[],而不是null SerializerFeature.WriteNullListAsEmpty, // List集合如果为null,输出为[],而不是null
......
...@@ -30,6 +30,7 @@ import org.apache.commons.lang3.StringUtils; ...@@ -30,6 +30,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authc.DisabledAccountException; import org.apache.shiro.authc.DisabledAccountException;
import org.apache.shiro.authc.IncorrectCredentialsException; import org.apache.shiro.authc.IncorrectCredentialsException;
import org.apache.shiro.authz.annotation.RequiresAuthentication; import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.bytedeco.opencv.presets.opencv_core;
import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
...@@ -237,6 +238,7 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -237,6 +238,7 @@ public class ChinaMobileRestApiController extends BaseController {
jsonObject.put("userId", user.getId()); jsonObject.put("userId", user.getId());
jsonObject.put("userName", user.getUserName()); jsonObject.put("userName", user.getUserName());
jsonObject.put("expire", TimeUtils.format(LocalDateTime.now().plusMinutes(240), TimeUtils.FORMAT_ONE)); jsonObject.put("expire", TimeUtils.format(LocalDateTime.now().plusMinutes(240), TimeUtils.FORMAT_ONE));
jsonObject.put("expireDate", user.getExiredDate());
jsonObject.put("orgCode", user.getOrgId()); jsonObject.put("orgCode", user.getOrgId());
jsonObject.put("orgName", user.getOrgName()); jsonObject.put("orgName", user.getOrgName());
...@@ -268,19 +270,19 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -268,19 +270,19 @@ public class ChinaMobileRestApiController extends BaseController {
return resultMap; return resultMap;
} }
JSONObject jsonObject = new JSONObject(true); HashMap<String, Object> map = new HashMap<>();
jsonObject.put("userId", user.getId()); map.put("userId", user.getId());
jsonObject.put("userName", user.getUserName()); map.put("userName", user.getUserName());
// long expire = stringRedisTemplate.getExpire(SHIRO_JWT_TOKEN + token) == null ? 0L : stringRedisTemplate.getExpire(SHIRO_JWT_TOKEN + token); // long expire = stringRedisTemplate.getExpire(SHIRO_JWT_TOKEN + token) == null ? 0L : stringRedisTemplate.getExpire(SHIRO_JWT_TOKEN + token);
//jsonObject.put("expire", TimeUtils.format(LocalDateTime.now().plusMinutes(expire), TimeUtils.FORMAT_ONE)); //jsonObject.put("expire", TimeUtils.format(LocalDateTime.now().plusMinutes(expire), TimeUtils.FORMAT_ONE));
jsonObject.put("effectiveDate", user.getEffectiveDate()); map.put("effectiveDate", user.getEffectiveDate());
jsonObject.put("expireDate", user.getExiredDate()); map.put("expireDate", user.getExiredDate());
jsonObject.put("orgCode", user.getOrgId()); map.put("orgCode", user.getOrgId());
jsonObject.put("orgName", organ.getName()); map.put("orgName", organ.getName());
resultMap.put("resultCode", "200"); resultMap.put("resultCode", "200");
resultMap.put("message", "成功"); resultMap.put("message", "成功");
resultMap.put("data", jsonObject); resultMap.put("data", map);
return resultMap; return resultMap;
} catch (Exception e) { } catch (Exception e) {
resultMap.put("resultCode", "500"); resultMap.put("resultCode", "500");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment