瀏覽代碼

修复Bug

weiximei 6 年之前
父節點
當前提交
bab9f3ba60

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/AppApplication.java 查看文件

@@ -31,7 +31,7 @@ public class AppApplication {
31 31
 	public HttpMessageConverters fastJsonConfigure(){
32 32
 		FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter();
33 33
 		FastJsonConfig fastJsonConfig = new FastJsonConfig();
34
-		fastJsonConfig.setSerializerFeatures(SerializerFeature.PrettyFormat,SerializerFeature.DisableCircularReferenceDetect);
34
+		fastJsonConfig.setSerializerFeatures(SerializerFeature.PrettyFormat,SerializerFeature.DisableCircularReferenceDetect,SerializerFeature.WriteMapNullValue);
35 35
 		//日期格式化
36 36
 		//fastJsonConfig.setDateFormat("yyyy-MM-dd HH:mm:ss");
37 37
 		converter.setFastJsonConfig(fastJsonConfig);

+ 3
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/ToBannerMapper.java 查看文件

@@ -9,7 +9,9 @@ import java.util.List;
9 9
 @Mapper
10 10
 public interface ToBannerMapper {
11 11
 
12
-    ToBanner selectByCommunityId(@Param("bannerId") Integer bannerId, @Param("nowTime") String nowTime);
12
+//    ToBanner selectByCommunityId(@Param("bannerId") Integer bannerId, @Param("nowTime") String nowTime);
13
+
14
+    ToBanner selectByCommunityId(@Param("bannerId") Integer bannerId);
13 15
 
14 16
     List<ToBanner> selectAllByNum(@Param("nowTime") String nowTime, @Param("num")Integer num, @Param("bannerPosition") Integer bannerPosition);
15 17
 }

+ 3
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBillMapper.java 查看文件

@@ -2,6 +2,7 @@ package com.community.huiju.dao;
2 2
 
3 3
 import com.community.huiju.model.TpBill;
4 4
 import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
5 6
 
6 7
 @Mapper
7 8
 public interface TpBillMapper {
@@ -16,4 +17,6 @@ public interface TpBillMapper {
16 17
     int updateByPrimaryKeySelective(TpBill record);
17 18
 
18 19
     int updateByPrimaryKey(TpBill record);
20
+
21
+    TpBill selectById(@Param("id") Integer id);
19 22
 }

+ 1
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BannerServiceImpl.java 查看文件

@@ -27,8 +27,7 @@ public class BannerServiceImpl implements BannerServiceI {
27 27
 
28 28
     @Override
29 29
     public ToBanner viewBannerImg(Integer bannerId) {
30
-        String nowTime = DateUtils.getDate("yyyy-MM-dd");
31
-        return toBannerMapper.selectByCommunityId(bannerId, nowTime);
30
+        return toBannerMapper.selectByCommunityId(bannerId);
32 31
     }
33 32
 
34 33
     @Override

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/MessageServiceImpl.java 查看文件

@@ -57,7 +57,7 @@ public class MessageServiceImpl implements MessageServiceI {
57 57
 		messageList.stream().forEach(tpMessage -> {
58 58
 			//缴费相关信息
59 59
 			if (tpMessage.getMessageType().equals(Constant.MESSAGE_TYPE_BILL)){
60
-				TpBill tpBill = tpBillMapper.selectByPrimaryKey(tpMessage.getBillId());
60
+				TpBill tpBill = tpBillMapper.selectById(tpMessage.getBillId());
61 61
 				if (null != tpBill){
62 62
 					tpMessage.setContent(tpBill.getBillExplain());
63 63
 				}

+ 5
- 2
CODE/smart-community/app-api/src/main/resources/mapper/ToBannerMapper.xml 查看文件

@@ -21,12 +21,15 @@
21 21
     id, community_id, banner_description, sort, banner_cover, banner_position, eff_time, 
22 22
     exp_time, banner_type, external_link, banner_title, banner_content, create_user, create_date
23 23
   </sql>
24
+
24 25
   <select id="selectByCommunityId" resultMap="BaseResultMap">
25 26
     select
26 27
     <include refid="Base_Column_List"></include>
27 28
     from to_banner t where id = #{bannerId}
28
-    and t.eff_time &lt; #{nowTime}
29
-    and t.exp_time &gt; #{nowTime}
29
+    <![CDATA[
30
+    AND date_format(t.eff_time,'%Y-%m-%d') <= date_format(NOW(),'%Y-%m-%d')
31
+    AND date_format(t.exp_time,'%Y-%m-%d') >= date_format(NOW(),'%Y-%m-%d')
32
+    ]]>
30 33
     order by t.sort, t.eff_time
31 34
   </select>
32 35
 

+ 22
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TpBillMapper.xml 查看文件

@@ -27,7 +27,28 @@
27 27
     from tp_bill
28 28
     where id = #{id,jdbcType=INTEGER}
29 29
   </select>
30
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
30
+  <select id="selectById" resultType="com.community.huiju.model.TpBill">
31
+    SELECT
32
+        t.id,
33
+        t.community_id,
34
+        t.bill_name,
35
+        t.bill_explain,
36
+        t.pay_price,
37
+        t.pay_total_num,
38
+        t.payed_num,
39
+        t.unpayed_num,
40
+        t.bill_status,
41
+        t.end_date,
42
+        t.create_user,
43
+        t.create_date,
44
+        t.update_user,
45
+        t.update_date
46
+    FROM
47
+        tp_bill t
48
+    LEFT JOIN tp_bill_invoice i ON t.id = i.bill_id
49
+    WHERE i.id = #{id,jdbcType=INTEGER}
50
+  </select>
51
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
31 52
     delete from tp_bill
32 53
     where id = #{id,jdbcType=INTEGER}
33 54
   </delete>

+ 2
- 1
CODE/smart-community/zuul/src/main/resources/bootstrap.yml 查看文件

@@ -32,7 +32,6 @@ zuul:
32 32
   host:
33 33
     connect-timeout-millis: 180000
34 34
     socket-timeout-millis: 180000
35
-
36 35
 hystrix:
37 36
   command:
38 37
     default:
@@ -48,3 +47,5 @@ mybatis:
48 47
   mapperLocations: classpath:mapper/*.xml
49 48
   configuration:
50 49
     call-setters-on-nulls: true
50
+
51
+