Browse Source

需求新增BUG修复

anderx 7 years ago
parent
commit
e6bdb6350f

+ 1 - 1
src/main/java/com/goafanti/app/controller/AppUserController.java

@@ -451,7 +451,7 @@ public class AppUserController extends BaseApiController {
 		if (StringUtils.isNotBlank(demand.getUrgentDays())) {
 			d.setUrgentDays(demand.getUrgentDays());
 		}
-		if (StringUtils.isNotBlank(demand.getUrgentMoney())) {
+		if (null==demand.getUrgentMoney()) {
 			d.setUrgentMoney(demand.getUrgentMoney());
 		}
 		res.setData(demandService.saveAppUserDemand(d, validityPeriodFormattedDate, null));

+ 15 - 10
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -227,9 +227,9 @@
 		</if>
 	</select>
 	<select id="selectSignPersonalCustomerList" resultType="com.goafanti.customer.bo.CustomerListOut">
-		select 
-			t0.buyer_id as uid,
-			t0.last_sign_time as lastSignTime,
+			select 
+			t0.uid as uid,
+			t0.update_time as lastSignTime,
 			t1.last_follow_time as lastFollowTime,
 			t2.society_tag as societyTag,
 			t2.identify_name as name,
@@ -243,15 +243,17 @@
 			c.name as industry,
 			d.name as adminName
 		from
-			(select buyer_id,salesman_id,max(sign_time) as last_sign_time from t_order where salesman_id = #{aid} and order_status = 3 and delete_sign != 1 group by buyer_id)t0
-			<!-- (select uid,max(lock_time) from user_lock_release where aid = #{aid} and type = 1 and status = 0 group by uid)t0 -->
+			(select uid,aid,max(update_time) as update_time
+		from user_business 
+		where follow_situation=5 and aid=1
+		group by uid)t0
 		left join 
-			(select uid,aid,max(create_time) as last_follow_time from user_follow where aid = #{aid} group by uid)t1
-		on t0.buyer_id = t1.uid
+			(select uid,aid,max(create_time) as last_follow_time from user_follow where aid ='1' group by uid)t1
+		on t0.uid = t1.uid
 		inner join
 			(select id,aid,share_type,society_tag,identify_name,transfer_time from user where type = 0 and status != 1)t2
-		on t0.buyer_id = t2.id
-		left join user_identity b on t0.buyer_id = b.uid
+		on t0.uid = t2.id
+		left join user_identity b on t0.uid = b.uid
 		left join district_glossory dg1 on b.province = dg1.id
 		left join district_glossory dg2 on b.city = dg2.id
 		left join district_glossory dg3 on b.area = dg3.id
@@ -286,7 +288,10 @@
 		select 
 			count(0)
 		from
-			(select buyer_id,salesman_id,max(sign_time) as last_sign_time from t_order where salesman_id = #{aid} and order_status = 3 and delete_sign != 1 group by buyer_id)t0
+			(select uid,aid,max(update_time) as update_time
+		from user_business 
+		where follow_situation=5 and aid=1
+		group by uid)t0
 			<!-- (select uid,max(lock_time) from user_lock_release where aid = #{aid} and type = 1 and status = 0 group by uid)t0 -->
 		inner join
 			(select id,aid,share_type,society_tag,identify_name,transfer_time from user where type = 0 and status != 1)t2

+ 2 - 2
src/main/java/com/goafanti/common/model/Demand.java

@@ -611,8 +611,8 @@ public class Demand {
 		return urgentMoney;
 	}
 
-	public void setUrgentMoney(String urgentMoney) {
-		this.urgentMoney = new BigDecimal(urgentMoney);
+	public void setUrgentMoney(BigDecimal urgentMoney) {
+		this.urgentMoney = urgentMoney;
 	}
 
 	public String getContactMobile() {

+ 3 - 4
src/main/java/com/goafanti/demand/bo/InputDemand.java

@@ -135,8 +135,7 @@ public class InputDemand {
 	@Size(min = 0, max = 11, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String urgentDays;
 	
-	@Size(min = 0, max = 16, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String urgentMoney;
+	private BigDecimal urgentMoney;
 	
 	@Size(min = 0, max = 256, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String contacts; 
@@ -455,11 +454,11 @@ public class InputDemand {
 		this.urgentDays = urgentDays;
 	}
 
-	public String getUrgentMoney() {
+	public BigDecimal getUrgentMoney() {
 		return urgentMoney;
 	}
 
-	public void setUrgentMoney(String urgentMoney) {
+	public void setUrgentMoney(BigDecimal urgentMoney) {
 		this.urgentMoney = urgentMoney;
 	}
 }

+ 2 - 2
src/main/java/com/goafanti/demand/controller/AdminDemandApiController.java

@@ -271,7 +271,7 @@ public class AdminDemandApiController extends CertifyApiController {
 		if (StringUtils.isNotBlank(demand.getUrgentDays())) {
 			d.setUrgentDays(demand.getUrgentDays());
 		}
-		if (StringUtils.isNotBlank(demand.getUrgentMoney())) {
+		if (null==demand.getUrgentMoney()) {
 			d.setUrgentMoney(demand.getUrgentMoney());
 		}
 			
@@ -443,7 +443,7 @@ public class AdminDemandApiController extends CertifyApiController {
 		if (StringUtils.isNotBlank(demand.getUrgentDays())) {
 			d.setUrgentDays(demand.getUrgentDays());
 		}
-		if (StringUtils.isNotBlank(demand.getUrgentMoney())) {
+		if (null==demand.getUrgentMoney()) {
 			d.setUrgentMoney(demand.getUrgentMoney());
 		}
 		res.setData(demandService.updateUserDemand(d, validityPeriodFormattedDate, keywords, switchSign));