@@ -45,3 +45,9 @@ alter table tuoheng_freeway.th_inspection drop column section_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_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; |
@@ -2,6 +2,7 @@ package com.tuoheng.admin.controller; | |||
import com.tuoheng.admin.entity.User; | |||
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.UserResetPwdRequest; | |||
import com.tuoheng.admin.service.user.IUserService; | |||
@@ -125,4 +126,17 @@ public class UserController { | |||
return userService.init(request); | |||
} | |||
/** | |||
* 修改密码 | |||
* | |||
* @param request | |||
* @return | |||
*/ | |||
@PutMapping("/editPwd") | |||
public JsonResult editePwd(@RequestBody UserEditPwdRequest request) { | |||
log.info("进入修改用户密码接口,request:{}",request); | |||
return userService.editPassword(request); | |||
} | |||
} |
@@ -14,7 +14,17 @@ public enum EditUserPasswordCodeEnum { | |||
EDIT_IS_FAILED(1100400, "重置密码失败"), | |||
USER_ID_IS_NULL(1100401, "用户ID为空"), | |||
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位"); | |||
/** |
@@ -34,7 +34,8 @@ public class EditOidcUserPasswordService { | |||
//设置请求头 | |||
org.springframework.http.HttpHeaders resultRequestHeader = new HttpHeaders(); | |||
resultRequestHeader.add("Authorization", "Bearer " + SecurityUserUtils.token()); | |||
// resultRequestHeader.add("Authorization", "Bearer " + "eyJraWQiOiJkMWM1MTdjYy1jNDU5LTRlMzktYjE1Ny1jMGUxZGE3Yzc5MWEiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjc2FkbWluIiwiaXNBYmxlIjoxLCJpc3MiOiJodHRwczpcL1wvbG9naW4tdGVzdC50LWFhcm9uLmNvbSIsImF1ZCI6InR1b2hlbmctZnJlZXdheS1hZG1pbiIsIm5iZiI6MTcwNDQxNzEwNSwib1VzZXJJZCI6NTQzLCJzY29wZSI6WyJ0dW9oZW5nLWFsZXJ0LW1wIiwidHVvaGVuZy1waWxvdC1tcCIsInR1b2hlbmctd2F0ZXJ3YXktYWRtaW4iLCJ0dW9oZW5nLXRlbGVjb211bWFsZS1tcCIsInR1b2hlbmctd2VwdHNwLWFkbWluIiwidHVvaGVuZy1haXJtb25pdG9yLW1wIiwidHVvaGVuZy1kbXAtbXAiLCJ0dW9oZW5nLWFpcnBvcnQtbXAiLCJ0dW9oZW5nLXRlbGVjb211bWFsZS1hZG1pbiIsInR1b2hlbmctYWlybW9uaXRvci1hZG1pbiIsInR1b2hlbmctYWxlcnQtYWRtaW4iLCJ0dW9oZW5nLWhoei1hZG1pbiIsInR1b2hlbmctaGh6LW1wIiwidHVvaGVuZy1mcmVld2F5LWFkbWluIiwidHVvaGVuZy1haXJwb3J0LWFkbWluIiwidHVvaGVuZy13YXRlcndheS1tcCIsInR1b2hlbmctd2VwdHNwLW1wIiwidHVvaGVuZy1mcmVld2F5LW1wIiwidHVvaGVuZy1kbXA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resultRequestHeader); | |||
//设置地址,飞手小程序 经过网关 | |||
String url = CommonConfig.oidcUrl + OidcUrlConstant.USER_UPDATEPASS; | |||
@@ -53,7 +54,7 @@ public class EditOidcUserPasswordService { | |||
log.error("oidc修改用户密码失败" + response.getBody()); | |||
return JsonResult.error(response.getBody().getMsg()); | |||
} | |||
return JsonResult.success(); | |||
return JsonResult.success(null,"用户密码修改成功"); | |||
} | |||
} |
@@ -3,6 +3,7 @@ package com.tuoheng.admin.service.user; | |||
import com.baomidou.mybatisplus.extension.service.IService; | |||
import com.tuoheng.admin.entity.User; | |||
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.UserResetPwdRequest; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
@@ -88,4 +89,11 @@ public interface IUserService { | |||
*/ | |||
JsonResult init(UserInitRequest request); | |||
/** | |||
* 修改密码 | |||
* @param request 参数 | |||
* @return | |||
*/ | |||
JsonResult editPassword(UserEditPwdRequest request); | |||
} |
@@ -2,14 +2,15 @@ package com.tuoheng.admin.service.user; | |||
import com.tuoheng.admin.entity.User; | |||
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.UserResetPwdRequest; | |||
import com.tuoheng.admin.service.user.add.AddUserService; | |||
import com.tuoheng.admin.service.user.delete.DeleteUserService; | |||
import com.tuoheng.admin.service.user.init.SystemUserInitService; | |||
import com.tuoheng.admin.service.user.query.QueryUserInfoByIdService; | |||
import com.tuoheng.admin.service.user.query.QueryUserListByDeptIdService; | |||
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.UpdateUserService; | |||
import com.tuoheng.admin.service.user.update.UpdateUserStatusService; | |||
@@ -17,8 +18,6 @@ import com.tuoheng.common.core.utils.JsonResult; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import org.springframework.web.bind.annotation.PathVariable; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
import java.util.List; | |||
@@ -53,6 +52,9 @@ public class UserServiceImpl implements IUserService { | |||
@Autowired | |||
private UpdateUserStatusService updateUserStatusService; | |||
@Autowired | |||
private ResetUserPasswordService resetUserPasswordService; | |||
@Autowired | |||
private UpdateUserPasswordService updateUserPasswordService; | |||
@@ -137,7 +139,7 @@ public class UserServiceImpl implements IUserService { | |||
*/ | |||
@Override | |||
public JsonResult resetPassword(String id) { | |||
return updateUserPasswordService.resetPassword(id); | |||
return resetUserPasswordService.resetPassword(id); | |||
} | |||
@@ -157,4 +159,15 @@ public class UserServiceImpl implements IUserService { | |||
return systemUserInitService.init(request); | |||
} | |||
/** | |||
* 修改密码 | |||
* | |||
* @param request 参数 | |||
* @return | |||
*/ | |||
@Override | |||
public JsonResult editPassword(UserEditPwdRequest request) { | |||
return updateUserPasswordService.editPassword(request); | |||
} | |||
} |
@@ -4,8 +4,10 @@ import cn.hutool.core.util.ObjectUtil; | |||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.tuoheng.admin.constant.SystemConstant; | |||
import com.tuoheng.admin.entity.User; | |||
import com.tuoheng.admin.enums.MarkEnum; | |||
import com.tuoheng.admin.enums.code.user.EditUserPasswordCodeEnum; | |||
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.utils.CurrentUserUtil; | |||
import com.tuoheng.common.core.utils.CommonUtils; | |||
@@ -24,7 +26,7 @@ import org.springframework.stereotype.Service; | |||
*/ | |||
@Slf4j | |||
@Service | |||
public class UpdateUserPasswordService { | |||
public class ResetUserPasswordService { | |||
@Autowired | |||
private UserMapper userMapper; | |||
@@ -83,5 +85,4 @@ public class UpdateUserPasswordService { | |||
} | |||
return JsonResult.success(user); | |||
} | |||
} |
@@ -57,5 +57,13 @@ public class InspectionController { | |||
return iInspectionService.deleteById(id); | |||
} | |||
/** | |||
* 根据任务id获取正在巡任务的直播 | |||
* @param id | |||
* @return | |||
*/ | |||
@GetMapping("/videoById/{id}") | |||
public JsonResult getVideoById(@PathVariable("id") String id){ | |||
return iInspectionService.getVideoById(id); | |||
} | |||
} |
@@ -39,9 +39,4 @@ public class UserController { | |||
return iUserService.resetPwd(dto); | |||
} | |||
} |
@@ -19,4 +19,12 @@ public interface IInspectionService { | |||
JsonResult deleteById(String id); | |||
/** | |||
* 根据机场id获取正在巡任务的直播 | |||
* @param id | |||
* @return | |||
*/ | |||
JsonResult getVideoById(String id); | |||
} |
@@ -60,6 +60,9 @@ public class InspectionServiceImpl implements IInspectionService { | |||
@Autowired | |||
private GetAirLineListService getAirLineListService; | |||
@Autowired | |||
private QueryVideoService queryVideoService; | |||
/** | |||
* 任务列表(分页) | |||
* | |||
@@ -250,4 +253,14 @@ public class InspectionServiceImpl implements IInspectionService { | |||
Map<Integer, AirportLineVo> airportLineMap = airportLineVoList.stream().collect(Collectors.toMap(AirportLineVo::getId, Function.identity())); | |||
return airportLineMap; | |||
} | |||
/** | |||
* 根据机场id获取正在巡任务的直播 | |||
* @param id | |||
* @return | |||
*/ | |||
@Override | |||
public JsonResult getVideoById(String id) { | |||
return queryVideoService.getVideoById(id); | |||
} | |||
} |