张延森 5 år sedan
förälder
incheckning
5a65267012

+ 1
- 0
foyo-service/src/main/java/com/huiju/foyo/service/impl/TaLikeLogServiceImpl.java Visa fil

32
             return null != taCase.getLikeNum() ? taCase.getLikeNum() : 0;
32
             return null != taCase.getLikeNum() ? taCase.getLikeNum() : 0;
33
         }
33
         }
34
 
34
 
35
+        taLikeLogMapper.insert(taLikeLog);
35
         taCaseMapper.increase(taCase.getId(), 1);
36
         taCaseMapper.increase(taCase.getId(), 1);
36
         taCase = taCaseMapper.selectById(taCase.getId());
37
         taCase = taCaseMapper.selectById(taCase.getId());
37
         return taCase.getLikeNum();
38
         return taCase.getLikeNum();

+ 3
- 0
foyo-service/src/main/resources/application.yml Visa fil

1
+
1
 spring:
2
 spring:
2
   datasource:
3
   datasource:
3
     driver-class-name: com.mysql.jdbc.Driver
4
     driver-class-name: com.mysql.jdbc.Driver
12
   configuration:
13
   configuration:
13
     log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
14
     log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
14
   mapper-locations: classpath:mapper/*.xml
15
   mapper-locations: classpath:mapper/*.xml
16
+server:
17
+  port: 8080

+ 1
- 0
foyo-service/src/main/resources/mapper/TaCaseMapper.xml Visa fil

15
               END
15
               END
16
             FROM
16
             FROM
17
             ta_case
17
             ta_case
18
+			WHERE type = 'case'
18
             GROUP BY SIGN(id - #{id})
19
             GROUP BY SIGN(id - #{id})
19
             ORDER BY SIGN(id - #{id})
20
             ORDER BY SIGN(id - #{id})
20
          )
21
          )