|
@@ -45,6 +45,7 @@ import tk.mybatis.mapper.entity.Condition;
|
|
|
import javax.validation.Valid;
|
|
|
import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
+import java.time.LocalDateTime;
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
@@ -276,8 +277,6 @@ public class HouseController extends BaseController {
|
|
|
mqMap.put("id", house.getId());
|
|
|
mqMap.put("basePath", OUTPATH);
|
|
|
|
|
|
-
|
|
|
-
|
|
|
mqMap.put("dataDescribe", "");
|
|
|
log.info("houseId: {}", house.getId());
|
|
|
//发消息到mq
|
|
@@ -289,6 +288,61 @@ public class HouseController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @ApiOperation("预审")
|
|
|
+ @ResponseBody
|
|
|
+ @GetMapping(value = "/auditHouse")
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "houseId", value = "房源Id", dataType = "Long"),
|
|
|
+ @ApiImplicitParam(name = "result", value = "审核结果: 1 通过 0 不通过", dataType = "Integer"),
|
|
|
+ @ApiImplicitParam(name = "desc", value = "审核描述(不通过时使用)", dataType = "String")})
|
|
|
+ public Result auditHouse(@RequestParam(name = "houseId") Long houseId,
|
|
|
+ @RequestParam(name = "result") Integer result,
|
|
|
+ @RequestParam(name = "desc") String desc) {
|
|
|
+ if(StringUtils.isBlank(desc) || null == result || null == houseId){
|
|
|
+ throw new CommonBaseException(ResultCodeEnum.D3001);
|
|
|
+ }
|
|
|
+ HouseEntity houseEntity = houseService2.findById(houseId);
|
|
|
+ if(null == houseEntity){
|
|
|
+ throw new CommonBaseException(ResultCodeEnum.D101 , "房源不存在");
|
|
|
+ }
|
|
|
+ if(result.compareTo(1) != 0 && result.compareTo(0) != 0){
|
|
|
+ throw new CommonBaseException(ResultCodeEnum.D101 , "审批结果格式不正确");
|
|
|
+ }
|
|
|
+ houseEntity.setAuditResult(result);
|
|
|
+ houseEntity.setAuditDesc(desc);
|
|
|
+ houseEntity.setUpdateTime(new Date());
|
|
|
+ int update = houseService2.update(houseEntity);
|
|
|
+ if(update != 1){
|
|
|
+ throw new CommonBaseException(ResultCodeEnum.D101 , "更新房源预审信息失败");
|
|
|
+ }
|
|
|
+ return Result.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("标记不能编辑")
|
|
|
+ @ResponseBody
|
|
|
+ @GetMapping(value = "/markFail")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "houseId", value = "房源Id", dataType = "Long"),
|
|
|
+ @ApiImplicitParam(name = "desc", value = "标记原因", dataType = "String")})
|
|
|
+ public Result markCannotEditHouse(@RequestParam(name = "houseId") Long houseId,
|
|
|
+ @RequestParam(name = "desc") String desc) {
|
|
|
+ if(StringUtils.isBlank(desc) || null == houseId){
|
|
|
+ throw new CommonBaseException(ResultCodeEnum.D3001);
|
|
|
+ }
|
|
|
+ HouseEntity houseEntity = houseService2.findById(houseId);
|
|
|
+ if(null == houseEntity){
|
|
|
+ throw new CommonBaseException(ResultCodeEnum.D101 , "房源不存在");
|
|
|
+ }
|
|
|
+ houseEntity.setCanNotEdit(0);
|
|
|
+ houseEntity.setCanNotEditDesc(desc);
|
|
|
+ houseEntity.setUpdateTime(new Date());
|
|
|
+ int update = houseService2.update(houseEntity);
|
|
|
+ if(update != 1){
|
|
|
+ throw new CommonBaseException(ResultCodeEnum.D101 , "更新房源无法制作信息失败");
|
|
|
+ }
|
|
|
+ return Result.success();
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
*
|