|
@@ -1,66 +1,15 @@
|
|
|
package com.happy.action;
|
|
package com.happy.action;
|
|
|
|
|
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
-import com.happy.Model.HousePrice;
|
|
|
|
|
-import com.happy.Until.GetHttpParam;
|
|
|
|
|
-import com.happy.Until.ResUtil;
|
|
|
|
|
import com.happy.common.controller.BaseController;
|
|
import com.happy.common.controller.BaseController;
|
|
|
-import com.happy.dto.HousePriceDto;
|
|
|
|
|
-import com.happy.service.HousePriceService;
|
|
|
|
|
|
|
+import com.happy.dto.HouseNumberStatusDto;
|
|
|
import com.opensymphony.xwork2.ModelDriven;
|
|
import com.opensymphony.xwork2.ModelDriven;
|
|
|
-import lombok.SneakyThrows;
|
|
|
|
|
-import org.apache.struts2.ServletActionContext;
|
|
|
|
|
|
|
|
|
|
-import javax.annotation.Resource;
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
-
|
|
|
|
|
-public class HouseNumberStatusAction extends BaseController implements ModelDriven<HousePriceDto> {
|
|
|
|
|
- private final HousePriceDto housePriceDto = new HousePriceDto();
|
|
|
|
|
|
|
+public class HouseNumberStatusAction extends BaseController implements ModelDriven<HouseNumberStatusDto> {
|
|
|
|
|
+ private final HouseNumberStatusDto houseNumberStatusDto = new HouseNumberStatusDto();
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public HousePriceDto getModel() {
|
|
|
|
|
- return housePriceDto;
|
|
|
|
|
|
|
+ public HouseNumberStatusDto getModel() {
|
|
|
|
|
+ return houseNumberStatusDto;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @Resource(name = "housePriceService")
|
|
|
|
|
- private HousePriceService housePriceService;
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 批量改价
|
|
|
|
|
- * 约定body数据格式:{"dateList":["2023-08-11,2023-08-20"],"priceList":[{"managerId":"1586005529","houseId":"1379573861","price":"180"}]}
|
|
|
|
|
- */
|
|
|
|
|
- @SneakyThrows
|
|
|
|
|
- public void modifyPriceBatch() {
|
|
|
|
|
- String PostDataStr = GetHttpParam.getRequestPostData(request);
|
|
|
|
|
- JSONObject PostDataJSONObject = JSONObject.parseObject(PostDataStr);
|
|
|
|
|
- List<String> dateList = PostDataJSONObject.getJSONArray("dateList").toJavaList(String.class);
|
|
|
|
|
- List<HousePrice> priceList = PostDataJSONObject.getJSONArray("priceList").toJavaList(HousePrice.class);
|
|
|
|
|
- housePriceService.modifyPriceBatch(dateList, priceList);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public void modifyPrice() {
|
|
|
|
|
- housePriceService.modifyPrice(housePriceDto);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 表格数据 房态管理-房价管理
|
|
|
|
|
- */
|
|
|
|
|
- public void queryPage() {
|
|
|
|
|
- ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
|
|
|
|
|
- put("message", "查询成功");
|
|
|
|
|
- put("code", 200);
|
|
|
|
|
- put("data", housePriceService.queryPage(housePriceDto, page, rows));
|
|
|
|
|
- }}.toString());
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 表格数据 房态管理-房价管理-改价记录
|
|
|
|
|
- */
|
|
|
|
|
- public void queryPageHistory() {
|
|
|
|
|
- ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
|
|
|
|
|
- put("message", "查询成功");
|
|
|
|
|
- put("code", 200);
|
|
|
|
|
- put("data", housePriceService.queryPageHistory(housePriceDto, page, rows));
|
|
|
|
|
- }}.toString());
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|