Commit fed83b06 by wenyang

标签库新增根据标签ID查询标签信息

parent 8395e03e
......@@ -3,6 +3,7 @@ package com.yd.api.agms.service.impl;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -55,6 +56,17 @@ public class AgmsTagServiceImpl implements AgmsTagService {
responseVO.setCommonResult(commonResult);
return responseVO;
}
if(!CommonUtil.isNullOrZero(requestVO.getConfigLevel()) && "1".equals(requestVO.getConfigLevel().toString())
&& !CommonUtil.isNullOrZero(requestVO.getTagType())){
List<MdTagNew> mdTagNewList= mdTagNewDALService.selectByConfigLevelAndtagType(requestVO.getConfigLevel(), requestVO.getTagType());
if(mdTagNewList != null && mdTagNewList.size() > 0){
commonResult.setSuccess(false);
commonResult.setMessage(ZHBErrorConfig.getErrorInfo("830037"));
responseVO.setCommonResult(commonResult);
return responseVO;
}
}
MdTagNew mdTagNew = new MdTagNew();
BeanUtils.copyProperties(requestVO,mdTagNew);
......
......@@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yd.api.metadata.service.MetadataService;
import com.yd.api.metadata.vo.TagQueryBYIDRequestVO;
import com.yd.api.metadata.vo.TagQueryRequestVO;
import com.yd.api.metadata.vo.TagQueryResponseVO;
import com.yd.api.metadata.vo.TagViewQueryRequestVO;
......@@ -36,6 +37,20 @@ public class MetadataController {
result.addResult(responseVO);
return result;
}
/**
* 根据标签ID查询标签信息
* @param requestVO
* @return TagQueryBYIDRequestVO
*/
@RequestMapping("/tagQueryById")
public Object tagQueryById(@RequestBody TagQueryBYIDRequestVO requestVO){
JsonResult result = new JsonResult();
TagQueryResponseVO responseVO = metadataService.tagQueryBYIDRequestVO(requestVO);
result.setData(responseVO);
result.addResult(responseVO);
return result;
}
/**
* 前端显示标签合集查询
......
package com.yd.api.metadata.service;
import com.yd.api.metadata.vo.TagQueryBYIDRequestVO;
import com.yd.api.metadata.vo.TagQueryRequestVO;
import com.yd.api.metadata.vo.TagQueryResponseVO;
import com.yd.api.metadata.vo.TagViewQueryRequestVO;
......@@ -14,6 +15,13 @@ public interface MetadataService {
TagQueryResponseVO tagQuery(TagQueryRequestVO requestVO);
/**
* 根据标签ID查询标签信息
* @param requestVO
* @return TagQueryBYIDRequestVO
*/
TagQueryResponseVO tagQueryBYIDRequestVO(TagQueryBYIDRequestVO requestVO);
/**
* 前端显示标签合集查询
* @param TagViewQueryRequestVO requestVO
* @return TagViewQueryResponseVO
......
......@@ -18,9 +18,9 @@ public class TagViewQueryInfo {
private Integer isActive;// 1=active 2=inactive
private String remark;//备注
private String createdAt;
private Long createdBy;
private String createdBy;
private String updatedAt;
private Long updatedBy;
private String updatedBy;
public List<TagViewQueryInfo> tagViewQueryInfos;
......@@ -181,14 +181,14 @@ public class TagViewQueryInfo {
/**
* @return the createdBy
*/
public Long getCreatedBy() {
public String getCreatedBy() {
return createdBy;
}
/**
* @param createdBy the createdBy to set
*/
public void setCreatedBy(Long createdBy) {
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
......@@ -209,14 +209,14 @@ public class TagViewQueryInfo {
/**
* @return the updatedBy
*/
public Long getUpdatedBy() {
public String getUpdatedBy() {
return updatedBy;
}
/**
* @param updatedBy the updatedBy to set
*/
public void setUpdatedBy(Long updatedBy) {
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
......
......@@ -6,7 +6,7 @@ package com.yd.api.metadata.vo;
*/
public class TagViewQueryRequestVO {
private String tagViewType; //标签显示类别(1=12宫格; 2=左侧热榜列表; 3=右上角筛选)
private String taglevel;//标签级别(1=一级; 2=二级; 3=三级)
private String tagLevel;//标签级别(1=一级; 2=二级; 3=三级)
private Long upperTagViewId;//上级标签
private String tagName;//标签名称
private Integer isActive;// 1=active 2=inactive
......@@ -26,17 +26,17 @@ public class TagViewQueryRequestVO {
}
/**
* @return the taglevel
* @return the tagLevel
*/
public String getTaglevel() {
return taglevel;
public String getTagLevel() {
return tagLevel;
}
/**
* @param taglevel the taglevel to set
* @param tagLevel the tagLevel to set
*/
public void setTaglevel(String taglevel) {
this.taglevel = taglevel;
public void setTagLevel(String tagLevel) {
this.tagLevel = tagLevel;
}
/**
......@@ -85,7 +85,7 @@ public class TagViewQueryRequestVO {
public String toString() {
return "MdTagView{" +
", tagViewType='" + tagViewType + '\'' +
", taglevel='" + taglevel + '\'' +
", tagLevel='" + tagLevel + '\'' +
", upperTagViewId='" + upperTagViewId + '\'' +
", tagName='" + tagName + '\'' +
", isActive=" + isActive +
......
......@@ -24,4 +24,6 @@ public interface MdTagNewMapper {
int batchInsert(@Param("list") List<MdTagNew> list);
List<MdTagNew> selectByIsActive(@Param("isActive")Long isActive,@Param("configLevel")Long configLevel,@Param("upperTagId")Long upperTagId,@Param("tagName")String tagName,@Param("tagType")Long tagType);
List<MdTagNew> selectByConfigLevelAndtagType(@Param("configLevel")Long configLevel,@Param("tagType")Long tagType);
}
\ No newline at end of file
......@@ -22,5 +22,6 @@ public interface UserMapper {
List<AclUser> findByIds(@Param("userIdList") List<Long> userIdList);
String selectNamesByMobileNos(@Param("list")List<String> mobileNoList);
List<AclUser> findAll();
}
\ No newline at end of file
......@@ -15,4 +15,6 @@ public interface MdTagNewDALService {
void updateByPrimaryKeySelective(MdTagNew mdTagNew);
MdTagNew selectByPrimaryKey(Long id);
List<MdTagNew> selectByConfigLevelAndtagType(Long configLevel, Long tagType);
}
......@@ -39,4 +39,10 @@ public class MdTagNewDALServiceImpl implements MdTagNewDALService {
return mapper.selectByPrimaryKey(id);
}
@Override
public List<MdTagNew> selectByConfigLevelAndtagType(Long configLevel, Long tagType) {
return mapper.selectByConfigLevelAndtagType(configLevel, tagType);
}
}
......@@ -22,4 +22,6 @@ public interface AclUserDALService {
List<AclUser> findByIds(List<Long> userIdList);
String selectNamesByMobileNos(String appointedApprovePractitioners);
List<AclUser> findAll();
}
......@@ -62,4 +62,9 @@ public class AclUserDALServiceImpl implements AclUserDALService {
public int updateByPrimaryKey(AclUser record) {
return aclUserMapper.updateByPrimaryKey(record);
}
@Override
public List<AclUser> findAll() {
return aclUserMapper.findAll();
}
}
......@@ -50,4 +50,5 @@
830033=上级显示标签的标签显示类别与保存标签的显示类别不一致!
830034=保存标签的标签级别与上级显示标签的标签级别不能相隔多级!
830035=根据基础标签ID查找不到有效的基础标签!
830036=标签名称有值时标签级别不能为空!
\ No newline at end of file
830036=标签名称有值时标签级别不能为空!
830037=该标签类别已经有一级标签!
\ No newline at end of file
......@@ -315,4 +315,11 @@
</if>
</where>
</select>
<select id="selectByConfigLevelAndtagType" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_md_tag_new where is_active = 1 and config_level = #{configLevel,jdbcType=BIGINT} and tag_type = #{tagType,jdbcType=BIGINT}
</select>
</mapper>
\ No newline at end of file
......@@ -298,4 +298,10 @@
#{item,jdbcType=VARCHAR}
</foreach>
</select>
<select id="findAll" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_user
</select>
</mapper>
\ No newline at end of file
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