Commit 9eac7750 by wenyang

标签库增加上级标签名称

parent 372e7fc0
......@@ -94,7 +94,7 @@ public class AgmsTagServiceImpl implements AgmsTagService {
commonResult.setMessage(ZHBErrorConfig.getErrorInfo("830027"));
return;
}
if (CommonUtil.isNullOrZero(requestVO.getLoginId())){
if (requestVO.getLoginId() == null){
String[] params = {"loginId"};
commonResult.setSuccess(false);
commonResult.setMessage(ZHBErrorConfig.getErrorInfo("610001", params));
......@@ -113,7 +113,7 @@ public class AgmsTagServiceImpl implements AgmsTagService {
commonResult.setMessage(ZHBErrorConfig.getErrorInfo("610001", params));
return;
}
if (CommonUtil.isNullOrZero(requestVO.getIsActive())){
if (requestVO.getIsActive() == null){
commonResult.setSuccess(false);
String[] params = {"isActive"};
commonResult.setMessage(ZHBErrorConfig.getErrorInfo("610001", params));
......@@ -219,9 +219,9 @@ public class AgmsTagServiceImpl implements AgmsTagService {
return;
}
if (CommonUtil.isNullOrZero(requestVO.getTagId())){
commonResult.setSuccess(false);
commonResult.setMessage(ZHBErrorConfig.getErrorInfo("830030"));
return;
// commonResult.setSuccess(false);
// commonResult.setMessage(ZHBErrorConfig.getErrorInfo("830030"));
// return;
}else{
MdTagNew mdTagNew = mdTagNewDALService.selectByPrimaryKey(requestVO.getTagId());
if(!(mdTagNew != null && !CommonUtil.isNullOrZero(mdTagNew.getIsActive()) && mdTagNew.getIsActive() == 1)){
......
......@@ -141,6 +141,8 @@ public class MetadataServiceImpl implements MetadataService {
List<MdTagNew> mdTagNewAddList,
List<MdTagNew> objectListSelect,
List<TagQueryInfo> tagQueryInfos,Map<Long,String> userMap) {
BeanPropertyValueEqualsPredicate predicateClause;
List<MdTagNew> upperMdTagNew;
for (MdTagNew mdTagNew : objectListSelect) {
Long id = mdTagNew.getId();
TagQueryInfo tagQueryInfo = new TagQueryInfo();
......@@ -151,7 +153,12 @@ public class MetadataServiceImpl implements MetadataService {
tagQueryInfo.setUpdatedBy(userMap.get(mdTagNew.getCreatedBy()));
tagQueryInfo.setUpdatedAt(CommonUtil.dateParseString(mdTagNew.getUpdatedAt(),"yyyy-MM-dd HH:mm:ss"));
}
BeanPropertyValueEqualsPredicate predicateClause = new BeanPropertyValueEqualsPredicate( "upperTagId", id);
predicateClause = new BeanPropertyValueEqualsPredicate("id", tagQueryInfo.getUpperTagId());
upperMdTagNew = (List<MdTagNew>) CollectionUtils.select(mdTagNewList, predicateClause);
if(upperMdTagNew != null && upperMdTagNew.size() > 0){
tagQueryInfo.setUpperTagName(upperMdTagNew.get(0).getTagName());
}
predicateClause = new BeanPropertyValueEqualsPredicate("upperTagId", id);
List<MdTagNew> mdTagNewListSelect= (List<MdTagNew>) CollectionUtils.select(mdTagNewList, predicateClause);
if (mdTagNewListSelect.isEmpty()){
tagQueryInfos.add(tagQueryInfo);
......@@ -322,6 +329,8 @@ public class MetadataServiceImpl implements MetadataService {
List<MdTagView> mdTagViewAddList,
List<MdTagView> objectListSelect,
List<TagViewQueryInfo> tagViewQueryInfos,Map<Long,String> userMap) {
BeanPropertyValueEqualsPredicate predicateClause;
List<MdTagView> upperMdTagView;
for (MdTagView mdTagView : objectListSelect) {
Long id = mdTagView.getId();
TagViewQueryInfo tagViewQueryInfo = new TagViewQueryInfo();
......@@ -332,7 +341,14 @@ public class MetadataServiceImpl implements MetadataService {
tagViewQueryInfo.setUpdatedBy(userMap.get(mdTagView.getCreatedBy()));
tagViewQueryInfo.setUpdatedAt(CommonUtil.dateParseString(mdTagView.getUpdatedAt(),"yyyy-MM-dd HH:mm:ss"));
}
BeanPropertyValueEqualsPredicate predicateClause = new BeanPropertyValueEqualsPredicate( "upperTagViewId", id);
predicateClause = new BeanPropertyValueEqualsPredicate("id", tagViewQueryInfo.getUpperTagViewId());
upperMdTagView = (List<MdTagView>) CollectionUtils.select(mdTagViewList, predicateClause);
if(upperMdTagView != null && upperMdTagView.size() > 0){
tagViewQueryInfo.setUpperTagViewName(upperMdTagView.get(0).getTagName());
}
predicateClause = new BeanPropertyValueEqualsPredicate( "upperTagViewId", id);
List<MdTagView> mdTagNewListSelect = (List<MdTagView>) CollectionUtils.select(mdTagViewList, predicateClause);
if (mdTagNewListSelect.isEmpty()){
tagViewQueryInfos.add(tagViewQueryInfo);
......
......@@ -16,6 +16,8 @@ public class TagQueryInfo {
private String tagName;
private String upperTagName;
private Long tagType;//标签类别
private Integer isActive;
......@@ -103,6 +105,20 @@ public class TagQueryInfo {
}
/**
* @return the upperTagName
*/
public String getUpperTagName() {
return upperTagName;
}
/**
* @param upperTagName the upperTagName to set
*/
public void setUpperTagName(String upperTagName) {
this.upperTagName = upperTagName;
}
/**
* @return the tagType
*/
public Long getTagType() {
......@@ -231,6 +247,7 @@ public class TagQueryInfo {
", configLevel=" + configLevel +
", upperTagId=" + upperTagId +
", tagName='" + tagName + '\'' +
", upperTagName='" + upperTagName + '\'' +
", tagType='" + tagType + '\'' +
", isActive=" + isActive +
", createdAt='" + createdAt + '\'' +
......
......@@ -13,6 +13,7 @@ public class TagViewQueryInfo {
private String tagName;//标签名称
private String tagLevel;// 标签级别(1=一级标签;2=二级标签;3=三级标签,以此类推)
private Long upperTagViewId;//上级前端显示标签ID
private String upperTagViewName;//上级前端显示标签名称
private String displayImage;// UI上显示图片
private Integer displayOrder;//UI上layout优先级
private Integer isActive;// 1=active 2=inactive
......@@ -109,6 +110,20 @@ public class TagViewQueryInfo {
}
/**
* @return the upperTagViewName
*/
public String getUpperTagViewName() {
return upperTagViewName;
}
/**
* @param upperTagViewName the upperTagViewName to set
*/
public void setUpperTagViewName(String upperTagViewName) {
this.upperTagViewName = upperTagViewName;
}
/**
* @return the displayImage
*/
public String getDisplayImage() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment