NutzCN Logo
问答 dao.json配置缓存出现bug,字段获取不全
发布于 2717天前 作者 x55admin 1652 次浏览 复制 上一个帖子 下一个帖子
标签: dao daocache
@Table("myclass")
public class MyClass extends MyModel implements Serializable

在dao.json

cacheExecutor: {
            type: "org.nutz.plugins.cache.dao.CachedNutDaoExecutor",
            fields: {
                cacheProvider: {
                    refer: "cacheProvider"
                },
                cachedTableNames: ["sys_user", "sys_role", "sys_menu", "myclass"]
                enableWhenTrans: false, // 事务作用域内是否启用,默认false
                cache4Null: true, // 是否缓存空值,默认true
                db: "MYSQL"
            }
        },

加入myclass 出现MyModel 中的字段获取不到,cachedTableNames 不配置 myclass表,就可以获取到,这是什么问题?

7 回复

cachedTableNames 数据库-表名……

CachedNutDaoExecutor.DEBUG = true;

启用调试日志,然后贴日志.

如果第一次查询的时候该字段的值能取到,而第二次不能,那相关的字段,应该是序列化的时候丢失了(例如瞬时字段)

@Wizzercn 遇到过吗?怎么处理

@wendal fm_givewxcoupons 为出问题的表,加了缓存

2016-11-17 15:28:39,858 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM fm_givewxcoupons  WHERE customerId=? ORDER BY opAt DESC   LIMIT 0, 17 
    |                                1 |
    |----------------------------------|
    | e252e5e93c4744c9bf645fb541ed9650 |
  For example:> "SELECT * FROM fm_givewxcoupons  WHERE customerId='e252e5e93c4744c9bf645fb541ed9650' ORDER BY opAt DESC   LIMIT 0, 17 "
2016-11-17 15:28:39,861 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM fm_givewxcoupons  WHERE customerId=? ORDER BY opAt DESC   LIMIT 0, 17 , tables = [fm_givewxcoupons]
2016-11-17 15:28:39,861 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=-106671687:1:17:SELECT * FROM fm_givewxcoupons  WHERE customerId=? ORDER BY opAt DESC   LIMIT 0, 17 :e252e5e93c4744c9bf645fb541ed9650 SQL=SELECT * FROM fm_givewxcoupons  WHERE customerId=? ORDER BY opAt DESC   LIMIT 0, 17 
2016-11-17 15:28:39,861 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:168) DEBUG - cache miss = SELECT * FROM fm_givewxcoupons  WHERE customerId=? ORDER BY opAt DESC   LIMIT 0, 17 
2016-11-17 15:28:39,863 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'authService'<class cn.qingyun.modules.services.app.auth.AuthService>
Thu Nov 17 15:28:39 CST 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
2016-11-17 15:28:39,870 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM sys_user  WHERE id=?
    |                                1 |
    |----------------------------------|
    | 37759ba503db47c59f54c59133e9e6b2 |
  For example:> "SELECT * FROM sys_user  WHERE id='37759ba503db47c59f54c59133e9e6b2'"
2016-11-17 15:28:39,871 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM sys_user  WHERE id=?, tables = [sys_user]
2016-11-17 15:28:39,871 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2 SQL=SELECT * FROM sys_user  WHERE id=?
2016-11-17 15:28:39,871 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:168) DEBUG - cache miss = SELECT * FROM sys_user  WHERE id=?
2016-11-17 15:28:39,875 org.nutz.plugins.cache.dao.impl.provider.MemoryDaoCacheProvider.put(MemoryDaoCacheProvider.java:44) DEBUG - CacheName=sys_user, KEY=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2
2016-11-17 15:28:39,875 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'authService'<class cn.qingyun.modules.services.app.auth.AuthService>
2016-11-17 15:28:39,876 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM sys_user  WHERE id=?
    |                                1 |
    |----------------------------------|
    | 37759ba503db47c59f54c59133e9e6b2 |
  For example:> "SELECT * FROM sys_user  WHERE id='37759ba503db47c59f54c59133e9e6b2'"
