一个搜索框对手机、姓名、内容进行搜索
<select id="list" parameterType="java.lang.String" resultMap="BaseResultMap">select<include refid="Base_Column_List"/>from user_backstagewhere 1=1 and is_deleted='N'<if test="content!=null and content!=''">and (fullname=#{content} or username=#{content} or phone=#{content})</if>order by create_time desc
</select>
<select id="selectByPhoneOrUserName" parameterType="java.lang.String" resultMap="BaseResultMap">select<include refid="Base_Column_List"/>from user_backstagewhere is_deleted='N'and (username=#{username} or phone=#{phone})
</select>
@NotEmpty、@NotNull、@NotBlank的源码注释、区别、举例
原创山月风成 最后发布于2018-04-04 20:17:30 阅读数 4908 收藏
展开
网上搜索总结如下,
@NotEmpty、@NotNull、@NotBlank的区别
1 @NotEmpty :不能为null,且Size>0
2 @NotNull:不能为null,但可以为empty,没有Size的约束
3 @NotBlank:只用于String,不能为null且trim()之后size>0
不够具体,不权威,直接上源码注释!
@NotEmpty
/**
* Asserts that the annotated string, collection, map or array is not {@code null} or empty.
*
* @author Emmanuel Bernard
* @author Hardy Ferentschik
*/
断言,带注解的String,collection,map或数组不能为null,也不能为空。
也就是说,有@NotEmpty注解的String、Collection、Map、数组是不能为null或长度为0
踩坑
@NotEmpty(message = "id不能为null或空")
pirvate Long id;
错!这是基础类型的包装类、除了以上4种类型都不能使用@NotEmpty
@NotNull(message = "id不能为null或空")
private Long id;
正确
@NotBlank
/**
* Validate that the annotated string is not {@code null} or empty.
* The difference to {@code NotEmpty} is that trailing whitespaces are getting ignored.
*
* @author Hardy Ferentschik
*/
验证注释的String不是null或空的,与@NotEmpty的区别在于,尾部空格被忽略,也就是说,纯空格的String也是不符合规则的,此注解只能用于验证String类型
@NotNull
/**
* The annotated element must not be {@code null}.
* Accepts any type.
*
* @author Emmanuel Bernard
*/
带注释的元素不能为null。接受任何类型。完美!
应用场景
数据库表student_message
实体类时Student
属性有
//id不能为null
@NotNull
private int id;
//姓名不能为null,也不能为“ ”
@NotEmpty
private String name;
//爱好不能为null,但可以为“ ”
@NotNull
private String favorite;
//家庭住址不能为null,只能填String,trim()去掉尾部空格后,
//字符串个数大于0.类别:(必填项)
@NotBlank
private String address;
手机号/用户名/昵称 模糊查询
金田公寓查看线上的额错误日志
Administrator@PC-201908221240 MINGW64 ~/Desktop
$ ssh root@10.23.12.48
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-88-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Mon May 11 14:41:17 CST 2020
System load: 0.43
Usage of /: 43.0% of 48.96GB
Memory usage: 62%
Swap usage: 0%
Processes: 262
Users logged in: 1
IP address for ens160: 10.23.12.48
IP address for br-cb039c25af75: 172.18.0.1
IP address for docker_gwbridge: 172.19.0.1
IP address for docker0: 172.17.0.1
IP address for br-3f998dfe0380: 172.21.0.1
IP address for br-664b1781737b: 172.20.0.1
* Ubuntu 20.04 LTS is out, raising the bar on performance, security,
and optimisation for Intel, AMD, Nvidia, ARM64 and Z15 as well as
AWS, Azure and Google Cloud.
https://ubuntu.com/blog/ubuntu-20-04-lts-arrives
* Canonical Livepatch is available for installation.
- Reduce system reboots and improve kernel security. Activate at:
https://ubuntu.com/livepatch
119 packages can be updated.
0 updates are security updates.
*** System restart required ***
Last login: Mon May 11 14:34:37 2020 from 10.23.12.34
root@yyyf:~# docker logs -f apartmentFinance
:: Dubbo Spring Boot (v0.2.0) : https://github.com/apache/incubator-dubbo-spring-boot-project
:: Dubbo (v2.6.2) : https://github.com/apache/incubator-dubbo
:: Google group : dev@dubbo.incubator.apache.org
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.4.RELEASE)
2020-05-11 14:36:55.432 INFO com.unicom.apartment.FinanceApplication:50 - Starting FinanceApplication v0.0.1-SNAPSHOT on 03cc382518ba with PID 1 (/app/finance.jar started by root in /app)
2020-05-11 14:36:55.435 DEBUG com.unicom.apartment.FinanceApplication:53 - Running with Spring Boot v2.1.4.RELEASE, Spring v5.1.6.RELEASE
2020-05-11 14:36:55.436 INFO com.unicom.apartment.FinanceApplication:679 - The following profiles are active: dev
2020-05-11 14:36:57.087 WARN com.alibaba.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationBeanPostProcessor:155 - [DUBBO] No Spring Bean annotating Dubbo's @Service was found under package[com.unicom.apartment.service.impl], dubbo version: 2.6.2, current host: 172.21.0.9
2020-05-11 14:37:00.283 WARN io.seata.common.loader.EnhancedServiceLoader:318 - load [io.seata.codec.hessian.HessianCodec] class fail. com/caucho/hessian/io/AbstractHessianOutput
2020-05-11 14:37:00.389 WARN org.mybatis.spring.SqlSessionFactoryBean:44 - Property 'mapperLocations' was specified but matching resources are not found.
Logging initialized using 'class org.apache.ibatis.logging.stdout.StdOutImpl' adapter.
2020-05-11 14:37:06.152 INFO com.unicom.apartment.FinanceApplication:59 - Started FinanceApplication in 11.363 seconds (JVM running for 11.94)
Creating a new SqlSession
2020-05-11 14:38:27.890 INFO com.unicom.apartment.controller.BillController:79 - 普通财务列表 FinancialListDto={"apartmentId":"442111143688880128","billType":"","createTime":"","resourceName":"","state":[]} pageNum=1 pageSize=10
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@5fc2c12f] was not registered for synchronization because synchronization is not active
JDBC Connection [io.seata.rm.datasource.ConnectionProxy@23071f9e] will not be managed by Spring
==> Preparing: select 'true' as QUERYID, id, bill_type_name, billing_model_int, billing_model, image_name, remark, create_user, create_time, update_user, update_time, is_deleted from bill_type WHERE ( is_deleted = ? )
==> Parameters: N(String)
<== Columns: QUERYID, id, bill_type_name, billing_model_int, billing_model, image_name, remark, create_user, create_time, update_user, update_time, is_deleted
<== Row: true, 450995678040264704, 房租, 1, 每月价格, https://oss.hurcjt.com/apartment/2020/03/29/6d8734d7ce76401bb6b3499e8466638e.jpg, null, 100, 2020-03-29 12:15:48, 100, 2020-03-29 12:15:48, N
<== Row: true, 461176823137456128, 履约金, 3, 固定金额, https://oss.hurcjt.com/apartment/2020/05/09/8193f8f32e124e499a4e8625a5dc3263.jpg, null, 100, 2020-04-26 14:32:02, 100, 2020-05-09 14:55:12, N
<== Row: true, 461176823137456129, 家电维修2, 3, 固定金额, https://oss.hurcjt.com/apartment/2020/05/09/96c8262baa1e4250b55ed02fb61251ed.jpeg, 家电维修2, 1, 2020-05-09 11:44:38, 100, 2020-05-09 14:55:35, N
<== Row: true, 465881174116438016, 停车费, 3, 固定金额, https://oss.hurcjt.com/apartment/2020/05/09/4e6a4cab23e346f99ad3a2bb1a5165ed.jpeg, null, 100, 2020-05-09 14:05:27, 100, 2020-05-09 14:56:36, N
<== Row: true, 466605939085053952, 物业费, 2, 每月单位价格, https://oss.hurcjt.com/apartment/2020/05/11/05224193c9784f9cb59ee0e6c4e02058.jpg, null, 100, 2020-05-11 14:05:24, 100, 2020-05-11 14:05:24, N
<== Total: 5
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@5fc2c12f]
2020-05-11 14:38:28.241 INFO com.unicom.apartment.service.impl.BillServiceImpl:722 - resourceIdList=[456427715992072192, 456427716025626624, 456427716034015232, 456427716042403840, 456427716050792448, 456427716059181056, 456427716067569664, 456427716075958272, 456427716084346880, 456427716096929792, 456427716109512704, 456427716117901312, 456427716122095616, 456427716130484224, 456427716138872832, 456427716147261440, 456427716151455744, 456427716159844352, 456777194725289984, 456777194729484288, 456777480739074048, 456777480747462656, 456777480760045568, 456777480764239872, 456777480768434176, 456777480772628480, 456777480781017088, 456777480785211392, 456777480793600000, 456777480801988608, 456777480822960128, 456777480827154432, 456777480831348736, 456777480835543040, 456777480843931648, 456777480860708864, 456787573358571520]
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6e2f9d1b] was not registered for synchronization because synchronization is not active
JDBC Connection [io.seata.rm.datasource.ConnectionProxy@167d17f0] will not be managed by Spring
==> Preparing: SELECT count(0) FROM bill WHERE (resource_id IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) AND is_deleted = ?)
==> Parameters: 456427715992072192(Long), 456427716025626624(Long), 456427716034015232(Long), 456427716042403840(Long), 456427716050792448(Long), 456427716059181056(Long), 456427716067569664(Long), 456427716075958272(Long), 456427716084346880(Long), 456427716096929792(Long), 456427716109512704(Long), 456427716117901312(Long), 456427716122095616(Long), 456427716130484224(Long), 456427716138872832(Long), 456427716147261440(Long), 456427716151455744(Long), 456427716159844352(Long), 456777194725289984(Long), 456777194729484288(Long), 456777480739074048(Long), 456777480747462656(Long), 456777480760045568(Long), 456777480764239872(Long), 456777480768434176(Long), 456777480772628480(Long), 456777480781017088(Long), 456777480785211392(Long), 456777480793600000(Long), 456777480801988608(Long), 456777480822960128(Long), 456777480827154432(Long), 456777480831348736(Long), 456777480835543040(Long), 456777480843931648(Long), 456777480860708864(Long), 456787573358571520(Long), N(String)
<== Columns: count(0)
<== Row: 4
<== Total: 1
==> Preparing: select 'true' as QUERYID, id, bill_type, unit_price, area, settle_cycle, bill_startdate, bill_enddate, bill_finaldate, total_month, break_money, remove_money, actual_money, remark, notice_mode, original_money, refund_state, state, user_id, resource_id, create_user, create_time, update_user, update_time, is_deleted from bill WHERE ( resource_id in ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ) and is_deleted = ? ) order by create_time desc LIMIT ?
==> Parameters: 456427715992072192(Long), 456427716025626624(Long), 456427716034015232(Long), 456427716042403840(Long), 456427716050792448(Long), 456427716059181056(Long), 456427716067569664(Long), 456427716075958272(Long), 456427716084346880(Long), 456427716096929792(Long), 456427716109512704(Long), 456427716117901312(Long), 456427716122095616(Long), 456427716130484224(Long), 456427716138872832(Long), 456427716147261440(Long), 456427716151455744(Long), 456427716159844352(Long), 456777194725289984(Long), 456777194729484288(Long), 456777480739074048(Long), 456777480747462656(Long), 456777480760045568(Long), 456777480764239872(Long), 456777480768434176(Long), 456777480772628480(Long), 456777480781017088(Long), 456777480785211392(Long), 456777480793600000(Long), 456777480801988608(Long), 456777480822960128(Long), 456777480827154432(Long), 456777480831348736(Long), 456777480835543040(Long), 456777480843931648(Long), 456777480860708864(Long), 456787573358571520(Long), N(String), 10(Integer)
<== Columns: QUERYID, id, bill_type, unit_price, area, settle_cycle, bill_startdate, bill_enddate, bill_finaldate, total_month, break_money, remove_money, actual_money, remark, notice_mode, original_money, refund_state, state, user_id, resource_id, create_user, create_time, update_user, update_time, is_deleted
<== Row: true, 466607297414598656, 450995678040264704, 1000.00, null, 3, 2020-05-01 00:00:00, 2020-06-24 00:00:00, 2020-05-30 00:00:00, 2, 100.00, 50.00, 2050, null, 1, null, 4, 3, 451764014038773760, 456427715992072192, 100, 2020-05-11 14:10:48, 100, 2020-05-11 14:10:48, N
<== Row: true, 466607154351083520, 450995678040264704, 1000.00, null, 3, 2020-05-01 00:00:00, 2020-06-24 00:00:00, 2020-05-30 00:00:00, 2, 100.00, 50.00, 2050, null, 1, null, 4, 3, 451764014038773760, 456427715992072192, 100, 2020-05-11 14:10:14, 100, 2020-05-11 14:10:14, N
<== Row: true, 466606402912161792, 466605939085053952, 10.00, 30.00, 3, 2020-05-01 00:00:00, 2020-06-17 00:00:00, 2020-05-29 00:00:00, 2, 100.00, 100.00, 600, null, 1, null, 4, 3, 450662170105118720, 456427716025626624, 100, 2020-05-11 14:07:15, 100, 2020-05-11 14:07:15, N
<== Row: true, 461173351180685312, 450995678040264704, 2100.00, null, 4, 2020-04-20 00:00:00, 2020-10-19 00:00:00, 2020-07-19 00:00:00, null, null, null, 14700, null, 1, null, 4, 3, 456432965629042688, 456427715992072192, 100, 2020-04-26 14:18:15, 100, 2020-04-26 14:18:15, N
<== Total: 4
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6e2f9d1b]
2020-05-11 14:38:28.336 INFO com.unicom.apartment.service.impl.BillTypeServiceImpl:102 - 获取id为:450995678040264704BillType
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4a797b81] was not registered for synchronization because synchronization is not active
JDBC Connection [io.seata.rm.datasource.ConnectionProxy@38ce3d20] will not be managed by Spring
==> Preparing: select 'true' as QUERYID, id, bill_type_name, billing_model_int, billing_model, image_name, remark, create_user, create_time, update_user, update_time, is_deleted from bill_type WHERE ( id = ? and is_deleted = ? )
==> Parameters: 450995678040264704(Long), N(String)
<== Columns: QUERYID, id, bill_type_name, billing_model_int, billing_model, image_name, remark, create_user, create_time, update_user, update_time, is_deleted
<== Row: true, 450995678040264704, 房租, 1, 每月价格, https://oss.hurcjt.com/apartment/2020/03/29/6d8734d7ce76401bb6b3499e8466638e.jpg, null, 100, 2020-03-29 12:15:48, 100, 2020-03-29 12:15:48, N
<== Total: 1
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4a797b81]
2020-05-11 14:38:28.351 ERROR com.unicom.apartment.advice.GlobalCfgControllerAdvice:48 - System.Err
java.lang.NullPointerException: null
at com.unicom.apartment.service.impl.BillServiceImpl.findByPage(BillServiceImpl.java:393)
at com.unicom.apartment.controller.BillController.findByPage(BillController.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:189)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:151)
at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
2020-05-11 14:38:28.352 ERROR com.unicom.apartment.advice.GlobalCfgControllerAdvice:80 - null
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@1a1f7a9c] was not registered for synchronization because synchronization is not active
JDBC Connection [io.seata.rm.datasource.ConnectionProxy@10e711ec] will not be managed by Spring
==> Preparing: select 'true' as QUERYID, id, bill_type_name, billing_model_int, billing_model, image_name, remark, create_user, create_time, update_user, update_time, is_deleted from bill_type WHERE ( is_deleted = ? )
2020-05-11 14:38:43.435 INFO com.unicom.apartment.controller.BillController:79 - 普通财务列表 FinancialListDto={"apartmentId":"442111143688880128","billType":"","createTime":"","resourceName":"","state":[]} pageNum=1 pageSize=10
==> Parameters: N(String)
2020-05-11 14:38:43.440 INFO com.unicom.apartment.service.impl.BillServiceImpl:722 - resourceIdList=[456427715992072192, 456427716025626624, 456427716034015232, 456427716042403840, 456427716050792448, 456427716059181056, 456427716067569664, 456427716075958272, 456427716084346880, 456427716096929792, 456427716109512704, 456427716117901312, 456427716122095616, 456427716130484224, 456427716138872832, 456427716147261440, 456427716151455744, 456427716159844352, 456777194725289984, 456777194729484288, 456777480739074048, 456777480747462656, 456777480760045568, 456777480764239872, 456777480768434176, 456777480772628480, 456777480781017088, 456777480785211392, 456777480793600000, 456777480801988608, 456777480822960128, 456777480827154432, 456777480831348736, 456777480835543040, 456777480843931648, 456777480860708864, 456787573358571520]
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6544a3a6] was not registered for synchronization because synchronization is not active
<== Columns: QUERYID, id, bill_type_name, billing_model_int, billing_model, image_name, remark, create_user, create_time, update_user, update_time, is_deleted
<== Row: true, 450995678040264704, 房租, 1, 每月价格, https://oss.hurcjt.com/apartment/2020/03/29/6d8734d7ce76401bb6b3499e8466638e.jpg, null, 100, 2020-03-29 12:15:48, 100, 2020-03-29 12:15:48, N
<== Row: true, 461176823137456128, 履约金, 3, 固定金额, https://oss.hurcjt.com/apartment/2020/05/09/8193f8f32e124e499a4e8625a5dc3263.jpg, null, 100, 2020-04-26 14:32:02, 100, 2020-05-09 14:55:12, N
<== Row: true, 461176823137456129, 家电维修2, 3, 固定金额, https://oss.hurcjt.com/apartment/2020/05/09/96c8262baa1e4250b55ed02fb61251ed.jpeg, 家电维修2, 1, 2020-05-09 11:44:38, 100, 2020-05-09 14:55:35, N
<== Row: true, 465881174116438016, 停车费, 3, 固定金额, https://oss.hurcjt.com/apartment/2020/05/09/4e6a4cab23e346f99ad3a2bb1a5165ed.jpeg, null, 100, 2020-05-09 14:05:27, 100, 2020-05-09 14:56:36, N
<== Row: true, 466605939085053952, 物业费, 2, 每月单位价格, https://oss.hurcjt.com/apartment/2020/05/11/05224193c9784f9cb59ee0e6c4e02058.jpg, null, 100, 2020-05-11 14:05:24, 100, 2020-05-11 14:05:24, N
<== Total: 5
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@1a1f7a9c]
JDBC Connection [io.seata.rm.datasource.ConnectionProxy@29b5a7cc] will not be managed by Spring
==> Preparing: SELECT count(0) FROM bill WHERE (resource_id IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) AND is_deleted = ?)
==> Parameters: 456427715992072192(Long), 456427716025626624(Long), 456427716034015232(Long), 456427716042403840(Long), 456427716050792448(Long), 456427716059181056(Long), 456427716067569664(Long), 456427716075958272(Long), 456427716084346880(Long), 456427716096929792(Long), 456427716109512704(Long), 456427716117901312(Long), 456427716122095616(Long), 456427716130484224(Long), 456427716138872832(Long), 456427716147261440(Long), 456427716151455744(Long), 456427716159844352(Long), 456777194725289984(Long), 456777194729484288(Long), 456777480739074048(Long), 456777480747462656(Long), 456777480760045568(Long), 456777480764239872(Long), 456777480768434176(Long), 456777480772628480(Long), 456777480781017088(Long), 456777480785211392(Long), 456777480793600000(Long), 456777480801988608(Long), 456777480822960128(Long), 456777480827154432(Long), 456777480831348736(Long), 456777480835543040(Long), 456777480843931648(Long), 456777480860708864(Long), 456787573358571520(Long), N(String)
<== Columns: count(0)
<== Row: 4
<== Total: 1
==> Preparing: select 'true' as QUERYID, id, bill_type, unit_price, area, settle_cycle, bill_startdate, bill_enddate, bill_finaldate, total_month, break_money, remove_money, actual_money, remark, notice_mode, original_money, refund_state, state, user_id, resource_id, create_user, create_time, update_user, update_time, is_deleted from bill WHERE ( resource_id in ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ) and is_deleted = ? ) order by create_time desc LIMIT ?
==> Parameters: 456427715992072192(Long), 456427716025626624(Long), 456427716034015232(Long), 456427716042403840(Long), 456427716050792448(Long), 456427716059181056(Long), 456427716067569664(Long), 456427716075958272(Long), 456427716084346880(Long), 456427716096929792(Long), 456427716109512704(Long), 456427716117901312(Long), 456427716122095616(Long), 456427716130484224(Long), 456427716138872832(Long), 456427716147261440(Long), 456427716151455744(Long), 456427716159844352(Long), 456777194725289984(Long), 456777194729484288(Long), 456777480739074048(Long), 456777480747462656(Long), 456777480760045568(Long), 456777480764239872(Long), 456777480768434176(Long), 456777480772628480(Long), 456777480781017088(Long), 456777480785211392(Long), 456777480793600000(Long), 456777480801988608(Long), 456777480822960128(Long), 456777480827154432(Long), 456777480831348736(Long), 456777480835543040(Long), 456777480843931648(Long), 456777480860708864(Long), 456787573358571520(Long), N(String), 10(Integer)
<== Columns: QUERYID, id, bill_type, unit_price, area, settle_cycle, bill_startdate, bill_enddate, bill_finaldate, total_month, break_money, remove_money, actual_money, remark, notice_mode, original_money, refund_state, state, user_id, resource_id, create_user, create_time, update_user, update_time, is_deleted
<== Row: true, 466607297414598656, 450995678040264704, 1000.00, null, 3, 2020-05-01 00:00:00, 2020-06-24 00:00:00, 2020-05-30 00:00:00, 2, 100.00, 50.00, 2050, null, 1, null, 4, 3, 451764014038773760, 456427715992072192, 100, 2020-05-11 14:10:48, 100, 2020-05-11 14:10:48, N
<== Row: true, 466607154351083520, 450995678040264704, 1000.00, null, 3, 2020-05-01 00:00:00, 2020-06-24 00:00:00, 2020-05-30 00:00:00, 2, 100.00, 50.00, 2050, null, 1, null, 4, 3, 451764014038773760, 456427715992072192, 100, 2020-05-11 14:10:14, 100, 2020-05-11 14:10:14, N
<== Row: true, 466606402912161792, 466605939085053952, 10.00, 30.00, 3, 2020-05-01 00:00:00, 2020-06-17 00:00:00, 2020-05-29 00:00:00, 2, 100.00, 100.00, 600, null, 1, null, 4, 3, 450662170105118720, 456427716025626624, 100, 2020-05-11 14:07:15, 100, 2020-05-11 14:07:15, N
<== Row: true, 461173351180685312, 450995678040264704, 2100.00, null, 4, 2020-04-20 00:00:00, 2020-10-19 00:00:00, 2020-07-19 00:00:00, null, null, null, 14700, null, 1, null, 4, 3, 456432965629042688, 456427715992072192, 100, 2020-04-26 14:18:15, 100, 2020-04-26 14:18:15, N
<== Total: 4
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6544a3a6]
2020-05-11 14:38:43.460 INFO com.unicom.apartment.service.impl.BillTypeServiceImpl:102 - 获取id为:450995678040264704BillType
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@44668a23] was not registered for synchronization because synchronization is not active
JDBC Connection [io.seata.rm.datasource.ConnectionProxy@4a311570] will not be managed by Spring
==> Preparing: select 'true' as QUERYID, id, bill_type_name, billing_model_int, billing_model, image_name, remark, create_user, create_time, update_user, update_time, is_deleted from bill_type WHERE ( id = ? and is_deleted = ? )
==> Parameters: 450995678040264704(Long), N(String)
<== Columns: QUERYID, id, bill_type_name, billing_model_int, billing_model, image_name, remark, create_user, create_time, update_user, update_time, is_deleted
<== Row: true, 450995678040264704, 房租, 1, 每月价格, https://oss.hurcjt.com/apartment/2020/03/29/6d8734d7ce76401bb6b3499e8466638e.jpg, null, 100, 2020-03-29 12:15:48, 100, 2020-03-29 12:15:48, N
<== Total: 1
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@44668a23]
2020-05-11 14:38:43.469 ERROR com.unicom.apartment.advice.GlobalCfgControllerAdvice:48 - System.Err
java.lang.NullPointerException: null
at com.unicom.apartment.service.impl.BillServiceImpl.findByPage(BillServiceImpl.java:393)
at com.unicom.apartment.controller.BillController.findByPage(BillController.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:189)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:151)
at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
2020-05-11 14:38:43.469 ERROR com.unicom.apartment.advice.GlobalCfgControllerAdvice:80 - null
^C
root@yyyf:~# docker logs -f apartmentFinance