Browse Source

修复爱尚家的bug

main
科技小王子 4 weeks ago
parent
commit
ade737c3bd
  1. 6
      src/main/java/com/gxwebsoft/house/entity/HouseInfo.java
  2. 16
      src/main/java/com/gxwebsoft/house/mapper/xml/HouseInfoMapper.xml
  3. 7
      src/main/java/com/gxwebsoft/house/param/HouseInfoParam.java
  4. 4
      src/main/resources/application-dev.yml
  5. 2
      src/main/resources/application-prod.yml
  6. 5
      src/main/resources/application.yml
  7. 19
      src/test/java/com/gxwebsoft/TestMain.java

6
src/main/java/com/gxwebsoft/house/entity/HouseInfo.java

@ -59,6 +59,12 @@ public class HouseInfo implements Serializable {
@Schema(description = "楼层")
private String floor;
@Schema(description = "卖价")
private String salePrice;
@Schema(description = "总价")
private String totalPrice;
@Schema(description = "房号")
private String roomNumber;

16
src/main/java/com/gxwebsoft/house/mapper/xml/HouseInfoMapper.xml

@ -5,11 +5,9 @@
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*,
b.nickname,b.avatar,b.grade_id,
c.name as gradeName
b.nickname,b.avatar,b.grade_id
FROM house_info a
LEFT JOIN gxwebsoft_core.sys_user b ON a.user_id = b.user_id
LEFT JOIN shop_user_grade c ON b.grade_id = c.grade_id
<where>
<if test="param.houseId != null">
AND a.house_id = #{param.houseId}
@ -44,6 +42,12 @@
<if test="param.roomNumber != null">
AND a.room_number LIKE CONCAT('%', #{param.roomNumber}, '%')
</if>
<if test="param.salePrice != null">
AND a.sale_price = #{param.salePrice}
</if>
<if test="param.totalPrice != null">
AND a.total_Price = #{param.totalPrice}
</if>
<if test="param.realName != null">
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
</if>
@ -110,18 +114,12 @@
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<!-- <if test="param.extentScene != null">-->
<!-- AND a.extent &gt;= 100 AND a.extent &lt;= 150-->
<!-- </if>-->
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (
a.house_title LIKE CONCAT('%', #{param.keywords}, '%')

7
src/main/java/com/gxwebsoft/house/param/HouseInfoParam.java

@ -8,7 +8,6 @@ import com.gxwebsoft.common.core.annotation.QueryType;
import com.gxwebsoft.common.core.web.BaseParam;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -67,6 +66,12 @@ public class HouseInfoParam extends BaseParam {
@Schema(description = "楼层")
private String floor;
@Schema(description = "卖价")
private String salePrice;
@Schema(description = "总价")
private String totalPrice;
@Schema(description = "房号")
private String roomNumber;

4
src/main/resources/application-dev.yml

@ -15,7 +15,7 @@ spring:
# username: db_10556
# password: 3FErjCpAFmbAR7Xw
url: jdbc:mysql://47.119.165.234:3308/modules?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
url: jdbc:mysql://8.134.169.209:13306/modules?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
username: modules
password: 8YdLnk7KsPAyDXGA
driver-class-name: com.mysql.cj.jdbc.Driver
@ -53,7 +53,7 @@ mqtt:
# 框架配置
config:
# 开发环境接口
server-url: http://127.0.0.1:9091/api
server-url: http://127.0.0.1:9200/api
upload-path: /Users/gxwebsoft/Documents/uploads/ # window(D:\Temp)
# 开发环境证书配置

2
src/main/resources/application-prod.yml

@ -3,7 +3,7 @@
# 数据源配置
spring:
datasource:
url: jdbc:mysql://47.119.165.234:3308/modules?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
url: jdbc:mysql://1Panel-mysql-Bqdt:3306/modules?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
username: modules
password: 8YdLnk7KsPAyDXGA
driver-class-name: com.mysql.cj.jdbc.Driver

5
src/main/resources/application.yml

@ -64,11 +64,6 @@ knife4j:
multipart:
max-file-size: 100MB
max-request-size: 100MB
redis:
database: 0
host: 1Panel-redis-Q1LE
port: 6379
password: redis_WSDb88
# 邮件服务器配置
mail:

19
src/test/java/com/gxwebsoft/TestMain.java

@ -5,8 +5,6 @@ import cn.hutool.core.util.StrUtil;
import com.gxwebsoft.hjm.controller.PushCallback;
import com.gxwebsoft.hjm.entity.HjmCar;
import com.gxwebsoft.hjm.service.HjmCarService;
import org.eclipse.paho.client.mqttv3.*;
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -53,7 +51,7 @@ public class TestMain {
// System.out.println("decrypt = " + decrypt);
}
@Test
// @Test
// public void mqtt() throws MqttException {
////tcp://MQTT安装的服务器地址:MQTT定义的端口号
// String HOST = "tcp://1.14.159.185:1883";
@ -94,19 +92,4 @@ public class TestMain {
// client.subscribe("/SW_GSP/#", 2);
// while (true);
// }
private String fenToYuan(String amount) {
NumberFormat format = NumberFormat.getInstance();
try {
Number number = format.parse(amount);
double temp = number.doubleValue() / 100.0;
format.setGroupingUsed(false);
// 设置返回的小数部分所允许的最大位数
format.setMaximumFractionDigits(2);
amount = format.format(temp);
} catch (ParseException e) {
e.printStackTrace();
}
return amount;
}
}

Loading…
Cancel
Save