forked from kidgrow-microservices-platform

zhaoxiaohao
2020-07-02 edcc7ddbc34a15319f680d63656884657236a346
修改续签时间,自己只能修改手自己手机号的验证,修改保存意见的接口
4 files modified
39 ■■■■■ changed files
kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-biz/src/main/java/com/kidgrow/oprationcenter/service/impl/SysFeedbackServiceImpl.java 26 ●●●● patch | view | raw | blame | history
kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-server/src/main/java/com/kidgrow/usercenter/controller/SysUserController.java 9 ●●●● patch | view | raw | blame | history
kidgrow-commons/kidgrow-authclient-spring-boot-starter/src/main/java/com/kidgrow/authclient/properties/RenewProperties.java 2 ●●● patch | view | raw | blame | history
kidgrow-uaa/kidgrow-uaa-server/src/main/java/com/kidgrow/oauth2/handler/SingleTokenServices.java 2 ●●● patch | view | raw | blame | history
kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-biz/src/main/java/com/kidgrow/oprationcenter/service/impl/SysFeedbackServiceImpl.java
@@ -83,19 +83,19 @@
        if (sysFeedback.getId()==null) {
            List<SysOrganization> organizations = sysUser.getOrganizations();
            if (organizations.size() > 0) {
                sysFeedback.setDepartmentId(organizations.get(1).getId());
                sysFeedback.setDepartmentName(organizations.get(1).getOrgName());
                sysFeedback.setHospitalId(organizations.get(0).getId());
                sysFeedback.setHospitalName(organizations.get(0).getOrgName());
                Map map = new HashMap();
                map.put("user_id", sysUser.getId());
                ResultBody listByMap = sysDoctorService.getListByMap(map);
                List<SysDoctor> sysDoctors = JSON.parseArray(JSON.toJSONString(listByMap.getData()), SysDoctor.class);
                if (sysDoctors.size() > 0) {
                    sysFeedback.setDoctorId(sysDoctors.get(0).getId());
                    sysFeedback.setDoctorName(sysDoctors.get(0).getDoctorName());
                    sysFeedback.setDoctorTel(sysDoctors.get(0).getDoctorTel());
                }
//                sysFeedback.setDepartmentId(organizations.get(1).getId());
//                sysFeedback.setDepartmentName(organizations.get(1).getOrgName());
//                sysFeedback.setHospitalId(organizations.get(0).getId());
//                sysFeedback.setHospitalName(organizations.get(0).getOrgName());
//                Map map = new HashMap();
//                map.put("user_id", sysUser.getId());
//                ResultBody listByMap = sysDoctorService.getListByMap(map);
//                List<SysDoctor> sysDoctors = JSON.parseArray(JSON.toJSONString(listByMap.getData()), SysDoctor.class);
//                if (sysDoctors.size() > 0) {
//                    sysFeedback.setDoctorId(sysDoctors.get(0).getId());
//                    sysFeedback.setDoctorName(sysDoctors.get(0).getDoctorName());
//                    sysFeedback.setDoctorTel(sysDoctors.get(0).getDoctorTel());
//                }
                int insert = baseMapper.insert(sysFeedback);
                if (insert > 0) {
                    return true;
kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-server/src/main/java/com/kidgrow/usercenter/controller/SysUserController.java
@@ -293,7 +293,14 @@
     * @return
     */
    @PutMapping(value = "/users/updateusertel")
    public ResultBody updateUserTel(@RequestParam Map<String, Object> params) {
    public ResultBody updateUserTel(@RequestParam Map<String, Object> params,@LoginUser SysUser sysUser) {
        String oldTel = MapUtils.getString(params, "oldTel");
        if (oldTel==null){
            return ResultBody.failed("请输入原账号");
        }
        if(!sysUser.getUsername().equals(oldTel)){
            return ResultBody.failed("请输入正确的原账号");
        }
        return appUserService.updateUserTel(params);
    }
kidgrow-commons/kidgrow-authclient-spring-boot-starter/src/main/java/com/kidgrow/authclient/properties/RenewProperties.java
@@ -35,5 +35,5 @@
    /**
     * 续签时间比例,当前剩余时间小于小于过期总时长的50%则续签
     */
    private Double timeRatio = 0.5;
    private Double timeRatio = 1D;//0.5
}
kidgrow-uaa/kidgrow-uaa-server/src/main/java/com/kidgrow/oauth2/handler/SingleTokenServices.java
@@ -30,7 +30,7 @@
@Deprecated
public class SingleTokenServices implements AuthorizationServerTokenServices, ResourceServerTokenServices, ConsumerTokenServices, InitializingBean {
    private int refreshTokenValiditySeconds = 2592000;
    private int accessTokenValiditySeconds = 43200;
    private int accessTokenValiditySeconds = 3600;//43200
    private boolean supportRefreshToken = false;
    private boolean reuseRefreshToken = true;
    private TokenStore tokenStore;