2016-11-17 15:28:39,876 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM sys_user  WHERE id=?, tables = [sys_user]
2016-11-17 15:28:39,876 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2 SQL=SELECT * FROM sys_user  WHERE id=?
2016-11-17 15:28:39,877 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:164) DEBUG - cache found key=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2
2016-11-17 15:28:39,877 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'authService'<class cn.qingyun.modules.services.app.auth.AuthService>
2016-11-17 15:28:39,877 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM sys_user  WHERE id=?
    |                                1 |
    |----------------------------------|
    | 37759ba503db47c59f54c59133e9e6b2 |
  For example:> "SELECT * FROM sys_user  WHERE id='37759ba503db47c59f54c59133e9e6b2'"
2016-11-17 15:28:39,878 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM sys_user  WHERE id=?, tables = [sys_user]
2016-11-17 15:28:39,878 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2 SQL=SELECT * FROM sys_user  WHERE id=?
2016-11-17 15:28:39,879 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:164) DEBUG - cache found key=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2
2016-11-17 15:28:39,881 org.nutz.plugins.cache.dao.impl.provider.MemoryDaoCacheProvider.put(MemoryDaoCacheProvider.java:44) DEBUG - CacheName=fm_givewxcoupons, KEY=-106671687:1:17:SELECT * FROM fm_givewxcoupons  WHERE customerId=? ORDER BY opAt DESC   LIMIT 0, 17 :e252e5e93c4744c9bf645fb541ed9650
2016-11-17 15:28:39,883 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM fm_wxcoupons  WHERE id=?
    |                                1 |
    |----------------------------------|
    | 0a3259bac00e4276abc5e0cd60b28a9c |
  For example:> "SELECT * FROM fm_wxcoupons  WHERE id='0a3259bac00e4276abc5e0cd60b28a9c'"
2016-11-17 15:28:39,884 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM fm_wxcoupons  WHERE id=?, tables = [fm_wxcoupons]
2016-11-17 15:28:39,884 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=-3549610828:_:_:SELECT * FROM fm_wxcoupons  WHERE id=?:0a3259bac00e4276abc5e0cd60b28a9c SQL=SELECT * FROM fm_wxcoupons  WHERE id=?
2016-11-17 15:28:39,884 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:168) DEBUG - cache miss = SELECT * FROM fm_wxcoupons  WHERE id=?
2016-11-17 15:28:39,885 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'authService'<class cn.qingyun.modules.services.app.auth.AuthService>
2016-11-17 15:28:39,886 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM sys_user  WHERE id=?
    |                                1 |
    |----------------------------------|
    | 37759ba503db47c59f54c59133e9e6b2 |
  For example:> "SELECT * FROM sys_user  WHERE id='37759ba503db47c59f54c59133e9e6b2'"
2016-11-17 15:28:39,886 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM sys_user  WHERE id=?, tables = [sys_user]
2016-11-17 15:28:39,887 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2 SQL=SELECT * FROM sys_user  WHERE id=?
2016-11-17 15:28:39,887 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:164) DEBUG - cache found key=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2
2016-11-17 15:28:39,888 org.nutz.plugins.cache.dao.impl.provider.MemoryDaoCacheProvider.put(MemoryDaoCacheProvider.java:44) DEBUG - CacheName=fm_wxcoupons, KEY=-3549610828:_:_:SELECT * FROM fm_wxcoupons  WHERE id=?:0a3259bac00e4276abc5e0cd60b28a9c
2016-11-17 15:28:39,889 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM fm_wxcoupons  WHERE id=?
    |                                1 |
    |----------------------------------|
    | b0ac35a1343d4484a75a3667df72b64e |
  For example:> "SELECT * FROM fm_wxcoupons  WHERE id='b0ac35a1343d4484a75a3667df72b64e'"
2016-11-17 15:28:39,889 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM fm_wxcoupons  WHERE id=?, tables = [fm_wxcoupons]
2016-11-17 15:28:39,889 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=-3236443426:_:_:SELECT * FROM fm_wxcoupons  WHERE id=?:b0ac35a1343d4484a75a3667df72b64e SQL=SELECT * FROM fm_wxcoupons  WHERE id=?
2016-11-17 15:28:39,890 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:168) DEBUG - cache miss = SELECT * FROM fm_wxcoupons  WHERE id=?
2016-11-17 15:28:39,891 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'authService'<class cn.qingyun.modules.services.app.auth.AuthService>
2016-11-17 15:28:39,891 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM sys_user  WHERE id=?
    |                                1 |
    |----------------------------------|
    | 37759ba503db47c59f54c59133e9e6b2 |
  For example:> "SELECT * FROM sys_user  WHERE id='37759ba503db47c59f54c59133e9e6b2'"
