xautlx / s2jh

A Java/J2EE development framework for enterprise system based on Struts/Spring/JPA/Hibernate and jquery/bootstrap
GNU Lesser General Public License v3.0
321 stars 242 forks source link

权限控制模块里面的“代码”字段的在哪个地方做的自动生成 #33

Closed smilesman closed 10 years ago

smilesman commented 10 years ago
@MetaData(title = "代码")
@EntityAutoCode(order = 10, search = true)
private String code;

我看了三层和页面,同时也全文搜索了,都没有找到对该字段的自动生成处理,可否指教一下

xautlx commented 10 years ago

PrivilegeController的:

@Override
public void prepareCreate() {
    super.prepareCreate();
    bindingEntity.setCode("P" + RandomStringUtils.randomNumeric(6));
}