PLF il y a 5 ans
Parent
commit
11df309177

+ 1 - 0
src/main/java/com/caimei/modules/shiro/controller/ShiroController.java

@@ -66,6 +66,7 @@ public class ShiroController {
     @RequestMapping(value = "changePassword", method = RequestMethod.POST)
     public JsonModel changePassword(@RequestBody CmMallAdminUser adminUser, HttpServletRequest httpRequest) {
         JsonModel jsonModel = JsonModel.newInstance();
+        if (adminUser.getPassword().equals(adminUser.getOldPassword())) return jsonModel.error("新密码不能与老密码一样");
         String token = httpRequest.getHeader("token");
         String decoded = TokenEncryptUtils.decoded(token);
         String[] tokens = decoded.split("#,#");

+ 1 - 1
src/main/java/com/caimei/modules/shiro/service/impl/HomePageServiceImpl.java

@@ -114,7 +114,7 @@ public class HomePageServiceImpl implements HomePageService {
         //设置时间格式为yyyy-MM-dd HH:mm:ss
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         int month = cal.get(Calendar.MONTH) + 1;
-        map.put("month", "" + month);
+        map.put("month", "" + month + "月");
         //获取到本月起始日
         int actualMinimum = cal.getActualMinimum(Calendar.DAY_OF_MONTH);
         //获取到本月结束日