2016-11-17 15:28:39,892 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM sys_user  WHERE id=?, tables = [sys_user]
2016-11-17 15:28:39,892 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2 SQL=SELECT * FROM sys_user  WHERE id=?
2016-11-17 15:28:39,893 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:164) DEBUG - cache found key=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2
2016-11-17 15:28:39,893 org.nutz.plugins.cache.dao.impl.provider.MemoryDaoCacheProvider.put(MemoryDaoCacheProvider.java:44) DEBUG - CacheName=fm_wxcoupons, KEY=-3236443426:_:_:SELECT * FROM fm_wxcoupons  WHERE id=?:b0ac35a1343d4484a75a3667df72b64e
2016-11-17 15:28:39,894 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM fm_wxcoupons  WHERE id=?
    |                                1 |
    |----------------------------------|
    | b0ac35a1343d4484a75a3667df72b64e |
  For example:> "SELECT * FROM fm_wxcoupons  WHERE id='b0ac35a1343d4484a75a3667df72b64e'"
2016-11-17 15:28:39,894 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM fm_wxcoupons  WHERE id=?, tables = [fm_wxcoupons]
2016-11-17 15:28:39,894 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=-3236443426:_:_:SELECT * FROM fm_wxcoupons  WHERE id=?:b0ac35a1343d4484a75a3667df72b64e SQL=SELECT * FROM fm_wxcoupons  WHERE id=?
2016-11-17 15:28:39,895 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'authService'<class cn.qingyun.modules.services.app.auth.AuthService>
2016-11-17 15:28:39,895 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM sys_user  WHERE id=?
    |                                1 |
    |----------------------------------|
    | 37759ba503db47c59f54c59133e9e6b2 |
  For example:> "SELECT * FROM sys_user  WHERE id='37759ba503db47c59f54c59133e9e6b2'"
2016-11-17 15:28:39,896 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM sys_user  WHERE id=?, tables = [sys_user]
2016-11-17 15:28:39,896 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2 SQL=SELECT * FROM sys_user  WHERE id=?
2016-11-17 15:28:39,897 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:164) DEBUG - cache found key=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2
2016-11-17 15:28:39,897 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:164) DEBUG - cache found key=-3236443426:_:_:SELECT * FROM fm_wxcoupons  WHERE id=?:b0ac35a1343d4484a75a3667df72b64e
2016-11-17 15:28:39,897 cn.qingyun.modules.services.app.giftcoupons.GiveGiftCouponsService.giveWxCouponsRecordList(GiveGiftCouponsService.java:146) DEBUG - ---------Nickname业务人员
2016-11-17 15:28:39,897 cn.qingyun.modules.services.app.giftcoupons.GiveGiftCouponsService.giveWxCouponsRecordList(GiveGiftCouponsService.java:147) DEBUG - ---------OpAt:2016-11-16 14:32:04
2016-11-17 15:28:39,897 cn.qingyun.modules.services.app.giftcoupons.GiveGiftCouponsService.giveWxCouponsRecordList(GiveGiftCouponsService.java:146) DEBUG - ---------Nickname业务人员
2016-11-17 15:28:39,898 cn.qingyun.modules.services.app.giftcoupons.GiveGiftCouponsService.giveWxCouponsRecordList(GiveGiftCouponsService.java:147) DEBUG - ---------OpAt:2016-11-16 14:24:38
2016-11-17 15:28:39,898 cn.qingyun.modules.services.app.giftcoupons.GiveGiftCouponsService.giveWxCouponsRecordList(GiveGiftCouponsService.java:146) DEBUG - ---------Nickname业务人员
2016-11-17 15:28:39,898 cn.qingyun.modules.services.app.giftcoupons.GiveGiftCouponsService.giveWxCouponsRecordList(GiveGiftCouponsService.java:147) DEBUG - ---------OpAt:2016-11-16 11:26:32
2016-11-17 15:28:39,908 cn.wizzer.common.processor.LogTimeProcessor.process(LogTimeProcessor.java:26) DEBUG - [GET ]URI=/findme/app/givegiftcoupons/givewxcouponsrecord/e252e5e93c4744c9bf645fb541ed9650 117ms
2016-11-17 15:29:10,074 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:101) DEBUG - Found mapping for [GET] path=/app/givegiftcoupons/givewxcouponsrecord/e252e5e93c4744c9bf645fb541ed9650 : GiveGiftCouponsController.giveWxCouponsrecordList(GiveGiftCouponsController.java:220)
2016-11-17 15:29:10,074 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'permission'<class cn.wizzer.common.shiro.view.Permission>
2016-11-17 15:29:10,075 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'dateUtil'<class cn.wizzer.common.util.DateUtil>
2016-11-17 15:29:10,076 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'stringUtil'<class cn.wizzer.common.util.StringUtil>
2016-11-17 15:29:10,077 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'giveGiftCouponsController'<class cn.qingyun.modules.controllers.app.giftcoupons.GiveGiftCouponsController>
2016-11-17 15:29:10,080 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM sys_token  WHERE userId=?
    |                                1 |
    |----------------------------------|
    | 37759ba503db47c59f54c59133e9e6b2 |
  For example:> "SELECT * FROM sys_token  WHERE userId='37759ba503db47c59f54c59133e9e6b2'"
