by su пре 4 година
родитељ
комит
77eff51483

+ 0 - 2
house-biz/src/main/java/com/ljq/house/biz/model/TmHouse.java

@@ -234,12 +234,10 @@ public class TmHouse extends BaseEntity implements Serializable {
     @JsonProperty("introduce_video_desc")
     private String introduceVideoDesc;
 
-    @TableField("ADDITIONS_IMAGES")
     @ApiModelProperty(value = "附加信息图地址")
     @JsonProperty("additions_images")
     private String additionsImages;
 
-    @TableField("ADDITIONS_IMAGES")
     @ApiModelProperty(value = "附加信息图地址 封面")
     @JsonProperty("cover_additions_images ")
     private String coverAdditionsImages;

+ 22 - 0
house-common/src/main/java/com/ljq/house/common/service/HouseHelperService.java

@@ -239,6 +239,21 @@ public class HouseHelperService {
             result.put("houseTypeImages" , tmHouse.getHouseTypeImages());
             result.put("enable" , tmHouse.getEnable());
             result.put("wxAqrCode" , tmHouse.getWxAqrCode());
+
+            //2021.6.17 增加
+            result.put("buildingArea" , tmHouse.getBuildingArea());
+            result.put("floorSpace" , tmHouse.getFloorSpace());
+            result.put("constructionYear" , tmHouse.getConstructionYear());
+            result.put("propertyNumber" , tmHouse.getPropertyNumber());
+            result.put("bedroomAmount" , tmHouse.getBedroomAmount());
+            result.put("showerroomAmount" , tmHouse.getShowerroomAmount());
+            result.put("ancillaryFacility" , tmHouse.getAncillaryFacility());
+            result.put("houseLabel" , tmHouse.getHouseLabel());
+            result.put("sellType" , tmHouse.getSellType());
+            result.put("introduceVideoDesc" , tmHouse.getIntroduceVideoDesc());
+            result.put("additionsImages" , tmHouse.getAdditionsImages());
+            result.put("coverAdditionsImages" , tmHouse.getCoverAdditionsImages());
+            result.put("unitPrice",tmHouse.getUnitPrice());
         }
 
         if(null != tmEstate){
@@ -270,6 +285,13 @@ public class HouseHelperService {
             result.put("agencyPassImage" , tmAgency.getWorkPassImage());
             result.put("agencyTagImage" , tmAgency.getTagImage());
 
+            //2021.6.17 增加
+            result.put("ename" , tmAgency.getEname());
+            result.put("agencyCompanyId" , tmAgency.getAgencyCompanyId());
+            result.put("language" , tmAgency.getLanguage());
+            result.put("businessId" , tmAgency.getBusinessId());
+            result.put("email" , tmAgency.getEmail());
+
         }
 
         if(null != tmUser){

+ 12 - 0
house-common/src/main/java/com/ljq/house/common/utils/WxOpUtils.java

@@ -298,7 +298,19 @@ public class WxOpUtils {
                     throw new CommonBaseException(ResultCodeEnum.D044);
                 }
 
+
                 File localFile = new File(targetTmpPath);
+                if(!localFile.exists() && !localFile.isDirectory())
+                {
+                    try {
+                     boolean ischeck =    localFile.getParentFile().mkdirs();
+                     log.info("创建文件夹:" + ischeck +  "路径:" + localFile.getParentFile());
+                    } catch (Exception e) {
+                        // TODO Auto-generated catch block
+                        throw new CommonBaseException(ResultCodeEnum.D044);
+                    }
+                }
+
                 FileOutputStream fileOutputStream = new FileOutputStream(localFile);
                 IOUtils.copy(is , fileOutputStream);
 

+ 9 - 2
house-web/src/main/java/com/ljq/house/app/controller/AppAgencyController.java

@@ -229,8 +229,15 @@ public class AppAgencyController {
     public Result addAgencyCustomer(@RequestBody @ApiParam(name="经纪人下的客源对象",value="传入json格式",required=true)TmAgencyUserRelation agencyUserRelation) {
         if (null != agencyUserRelation) {
             agencyUserRelation.setIsValid(1);
-            int result = agencyUserRelationDao.insert(agencyUserRelation);
-            return result == 1 ? Result.success("新增客源成功") : Result.failure("新增客源失败");
+
+            TmAgencyUserRelation tmAgencyUserRelation = agencyUserRelationDao.getAgencyUserDetail(agencyUserRelation.getAgencyUserId(),agencyUserRelation.getUserId());
+            if(null == tmAgencyUserRelation){
+                int result = agencyUserRelationDao.insert(agencyUserRelation);
+                return result == 1 ? Result.success("新增客源成功") : Result.failure("新增客源失败");
+            }else {
+                return Result.failure("新增客源失败");
+            }
+
         }
         return Result.failure("新增客源失败");
     }