alter table tuoheng_freeway.th_inspection drop column airport_name; | alter table tuoheng_freeway.th_inspection drop column airport_name; | ||||
alter table tuoheng_freeway.th_inspection drop column inspection_line_name; | alter table tuoheng_freeway.th_inspection drop column inspection_line_name; | ||||
--周期任务表 | |||||
alter table tuoheng_freeway.th_inspection_cycle add airport_line_length double(16, 2) null comment '航线长度(公里)' after airport_line_id; | |||||
-- 云盒遥测数据表 | |||||
alter table tuoheng_freeway.th_flight_data add flytime varchar(150) default '' not null comment '总飞行时间:单位秒' after dist_home; | |||||
alter table tuoheng_freeway.th_flight_data add mileage varchar(150) default '' not null comment '总里程' after flytime; |
import com.tuoheng.admin.entity.User; | import com.tuoheng.admin.entity.User; | ||||
import com.tuoheng.admin.request.user.QueryUserPageListRequest; | import com.tuoheng.admin.request.user.QueryUserPageListRequest; | ||||
import com.tuoheng.admin.request.user.UserEditPwdRequest; | |||||
import com.tuoheng.admin.request.user.UserInitRequest; | import com.tuoheng.admin.request.user.UserInitRequest; | ||||
import com.tuoheng.admin.request.user.UserResetPwdRequest; | import com.tuoheng.admin.request.user.UserResetPwdRequest; | ||||
import com.tuoheng.admin.service.user.IUserService; | import com.tuoheng.admin.service.user.IUserService; | ||||
return userService.init(request); | return userService.init(request); | ||||
} | } | ||||
/** | |||||
* 修改密码 | |||||
* | |||||
* @param request | |||||
* @return | |||||
*/ | |||||
@PutMapping("/editPwd") | |||||
public JsonResult editePwd(@RequestBody UserEditPwdRequest request) { | |||||
log.info("进入修改用户密码接口,request:{}",request); | |||||
return userService.editPassword(request); | |||||
} | |||||
} | } |
EDIT_IS_FAILED(1100400, "重置密码失败"), | EDIT_IS_FAILED(1100400, "重置密码失败"), | ||||
USER_ID_IS_NULL(1100401, "用户ID为空"), | USER_ID_IS_NULL(1100401, "用户ID为空"), | ||||
USER_IS_NOT_EXIST(1100402, "用户不存在"), | USER_IS_NOT_EXIST(1100402, "用户不存在"), | ||||
NON_TENANT_USER(1100403, "当前用户非本租户用户"); | |||||
NON_TENANT_USER(1100403, "当前用户非本租户用户"), | |||||
OLD_PASSWORD_IS_NULL(1100404, "旧密码为空"), | |||||
NEW_PASSWORD_IS_NULL(1100405, "新密码为空"), | |||||
TWO_PASSWORDS_NOT_MATCH(1100406, "两次密码不一致"), | |||||
OLD_PASSWORD_INCORRECT(1100407, "旧密码错误"), | |||||
NEW_PASSWORD_INVALID_VALUE(1100408, "密码必须是字母和数字的组合"), | |||||
NEW_PASSWORD_INVALID_SIZE(1100408, "密码不能为空且长度为8-20位"); | |||||
/** | /** |
//设置请求头 | //设置请求头 | ||||
org.springframework.http.HttpHeaders resultRequestHeader = new HttpHeaders(); | org.springframework.http.HttpHeaders resultRequestHeader = new HttpHeaders(); | ||||
resultRequestHeader.add("Authorization", "Bearer " + SecurityUserUtils.token()); | resultRequestHeader.add("Authorization", "Bearer " + SecurityUserUtils.token()); | ||||
// resultRequestHeader.add("Authorization", "Bearer " + "eyJraWQiOiJkMWM1MTdjYy1jNDU5LTRlMzktYjE1Ny1jMGUxZGE3Yzc5MWEiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjc2FkbWluIiwiaXNBYmxlIjoxLCJpc3MiOiJodHRwczpcL1wvbG9naW4tdGVzdC50LWFhcm9uLmNvbSIsImF1ZCI6InR1b2hlbmctZnJlZXdheS1hZG1pbiIsIm5iZiI6MTcwNDQxNzEwNSwib1VzZXJJZCI6NTQzLCJzY29wZSI6WyJ0dW9oZW5nLWFsZXJ0LW1wIiwidHVvaGVuZy1waWxvdC1tcCIsInR1b2hlbmctd2F0ZXJ3YXktYWRtaW4iLCJ0dW9oZW5nLXRlbGVjb211bWFsZS1tcCIsInR1b2hlbmctd2VwdHNwLWFkbWluIiwidHVvaGVuZy1haXJtb25pdG9yLW1wIiwidHVvaGVuZy1kbXAtbXAiLCJ0dW9oZW5nLWFpcnBvcnQtbXAiLCJ0dW9oZW5nLXRlbGVjb211bWFsZS1hZG1pbiIsInR1b2hlbmctYWlybW9uaXRvci1hZG1pbiIsInR1b2hl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seK0GbJz_7yGMKUtWQNXGPIQZU2WOk2Lo6QS3NGowD8k344iV2c9K0MbJNW2SlK5g9jDQQ0zuRV-0Qz-da7B5fKplknuqyWhXB1sQ7tXl76v-xHPeAhdiO3Pt594FWjuDz4v76eyxu8a-02B9lyk9xche0habi7xwr-IstmE5c0BVj9Jwl1Din1yQ"); | |||||
HttpEntity httpEntity = new HttpEntity(oidcUpdateUserPasswordRequest, resultRequestHeader); | HttpEntity httpEntity = new HttpEntity(oidcUpdateUserPasswordRequest, resultRequestHeader); | ||||
//设置地址,飞手小程序 经过网关 | //设置地址,飞手小程序 经过网关 | ||||
String url = CommonConfig.oidcUrl + OidcUrlConstant.USER_UPDATEPASS; | String url = CommonConfig.oidcUrl + OidcUrlConstant.USER_UPDATEPASS; | ||||
log.error("oidc修改用户密码失败" + response.getBody()); | log.error("oidc修改用户密码失败" + response.getBody()); | ||||
return JsonResult.error(response.getBody().getMsg()); | return JsonResult.error(response.getBody().getMsg()); | ||||
} | } | ||||
return JsonResult.success(); | |||||
return JsonResult.success(null,"用户密码修改成功"); | |||||
} | } | ||||
} | } |
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
import com.tuoheng.admin.entity.User; | import com.tuoheng.admin.entity.User; | ||||
import com.tuoheng.admin.request.user.QueryUserPageListRequest; | import com.tuoheng.admin.request.user.QueryUserPageListRequest; | ||||
import com.tuoheng.admin.request.user.UserEditPwdRequest; | |||||
import com.tuoheng.admin.request.user.UserInitRequest; | import com.tuoheng.admin.request.user.UserInitRequest; | ||||
import com.tuoheng.admin.request.user.UserResetPwdRequest; | import com.tuoheng.admin.request.user.UserResetPwdRequest; | ||||
import com.tuoheng.common.core.utils.JsonResult; | import com.tuoheng.common.core.utils.JsonResult; | ||||
*/ | */ | ||||
JsonResult init(UserInitRequest request); | JsonResult init(UserInitRequest request); | ||||
/** | |||||
* 修改密码 | |||||
* @param request 参数 | |||||
* @return | |||||
*/ | |||||
JsonResult editPassword(UserEditPwdRequest request); | |||||
} | } |
import com.tuoheng.admin.entity.User; | import com.tuoheng.admin.entity.User; | ||||
import com.tuoheng.admin.request.user.QueryUserPageListRequest; | import com.tuoheng.admin.request.user.QueryUserPageListRequest; | ||||
import com.tuoheng.admin.request.user.UserEditPwdRequest; | |||||
import com.tuoheng.admin.request.user.UserInitRequest; | import com.tuoheng.admin.request.user.UserInitRequest; | ||||
import com.tuoheng.admin.request.user.UserResetPwdRequest; | |||||
import com.tuoheng.admin.service.user.add.AddUserService; | import com.tuoheng.admin.service.user.add.AddUserService; | ||||
import com.tuoheng.admin.service.user.delete.DeleteUserService; | import com.tuoheng.admin.service.user.delete.DeleteUserService; | ||||
import com.tuoheng.admin.service.user.init.SystemUserInitService; | import com.tuoheng.admin.service.user.init.SystemUserInitService; | ||||
import com.tuoheng.admin.service.user.query.QueryUserInfoByIdService; | import com.tuoheng.admin.service.user.query.QueryUserInfoByIdService; | ||||
import com.tuoheng.admin.service.user.query.QueryUserListByDeptIdService; | import com.tuoheng.admin.service.user.query.QueryUserListByDeptIdService; | ||||
import com.tuoheng.admin.service.user.query.QueryUserPageListService; | import com.tuoheng.admin.service.user.query.QueryUserPageListService; | ||||
import com.tuoheng.admin.service.user.update.ResetUserPasswordService; | |||||
import com.tuoheng.admin.service.user.update.UpdateUserPasswordService; | import com.tuoheng.admin.service.user.update.UpdateUserPasswordService; | ||||
import com.tuoheng.admin.service.user.update.UpdateUserService; | import com.tuoheng.admin.service.user.update.UpdateUserService; | ||||
import com.tuoheng.admin.service.user.update.UpdateUserStatusService; | import com.tuoheng.admin.service.user.update.UpdateUserStatusService; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
import org.springframework.web.bind.annotation.PathVariable; | |||||
import org.springframework.web.bind.annotation.RequestBody; | |||||
import java.util.List; | import java.util.List; | ||||
@Autowired | @Autowired | ||||
private UpdateUserStatusService updateUserStatusService; | private UpdateUserStatusService updateUserStatusService; | ||||
@Autowired | |||||
private ResetUserPasswordService resetUserPasswordService; | |||||
@Autowired | @Autowired | ||||
private UpdateUserPasswordService updateUserPasswordService; | private UpdateUserPasswordService updateUserPasswordService; | ||||
*/ | */ | ||||
@Override | @Override | ||||
public JsonResult resetPassword(String id) { | public JsonResult resetPassword(String id) { | ||||
return updateUserPasswordService.resetPassword(id); | |||||
return resetUserPasswordService.resetPassword(id); | |||||
} | } | ||||
return systemUserInitService.init(request); | return systemUserInitService.init(request); | ||||
} | } | ||||
/** | |||||
* 修改密码 | |||||
* | |||||
* @param request 参数 | |||||
* @return | |||||
*/ | |||||
@Override | |||||
public JsonResult editPassword(UserEditPwdRequest request) { | |||||
return updateUserPasswordService.editPassword(request); | |||||
} | |||||
} | } |
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||
import com.tuoheng.admin.constant.SystemConstant; | import com.tuoheng.admin.constant.SystemConstant; | ||||
import com.tuoheng.admin.entity.User; | import com.tuoheng.admin.entity.User; | ||||
import com.tuoheng.admin.enums.MarkEnum; | |||||
import com.tuoheng.admin.enums.code.user.EditUserPasswordCodeEnum; | import com.tuoheng.admin.enums.code.user.EditUserPasswordCodeEnum; | ||||
import com.tuoheng.admin.mapper.UserMapper; | import com.tuoheng.admin.mapper.UserMapper; | ||||
import com.tuoheng.admin.request.user.UserEditPwdRequest; | |||||
import com.tuoheng.admin.service.third.oidc.OidcService; | import com.tuoheng.admin.service.third.oidc.OidcService; | ||||
import com.tuoheng.admin.utils.CurrentUserUtil; | import com.tuoheng.admin.utils.CurrentUserUtil; | ||||
import com.tuoheng.common.core.utils.CommonUtils; | import com.tuoheng.common.core.utils.CommonUtils; | ||||
*/ | */ | ||||
@Slf4j | @Slf4j | ||||
@Service | @Service | ||||
public class UpdateUserPasswordService { | |||||
public class ResetUserPasswordService { | |||||
@Autowired | @Autowired | ||||
private UserMapper userMapper; | private UserMapper userMapper; | ||||
} | } | ||||
return JsonResult.success(user); | return JsonResult.success(user); | ||||
} | } | ||||
} | } |
return iInspectionService.deleteById(id); | return iInspectionService.deleteById(id); | ||||
} | } | ||||
/** | |||||
* 根据任务id获取正在巡任务的直播 | |||||
* @param id | |||||
* @return | |||||
*/ | |||||
@GetMapping("/videoById/{id}") | |||||
public JsonResult getVideoById(@PathVariable("id") String id){ | |||||
return iInspectionService.getVideoById(id); | |||||
} | |||||
} | } |
return iUserService.resetPwd(dto); | return iUserService.resetPwd(dto); | ||||
} | } | ||||
} | } |
JsonResult deleteById(String id); | JsonResult deleteById(String id); | ||||
/** | |||||
* 根据机场id获取正在巡任务的直播 | |||||
* @param id | |||||
* @return | |||||
*/ | |||||
JsonResult getVideoById(String id); | |||||
} | } |
@Autowired | @Autowired | ||||
private GetAirLineListService getAirLineListService; | private GetAirLineListService getAirLineListService; | ||||
@Autowired | |||||
private QueryVideoService queryVideoService; | |||||
/** | /** | ||||
* 任务列表(分页) | * 任务列表(分页) | ||||
* | * | ||||
Map<Integer, AirportLineVo> airportLineMap = airportLineVoList.stream().collect(Collectors.toMap(AirportLineVo::getId, Function.identity())); | Map<Integer, AirportLineVo> airportLineMap = airportLineVoList.stream().collect(Collectors.toMap(AirportLineVo::getId, Function.identity())); | ||||
return airportLineMap; | return airportLineMap; | ||||
} | } | ||||
/** | |||||
* 根据机场id获取正在巡任务的直播 | |||||
* @param id | |||||
* @return | |||||
*/ | |||||
@Override | |||||
public JsonResult getVideoById(String id) { | |||||
return queryVideoService.getVideoById(id); | |||||
} | |||||
} | } |