| | |
| | | import com.moon.server.entity.all.ResponseMsg; |
| | | import com.moon.server.entity.sys.ResEntity; |
| | | import com.moon.server.entity.sys.UserEntity; |
| | | import com.moon.server.service.all.PermsService; |
| | | import com.moon.server.service.all.UploadAttachService; |
| | | import com.moon.server.service.sys.ResService; |
| | | import com.moon.server.service.sys.TokenService; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | |
| | | @RestController |
| | | @RequestMapping("/res") |
| | | public class ResController extends BaseController { |
| | | @Autowired |
| | | @Resource |
| | | ResService resService; |
| | | |
| | | @Autowired |
| | | @Resource |
| | | TokenService tokenService; |
| | | |
| | | @Autowired |
| | | @Resource |
| | | PermsService permsService; |
| | | |
| | | @Resource |
| | | UploadAttachService uploadAttachService; |
| | | |
| | | private final static String TAB_NAME = "lf.sys_res"; |
| | |
| | | } |
| | | |
| | | int count = resService.insert(entity); |
| | | if (count > 0) { |
| | | permsService.clearResCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | |
| | | int count = resService.inserts(list); |
| | | if (count > 0) { |
| | | permsService.clearResCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | public ResponseMsg<Integer> delete(int id) { |
| | | try { |
| | | int count = resService.delete(id); |
| | | if (count > 0) { |
| | | permsService.clearResCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | |
| | | int count = resService.deletes(ids); |
| | | if (count > 0) { |
| | | permsService.clearResCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | |
| | | int count = resService.update(entity); |
| | | if (count > 0) { |
| | | permsService.clearResCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | |
| | | int count = resService.updates(list); |
| | | if (count > 0) { |
| | | permsService.clearResCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |