| | |
| | | package com.zy.common.web; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | |
| | | import com.core.common.Cools; |
| | | import com.core.controller.AbstractBaseController; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.Tag; |
| | | import com.zy.asrs.service.TagService; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | protected HttpServletRequest request; |
| | | @Autowired |
| | | private UserService userService; |
| | | @Autowired |
| | | private TagService tagService; |
| | | |
| | | protected Long getUserId(){ |
| | | return Long.parseLong(String.valueOf(request.getAttribute("userId"))); |
| | |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | protected Tag getOriginTag(){ |
| | | return tagService.getTop(); |
| | | } |
| | | |
| | | /** |
| | |
| | | wrapper.like(columns.get(i), condition); |
| | | } |
| | | } |
| | | |
| | | public static boolean isJSON(String str) { |
| | | if (Cools.isEmpty(str)) { |
| | | return false; |
| | | } else { |
| | | try { |
| | | JSON.parse(str); |
| | | return true; |
| | | } catch (Exception e) { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | } |