|
@@ -79,7 +79,6 @@ public class CmsGroupController {
|
|
|
|
|
|
|
|
SearchResult<GroupsTrips> search = beanSearcher.search(GroupsTrips.class, mapBuilder
|
|
SearchResult<GroupsTrips> search = beanSearcher.search(GroupsTrips.class, mapBuilder
|
|
|
.field(GroupsTrips::getAccount, StringUtils.isBlank(account) ? null : account).op(Operator.EndWith)
|
|
.field(GroupsTrips::getAccount, StringUtils.isBlank(account) ? null : account).op(Operator.EndWith)
|
|
|
- .field(GroupsTrips::getStatus, GroupsTrips.Status.down.name()).op(Operator.NotEqual)
|
|
|
|
|
.build()
|
|
.build()
|
|
|
);
|
|
);
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
@@ -225,6 +224,27 @@ public class CmsGroupController {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult("下架成功");
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult("下架成功");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 上下架车队
|
|
|
|
|
+ */
|
|
|
|
|
+ @PutMapping("/put/trips/status/{groupsId}")
|
|
|
|
|
+ @Log(module = "过期账号/上下架过期车队", businessType = BusinessType.PUT, isSaveRequestData = true)
|
|
|
|
|
+ public Result<String> updateTripsStatus(@PathVariable Long groupsId) {
|
|
|
|
|
+ GroupsTrips groupsTrips = groupService.getById(groupsId);
|
|
|
|
|
+ GroupsTrips.Status status = groupsTrips.getStatus();
|
|
|
|
|
+ if (status == GroupsTrips.Status.waiting) {
|
|
|
|
|
+ throw BusinessRuntimeException.getInstance("待发车车队无需上下架");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (status == GroupsTrips.Status.validity) {
|
|
|
|
|
+ groupsTrips.setStatus(GroupsTrips.Status.down);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (status == GroupsTrips.Status.down) {
|
|
|
|
|
+ groupsTrips.setStatus(GroupsTrips.Status.validity);
|
|
|
|
|
+ }
|
|
|
|
|
+ groupService.updateById(groupsTrips);
|
|
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult("操作成功");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 弃用账号
|
|
* 弃用账号
|
|
|
*/
|
|
*/
|