add
This commit is contained in:
@ -32,11 +32,15 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.qiaoba</groupId>
|
||||
<artifactId>qiaoba-auth</artifactId>
|
||||
<artifactId>qiaoba-api-auth</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.qiaoba</groupId>
|
||||
<artifactId>qiaoba-common-doc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.qiaoba</groupId>
|
||||
<artifactId>qiaoba-api-log</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.qiaoba.module.generator.controller;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.qiaoba.api.job.annotation.Log;
|
||||
import com.qiaoba.api.job.enums.BusinessType;
|
||||
import com.qiaoba.common.base.result.AjaxResult;
|
||||
import com.qiaoba.common.database.entity.PageQuery;
|
||||
import com.qiaoba.common.database.entity.TableDataInfo;
|
||||
@ -74,6 +76,7 @@ public class GeneratorController {
|
||||
* 批量删除代码生成
|
||||
*/
|
||||
@DeleteMapping("/{tableIds}")
|
||||
@Log(title = "代码生成", businessType = BusinessType.DELETE)
|
||||
public AjaxResult remove(@PathVariable List<String> tableIds) {
|
||||
return AjaxResult.toAjax(generatorTableService.deleteByIds(tableIds));
|
||||
}
|
||||
@ -107,6 +110,7 @@ public class GeneratorController {
|
||||
* 下载文件
|
||||
*/
|
||||
@GetMapping("/download/{tableId}/{templateType}")
|
||||
@Log(title = "代码生成", businessType = BusinessType.GENCODE)
|
||||
public void download(HttpServletResponse response, @PathVariable String tableId, @PathVariable String templateType) throws IOException {
|
||||
byte[] data = generatorTableService.downloadCode(tableId, templateType);
|
||||
GeneratorUtil.download(response, data);
|
||||
|
@ -4,7 +4,7 @@ import java.util.*;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.qiaoba.auth.utils.SecurityUtil;
|
||||
import com.qiaoba.api.auth.utils.SecurityUtil;
|
||||
import com.qiaoba.common.base.exceptions.ServiceException;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
Reference in New Issue
Block a user