|
@@ -4,7 +4,10 @@ import cn.hutool.core.lang.Validator;
|
|
|
import com.zhongzheng.common.annotation.Log;
|
|
|
import com.zhongzheng.common.core.controller.BaseController;
|
|
|
import com.zhongzheng.common.core.domain.AjaxResult;
|
|
|
+import com.zhongzheng.common.core.domain.entity.SysUser;
|
|
|
+import com.zhongzheng.common.core.domain.model.LoginUser;
|
|
|
import com.zhongzheng.common.enums.BusinessType;
|
|
|
+import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.common.utils.ServletUtils;
|
|
|
import com.zhongzheng.framework.web.service.WxTokenService;
|
|
|
import com.zhongzheng.modules.user.bo.*;
|
|
@@ -19,6 +22,7 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.HashMap;
|
|
@@ -139,4 +143,18 @@ public class UserController extends BaseController {
|
|
|
bo.setUserId(loginUser.getUser().getUserId());
|
|
|
return toAjax(iUserService.editShareActivityCode(bo) ? 1 : 0);
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation("检查密码修改时间")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:user:list')")
|
|
|
+ @GetMapping("/checkPwdTime")
|
|
|
+ public AjaxResult<Boolean> checkPwdTime()
|
|
|
+ {
|
|
|
+ ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
+ UserVo userVo = iUserService.queryById(loginUser.getUser().getUserId());
|
|
|
+ boolean needUpdate = false;
|
|
|
+ if(Validator.isNotEmpty(userVo.getPwdTime())&&(DateUtils.getNowTime().longValue()-userVo.getPwdTime().longValue())>90*24*3600){
|
|
|
+ needUpdate = true;
|
|
|
+ }
|
|
|
+ return AjaxResult.success(needUpdate);
|
|
|
+ }
|
|
|
}
|