2016-11-17 15:29:10,081 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM sys_token  WHERE userId=?, tables = [sys_token]
2016-11-17 15:29:10,081 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=-536617716:_:_:SELECT * FROM sys_token  WHERE userId=?:37759ba503db47c59f54c59133e9e6b2 SQL=SELECT * FROM sys_token  WHERE userId=?
2016-11-17 15:29:10,083 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:164) DEBUG - cache found key=-536617716:_:_:SELECT * FROM sys_token  WHERE userId=?:37759ba503db47c59f54c59133e9e6b2
2016-11-17 15:29:10,085 cn.qingyun.modules.services.app.auth.AuthService.auth(AuthService.java:85) DEBUG - times:100
2016-11-17 15:29:10,086 cn.wizzer.common.filter.AuthFilter.match(AuthFilter.java:38) DEBUG - status:0
2016-11-17 15:29:10,086 cn.qingyun.modules.controllers.app.giftcoupons.GiveGiftCouponsController.giveWxCouponsrecordList(GiveGiftCouponsController.java:221) DEBUG - -----key:e252e5e93c4744c9bf645fb541ed9650
2016-11-17 15:29:10,088 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM fm_givewxcoupons  WHERE customerId=? ORDER BY opAt DESC   LIMIT 0, 17 
    |                                1 |
    |----------------------------------|
    | e252e5e93c4744c9bf645fb541ed9650 |
  For example:> "SELECT * FROM fm_givewxcoupons  WHERE customerId='e252e5e93c4744c9bf645fb541ed9650' ORDER BY opAt DESC   LIMIT 0, 17 "
2016-11-17 15:29:10,088 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM fm_givewxcoupons  WHERE customerId=? ORDER BY opAt DESC   LIMIT 0, 17 , tables = [fm_givewxcoupons]
2016-11-17 15:29:10,089 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=-106671687:1:17:SELECT * FROM fm_givewxcoupons  WHERE customerId=? ORDER BY opAt DESC   LIMIT 0, 17 :e252e5e93c4744c9bf645fb541ed9650 SQL=SELECT * FROM fm_givewxcoupons  WHERE customerId=? ORDER BY opAt DESC   LIMIT 0, 17 
2016-11-17 15:29:10,091 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'authService'<class cn.qingyun.modules.services.app.auth.AuthService>
2016-11-17 15:29:10,092 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM sys_user  WHERE id=?
    |                                1 |
    |----------------------------------|
    | 37759ba503db47c59f54c59133e9e6b2 |
  For example:> "SELECT * FROM sys_user  WHERE id='37759ba503db47c59f54c59133e9e6b2'"
