Package org.jeecgframework.core.common.model.json

Examples of org.jeecgframework.core.common.model.json.ValidForm


   * @return
   */
  @RequestMapping(params = "checkUser")
  @ResponseBody
  public ValidForm checkUser(HttpServletRequest request) {
    ValidForm v = new ValidForm();
    String userName=oConvertUtils.getString(request.getParameter("param"));
    String code=oConvertUtils.getString(request.getParameter("code"));
    List<TSUser> roles=systemService.findByProperty(TSUser.class,"userName",userName);
    if(roles.size()>0&&!code.equals(userName))
    {
      v.setInfo("用户名已存在");
      v.setStatus("n");
    }
    return v;
  }
View Full Code Here


   * @return
   */
  @RequestMapping(params = "checkTypeGroup")
  @ResponseBody
  public ValidForm checkTypeGroup(HttpServletRequest request) {
    ValidForm v = new ValidForm();
    String typegroupcode=oConvertUtils.getString(request.getParameter("param"));
    String code=oConvertUtils.getString(request.getParameter("code"));
    List<TSTypegroup> typegroups=systemService.findByProperty(TSTypegroup.class,"typegroupcode",typegroupcode);
    if(typegroups.size()>0&&!code.equals(typegroupcode))
    {
      v.setInfo("分组已存在");
      v.setStatus("n");
    }
    return v;
  }
View Full Code Here

   * @return
   */
  @RequestMapping(params = "checkType")
  @ResponseBody
  public ValidForm checkType(HttpServletRequest request) {
    ValidForm v = new ValidForm();
    String typecode=oConvertUtils.getString(request.getParameter("param"));
    String code=oConvertUtils.getString(request.getParameter("code"));
    String typeGroupCode=oConvertUtils.getString(request.getParameter("typeGroupCode"));
    StringBuilder hql = new StringBuilder("FROM ").append(TSType.class.getName()).append(" AS entity WHERE 1=1 ");
    hql.append(" AND entity.TSTypegroup.typegroupcode =  '").append(typeGroupCode).append("'");
    hql.append(" AND entity.typecode =  '").append(typecode).append("'");
    List<Object> types = this.systemService.findByQueryString(hql.toString());
    if(types.size()>0&&!code.equals(typecode))
    {
      v.setInfo("类型已存在");
      v.setStatus("n");
    }
    return v;
  }
View Full Code Here

   * @return
   */
  @RequestMapping(params = "checkRole")
  @ResponseBody
  public ValidForm checkRole(TSRole role,HttpServletRequest request,HttpServletResponse response) {
    ValidForm v = new ValidForm();
    String roleCode=oConvertUtils.getString(request.getParameter("param"));
    String code=oConvertUtils.getString(request.getParameter("code"));
    List<TSRole> roles=systemService.findByProperty(TSRole.class,"roleCode",roleCode);
    if(roles.size()>0&&!code.equals(roleCode))
    {
      v.setInfo("角色编码已存在");
      v.setStatus("n");
    }
    return v;
  }
View Full Code Here

TOP

Related Classes of org.jeecgframework.core.common.model.json.ValidForm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.