Browse Source

修改分类接口

haobing 2 years atrás
parent
commit
ce96f6f4ed

+ 4 - 4
src/main/java/cn/aiyangniu/api/controller/system/SysTypeController.java

@@ -80,10 +80,10 @@ public class SysTypeController {
                 parentId = CharacterFiltUtil.inputFilter(parentId, true);
                 typeImg = CharacterFiltUtil.inputFilter(typeImg, true);
                 reqRandom = CharacterFiltUtil.inputFilter(reqRandom, true);
-                if("".equals(typeName) || "".equals(typeCode) || "".equals(parentId) || "".equals(kind) || "".equals(reqRandom)) {
+                if("".equals(typeName) || "".equals(parentId) || "".equals(kind) || "".equals(reqRandom)) {
                     retCode = "100110070101";
                     retMsg = "对不起,您输入的信息有为空的必填项,请检查!";
-                } else if(typeName.length() > 30 || typeCode.length() > 10 || parentId.length() != 36) {
+                } else if(typeName.length() > 30 || parentId.length() != 36) {
                     retCode = "100110070102";
                     retMsg = "对不起,您输入的信息有超出字数限制的项,请检查!";
                 } else if(RandomUtil.verifySysRandom(reqRandom, sysRandom)) {
@@ -129,7 +129,7 @@ public class SysTypeController {
      * @param req 请求对象
      * @return 返回结果Json串
      */
-    @ApiOperation(value = "删除角色信息")
+    @ApiOperation(value = "删除分类信息")
     @RequestMapping(value="/delete", method= RequestMethod.POST)
     @ApiImplicitParam(name = "typeVo", value = "角色实体对象", paramType = "body", dataType="SysTypeVo", dataTypeClass = SysTypeVo.class, required = true)
     public Map<String, Object> deleteType(@RequestBody SysTypeVo typeVo, HttpServletRequest req) {
@@ -146,7 +146,7 @@ public class SysTypeController {
                 retMsg = "对不起,您没有登录或会话超时,请重新登录!";
             } else {
                 List<String> ids = typeVo.getTypeIds();
-                kind = req.getParameter("kind");
+                kind = typeVo.getKind();
                 kind = CharacterFiltUtil.inputFilter(kind, true);
                 if(ids==null ||ids.size()==0 || "".equals(kind)) {
                     retCode = "100110070201";