2016-11-17 15:29:10,093 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM sys_user  WHERE id=?, tables = [sys_user]
2016-11-17 15:29:10,093 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2 SQL=SELECT * FROM sys_user  WHERE id=?
2016-11-17 15:29:10,095 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:164) DEBUG - cache found key=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2
2016-11-17 15:29:10,096 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'authService'<class cn.qingyun.modules.services.app.auth.AuthService>
2016-11-17 15:29:10,097 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM sys_user  WHERE id=?
    |                                1 |
    |----------------------------------|
    | 37759ba503db47c59f54c59133e9e6b2 |
  For example:> "SELECT * FROM sys_user  WHERE id='37759ba503db47c59f54c59133e9e6b2'"
2016-11-17 15:29:10,098 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM sys_user  WHERE id=?, tables = [sys_user]
2016-11-17 15:29:10,098 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2 SQL=SELECT * FROM sys_user  WHERE id=?
2016-11-17 15:29:10,100 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:164) DEBUG - cache found key=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2
2016-11-17 15:29:10,100 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'authService'<class cn.qingyun.modules.services.app.auth.AuthService>
2016-11-17 15:29:10,102 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM sys_user  WHERE id=?
    |                                1 |
    |----------------------------------|
    | 37759ba503db47c59f54c59133e9e6b2 |
  For example:> "SELECT * FROM sys_user  WHERE id='37759ba503db47c59f54c59133e9e6b2'"
2016-11-17 15:29:10,103 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM sys_user  WHERE id=?, tables = [sys_user]
2016-11-17 15:29:10,104 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2 SQL=SELECT * FROM sys_user  WHERE id=?
2016-11-17 15:29:10,106 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:164) DEBUG - cache found key=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2
2016-11-17 15:29:10,107 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:164) DEBUG - cache found key=-106671687:1:17:SELECT * FROM fm_givewxcoupons  WHERE customerId=? ORDER BY opAt DESC   LIMIT 0, 17 :e252e5e93c4744c9bf645fb541ed9650
2016-11-17 15:29:10,108 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM fm_wxcoupons  WHERE id=?
    |                                1 |
    |----------------------------------|
    | 0a3259bac00e4276abc5e0cd60b28a9c |
  For example:> "SELECT * FROM fm_wxcoupons  WHERE id='0a3259bac00e4276abc5e0cd60b28a9c'"
2016-11-17 15:29:10,108 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM fm_wxcoupons  WHERE id=?, tables = [fm_wxcoupons]
2016-11-17 15:29:10,108 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=-3549610828:_:_:SELECT * FROM fm_wxcoupons  WHERE id=?:0a3259bac00e4276abc5e0cd60b28a9c SQL=SELECT * FROM fm_wxcoupons  WHERE id=?
2016-11-17 15:29:10,109 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'authService'<class cn.qingyun.modules.services.app.auth.AuthService>
2016-11-17 15:29:10,110 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM sys_user  WHERE id=?
    |                                1 |
    |----------------------------------|
    | 37759ba503db47c59f54c59133e9e6b2 |
  For example:> "SELECT * FROM sys_user  WHERE id='37759ba503db47c59f54c59133e9e6b2'"
2016-11-17 15:29:10,110 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM sys_user  WHERE id=?, tables = [sys_user]
2016-11-17 15:29:10,110 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2 SQL=SELECT * FROM sys_user  WHERE id=?
2016-11-17 15:29:10,111 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:164) DEBUG - cache found key=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2
2016-11-17 15:29:10,111 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:164) DEBUG - cache found key=-3549610828:_:_:SELECT * FROM fm_wxcoupons  WHERE id=?:0a3259bac00e4276abc5e0cd60b28a9c
2016-11-17 15:29:10,112 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM fm_wxcoupons  WHERE id=?
    |                                1 |
    |----------------------------------|
    | b0ac35a1343d4484a75a3667df72b64e |
  For example:> "SELECT * FROM fm_wxcoupons  WHERE id='b0ac35a1343d4484a75a3667df72b64e'"
2016-11-17 15:29:10,112 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM fm_wxcoupons  WHERE id=?, tables = [fm_wxcoupons]
2016-11-17 15:29:10,112 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=-3236443426:_:_:SELECT * FROM fm_wxcoupons  WHERE id=?:b0ac35a1343d4484a75a3667df72b64e SQL=SELECT * FROM fm_wxcoupons  WHERE id=?
2016-11-17 15:29:10,113 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'authService'<class cn.qingyun.modules.services.app.auth.AuthService>
2016-11-17 15:29:10,113 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM sys_user  WHERE id=?
    |                                1 |
    |----------------------------------|
    | 37759ba503db47c59f54c59133e9e6b2 |
  For example:> "SELECT * FROM sys_user  WHERE id='37759ba503db47c59f54c59133e9e6b2'"
