feat(price-publish): 新增发布信息接口
This commit is contained in:
@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.websocket.server.PathParam;
|
import javax.websocket.server.PathParam;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -89,4 +90,19 @@ public class PricePublishController {
|
|||||||
|
|
||||||
return FuHttpResponse.Builder().dataResponse().build();
|
return FuHttpResponse.Builder().dataResponse().build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("发布信息")
|
||||||
|
@GetMapping("/info")
|
||||||
|
public HttpResponse info (
|
||||||
|
@ApiParam("年份") @RequestParam("year") Integer year,
|
||||||
|
@ApiParam("月份") @RequestParam(value = "month") Integer month
|
||||||
|
) throws Exception {
|
||||||
|
var data = new PricePublish();
|
||||||
|
data.setCreateTime(LocalDateTime.of(year, month, 1, 0, 0));
|
||||||
|
|
||||||
|
var result = new PublicController.PublicUpdateInfo(data);
|
||||||
|
|
||||||
|
return FuHttpResponse.Builder().dataResponse(result).build();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -108,6 +108,12 @@ public class PublicController {
|
|||||||
@ApiModelProperty("期数")
|
@ApiModelProperty("期数")
|
||||||
private Integer period;
|
private Integer period;
|
||||||
|
|
||||||
|
@ApiModelProperty("年份")
|
||||||
|
private Integer year;
|
||||||
|
|
||||||
|
@ApiModelProperty("月份")
|
||||||
|
private Integer month;
|
||||||
|
|
||||||
public PublicUpdateInfo () {}
|
public PublicUpdateInfo () {}
|
||||||
|
|
||||||
public PublicUpdateInfo (PricePublish lastData) {
|
public PublicUpdateInfo (PricePublish lastData) {
|
||||||
@@ -124,6 +130,8 @@ public class PublicController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.period = initialPeriod + months;
|
this.period = initialPeriod + months;
|
||||||
|
this.year = date.getYear();
|
||||||
|
this.month = date.getMonth().getValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user