提交 4bd3fe79 编写于 作者: O o2null

Merge branch 'fix/内容管理去掉不必要的索引,修改全员权限规则' into 'wrdp'

[内容管理]去掉review表不必要的索引,修改全员权限规则

See merge request o2oa/o2oa!4608
...@@ -445,7 +445,7 @@ public class DocumentFactory extends AbstractFactory { ...@@ -445,7 +445,7 @@ public class DocumentFactory extends AbstractFactory {
* @throws NoSuchFieldException * @throws NoSuchFieldException
*/ */
public List<Document> listPagingWithCondition( String personName, String orderField, String orderType, QueryFilter queryFilter, Integer adjustPage, public List<Document> listPagingWithCondition( String personName, String orderField, String orderType, QueryFilter queryFilter, Integer adjustPage,
Integer adjustPageSize, Boolean isAuthor) throws Exception { Integer adjustPageSize, Boolean isAuthor, Boolean excludeAllRead) throws Exception {
EntityManager em = this.entityManagerContainer().get( Document.class ); EntityManager em = this.entityManagerContainer().get( Document.class );
CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaBuilder cb = em.getCriteriaBuilder();
EntityManager em1 = this.entityManagerContainer().get( Review.class ); EntityManager em1 = this.entityManagerContainer().get( Review.class );
...@@ -463,8 +463,12 @@ public class DocumentFactory extends AbstractFactory { ...@@ -463,8 +463,12 @@ public class DocumentFactory extends AbstractFactory {
Predicate p_permission = cb1.equal(root2.get(Review_.permissionObj), personName); Predicate p_permission = cb1.equal(root2.get(Review_.permissionObj), personName);
p_permission = cb1.and(p_permission, cb1.equal(root2.get(Review_.docId), root.get(Document_.id))); p_permission = cb1.and(p_permission, cb1.equal(root2.get(Review_.docId), root.get(Document_.id)));
subquery.where(p_permission); subquery.where(p_permission);
if(BooleanUtils.isTrue(excludeAllRead)){
p = cb.and(p, cb.exists(subquery));
}else {
Predicate orP = cb.or(cb.isTrue(root.get(Document_.isAllRead)), cb.exists(subquery)); Predicate orP = cb.or(cb.isTrue(root.get(Document_.isAllRead)), cb.exists(subquery));
p = cb.and(p, orP); p = cb.and(p, orP);
}
}else { }else {
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
List<String> unitAllList = this.business().organization().unit().listWithPersonSupNested(personName); List<String> unitAllList = this.business().organization().unit().listWithPersonSupNested(personName);
...@@ -551,7 +555,7 @@ public class DocumentFactory extends AbstractFactory { ...@@ -551,7 +555,7 @@ public class DocumentFactory extends AbstractFactory {
* @return * @return
* @throws Exception * @throws Exception
*/ */
public Long countWithCondition( String personName, QueryFilter queryFilter, Boolean isAuthor) throws Exception { public Long countWithCondition( String personName, QueryFilter queryFilter, Boolean isAuthor, Boolean excludeAllRead) throws Exception {
EntityManager em = this.entityManagerContainer().get( Document.class ); EntityManager em = this.entityManagerContainer().get( Document.class );
CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaBuilder cb = em.getCriteriaBuilder();
EntityManager em1 = this.entityManagerContainer().get( Review.class ); EntityManager em1 = this.entityManagerContainer().get( Review.class );
...@@ -568,8 +572,12 @@ public class DocumentFactory extends AbstractFactory { ...@@ -568,8 +572,12 @@ public class DocumentFactory extends AbstractFactory {
Predicate p_permission = cb1.equal(root2.get(Review_.permissionObj), personName); Predicate p_permission = cb1.equal(root2.get(Review_.permissionObj), personName);
p_permission = cb1.and(p_permission, cb1.equal(root2.get(Review_.docId), root.get(Document_.id))); p_permission = cb1.and(p_permission, cb1.equal(root2.get(Review_.docId), root.get(Document_.id)));
subquery.where(p_permission); subquery.where(p_permission);
if(BooleanUtils.isTrue(excludeAllRead)){
p = cb.and(p, cb.exists(subquery));
}else {
Predicate orP = cb.or(cb.isTrue(root.get(Document_.isAllRead)), cb.exists(subquery)); Predicate orP = cb.or(cb.isTrue(root.get(Document_.isAllRead)), cb.exists(subquery));
p = cb.and(p, orP); p = cb.and(p, orP);
}
}else { }else {
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
List<String> unitAllList = this.business().organization().unit().listWithPersonSupNested(personName); List<String> unitAllList = this.business().organization().unit().listWithPersonSupNested(personName);
......
...@@ -92,7 +92,7 @@ public class ActionQueryListWithFilterPaging extends BaseAction { ...@@ -92,7 +92,7 @@ public class ActionQueryListWithFilterPaging extends BaseAction {
if( isManager ) { if( isManager ) {
personName = null; personName = null;
} }
total = documentQueryService.countWithCondition( personName, queryFilter, false); total = documentQueryService.countWithCondition( personName, queryFilter, false, false);
} catch (Exception e) { } catch (Exception e) {
check = false; check = false;
Exception exception = new ExceptionDocumentInfoProcess(e, "系统在获取用户可查询到的文档数据条目数量时发生异常。"); Exception exception = new ExceptionDocumentInfoProcess(e, "系统在获取用户可查询到的文档数据条目数量时发生异常。");
...@@ -108,7 +108,7 @@ public class ActionQueryListWithFilterPaging extends BaseAction { ...@@ -108,7 +108,7 @@ public class ActionQueryListWithFilterPaging extends BaseAction {
if( isManager ) { if( isManager ) {
personName = null; personName = null;
} }
searchResultList = documentQueryService.listPagingWithCondition( personName, wi.getOrderField(), wi.getOrderType(), queryFilter, page, size, false); searchResultList = documentQueryService.listPagingWithCondition( personName, wi.getOrderField(), wi.getOrderType(), queryFilter, page, size, false, false);
} catch (Exception e) { } catch (Exception e) {
check = false; check = false;
Exception exception = new ExceptionDocumentInfoProcess(e, "系统在根据用户可访问的文档ID列表对文档进行分页查询时发生异常。"); Exception exception = new ExceptionDocumentInfoProcess(e, "系统在根据用户可访问的文档ID列表对文档进行分页查询时发生异常。");
......
...@@ -75,9 +75,9 @@ public class ActionQueryListWithFilterPagingAdmin extends BaseAction { ...@@ -75,9 +75,9 @@ public class ActionQueryListWithFilterPagingAdmin extends BaseAction {
} }
Long total = 0L; Long total = 0L;
if (!BooleanUtils.isTrue(wi.getJustData())){ if (!BooleanUtils.isTrue(wi.getJustData())){
total = documentQueryService.countWithCondition(personName, queryFilter, wi.getAuthor()); total = documentQueryService.countWithCondition(personName, queryFilter, wi.getAuthor(), wi.getExcludeAllRead());
} }
List<Document> searchResultList = documentQueryService.listPagingWithCondition( personName, wi.getOrderField(), wi.getOrderType(), queryFilter, page, size, wi.getAuthor()); List<Document> searchResultList = documentQueryService.listPagingWithCondition( personName, wi.getOrderField(), wi.getOrderType(), queryFilter, page, size, wi.getAuthor(), wi.getExcludeAllRead());
Wo wo = null; Wo wo = null;
for( Document document : searchResultList ) { for( Document document : searchResultList ) {
try { try {
...@@ -117,6 +117,9 @@ public class ActionQueryListWithFilterPagingAdmin extends BaseAction { ...@@ -117,6 +117,9 @@ public class ActionQueryListWithFilterPagingAdmin extends BaseAction {
@FieldDescribe( "仅返回数据不查询总数,默认false" ) @FieldDescribe( "仅返回数据不查询总数,默认false" )
private Boolean justData; private Boolean justData;
@FieldDescribe( "是否排除全员可读文档,默认false" )
private Boolean excludeAllRead;
public String getPerson() { public String getPerson() {
return person; return person;
} }
...@@ -140,6 +143,14 @@ public class ActionQueryListWithFilterPagingAdmin extends BaseAction { ...@@ -140,6 +143,14 @@ public class ActionQueryListWithFilterPagingAdmin extends BaseAction {
public void setJustData(Boolean justData) { public void setJustData(Boolean justData) {
this.justData = justData; this.justData = justData;
} }
public Boolean getExcludeAllRead() {
return excludeAllRead;
}
public void setExcludeAllRead(Boolean excludeAllRead) {
this.excludeAllRead = excludeAllRead;
}
} }
public static class Wo extends WrapOutDocumentList { public static class Wo extends WrapOutDocumentList {
......
...@@ -311,11 +311,11 @@ public class WrapOutDocumentList extends GsonPropertyObject { ...@@ -311,11 +311,11 @@ public class WrapOutDocumentList extends GsonPropertyObject {
this.isTop = isTop; this.isTop = isTop;
} }
public Boolean getAllRead() { public Boolean getIsAllRead() {
return isAllRead; return isAllRead;
} }
public void setAllRead(Boolean allRead) { public void setIsAllRead(Boolean isAllRead) {
isAllRead = allRead; this.isAllRead = isAllRead;
} }
} }
...@@ -73,7 +73,11 @@ public class ActionRefreshDocumentPermission extends BaseAction { ...@@ -73,7 +73,11 @@ public class ActionRefreshDocumentPermission extends BaseAction {
if ( ListTools.isEmpty(wi.getPermissionList())) { if ( ListTools.isEmpty(wi.getPermissionList())) {
ReviewService reviewService = new ReviewService(); ReviewService reviewService = new ReviewService();
try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) { try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
reviewService.refreshDocumentReview(emc, wi.getDocId()); boolean fullRead = reviewService.refreshDocumentReview(emc, wi.getDocId());
Document doc = emc.find( wi.getDocId(), Document.class );
emc.beginTransaction( Document.class );
doc.setIsAllRead(fullRead);
emc.commit();
} }
} else { } else {
documentPersistService.refreshDocumentPermission(document.getId(), wi.getPermissionList()); documentPersistService.refreshDocumentPermission(document.getId(), wi.getPermissionList());
......
...@@ -230,17 +230,13 @@ public class CmsBatchOperationProcessService { ...@@ -230,17 +230,13 @@ public class CmsBatchOperationProcessService {
try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
cmsBatchOperation = emc.find( id, CmsBatchOperation.class ); cmsBatchOperation = emc.find( id, CmsBatchOperation.class );
reviewService.refreshDocumentReview( emc, docId ); boolean fullRead = reviewService.refreshDocumentReview( emc, docId );
Document document = emc.find( docId, Document.class ); Document document = emc.find( docId, Document.class );
if( document != null ) { if( document != null ) {
emc.beginTransaction( Document.class ); emc.beginTransaction( Document.class );
document.setReviewed( true ); document.setReviewed( true );
if("数据".equals(document.getDocumentType()) || document.getReadPersonList().contains("所有人")){ document.setIsAllRead(fullRead);
document.setAllRead(true);
}else{
document.setAllRead(false);
}
if(StringUtils.isEmpty( document.getAppAlias())) { if(StringUtils.isEmpty( document.getAppAlias())) {
document.setAppAlias( document.getAppName() ); document.setAppAlias( document.getAppName() );
...@@ -290,17 +286,13 @@ public class CmsBatchOperationProcessService { ...@@ -290,17 +286,13 @@ public class CmsBatchOperationProcessService {
public void refreshDocumentReview(String docId ) throws Exception { public void refreshDocumentReview(String docId ) throws Exception {
logger.debug( "refreshDocumentReview {}", docId); logger.debug( "refreshDocumentReview {}", docId);
try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
reviewService.refreshDocumentReview( emc, docId ); boolean fullRead = reviewService.refreshDocumentReview( emc, docId );
Document document = emc.find( docId, Document.class ); Document document = emc.find( docId, Document.class );
if( document != null ) { if( document != null ) {
emc.beginTransaction( Document.class ); emc.beginTransaction( Document.class );
document.setReviewed( true ); document.setReviewed( true );
if("数据".equals(document.getDocumentType()) || document.getReadPersonList().contains("所有人")){ document.setIsAllRead(fullRead);
document.setAllRead(true);
}else{
document.setAllRead(false);
}
if( StringUtils.isEmpty( document.getAppAlias() )) { if( StringUtils.isEmpty( document.getAppAlias() )) {
document.setAppAlias( document.getAppName() ); document.setAppAlias( document.getAppName() );
} }
......
...@@ -342,14 +342,10 @@ public class DocumentPersistService { ...@@ -342,14 +342,10 @@ public class DocumentPersistService {
if( ListTools.isNotEmpty( documentIds )){ if( ListTools.isNotEmpty( documentIds )){
for( String documentId : documentIds ){ for( String documentId : documentIds ){
try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) { try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
reviewService.refreshDocumentReview(emc, documentId); boolean fullRead = reviewService.refreshDocumentReview(emc, documentId);
Document document = emc.find( documentId, Document.class ); Document document = emc.find( documentId, Document.class );
emc.beginTransaction( Document.class ); emc.beginTransaction( Document.class );
if(document.getReadPersonList().contains("所有人")){ document.setIsAllRead(fullRead);
document.setAllRead(true);
}else{
document.setAllRead(false);
}
emc.commit(); emc.commit();
} catch ( Exception e ) { } catch ( Exception e ) {
throw e; throw e;
......
...@@ -458,12 +458,12 @@ public class DocumentQueryService { ...@@ -458,12 +458,12 @@ public class DocumentQueryService {
* @throws Exception * @throws Exception
*/ */
public List<Document> listPagingWithCondition( String personName, String orderField, String orderType, QueryFilter queryFilter, Integer adjustPage, public List<Document> listPagingWithCondition( String personName, String orderField, String orderType, QueryFilter queryFilter, Integer adjustPage,
Integer pageSize, Boolean isAuthor) throws Exception { Integer pageSize, Boolean isAuthor, Boolean excludeAllRead) throws Exception {
if( pageSize == 0 ) { pageSize = 20; } if( pageSize == 0 ) { pageSize = 20; }
//按正常逻辑根据序列进行分页查询 //按正常逻辑根据序列进行分页查询
try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) { try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
Business business = new Business(emc); Business business = new Business(emc);
return business.getDocumentFactory().listPagingWithCondition(personName, orderField, orderType, queryFilter, adjustPage, pageSize, isAuthor); return business.getDocumentFactory().listPagingWithCondition(personName, orderField, orderType, queryFilter, adjustPage, pageSize, isAuthor, excludeAllRead);
} catch ( Exception e ) { } catch ( Exception e ) {
throw e; throw e;
} }
...@@ -476,11 +476,11 @@ public class DocumentQueryService { ...@@ -476,11 +476,11 @@ public class DocumentQueryService {
* @return * @return
* @throws Exception * @throws Exception
*/ */
public Long countWithCondition( String personName, QueryFilter queryFilter, Boolean isAuthor) throws Exception { public Long countWithCondition( String personName, QueryFilter queryFilter, Boolean isAuthor, Boolean excludeAllRead) throws Exception {
//按正常逻辑根据序列进行分页查询 //按正常逻辑根据序列进行分页查询
try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) { try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
Business business = new Business(emc); Business business = new Business(emc);
return business.getDocumentFactory().countWithCondition(personName, queryFilter, isAuthor); return business.getDocumentFactory().countWithCondition(personName, queryFilter, isAuthor, excludeAllRead);
} catch ( Exception e ) { } catch ( Exception e ) {
throw e; throw e;
} }
......
...@@ -104,11 +104,11 @@ public class ReviewService { ...@@ -104,11 +104,11 @@ public class ReviewService {
* @param docId * @param docId
* @throws Exception * @throws Exception
*/ */
public void refreshDocumentReview( EntityManagerContainer emc, String docId ) throws Exception { public boolean refreshDocumentReview( EntityManagerContainer emc, String docId ) throws Exception {
boolean fullRead = false;
Document document = emc.find( docId, Document.class ); Document document = emc.find( docId, Document.class );
if( document != null ) { if( document != null ) {
AppInfo appInfo = emc.find( document.getAppId(), AppInfo.class ); AppInfo appInfo = emc.find( document.getAppId(), AppInfo.class );
CategoryInfo categoryInfo = emc.find( document.getCategoryId(), CategoryInfo.class ); CategoryInfo categoryInfo = emc.find( document.getCategoryId(), CategoryInfo.class );
...@@ -122,6 +122,9 @@ public class ReviewService { ...@@ -122,6 +122,9 @@ public class ReviewService {
}else if( "published".equalsIgnoreCase( document.getDocStatus() ) ) { }else if( "published".equalsIgnoreCase( document.getDocStatus() ) ) {
logger.debug( "refreshDocumentReview -> refresh review for published document: " + document.getTitle() ); logger.debug( "refreshDocumentReview -> refresh review for published document: " + document.getTitle() );
List<String> persons = listPermissionPersons( appInfo, categoryInfo, document ); List<String> persons = listPermissionPersons( appInfo, categoryInfo, document );
if(persons.contains("*")){
fullRead = true;
}
//将文档新的权限与数据库中的权限进行比对,新建或者更新 //将文档新的权限与数据库中的权限进行比对,新建或者更新
logger.debug( "refreshDocumentReview -> there are "+ persons.size() +" permission in this document: " + document.getTitle() ); logger.debug( "refreshDocumentReview -> there are "+ persons.size() +" permission in this document: " + document.getTitle() );
refreshDocumentReview( emc, appInfo, categoryInfo, document, persons ); refreshDocumentReview( emc, appInfo, categoryInfo, document, persons );
...@@ -135,6 +138,7 @@ public class ReviewService { ...@@ -135,6 +138,7 @@ public class ReviewService {
}else { }else {
logger.debug( "refreshDocumentReview -> document not exists: " + docId ); logger.debug( "refreshDocumentReview -> document not exists: " + docId );
} }
return fullRead;
} }
private List<String> listPublishAndManagePersons(AppInfo appInfo, CategoryInfo categoryInfo, Document document) throws Exception { private List<String> listPublishAndManagePersons(AppInfo appInfo, CategoryInfo categoryInfo, Document document) throws Exception {
...@@ -251,6 +255,8 @@ public class ReviewService { ...@@ -251,6 +255,8 @@ public class ReviewService {
if( ListTools.isNotEmpty( document.getReadPersonList() ) ) { if( ListTools.isNotEmpty( document.getReadPersonList() ) ) {
if( !document.getReadPersonList().contains( "所有人" )) { if( !document.getReadPersonList().contains( "所有人" )) {
return true; return true;
}else{
return false;
} }
} }
if( ListTools.isNotEmpty( document.getReadUnitList() ) ) { if( ListTools.isNotEmpty( document.getReadUnitList() ) ) {
......
...@@ -241,21 +241,18 @@ public class Document extends SliceJpaObject { ...@@ -241,21 +241,18 @@ public class Document extends SliceJpaObject {
public static final String isTop_FIELDNAME = "isTop"; public static final String isTop_FIELDNAME = "isTop";
@FieldDescribe("是否置顶") @FieldDescribe("是否置顶")
@Column(name = ColumnNamePrefix + isTop_FIELDNAME) @Column(name = ColumnNamePrefix + isTop_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + isTop_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private Boolean isTop = false; private Boolean isTop = false;
public static final String isAllRead_FIELDNAME = "isAllRead"; public static final String isAllRead_FIELDNAME = "isAllRead";
@FieldDescribe("是否全员可读") @FieldDescribe("是否全员可读")
@Column(name = ColumnNamePrefix + isAllRead_FIELDNAME) @Column(name = ColumnNamePrefix + isAllRead_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + isAllRead_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private Boolean isAllRead = false; private Boolean isAllRead = false;
public static final String hasIndexPic_FIELDNAME = "hasIndexPic"; public static final String hasIndexPic_FIELDNAME = "hasIndexPic";
@FieldDescribe("是否含有首页图片") @FieldDescribe("是否含有首页图片")
@Column(name = ColumnNamePrefix + hasIndexPic_FIELDNAME) @Column(name = ColumnNamePrefix + hasIndexPic_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + hasIndexPic_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private Boolean hasIndexPic = false; private Boolean hasIndexPic = false;
...@@ -263,7 +260,6 @@ public class Document extends SliceJpaObject { ...@@ -263,7 +260,6 @@ public class Document extends SliceJpaObject {
@FieldDescribe("是否已经更新review信息.") @FieldDescribe("是否已经更新review信息.")
@Column(name = ColumnNamePrefix + reviewed_FIELDNAME) @Column(name = ColumnNamePrefix + reviewed_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
@Index(name = TABLE + IndexNameMiddle + reviewed_FIELDNAME)
private Boolean reviewed = false; private Boolean reviewed = false;
public static final String sequenceTitle_FIELDNAME = "sequenceTitle"; public static final String sequenceTitle_FIELDNAME = "sequenceTitle";
...@@ -814,12 +810,12 @@ public class Document extends SliceJpaObject { ...@@ -814,12 +810,12 @@ public class Document extends SliceJpaObject {
} }
} }
public Boolean getAllRead() { public Boolean getIsAllRead() {
return isAllRead; return isAllRead;
} }
public void setAllRead(Boolean allRead) { public void setIsAllRead(Boolean isAllRead) {
isAllRead = allRead; this.isAllRead = isAllRead;
} }
public Boolean getIsTop() { public Boolean getIsTop() {
......
...@@ -60,14 +60,12 @@ public class Review extends SliceJpaObject { ...@@ -60,14 +60,12 @@ public class Review extends SliceJpaObject {
public static final String documentType_FIELDNAME = "documentType"; public static final String documentType_FIELDNAME = "documentType";
@FieldDescribe("文档类型:信息|数据.") @FieldDescribe("文档类型:信息|数据.")
@Column(length = JpaObject.length_16B, name = ColumnNamePrefix + documentType_FIELDNAME) @Column(length = JpaObject.length_16B, name = ColumnNamePrefix + documentType_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + documentType_FIELDNAME)
@CheckPersist(allowEmpty = false) @CheckPersist(allowEmpty = false)
private String documentType; private String documentType;
public static final String appId_FIELDNAME = "appId"; public static final String appId_FIELDNAME = "appId";
@FieldDescribe("栏目ID.") @FieldDescribe("栏目ID.")
@Column(length = JpaObject.length_id, name = ColumnNamePrefix + appId_FIELDNAME) @Column(length = JpaObject.length_id, name = ColumnNamePrefix + appId_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + appId_FIELDNAME)
@CheckPersist(allowEmpty = false) @CheckPersist(allowEmpty = false)
private String appId; private String appId;
...@@ -75,7 +73,6 @@ public class Review extends SliceJpaObject { ...@@ -75,7 +73,6 @@ public class Review extends SliceJpaObject {
@FieldDescribe("栏目名称.") @FieldDescribe("栏目名称.")
@Column(length = AbstractPersistenceProperties.processPlatform_name_length, name = ColumnNamePrefix @Column(length = AbstractPersistenceProperties.processPlatform_name_length, name = ColumnNamePrefix
+ appName_FIELDNAME) + appName_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + appName_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private String appName; private String appName;
...@@ -83,14 +80,12 @@ public class Review extends SliceJpaObject { ...@@ -83,14 +80,12 @@ public class Review extends SliceJpaObject {
@FieldDescribe("栏目别名.") @FieldDescribe("栏目别名.")
@Column(length = AbstractPersistenceProperties.processPlatform_name_length, name = ColumnNamePrefix @Column(length = AbstractPersistenceProperties.processPlatform_name_length, name = ColumnNamePrefix
+ appAlias_FIELDNAME) + appAlias_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + appAlias_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private String appAlias; private String appAlias;
public static final String categoryId_FIELDNAME = "categoryId"; public static final String categoryId_FIELDNAME = "categoryId";
@FieldDescribe("分类ID.") @FieldDescribe("分类ID.")
@Column(length = JpaObject.length_id, name = ColumnNamePrefix + categoryId_FIELDNAME) @Column(length = JpaObject.length_id, name = ColumnNamePrefix + categoryId_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + categoryId_FIELDNAME)
@CheckPersist(allowEmpty = false) @CheckPersist(allowEmpty = false)
private String categoryId; private String categoryId;
...@@ -98,7 +93,6 @@ public class Review extends SliceJpaObject { ...@@ -98,7 +93,6 @@ public class Review extends SliceJpaObject {
@FieldDescribe("分类名称.") @FieldDescribe("分类名称.")
@Column(length = AbstractPersistenceProperties.processPlatform_name_length, name = ColumnNamePrefix @Column(length = AbstractPersistenceProperties.processPlatform_name_length, name = ColumnNamePrefix
+ categoryName_FIELDNAME) + categoryName_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + categoryName_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private String categoryName; private String categoryName;
...@@ -106,7 +100,6 @@ public class Review extends SliceJpaObject { ...@@ -106,7 +100,6 @@ public class Review extends SliceJpaObject {
@FieldDescribe("分类别名.") @FieldDescribe("分类别名.")
@Column(length = AbstractPersistenceProperties.processPlatform_name_length, name = ColumnNamePrefix @Column(length = AbstractPersistenceProperties.processPlatform_name_length, name = ColumnNamePrefix
+ categoryAlias_FIELDNAME) + categoryAlias_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + categoryAlias_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private String categoryAlias; private String categoryAlias;
...@@ -119,21 +112,18 @@ public class Review extends SliceJpaObject { ...@@ -119,21 +112,18 @@ public class Review extends SliceJpaObject {
public static final String docSequence_FIELDNAME = "docSequence"; public static final String docSequence_FIELDNAME = "docSequence";
@FieldDescribe("文档Sequence.") @FieldDescribe("文档Sequence.")
@Column(length = JpaObject.length_id, name = ColumnNamePrefix + docSequence_FIELDNAME) @Column(length = JpaObject.length_id, name = ColumnNamePrefix + docSequence_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + docSequence_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private String docSequence; private String docSequence;
public static final String docStatus_FIELDNAME = "docStatus"; public static final String docStatus_FIELDNAME = "docStatus";
@FieldDescribe("文档状态.") @FieldDescribe("文档状态.")
@Column(length = length_32B, name = ColumnNamePrefix + docStatus_FIELDNAME) @Column(length = length_32B, name = ColumnNamePrefix + docStatus_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + docStatus_FIELDNAME)
@CheckPersist(allowEmpty = false) @CheckPersist(allowEmpty = false)
private String docStatus; private String docStatus;
public static final String title_FIELDNAME = "title"; public static final String title_FIELDNAME = "title";
@FieldDescribe("文档标题.") @FieldDescribe("文档标题.")
@Column(length = length_255B, name = ColumnNamePrefix + title_FIELDNAME) @Column(length = length_255B, name = ColumnNamePrefix + title_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + title_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private String title; private String title;
...@@ -141,7 +131,6 @@ public class Review extends SliceJpaObject { ...@@ -141,7 +131,6 @@ public class Review extends SliceJpaObject {
@FieldDescribe("拟稿人") @FieldDescribe("拟稿人")
@Column(length = AbstractPersistenceProperties.organization_name_length, name = ColumnNamePrefix @Column(length = AbstractPersistenceProperties.organization_name_length, name = ColumnNamePrefix
+ creatorPerson_FIELDNAME) + creatorPerson_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + creatorPerson_FIELDNAME)
@CheckPersist(allowEmpty = false) @CheckPersist(allowEmpty = false)
private String creatorPerson; private String creatorPerson;
...@@ -149,7 +138,6 @@ public class Review extends SliceJpaObject { ...@@ -149,7 +138,6 @@ public class Review extends SliceJpaObject {
@FieldDescribe("创建人Identity") @FieldDescribe("创建人Identity")
@Column(length = AbstractPersistenceProperties.organization_name_length, name = ColumnNamePrefix @Column(length = AbstractPersistenceProperties.organization_name_length, name = ColumnNamePrefix
+ creatorIdentity_FIELDNAME) + creatorIdentity_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + creatorIdentity_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private String creatorIdentity; private String creatorIdentity;
...@@ -157,7 +145,6 @@ public class Review extends SliceJpaObject { ...@@ -157,7 +145,6 @@ public class Review extends SliceJpaObject {
@FieldDescribe("创建人组织") @FieldDescribe("创建人组织")
@Column(length = AbstractPersistenceProperties.organization_name_length, name = ColumnNamePrefix @Column(length = AbstractPersistenceProperties.organization_name_length, name = ColumnNamePrefix
+ creatorUnitName_FIELDNAME) + creatorUnitName_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + creatorUnitName_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private String creatorUnitName; private String creatorUnitName;
...@@ -173,7 +160,6 @@ public class Review extends SliceJpaObject { ...@@ -173,7 +160,6 @@ public class Review extends SliceJpaObject {
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
/* 结束时间不能为空,如果为空排序可能出错 */ /* 结束时间不能为空,如果为空排序可能出错 */
@Column(name = ColumnNamePrefix + docCreateTime_FIELDNAME) @Column(name = ColumnNamePrefix + docCreateTime_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + docCreateTime_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private Date docCreateTime; private Date docCreateTime;
...@@ -182,7 +168,6 @@ public class Review extends SliceJpaObject { ...@@ -182,7 +168,6 @@ public class Review extends SliceJpaObject {
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
/* 结束时间不能为空,如果为空排序可能出错 */ /* 结束时间不能为空,如果为空排序可能出错 */
@Column(name = ColumnNamePrefix + publishTime_FIELDNAME) @Column(name = ColumnNamePrefix + publishTime_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + publishTime_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private Date publishTime; private Date publishTime;
...@@ -215,7 +200,6 @@ public class Review extends SliceJpaObject { ...@@ -215,7 +200,6 @@ public class Review extends SliceJpaObject {
public static final String importBatchName_FIELDNAME = "importBatchName"; public static final String importBatchName_FIELDNAME = "importBatchName";
@FieldDescribe("文件导入的批次号:一般是分类ID+时间缀") @FieldDescribe("文件导入的批次号:一般是分类ID+时间缀")
@Column(length = JpaObject.length_128B, name = ColumnNamePrefix + importBatchName_FIELDNAME) @Column(length = JpaObject.length_128B, name = ColumnNamePrefix + importBatchName_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + importBatchName_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private String importBatchName; private String importBatchName;
...@@ -241,42 +225,36 @@ public class Review extends SliceJpaObject { ...@@ -241,42 +225,36 @@ public class Review extends SliceJpaObject {
@FieldDescribe("文档修改时间") @FieldDescribe("文档修改时间")
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
@Column(name = ColumnNamePrefix + modifyTime_FIELDNAME) @Column(name = ColumnNamePrefix + modifyTime_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + modifyTime_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private Date modifyTime; private Date modifyTime;
public static final String sequenceTitle_FIELDNAME = "sequenceTitle"; public static final String sequenceTitle_FIELDNAME = "sequenceTitle";
@FieldDescribe("用于标题排序的sequence") @FieldDescribe("用于标题排序的sequence")
@Column(length = JpaObject.length_255B, name = ColumnNamePrefix + sequenceTitle_FIELDNAME) @Column(length = JpaObject.length_255B, name = ColumnNamePrefix + sequenceTitle_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + sequenceTitle_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private String sequenceTitle = ""; private String sequenceTitle = "";
public static final String sequenceAppAlias_FIELDNAME = "sequenceAppAlias"; public static final String sequenceAppAlias_FIELDNAME = "sequenceAppAlias";
@FieldDescribe("用于栏目别名排序的sequence") @FieldDescribe("用于栏目别名排序的sequence")
@Column(length = JpaObject.length_255B, name = ColumnNamePrefix + sequenceAppAlias_FIELDNAME) @Column(length = JpaObject.length_255B, name = ColumnNamePrefix + sequenceAppAlias_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + sequenceAppAlias_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private String sequenceAppAlias = ""; private String sequenceAppAlias = "";
public static final String sequenceCategoryAlias_FIELDNAME = "sequenceCategoryAlias"; public static final String sequenceCategoryAlias_FIELDNAME = "sequenceCategoryAlias";
@FieldDescribe("用于分类别名排序的sequence") @FieldDescribe("用于分类别名排序的sequence")
@Column(length = JpaObject.length_255B, name = ColumnNamePrefix + sequenceCategoryAlias_FIELDNAME) @Column(length = JpaObject.length_255B, name = ColumnNamePrefix + sequenceCategoryAlias_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + sequenceCategoryAlias_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private String sequenceCategoryAlias = ""; private String sequenceCategoryAlias = "";
public static final String sequenceCreatorPerson_FIELDNAME = "sequenceCreatorPerson"; public static final String sequenceCreatorPerson_FIELDNAME = "sequenceCreatorPerson";
@FieldDescribe("用于创建者排序的sequence") @FieldDescribe("用于创建者排序的sequence")
@Column(length = JpaObject.length_255B, name = ColumnNamePrefix + sequenceCreatorPerson_FIELDNAME) @Column(length = JpaObject.length_255B, name = ColumnNamePrefix + sequenceCreatorPerson_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + sequenceCreatorPerson_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private String sequenceCreatorPerson = ""; private String sequenceCreatorPerson = "";
public static final String sequenceCreatorUnitName_FIELDNAME = "sequenceCreatorUnitName"; public static final String sequenceCreatorUnitName_FIELDNAME = "sequenceCreatorUnitName";
@FieldDescribe("用于创建者组织排序的sequence") @FieldDescribe("用于创建者组织排序的sequence")
@Column(length = JpaObject.length_255B, name = ColumnNamePrefix + sequenceCreatorUnitName_FIELDNAME) @Column(length = JpaObject.length_255B, name = ColumnNamePrefix + sequenceCreatorUnitName_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + sequenceCreatorUnitName_FIELDNAME)
@CheckPersist(allowEmpty = true) @CheckPersist(allowEmpty = true)
private String sequenceCreatorUnitName = ""; private String sequenceCreatorUnitName = "";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册