2016-11-17 15:29:10,113 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM sys_user  WHERE id=?, tables = [sys_user]
2016-11-17 15:29:10,114 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2 SQL=SELECT * FROM sys_user  WHERE id=?
2016-11-17 15:29:10,114 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:164) DEBUG - cache found key=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2
2016-11-17 15:29:10,115 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:164) DEBUG - cache found key=-3236443426:_:_:SELECT * FROM fm_wxcoupons  WHERE id=?:b0ac35a1343d4484a75a3667df72b64e
2016-11-17 15:29:10,115 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM fm_wxcoupons  WHERE id=?
    |                                1 |
    |----------------------------------|
    | b0ac35a1343d4484a75a3667df72b64e |
  For example:> "SELECT * FROM fm_wxcoupons  WHERE id='b0ac35a1343d4484a75a3667df72b64e'"
2016-11-17 15:29:10,116 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM fm_wxcoupons  WHERE id=?, tables = [fm_wxcoupons]
2016-11-17 15:29:10,116 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=-3236443426:_:_:SELECT * FROM fm_wxcoupons  WHERE id=?:b0ac35a1343d4484a75a3667df72b64e SQL=SELECT * FROM fm_wxcoupons  WHERE id=?
2016-11-17 15:29:10,116 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'authService'<class cn.qingyun.modules.services.app.auth.AuthService>
2016-11-17 15:29:10,117 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM sys_user  WHERE id=?
    |                                1 |
    |----------------------------------|
    | 37759ba503db47c59f54c59133e9e6b2 |
  For example:> "SELECT * FROM sys_user  WHERE id='37759ba503db47c59f54c59133e9e6b2'"
2016-11-17 15:29:10,117 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) DEBUG - sql = SELECT * FROM sys_user  WHERE id=?, tables = [sys_user]
2016-11-17 15:29:10,117 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:158) DEBUG - KEY=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2 SQL=SELECT * FROM sys_user  WHERE id=?
2016-11-17 15:29:10,118 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:164) DEBUG - cache found key=376136271:_:_:SELECT * FROM sys_user  WHERE id=?:37759ba503db47c59f54c59133e9e6b2
2016-11-17 15:29:10,118 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:164) DEBUG - cache found key=-3236443426:_:_:SELECT * FROM fm_wxcoupons  WHERE id=?:b0ac35a1343d4484a75a3667df72b64e
2016-11-17 15:29:10,119 cn.qingyun.modules.services.app.giftcoupons.GiveGiftCouponsService.giveWxCouponsRecordList(GiveGiftCouponsService.java:146) DEBUG - ---------Nicknamenull
2016-11-17 15:29:10,119 cn.qingyun.modules.services.app.giftcoupons.GiveGiftCouponsService.giveWxCouponsRecordList(GiveGiftCouponsService.java:147) DEBUG - ---------OpAt:null
2016-11-17 15:29:10,119 cn.qingyun.modules.services.app.giftcoupons.GiveGiftCouponsService.giveWxCouponsRecordList(GiveGiftCouponsService.java:146) DEBUG - ---------Nicknamenull
2016-11-17 15:29:10,119 cn.qingyun.modules.services.app.giftcoupons.GiveGiftCouponsService.giveWxCouponsRecordList(GiveGiftCouponsService.java:147) DEBUG - ---------OpAt:null
2016-11-17 15:29:10,120 cn.qingyun.modules.services.app.giftcoupons.GiveGiftCouponsService.giveWxCouponsRecordList(GiveGiftCouponsService.java:146) DEBUG - ---------Nicknamenull
2016-11-17 15:29:10,120 cn.qingyun.modules.services.app.giftcoupons.GiveGiftCouponsService.giveWxCouponsRecordList(GiveGiftCouponsService.java:147) DEBUG - ---------OpAt:null
2016-11-17 15:29:10,123 cn.wizzer.common.processor.LogTimeProcessor.process(LogTimeProcessor.java:26) DEBUG - [GET ]URI=/findme/app/givegiftcoupons/givewxcouponsrecord/e252e5e93c4744c9bf645fb541ed9650 49ms

