Commit fed83b06 by wenyang

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

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