| | |
| | | public static String convertSecondsToHoursMinutes(int seconds) { |
| | | int hours = seconds / 3600; |
| | | int minutes = (seconds % 3600) / 60; |
| | | return String.format("%d小时%d分钟", hours, minutes); |
| | | if (hours == 0){ |
| | | if (minutes == 0){ |
| | | return String.format("%d秒", seconds); |
| | | }else{ |
| | | return String.format("%d分钟", minutes); |
| | | } |
| | | }else{ |
| | | return String.format("%d小时%d分钟", hours, minutes); |
| | | } |
| | | } |
| | | public static String convertToChineseOrdinal(int number) { |
| | | if (number <= 0 || number > 50) { |
| | |
| | | return AjaxResult.error("新密码不能与旧密码相同"); |
| | | } |
| | | one.setPassword(SecurityUtils.encryptPassword(password)); |
| | | sysUserService.updateById(one); |
| | | return AjaxResult.success(); |
| | | } |
| | | @GetMapping("/sendPhoneCode") |