Merge remote-tracking branch 'origin/master'
| | |
| | | if (true) { |
| | | // å
³éFTPæµ |
| | | // ç§»å¨æå,è¿åæä»¶å |
| | | |
| | | /*context.put("error", 0); |
| | | context.put("url", remoteFileName); |
| | | context.put("fullurl", remoteFileName); |
| | |
| | | <module>service</module> |
| | | <module>company</module> |
| | | <module>dianziqian</module> |
| | | <module>emaysms</module> |
| | | <module>emaysms</module> |
| | | <module>shop</module> |
| | | </modules> |
| | | |
| | | <parent> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project xmlns="http://maven.apache.org/POM/4.0.0" |
| | | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | <parent> |
| | | <groupId>com.doumee</groupId> |
| | | <artifactId>yunyibao</artifactId> |
| | | <version>1.0.0-SNAPSHOT</version> |
| | | </parent> |
| | | |
| | | <artifactId>shop</artifactId> |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.doumee</groupId> |
| | | <artifactId>service</artifactId> |
| | | <version>1.0.0-SNAPSHOT</version> |
| | | </dependency> |
| | | </dependencies> |
| | | <properties> |
| | | <maven.compiler.source>8</maven.compiler.source> |
| | | <maven.compiler.target>8</maven.compiler.target> |
| | | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| | | </properties> |
| | | <build> |
| | | <finalName>shop</finalName> |
| | | <resources> |
| | | <resource> |
| | | <directory>src/main/resources</directory> |
| | | </resource> |
| | | </resources> |
| | | |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | <configuration> |
| | | <fork>true</fork> |
| | | <mainClass>com.doumee.ShopApplication</mainClass> |
| | | <layout>ZIP</layout> |
| | | </configuration> |
| | | <executions> |
| | | <execution> |
| | | <goals> |
| | | <goal>repackage</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | </plugin> |
| | | <!--<plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-war-plugin</artifactId> |
| | | <version>2.6</version> |
| | | </plugin>--> |
| | | |
| | | </plugins> |
| | | </build> |
| | | </project> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee; |
| | | |
| | | public class Main { |
| | | public static void main(String[] args) { |
| | | System.out.println("Hello world!"); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; |
| | | import org.springframework.context.ApplicationContext; |
| | | import org.springframework.scheduling.annotation.EnableAsync; |
| | | |
| | | /** |
| | | * å¯å¨ç±» |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/02/14 11:14 |
| | | */ |
| | | @Slf4j |
| | | @SpringBootApplication |
| | | @MapperScan("com.doumee.dao") |
| | | @EnableAsync |
| | | public class ShopApplication { |
| | | public static void main(String[] args) { |
| | | ApplicationContext context = SpringApplication.run(ShopApplication.class); |
| | | context.getEnvironment(); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api; |
| | | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.shiro.SecurityUtils; |
| | | |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Controlleråºç±» |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/02/14 11:14 |
| | | */ |
| | | @Slf4j |
| | | public class BaseController { |
| | | |
| | | /** |
| | | * è·åå½åç»å½ç¨æ· |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/02/14 11:14 |
| | | */ |
| | | protected LoginUserInfo getLoginUser () { |
| | | return (LoginUserInfo)SecurityUtils.getSubject().getPrincipal(); |
| | | } |
| | | |
| | | /** |
| | | * è·åIDéå |
| | | * |
| | | * @param ids 使ç¨","éå¼çå¤ä¸ªID |
| | | * @return List<Integer> |
| | | */ |
| | | protected List<Integer> getIdList (String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | return idList; |
| | | } |
| | | |
| | | /** |
| | | * è·åæä»¶åèæµ |
| | | * |
| | | * @param is è¾å
¥æµ |
| | | * @return ByteArrayOutputStream |
| | | */ |
| | | protected ByteArrayOutputStream getOutputStream (InputStream is) throws IOException { |
| | | ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
| | | byte[] bs = new byte[is.available()]; |
| | | int len; |
| | | while ((len = is.read(bs)) != -1) { |
| | | baos.write(bs, 0, len); |
| | | } |
| | | return baos; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.dto.ApplyDetailPageDTO; |
| | | import com.doumee.dao.business.model.ApplyChagneDetail; |
| | | import com.doumee.service.business.ApplyChagneDetailService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "å åä¿æ¢åç³è¯·æç»ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/applyChagneDetail") |
| | | public class ApplyChagneDetailController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ApplyChagneDetailService applyChagneDetailService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:applychagnedetail:create") |
| | | public ApiResponse create(@RequestBody ApplyChagneDetail applyChagneDetail) { |
| | | return ApiResponse.success(applyChagneDetailService.create(applyChagneDetail)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:applychagnedetail:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | applyChagneDetailService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:applychagnedetail:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | applyChagneDetailService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:applychagnedetail:update") |
| | | public ApiResponse updateById(@RequestBody ApplyChagneDetail applyChagneDetail) { |
| | | applyChagneDetailService.updateById(applyChagneDetail); |
| | | return ApiResponse.success(null); |
| | | } |
| | | // |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:applychagnedetail:query") |
| | | public ApiResponse<PageData<ApplyChagneDetail>> findPage (@RequestBody PageWrap<ApplyDetailPageDTO> pageWrap) { |
| | | return ApiResponse.success(applyChagneDetailService.findPageForCompany(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("business:applychagnedetail:query") |
| | | public ApiResponse<List<ApplyChagneDetail>> findList (@RequestBody ApplyChagneDetail pageWrap) { |
| | | return ApiResponse.success(applyChagneDetailService.findList(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:applychagnedetail:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<ApplyDetailPageDTO> pageWrap, HttpServletResponse response) { |
| | | |
| | | } |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:applychagnedetail:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(applyChagneDetailService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.ApplyChange; |
| | | import com.doumee.service.business.ApplyChangeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "å åä¿æ¢åç³è¯·ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/applyChange") |
| | | public class ApplyChangeController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ApplyChangeService applyChangeService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:applychange:create") |
| | | public ApiResponse create(@RequestBody ApplyChange applyChange) { |
| | | return ApiResponse.success(applyChangeService.create(applyChange)); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("å¹³å°éåæä¿") |
| | | @PostMapping("/back") |
| | | @RequiresPermissions("business:applychange:back") |
| | | public ApiResponse back(@RequestBody ApplyChange applyChange) { |
| | | return ApiResponse.success(applyChangeService.back(applyChange)); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("å¹³å°å¤çéåç³è¯·") |
| | | @PostMapping("/dealBackApply") |
| | | @RequiresPermissions("business:applychange:dealBackApply") |
| | | public ApiResponse dealBackApply(@RequestBody ApplyChange applyChange) { |
| | | return ApiResponse.success(applyChangeService.dealBackApply(applyChange)); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("å¹³å°ä¸ä¼ æ¹å") |
| | | @PostMapping("/uploadPidan") |
| | | @RequiresPermissions("business:applychange:uploadPidan") |
| | | public ApiResponse uploadPidan(@RequestBody ApplyChange applyChange) { |
| | | return ApiResponse.success(applyChangeService.uploadPidan(applyChange)); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("å¹³å°ä¿®æ¹æ¹å") |
| | | @PostMapping("/editPidan") |
| | | @RequiresPermissions("business:applychange:uploadPidan") |
| | | public ApiResponse editPidan(@RequestBody ApplyChange applyChange) { |
| | | return ApiResponse.success(applyChangeService.editPidan(applyChange)); |
| | | } |
| | | @ApiOperation("è·åå åä¿ç¾ç« å°å") |
| | | @PostMapping("/getJiajianBaoSignLink") |
| | | @RequiresPermissions("business:applychange:sign") |
| | | public ApiResponse<String> getSignLinkJiajiabao (@RequestBody ApplyChange model, HttpServletResponse response) { |
| | | return ApiResponse.success( applyChangeService.getSignLinkJiajiabao(model)); |
| | | } |
| | | @ApiOperation("è·åç¼åç³è¯·ç¾ç« å°å") |
| | | @PostMapping("/getChangeUnitSignLink") |
| | | @RequiresPermissions("business:applychange:sign") |
| | | public ApiResponse<String> getChangeUnitSignLink (@RequestBody ApplyChange model, HttpServletResponse response) { |
| | | return ApiResponse.success( applyChangeService.getSignLinkChangeUnit(model)); |
| | | } |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:applychange:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | applyChangeService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:applychange:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | applyChangeService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:applychange:update") |
| | | public ApiResponse updateById(@RequestBody ApplyChange applyChange) { |
| | | applyChangeService.updateById(applyChange); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:applychange:query") |
| | | public ApiResponse<PageData<ApplyChange>> findPage (@RequestBody PageWrap<ApplyChange> pageWrap) { |
| | | return ApiResponse.success(applyChangeService.findPageForCompany(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:applychange:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<ApplyChange> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(ApplyChange.class).export(applyChangeService.findPageForCompany(pageWrap).getRecords(), "å åä¿æ¢åç³è¯·ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("导åºå åä¿è¯¦æ
å") |
| | | @PostMapping("/exportJiajianBaoExcel") |
| | | @RequiresPermissions("business:applychange:exportExcel") |
| | | public void exportJiajianBaoExcel (@RequestBody ApplyChange model, HttpServletResponse response) { |
| | | ExcelExporter.build(ApplyChange.class).exportJiajianBaoExcel(applyChangeService.exportJiajianBaoExcel(model), response); |
| | | } |
| | | @ApiOperation("å¯¼åºæ¢åç³è¯·è¯¦æ
å") |
| | | @PostMapping("/exportChangeUnitExcel") |
| | | @RequiresPermissions("business:applychange:exportExcel") |
| | | public void exportChangeUnitExcel (@RequestBody ApplyChange model, HttpServletResponse response) { |
| | | ExcelExporter.build(ApplyChange.class).exportChangeUnitExcel(applyChangeService.exportChangeUnitExcel(model), response); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:applychange:query") |
| | | public ApiResponse<ApplyChange> findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(applyChangeService.findDetail(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.dto.ApplyDetailPageDTO; |
| | | import com.doumee.dao.business.model.ApplyDetail; |
| | | import com.doumee.service.business.ApplyDetailService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "æä¿ç³è¯·æç»ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/applyDetail") |
| | | public class ApplyDetailController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ApplyDetailService applyDetailService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:applydetail:create") |
| | | public ApiResponse create(@RequestBody ApplyDetail applyDetail) { |
| | | return ApiResponse.success(applyDetailService.create(applyDetail)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:applydetail:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | applyDetailService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:applydetail:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | applyDetailService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:applydetail:update") |
| | | public ApiResponse updateById(@RequestBody ApplyDetail applyDetail) { |
| | | applyDetailService.updateById(applyDetail); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:applydetail:query") |
| | | public ApiResponse<PageData<ApplyDetail>> findPage (@RequestBody PageWrap<ApplyDetailPageDTO> pageWrap) { |
| | | return ApiResponse.success(applyDetailService.findPageForCompany(pageWrap)); |
| | | } |
| | | @ApiOperation("æ¥è¯¢å
¨é¨") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("business:applydetail:query") |
| | | public ApiResponse<List<ApplyDetail>> findList (@RequestBody ApplyDetail pageWrap) { |
| | | return ApiResponse.success(applyDetailService.findList(pageWrap)); |
| | | } |
| | | @ApiOperation("导åºå¨ä¿äººå详åExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:applydetail:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<ApplyDetailPageDTO> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(ApplyDetail.class).exportWithFirstAndEnd(applyDetailService.findPageForCompany(pageWrap).getRecords(), |
| | | pageWrap.getModel().getSolutionName(),"å¨ä¿äººååå",null, response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:applydetail:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(applyDetailService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.ApplyLog; |
| | | import com.doumee.service.business.ApplyLogService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "æä¿ç³è¯·æä½åå²è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/applyLog") |
| | | public class ApplyLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ApplyLogService applyLogService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:applylog:create") |
| | | public ApiResponse create(@RequestBody ApplyLog applyLog) { |
| | | return ApiResponse.success(applyLogService.create(applyLog)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:applylog:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | applyLogService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:applylog:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | applyLogService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:applylog:update") |
| | | public ApiResponse updateById(@RequestBody ApplyLog applyLog) { |
| | | applyLogService.updateById(applyLog); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:applylog:query") |
| | | public ApiResponse<PageData<ApplyLog>> findPage (@RequestBody PageWrap<ApplyLog> pageWrap) { |
| | | return ApiResponse.success(applyLogService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:applylog:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<ApplyLog> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(ApplyLog.class).export(applyLogService.findPage(pageWrap).getRecords(), "æä¿ç³è¯·æä½åå²è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:applylog:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(applyLogService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.Areas; |
| | | import com.doumee.service.business.AreasService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "çå¸åºä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/areas") |
| | | public class AreasController extends BaseController { |
| | | |
| | | @Autowired |
| | | private AreasService areasService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:areas:create") |
| | | public ApiResponse create(@RequestBody Areas areas) { |
| | | return ApiResponse.success(areasService.create(areas)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:areas:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | areasService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:areas:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | areasService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:areas:update") |
| | | public ApiResponse updateById(@RequestBody Areas areas) { |
| | | areasService.updateById(areas); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:areas:query") |
| | | public ApiResponse<PageData<Areas>> findPage (@RequestBody PageWrap<Areas> pageWrap) { |
| | | return ApiResponse.success(areasService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:areas:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<Areas> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(Areas.class).export(areasService.findPage(pageWrap).getRecords(), "çå¸åºä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:areas:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(areasService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.service.business.CompanyService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "ä¼ä¸ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/company") |
| | | public class CompanyController extends BaseController { |
| | | |
| | | @Autowired |
| | | private CompanyService companyService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:company:create") |
| | | public ApiResponse create(@RequestBody Company company) { |
| | | companyService.create(company); |
| | | companyService.startSignAuth(company.getId()); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:company:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | companyService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:company:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | companyService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:company:update") |
| | | public ApiResponse updateById(@RequestBody Company company) { |
| | | companyService.updateById(company); |
| | | companyService.startSignAuth(company.getId()); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDç¦ç¨å¯ç¨") |
| | | @PostMapping("/updateStatus") |
| | | @RequiresPermissions("business:company:update") |
| | | public ApiResponse updateStatus(@RequestBody Company company) { |
| | | companyService.updateStatus(company); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("ä¿®æ¹ä¿é©æ¹æ¡") |
| | | @PostMapping("/updateSolutions") |
| | | @RequiresPermissions("business:company:update") |
| | | public ApiResponse updateSolutions(@RequestBody Company company) { |
| | | companyService.updateSolutions(company); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("ä¼ä¸æ´æ¢ææºå·") |
| | | @PostMapping("/updatePhone") |
| | | @RequiresPermissions("business:company:update") |
| | | public ApiResponse updatePhone(@RequestBody Company company) { |
| | | companyService.updatePhone(company); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("æ ¹æ®IDçµåç¾è®¤è¯ä¼ä¸ä¿¡æ¯") |
| | | @PostMapping("/startSignAuth/{id}") |
| | | @RequiresPermissions("business:company:update") |
| | | public ApiResponse startSignAuth(@PathVariable Integer id) { |
| | | companyService.startSignAuth(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:company:query") |
| | | public ApiResponse<PageData<Company>> findPage (@RequestBody PageWrap<Company> pageWrap) { |
| | | //æéèå´å
|
| | | return ApiResponse.success(companyService.findPage(pageWrap)); |
| | | } |
| | | @ApiOperation("æ¥è¯¢å
¨é¨æ°æ®(è´¦å·åé
ä¼ä¸ä½¿ç¨)") |
| | | @PostMapping("/pageAll") |
| | | @RequiresPermissions("business:companypermission:create") |
| | | public ApiResponse<List<Company>> findPageAll (@RequestBody Company pageWrap) { |
| | | pageWrap.setQueryFlag(Constants.ONE);//æ¥è¯¢å
¨é¨ |
| | | return ApiResponse.success(companyService.findList(pageWrap)); |
| | | } |
| | | @ApiOperation("æ¥è¯¢å
¨é¨æ°æ®") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("business:company:query") |
| | | public ApiResponse<List<Company>> findList (@RequestBody Company pageWrap) { |
| | | pageWrap.setQueryFlag(Constants.ZERO);//æ¥è¯¢å
¨é¨æéèå´å
|
| | | return ApiResponse.success(companyService.findList(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:company:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<Company> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(Company.class).export(companyService.findPage(pageWrap).getRecords(), "ä¼ä¸ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:company:query") |
| | | public ApiResponse<Company> findById(@PathVariable Integer id) { |
| | | |
| | | return ApiResponse.success(companyService.findById(id)); |
| | | } |
| | | |
| | | @ApiOperation("ä¼ä¸è¯ä»¶ä¸è½½") |
| | | @PostMapping("/exportFiles") |
| | | @RequiresPermissions("business:company:exportExcel") |
| | | public void exportFiles(@RequestBody Company company,HttpServletResponse response) { |
| | | if(company.getId() == null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | companyService.exportFiles(company.getId(),response); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.CompanyPermission; |
| | | import com.doumee.service.business.CompanyPermissionService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "管çå管çä¼ä¸æé") |
| | | @RestController |
| | | @RequestMapping("/business/companyPermission") |
| | | public class CompanyPermissionController extends BaseController { |
| | | |
| | | @Autowired |
| | | private CompanyPermissionService companyPermissionService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:companypermission:create") |
| | | public ApiResponse create(@RequestBody CompanyPermission companyPermission) { |
| | | return ApiResponse.success(companyPermissionService.create(companyPermission)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:companypermission:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | companyPermissionService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:companypermission:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | companyPermissionService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:companypermission:update") |
| | | public ApiResponse updateById(@RequestBody CompanyPermission companyPermission) { |
| | | companyPermissionService.updateById(companyPermission); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:companypermission:query") |
| | | public ApiResponse<PageData<CompanyPermission>> findPage (@RequestBody PageWrap<CompanyPermission> pageWrap) { |
| | | return ApiResponse.success(companyPermissionService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:companypermission:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<CompanyPermission> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(CompanyPermission.class).export(companyPermissionService.findPage(pageWrap).getRecords(), "管çå管çä¼ä¸æé", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:companypermission:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(companyPermissionService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.CompanySolution; |
| | | import com.doumee.service.business.CompanySolutionService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "ä¼ä¸å¯ç¨ä¿é©æ¹æ¡å
³è表") |
| | | @RestController |
| | | @RequestMapping("/business/companySolution") |
| | | public class CompanySolutionController extends BaseController { |
| | | |
| | | @Autowired |
| | | private CompanySolutionService companySolutionService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:companysolution:create") |
| | | public ApiResponse create(@RequestBody CompanySolution companySolution) { |
| | | return ApiResponse.success(companySolutionService.create(companySolution)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:companysolution:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | companySolutionService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:companysolution:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | companySolutionService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:companysolution:update") |
| | | public ApiResponse updateById(@RequestBody CompanySolution companySolution) { |
| | | companySolutionService.updateById(companySolution); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:companysolution:query") |
| | | public ApiResponse<PageData<CompanySolution>> findPage (@RequestBody PageWrap<CompanySolution> pageWrap) { |
| | | return ApiResponse.success(companySolutionService.findPage(pageWrap)); |
| | | } |
| | | @ApiOperation("æ¥è¯¢å
¨é¨") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("business:companysolution:query") |
| | | public ApiResponse<List<CompanySolution>> findPage (@RequestBody CompanySolution pageWrap) { |
| | | return ApiResponse.success(companySolutionService.findList(pageWrap)); |
| | | } |
| | | @ApiOperation("æ¥è¯¢ä¼ä¸å
¨é¨å
³èæ¹æ¡") |
| | | @PostMapping("/listForCompany") |
| | | @RequiresPermissions("business:companysolution:query") |
| | | public ApiResponse<List<CompanySolution>> findListForCompany (@RequestBody CompanySolution pageWrap) { |
| | | return ApiResponse.success(companySolutionService.findListForCompany(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:companysolution:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<CompanySolution> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(CompanySolution.class).export(companySolutionService.findPage(pageWrap).getRecords(), "ä¼ä¸å¯ç¨ä¿é©æ¹æ¡å
³è表", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:companysolution:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(companySolutionService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.dto.DispatchUnitQueryDTO; |
| | | import com.doumee.dao.business.dto.SaveDispatchUnitDTO; |
| | | import com.doumee.dao.business.model.DispatchUnit; |
| | | import com.doumee.service.business.DispatchUnitService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "æ´¾é£åä½ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/dispatchUnit") |
| | | public class DispatchUnitController extends BaseController { |
| | | |
| | | @Autowired |
| | | private DispatchUnitService dispatchUnitService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:dispatchunit:create") |
| | | public ApiResponse create(@RequestBody SaveDispatchUnitDTO saveDispatchUnitDTO) { |
| | | return ApiResponse.success(dispatchUnitService.create(saveDispatchUnitDTO)); |
| | | } |
| | | @ApiOperation("æ´¾é£åä½å®¡æ ¸") |
| | | @PostMapping("/check") |
| | | @RequiresPermissions("business:dispatchunit:check") |
| | | public ApiResponse check(@RequestBody DispatchUnit param) { |
| | | return ApiResponse.success(dispatchUnitService.check(param)); |
| | | } |
| | | @ApiOperation("æ´¾é£åä½å·¥ç§å®¡æ ¸") |
| | | @PostMapping("/checkWorktype") |
| | | @RequiresPermissions("business:dispatchunit:checkWorktype") |
| | | public ApiResponse checkWorktype(@RequestBody DispatchUnit param) { |
| | | return ApiResponse.success(dispatchUnitService.checkWorktype(param)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:dispatchunit:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | dispatchUnitService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:dispatchunit:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | dispatchUnitService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ°æ®å表") |
| | | @PostMapping("/findListByDTO") |
| | | @RequiresPermissions("business:dispatchunit:query") |
| | | public ApiResponse<List<DispatchUnit>> findListByDTO (@RequestBody DispatchUnitQueryDTO dispatchUnitQueryDTO) { |
| | | return ApiResponse.success(dispatchUnitService.findByDTO(dispatchUnitQueryDTO)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:dispatchunit:update") |
| | | public ApiResponse updateById(@RequestBody DispatchUnit dispatchUnit) { |
| | | dispatchUnitService.updateById(dispatchUnit); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:dispatchunit:query") |
| | | public ApiResponse<PageData<DispatchUnit>> findPage (@RequestBody PageWrap<DispatchUnit> pageWrap) { |
| | | return ApiResponse.success(dispatchUnitService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:dispatchunit:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<DispatchUnit> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(DispatchUnit.class).export(dispatchUnitService.findPage(pageWrap).getRecords(), "æ´¾é£åä½ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:dispatchunit:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(dispatchUnitService.detailById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.DuLog; |
| | | import com.doumee.service.business.DuLogService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "æ´¾é£å使ä½åå²è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/duLog") |
| | | public class DuLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private DuLogService duLogService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:dulog:create") |
| | | public ApiResponse create(@RequestBody DuLog duLog) { |
| | | return ApiResponse.success(duLogService.create(duLog)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:dulog:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | duLogService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:dulog:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | duLogService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:dulog:update") |
| | | public ApiResponse updateById(@RequestBody DuLog duLog) { |
| | | duLogService.updateById(duLog); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:dulog:query") |
| | | public ApiResponse<PageData<DuLog>> findPage (@RequestBody PageWrap<DuLog> pageWrap) { |
| | | return ApiResponse.success(duLogService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:dulog:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<DuLog> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(DuLog.class).export(duLogService.findPage(pageWrap).getRecords(), "æ´¾é£å使ä½åå²è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:dulog:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(duLogService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.DuSolution; |
| | | import com.doumee.service.business.DuSolutionService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "æ´¾é£å使¹æ¡ç®¡å
³èä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/duSolution") |
| | | public class DuSolutionController extends BaseController { |
| | | |
| | | @Autowired |
| | | private DuSolutionService duSolutionService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:dusolution:create") |
| | | public ApiResponse create(@RequestBody DuSolution duSolution) { |
| | | return ApiResponse.success(duSolutionService.create(duSolution)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:dusolution:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | duSolutionService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:dusolution:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | duSolutionService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:dusolution:update") |
| | | public ApiResponse updateById(@RequestBody DuSolution duSolution) { |
| | | duSolutionService.updateById(duSolution); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:dusolution:query") |
| | | public ApiResponse<PageData<DuSolution>> findPage (@RequestBody PageWrap<DuSolution> pageWrap) { |
| | | return ApiResponse.success(duSolutionService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:dusolution:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<DuSolution> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(DuSolution.class).export(duSolutionService.findPage(pageWrap).getRecords(), "æ´¾é£å使¹æ¡ç®¡å
³èä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:dusolution:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(duSolutionService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.DuWorktype; |
| | | import com.doumee.service.business.DuWorktypeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "æ´¾é£å使¹æ¡ç®¡å·¥ç§å
³èä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/duWorktype") |
| | | public class DuWorktypeController extends BaseController { |
| | | |
| | | @Autowired |
| | | private DuWorktypeService duWorktypeService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:duworktype:create") |
| | | public ApiResponse create(@RequestBody DuWorktype duWorktype) { |
| | | return ApiResponse.success(duWorktypeService.create(duWorktype)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:duworktype:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | duWorktypeService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:duworktype:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | duWorktypeService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:duworktype:update") |
| | | public ApiResponse updateById(@RequestBody DuWorktype duWorktype) { |
| | | duWorktypeService.updateById(duWorktype); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:duworktype:query") |
| | | public ApiResponse<PageData<DuWorktype>> findPage (@RequestBody PageWrap<DuWorktype> pageWrap) { |
| | | return ApiResponse.success(duWorktypeService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:duworktype:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<DuWorktype> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(DuWorktype.class).export(duWorktypeService.findPage(pageWrap).getRecords(), "æ´¾é£å使¹æ¡ç®¡å·¥ç§å
³èä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:duworktype:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(duWorktypeService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.dto.InsuranceApplyQueryDTO; |
| | | import com.doumee.dao.business.model.InsuranceApply; |
| | | import com.doumee.service.business.InsuranceApplyService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "æä¿ç³è¯·ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/insuranceApply") |
| | | public class InsuranceApplyController extends BaseController { |
| | | |
| | | @Autowired |
| | | private InsuranceApplyService insuranceApplyService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:insuranceapply:create") |
| | | public ApiResponse create(@RequestBody InsuranceApply insuranceApply) { |
| | | return ApiResponse.success(insuranceApplyService.create(insuranceApply)); |
| | | } |
| | | @ApiOperation("平尿ä¿å®¡æ ¸") |
| | | @PostMapping("/check") |
| | | @RequiresPermissions("business:insuranceapply:check") |
| | | public ApiResponse check(@RequestBody InsuranceApply insuranceApply) { |
| | | return ApiResponse.success(insuranceApplyService.check(insuranceApply)); |
| | | } |
| | | @ApiOperation("å¹³å°éåæä¿") |
| | | @PostMapping("/back") |
| | | @RequiresPermissions("business:insuranceapply:back") |
| | | public ApiResponse back(@RequestBody InsuranceApply insuranceApply) { |
| | | return ApiResponse.success(insuranceApplyService.back(insuranceApply)); |
| | | } |
| | | @ApiOperation("å¹³å°ä¸ä¼ æä¿å") |
| | | @PostMapping("/uploadToubaodan") |
| | | @RequiresPermissions("business:insuranceapply:uploadToubaodan") |
| | | public ApiResponse uploadToubaodan(@RequestBody InsuranceApply insuranceApply) { |
| | | return ApiResponse.success(insuranceApplyService.uploadToubaodan(insuranceApply)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/getSignLink/{id}") |
| | | @RequiresPermissions("business:insuranceapply:query") |
| | | public ApiResponse<String> getSignLink(@PathVariable Integer id) { |
| | | return ApiResponse.success(insuranceApplyService.getSignLink(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("å¹³å°ä¸ä¼ ä¿é©å") |
| | | @PostMapping("/uploadBaoxiandan") |
| | | @RequiresPermissions("business:insuranceapply:uploadBaoxiandan") |
| | | public ApiResponse uploadBaoxiandan(@RequestBody InsuranceApply insuranceApply) { |
| | | return ApiResponse.success(insuranceApplyService.uploadBaoxiandan(insuranceApply)); |
| | | } |
| | | @ApiOperation("å¹³å°å¤çéåç³è¯·") |
| | | @PostMapping("/dealBackApply") |
| | | @RequiresPermissions("business:insuranceapply:dealBackApply") |
| | | public ApiResponse dealBackApply(@RequestBody InsuranceApply insuranceApply) { |
| | | return ApiResponse.success(insuranceApplyService.dealBackApply(insuranceApply)); |
| | | } |
| | | @ApiOperation("å¹³å°ä¿®æ¹ä¿é©å") |
| | | @PostMapping("/editBaoxiandan") |
| | | @RequiresPermissions("business:insuranceapply:editBaoxiandan") |
| | | public ApiResponse editBaoxiandan(@RequestBody InsuranceApply insuranceApply) { |
| | | return ApiResponse.success(insuranceApplyService.editBaoxiandan(insuranceApply)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:insuranceapply:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | insuranceApplyService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:insuranceapply:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | insuranceApplyService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:insuranceapply:update") |
| | | public ApiResponse updateById(@RequestBody InsuranceApply insuranceApply) { |
| | | insuranceApplyService.updateById(insuranceApply); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:insuranceapply:query") |
| | | public ApiResponse<PageData<InsuranceApply>> findPage (@RequestBody PageWrap<InsuranceApplyQueryDTO> pageWrap) { |
| | | return ApiResponse.success(insuranceApplyService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:insuranceapply:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<InsuranceApplyQueryDTO> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(InsuranceApply.class).export(insuranceApplyService.findPage(pageWrap).getRecords(), "æä¿ç³è¯·ä¿¡æ¯è¡¨", response); |
| | | } |
| | | @ApiOperation("å¯¼åºæä¿è¯¦æ
å") |
| | | @PostMapping("/exportDetailExcel") |
| | | @RequiresPermissions("business:insuranceapply:exportExcel") |
| | | public void exportDetailExcel (@RequestBody InsuranceApply model, HttpServletResponse response) { |
| | | ExcelExporter.build(InsuranceApply.class).exportApplyDetail(insuranceApplyService.findDetailForExport(model), response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:insuranceapply:query") |
| | | public ApiResponse<InsuranceApply> findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(insuranceApplyService.findDetail(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.Insurance; |
| | | import com.doumee.service.business.InsuranceService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "ä¿é©å
¬å¸ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/insurance") |
| | | public class InsuranceController extends BaseController { |
| | | |
| | | @Autowired |
| | | private InsuranceService insuranceService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:insurance:create") |
| | | public ApiResponse create(@RequestBody Insurance insurance) { |
| | | return ApiResponse.success(insuranceService.create(insurance)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:insurance:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | insuranceService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:insurance:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | insuranceService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:insurance:update") |
| | | public ApiResponse updateById(@RequestBody Insurance insurance) { |
| | | insuranceService.updateById(insurance); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("ç¦ç¨å¯ç¨") |
| | | @PostMapping("/updateStatus") |
| | | @RequiresPermissions("business:insurance:update") |
| | | public ApiResponse updateStatus(@RequestBody Insurance solutions) { |
| | | insuranceService.updateStatus(solutions); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:insurance:query") |
| | | public ApiResponse<PageData<Insurance>> findPage (@RequestBody PageWrap<Insurance> pageWrap) { |
| | | return ApiResponse.success(insuranceService.findPage(pageWrap)); |
| | | } |
| | | @ApiOperation("æ¥è¯¢å
¨é¨") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("business:insurance:query") |
| | | public ApiResponse<List<Insurance>> findList (@RequestBody Insurance pageWrap) { |
| | | return ApiResponse.success(insuranceService.findList(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:insurance:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<Insurance> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(Insurance.class).export(insuranceService.findPage(pageWrap).getRecords(), "ä¿é©å
¬å¸ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:insurance:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(insuranceService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.dto.MemberQueryDTO; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.service.business.MemberService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "ç¨å·¥ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/member") |
| | | public class MemberController extends BaseController { |
| | | |
| | | @Autowired |
| | | private MemberService memberService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:member:create") |
| | | public ApiResponse create(@RequestBody Member member) { |
| | | return ApiResponse.success(memberService.create(member)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:member:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | memberService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:member:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | memberService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:member:update") |
| | | public ApiResponse updateById(@RequestBody Member member) { |
| | | memberService.updateById(member); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:member:query") |
| | | public ApiResponse<PageData<Member>> findPage (@RequestBody PageWrap<MemberQueryDTO> pageWrap) { |
| | | // LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | // pageWrap.getModel().setCompanyId(user.getCompanyId()); |
| | | return ApiResponse.success(memberService.findPageForCompany(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:member:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<MemberQueryDTO> pageWrap, HttpServletResponse response) { |
| | | /* LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | pageWrap.getModel().setCompanyId(user.getCompanyId()); |
| | | List<Member> list = memberService.findPageForCompany(pageWrap).getRecords(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Member member = list.get(i); |
| | | member.setSn(i+1); |
| | | member.setAge(Constants.getAgeByIdCard(member.getIdcardNo())); |
| | | }*/ |
| | | ExcelExporter.build(Member.class).exportWithFirstAndEnd( memberService.findPageForCompany(pageWrap).getRecords(), "åå·¥å表详å","åå·¥å表详å",null, response); |
| | | } |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:member:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(memberService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.MemberInsurance; |
| | | import com.doumee.service.business.MemberInsuranceService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/22 11:55 |
| | | */ |
| | | @Api(tags = "åå·¥æä¿æç»è®°å½") |
| | | @RestController |
| | | @RequestMapping("/business/memberInsurance") |
| | | public class MemberInsuranceController extends BaseController { |
| | | |
| | | @Autowired |
| | | private MemberInsuranceService memberInsuranceService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:memberinsurance:create") |
| | | public ApiResponse create(@RequestBody MemberInsurance memberInsurance) { |
| | | return ApiResponse.success(memberInsuranceService.create(memberInsurance)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:memberinsurance:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | memberInsuranceService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:memberinsurance:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | memberInsuranceService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:memberinsurance:update") |
| | | public ApiResponse updateById(@RequestBody MemberInsurance memberInsurance) { |
| | | memberInsuranceService.updateById(memberInsurance); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("å表æ¥è¯¢") |
| | | @PostMapping("/findList") |
| | | @RequiresPermissions("business:memberinsurance:query") |
| | | public ApiResponse<List<MemberInsurance>> findList (@RequestBody MemberInsurance memberInsurance) { |
| | | return ApiResponse.success(memberInsuranceService.findList(memberInsurance)); |
| | | } |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:memberinsurance:query") |
| | | public ApiResponse<PageData<MemberInsurance>> findPage (@RequestBody PageWrap<MemberInsurance> pageWrap) { |
| | | return ApiResponse.success(memberInsuranceService.findPage(pageWrap)); |
| | | } |
| | | |
| | | // @ApiOperation("导åºExcel") |
| | | // @PostMapping("/exportExcel") |
| | | // @RequiresPermissions("business:memberinsurance:exportExcel") |
| | | // public void exportExcel (@RequestBody PageWrap<MemberInsurance> pageWrap, HttpServletResponse response) { |
| | | // ExcelExporter.build(MemberInsurance.class).export(memberInsuranceService.findPage(pageWrap).getRecords(), "åå·¥æä¿æç»è®°å½", response); |
| | | // } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:memberinsurance:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<MemberInsurance> pageWrap, HttpServletResponse response) { |
| | | List<MemberInsurance> list = memberInsuranceService.findPage(pageWrap).getRecords(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | MemberInsurance memberInsurance = list.get(i); |
| | | memberInsurance.setSn(i+1); |
| | | } |
| | | ExcelExporter.build(MemberInsurance.class).exportWithFirstAndEnd(list, |
| | | "人åæä¿è¯¦å_å§åï¼"+pageWrap.getModel().getMemberName() +"_身份è¯å·ï¼"+pageWrap.getModel().getIdcardNo(), |
| | | "人åæä¿è¯¦å_å§åï¼"+pageWrap.getModel().getMemberName() +"_身份è¯å·ï¼"+pageWrap.getModel().getIdcardNo(),null, response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:memberinsurance:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(memberInsuranceService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.Multifile; |
| | | import com.doumee.service.business.MultifileService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "éä»¶ä¸ä¼ ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/multifile") |
| | | public class MultifileController extends BaseController { |
| | | |
| | | @Autowired |
| | | private MultifileService multifileService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:multifile:create") |
| | | public ApiResponse create(@RequestBody Multifile multifile) { |
| | | return ApiResponse.success(multifileService.create(multifile)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:multifile:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | multifileService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:multifile:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | multifileService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:multifile:update") |
| | | public ApiResponse updateById(@RequestBody Multifile multifile) { |
| | | multifileService.updateById(multifile); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:multifile:query") |
| | | public ApiResponse<PageData<Multifile>> findPage (@RequestBody PageWrap<Multifile> pageWrap) { |
| | | return ApiResponse.success(multifileService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:multifile:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<Multifile> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(Multifile.class).export(multifileService.findPage(pageWrap).getRecords(), "éä»¶ä¸ä¼ ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:multifile:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(multifileService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.Notices; |
| | | import com.doumee.service.business.NoticesService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "ç³»ç»æ¶æ¯ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/notices") |
| | | public class NoticesController extends BaseController { |
| | | |
| | | @Autowired |
| | | private NoticesService noticesService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:notices:create") |
| | | public ApiResponse create(@RequestBody Notices notices) { |
| | | return ApiResponse.success(noticesService.create(notices)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:notices:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | noticesService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:notices:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | noticesService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:notices:update") |
| | | public ApiResponse updateById(@RequestBody Notices notices) { |
| | | noticesService.updateById(notices); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:notices:query") |
| | | public ApiResponse<PageData<Notices>> findPage (@RequestBody PageWrap<Notices> pageWrap) { |
| | | pageWrap.getModel().setPalt(Constants.ZERO); |
| | | return ApiResponse.success(noticesService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:notices:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<Notices> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(Notices.class).export(noticesService.findPage(pageWrap).getRecords(), "ç³»ç»æ¶æ¯ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:notices:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(noticesService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.dto.SCSupplementDTO; |
| | | import com.doumee.dao.business.model.SettleClaims; |
| | | import com.doumee.service.business.SettleClaimsService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "çèµç³è¯·è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/settleClaims") |
| | | public class SettleClaimsController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SettleClaimsService settleClaimsService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:settleclaims:create") |
| | | public ApiResponse create(@RequestBody SettleClaims settleClaims) { |
| | | return ApiResponse.success(settleClaimsService.create(settleClaims)); |
| | | } |
| | | @ApiOperation("æ·»å æ¥æ¡å·") |
| | | @PostMapping("/addCode") |
| | | @RequiresPermissions("business:settleclaims:addCode") |
| | | public ApiResponse addCode(@RequestBody SettleClaims settleClaims) { |
| | | return ApiResponse.success(settleClaimsService.addCode(settleClaims)); |
| | | } |
| | | @ApiOperation("çèµå¤ç") |
| | | @PostMapping("/dealBiz") |
| | | @RequiresPermissions("business:settleclaims:dealBiz") |
| | | public ApiResponse dealBiz(@RequestBody SettleClaims settleClaims) { |
| | | return ApiResponse.success(settleClaimsService.dealBiz(settleClaims)); |
| | | } |
| | | @ApiOperation("ç»æ¡æäº¤") |
| | | @PostMapping("/doneCommit") |
| | | @RequiresPermissions("business:settleclaims:doneCommit") |
| | | public ApiResponse doneCommit(@RequestBody SettleClaims settleClaims) { |
| | | return ApiResponse.success(settleClaimsService.doneCommit(settleClaims)); |
| | | } |
| | | @ApiOperation("æ¤éç³è¯·") |
| | | @PostMapping("/back") |
| | | @RequiresPermissions("business:settleclaims:back") |
| | | public ApiResponse back(@RequestBody SettleClaims settleClaims) { |
| | | return ApiResponse.success(settleClaimsService.back(settleClaims)); |
| | | } |
| | | @ApiOperation("éä»¶ä¸ä¼ ") |
| | | @PostMapping("/claimsUploadFile") |
| | | @RequiresPermissions("business:settleclaims:update") |
| | | public ApiResponse claimsUploadFile(@RequestBody SCSupplementDTO scSupplementDTO) { |
| | | settleClaimsService.claimsUploadFile(scSupplementDTO); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("夿³¨æ ç¾") |
| | | @PostMapping("/remark") |
| | | @RequiresPermissions("business:settleclaims:remark") |
| | | public ApiResponse remark(@RequestBody SettleClaims settleClaims) { |
| | | return ApiResponse.success(settleClaimsService.remark(settleClaims)); |
| | | } |
| | | @ApiOperation("èµæç¡®è®¤") |
| | | @PostMapping("/confirm") |
| | | @RequiresPermissions("business:settleclaims:confirm") |
| | | public ApiResponse confirm(@RequestBody SettleClaims settleClaims) { |
| | | return ApiResponse.success(settleClaimsService.confirm(settleClaims)); |
| | | } |
| | | @ApiOperation("èµæä¸è½½") |
| | | @PostMapping("/exportFiles") |
| | | @RequiresPermissions("business:settleclaims:exportExcel") |
| | | public void exportFiles(@RequestBody SettleClaims model,HttpServletResponse response) { |
| | | if(model.getId() == null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | settleClaimsService.exportFiles(model.getId(),response); |
| | | } |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:settleclaims:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | settleClaimsService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:settleclaims:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | settleClaimsService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:settleclaims:update") |
| | | public ApiResponse updateById(@RequestBody SettleClaims settleClaims) { |
| | | settleClaimsService.updateById(settleClaims); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:settleclaims:query") |
| | | public ApiResponse<PageData<SettleClaims>> findPage (@RequestBody PageWrap<SettleClaims> pageWrap) { |
| | | return ApiResponse.success(settleClaimsService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:settleclaims:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<SettleClaims> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(SettleClaims.class).export(settleClaimsService.findPage(pageWrap).getRecords(), "çèµç³è¯·è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:settleclaims:query") |
| | | public ApiResponse<SettleClaims> findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(settleClaimsService.getSettleClaimsDetail(id)); |
| | | } |
| | | @ApiOperation("å é¤éä»¶") |
| | | @GetMapping("/delFile/{id}/{fileId}") |
| | | @RequiresPermissions("business:settleclaims:query") |
| | | public ApiResponse delFile(@PathVariable(name = "id") Integer id,@PathVariable(name = "fileId") Integer fileId) { |
| | | return ApiResponse.success(settleClaimsService.delFile(id,fileId)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.SettleClaimsLog; |
| | | import com.doumee.service.business.SettleClaimsLogService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "çè³ æä½åå²è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/settleClaimsLog") |
| | | public class SettleClaimsLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SettleClaimsLogService settleClaimsLogService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:settleclaimslog:create") |
| | | public ApiResponse create(@RequestBody SettleClaimsLog settleClaimsLog) { |
| | | return ApiResponse.success(settleClaimsLogService.create(settleClaimsLog)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:settleclaimslog:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | settleClaimsLogService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:settleclaimslog:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | settleClaimsLogService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:settleclaimslog:update") |
| | | public ApiResponse updateById(@RequestBody SettleClaimsLog settleClaimsLog) { |
| | | settleClaimsLogService.updateById(settleClaimsLog); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:settleclaimslog:query") |
| | | public ApiResponse<PageData<SettleClaimsLog>> findPage (@RequestBody PageWrap<SettleClaimsLog> pageWrap) { |
| | | return ApiResponse.success(settleClaimsLogService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:settleclaimslog:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<SettleClaimsLog> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(SettleClaimsLog.class).export(settleClaimsLogService.findPage(pageWrap).getRecords(), "çè³ æä½åå²è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:settleclaimslog:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(settleClaimsLogService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.SignRecord; |
| | | import com.doumee.service.business.SignRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:27 |
| | | */ |
| | | @Api(tags = "çµåç¾ç¾ç½²è®°å½è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/signRecord") |
| | | public class SignRecordController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SignRecordService signRecordService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:signrecord:create") |
| | | public ApiResponse create(@RequestBody SignRecord signRecord) { |
| | | return ApiResponse.success(signRecordService.create(signRecord)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:signrecord:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | signRecordService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:signrecord:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | signRecordService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:signrecord:update") |
| | | public ApiResponse updateById(@RequestBody SignRecord signRecord) { |
| | | signRecordService.updateById(signRecord); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:signrecord:query") |
| | | public ApiResponse<PageData<SignRecord>> findPage (@RequestBody PageWrap<SignRecord> pageWrap) { |
| | | return ApiResponse.success(signRecordService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:signrecord:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<SignRecord> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(SignRecord.class).export(signRecordService.findPage(pageWrap).getRecords(), "çµåç¾ç¾ç½²è®°å½è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:signrecord:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(signRecordService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.SmsEmail; |
| | | import com.doumee.service.business.SmsEmailService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "çä¿¡é®ä»¶ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/smsEmail") |
| | | public class SmsEmailController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SmsEmailService smsEmailService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:smsemail:create") |
| | | public ApiResponse create(@RequestBody SmsEmail smsEmail) { |
| | | return ApiResponse.success(smsEmailService.create(smsEmail)); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("åéçä¿¡éªè¯ç ") |
| | | @PostMapping("/sendSms") |
| | | // @RequiresPermissions("business:smsemail:sendSms") |
| | | public ApiResponse sendSms(@RequestBody SmsEmail smsEmail) { |
| | | return ApiResponse.success(smsEmailService.sendSms(smsEmail)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:smsemail:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | smsEmailService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:smsemail:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | smsEmailService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:smsemail:update") |
| | | public ApiResponse updateById(@RequestBody SmsEmail smsEmail) { |
| | | smsEmailService.updateById(smsEmail); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:smsemail:query") |
| | | public ApiResponse<PageData<SmsEmail>> findPage (@RequestBody PageWrap<SmsEmail> pageWrap) { |
| | | return ApiResponse.success(smsEmailService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:smsemail:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<SmsEmail> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(SmsEmail.class).export(smsEmailService.findPage(pageWrap).getRecords(), "çä¿¡é®ä»¶ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:smsemail:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(smsEmailService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.SolutionWorktype; |
| | | import com.doumee.service.business.SolutionWorktypeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "ä¿é©æ¹æ¡å·¥ç§å
³è表") |
| | | @RestController |
| | | @RequestMapping("/business/solutionWorktype") |
| | | public class SolutionWorktypeController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SolutionWorktypeService solutionWorktypeService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:solutionworktype:create") |
| | | public ApiResponse create(@RequestBody SolutionWorktype solutionWorktype) { |
| | | return ApiResponse.success(solutionWorktypeService.create(solutionWorktype)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:solutionworktype:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | solutionWorktypeService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:solutionworktype:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | solutionWorktypeService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:solutionworktype:update") |
| | | public ApiResponse updateById(@RequestBody SolutionWorktype solutionWorktype) { |
| | | solutionWorktypeService.updateById(solutionWorktype); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:solutionworktype:query") |
| | | public ApiResponse<PageData<SolutionWorktype>> findPage (@RequestBody PageWrap<SolutionWorktype> pageWrap) { |
| | | return ApiResponse.success(solutionWorktypeService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:solutionworktype:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<SolutionWorktype> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(SolutionWorktype.class).export(solutionWorktypeService.findPage(pageWrap).getRecords(), "ä¿é©æ¹æ¡å·¥ç§å
³è表", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:solutionworktype:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(solutionWorktypeService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.SolutionsBase; |
| | | import com.doumee.service.business.SolutionsBaseService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "ä¿é©æ¹æ¡ä¿¡æ¯è¡¨(åºè¡¨ï¼") |
| | | @RestController |
| | | @RequestMapping("/business/solutionsBase") |
| | | public class SolutionsBaseController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SolutionsBaseService solutionsBaseService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:solutionsbase:create") |
| | | public ApiResponse create(@RequestBody SolutionsBase solutionsBase) { |
| | | return ApiResponse.success(solutionsBaseService.create(solutionsBase)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:solutionsbase:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | solutionsBaseService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:solutionsbase:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | solutionsBaseService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:solutionsbase:update") |
| | | public ApiResponse updateById(@RequestBody SolutionsBase solutionsBase) { |
| | | solutionsBaseService.updateById(solutionsBase); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:solutionsbase:query") |
| | | public ApiResponse<PageData<SolutionsBase>> findPage (@RequestBody PageWrap<SolutionsBase> pageWrap) { |
| | | return ApiResponse.success(solutionsBaseService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:solutionsbase:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<SolutionsBase> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(SolutionsBase.class).export(solutionsBaseService.findPage(pageWrap).getRecords(), "ä¿é©æ¹æ¡ä¿¡æ¯è¡¨(åºè¡¨ï¼", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:solutionsbase:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(solutionsBaseService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.Solutions; |
| | | import com.doumee.service.business.SolutionsService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "ä¿é©æ¹æ¡ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/solutions") |
| | | public class SolutionsController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SolutionsService solutionsService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:solutions:create") |
| | | public ApiResponse create(@RequestBody Solutions solutions) { |
| | | return ApiResponse.success(solutionsService.create(solutions)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:solutions:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | solutionsService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:solutions:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | solutionsService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:solutions:update") |
| | | public ApiResponse updateById(@RequestBody Solutions solutions) { |
| | | solutionsService.updateById(solutions); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ç¦ç¨å¯ç¨") |
| | | @PostMapping("/updateStatus") |
| | | @RequiresPermissions("business:solutions:update") |
| | | public ApiResponse updateStatus(@RequestBody Solutions solutions) { |
| | | solutionsService.updateStatus(solutions); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:solutions:query") |
| | | public ApiResponse<PageData<Solutions>> findPage (@RequestBody PageWrap<Solutions> pageWrap) { |
| | | return ApiResponse.success(solutionsService.findPage(pageWrap)); |
| | | } |
| | | @ApiOperation("æ¥è¯¢å
¨é¨") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("business:solutions:query") |
| | | public ApiResponse<List<Solutions>> findList (@RequestBody Solutions pageWrap) { |
| | | return ApiResponse.success(solutionsService.findList(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:solutions:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<Solutions> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(Solutions.class).export(solutionsService.findPage(pageWrap).getRecords(), "ä¿é©æ¹æ¡ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:solutions:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(solutionsService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.TaxDetial; |
| | | import com.doumee.service.business.TaxDetialService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "å票æç»ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/taxDetial") |
| | | public class TaxDetialController extends BaseController { |
| | | |
| | | @Autowired |
| | | private TaxDetialService taxDetialService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:taxdetial:create") |
| | | public ApiResponse create(@RequestBody TaxDetial taxDetial) { |
| | | return ApiResponse.success(taxDetialService.create(taxDetial)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:taxdetial:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | taxDetialService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:taxdetial:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | taxDetialService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:taxdetial:update") |
| | | public ApiResponse updateById(@RequestBody TaxDetial taxDetial) { |
| | | taxDetialService.updateById(taxDetial); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:taxdetial:query") |
| | | public ApiResponse<PageData<TaxDetial>> findPage (@RequestBody PageWrap<TaxDetial> pageWrap) { |
| | | return ApiResponse.success(taxDetialService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:taxdetial:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<TaxDetial> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(TaxDetial.class).export(taxDetialService.findPage(pageWrap).getRecords(), "å票æç»ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:taxdetial:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(taxDetialService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.Taxes; |
| | | import com.doumee.service.business.TaxesService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "å票信æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/taxes") |
| | | public class TaxesController extends BaseController { |
| | | |
| | | @Autowired |
| | | private TaxesService taxesService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:taxes:create") |
| | | public ApiResponse create(@RequestBody Taxes taxes) { |
| | | return ApiResponse.success(taxesService.create(taxes)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:taxes:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | taxesService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:taxes:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | taxesService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:taxes:update") |
| | | public ApiResponse updateById(@RequestBody Taxes taxes) { |
| | | taxesService.updateById(taxes); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDéåç³è¯·") |
| | | @PostMapping("/backApply") |
| | | @RequiresPermissions("business:taxes:update") |
| | | public ApiResponse backApply(@RequestBody Taxes taxes) { |
| | | taxesService.backApply(taxes); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("ä¸ä¼ å票åè¯æäº¤ä¿å") |
| | | @PostMapping("/doneApply") |
| | | @RequiresPermissions("business:taxes:update") |
| | | public ApiResponse doneApply(@RequestBody Taxes taxes) { |
| | | taxesService.doneApply(taxes); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:taxes:query") |
| | | public ApiResponse<PageData<Taxes>> findPage (@RequestBody PageWrap<Taxes> pageWrap) { |
| | | return ApiResponse.success(taxesService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:taxes:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<Taxes> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(Taxes.class).export(taxesService.findPage(pageWrap).getRecords(), "å票信æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:taxes:query") |
| | | public ApiResponse<Taxes> findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(taxesService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.UnionApply; |
| | | import com.doumee.service.business.UnionApplyService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/03/12 11:34 |
| | | */ |
| | | @Api(tags = "åå¹¶æä¿åä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/unionApply") |
| | | public class UnionApplyController extends BaseController { |
| | | |
| | | @Autowired |
| | | private UnionApplyService unionApplyService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:unionapply:create") |
| | | public ApiResponse create(@RequestBody UnionApply unionApply) { |
| | | return ApiResponse.success(unionApplyService.create(unionApply)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:unionapply:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | unionApplyService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:unionapply:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | unionApplyService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:unionapply:update") |
| | | public ApiResponse updateById(@RequestBody UnionApply unionApply) { |
| | | unionApplyService.updateById(unionApply); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:unionapply:query") |
| | | public ApiResponse<PageData<UnionApply>> findPage (@RequestBody PageWrap<UnionApply> pageWrap) { |
| | | return ApiResponse.success(unionApplyService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:unionapply:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<UnionApply> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(UnionApply.class).export(unionApplyService.findPage(pageWrap).getRecords(), "åå¹¶æä¿åä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:unionapply:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(unionApplyService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.UnionChange; |
| | | import com.doumee.service.business.UnionChangeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/03/12 11:34 |
| | | */ |
| | | @Api(tags = "å åä¿æ¢ååå¹¶åä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/unionChange") |
| | | public class UnionChangeController extends BaseController { |
| | | |
| | | @Autowired |
| | | private UnionChangeService unionChangeService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:unionchange:create") |
| | | public ApiResponse create(@RequestBody UnionChange unionChange) { |
| | | return ApiResponse.success(unionChangeService.create(unionChange)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:unionchange:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | unionChangeService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:unionchange:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | unionChangeService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:unionchange:update") |
| | | public ApiResponse updateById(@RequestBody UnionChange unionChange) { |
| | | unionChangeService.updateById(unionChange); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:unionchange:query") |
| | | public ApiResponse<PageData<UnionChange>> findPage (@RequestBody PageWrap<UnionChange> pageWrap) { |
| | | return ApiResponse.success(unionChangeService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:unionchange:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<UnionChange> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(UnionChange.class).export(unionChangeService.findPage(pageWrap).getRecords(), "å åä¿æ¢ååå¹¶åä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:unionchange:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(unionChangeService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.dto.WorkTypeQueryDTO; |
| | | import com.doumee.dao.business.model.Worktype; |
| | | import com.doumee.service.business.WorktypeService; |
| | | import io.swagger.annotations.*; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "å·¥ç§ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/worktype") |
| | | public class WorktypeController extends BaseController { |
| | | |
| | | @Autowired |
| | | private WorktypeService worktypeService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:worktype:create") |
| | | public ApiResponse create(@RequestBody Worktype worktype) { |
| | | return ApiResponse.success(worktypeService.create(worktype)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:worktype:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | worktypeService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:worktype:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | worktypeService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:worktype:update") |
| | | public ApiResponse updateById(@RequestBody Worktype worktype) { |
| | | worktypeService.updateById(worktype); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("æ ¹æ®æ¡ä»¶å·¥ç§å表") |
| | | @PostMapping("/findListByDTO") |
| | | public ApiResponse<List<Worktype>> findListByDTO (@RequestBody WorkTypeQueryDTO workTypeQueryDTO) { |
| | | return ApiResponse.success(worktypeService.findListByDTO(workTypeQueryDTO)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:worktype:query") |
| | | public ApiResponse<PageData<Worktype>> findPage (@RequestBody PageWrap<Worktype> pageWrap) { |
| | | return ApiResponse.success(worktypeService.findPage(pageWrap)); |
| | | } |
| | | @ApiOperation("æ¥è¯¢å
¨é¨") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("business:worktype:query") |
| | | public ApiResponse<List<Worktype>> findList (@RequestBody Worktype pageWrap) { |
| | | return ApiResponse.success(worktypeService.findList(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:worktype:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<Worktype> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(Worktype.class).export(worktypeService.findPage(pageWrap).getRecords(), "å·¥ç§ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("导å
¥æ¨¡æ¿") |
| | | @PostMapping("/importExcel") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "file", value = "file", required = true, paramType = "query", dataType = "file", dataTypeClass = File.class), |
| | | }) |
| | | @RequiresPermissions("business:worktype:create") |
| | | public ApiResponse<List<String>> importExcel (@ApiParam(value = "file") MultipartFile file ) { |
| | | return ApiResponse.success(worktypeService .importBatch(file)); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:worktype:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(worktypeService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.common; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.service.common.CaptchaService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/02/14 11:14 |
| | | */ |
| | | @Api(tags = "å¾çéªè¯ç æ¥å£") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | @RequestMapping("/common") |
| | | public class CaptchaController extends BaseController { |
| | | |
| | | @Autowired |
| | | private CaptchaService captchaService; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/02/14 11:14 |
| | | */ |
| | | @ApiOperation("è·åå¾çéªè¯ç ") |
| | | @GetMapping("/captcha") |
| | | public ApiResponse<CaptchaService.Captcha> getCaptcha() { |
| | | return ApiResponse.success(captchaService.genCaptcha()); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.common; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.annotation.excel.ExcelToPdfTool; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.aliyun.ALiYunUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.springframework.web.multipart.commons.CommonsMultipartResolver; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.io.PrintWriter; |
| | | import java.util.HashMap; |
| | | import java.util.Iterator; |
| | | import java.util.Map; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/02/14 11:14 |
| | | */ |
| | | @Api(tags = "å
Œ
±æ¥å£") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | @RequestMapping("/public") |
| | | @Slf4j |
| | | public class PublicController extends BaseController { |
| | | |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | @ApiOperation("æµè¯") |
| | | @PostMapping("/testPdf") |
| | | public String testPdf(@RequestParam Map<String,String> req, HttpServletResponse response) { |
| | | ExcelToPdfTool.excelToPdf(req.get("f1"),req.get("f2")); |
| | | return JSONObject.toJSONString(req); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¸ä¼ ", notes = "ä¸ä¼ ", httpMethod = "POST", position = 6) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "folder", value = "æä»¶å¤¹", required = true, paramType = "query", dataType = "String", dataTypeClass = String.class), |
| | | }) |
| | | @PostMapping(value = "/upload", headers = "content-type=multipart/form-data") |
| | | public void uploadMobile(String folder, HttpServletRequest request, HttpServletResponse response) throws Exception { |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | upload(multipartRequest, response, folder + "/", |
| | | systemDictDataBiz.queryByCode(Constants.OSS,Constants.BUCKETNAME).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.OSS,Constants.ACCESS_ID).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.OSS,Constants.ACCESS_KEY).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.OSS,Constants.ENDPOINT).getCode()); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "ä¸ä¼ å¾ç", notes = "ä¸ä¼ å¾ç", httpMethod = "POST", position = 6) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "folder", value = "æä»¶å¤¹", required = true, paramType = "query", dataType = "String", dataTypeClass = String.class), |
| | | }) |
| | | @PostMapping(value = "/uploadPicture", headers = "content-type=multipart/form-data") |
| | | public void uploadPicture(String folder, HttpServletRequest request, HttpServletResponse response) throws Exception { |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | Iterator<String> fileNames = multipartRequest.getFileNames(); |
| | | Map<String, Object> context = new HashMap<>(); |
| | | while (fileNames.hasNext()){ |
| | | MultipartFile file = multipartRequest.getFile(fileNames.next()); |
| | | String fileName = file.getOriginalFilename(); |
| | | String suffix = fileName.substring(fileName.lastIndexOf(".")); |
| | | if ( !StringUtils.equalsIgnoreCase(suffix, ".jpg") && !StringUtils.equalsIgnoreCase(suffix, ".png")) { |
| | | context.put("code", 0); |
| | | context.put("message", "对ä¸èµ·ï¼æä»¶æ ¼å¼ä¸ä¼ æè¯¯ï¼"); |
| | | return; |
| | | } |
| | | } |
| | | upload(multipartRequest, response, folder + "/", |
| | | systemDictDataBiz.queryByCode(Constants.OSS,Constants.BUCKETNAME).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.OSS,Constants.ACCESS_ID).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.OSS,Constants.ACCESS_KEY).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.OSS,Constants.ENDPOINT).getCode()); |
| | | } |
| | | |
| | | public void upload(HttpServletRequest request, HttpServletResponse response, String folder, String bucketName, |
| | | String access_id, String access_key, String resourcePath, String endpoint) throws Exception { |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setContentType("text/html;charset=UTF-8"); |
| | | Map<String, Object> context = new HashMap<>(); |
| | | CommonsMultipartResolver multipartResovler = new CommonsMultipartResolver(); |
| | | if (multipartResovler.isMultipart(request)) { |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | Iterator<String> it = multipartRequest.getFileNames(); |
| | | while (it.hasNext()) { |
| | | MultipartFile file = multipartRequest.getFile((String) it.next());// file |
| | | // multipartRequest.getFile((String) |
| | | // it.next()); |
| | | if (file != null) { |
| | | // 1ãä¸ä¼ å°æå¡å¨ä¸´æ¶æä»¶å¤¹ |
| | | String uploadFileName = file.getOriginalFilename(); |
| | | String originname = uploadFileName; |
| | | if (originname.lastIndexOf("/") >= 0) { |
| | | originname = originname.substring(originname.lastIndexOf("/") + 1); |
| | | } |
| | | String nfix = "";// åç¼å |
| | | if (StringUtils.isNotBlank(uploadFileName)) { |
| | | nfix = uploadFileName.substring(uploadFileName.lastIndexOf(".")); |
| | | } |
| | | if (StringUtils.equalsIgnoreCase(nfix, ".exe")) { |
| | | context.put("code", 4000); |
| | | context.put("message", "对ä¸èµ·ï¼æä»¶æ ¼å¼\".exe\"ä¸ä¼ æè¯¯ï¼"); |
| | | return; |
| | | } |
| | | if (StringUtils.equalsIgnoreCase(nfix, ".dll")) { |
| | | context.put("code", 4000); |
| | | context.put("message", "对ä¸èµ·ï¼æä»¶æ ¼å¼\".dll\"ä¸ä¼ æè¯¯ï¼"); |
| | | return; |
| | | } |
| | | String nowDate = DateUtil.getNowShortDate();// å½åæ¶é´ï¼å¹´ææ¥ï¼ |
| | | String fileName = UUID.randomUUID().toString() + nfix; |
| | | String tempFileName = nowDate + "/" + fileName; |
| | | String key = folder + tempFileName;// æä»¶å |
| | | ALiYunUtil obs = new ALiYunUtil(endpoint,access_id, access_key); |
| | | int type = 2; |
| | | if(StringUtils.endsWith(key,".mp4")){ |
| | | type =1; |
| | | }else if(StringUtils.endsWith(key,".jpg") |
| | | || StringUtils.endsWith(key,".JPG") |
| | | || StringUtils.endsWith(key,".png") |
| | | || StringUtils.endsWith(key,".PNG") |
| | | || StringUtils.endsWith(key,".jpeg") |
| | | || StringUtils.endsWith(key,".JPEG")){ |
| | | type =0; |
| | | } |
| | | if (obs.uploadOnlineObject(file.getInputStream(),bucketName, key,null)) { |
| | | // ç§»å¨æå,è¿åæä»¶å |
| | | // sendSuccessMessage(response, resourcePath+key); |
| | | context.put("success", true); |
| | | context.put("code", 200); |
| | | context.put("errno",0); |
| | | JSONObject fileJSON = new JSONObject(); |
| | | fileJSON.put("url", resourcePath + key); |
| | | fileJSON.put("imgaddr", tempFileName); |
| | | fileJSON.put("imgname", fileName); |
| | | fileJSON.put("type", type); |
| | | fileJSON.put("originname", originname); |
| | | context.put("data",fileJSON); |
| | | context.put("message","è¯·æ±æå"); |
| | | writerJson(response, context); |
| | | return; |
| | | } else { |
| | | // ç§»å¨å¤±è´¥ |
| | | context.put("code", 0); |
| | | context.put("message", "ä¸ä¼ 失败"); |
| | | writerJson(response, context); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | context.put("code", 0); |
| | | context.put("message", "ä¸ä¼ 失败"); |
| | | context.put("errno",0); |
| | | writerJson(response, context); |
| | | return; |
| | | } |
| | | |
| | | public static void writerJson(HttpServletResponse response, Object object) { |
| | | response.setContentType("application/json"); |
| | | writer(response, JSONObject.toJSONString(object)); |
| | | } |
| | | |
| | | private static void writer(HttpServletResponse response, String str) { |
| | | try { |
| | | StringBuffer result = new StringBuffer(); |
| | | //设置页é¢ä¸ç¼å |
| | | response.setHeader("Pragma", "No-cache"); |
| | | response.setHeader("Cache-Control", "no-cache"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | PrintWriter out = null; |
| | | out = response.getWriter(); |
| | | out.print(str); |
| | | out.flush(); |
| | | out.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "ä¸ä¼ ", notes = "ä¸ä¼ ", httpMethod = "POST", position = 6) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "folder", value = "æä»¶å¤¹", required = true, paramType = "query", dataType = "String", dataTypeClass = String.class), |
| | | }) |
| | | @PostMapping(value = "/uploadLocal", headers = "content-type=multipart/form-data") |
| | | public void uploadLocal(String folder, HttpServletRequest request, HttpServletResponse response) throws Exception { |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | |
| | | // CommonsMultipartFile files = (CommonsMultipartFile) multipartRequest.getFile("filedata"); |
| | | uploadFileLocal(multipartRequest, folder+ "/", response, |
| | | systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.GOODS_IMG_DIR).getCode() , |
| | | systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.FILE_DIR).getCode()); |
| | | |
| | | } |
| | | |
| | | public void uploadFileLocal(HttpServletRequest request, String folder, HttpServletResponse response, String rootPath,String dir) throws Exception { |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setContentType("text/html;charset=UTF-8"); |
| | | CommonsMultipartResolver multipartResovler = new CommonsMultipartResolver(); |
| | | Map<String, Object> context = new HashMap<>(); |
| | | if (multipartResovler.isMultipart(request)) { |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | Iterator<String> it = multipartRequest.getFileNames(); |
| | | while (it.hasNext()) { |
| | | MultipartFile file = multipartRequest.getFile((String) it.next());// file |
| | | // = |
| | | // (CommonsMultipartFile) |
| | | // multipartRequest.getFile((String) |
| | | // it.next()); |
| | | if (file != null) { |
| | | if (file.getSize() > 200 * 1024 * 1024L) { |
| | | context.put("code", 4000); |
| | | context.put("message", "ä¸ä¼ æä»¶è¿å¤§"); |
| | | return; |
| | | } |
| | | System.out.println(file.getOriginalFilename()); |
| | | if (file.getOriginalFilename() == null) { |
| | | context.put("code", 4000); |
| | | context.put("message", "æä»¶åä¸å¯ä¸ºç©º"); |
| | | return; |
| | | } |
| | | /* |
| | | * if(file.getOriginalFilename().contains(",")||file.getOriginalFilename(). |
| | | * contains(" ")){ sendFailureMessage(response,"æä»¶åç§°æè¯¯,ä¸å¯å«æéå·çç¹æ®å符"); } |
| | | */ |
| | | |
| | | String nowDate = DateUtil.getNowShortDate(); |
| | | folder += nowDate + "/"; |
| | | String strDirPath = rootPath + folder; |
| | | File dirPath = new File(strDirPath); |
| | | if (!dirPath.exists()) { |
| | | dirPath.mkdirs(); |
| | | } |
| | | String uploadFileName = file.getOriginalFilename(); |
| | | String x = UUID.randomUUID().toString().replace("-", "") |
| | | + uploadFileName.substring(uploadFileName.lastIndexOf(".")); |
| | | String fileName = folder + x; |
| | | String fileNames = nowDate + "/" + x; |
| | | uploadFileName = uploadFileName.replace(" ", ""); |
| | | uploadFileName = uploadFileName.replace("ï¼", ","); |
| | | uploadFileName = uploadFileName.replaceAll(",", "-"); |
| | | System.err.println("R:" + fileName); |
| | | String fileAndPath = dir + fileName; |
| | | System.err.println("A:" + fileAndPath); |
| | | // 夿妿䏴æ¶ç®å½ä¸åå¨ç¸ååç§°çæä»¶å
å é¤ï¼å¨ä¸ä¼ |
| | | File tempFile = new File(rootPath + fileName); |
| | | if (tempFile.isFile() && tempFile.exists()) { |
| | | tempFile.getAbsoluteFile().delete(); |
| | | } |
| | | // ä¸ä¼ å°æå¡å¨ä¸´æ¶æä»¶å¤¹ |
| | | file.transferTo(tempFile); |
| | | // 转移å°FTPæå¡å¨ |
| | | String nfix = ""; |
| | | if (null != uploadFileName) { |
| | | nfix = uploadFileName.substring(uploadFileName.lastIndexOf(".")); |
| | | } |
| | | |
| | | if (StringUtils.equalsIgnoreCase(nfix, ".exe")) { |
| | | context.put("code", 4000); |
| | | context.put("message", "对ä¸èµ·ï¼æä»¶æ ¼å¼\".exe\"ä¸ä¼ æè¯¯ï¼"); |
| | | return; |
| | | } |
| | | if (StringUtils.equalsIgnoreCase(nfix, ".dll")) { |
| | | context.put("code", 4000); |
| | | context.put("message", "对ä¸èµ·ï¼æä»¶æ ¼å¼\".dll\"ä¸ä¼ æè¯¯ï¼"); |
| | | return; |
| | | } |
| | | |
| | | String remoteName = fileName; |
| | | String remoteFileName = fileAndPath; |
| | | |
| | | /* Map map = new HashMap(); |
| | | map.put("url", remoteFileName); |
| | | map.put("alt", uploadFileName); |
| | | map.put("href", remoteFileName); |
| | | List maps = Arrays.asList(remoteFileName);*/ |
| | | |
| | | if (true) { |
| | | // å
³éFTPæµ |
| | | // ç§»å¨æå,è¿åæä»¶å |
| | | /*context.put("error", 0); |
| | | context.put("url", remoteFileName); |
| | | context.put("fullurl", remoteFileName); |
| | | context.put("fname", uploadFileName); |
| | | context.put("data", maps); |
| | | context.put("halfurl", fileNames);*/ |
| | | |
| | | context.put("success", true); |
| | | context.put("code", 200); |
| | | context.put("errno",0); |
| | | JSONObject fileJSON = new JSONObject(); |
| | | fileJSON.put("url", remoteFileName); |
| | | fileJSON.put("imgaddr", fileNames); |
| | | fileJSON.put("imgname", uploadFileName); |
| | | fileJSON.put("originname", uploadFileName); |
| | | context.put("data",fileJSON); |
| | | context.put("message","è¯·æ±æå"); |
| | | |
| | | writerJson(response, context); |
| | | return; |
| | | } else { |
| | | // ç§»å¨å¤±è´¥ |
| | | context.put("code", 0); |
| | | context.put("message", "ä¸ä¼ 失败"); |
| | | writerJson(response, context); |
| | | } |
| | | } |
| | | context.put("code", 0); |
| | | context.put("message", "ä¸ä¼ 失败"); |
| | | writerJson(response, context); |
| | | return; |
| | | } |
| | | } |
| | | context.put("code", 0); |
| | | context.put("message", "ä¸ä¼ 失败"); |
| | | writerJson(response, context); |
| | | return; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.system; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemUserBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.LoginDTO; |
| | | import com.doumee.dao.system.dto.LoginPhoneDTO; |
| | | import com.doumee.dao.system.dto.UpdatePwdDto; |
| | | import com.doumee.dao.system.dto.WebLoginDTO; |
| | | import com.doumee.service.system.SystemLoginService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.subject.Subject; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "ç³»ç»åè½") |
| | | @Trace(exclude = true) |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/system") |
| | | public class SystemController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemUserBiz systemUserBiz; |
| | | |
| | | @Autowired |
| | | private SystemLoginService systemLoginService; |
| | | |
| | | @PreventRepeat(limit = 10, lockTime = 10000) |
| | | @ApiOperation("ç»å½ - å端") |
| | | @PostMapping("/login") |
| | | public ApiResponse<String> login (@Validated @RequestBody LoginDTO dto, HttpServletRequest request) { |
| | | return ApiResponse.success(systemLoginService.loginByPassword(dto, Constants.TWO, request)); |
| | | } |
| | | |
| | | @PreventRepeat(limit = 10, lockTime = 10000) |
| | | @ApiOperation("çä¿¡éªè¯ç ç»å½") |
| | | @PostMapping("/loginByPhone") |
| | | public ApiResponse<String> loginByPhone (@Validated @RequestBody LoginPhoneDTO dto, HttpServletRequest request) { |
| | | return ApiResponse.success(systemLoginService.loginByPhone(dto, Constants.TWO, request)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("éåºç»å½") |
| | | @PostMapping("/logout") |
| | | public ApiResponse logout () { |
| | | Subject subject = SecurityUtils.getSubject(); |
| | | subject.logout(); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @Trace(withRequestParameters = false) |
| | | @ApiOperation("ä¿®æ¹å½åç¨æ·å¯ç ") |
| | | @PostMapping("/updatePwd") |
| | | public ApiResponse updatePwd (@Validated @RequestBody UpdatePwdDto dto) { |
| | | dto.setUserId(this.getLoginUser().getId()); |
| | | systemUserBiz.updatePwd(dto); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("è·åå½åç»å½çç¨æ·ä¿¡æ¯") |
| | | @GetMapping("/getUserInfo") |
| | | public ApiResponse<LoginUserInfo> getUserInfo () { |
| | | return ApiResponse.success(this.getLoginUser()); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.system; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDataPermissionBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.constants.DataPermissionConstants; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.system.model.SystemDataPermission; |
| | | import com.doumee.dao.system.vo.SystemDataPermissionListVO; |
| | | import com.doumee.service.system.SystemDataPermissionService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/system/dataPermission") |
| | | @Api(tags = "ç³»ç»æ°æ®æé") |
| | | public class SystemDataPermissionController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemDataPermissionService systemDataPermissionService; |
| | | |
| | | @Autowired |
| | | private SystemDataPermissionBiz systemDataPermissionBiz; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:datapermission:create") |
| | | public ApiResponse create(@Validated(OperaType.Create.class) @RequestBody SystemDataPermission systemDataPermission) { |
| | | return ApiResponse.success(systemDataPermissionBiz.create(systemDataPermission)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:datapermission:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | systemDataPermissionService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:datapermission:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemDataPermissionService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:datapermission:update") |
| | | public ApiResponse updateById(@Validated(OperaType.Update.class) @RequestBody SystemDataPermission systemDataPermission) { |
| | | systemDataPermissionBiz.update(systemDataPermission); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹ç¶æ") |
| | | @PostMapping("/updateStatus") |
| | | @RequiresPermissions("system:datapermission:update") |
| | | public ApiResponse updateStatus(@Validated(OperaType.UpdateStatus.class) @RequestBody SystemDataPermission systemDataPermission) { |
| | | systemDataPermissionBiz.updateStatus(systemDataPermission); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("system:datapermission:query") |
| | | public ApiResponse<PageData<SystemDataPermissionListVO>> findPage (@RequestBody PageWrap<SystemDataPermission> pageWrap) { |
| | | return ApiResponse.success(systemDataPermissionService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @Trace(exclude = true) |
| | | @ApiOperation("æ¥è¯¢æ°æ®æéç±»å") |
| | | @GetMapping("/types") |
| | | public ApiResponse<List<Map<String, Object>>> findTypes () { |
| | | return ApiResponse.success(DataPermissionConstants.Type.valueList()); |
| | | } |
| | | |
| | | @Trace(exclude = true) |
| | | @ApiOperation("æ¥è¯¢æ°æ®æé模å") |
| | | @GetMapping("/modules") |
| | | public ApiResponse<List<Map<String, Object>>> findModules () { |
| | | return ApiResponse.success(DataPermissionConstants.Module.valueList()); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.system; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDepartmentBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.system.dto.QuerySystemUserDTO; |
| | | import com.doumee.dao.system.model.SystemDepartment; |
| | | import com.doumee.dao.system.vo.SystemDepartmentListVO; |
| | | import com.doumee.dao.system.vo.SystemUserListVO; |
| | | import com.doumee.service.system.SystemUserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "é¨é¨") |
| | | @RestController |
| | | @RequestMapping("/system/department") |
| | | public class SystemDepartmentController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemDepartmentBiz systemDepartmentBiz; |
| | | |
| | | @Autowired |
| | | private SystemUserService systemUserService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:department:create") |
| | | public ApiResponse create(@Validated(OperaType.Create.class) @RequestBody SystemDepartment systemDepartment) { |
| | | systemDepartment.setCreateUser(getLoginUser().getId()); |
| | | systemDepartment.setUpdateUser(getLoginUser().getId()); |
| | | return ApiResponse.success(systemDepartmentBiz.create(systemDepartment)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:department:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | systemDepartmentBiz.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @PreventRepeat |
| | | @RequiresPermissions("system:department:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemDepartmentBiz.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:department:update") |
| | | public ApiResponse updateById(@Validated(OperaType.Update.class) @RequestBody SystemDepartment systemDepartment) { |
| | | systemDepartment.setCreateUser(getLoginUser().getId()); |
| | | systemDepartment.setUpdateUser(getLoginUser().getId()); |
| | | systemDepartmentBiz.updateById(systemDepartment); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢é¨é¨å表") |
| | | @PostMapping("/tree") |
| | | @RequiresPermissions("system:department:query") |
| | | public ApiResponse<List<SystemDepartmentListVO>> findTree () { |
| | | return ApiResponse.success(systemDepartmentBiz.findTree()); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢é¨é¨å表åé¨é¨ä¸ç人å") |
| | | @GetMapping("/findTreeUser") |
| | | @RequiresPermissions("system:department:query") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "parentId", value = "parentId", paramType = "query", dataType = "Integer"), |
| | | }) |
| | | public ApiResponse<SystemDepartmentListVO> findTreeUser(Integer parentId) { |
| | | return ApiResponse.success(systemDepartmentBiz.findTreeUser(parentId)); |
| | | } |
| | | |
| | | @Trace(exclude = true) |
| | | @ApiOperation("æ¥è¯¢é¨é¨äººå") |
| | | @PostMapping("/users") |
| | | @RequiresPermissions("system:department:queryUsers") |
| | | public ApiResponse<PageData<SystemUserListVO>> findPage (@RequestBody PageWrap<QuerySystemUserDTO> pageWrap) { |
| | | return ApiResponse.success(systemUserService.findPage(pageWrap)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.system; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDictBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.system.dto.QuerySystemDictDTO; |
| | | import com.doumee.dao.system.model.SystemDict; |
| | | import com.doumee.dao.system.vo.SystemDictListVO; |
| | | import com.doumee.service.system.SystemDictService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "ç³»ç»åå
¸") |
| | | @RestController |
| | | @RequestMapping("/system/dict") |
| | | public class SystemDictController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemDictService systemDictService; |
| | | |
| | | @Autowired |
| | | private SystemDictBiz systemDictBiz; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:dict:create") |
| | | public ApiResponse create(@Validated(OperaType.Create.class) @RequestBody SystemDict systemDict) { |
| | | return ApiResponse.success(systemDictBiz.create(systemDict)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:dict:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | systemDictService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:dict:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemDictService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:dict:update") |
| | | public ApiResponse updateById(@Validated(OperaType.Update.class) @RequestBody SystemDict systemDict) { |
| | | systemDictBiz.updateById(systemDict); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("system:dict:query") |
| | | public ApiResponse<PageData<SystemDictListVO>> findPage (@RequestBody PageWrap<QuerySystemDictDTO> pageWrap) { |
| | | return ApiResponse.success(systemDictService.findPage(pageWrap)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.system; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.system.dto.QuerySystemDictDataDTO; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.dao.system.vo.SystemDictDataListVO; |
| | | import com.doumee.service.system.SystemDictDataService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "åå
¸æ°æ®") |
| | | @RestController |
| | | @RequestMapping("/system/dictData") |
| | | public class SystemDictDataController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemDictDataService systemDictDataService; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:dict:update") |
| | | public ApiResponse create(@Validated(OperaType.Create.class) @RequestBody SystemDictData systemDictData) { |
| | | return ApiResponse.success(systemDictDataBiz.create(systemDictData)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:dict:update") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | systemDictDataService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:dict:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemDictDataService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:dict:update") |
| | | public ApiResponse updateById(@Validated(OperaType.Update.class) @RequestBody SystemDictData systemDictData) { |
| | | systemDictDataBiz.updateById(systemDictData); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("system:dict:update") |
| | | public ApiResponse<PageData<SystemDictDataListVO>> findPage (@RequestBody PageWrap<QuerySystemDictDataDTO> pageWrap) { |
| | | return ApiResponse.success(systemDictDataService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation("ç¼è¾æ¥è¯¢åè±ä»»å¡è§å") |
| | | @PostMapping("/createCoffeeTask") |
| | | @RequiresPermissions("system:dict:update") |
| | | public ApiResponse createCoffeeTask(@Validated(OperaType.Create.class) @RequestBody List<SystemDictData> list) { |
| | | systemDictDataBiz.updateByDicId(list); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.system; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.system.dto.QuerySystemLoginLogDTO; |
| | | import com.doumee.dao.system.model.SystemLoginLog; |
| | | import com.doumee.service.system.SystemLoginLogService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/system/loginLog") |
| | | @Api(tags = "ç»å½æ¥å¿") |
| | | public class SystemLoginLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemLoginLogService systemLoginLogService; |
| | | |
| | | @PostMapping("/page") |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @RequiresPermissions("system:loginLog:query") |
| | | public ApiResponse<PageData<SystemLoginLog>> findPage (@RequestBody PageWrap<QuerySystemLoginLogDTO> pageWrap) { |
| | | return ApiResponse.success(systemLoginLogService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @PostMapping("/exportExcel") |
| | | @ApiOperation("导åºExcel") |
| | | @RequiresPermissions("system:loginLog:query") |
| | | public void export (@RequestBody PageWrap<QuerySystemLoginLogDTO> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(SystemLoginLog.class).export(systemLoginLogService.findPage(pageWrap).getRecords(), "ç»å½æ¥å¿", response); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.system; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemMenuBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.dao.system.dto.UpdateSystemMenuSortDTO; |
| | | import com.doumee.dao.system.model.SystemMenu; |
| | | import com.doumee.dao.system.vo.SystemMenuListVO; |
| | | import com.doumee.dao.system.vo.SystemMenuNodeVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "ç³»ç»èå") |
| | | @RestController |
| | | @RequestMapping("/system/menu") |
| | | public class SystemMenuController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemMenuBiz systemMenuBiz; |
| | | |
| | | @ApiOperation("èåæåº") |
| | | @PostMapping("/updateSort") |
| | | @RequiresPermissions("system:menu:sort") |
| | | public ApiResponse updateSort (@Validated @RequestBody UpdateSystemMenuSortDTO dto) { |
| | | systemMenuBiz.updateSort(dto); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢èåæ ") |
| | | @GetMapping("/treeNodes") |
| | | public ApiResponse<List<SystemMenuNodeVO>> getTreeMenu () { |
| | | LoginUserInfo loginUserInfo = this.getLoginUser(); |
| | | return ApiResponse.success(systemMenuBiz.findTree(loginUserInfo.getId(),loginUserInfo.getType())); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢å表æ ") |
| | | @PostMapping("/treeList/{type}") |
| | | @RequiresPermissions("system:menu:query") |
| | | public ApiResponse<List<SystemMenuListVO>> treeList (@PathVariable Integer type) { |
| | | return ApiResponse.success(systemMenuBiz.findTreeByType(type)); |
| | | } |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:menu:create") |
| | | public ApiResponse create(@Validated(OperaType.Create.class) @RequestBody SystemMenu systemMenu) { |
| | | return ApiResponse.success(systemMenuBiz.create(systemMenu)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:menu:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | systemMenuBiz.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:menu:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemMenuBiz.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:menu:update") |
| | | public ApiResponse updateById(@Validated(OperaType.Update.class) @RequestBody SystemMenu systemMenu) { |
| | | systemMenuBiz.updateById(systemMenu); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹èåç¶æ") |
| | | @PostMapping("/updateStatus") |
| | | @RequiresPermissions("system:menu:update") |
| | | public ApiResponse updateStatus(@Validated(OperaType.UpdateStatus.class) @RequestBody SystemMenu systemMenu) { |
| | | systemMenuBiz.updateById(systemMenu); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.system; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.utils.Monitor; |
| | | import com.doumee.core.utils.Utils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "ç³»ç»çå¬") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | @RequestMapping("/system/monitor") |
| | | public class SystemMonitorController extends BaseController { |
| | | |
| | | @ApiOperation("è·åç³»ç»ä¿¡æ¯") |
| | | @GetMapping("/getSystemInfo") |
| | | @RequiresPermissions("system:monitor:query") |
| | | public ApiResponse<Monitor> getSystemInfo () { |
| | | return ApiResponse.success(Utils.Monitor.current()); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.system; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemPermissionBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.system.dto.QuerySystemPermissionDTO; |
| | | import com.doumee.dao.system.model.SystemPermission; |
| | | import com.doumee.dao.system.vo.SystemPermissionListVO; |
| | | import com.doumee.service.system.SystemPermissionService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "ç³»ç»æé") |
| | | @RestController |
| | | @RequestMapping("/system/permission") |
| | | public class SystemPermissionController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemPermissionService systemPermissionService; |
| | | |
| | | @Autowired |
| | | private SystemPermissionBiz systemPermissionBiz; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:permission:create") |
| | | public ApiResponse create(@Validated(OperaType.Create.class) @RequestBody SystemPermission systemPermission) { |
| | | return ApiResponse.success(systemPermissionBiz.create(systemPermission)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:permission:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | systemPermissionBiz.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:permission:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemPermissionBiz.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:permission:update") |
| | | public ApiResponse updateById(@Validated(OperaType.Update.class) @RequestBody SystemPermission systemPermission) { |
| | | systemPermissionBiz.updateById(systemPermission); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("system:permission:query") |
| | | public ApiResponse<PageData<SystemPermissionListVO>> findPage (@RequestBody PageWrap<QuerySystemPermissionDTO> pageWrap) { |
| | | return ApiResponse.success(systemPermissionService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢ææ") |
| | | @GetMapping("/all") |
| | | @RequiresPermissions("system:permission:query") |
| | | public ApiResponse<List<SystemPermission>> findAll () { |
| | | SystemPermission systemPermission = new SystemPermission(); |
| | | systemPermission.setDeleted(Boolean.FALSE); |
| | | return ApiResponse.success(systemPermissionService.findList(systemPermission)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.system; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemPositionBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.system.dto.QuerySystemUserDTO; |
| | | import com.doumee.dao.system.model.SystemPosition; |
| | | import com.doumee.dao.system.vo.SystemPositionListVO; |
| | | import com.doumee.dao.system.vo.SystemUserListVO; |
| | | import com.doumee.service.system.SystemPositionService; |
| | | import com.doumee.service.system.SystemUserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å²ä½æ¥å£ |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "å²ä½") |
| | | @RestController |
| | | @RequestMapping("/system/position") |
| | | public class SystemPositionController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemPositionService systemPositionService; |
| | | |
| | | @Autowired |
| | | private SystemPositionBiz systemPositionBiz; |
| | | |
| | | @Autowired |
| | | private SystemUserService systemUserService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:position:create") |
| | | public ApiResponse create(@Validated(OperaType.Create.class) @RequestBody SystemPosition systemPosition) { |
| | | return ApiResponse.success(systemPositionBiz.create(systemPosition)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:position:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | systemPositionBiz.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:position:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemPositionBiz.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:position:update") |
| | | public ApiResponse updateById(@Validated(OperaType.Update.class) @RequestBody SystemPosition systemPosition) { |
| | | systemPositionBiz.updateById(systemPosition); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢å²ä½æ å表") |
| | | @PostMapping("/tree") |
| | | @RequiresPermissions("system:position:query") |
| | | public ApiResponse<List<SystemPositionListVO>> findTree () { |
| | | return ApiResponse.success(systemPositionBiz.findTree()); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢å²ä½å表") |
| | | @PostMapping("/all") |
| | | @RequiresPermissions("system:position:query") |
| | | public ApiResponse<List<SystemPosition>> findList () { |
| | | SystemPosition systemPosition = new SystemPosition(); |
| | | systemPosition.setDeleted(Boolean.FALSE); |
| | | return ApiResponse.success(systemPositionService.findList(systemPosition)); |
| | | } |
| | | |
| | | @Trace(exclude = true) |
| | | @ApiOperation("æ¥è¯¢å²ä½äººå") |
| | | @PostMapping("/users") |
| | | @RequiresPermissions("system:position:queryUsers") |
| | | public ApiResponse<PageData<SystemUserListVO>> findPage (@RequestBody PageWrap<QuerySystemUserDTO> pageWrap) { |
| | | return ApiResponse.success(systemUserService.findPage(pageWrap)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.system; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemRoleBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.CreateRoleMenuDTO; |
| | | import com.doumee.dao.system.dto.CreateRolePermissionDTO; |
| | | import com.doumee.dao.system.dto.QuerySystemRoleDTO; |
| | | import com.doumee.dao.system.model.SystemRole; |
| | | import com.doumee.dao.system.vo.SystemRoleListVO; |
| | | import com.doumee.service.system.SystemRoleService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "ç³»ç»è§è²") |
| | | @RestController |
| | | @RequestMapping("/system/role") |
| | | public class SystemRoleController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemRoleService systemRoleService; |
| | | |
| | | @Autowired |
| | | private SystemRoleBiz systemRoleBiz; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("é
ç½®è§è²èå") |
| | | @PostMapping("/createRoleMenu") |
| | | @RequiresPermissions("system:role:createRoleMenu") |
| | | public ApiResponse createRoleMenu (@Validated @RequestBody CreateRoleMenuDTO dto) { |
| | | systemRoleBiz.createRoleMenu(dto); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("é
ç½®è§è²æé") |
| | | @PostMapping("/createRolePermission") |
| | | @RequiresPermissions("system:role:createRolePermission") |
| | | public ApiResponse createRolePermission (@Validated @RequestBody CreateRolePermissionDTO dto) { |
| | | systemRoleBiz.createRolePermission(dto); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:role:create") |
| | | public ApiResponse create(@Validated(OperaType.Create.class) @RequestBody SystemRole systemRole) { |
| | | systemRole.setType(Constants.ONE); |
| | | return ApiResponse.success(systemRoleBiz.create(systemRole)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:role:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | systemRoleBiz.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:role:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemRoleBiz.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:role:update") |
| | | public ApiResponse updateById(@Validated(OperaType.Update.class) @RequestBody SystemRole systemRole) { |
| | | systemRoleBiz.updateById(systemRole); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("system:role:query") |
| | | public ApiResponse<PageData<SystemRoleListVO>> findPage (@RequestBody PageWrap<QuerySystemRoleDTO> pageWrap) { |
| | | return ApiResponse.success(systemRoleService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢ææ") |
| | | @GetMapping("/all") |
| | | @RequiresPermissions("system:role:query") |
| | | public ApiResponse<List<SystemRole>> findAll () { |
| | | LoginUserInfo userInfo = this.getLoginUser(); |
| | | SystemRole systemRole = new SystemRole(); |
| | | systemRole.setDeleted(Boolean.FALSE); |
| | | if(userInfo.getType().equals(Constants.ONE)){ |
| | | systemRole.setType(userInfo.getType()); |
| | | } |
| | | return ApiResponse.success(systemRoleService.findList(systemRole)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.system; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.system.dto.QuerySystemTraceLogDTO; |
| | | import com.doumee.dao.system.model.SystemTraceLog; |
| | | import com.doumee.service.system.SystemTraceLogService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "è·è¸ªæ¥å¿") |
| | | @RestController |
| | | @RequestMapping("/system/traceLog") |
| | | public class SystemTraceLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemTraceLogService systemTraceLogService; |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("system:traceLog:query") |
| | | public ApiResponse findPage (@RequestBody PageWrap<QuerySystemTraceLogDTO> pageWrap) { |
| | | return ApiResponse.success(systemTraceLogService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("system:traceLog:query") |
| | | public void exportExcel (@RequestBody PageWrap<QuerySystemTraceLogDTO> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(SystemTraceLog.class).export(systemTraceLogService.findPage(pageWrap).getRecords(), "æä½æ¥å¿", response); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.system; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemUserBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.*; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.system.vo.SystemUserListVO; |
| | | import com.doumee.service.system.SystemUserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.doumee.core.model.ApiResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "ç¨æ·") |
| | | @RestController |
| | | @RequestMapping("/system/user") |
| | | public class SystemUserController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemUserService systemUserService; |
| | | |
| | | @Autowired |
| | | private SystemUserBiz systemUserBiz; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("é
ç½®ç¨æ·è§è²") |
| | | @PostMapping("/createUserRole") |
| | | @RequiresPermissions("system:user:createUserRole") |
| | | public ApiResponse createUserRole (@Validated @RequestBody CreateUserRoleDTO dto) { |
| | | systemUserBiz.createUserRole(dto); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @Trace(withRequestParameters = false) |
| | | @PreventRepeat |
| | | @ApiOperation("éç½®ç¨æ·å¯ç ") |
| | | @PostMapping("/resetPwd") |
| | | @RequiresPermissions("system:user:resetPwd") |
| | | public ApiResponse resetPwd (@Validated @RequestBody ResetSystemUserPwdDTO dto) { |
| | | dto.setOperaUserId(this.getLoginUser().getId()); |
| | | systemUserBiz.resetPwd(dto); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @Trace(withRequestParameters = false) |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:user:create") |
| | | public ApiResponse create(@Validated(OperaType.Create.class) @RequestBody CreateSystemUserDTO systemUser) { |
| | | systemUser.setCreateUser(this.getLoginUser().getId()); |
| | | systemUserBiz.create(systemUser); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:user:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | systemUserBiz.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:user:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemUserBiz.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @Trace(withRequestParameters = false) |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:user:update") |
| | | public ApiResponse updateById( @RequestBody CreateSystemUserDTO systemUser) { |
| | | systemUser.setUpdateUser(this.getLoginUser().getId()); |
| | | systemUserBiz.updateById(systemUser); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("system:user:query") |
| | | public ApiResponse<PageData<SystemUserListVO>> findPage (@RequestBody PageWrap<QuerySystemUserDTO> pageWrap) { |
| | | pageWrap.getModel().setCompanyId(this.getLoginUser().getCompanyId()); |
| | | return ApiResponse.success(systemUserService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢ç³»ç»ç¨æ·") |
| | | @PostMapping("/findAllList") |
| | | @RequiresPermissions("system:user:query") |
| | | public ApiResponse<PageData<SystemUser>> findAllList (@RequestBody PageWrap<SystemUser> pageWrap) { |
| | | return ApiResponse.success(systemUserService.findAllList(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("system:user:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(systemUserService.findById(id)); |
| | | } |
| | | |
| | | @Trace(withRequestParameters = false) |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»ºåå·¥") |
| | | @PostMapping("/companyCreateUser") |
| | | @RequiresPermissions("system:user:create") |
| | | public ApiResponse companyCreate(@Validated(OperaType.Create.class) @RequestBody CreateCompanyUserDTO createCompanyUserDTO) { |
| | | createCompanyUserDTO.setType(Constants.UserType.COMPANY.getKey()); |
| | | systemUserBiz.companyCreateUser(createCompanyUserDTO); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @Trace(withRequestParameters = false) |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»ºä¸»æ") |
| | | @PostMapping("/companyCreateAnchor") |
| | | // @RequiresPermissions("system:user:create") |
| | | public ApiResponse companyCreateAnchor(@Validated(OperaType.Create.class) @RequestBody CreateCompanyUserDTO createCompanyUserDTO) { |
| | | createCompanyUserDTO.setType(Constants.UserType.ZHUBO.getKey()); |
| | | systemUserBiz.companyCreateUser(createCompanyUserDTO); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | @Trace(withRequestParameters = false) |
| | | @PreventRepeat |
| | | @ApiOperation("ä¿®æ¹å工信æ¯") |
| | | @PostMapping("/companyUpdUser") |
| | | @RequiresPermissions("system:user:create") |
| | | public ApiResponse companyUpdUser(@Validated(OperaType.Create.class) @RequestBody CreateCompanyUserDTO createCompanyUserDTO) { |
| | | createCompanyUserDTO.setType(Constants.UserType.COMPANY.getKey()); |
| | | systemUserBiz.companyUpdUser(createCompanyUserDTO); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @Trace(withRequestParameters = false) |
| | | @PreventRepeat |
| | | @ApiOperation("ä¿®æ¹ä¸»æä¿¡æ¯") |
| | | @PostMapping("/companyUpdAnchor") |
| | | @RequiresPermissions("system:user:create") |
| | | public ApiResponse companyUpdAnchor(@Validated(OperaType.Create.class) @RequestBody CreateCompanyUserDTO createCompanyUserDTO) { |
| | | createCompanyUserDTO.setType(Constants.UserType.ZHUBO.getKey()); |
| | | systemUserBiz.companyUpdUser(createCompanyUserDTO); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("ä¿®æ¹ç¨æ·ç¶æ") |
| | | @GetMapping("/updUserStatus") |
| | | // @RequiresPermissions("system:user:create") |
| | | public ApiResponse updUserStatus( @RequestParam Integer id,@RequestParam Integer status) { |
| | | systemUserBiz.updUserStatus(id,status); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | @Trace(withRequestParameters = false) |
| | | @PreventRepeat |
| | | @ApiOperation("ä¿®æ¹å¯ç ") |
| | | @PostMapping("/updPassword") |
| | | // @RequiresPermissions("system:user:create") |
| | | public ApiResponse updPassword(@Validated(OperaType.Create.class) @RequestBody CreateCompanyUserDTO createCompanyUserDTO) { |
| | | systemUserBiz.updPassword(createCompanyUserDTO); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.config.swagger; |
| | | |
| | | import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j; |
| | | import com.google.common.base.Function; |
| | | import com.google.common.base.Optional; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import springfox.documentation.RequestHandler; |
| | | import springfox.documentation.builders.ApiInfoBuilder; |
| | | import springfox.documentation.builders.PathSelectors; |
| | | import springfox.documentation.oas.annotations.EnableOpenApi; |
| | | import springfox.documentation.service.ApiInfo; |
| | | import springfox.documentation.spi.DocumentationType; |
| | | import springfox.documentation.spring.web.plugins.Docket; |
| | | |
| | | import java.util.function.Predicate; |
| | | |
| | | /** |
| | | * Swaggeré
ç½® |
| | | * @author Eva.Caesar Liu |
| | | * @date 2022/03/11 10:24 |
| | | */ |
| | | @Configuration |
| | | @EnableOpenApi |
| | | @EnableKnife4j |
| | | public class SwaggerConfig { |
| | | |
| | | @Value("${swagger.host:}") |
| | | private String host; |
| | | |
| | | @Value("${swagger.title:æ¥å£ææ¡£}") |
| | | private String title; |
| | | |
| | | @Value("${swagger.description:}") |
| | | private String description; |
| | | |
| | | @Value("${project.version:}") |
| | | private String version; |
| | | |
| | | @Bean |
| | | public ApiInfo getApiInfo() { |
| | | return new ApiInfoBuilder() |
| | | .title(title) |
| | | .description(description) |
| | | .version(version) |
| | | .build(); |
| | | } |
| | | @Bean |
| | | public Docket getDocket() { |
| | | return new Docket(DocumentationType.SWAGGER_2) |
| | | .apiInfo(this.getApiInfo()).groupName("ãç³»ç»ç®¡çæ¥å£APIã") |
| | | .host(host) |
| | | .select() |
| | | .apis( basePackage("com.doumee.api.system;com.doumee.api.business;")) |
| | | // 设置éè¦è¢«æ«æçç±»ï¼è¿é设置为添å äº@Api注解çç±» |
| | | // .apis(RequestHandlerSelectors.withClassAnnotation(Api.class)) |
| | | .paths(PathSelectors.any()) |
| | | .build(); |
| | | } |
| | | @Bean |
| | | public Docket getDocket1() { |
| | | return new Docket(DocumentationType.SWAGGER_2) |
| | | .apiInfo(this.getApiInfo()).groupName("ãå
Œ
±æ¥å£APIã") |
| | | .host(host) |
| | | .select() |
| | | .apis( basePackage("com.doumee.api.common")) |
| | | // 设置éè¦è¢«æ«æçç±»ï¼è¿é设置为添å äº@Api注解çç±» |
| | | // .apis(RequestHandlerSelectors.withClassAnnotation(Api.class)) |
| | | .paths(PathSelectors.any()) |
| | | .build(); |
| | | } |
| | | /** |
| | | * éåbasePackageæ¹æ³ï¼ä½¿è½å¤å®ç°å¤å
访é®ï¼å¤å¶è´´ä¸å» |
| | | * @author teavamc |
| | | * @date 2019/1/26 |
| | | * @return com.google.common.base.Predicate<springfox.documentation.RequestHandler> |
| | | */ |
| | | public static Predicate<RequestHandler> basePackage(String basePackage) { |
| | | return input -> declaringClass(input).transform(handlerPackage(basePackage)).or(true); |
| | | } |
| | | |
| | | private static Function<Class<?>, Boolean> handlerPackage(String basePackage) { |
| | | return input -> { |
| | | // 循ç¯å¤æå¹é
|
| | | for (String strPackage : basePackage.split(";")) { |
| | | boolean isMatch = input.getPackage().getName().startsWith(strPackage); |
| | | if (isMatch) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | }; |
| | | } |
| | | |
| | | private static Optional<? extends Class<?>> declaringClass(RequestHandler input) { |
| | | return Optional.fromNullable(input.declaringClass()); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.config.swagger; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.servlet.HandlerInterceptor; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * Swaggeræ¦æªå¨ |
| | | * @author Eva.Caesar Liu |
| | | * @date 2022/04/18 18:12 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class SwaggerInterceptor implements HandlerInterceptor { |
| | | |
| | | @Value("${swagger.enabled:false}") |
| | | private Boolean enabledSwagger; |
| | | |
| | | @Value("${swagger.redirect-uri:/}") |
| | | private String redirectUri; |
| | | |
| | | @Override |
| | | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { |
| | | if (!enabledSwagger) { |
| | | String uri = request.getContextPath(); |
| | | if (StringUtils.isNotBlank(redirectUri)) |
| | | uri = request.getContextPath() + redirectUri; |
| | | if (StringUtils.isBlank(uri)) |
| | | uri = "/"; |
| | | try { |
| | | response.sendRedirect(uri); |
| | | } catch (IOException e) { |
| | | log.error(String.format("Redirect to '%s' for swagger throw an exception : %s", uri, e.getMessage()), e); |
| | | } |
| | | return Boolean.FALSE; |
| | | } |
| | | return Boolean.TRUE; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.config.swagger; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
| | | |
| | | /** |
| | | * Swaggeræ¦æªå¨é
ç½® |
| | | * @author Eva.Caesar Liu |
| | | * @date 2022/04/18 18:12 |
| | | */ |
| | | @Configuration |
| | | public class SwaggerInterceptorConfig implements WebMvcConfigurer { |
| | | |
| | | @Autowired |
| | | private SwaggerInterceptor swaggerInterceptor; |
| | | @Override |
| | | public void addInterceptors(InterceptorRegistry registry) { |
| | | registry.addInterceptor(swaggerInterceptor).addPathPatterns("/swagger-ui.html", "/doc.html"); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ä¿¡æ¯é
ç½® |
| | | project: |
| | | name: äºæä¿å®¢æ·æå¡ç³»ç» |
| | | version: 1.0.0 |
| | | env: development |
| | | # env: production |
| | | server: |
| | | # port: 10022 |
| | | port: 10031 |
| | | |
| | | spring: |
| | | # application:git |
| | | # name: doumeemes |
| | | profiles: |
| | | active: dev |
| | | |
| | | # JSONè¿åé
ç½® |
| | | jackson: |
| | | # é»è®¤æ¶åº |
| | | time-zone: GMT+8 |
| | | # é»è®¤æ¥ææ ¼å¼å |
| | | date-format: yyyy-MM-dd HH:mm:ss |
| | | servlet: |
| | | multipart: |
| | | max-file-size: 200MB |
| | | max-request-size: 200MB |
| | | enabled: true |
| | | # MyBatisé
ç½® |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:/mappers/**/*.xml |
| | | configuration: |
| | | map-underscore-to-camel-case: true |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | |
| | | # ç¼åå
容设置 |
| | | cache: |
| | | session: |
| | | # ä¼è¯è¿ææ¶é¿(s) |
| | | expire: 18000 |
| | | captcha: |
| | | # éªè¯ç è¿ææ¶é¿(s) |
| | | expire: 300 |
| | | |
| | | # è·è¸ªæ¥å¿ |
| | | trace: |
| | | # å¼å¯æºè½è·è¸ªæ¨¡å¼ |
| | | smart: true |
| | | # æé¤è·è¸ªçURLæ£å |
| | | exclude-patterns: .+/list[a-zA-Z0-9\-\_]*$, .+/tree[a-zA-Z0-9\-\_]*$, .+/page[a-zA-Z0-9\-\_]*$, .+/all[a-zA-Z0-9\-\_]*$, /swagger-resources.* |
| | | |
| | | # æ¥å¿é
ç½® |
| | | logback: |
| | | level: INFO |
| | | appender: ${project.env} |
| | | # daoå±çæ¥å¿è®¾ç½®ä¸ºdebugï¼æ¹ä¾¿æ¥çsql |
| | | logging: |
| | | level: |
| | | doumeemes.dao: debug |
| | | |
| | | knife4j: |
| | | enable: true |
| | | basic: |
| | | enable: true |
| | | username: admin |
| | | password: 111111 |