| | |
| | | package com.lf.server.controller.all; |
| | | |
| | | import com.lf.server.aspect.LogAspect; |
| | | import com.lf.server.aspect.SysLog; |
| | | import com.lf.server.config.PropertiesConfig; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.logging.Log; |
| | | import org.apache.commons.logging.LogFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | |
| | | |
| | | @Autowired |
| | | PropertiesConfig propertiesConfig; |
| | | |
| | | private static final Log log = LogFactory.getLog(SignController.class); |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "跳转é¦é¡µ") |
| | |
| | | } |
| | | } |
| | | } catch (Exception ex) { |
| | | // |
| | | log.error(ex.getMessage() + ex.getStackTrace() + "\n"); |
| | | } |
| | | |
| | | return mv; |
| | |
| | | mv.setViewName("monitor"); |
| | | } |
| | | } catch (Exception ex) { |
| | | // |
| | | log.error(ex.getMessage() + ex.getStackTrace() + "\n"); |
| | | } |
| | | |
| | | return mv; |
| | |
| | | package com.lf.server.controller.data; |
| | | |
| | | |
| | | import com.lf.server.aspect.SysLog; |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.data.DictEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.service.data.DictService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class DictController extends BaseController { |
| | | @Autowired |
| | | DictService dictService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "dictEntity", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.data.DictEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.data.DictEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertDict", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertDict(@RequestBody DictEntity dictEntity) { |
| | | public ResponseMsg<Integer> insertDict(@RequestBody DictEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = dictService.insertDict(dictEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = dictService.insertDict(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥å¤æ¡åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "dictEntity", value = "åå
¸å®ä½ç±»éå", dataType = "List<DictEntity>", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "list", value = "åå
¸å®ä½ç±»éå", dataType = "List<DictEntity>", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertDicts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertDicts(@RequestBody List<DictEntity> dictEntity) { |
| | | public ResponseMsg<Integer> insertDicts(@RequestBody List<DictEntity> list, HttpServletRequest req) { |
| | | try { |
| | | int count = dictService.insertDicts(dictEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (DictEntity entity : list) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = dictService.insertDicts(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ´æ°ä¸æ¡åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "dictEntity", value = "åå
¸IDéå", dataType = "DictEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "åå
¸éå", dataType = "DictEntity", paramType = "body", example = "") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updateDict", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updateDict(@RequestBody DictEntity dictEntity) { |
| | | public ResponseMsg<Integer> updateDict(@RequestBody DictEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = dictService.updateDict(dictEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = dictService.updateDict(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.data.DirEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.service.data.DirService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | 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.stereotype.Service; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | DirService dirService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "DirEntity", value = "ç®å½å®ä½ç±»", dataType = "com.lf.server.entity.data.DirEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "ç®å½å®ä½ç±»", dataType = "com.lf.server.entity.data.DirEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertDir", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertDir(@RequestBody DirEntity dirEntity) { |
| | | public ResponseMsg<Integer> insertDir(@RequestBody DirEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = dirService.insertDir(dirEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = dirService.insertDir(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥å¤æ¡æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "DirEntity", value = "ç®å½å®ä½ç±»", dataType = "com.lf.server.entity.data.DirEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "list", value = "ç®å½å®ä½ç±»", dataType = "com.lf.server.entity.data.DirEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertDirs", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertDirs(@RequestBody List<DirEntity> dirEntity) { |
| | | public ResponseMsg<Integer> insertDirs(@RequestBody List<DirEntity> list, HttpServletRequest req) { |
| | | try { |
| | | int count = dirService.insertDirs(dirEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | for (DirEntity entity : list) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = dirService.insertDirs(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ´æ°ä¸æ¡æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "dirEntity", value = "主é®IDéå", dataType = "DictEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "主é®IDéå", dataType = "DictEntity", paramType = "body", example = "") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updateDir", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updateDir(@RequestBody DirEntity dirEntity) { |
| | | public ResponseMsg<Integer> updateDir(@RequestBody DirEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = dirService.updateDir(dirEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = dirService.updateDir(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ´æ°å¤æ¡æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "DirEntity", value = "主é®IDéå", dataType = "DirEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "list", value = "主é®IDéå", dataType = "DirEntity", paramType = "body", example = "") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updateDirs", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updateDirs(@RequestBody List<DirEntity> dirEntity) { |
| | | public ResponseMsg<Integer> updateDirs(@RequestBody List<DirEntity> list, HttpServletRequest req) { |
| | | try { |
| | | int count = dirService.updateDirs(dirEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (DirEntity entity : list) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = dirService.updateDirs(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | import com.lf.server.aspect.SysLog; |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.data.DirEntity; |
| | | import com.lf.server.entity.data.DownloadEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.service.data.DownloadService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class DownloadController extends BaseController { |
| | | @Autowired |
| | | DownloadService downloadService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "DownloadEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insert(@RequestBody DownloadEntity entity) { |
| | | public ResponseMsg<Integer> insert(@RequestBody DownloadEntity entity, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = downloadService.insert(entity); |
| | | |
| | | return success(count); |
| | |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "DownloadEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<DownloadEntity> list) { |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<DownloadEntity> list, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (DownloadEntity entity : list) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = downloadService.inserts(list); |
| | | |
| | | return success(count); |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> update(@RequestBody DownloadEntity entity) { |
| | | public ResponseMsg<Integer> update(@RequestBody DownloadEntity entity, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setDownloadUser(ue.getId()); |
| | | } |
| | | |
| | | int count = downloadService.update(entity); |
| | | |
| | | return success(count); |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updates(@RequestBody List<DownloadEntity> list) { |
| | | public ResponseMsg<Integer> updates(@RequestBody List<DownloadEntity> list, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (DownloadEntity entity : list) { |
| | | entity.setDownloadUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = downloadService.updates(list); |
| | | |
| | | return success(count); |
| | |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.data.MetaEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.service.data.MetaService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class MetaController extends BaseController { |
| | | @Autowired |
| | | MetaService metaService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "MetaEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insert(@RequestBody MetaEntity entity) { |
| | | public ResponseMsg<Integer> insert(@RequestBody MetaEntity entity, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = metaService.insert(entity); |
| | | |
| | | return success(count); |
| | |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "MetaEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<MetaEntity> list) { |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<MetaEntity> list, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (MetaEntity entity : list) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = metaService.inserts(list); |
| | | |
| | | return success(count); |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> update(@RequestBody MetaEntity entity) { |
| | | public ResponseMsg<Integer> update(@RequestBody MetaEntity entity, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = metaService.update(entity); |
| | | |
| | | return success(count); |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updates(@RequestBody List<MetaEntity> list) { |
| | | public ResponseMsg<Integer> updates(@RequestBody List<MetaEntity> list, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (MetaEntity entity : list) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = metaService.updates(list); |
| | | |
| | | return success(count); |
| | |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.data.MetaFileEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.service.data.MetaFileService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class MetaFileController extends BaseController { |
| | | @Autowired |
| | | MetaFileService metaFileService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "MetaFileEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insert(@RequestBody MetaFileEntity entity) { |
| | | public ResponseMsg<Integer> insert(@RequestBody MetaFileEntity entity, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = metaFileService.insert(entity); |
| | | |
| | | return success(count); |
| | |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "MetaFileEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<MetaFileEntity> list) { |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<MetaFileEntity> list, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (MetaFileEntity entity : list) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = metaFileService.inserts(list); |
| | | |
| | | return success(count); |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> update(@RequestBody MetaFileEntity entity) { |
| | | public ResponseMsg<Integer> update(@RequestBody MetaFileEntity entity, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = metaFileService.update(entity); |
| | | |
| | | return success(count); |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updates(@RequestBody List<MetaFileEntity> list) { |
| | | public ResponseMsg<Integer> updates(@RequestBody List<MetaFileEntity> list, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (MetaFileEntity entity : list) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = metaFileService.updates(list); |
| | | |
| | | return success(count); |
| | |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.data.StyleEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.service.data.StyleService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class StyleController extends BaseController { |
| | | @Autowired |
| | | StyleService styleService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "styleEntity", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.data.StyleEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.data.StyleEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertStyle", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertStyle(@RequestBody StyleEntity styleEntity) { |
| | | public ResponseMsg<Integer> insertStyle(@RequestBody StyleEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = styleService.insertStyle(styleEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = styleService.insertStyle(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥å¤æ¡åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "StyleEntity", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.data.StyleEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "list", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.data.StyleEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertStyles", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertStyles(@RequestBody List<StyleEntity> styleEntity) { |
| | | public ResponseMsg<Integer> insertStyles(@RequestBody List<StyleEntity> list, HttpServletRequest req) { |
| | | try { |
| | | int count = styleService.insertStyles(styleEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (StyleEntity entity : list) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = styleService.insertStyles(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ´æ°ä¸æ¡åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "styleEntity", value = "åå
¸IDéå", dataType = "StyleEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "åå
¸IDéå", dataType = "StyleEntity", paramType = "body", example = "") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updateStyle", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updateStyle(@RequestBody StyleEntity styleEntity) { |
| | | public ResponseMsg<Integer> updateStyle(@RequestBody StyleEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = styleService.updateStyle(styleEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = styleService.updateStyle(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.data.VerEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.service.data.VerService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * çæ¬è¡¨ |
| | |
| | | @Autowired |
| | | VerService versionService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | | @ApiImplicitParams({ |
| | |
| | | @ApiImplicitParam(name = "depName", value = "ç®å½", dataType = "String", paramType = "query", example = ""), |
| | | }) |
| | | @GetMapping({"/selectCount"}) |
| | | public ResponseMsg<Integer> selectCount(String name,String depName) { |
| | | public ResponseMsg<Integer> selectCount(String name, String depName) { |
| | | try { |
| | | int count = versionService.selectCount(name,depName); |
| | | int count = versionService.selectCount(name, depName); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | List<VerEntity> rs = versionService.selectByPage(name,depName, pageSize, pageSize * (pageIndex - 1)); |
| | | List<VerEntity> rs = versionService.selectByPage(name, depName, pageSize, pageSize * (pageIndex - 1)); |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | |
| | | int count = versionService.selectCount(name,depName); |
| | | int count = versionService.selectCount(name, depName); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | |
| | | List<VerEntity> rs = versionService.selectByPage(name,depName, pageSize, pageSize * (pageIndex - 1)); |
| | | List<VerEntity> rs = versionService.selectByPage(name, depName, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(count, rs); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "versionEntity", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.data.VersionEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.data.VersionEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertVersion", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertVersion(@RequestBody VerEntity verEntity) { |
| | | public ResponseMsg<Integer> insertVersion(@RequestBody VerEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = versionService.insertVersion(verEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = versionService.insertVersion(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥å¤æ¡åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "versionEntity", value = "åå
¸å®ä½ç±»éå", dataType = "List<VersionEntity>", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "List<VersionEntity>", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertVersions", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertVersions(@RequestParam List<VerEntity> verEntity) { |
| | | public ResponseMsg<Integer> insertVersions(@RequestParam List<VerEntity> list, HttpServletRequest req) { |
| | | try { |
| | | int count = versionService.insertVersions(verEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (VerEntity entity : list) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = versionService.insertVersions(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ´æ°ä¸æ¡åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "versionEntity", value = "åå
¸IDéå", dataType = "VersionEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "åå
¸IDéå", dataType = "VersionEntity", paramType = "body", example = "") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updateVersion", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updateVersion(@RequestBody VerEntity verEntity) { |
| | | public ResponseMsg<Integer> updateVersion(@RequestBody VerEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = versionService.updateVersion(verEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = versionService.updateVersion(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.sys.ArgsEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.service.sys.ArgsService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class ArgsController extends BaseController { |
| | | @Autowired |
| | | ArgsService argsService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "ArgsEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insert(@RequestBody ArgsEntity entity) { |
| | | public ResponseMsg<Integer> insert(@RequestBody ArgsEntity entity, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = argsService.insert(entity); |
| | | |
| | | return success(count); |
| | |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "ArgsEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<ArgsEntity> list) { |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<ArgsEntity> list, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (ArgsEntity entity : list) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = argsService.inserts(list); |
| | | |
| | | return success(count); |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> update(@RequestBody ArgsEntity entity) { |
| | | public ResponseMsg<Integer> update(@RequestBody ArgsEntity entity, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = argsService.update(entity); |
| | | |
| | | return success(count); |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updates(@RequestBody List<ArgsEntity> list) { |
| | | public ResponseMsg<Integer> updates(@RequestBody List<ArgsEntity> list, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (ArgsEntity entity : list) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = argsService.updates(list); |
| | | |
| | | return success(count); |
| | |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.sys.AttachEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.service.sys.AttachService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class AttachController extends BaseController { |
| | | @Autowired |
| | | AttachService attachService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "AttachEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insert(@RequestBody AttachEntity entity) { |
| | | public ResponseMsg<Integer> insert(@RequestBody AttachEntity entity, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = attachService.insert(entity); |
| | | |
| | | return success(count); |
| | |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "AttachEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<AttachEntity> list) { |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<AttachEntity> list, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (AttachEntity entity : list) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = attachService.inserts(list); |
| | | |
| | | return success(count); |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> update(@RequestBody AttachEntity entity) { |
| | | public ResponseMsg<Integer> update(@RequestBody AttachEntity entity, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = attachService.update(entity); |
| | | |
| | | return success(count); |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updates(@RequestBody List<AttachEntity> list) { |
| | | public ResponseMsg<Integer> updates(@RequestBody List<AttachEntity> list, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (AttachEntity entity : list) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = attachService.updates(list); |
| | | |
| | | return success(count); |
| | |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.sys.AuthEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.service.sys.AuthService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class AuthController extends BaseController { |
| | | @Autowired |
| | | AuthService authService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "authEntity", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.sys.AuthEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.sys.AuthEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertAuth", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertAuth(@RequestBody AuthEntity authEntity) { |
| | | public ResponseMsg<Integer> insertAuth(@RequestBody AuthEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = authService.insertAuth(authEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = authService.insertAuth(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥å¤æ¡åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "authEntity", value = "åå
¸å®ä½ç±»éå", dataType = "List<AuthEntity>", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "List<AuthEntity>", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertAuths", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertAuths(@RequestBody List<AuthEntity> authEntity) { |
| | | public ResponseMsg<Integer> insertAuths(@RequestBody List<AuthEntity> list, HttpServletRequest req) { |
| | | try { |
| | | int count = authService.insertAuths(authEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (AuthEntity entity : list) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = authService.insertAuths(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ´æ°ä¸æ¡åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "loginEntity", value = "åå
¸IDéå", dataType = "LoginEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "LoginEntity", paramType = "body", example = "") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updateAuth", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updateAuth(@RequestBody AuthEntity authEntity) { |
| | | public ResponseMsg<Integer> updateAuth(@RequestBody AuthEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = authService.updateAuth(authEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = authService.updateAuth(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.sys.BlacklistEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.service.sys.BlacklistService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class BlacklistController extends BaseController { |
| | | @Autowired |
| | | BlacklistService blacklistService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "BlacklistEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insert(@RequestBody BlacklistEntity entity) { |
| | | public ResponseMsg<Integer> insert(@RequestBody BlacklistEntity entity, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = blacklistService.insert(entity); |
| | | |
| | | return success(count); |
| | |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "BlacklistEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<BlacklistEntity> list) { |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<BlacklistEntity> list, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (BlacklistEntity entity : list) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = blacklistService.inserts(list); |
| | | |
| | | return success(count); |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> update(@RequestBody BlacklistEntity entity) { |
| | | public ResponseMsg<Integer> update(@RequestBody BlacklistEntity entity, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = blacklistService.update(entity); |
| | | |
| | | return success(count); |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updates(@RequestBody List<BlacklistEntity> list) { |
| | | public ResponseMsg<Integer> updates(@RequestBody List<BlacklistEntity> list, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (BlacklistEntity entity : list) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = blacklistService.updates(list); |
| | | |
| | | return success(count); |
| | |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.sys.DepEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.service.sys.DepService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | DepService depService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "DepEntity", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.sys.DepEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "com.lf.server.entity.sys.DepEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertDep", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertDep(@RequestBody DepEntity depEntity) { |
| | | public ResponseMsg<Integer> insertDep(@RequestBody DepEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = depService.insertDep(depEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = depService.insertDep(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥å¤æ¡æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "DepEntity", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.sys.DepEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "com.lf.server.entity.sys.DepEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertDes", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertDes(@RequestBody List<DepEntity> depEntity) { |
| | | public ResponseMsg<Integer> insertDes(@RequestBody List<DepEntity> list, HttpServletRequest req) { |
| | | try { |
| | | int count = depService.insertDeps(depEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (DepEntity entity : list) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = depService.insertDeps(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ´æ°ä¸æ¡æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "depEntity", value = "主é®IDéå", dataType = "DepEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "DepEntity", paramType = "body", example = "") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updateDep", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updateDep(@RequestBody DepEntity depEntity) { |
| | | public ResponseMsg<Integer> updateDep(@RequestBody DepEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = depService.updateDep(depEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = depService.updateDep(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updateDeps", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updateDeps(@RequestBody List<DepEntity> list) { |
| | | public ResponseMsg<Integer> updateDeps(@RequestBody List<DepEntity> list, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (DepEntity entity : list) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = depService.updateDeps(list); |
| | | |
| | | return success(count); |
| | |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.sys.LoginEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.service.sys.LoginService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.sql.Timestamp; |
| | | import java.util.List; |
| | | |
| | |
| | | public class LoginController extends BaseController { |
| | | @Autowired |
| | | LoginService loginService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "loginEntity", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.sys.LoginEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "com.lf.server.entity.sys.LoginEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertLogin", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertLogin(@RequestBody LoginEntity loginEntity) { |
| | | public ResponseMsg<Integer> insertLogin(@RequestBody LoginEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = loginService.insertLogin(loginEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUserid(ue.getId()); |
| | | } |
| | | |
| | | int count = loginService.insertLogin(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥å¤æ¡åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "loginEntity", value = "åå
¸å®ä½ç±»éå", dataType = "List<LoginEntity>", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "List<LoginEntity>", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertLogins", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertLogins(@RequestBody List<LoginEntity> loginEntity) { |
| | | public ResponseMsg<Integer> insertLogins(@RequestBody List<LoginEntity> list, HttpServletRequest req) { |
| | | try { |
| | | int count = loginService.insertLogins(loginEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (LoginEntity entity : list) { |
| | | entity.setUserid(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = loginService.insertLogins(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ´æ°ä¸æ¡åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "loginEntity", value = "åå
¸IDéå", dataType = "LoginEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "LoginEntity", paramType = "body", example = "") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updateLogin", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updateLogin(@RequestBody LoginEntity loginEntity) { |
| | | public ResponseMsg<Integer> updateLogin(@RequestBody LoginEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = loginService.updateLogin(loginEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUserid(ue.getId()); |
| | | } |
| | | |
| | | int count = loginService.updateLogin(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.sys.MenuAuthEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.service.sys.MenuAuthService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class MenuAuthController extends BaseController { |
| | | @Autowired |
| | | MenuAuthService menuAuthService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "MenuAuthEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insert(@RequestBody MenuAuthEntity entity) { |
| | | public ResponseMsg<Integer> insert(@RequestBody MenuAuthEntity entity, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = menuAuthService.insert(entity); |
| | | |
| | | return success(count); |
| | |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "MenuAuthEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<MenuAuthEntity> list) { |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<MenuAuthEntity> list, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (MenuAuthEntity entity : list) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = menuAuthService.inserts(list); |
| | | |
| | | return success(count); |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> update(@RequestBody MenuAuthEntity entity) { |
| | | public ResponseMsg<Integer> update(@RequestBody MenuAuthEntity entity, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = menuAuthService.update(entity); |
| | | |
| | | return success(count); |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updates(@RequestBody List<MenuAuthEntity> list) { |
| | | public ResponseMsg<Integer> updates(@RequestBody List<MenuAuthEntity> list, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (MenuAuthEntity entity : list) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = menuAuthService.updates(list); |
| | | |
| | | return success(count); |
| | |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.data.DirEntity; |
| | | import com.lf.server.entity.sys.MenuEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.service.sys.MenuService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | MenuService menuService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥ä¸æ¡æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "MenusEntity", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.sys.MenusEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "com.lf.server.entity.sys.MenusEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertMenu", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertMenu(@RequestBody MenuEntity menuEntity) { |
| | | public ResponseMsg<Integer> insertMenu(@RequestBody MenuEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = menuService.insertMenu(menuEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = menuService.insertMenu(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥å¤æ¡æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "MenusEntity", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.sys.MenusEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "com.lf.server.entity.sys.MenusEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertMenus", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertMenus(@RequestBody List<MenuEntity> menuEntity) { |
| | | public ResponseMsg<Integer> insertMenus(@RequestBody List<MenuEntity> list, HttpServletRequest req) { |
| | | try { |
| | | int count = menuService.insertMenus(menuEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (MenuEntity entity : list) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = menuService.insertMenus(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ´æ°ä¸æ¡æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "MenusEntity", value = "èåIDéå", dataType = "MenusEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "MenusEntity", paramType = "body", example = "") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updateMenu", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updateMenu(@RequestBody MenuEntity menuEntity) { |
| | | public ResponseMsg<Integer> updateMenu(@RequestBody MenuEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = menuService.updateMenu(menuEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = menuService.updateMenu(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ´æ°å¤æ¡æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "MenusEntity", value = "主é®IDéå", dataType = "MenusEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "MenusEntity", paramType = "body", example = "") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updateMenus", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updateMenus(@RequestBody List<MenuEntity> menuEntity) { |
| | | public ResponseMsg<Integer> updateMenus(@RequestBody List<MenuEntity> list, HttpServletRequest req) { |
| | | try { |
| | | int count = menuService.updateMenus(menuEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (MenuEntity entity : list) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = menuService.updateMenus(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.sys.MsgEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.service.sys.MsgService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class MsgController extends BaseController { |
| | | @Autowired |
| | | MsgService msgService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "MsgEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insert(@RequestBody MsgEntity entity) { |
| | | public ResponseMsg<Integer> insert(@RequestBody MsgEntity entity, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = msgService.insert(entity); |
| | | |
| | | return success(count); |
| | |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "MsgEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<MsgEntity> list) { |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<MsgEntity> list, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (MsgEntity entity : list) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = msgService.inserts(list); |
| | | |
| | | return success(count); |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> update(@RequestBody MsgEntity entity) { |
| | | public ResponseMsg<Integer> update(@RequestBody MsgEntity entity, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = msgService.update(entity); |
| | | |
| | | return success(count); |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updates(@RequestBody List<MsgEntity> list) { |
| | | public ResponseMsg<Integer> updates(@RequestBody List<MsgEntity> list, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (MsgEntity entity : list) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = msgService.updates(list); |
| | | |
| | | return success(count); |
| | |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.sys.OperateEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.service.sys.OperateService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.sql.Timestamp; |
| | | import java.util.List; |
| | | |
| | |
| | | public class OperateController extends BaseController { |
| | | @Autowired |
| | | OperateService operateService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "operateEntity", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.sys.OperateEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.sys.OperateEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertOperate", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertOperate(@RequestBody OperateEntity operateEntity) { |
| | | public ResponseMsg<Integer> insertOperate(@RequestBody OperateEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = operateService.insertOperate(operateEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUserid(ue.getId()); |
| | | } |
| | | |
| | | int count = operateService.insertOperate(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥å¤æ¡åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "operateEntity", value = "åå
¸å®ä½ç±»éå", dataType = "List<OperateEntity>", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "list", value = "åå
¸å®ä½ç±»éå", dataType = "List<OperateEntity>", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertOperates", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertOperates(@RequestBody List<OperateEntity> operateEntity) { |
| | | public ResponseMsg<Integer> insertOperates(@RequestBody List<OperateEntity> list, HttpServletRequest req) { |
| | | try { |
| | | int count = operateService.insertOperates(operateEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (OperateEntity entity : list) { |
| | | entity.setUserid(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = operateService.insertOperates(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ´æ°ä¸æ¡åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "operateEntity", value = "åå
¸IDéå", dataType = "OperateEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "OperateEntity", paramType = "body", example = "") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updateOperate", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updateOperate(@RequestBody OperateEntity operateEntity) { |
| | | public ResponseMsg<Integer> updateOperate(@RequestBody OperateEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = operateService.updateOperate(operateEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUserid(ue.getId()); |
| | | } |
| | | |
| | | int count = operateService.updateOperate(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | import com.lf.server.aspect.SysLog; |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.sys.AttachEntity; |
| | | import com.lf.server.entity.sys.ResEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.service.sys.ResService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class ResController extends BaseController { |
| | | @Autowired |
| | | ResService resService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "resEntity", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.sys.ResEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "åå
¸å®ä½ç±»", dataType = "com.lf.server.entity.sys.ResEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertRes", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertRes(@RequestBody ResEntity resEntity) { |
| | | public ResponseMsg<Integer> insertRes(@RequestBody ResEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = resService.insertRes(resEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = resService.insertRes(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æå
¥å¤æ¡åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "resEntity", value = "åå
¸å®ä½ç±»éå", dataType = "List<ResEntity>", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "list", value = "åå
¸å®ä½ç±»éå", dataType = "List<ResEntity>", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertRess", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertRess(@RequestBody List<ResEntity> resEntity) { |
| | | public ResponseMsg<Integer> insertRess(@RequestBody List<ResEntity> list, HttpServletRequest req) { |
| | | try { |
| | | int count = resService.insertRess(resEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | for (ResEntity entity : list) { |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | } |
| | | |
| | | int count = resService.insertRess(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ´æ°ä¸æ¡åå
¸") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "resEntity", value = "åå
¸IDéå", dataType = "ResEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "åå
¸IDéå", dataType = "ResEntity", paramType = "body", example = "") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updateRes", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updateRes(@RequestBody ResEntity resEntity) { |
| | | public ResponseMsg<Integer> updateRes(@RequestBody ResEntity entity, HttpServletRequest req) { |
| | | try { |
| | | int count = resService.updateRes(resEntity); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = resService.updateRes(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | |
| | | private String viewGuid; |
| | | |
| | | private String createUser; |
| | | private int createUser; |
| | | |
| | | private Timestamp createTime; |
| | | |
| | |
| | | this.viewGuid = viewGuid; |
| | | } |
| | | |
| | | public String getCreateUser() { |
| | | public int getCreateUser() { |
| | | return createUser; |
| | | } |
| | | |
| | | public void setCreateUser(String createUser) { |
| | | public void setCreateUser(int createUser) { |
| | | this.createUser = createUser; |
| | | } |
| | | |
| | |
| | | * @param type |
| | | * @param start |
| | | * @param end |
| | | * @param type |
| | | * @param start |
| | | * @param end |
| | | * @param limit |
| | | * @param offset |
| | | * @return |
| | | */ |
| | | public List<ResOpEntity> selectByPage(String name, Integer type, Timestamp start, Timestamp end, Integer limit, Integer offset); |
| | |
| | | 1.ä¿®æ¹èåãæ°æ®ç®å½ãåä½çxlsæ°æ®ï¼ç¼åé彿¥è¯¢SQL |
| | | 2.ç»å½æ¶éªè¯ä½¿ç¨MD5+Saltå¯ç |
| | | 3.ç»å½æ¶çç¨æ·ååå¯ç 使ç¨RSAå å¯ãè§£å¯ |
| | | |
| | | 3.ä¿®æ¹ç¨æ·å¯ç æ¶ä½¿ç¨MD5+Saltå¯ç |
| | | 4.è§£å³Swagger-UIæ æ³ä¼ éCookieä¿¡æ¯ |
| | | 5.ç»å½æ¶çç¨æ·ååå¯ç 使ç¨RSAå å¯ãè§£å¯ |
| | | 6.å¯ç å¤æåº¦éªè¯(8-20ä½å
å«åæ¯ãæ°ååç¹æ®å符) |
| | | 7.åå°æå¡è®¿é®æ·»å ç»å½éªè¯æ¦æªå¨ |
| | | 8.å¼åå颿¥å¿åè½ |