那应该是序列化的问题

贴一下pojo

@wendal

@Table("fm_givewxcoupons")
public class FM_givewxcoupons extends FMModel implements Serializable {

    @Column
    @Name
    
    @ColDefine(type = ColType.VARCHAR, width = 32)
    @Prev(els = {@EL("uuid()")})
    private String id;

    @Column
    
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String meetAddress;//相遇地点

    @Column
    
 	@ColDefine(type = ColType.VARCHAR, width = 50)
    private String customerId;

    @One(target = FM_CustomerDetailInfo.class, field = "customerId")
    private FM_CustomerDetailInfo customer;

    @Column
    
    @ColDefine(type = ColType.VARCHAR, width = 50)
    private String wxcouponsId;
    @One(target = FM_wxcoupons.class, field = "wxcouponsId")
    private FM_wxcoupons wxcoupons;

    @Column
    
    @ColDefine(type = ColType.VARCHAR, width = 30)
    private String endtime;//有效期结束时间

    @Column
    
    @ColDefine(type = ColType.VARCHAR, width = 200)
    private String remark;//说明

    public String now() {
        return  DateUtil.getDateTime();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMeetAddress() {
        return meetAddress;
    }

    public void setMeetAddress(String meetAddress) {
        this.meetAddress = meetAddress;
    }

    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    public FM_CustomerDetailInfo getCustomer() {
        return customer;
    }

    public void setCustomer(FM_CustomerDetailInfo customer) {
        this.customer = customer;
    }

    public String getWxcouponsId() {
        return wxcouponsId;
    }

    public void setWxcouponsId(String wxcouponsId) {
        this.wxcouponsId = wxcouponsId;
    }

    public FM_wxcoupons getWxcoupons() {
        return wxcoupons;
    }

    public void setWxcoupons(FM_wxcoupons wxcoupons) {
        this.wxcoupons = wxcoupons;
    }

    public String getEndtime() {
        return endtime;
    }

    public void setEndtime(String endtime) {
        this.endtime = endtime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
public class FMModel  {

    Sys_user user;

    public FMModel() {
        //context中获取参数
        ActionContext actionContext = Mvcs.getActionContext();
        if (actionContext != null) {
            HttpServletRequest request = actionContext.getRequest();
            if (request != null) {
                AuthService authService = Mvcs.ctx().getDefaultIoc().get(AuthService.class, "authService");
                String authJson = request.getHeader("auth");
                user = authService.getUserByAuth(Strings.sBlank(authJson));
            }
        }
    }

    @Column
    @Comment("操作人姓名")
    @Prev(els = @EL("$me.name()"))
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String nickname;

    @Column
    @Comment("操作人")
    @Prev(els = @EL("$me.uid()"))
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String opBy;

    @Column
    @Comment("操作时间")
    @Prev(els = @EL("$me.now()"))
    @ColDefine(type = ColType.VARCHAR,width = 32)
    private String opAt;


    public String name() {
        try {
            if (user == null) {
                Subject subject = SecurityUtils.getSubject();
                user = (Sys_user) subject.getPrincipal();
            }
            return user == null ? "" : user.getNickname();
        } catch (Exception e) {
            return "";
        }
    }

    public String uid() {
        try {
            if (user == null) {
                Subject subject = SecurityUtils.getSubject();
                user = (Sys_user) subject.getPrincipal();
            }
            return user == null ? "" : user.getId();
        } catch (Exception e) {
            return "";
        }
    }

    public String now() {
        return  DateUtil.getDateTime();
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getOpBy() {
        return opBy;
    }

    public void setOpBy(String opBy) {
        this.opBy = opBy;
    }

    public String getOpAt() {
        return opAt;
    }

    public void setOpAt(String opAt) {
        this.opAt = opAt;
    }
}

@wendal 找到问题了兽总 因为FMModel 未实现序列号加上就可以了
谢谢兽总,nutz有这么好的领先值得敬佩

添加回复
请先登陆
回到顶部