Selaa lähdekoodia

Merge branch 'master' of http://116.63.33.55/git/zfjyjgfwpt

sunjuan 2 vuotta sitten
vanhempi
commit
e679d7ce64

+ 6 - 6
src/main/java/com/jd/zfjyjgfwpt/controller/PurchaseInformationController.java

@@ -49,9 +49,9 @@ public class PurchaseInformationController {
      */
     @PostMapping("insertPurchaseIntention")
     public Map<String, Object> insertPurchaseIntention(@Valid PurchaseInformation purchaseInformation) {
-        if (!Blank.isPhone(purchaseInformation.getPhone())) {
-            return SendUtil.send(false, "请输入正确的手机号", null);
-        }
+//        if (!Blank.isPhone(purchaseInformation.getPhone())) {
+//            return SendUtil.send(false, "请输入正确的手机号", null);
+//        }
         if (purchaseInformation.getMoneyMax() < purchaseInformation.getMoneyMin()) {
             return SendUtil.send(false, "最高预算不能小于最低预算", null);
         }
@@ -82,9 +82,9 @@ public class PurchaseInformationController {
         if (Blank.isEmpty(purchaseInformation.getId())) {
             return SendUtil.send(false, ConstString.REQUEST_WRONGPARAMS);
         }
-        if (!Blank.isPhone(purchaseInformation.getPhone())) {
-            return SendUtil.send(false, "请输入正确的手机号", null);
-        }
+//        if (!Blank.isPhone(purchaseInformation.getPhone())) {
+//            return SendUtil.send(false, "请输入正确的手机号", null);
+//        }
         if (purchaseInformation.getMoneyMax() < purchaseInformation.getMoneyMin()) {
             return SendUtil.send(false, "最高预算不能小于最低预算", null);
         }

+ 30 - 1
src/main/java/com/jd/zfjyjgfwpt/entity/PurchaseInformation.java

@@ -64,7 +64,6 @@ public class PurchaseInformation implements Serializable {
     /**
      * 联系人电话
      */
-    @NotBlank(message = "联系电话不能为空")
     private String phone;
 
     /**
@@ -94,6 +93,18 @@ public class PurchaseInformation implements Serializable {
      */
     private Date createTime;
 
+    /**
+     * 是否显示联系方式 0:不显示,1:显示
+     */
+    @NotNull
+    private Integer isShowContact;
+
+    /**
+     * 联系方式类型 (默认为0) 0: 站内信,1:qq, 2: 微信,3:手机号
+     */
+    @NotNull
+    private Integer contactType;
+
     public Integer getId() {
         return id;
     }
@@ -214,6 +225,22 @@ public class PurchaseInformation implements Serializable {
         this.createTime = createTime;
     }
 
+    public Integer getIsShowContact() {
+        return isShowContact;
+    }
+
+    public void setIsShowContact(Integer isShowContact) {
+        this.isShowContact = isShowContact;
+    }
+
+    public Integer getContactType() {
+        return contactType;
+    }
+
+    public void setContactType(Integer contactType) {
+        this.contactType = contactType;
+    }
+
     @Override
     public String toString() {
         return "PurchaseInformation{" +
@@ -232,6 +259,8 @@ public class PurchaseInformation implements Serializable {
                 ", releaseStatus=" + releaseStatus +
                 ", userId='" + userId + '\'' +
                 ", createTime=" + createTime +
+                ", isShowContact=" + isShowContact +
+                ", contactType=" + contactType +
                 '}';
     }
 }

+ 10 - 5
src/main/java/com/jd/zfjyjgfwpt/service/impl/FrontServiceImpl.java

@@ -384,11 +384,15 @@ public class FrontServiceImpl implements FrontServiceI {
                         dataMap.put("companyAppraisalNum", allCompanyAppraisalNum);
 
                         Float companyRecordNums = Convert.toFloat(companyRecordNum);
-                        Integer totalScore = frontMapper.getAllMechanismScore(Convert.toStr(dataMap.get("UNISCID")));
-                        Float totalScores = Convert.toFloat(totalScore);
-                        float compositeScore = totalScores/companyRecordNums;
-                        //星级级数
-                        dataMap.put("compositeScore", compositeScore);
+                        if (Blank.isNotEmpty(companyRecordNums) && companyRecordNum > 0 ) {
+                            Integer totalScore = frontMapper.getAllMechanismScore(Convert.toStr(dataMap.get("UNISCID")));
+                            Float totalScores = Convert.toFloat(totalScore);
+                            float compositeScore = totalScores/companyRecordNums;
+                            //星级级数
+                            dataMap.put("compositeScore", compositeScore);
+                        }else {
+                            dataMap.put("compositeScore", 0);
+                        }
 
                         Integer praiseScore = frontMapper.getAllPraiseScore(Convert.toStr(dataMap.get("UNISCID")));
                         if (Blank.isNotEmpty(praiseScore) && praiseScore > 0) {
@@ -754,6 +758,7 @@ public class FrontServiceImpl implements FrontServiceI {
     public Map<String, Object> login(JSONObject obj) {
         obj.put("DLSHI", "");
         obj.put("DLQX", "");
+        obj.put("logintype", "重庆门户");
 
         // 登录
         HttpResponse response = HttpUtil.createPost(RemoteUrlConstants.getLogin())

+ 31 - 3
src/main/java/com/jd/zfjyjgfwpt/service/impl/PurchaseInformationServiceImpl.java

@@ -168,6 +168,11 @@ public class PurchaseInformationServiceImpl implements PurchaseInformationServic
         Integer allPurchaseIntentionListNum = purchaseInformationMapper.countAllPurchaseIntentionList(selectMap);
         if (allPurchaseIntentionListNum > 0) {
             List<Map<String, Object>> allPurchaseIntentionList = purchaseInformationMapper.getAllPurchaseIntentionList(selectMap);
+            for (Map<String, Object> purchaseMap : allPurchaseIntentionList) {
+                if (ObjectUtil.equal(purchaseMap.get("isShowContact"), 0)) {
+                    purchaseMap.put("phone", "");
+                }
+            }
             return SendUtil.layuiTable(allPurchaseIntentionListNum, allPurchaseIntentionList);
         }
         return SendUtil.layuiTable(allPurchaseIntentionListNum, null);
@@ -212,9 +217,16 @@ public class PurchaseInformationServiceImpl implements PurchaseInformationServic
                     isReleaseMark = true;
                     break;
                 }
-                if (!ObjectUtil.equal(mapInfo.get("phone"), purchaseInformation.getPhone())) {
-                    isReleaseMark = true;
-                    break;
+                if (mapInfo.containsKey("phone")) {
+                    if (!ObjectUtil.equal(mapInfo.get("phone"), purchaseInformation.getPhone())) {
+                        isReleaseMark = true;
+                        break;
+                    }
+                }else {
+                    if (Blank.isNotEmpty(purchaseInformation.getPhone())) {
+                        isReleaseMark = true;
+                        break;
+                    }
                 }
                 if (!ObjectUtil.equal(mapInfo.get("fitUpType"), purchaseInformation.getFitUpType())) {
                     isReleaseMark = true;
@@ -227,6 +239,14 @@ public class PurchaseInformationServiceImpl implements PurchaseInformationServic
         if (isReleaseMark) {
             //设置发布状态 0:未发布 1:已发布
             purchaseInformation.setReleaseStatus(1);
+            //设置默认联系类型(默认为站内信)
+            if (purchaseInformation.getContactType() > 3 || purchaseInformation.getContactType() < 0) {
+                purchaseInformation.setContactType(0);
+            }
+            //默认不显示
+            if (purchaseInformation.getIsShowContact() > 1 || purchaseInformation.getIsShowContact() < 0) {
+                purchaseInformation.setIsShowContact(0);
+            }
             Boolean insertPurchaseInfoRes = purchaseInformationMapper.insertPurchaseInfo(purchaseInformation);
             if (!insertPurchaseInfoRes) {
                 return SendUtil.send(false, ConstString.RESULT_FAILED);
@@ -251,6 +271,14 @@ public class PurchaseInformationServiceImpl implements PurchaseInformationServic
 
     @Override
     public Map<String, Object> updatePurchaseIntention(PurchaseInformation purchaseInformation) {
+        //设置默认联系类型(默认为站内信)
+        if (purchaseInformation.getContactType() > 3 || purchaseInformation.getContactType() < 0) {
+            purchaseInformation.setContactType(0);
+        }
+        //默认不显示
+        if (purchaseInformation.getIsShowContact() > 1 || purchaseInformation.getIsShowContact() < 0) {
+            purchaseInformation.setIsShowContact(0);
+        }
         Boolean updateRes = purchaseInformationMapper.updatePurchaseIntention(purchaseInformation);
         if (updateRes) {
             return SendUtil.send(true, ConstString.RESULT_SUCCESS);

+ 14 - 5
src/main/resources/mapper/PurchaseInformationMapper.xml

@@ -16,7 +16,8 @@
             money_max,
             phone,
             fit_up_type,
-            release_time
+            release_time,
+			is_show_contact
         FROM
             house_want_buy
         <where>
@@ -133,7 +134,9 @@
 			fit_up_type,
 			release_status,
 			user_id,
-			create_time
+			create_time,
+			is_show_contact,
+			contact_type
 		) VALUES (
 			#{areaCode},
 			#{community},
@@ -148,7 +151,9 @@
 			#{fitUpType},
 			#{releaseStatus},
 			#{userId},
-			NOW()
+			NOW(),
+			#{isShowContact},
+			#{contactType}
 		)
 	</insert>
 
@@ -192,7 +197,9 @@
 			money_min = #{moneyMin},
 			phone = #{phone},
 			fit_up_type = #{fitUpType},
-			update_time = NOW()
+			update_time = NOW(),
+			is_show_contact = #{isShowContact},
+			contact_type = #{contactType}
 		WHERE
 			id = #{id} AND user_id = #{userId}
 	</update>
@@ -209,7 +216,9 @@
             money_min,
             money_max,
             phone,
-            fit_up_type
+            fit_up_type,
+            is_show_contact,
+            contact_type
         FROM
             house_want_buy
         WHERE

+ 1 - 1
src/main/resources/static/main/badInformation.html

@@ -209,7 +209,7 @@
                             <div class="tangchu"></div>
                         </div>
                         <input type="text" placeholder="请输入经纪机构名称">
-                        <div class="map">
+                        <div class="map" onclick="location.href='map.html'">
                             <img src="image/map.png" alt="">
                             <p>地图</p>
                         </div>

+ 26 - 4
src/main/resources/static/main/complaint.html

@@ -108,6 +108,17 @@
 			</el-form>
 			<button class="but-form_qg" @click="submitComplaint">提&nbsp交</button>
 		</div>
+
+		<el-dialog
+				title="提示"
+				:visible.sync="centerDialogVisible"
+				width="30%">
+			<span>与当前经纪人并无交易记录,是否查询所有交易记录?</span>
+			<span slot="footer" class="dialog-footer">
+					<el-button @click="centerDialogVisible = false">取 消</el-button>
+					<el-button type="primary" @click="getAllRecord">确 定</el-button>
+				</span>
+		</el-dialog>
 	</main>
 	<!-- 底部 -->
 	<div class="foot">
@@ -176,6 +187,7 @@
 						'companyName': '',
 						'address': ''
 					},
+					centerDialogVisible: false
 				}
 			},
 			created: function () {
@@ -184,6 +196,9 @@
 				// if (complaintInfo.type == 1) {
 				// 	this.getAjax();
 				// }
+
+				this.tradeRecordParam.userId = sessionStorage.getItem('phone');
+				this.tradeRecordParam.cyrybh = JSON.parse(sessionStorage.getItem('complaintInfo')).id;
 				this.getAjax();
 				this.submitParam.type = complaintInfo.type;
 				this.submitParam.respondentId = complaintInfo.id;
@@ -192,6 +207,11 @@
 
 			},
 			methods: {
+				getAllRecord() {
+					this.tradeRecordParam.cyrybh = '';
+					this.getAjax('reSearch');
+					this.centerDialogVisible = false;
+				},
 				personifo() {
 					if (this.submitParam.type == 0) {
 						location.href = "basicinfo.html?id=" + this.submitParam.respondentId
@@ -211,10 +231,7 @@
 					this.submitParam.type = 2;
 					console.log(this.submitParam)
 				},
-				getAjax() {
-					this.tradeRecordParam.userId = sessionStorage.getItem('phone');
-					this.tradeRecordParam.cyrybh = JSON.parse(sessionStorage.getItem('complaintInfo')).id;
-					// this.tradeRecordParam.cyrybh = '1240151';
+				getAjax(tag) {
 					var _this = this;
 					var param = this.tradeRecordParam;
 					$.ajax({
@@ -226,6 +243,11 @@
 							if (json.count > 0) {
 								_this.options = json.data;
 							} else {
+								if (tag == 'reSearch') {
+									_this.centerDialogVisible = false;
+								} else {
+									_this.centerDialogVisible = true;
+								}
 								_this.options = [];
 							}
 						},

+ 1 - 1
src/main/resources/static/main/goodinformation.html

@@ -212,7 +212,7 @@
                             <div class="tangchu"></div>
                         </div>
                         <input type="text" placeholder="请输入经纪机构名称">
-                        <div class="map">
+                        <div class="map" onclick="location.href='map.html'">
                             <img src="image/map.png" alt="">
                             <p>地图</p>
                         </div>

+ 19 - 6
src/main/resources/static/main/mobilepage/js/login.js

@@ -211,15 +211,16 @@ Vue.component('conten-text1', {
 			}
 			if (this.ruleForm['phone']) {
 				this.showTime = false
-				this.timer = setInterval(() => {
-					this.timeNum = this.timeNum - 1
-				}, 1000)
+				// this.timer = setInterval(() => {
+				// 	this.timeNum = this.timeNum - 1
+				// }, 1000)
 			} else {
 				this.tipShow = true;
 				setTimeout(() => {
 					this.tipShow = false
 				}, 1000)
 			}
+			var _this=this
 			$.ajax({
 				type: 'GET',
 				url: PATH + '/front/sendMessage',
@@ -227,6 +228,11 @@ Vue.component('conten-text1', {
 					phone: this.ruleForm.phone
 				},
 				success: function (json) {
+					if(json.result){
+						_this.timer = setInterval(() => {
+							_this.timeNum = _this.timeNum - 1
+						}, 1000)
+					}
 					layer.msg(json.msg);
 				},
 				error: function (err) {
@@ -340,6 +346,7 @@ Vue.component('conten-text2', {
 						_this.ruleForm.verificationcode = '';
 						_this.loginpassword();
 						layer.msg(json.msg);
+
 					} else {
 						_this.ruleForm.phone = '';
 						_this.ruleForm.newpassword = '';
@@ -371,15 +378,16 @@ Vue.component('conten-text2', {
 			}
 			if (this.ruleForm['phone']) {
 				this.showTime = false
-				this.timer = setInterval(() => {
-					this.timeNum = this.timeNum - 1
-				}, 1000)
+				// this.timer = setInterval(() => {
+				// 	this.timeNum = this.timeNum - 1
+				// }, 1000)
 			} else {
 				this.tipShow = true;
 				setTimeout(() => {
 					this.tipShow = false
 				}, 1000)
 			}
+			var _this=this
 			$.ajax({
 				type: 'GET',
 				url: PATH + '/front/sendUpdateMessage',
@@ -387,6 +395,11 @@ Vue.component('conten-text2', {
 					phone: this.ruleForm.phone
 				},
 				success: function (json) {
+					if(json.result){
+						_this.timer = setInterval(() => {
+							_this.timeNum = _this.timeNum - 1
+						}, 1000)
+					}
 					layer.msg(json.msg);
 				},
 				error: function (err) {

+ 1 - 1
src/main/resources/static/main/pbadInformation.html

@@ -231,7 +231,7 @@
                             <div class="tangchu"></div>
                         </div>
                         <input type="text" placeholder="请输入经纪人员名称">
-                        <div class="map">
+                        <div class="map" onclick="location.href='map.html'">
                             <img src="image/map.png" alt="">
                             <p>地图</p>
                         </div>

+ 1 - 1
src/main/resources/static/main/personifo.html

@@ -117,7 +117,7 @@
 						<div class="tangchu"></div>
 					</div>
 					<input type="text" placeholder="请输入经纪人员名称">
-					<div class="map">
+					<div class="map" onclick="location.href='map.html'">
 						<img src="image/map.png" alt="">
 						<p>地图</p>
 					</div>

+ 1 - 1
src/main/resources/static/main/pgoodInformation.html

@@ -225,7 +225,7 @@
                             <div class="tangchu"></div>
                         </div>
                         <input type="text" placeholder="请输入经纪人员名称">
-                        <div class="map">
+                        <div class="map" onclick="location.href='map.html'">
                             <img src="image/map.png" alt="">
                             <p>地图</p>
                         </div>