Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
46c1445737
@ -0,0 +1,14 @@
|
||||
package com.cdzy.ebikemaintenance.mapper;
|
||||
|
||||
import com.cdzy.ebikemaintenance.model.pojo.EbikeVehicleListingRecords;
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
|
||||
/**
|
||||
* 映射层。
|
||||
*
|
||||
* @author zjd
|
||||
* @since 2025-04-22
|
||||
*/
|
||||
public interface EbikeVehicleListingRecordsMapper extends BaseMapper<EbikeVehicleListingRecords> {
|
||||
|
||||
}
|
||||
@ -47,7 +47,7 @@ public class EbikeBikeOrder implements Serializable {
|
||||
private Long orderCode;
|
||||
|
||||
/**
|
||||
* 工单类型 1 维修工单 2 换电工单
|
||||
* 工单类型 1 维修工单 2 换电工单 3 调度工单
|
||||
*/
|
||||
private String orderType;
|
||||
|
||||
|
||||
@ -0,0 +1,72 @@
|
||||
package com.cdzy.ebikemaintenance.model.pojo;
|
||||
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 实体类。
|
||||
*
|
||||
* @author zjd
|
||||
* @since 2025-04-22
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("ebike_vehicle_listing_records")
|
||||
public class EbikeVehicleListingRecords implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 自增主键,唯一标识一条记录
|
||||
*/
|
||||
@Id
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 区域ID,表示车辆所在的区域
|
||||
*/
|
||||
private String reginId;
|
||||
|
||||
/**
|
||||
* 车辆ID,表示车辆的唯一标识
|
||||
*/
|
||||
private String bikeCode;
|
||||
|
||||
/**
|
||||
* 操作人,表示执行该上架操作的用户
|
||||
*/
|
||||
private String operateUser;
|
||||
|
||||
/**
|
||||
* 操作时间,表示该操作发生的具体时间
|
||||
*/
|
||||
private LocalDateTime operateTime;
|
||||
|
||||
/**
|
||||
* 批次,格式为年月日时分秒(如:202504220948)
|
||||
*/
|
||||
private String batch;
|
||||
|
||||
/**
|
||||
* 记录的详细描述,存放表字段说明和其他信息
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 操作类型,表示是上架 1 下架 0
|
||||
*/
|
||||
private Integer operationType;
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.cdzy.ebikemaintenance.service;
|
||||
|
||||
import com.cdzy.ebikemaintenance.model.pojo.EbikeVehicleListingRecords;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
|
||||
/**
|
||||
* 服务层。
|
||||
*
|
||||
* @author zjd
|
||||
* @since 2025-04-22
|
||||
*/
|
||||
public interface EbikeVehicleListingRecordsService extends IService<EbikeVehicleListingRecords> {
|
||||
|
||||
}
|
||||
@ -41,6 +41,7 @@ import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -55,8 +56,7 @@ import static com.cdzy.ebikemaintenance.model.pojo.table.EbikeBikeInfoTableDef.E
|
||||
import static com.cdzy.ebikemaintenance.model.pojo.table.EbikeBikeOrderTableDef.EBIKE_BIKE_ORDER;
|
||||
import static com.cdzy.ebikemaintenance.model.pojo.table.EbikeCarStatusInfoTableDef.EBIKE_CAR_STATUS_INFO;
|
||||
import static com.cdzy.ebikemaintenance.model.pojo.table.EbikeEcuInfoTableDef.EBIKE_ECU_INFO;
|
||||
import static com.mybatisflex.core.query.QueryMethods.max;
|
||||
import static com.mybatisflex.core.query.QueryMethods.select;
|
||||
import static com.mybatisflex.core.query.QueryMethods.*;
|
||||
|
||||
/**
|
||||
* 车辆基本信息 服务层实现。
|
||||
@ -113,6 +113,8 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
|
||||
private MinioUtil minioUtil;
|
||||
@Resource
|
||||
private GeoCodingUtil geoCodingUtil;
|
||||
@Resource
|
||||
private EbikeVehicleListingRecordsMapper ebikeVehicleListingRecordsMapper;
|
||||
|
||||
@Override
|
||||
public EbikeBikeInfo getByBikeCode(String bikeCode) {
|
||||
@ -366,6 +368,7 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
|
||||
try {
|
||||
ebikeBikeInfoMapper.vehicleLeaveWarehouse(reqBulkDeliveryDto.getBikeCode(),
|
||||
reqBulkDeliveryDto.getStatus(), reqBulkDeliveryDto.getReginId());
|
||||
batchRecordBikeListingInfo(reqBulkDeliveryDto);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
log.error("vehicleLeaveWarehouse===>{}", e.getMessage() + Arrays.toString(e.getStackTrace()));
|
||||
@ -1085,4 +1088,44 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
|
||||
}
|
||||
return resEbikeBikeWorkOrderDto;
|
||||
}
|
||||
/**
|
||||
* 批量记录车辆上架信息
|
||||
*
|
||||
* @param reqBulkDeliveryDto 请求参数
|
||||
*/
|
||||
public void batchRecordBikeListingInfo(ReqBulkDeliveryDto reqBulkDeliveryDto) {
|
||||
// 获取车辆上架的车牌列表
|
||||
List<String> bikeCode = reqBulkDeliveryDto.getBikeCode();
|
||||
String tokenValue = StpUtil.getTokenValue();
|
||||
JsonResult<StaffFeign> result = staffFeignClient.getInfoByToken(tokenValue);
|
||||
if (result.getCode() != Code.SUCCESS) {
|
||||
throw new RuntimeException("获取用户信息失败");
|
||||
}
|
||||
StaffFeign staffFeign = result.getData();
|
||||
// 获取当前操作用户和时间
|
||||
String operatorName = staffFeign.getStaffId().toString();
|
||||
LocalDateTime currentTime = LocalDateTime.now();
|
||||
String batch = currentTime.format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")); // 格式化当前时间为“年月日时分秒”形式
|
||||
|
||||
// 创建用于批量插入的记录列表
|
||||
List<EbikeVehicleListingRecords> recordsList = new ArrayList<>(bikeCode.size());
|
||||
// 遍历车辆编号列表,生成每个记录对象
|
||||
for (String bikeId : bikeCode) {
|
||||
EbikeVehicleListingRecords record = new EbikeVehicleListingRecords();
|
||||
record.setBatch(batch);
|
||||
record.setBikeCode(bikeId);
|
||||
String reginId = reqBulkDeliveryDto.getReginId();
|
||||
// 根据reginId是否为空设置内容
|
||||
record.setContent(reginId.isEmpty() ? "车辆批量下架" : "车辆批量上架");
|
||||
record.setOperationType(reginId.isEmpty() ? 0 : 1);
|
||||
record.setOperateUser(operatorName);
|
||||
record.setOperateTime(currentTime);
|
||||
record.setReginId(reqBulkDeliveryDto.getReginId());
|
||||
recordsList.add(record);
|
||||
}
|
||||
// 如果有记录,则批量插入
|
||||
if (!recordsList.isEmpty()) {
|
||||
ebikeVehicleListingRecordsMapper.insertBatch(recordsList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
package com.cdzy.ebikemaintenance.service.impl;
|
||||
|
||||
import com.cdzy.ebikemaintenance.mapper.EbikeVehicleListingRecordsMapper;
|
||||
import com.cdzy.ebikemaintenance.model.pojo.EbikeVehicleListingRecords;
|
||||
import com.cdzy.ebikemaintenance.service.EbikeVehicleListingRecordsService;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 服务层实现。
|
||||
*
|
||||
* @author zjd
|
||||
* @since 2025-04-22
|
||||
*/
|
||||
@Service
|
||||
public class EbikeVehicleListingRecordsServiceImpl extends ServiceImpl<EbikeVehicleListingRecordsMapper, EbikeVehicleListingRecords> implements EbikeVehicleListingRecordsService {
|
||||
|
||||
}
|
||||
@ -1,6 +1,8 @@
|
||||
package com.cdzy.ebikeoperate.controller;
|
||||
|
||||
|
||||
import com.cdzy.common.model.JsonResult;
|
||||
import com.cdzy.ebikeoperate.model.dto.response.EbikeOrgZoneDto;
|
||||
import com.cdzy.ebikeoperate.model.pojo.EbikeOrgZone;
|
||||
import com.cdzy.ebikeoperate.service.EbikeOrgZoneService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -28,8 +30,9 @@ public class EbikeOrgZoneController {
|
||||
* @return {@code true} 添加成功,{@code false} 添加失败
|
||||
*/
|
||||
@PostMapping("save")
|
||||
public boolean save(@RequestBody EbikeOrgZone ebikeOrgZone) {
|
||||
return ebikeOrgZoneService.save(ebikeOrgZone);
|
||||
public JsonResult<?> save(@RequestBody EbikeOrgZone ebikeOrgZone) {
|
||||
boolean r = ebikeOrgZoneService.save(ebikeOrgZone);
|
||||
return r? JsonResult.success() : JsonResult.failed("添加行政区划授权信息失败");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -39,8 +42,9 @@ public class EbikeOrgZoneController {
|
||||
* @return {@code true} 删除成功,{@code false} 删除失败
|
||||
*/
|
||||
@PostMapping("remove")
|
||||
public boolean remove(@RequestParam(name = "id") String id) {
|
||||
return ebikeOrgZoneService.removeById(id);
|
||||
public JsonResult<?> remove(@RequestParam(name = "id") String id) {
|
||||
boolean r = ebikeOrgZoneService.removeById(id);
|
||||
return r? JsonResult.success() : JsonResult.failed("删除行政区划授权信息失败");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -50,18 +54,24 @@ public class EbikeOrgZoneController {
|
||||
* @return {@code true} 更新成功,{@code false} 更新失败
|
||||
*/
|
||||
@PostMapping("update")
|
||||
public boolean update(@RequestBody EbikeOrgZone ebikeOrgZone) {
|
||||
return ebikeOrgZoneService.updateById(ebikeOrgZone);
|
||||
public JsonResult<?> update(@RequestBody EbikeOrgZone ebikeOrgZone) {
|
||||
boolean r = ebikeOrgZoneService.updateById(ebikeOrgZone);
|
||||
return r? JsonResult.success() : JsonResult.failed("更新行政区划授权信息失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有行政区划授权信息。
|
||||
*
|
||||
* @param orgId 组织id
|
||||
* @param zoneId 区域id
|
||||
* @return 所有数据
|
||||
*/
|
||||
@GetMapping("list")
|
||||
public List<EbikeOrgZone> list() {
|
||||
return ebikeOrgZoneService.list();
|
||||
public JsonResult<?> list(@RequestParam(name = "orgId", required = false) String orgId
|
||||
, @RequestParam(name = "zoneId", required = false) String zoneId) {
|
||||
|
||||
List<EbikeOrgZoneDto> list = ebikeOrgZoneService.list(orgId, zoneId);
|
||||
return list==null? JsonResult.failed("查询行政区划授权信息失败") : JsonResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -71,8 +81,9 @@ public class EbikeOrgZoneController {
|
||||
* @return 行政区划授权信息详情
|
||||
*/
|
||||
@GetMapping("getInfo")
|
||||
public EbikeOrgZone getInfo(@RequestParam(name = "id") String id) {
|
||||
return ebikeOrgZoneService.getById(id);
|
||||
public JsonResult<?> getInfo(@RequestParam(name = "id") String id) {
|
||||
EbikeOrgZone r = ebikeOrgZoneService.getById(id);
|
||||
return r==null? JsonResult.failed("查询行政区划授权信息失败") : JsonResult.success(r);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ public class EbikeSysExchangePeriodController {
|
||||
* @return {@code true} 删除成功,{@code false} 删除失败
|
||||
*/
|
||||
@PostMapping("remove")
|
||||
public JsonResult<?> remove(@PathVariable String id) {
|
||||
public JsonResult<?> remove(@RequestParam(name = "id") String id) {
|
||||
boolean r = ebikeSysExchangePeriodService.removeById(id);
|
||||
return r? JsonResult.success() : JsonResult.failed("删除区域分时间段换电失败");
|
||||
}
|
||||
|
||||
@ -0,0 +1,56 @@
|
||||
package com.cdzy.ebikeoperate.model.dto.response;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 行政区划授权信息 实体类。
|
||||
*
|
||||
* @author dingchao
|
||||
* @since 2025-04-17
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EbikeOrgZoneDto implements Serializable {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 组织ID
|
||||
*/
|
||||
private String orgId;
|
||||
|
||||
/**
|
||||
* 行政区划ID
|
||||
*/
|
||||
private String zoneId;
|
||||
|
||||
/**
|
||||
* 授权人
|
||||
*/
|
||||
private String staffId;
|
||||
|
||||
/**
|
||||
* 授权时间
|
||||
*/
|
||||
private LocalDateTime assignedTime;
|
||||
|
||||
/**
|
||||
* 行政区划名称
|
||||
*/
|
||||
private String zoneName;
|
||||
|
||||
}
|
||||
@ -1,8 +1,11 @@
|
||||
package com.cdzy.ebikeoperate.service;
|
||||
|
||||
import com.cdzy.ebikeoperate.model.dto.response.EbikeOrgZoneDto;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.cdzy.ebikeoperate.model.pojo.EbikeOrgZone;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 行政区划授权信息 服务层。
|
||||
*
|
||||
@ -10,5 +13,12 @@ import com.cdzy.ebikeoperate.model.pojo.EbikeOrgZone;
|
||||
* @since 2025-04-17
|
||||
*/
|
||||
public interface EbikeOrgZoneService extends IService<EbikeOrgZone> {
|
||||
|
||||
/**
|
||||
* 查询所有行政区划授权信息。
|
||||
*
|
||||
* @param orgId 组织id
|
||||
* @param zoneId 区域id
|
||||
* @return 所有数据
|
||||
*/
|
||||
List<EbikeOrgZoneDto> list(String orgId, String zoneId);
|
||||
}
|
||||
|
||||
@ -2,13 +2,20 @@ package com.cdzy.ebikeoperate.service.impl;
|
||||
|
||||
import com.cdzy.ebikeoperate.mapper.EbikeOperateAttachmentFileMapper;
|
||||
import com.cdzy.ebikeoperate.mapper.EbikeOrgZoneMapper;
|
||||
import com.cdzy.ebikeoperate.model.dto.response.EbikeOrgZoneDto;
|
||||
import com.cdzy.ebikeoperate.model.pojo.EbikeOperateAttachmentFile;
|
||||
import com.cdzy.ebikeoperate.model.pojo.EbikeOrgZone;
|
||||
import com.cdzy.ebikeoperate.service.EbikeOperateAttachmentFileService;
|
||||
import com.cdzy.ebikeoperate.service.EbikeOrgZoneService;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.cdzy.ebikeoperate.model.pojo.table.EbikeAdministrationZoneTableDef.EBIKE_ADMINISTRATION_ZONE;
|
||||
import static com.cdzy.ebikeoperate.model.pojo.table.EbikeOrgZoneTableDef.EBIKE_ORG_ZONE;
|
||||
|
||||
/**
|
||||
* 行政区划授权信息 服务层实现。
|
||||
*
|
||||
@ -19,4 +26,18 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class EbikeOrgZoneServiceImpl extends ServiceImpl<EbikeOrgZoneMapper, EbikeOrgZone> implements EbikeOrgZoneService {
|
||||
|
||||
@Override
|
||||
public List<EbikeOrgZoneDto> list(String orgId, String zoneId) {
|
||||
QueryWrapper query = QueryWrapper.create()
|
||||
.select(EBIKE_ORG_ZONE.ALL_COLUMNS)
|
||||
.select(EBIKE_ADMINISTRATION_ZONE.FULLNAME.as("zoneName"))
|
||||
.leftJoin(EBIKE_ADMINISTRATION_ZONE).on(EBIKE_ADMINISTRATION_ZONE.ID.eq(EBIKE_ORG_ZONE.ZONE_ID));
|
||||
if (orgId != null&& !orgId.isEmpty()) {
|
||||
query.and(EBIKE_ORG_ZONE.ORG_ID.eq(orgId));
|
||||
}
|
||||
if (zoneId!= null&&!zoneId.isEmpty()) {
|
||||
query.and(EBIKE_ORG_ZONE.ZONE_ID.eq(zoneId));
|
||||
}
|
||||
return this.listAs(query, EbikeOrgZoneDto.class);
|
||||
}
|
||||
}
|
||||
@ -138,7 +138,7 @@ public class EbikeUserOrdersController {
|
||||
* @ 用户订单表详情
|
||||
*/
|
||||
@GetMapping("getInfo/{id}")
|
||||
public JsonResult<?> getInfo(@PathVariable String id) {
|
||||
public JsonResult<?> getInfo(@PathVariable("id") String id) {
|
||||
UserOrders userOrders = userOrdersService.getById(id);
|
||||
return JsonResult.success(userOrders);
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ public class OrganizationsController {
|
||||
@PostMapping("save")
|
||||
public JsonResult<?> save(@RequestBody Organizations organizations) {
|
||||
organizationsService.save(organizations);
|
||||
return JsonResult.success();
|
||||
return JsonResult.success("",organizations.getOrgId());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -41,7 +41,7 @@ public class OrganizationsController {
|
||||
* @return {@code 200} 删除成功,{@code 500} 删除失败
|
||||
*/
|
||||
@DeleteMapping("remove/{id}")
|
||||
public JsonResult<?> remove(@PathVariable Long id) {
|
||||
public JsonResult<?> remove(@PathVariable("id") Long id) {
|
||||
organizationsService.removeById(id);
|
||||
return JsonResult.success();
|
||||
}
|
||||
@ -75,7 +75,7 @@ public class OrganizationsController {
|
||||
* @return 详情
|
||||
*/
|
||||
@GetMapping("getInfo/{id}")
|
||||
public JsonResult<?> getInfo(@PathVariable Long id) {
|
||||
public JsonResult<?> getInfo(@PathVariable("id") Long id) {
|
||||
return JsonResult.success(organizationsService.getById(id));
|
||||
}
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ public class PermissionsController {
|
||||
* @return {@code true} 删除成功,{@code false} 删除失败
|
||||
*/
|
||||
@DeleteMapping("remove/{id}")
|
||||
public JsonResult<?> remove(@PathVariable Long id) {
|
||||
public JsonResult<?> remove(@PathVariable("id") Long id) {
|
||||
permissionsService.removeById(id);
|
||||
return JsonResult.success();
|
||||
}
|
||||
@ -82,7 +82,7 @@ public class PermissionsController {
|
||||
* @return 详情
|
||||
*/
|
||||
@GetMapping("getInfo/{id}")
|
||||
public JsonResult<?> getInfo(@PathVariable Long id) {
|
||||
public JsonResult<?> getInfo(@PathVariable("id") Long id) {
|
||||
Permissions info = permissionsService.getById(id);
|
||||
return JsonResult.success(info);
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ public class RolePermissionsController {
|
||||
* @return {@code true} 删除成功,{@code false} 删除失败
|
||||
*/
|
||||
@DeleteMapping("remove/{id}")
|
||||
public JsonResult<?> remove(@PathVariable Long id) {
|
||||
public JsonResult<?> remove(@PathVariable("id") Long id) {
|
||||
rolePermissionsService.removeById(id);
|
||||
return JsonResult.success();
|
||||
}
|
||||
@ -77,7 +77,7 @@ public class RolePermissionsController {
|
||||
* @return 详情
|
||||
*/
|
||||
@GetMapping("getInfo/{id}")
|
||||
public JsonResult<?> getInfo(@PathVariable Long id) {
|
||||
public JsonResult<?> getInfo(@PathVariable("id") Long id) {
|
||||
RolePermissions info = rolePermissionsService.getById(id);
|
||||
return JsonResult.success(info);
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ public class RolesController {
|
||||
* @return {@code true} 删除成功,{@code false} 删除失败
|
||||
*/
|
||||
@DeleteMapping("remove/{id}")
|
||||
public JsonResult<?> remove(@PathVariable Long id) {
|
||||
public JsonResult<?> remove(@PathVariable("id") Long id) {
|
||||
rolesService.removeById(id);
|
||||
return JsonResult.success();
|
||||
}
|
||||
@ -82,7 +82,7 @@ public class RolesController {
|
||||
* @return 详情
|
||||
*/
|
||||
@GetMapping("getInfo/{id}")
|
||||
public JsonResult<?> getInfo(@PathVariable Long id) {
|
||||
public JsonResult<?> getInfo(@PathVariable("id") Long id) {
|
||||
Roles roles = rolesService.getById(id);
|
||||
return JsonResult.success(roles);
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ public class StaffController {
|
||||
* @return {@code true} 删除成功,{@code false} 删除失败
|
||||
*/
|
||||
@DeleteMapping("remove/{id}")
|
||||
public JsonResult<?> remove(@PathVariable Long id) {
|
||||
public JsonResult<?> remove(@PathVariable("id") Long id) {
|
||||
staffService.removeById(id);
|
||||
return JsonResult.success();
|
||||
}
|
||||
@ -91,7 +91,7 @@ public class StaffController {
|
||||
* @return 详情
|
||||
*/
|
||||
@GetMapping("getInfo/{id}")
|
||||
public JsonResult<?> getInfo(@PathVariable Long id) {
|
||||
public JsonResult<?> getInfo(@PathVariable("id") Long id) {
|
||||
Staff staff = staffService.getById(id);
|
||||
return JsonResult.success(staff);
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ public class StaffRolesController {
|
||||
* @return {@code true} 删除成功,{@code false} 删除失败
|
||||
*/
|
||||
@DeleteMapping("remove/{id}")
|
||||
public JsonResult<?> remove(@PathVariable Long id) {
|
||||
public JsonResult<?> remove(@PathVariable("id") Long id) {
|
||||
staffRolesService.removeById(id);
|
||||
return JsonResult.success();
|
||||
}
|
||||
@ -88,7 +88,7 @@ public class StaffRolesController {
|
||||
* @return 详情
|
||||
*/
|
||||
@GetMapping("getInfo/{id}")
|
||||
public JsonResult<?> getInfo(@PathVariable Long id) {
|
||||
public JsonResult<?> getInfo(@PathVariable("id") Long id) {
|
||||
StaffRoles info = staffRolesService.getById(id);
|
||||
return JsonResult.success(info);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user