POJO对象 Boolean 类型 字段名isXXX格式的 怎么绑定不上了呢?
@Param("..") Group qygroup) 参数获取方式!原来是可以的
8 回复
我线上有个版本可以对这个 isPublic 赋值 但是今天测试不行
代码
/**
* 文件名:Qy_group.java
*
* 版本信息:
* 日期:2016年8月14日
* Copyright 足下 Corporation 2016
* 版权所有
*
*/
package cn.wizzer.modules.back.quanyou.models;
import cn.wizzer.common.base.Model;
import cn.wizzer.modules.back.sys.models.Sys_dict;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
import org.nutz.lang.util.NutMap;
import java.io.Serializable;
import java.util.Date;
/**
*
* 项目名称:nutzwk
* 类名称:Qy_group
* 类描述:数据库对象
* 创建人:zfc
* 创建时间:2016年8月14日 下午11:42:53
* 修改人:zfc
* 修改时间:2016年8月14日 下午11:42:53
* 修改备注:
* @version
*
*/
@Table("qy_group")
@Data
@TableIndexes({@Index(name = "INDEX_GROUP_NAME_ID", fields = {"groupNameId"}, unique = true)})
public class Group extends Model implements Serializable{
private static final long serialVersionUID = 1L;
@Name
@Comment("id")
@ColDefine(type = ColType.VARCHAR, width = 32)
@Prev(els = {@EL("uuid()")})
private String id;
@Column
@Comment("圈号")
@ColDefine(type = ColType.INT,width=8)
@Prev(@SQL("SELECT IFNULL(max(groupId),100000)+1 FROM qy_group"))
private Integer groupId;
@Column
@Comment("圈子名称")
@ColDefine(type = ColType.VARCHAR, width = 128)
private String groupName;
@Column
@Comment("标签分类")
@ColDefine(type = ColType.VARCHAR,width=32)
private String sysDictId;
@One(target = Sys_dict.class, field = "sysDictId")
private Sys_dict sysDict;
@Column
@Comment("圈子标签")
@ColDefine(type = ColType.VARCHAR, width = 128)
private String groupTags;
/**
* 圈子ID 类似微信
* */
@Column
@Comment("圈子字符ID")
@ColDefine(type = ColType.VARCHAR, width = 128)
private String groupNameId;
@Column(value = "isPublic")
@Comment("是否公开")
@ColDefine(type = ColType.BOOLEAN)
private Boolean publicOrHidden;
/**
* 圈主关闭收费动态后,禁止发布带有隐藏的主题 默认开启
* */
@Column
@Comment("允许添加隐藏内容")
@Default("1")
@ColDefine(type = ColType.BOOLEAN)
private Boolean openHiddenTopic;
@Column
@Comment("是否开启竞选模式")
@ColDefine(type = ColType.BOOLEAN)
private Boolean openCampaign;
@Column
@Comment("是否允许成员邀请")
@ColDefine(type = ColType.BOOLEAN)
private Boolean allowMemberInvite;
@Column
@Comment("加入是否审核")
@ColDefine(type = ColType.BOOLEAN)
private Boolean joinValidate;
@Column
@Comment("圈子介绍")
@Default("")
@ColDefine(type = ColType.VARCHAR, width = 512)
private String groupDesc;
@Column
@Comment("圈子头像")
@ColDefine(type = ColType.VARCHAR, width = 128)
private String groupImg;
@Column
@Comment("圈子封面")
@ColDefine(type = ColType.VARCHAR, width = 128)
private String groupIndexImg;
@Column
@Comment("圈地点")
@ColDefine(type = ColType.VARCHAR, width = 128)
private String groupAddress;
@Column
@Comment("圈主")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String groupCreater;
@Readonly
private NutMap quanzhu;
@Column
@Comment("创建时间")
@ColDefine(type = ColType.DATETIME)
private Date createdAt;
@Column
@Comment("聊天室 id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String chatroomId;
/**
* 不同的模板 有不同的策略
* */
@Column
@Comment("分享模板id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String inviteTemplateId;
/**
* 加入条件 是否需要各种认证
* */
@Column
@Comment("是否实名")
@Default("0")
@ColDefine(type = ColType.BOOLEAN)
private Boolean authId;
@Column
@Comment("是否工作认证")
@Default("0")
@ColDefine(type = ColType.BOOLEAN)
private Boolean authWork;
@Column
@Comment("是否语音")
@Default("0")
@ColDefine(type = ColType.BOOLEAN)
private Boolean authVoice;
@Column
@Comment("是否视频")
@Default("0")
@ColDefine(type = ColType.BOOLEAN)
private Boolean authVideo;
@Column
@Comment("是否车辆认证")
@Default("0")
@ColDefine(type = ColType.BOOLEAN)
private Boolean authCar;
@Column
@Comment("是否手机认证")
@Default("0")
@ColDefine(type = ColType.BOOLEAN)
private Boolean authMobile;
@Column
@Comment("芝麻最低分")
@Default("0")
@ColDefine(type = ColType.INT)
private Integer authZhima;
/**
* vip设置
* */
@Column
@Comment("圈子月费用")
@Default("0.00")
@ColDefine(type = ColType.FLOAT ,width=32)
private Float mouthPrice;
@Column
@Comment("圈子季度费用")
@Default("0.00")
@ColDefine(type = ColType.FLOAT ,width=32)
private Float qtOfyearPrice;
@Column
@Comment("圈子年费")
@Default("0.00")
@ColDefine(type = ColType.FLOAT ,width=32)
private Float yearPrice;
@Column
@Comment("永久期限")
@Default("0.00")
@ColDefine(type = ColType.FLOAT ,width=32)
private Float foreverPrice;
public Group() {
}
}
这个代码有 isPublic 上面回复是我修改后的
/**
* 文件名:Qy_group.java
*
* 版本信息:
* 日期:2016年8月14日
* Copyright 足下 Corporation 2016
* 版权所有
*
*/
package cn.wizzer.modules.back.quanyou.models;
import cn.wizzer.common.base.Model;
import cn.wizzer.modules.back.sys.models.Sys_dict;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
import org.nutz.lang.util.NutMap;
import java.io.Serializable;
import java.util.Date;
/**
*
* 项目名称:nutzwk
* 类名称:Qy_group
* 类描述:数据库对象
* 创建人:zfc
* 创建时间:2016年8月14日 下午11:42:53
* 修改人:zfc
* 修改时间:2016年8月14日 下午11:42:53
* 修改备注:
* @version
*
*/
@Table("qy_group")
@Data
@TableIndexes({@Index(name = "INDEX_GROUP_NAME_ID", fields = {"groupNameId"}, unique = true)})
public class Group extends Model implements Serializable{
private static final long serialVersionUID = 1L;
@Name
@Comment("id")
@ColDefine(type = ColType.VARCHAR, width = 32)
@Prev(els = {@EL("uuid()")})
private String id;
@Column
@Comment("圈号")
@ColDefine(type = ColType.INT,width=8)
@Prev(@SQL("SELECT IFNULL(max(groupId),100000)+1 FROM qy_group"))
private Integer groupId;
@Column
@Comment("圈子名称")
@ColDefine(type = ColType.VARCHAR, width = 128)
private String groupName;
@Column
@Comment("标签分类")
@ColDefine(type = ColType.VARCHAR,width=32)
private String sysDictId;
@One(target = Sys_dict.class, field = "sysDictId")
private Sys_dict sysDict;
@Column
@Comment("圈子标签")
@ColDefine(type = ColType.VARCHAR, width = 128)
private String groupTags;
/**
* 圈子ID 类似微信
* */
@Column
@Comment("圈子字符ID")
@ColDefine(type = ColType.VARCHAR, width = 128)
private String groupNameId;
@Column
@Comment("是否公开")
@ColDefine(type = ColType.BOOLEAN)
private Boolean isPublic;
/**
* 圈主关闭收费动态后,禁止发布带有隐藏的主题 默认开启
* */
@Column
@Comment("允许添加隐藏内容")
@Default("1")
@ColDefine(type = ColType.BOOLEAN)
private Boolean openHiddenTopic;
@Column
@Comment("是否开启竞选模式")
@ColDefine(type = ColType.BOOLEAN)
private Boolean isCampaign;
@Column
@Comment("是否允许成员邀请")
@ColDefine(type = ColType.BOOLEAN)
private Boolean isInvite;
@Column
@Comment("加入是否审核")
@ColDefine(type = ColType.BOOLEAN)
private Boolean joinValidate;
@Column
@Comment("圈子介绍")
@Default("")
@ColDefine(type = ColType.VARCHAR, width = 512)
private String groupDesc;
@Column
@Comment("圈子头像")
@ColDefine(type = ColType.VARCHAR, width = 128)
private String groupImg;
@Column
@Comment("圈子封面")
@ColDefine(type = ColType.VARCHAR, width = 128)
private String groupIndexImg;
@Column
@Comment("圈地点")
@ColDefine(type = ColType.VARCHAR, width = 128)
private String groupAddress;
@Column
@Comment("圈主")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String groupCreater;
@Readonly
private NutMap quanzhu;
@Column
@Comment("创建时间")
@ColDefine(type = ColType.DATETIME)
private Date createdAt;
@Column
@Comment("聊天室 id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String chatroomId;
/**
* 不同的模板 有不同的策略
* */
@Column
@Comment("分享模板id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String inviteTemplateId;
/**
* 加入条件 是否需要各种认证
* */
@Column
@Comment("是否实名")
@Default("0")
@ColDefine(type = ColType.BOOLEAN)
private Boolean authId;
@Column
@Comment("是否工作认证")
@Default("0")
@ColDefine(type = ColType.BOOLEAN)
private Boolean authWork;
@Column
@Comment("是否语音")
@Default("0")
@ColDefine(type = ColType.BOOLEAN)
private Boolean authVoice;
@Column
@Comment("是否视频")
@Default("0")
@ColDefine(type = ColType.BOOLEAN)
private Boolean authVideo;
@Column
@Comment("是否车辆认证")
@Default("0")
@ColDefine(type = ColType.BOOLEAN)
private Boolean authCar;
@Column
@Comment("是否手机认证")
@Default("0")
@ColDefine(type = ColType.BOOLEAN)
private Boolean authMobile;
@Column
@Comment("芝麻最低分")
@Default("0")
@ColDefine(type = ColType.INT)
private Integer authZhima;
/**
* vip设置
* */
@Column
@Comment("圈子月费用")
@Default("0.00")
@ColDefine(type = ColType.FLOAT ,width=32)
private Float mouthPrice;
@Column
@Comment("圈子季度费用")
@Default("0.00")
@ColDefine(type = ColType.FLOAT ,width=32)
private Float qtOfyearPrice;
@Column
@Comment("圈子年费")
@Default("0.00")
@ColDefine(type = ColType.FLOAT ,width=32)
private Float yearPrice;
@Column
@Comment("永久期限")
@Default("0.00")
@ColDefine(type = ColType.FLOAT ,width=32)
private Float foreverPrice;
public Group() {
}
}
@Wizzercn 没有的 ! 有可能是@Data注解问题
添加回复
请先登陆