Merge pull request '标准类别,标准项目重复校验' (#2) from integrated_whb/integrated_whb_admin:dev into dev
Reviewed-on: #2dev
commit
9baa814414
|
@ -181,7 +181,6 @@ public class DictionaryController extends BaseController {
|
|||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/listSelect")
|
||||
|
@ -196,4 +195,22 @@ public class DictionaryController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/validateExist")
|
||||
@ResponseBody
|
||||
public Object validateExist() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
Integer count = dictionaryService.validateExist(pd); //列出Dictionary列表
|
||||
map.put("count", count);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,5 +62,7 @@ public interface DictionaryMapper {
|
|||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listSelect(PageData pd);
|
||||
|
||||
Integer validateExist(PageData pd);
|
||||
}
|
||||
|
||||
|
|
|
@ -72,5 +72,11 @@ public interface DictionaryService {
|
|||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listSelect(PageData pd)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
Integer validateExist(PageData pd)throws Exception;
|
||||
}
|
||||
|
||||
|
|
|
@ -150,5 +150,10 @@ public class DictionaryServiceImpl implements DictionaryService {
|
|||
public List<PageData> listSelect(PageData pd)throws Exception{
|
||||
return dictionaryMapper.listSelect(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer validateExist(PageData pd) throws Exception {
|
||||
return dictionaryMapper.validateExist(pd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -237,9 +237,9 @@
|
|||
COUNT(*)
|
||||
FROM
|
||||
<include refid="tableName"></include> f
|
||||
WHERE
|
||||
WHERE 1=1
|
||||
<if test="DICTIONARY_LEVEL != null">
|
||||
DICTIONARY_LEVEL = #{DICTIONARY_LEVEL}
|
||||
and DICTIONARY_LEVEL = #{DICTIONARY_LEVEL}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
@ -270,4 +270,22 @@
|
|||
order by f.DICTIONARY_SORT asc
|
||||
</select>
|
||||
|
||||
<!-- * 获取符合条件数,+1后作为排序使用-->
|
||||
<select id="validateExist" parameterType="pd" resultType="Integer" >
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
<include refid="tableName"></include> f
|
||||
WHERE f.ISDELETE = '0'
|
||||
<if test="DICTIONARY_LEVEL != null">
|
||||
and f.DICTIONARY_LEVEL = #{DICTIONARY_LEVEL}
|
||||
</if>
|
||||
<if test="DICTIONARY_NAME != null and DICTIONARY_NAME != ''">
|
||||
and f.DICTIONARY_NAME = #{DICTIONARY_NAME}
|
||||
</if>
|
||||
<if test="PARENT_ID != null and PARENT_ID != ''">
|
||||
and f.PARENT_ID = #{PARENT_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue