feat: 新增取消发布价格接口
This commit is contained in:
@@ -16,8 +16,6 @@ import mjkf.xinke.main.service.PricePublishService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.websocket.server.PathParam;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -103,6 +101,27 @@ public class PricePublishController {
|
||||
return FuHttpResponse.Builder().dataResponse().build();
|
||||
}
|
||||
|
||||
@ApiOperation("取消发布价格")
|
||||
@CommonLog("取消发布价格")
|
||||
@PostMapping("/retract")
|
||||
public HttpResponse retract(
|
||||
@ApiParam("年份") @RequestParam("year") Integer year,
|
||||
@ApiParam("月份") @RequestParam(value = "month") Integer month
|
||||
) throws Exception {
|
||||
if (year == null || month == null) {
|
||||
throw new NcHttpException(HttpErrorResponseEnum.PRICE_PUBLISH_YEAR_MONTH_NEEDED);
|
||||
}
|
||||
var query = pricePublishService.getQuery(year, month, null, null, null, null);
|
||||
List<PricePublish> result = pricePublishService.list(query);
|
||||
|
||||
for (PricePublish item: result) {
|
||||
item.setStatus(PricePublishStatus.WAITING);
|
||||
pricePublishService.updateById(item);
|
||||
}
|
||||
|
||||
return FuHttpResponse.Builder().dataResponse().build();
|
||||
}
|
||||
|
||||
@ApiOperation("发布信息")
|
||||
@GetMapping("/info")
|
||||
public HttpResponse info (
|
||||
|
Reference in New Issue
Block a user