@@ -89,6 +89,18 @@ public class TGisCjqyController extends BaseController | |||||
@PreAuthorize("@ss.hasPermi('business:cjqy:query')") | @PreAuthorize("@ss.hasPermi('business:cjqy:query')") | ||||
@GetMapping(value = "/{CJQYDM}") | @GetMapping(value = "/{CJQYDM}") | ||||
public AjaxResult getInfo(@PathVariable("CJQYDM") String CJQYDM) | public AjaxResult getInfo(@PathVariable("CJQYDM") String CJQYDM) | ||||
{ | |||||
TGisCjqy detail = tGisCjqyService.selectTGisCjqyByCJQYDM(CJQYDM); | |||||
return success(detail); | |||||
} | |||||
/** | |||||
* 获取村级区域详细信息,翻译字典 | |||||
*/ | |||||
@PreAuthorize("@ss.hasPermi('business:cjqy:query')") | |||||
@GetMapping(value = "/detail/{CJQYDM}") | |||||
public AjaxResult detail(@PathVariable("CJQYDM") String CJQYDM) | |||||
{ | { | ||||
TGisCjqy detail = tGisCjqyService.selectTGisCjqyByCJQYDM(CJQYDM); | TGisCjqy detail = tGisCjqyService.selectTGisCjqyByCJQYDM(CJQYDM); | ||||
TranslateUtils.translate(detail, false); | TranslateUtils.translate(detail, false); | ||||
@@ -100,7 +112,7 @@ public class TGisCjqyController extends BaseController | |||||
*/ | */ | ||||
@PreAuthorize("@ss.hasPermi('business:cjqy:add')") | @PreAuthorize("@ss.hasPermi('business:cjqy:add')") | ||||
@Log(title = "村级区域", businessType = BusinessType.INSERT) | @Log(title = "村级区域", businessType = BusinessType.INSERT) | ||||
@PostMapping | |||||
@PostMapping("/add") | |||||
public AjaxResult add(@RequestBody TGisCjqy tGisCjqy) | public AjaxResult add(@RequestBody TGisCjqy tGisCjqy) | ||||
{ | { | ||||
return toAjax(tGisCjqyService.insertTGisCjqy(tGisCjqy)); | return toAjax(tGisCjqyService.insertTGisCjqy(tGisCjqy)); | ||||
@@ -111,7 +123,7 @@ public class TGisCjqyController extends BaseController | |||||
*/ | */ | ||||
@PreAuthorize("@ss.hasPermi('business:cjqy:edit')") | @PreAuthorize("@ss.hasPermi('business:cjqy:edit')") | ||||
@Log(title = "村级区域", businessType = BusinessType.UPDATE) | @Log(title = "村级区域", businessType = BusinessType.UPDATE) | ||||
@PutMapping | |||||
@PostMapping("/update") | |||||
public AjaxResult edit(@RequestBody TGisCjqy tGisCjqy) | public AjaxResult edit(@RequestBody TGisCjqy tGisCjqy) | ||||
{ | { | ||||
return toAjax(tGisCjqyService.updateTGisCjqy(tGisCjqy)); | return toAjax(tGisCjqyService.updateTGisCjqy(tGisCjqy)); | ||||
@@ -122,7 +134,7 @@ public class TGisCjqyController extends BaseController | |||||
*/ | */ | ||||
@PreAuthorize("@ss.hasPermi('business:cjqy:remove')") | @PreAuthorize("@ss.hasPermi('business:cjqy:remove')") | ||||
@Log(title = "村级区域", businessType = BusinessType.DELETE) | @Log(title = "村级区域", businessType = BusinessType.DELETE) | ||||
@DeleteMapping("/{CJQYDMs}") | |||||
@GetMapping("/delete/{CJQYDMs}") | |||||
public AjaxResult remove(@PathVariable String[] CJQYDMs) | public AjaxResult remove(@PathVariable String[] CJQYDMs) | ||||
{ | { | ||||
return toAjax(tGisCjqyService.deleteTGisCjqyByCJQYDMs(CJQYDMs)); | return toAjax(tGisCjqyService.deleteTGisCjqyByCJQYDMs(CJQYDMs)); | ||||
@@ -89,6 +89,14 @@ public class TGisXjqyController extends BaseController | |||||
@PreAuthorize("@ss.hasPermi('business:xjqy:query')") | @PreAuthorize("@ss.hasPermi('business:xjqy:query')") | ||||
@GetMapping(value = "/{XJQYDM}") | @GetMapping(value = "/{XJQYDM}") | ||||
public AjaxResult getInfo(@PathVariable("XJQYDM") String XJQYDM) | public AjaxResult getInfo(@PathVariable("XJQYDM") String XJQYDM) | ||||
{ | |||||
TGisXjqy detail = tGisXjqyService.selectTGisXjqyByXJQYDM(XJQYDM); | |||||
return success(detail); | |||||
} | |||||
@PreAuthorize("@ss.hasPermi('business:xjqy:query')") | |||||
@GetMapping(value = "/detail/{XJQYDM}") | |||||
public AjaxResult detail(@PathVariable("XJQYDM") String XJQYDM) | |||||
{ | { | ||||
TGisXjqy detail = tGisXjqyService.selectTGisXjqyByXJQYDM(XJQYDM); | TGisXjqy detail = tGisXjqyService.selectTGisXjqyByXJQYDM(XJQYDM); | ||||
TranslateUtils.translate(detail, false); | TranslateUtils.translate(detail, false); | ||||
@@ -100,7 +108,7 @@ public class TGisXjqyController extends BaseController | |||||
*/ | */ | ||||
@PreAuthorize("@ss.hasPermi('business:xjqy:add')") | @PreAuthorize("@ss.hasPermi('business:xjqy:add')") | ||||
@Log(title = "乡级区域", businessType = BusinessType.INSERT) | @Log(title = "乡级区域", businessType = BusinessType.INSERT) | ||||
@PostMapping | |||||
@PostMapping("/add") | |||||
public AjaxResult add(@RequestBody TGisXjqy tGisXjqy) | public AjaxResult add(@RequestBody TGisXjqy tGisXjqy) | ||||
{ | { | ||||
return toAjax(tGisXjqyService.insertTGisXjqy(tGisXjqy)); | return toAjax(tGisXjqyService.insertTGisXjqy(tGisXjqy)); | ||||
@@ -111,7 +119,7 @@ public class TGisXjqyController extends BaseController | |||||
*/ | */ | ||||
@PreAuthorize("@ss.hasPermi('business:xjqy:edit')") | @PreAuthorize("@ss.hasPermi('business:xjqy:edit')") | ||||
@Log(title = "乡级区域", businessType = BusinessType.UPDATE) | @Log(title = "乡级区域", businessType = BusinessType.UPDATE) | ||||
@PutMapping | |||||
@PostMapping("/update") | |||||
public AjaxResult edit(@RequestBody TGisXjqy tGisXjqy) | public AjaxResult edit(@RequestBody TGisXjqy tGisXjqy) | ||||
{ | { | ||||
return toAjax(tGisXjqyService.updateTGisXjqy(tGisXjqy)); | return toAjax(tGisXjqyService.updateTGisXjqy(tGisXjqy)); | ||||
@@ -122,7 +130,7 @@ public class TGisXjqyController extends BaseController | |||||
*/ | */ | ||||
@PreAuthorize("@ss.hasPermi('business:xjqy:remove')") | @PreAuthorize("@ss.hasPermi('business:xjqy:remove')") | ||||
@Log(title = "乡级区域", businessType = BusinessType.DELETE) | @Log(title = "乡级区域", businessType = BusinessType.DELETE) | ||||
@DeleteMapping("/{XJQYDMs}") | |||||
@GetMapping("/delete/{XJQYDMs}") | |||||
public AjaxResult remove(@PathVariable String[] XJQYDMs) | public AjaxResult remove(@PathVariable String[] XJQYDMs) | ||||
{ | { | ||||
return toAjax(tGisXjqyService.deleteTGisXjqyByXJQYDMs(XJQYDMs)); | return toAjax(tGisXjqyService.deleteTGisXjqyByXJQYDMs(XJQYDMs)); | ||||
@@ -89,6 +89,14 @@ public class TGisXjxzqController extends BaseController | |||||
@PreAuthorize("@ss.hasPermi('business:xjxzq:query')") | @PreAuthorize("@ss.hasPermi('business:xjxzq:query')") | ||||
@GetMapping(value = "/{XZQDM}") | @GetMapping(value = "/{XZQDM}") | ||||
public AjaxResult getInfo(@PathVariable("XZQDM") String XZQDM) | public AjaxResult getInfo(@PathVariable("XZQDM") String XZQDM) | ||||
{ | |||||
TGisXjxzq detail = tGisXjxzqService.selectTGisXjxzqByXZQDM(XZQDM); | |||||
return success(detail); | |||||
} | |||||
@PreAuthorize("@ss.hasPermi('business:xjxzq:query')") | |||||
@GetMapping(value = "/detail/{XZQDM}") | |||||
public AjaxResult detail(@PathVariable("XZQDM") String XZQDM) | |||||
{ | { | ||||
TGisXjxzq detail = tGisXjxzqService.selectTGisXjxzqByXZQDM(XZQDM); | TGisXjxzq detail = tGisXjxzqService.selectTGisXjxzqByXZQDM(XZQDM); | ||||
TranslateUtils.translate(detail, false); | TranslateUtils.translate(detail, false); | ||||
@@ -100,7 +108,7 @@ public class TGisXjxzqController extends BaseController | |||||
*/ | */ | ||||
@PreAuthorize("@ss.hasPermi('business:xjxzq:add')") | @PreAuthorize("@ss.hasPermi('business:xjxzq:add')") | ||||
@Log(title = "县级区域", businessType = BusinessType.INSERT) | @Log(title = "县级区域", businessType = BusinessType.INSERT) | ||||
@PostMapping | |||||
@PostMapping("/add") | |||||
public AjaxResult add(@RequestBody TGisXjxzq tGisXjxzq) | public AjaxResult add(@RequestBody TGisXjxzq tGisXjxzq) | ||||
{ | { | ||||
return toAjax(tGisXjxzqService.insertTGisXjxzq(tGisXjxzq)); | return toAjax(tGisXjxzqService.insertTGisXjxzq(tGisXjxzq)); | ||||
@@ -111,7 +119,7 @@ public class TGisXjxzqController extends BaseController | |||||
*/ | */ | ||||
@PreAuthorize("@ss.hasPermi('business:xjxzq:edit')") | @PreAuthorize("@ss.hasPermi('business:xjxzq:edit')") | ||||
@Log(title = "县级区域", businessType = BusinessType.UPDATE) | @Log(title = "县级区域", businessType = BusinessType.UPDATE) | ||||
@PutMapping | |||||
@PostMapping("/update") | |||||
public AjaxResult edit(@RequestBody TGisXjxzq tGisXjxzq) | public AjaxResult edit(@RequestBody TGisXjxzq tGisXjxzq) | ||||
{ | { | ||||
return toAjax(tGisXjxzqService.updateTGisXjxzq(tGisXjxzq)); | return toAjax(tGisXjxzqService.updateTGisXjxzq(tGisXjxzq)); | ||||
@@ -122,7 +130,7 @@ public class TGisXjxzqController extends BaseController | |||||
*/ | */ | ||||
@PreAuthorize("@ss.hasPermi('business:xjxzq:remove')") | @PreAuthorize("@ss.hasPermi('business:xjxzq:remove')") | ||||
@Log(title = "县级区域", businessType = BusinessType.DELETE) | @Log(title = "县级区域", businessType = BusinessType.DELETE) | ||||
@DeleteMapping("/{XZQDMs}") | |||||
@GetMapping("/delete/{XZQDMs}") | |||||
public AjaxResult remove(@PathVariable String[] XZQDMs) | public AjaxResult remove(@PathVariable String[] XZQDMs) | ||||
{ | { | ||||
return toAjax(tGisXjxzqService.deleteTGisXjxzqByXZQDMs(XZQDMs)); | return toAjax(tGisXjxzqService.deleteTGisXjxzqByXZQDMs(XZQDMs)); | ||||
@@ -89,6 +89,13 @@ public class TTaskExportController extends BaseController | |||||
@PreAuthorize("@ss.hasPermi('business:export:query')") | @PreAuthorize("@ss.hasPermi('business:export:query')") | ||||
@GetMapping(value = "/{id}") | @GetMapping(value = "/{id}") | ||||
public AjaxResult getInfo(@PathVariable("id") Long id) | public AjaxResult getInfo(@PathVariable("id") Long id) | ||||
{ | |||||
return success(tTaskExportService.selectTTaskExportById(id)); | |||||
} | |||||
@PreAuthorize("@ss.hasPermi('business:export:query')") | |||||
@GetMapping(value = "/detail/{id}") | |||||
public AjaxResult detail(@PathVariable("id") Long id) | |||||
{ | { | ||||
TTaskExport detail = tTaskExportService.selectTTaskExportById(id); | TTaskExport detail = tTaskExportService.selectTTaskExportById(id); | ||||
TranslateUtils.translate(detail, false); | TranslateUtils.translate(detail, false); | ||||
@@ -100,7 +107,7 @@ public class TTaskExportController extends BaseController | |||||
*/ | */ | ||||
@PreAuthorize("@ss.hasPermi('business:export:add')") | @PreAuthorize("@ss.hasPermi('business:export:add')") | ||||
@Log(title = "导出任务", businessType = BusinessType.INSERT) | @Log(title = "导出任务", businessType = BusinessType.INSERT) | ||||
@PostMapping | |||||
@PostMapping("/add") | |||||
public AjaxResult add(@RequestBody TTaskExport tTaskExport) | public AjaxResult add(@RequestBody TTaskExport tTaskExport) | ||||
{ | { | ||||
return toAjax(tTaskExportService.insertTTaskExport(tTaskExport)); | return toAjax(tTaskExportService.insertTTaskExport(tTaskExport)); | ||||
@@ -111,7 +118,7 @@ public class TTaskExportController extends BaseController | |||||
*/ | */ | ||||
@PreAuthorize("@ss.hasPermi('business:export:edit')") | @PreAuthorize("@ss.hasPermi('business:export:edit')") | ||||
@Log(title = "导出任务", businessType = BusinessType.UPDATE) | @Log(title = "导出任务", businessType = BusinessType.UPDATE) | ||||
@PutMapping | |||||
@PostMapping("/update") | |||||
public AjaxResult edit(@RequestBody TTaskExport tTaskExport) | public AjaxResult edit(@RequestBody TTaskExport tTaskExport) | ||||
{ | { | ||||
return toAjax(tTaskExportService.updateTTaskExport(tTaskExport)); | return toAjax(tTaskExportService.updateTTaskExport(tTaskExport)); | ||||
@@ -122,7 +129,7 @@ public class TTaskExportController extends BaseController | |||||
*/ | */ | ||||
@PreAuthorize("@ss.hasPermi('business:export:remove')") | @PreAuthorize("@ss.hasPermi('business:export:remove')") | ||||
@Log(title = "导出任务", businessType = BusinessType.DELETE) | @Log(title = "导出任务", businessType = BusinessType.DELETE) | ||||
@DeleteMapping("/{ids}") | |||||
@GetMapping("/delete/{ids}") | |||||
public AjaxResult remove(@PathVariable Long[] ids) | public AjaxResult remove(@PathVariable Long[] ids) | ||||
{ | { | ||||
return toAjax(tTaskExportService.deleteTTaskExportByIds(ids)); | return toAjax(tTaskExportService.deleteTTaskExportByIds(ids)); | ||||
@@ -89,6 +89,16 @@ public class TTaskImportController extends BaseController | |||||
@PreAuthorize("@ss.hasPermi('business:import:query')") | @PreAuthorize("@ss.hasPermi('business:import:query')") | ||||
@GetMapping(value = "/{id}") | @GetMapping(value = "/{id}") | ||||
public AjaxResult getInfo(@PathVariable("id") Long id) | public AjaxResult getInfo(@PathVariable("id") Long id) | ||||
{ | |||||
return success(tTaskImportService.selectTTaskImportById(id)); | |||||
} | |||||
/** | |||||
* 获取导入任务详细信息 | |||||
*/ | |||||
@PreAuthorize("@ss.hasPermi('business:import:query')") | |||||
@GetMapping(value = "/detail/{id}") | |||||
public AjaxResult detail(@PathVariable("id") Long id) | |||||
{ | { | ||||
TTaskImport detail = tTaskImportService.selectTTaskImportById(id); | TTaskImport detail = tTaskImportService.selectTTaskImportById(id); | ||||
TranslateUtils.translate(detail, false); | TranslateUtils.translate(detail, false); | ||||
@@ -100,7 +110,7 @@ public class TTaskImportController extends BaseController | |||||
*/ | */ | ||||
@PreAuthorize("@ss.hasPermi('business:import:add')") | @PreAuthorize("@ss.hasPermi('business:import:add')") | ||||
@Log(title = "导入任务", businessType = BusinessType.INSERT) | @Log(title = "导入任务", businessType = BusinessType.INSERT) | ||||
@PostMapping | |||||
@PostMapping("/add") | |||||
public AjaxResult add(@RequestBody TTaskImport tTaskImport) | public AjaxResult add(@RequestBody TTaskImport tTaskImport) | ||||
{ | { | ||||
return toAjax(tTaskImportService.insertTTaskImport(tTaskImport)); | return toAjax(tTaskImportService.insertTTaskImport(tTaskImport)); | ||||
@@ -111,7 +121,7 @@ public class TTaskImportController extends BaseController | |||||
*/ | */ | ||||
@PreAuthorize("@ss.hasPermi('business:import:edit')") | @PreAuthorize("@ss.hasPermi('business:import:edit')") | ||||
@Log(title = "导入任务", businessType = BusinessType.UPDATE) | @Log(title = "导入任务", businessType = BusinessType.UPDATE) | ||||
@PutMapping | |||||
@PostMapping("/update") | |||||
public AjaxResult edit(@RequestBody TTaskImport tTaskImport) | public AjaxResult edit(@RequestBody TTaskImport tTaskImport) | ||||
{ | { | ||||
return toAjax(tTaskImportService.updateTTaskImport(tTaskImport)); | return toAjax(tTaskImportService.updateTTaskImport(tTaskImport)); | ||||
@@ -122,7 +132,7 @@ public class TTaskImportController extends BaseController | |||||
*/ | */ | ||||
@PreAuthorize("@ss.hasPermi('business:import:remove')") | @PreAuthorize("@ss.hasPermi('business:import:remove')") | ||||
@Log(title = "导入任务", businessType = BusinessType.DELETE) | @Log(title = "导入任务", businessType = BusinessType.DELETE) | ||||
@DeleteMapping("/{ids}") | |||||
@GetMapping("/delete/{ids}") | |||||
public AjaxResult remove(@PathVariable Long[] ids) | public AjaxResult remove(@PathVariable Long[] ids) | ||||
{ | { | ||||
return toAjax(tTaskImportService.deleteTTaskImportByIds(ids)); | return toAjax(tTaskImportService.deleteTTaskImportByIds(ids)); | ||||
@@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||||
<select id="selectTTaskExportList" parameterType="TTaskExport" resultMap="TTaskExportResult"> | <select id="selectTTaskExportList" parameterType="TTaskExport" resultMap="TTaskExportResult"> | ||||
<include refid="selectTTaskExportVo"/> | <include refid="selectTTaskExportVo"/> | ||||
<where> | <where> | ||||
<if test="deptId != null "> and dept_id = #{deptId}</if> | |||||
<if test="deptId != null "> and (dept_id = #{deptId} OR dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))</if> | |||||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if> | <if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if> | ||||
<if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if> | <if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if> | ||||
<if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if> | <if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if> | ||||
@@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||||
<select id="selectTTaskImportList" parameterType="TTaskImport" resultMap="TTaskImportResult"> | <select id="selectTTaskImportList" parameterType="TTaskImport" resultMap="TTaskImportResult"> | ||||
<include refid="selectTTaskImportVo"/> | <include refid="selectTTaskImportVo"/> | ||||
<where> | <where> | ||||
<if test="deptId != null "> and dept_id = #{deptId}</if> | |||||
<if test="deptId != null "> and (dept_id = #{deptId} OR dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))</if> | |||||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if> | <if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if> | ||||
<if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if> | <if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if> | ||||
<if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if> | <if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if> | ||||
@@ -99,6 +99,16 @@ public class ${ClassName}Controller extends BaseController | |||||
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:query')") | @PreAuthorize("@ss.hasPermi('${permissionPrefix}:query')") | ||||
@GetMapping(value = "/{${pkColumn.javaField}}") | @GetMapping(value = "/{${pkColumn.javaField}}") | ||||
public AjaxResult getInfo(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}) | public AjaxResult getInfo(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}) | ||||
{ | |||||
return success(${className}Service.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField})); | |||||
} | |||||
/** | |||||
* 获取${functionName}详细信息,翻译字典 | |||||
*/ | |||||
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:query')") | |||||
@GetMapping(value = "/detail/{${pkColumn.javaField}}") | |||||
public AjaxResult detail(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}) | |||||
{ | { | ||||
${ClassName} detail = ${className}Service.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField}); | ${ClassName} detail = ${className}Service.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField}); | ||||
TranslateUtils.translate(detail, false); | TranslateUtils.translate(detail, false); | ||||
@@ -110,7 +120,7 @@ public class ${ClassName}Controller extends BaseController | |||||
*/ | */ | ||||
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:add')") | @PreAuthorize("@ss.hasPermi('${permissionPrefix}:add')") | ||||
@Log(title = "${functionName}", businessType = BusinessType.INSERT) | @Log(title = "${functionName}", businessType = BusinessType.INSERT) | ||||
@PostMapping | |||||
@PostMapping("/add") | |||||
public AjaxResult add(@RequestBody ${ClassName} ${className}) | public AjaxResult add(@RequestBody ${ClassName} ${className}) | ||||
{ | { | ||||
return toAjax(${className}Service.insert${ClassName}(${className})); | return toAjax(${className}Service.insert${ClassName}(${className})); | ||||
@@ -121,7 +131,7 @@ public class ${ClassName}Controller extends BaseController | |||||
*/ | */ | ||||
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:edit')") | @PreAuthorize("@ss.hasPermi('${permissionPrefix}:edit')") | ||||
@Log(title = "${functionName}", businessType = BusinessType.UPDATE) | @Log(title = "${functionName}", businessType = BusinessType.UPDATE) | ||||
@PutMapping | |||||
@PostMapping("/update") | |||||
public AjaxResult edit(@RequestBody ${ClassName} ${className}) | public AjaxResult edit(@RequestBody ${ClassName} ${className}) | ||||
{ | { | ||||
return toAjax(${className}Service.update${ClassName}(${className})); | return toAjax(${className}Service.update${ClassName}(${className})); | ||||
@@ -132,7 +142,7 @@ public class ${ClassName}Controller extends BaseController | |||||
*/ | */ | ||||
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:remove')") | @PreAuthorize("@ss.hasPermi('${permissionPrefix}:remove')") | ||||
@Log(title = "${functionName}", businessType = BusinessType.DELETE) | @Log(title = "${functionName}", businessType = BusinessType.DELETE) | ||||
@DeleteMapping("/{${pkColumn.javaField}s}") | |||||
@GetMapping("/delete/{${pkColumn.javaField}s}") | |||||
public AjaxResult remove(@PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s) | public AjaxResult remove(@PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s) | ||||
{ | { | ||||
return toAjax(${className}Service.delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaField}s)); | return toAjax(${className}Service.delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaField}s)); | ||||
@@ -17,11 +17,19 @@ export function get${BusinessName}(${pkColumn.javaField}) { | |||||
}) | }) | ||||
} | } | ||||
// 查询${functionName}详细 | |||||
export function get${BusinessName}Detail(${pkColumn.javaField}) { | |||||
return request({ | |||||
url: '/${moduleName}/${businessName}/detail/' + ${pkColumn.javaField}, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 新增${functionName} | // 新增${functionName} | ||||
export function add${BusinessName}(data) { | export function add${BusinessName}(data) { | ||||
return request({ | return request({ | ||||
url: '/${moduleName}/${businessName}', | |||||
url: '/${moduleName}/${businessName}/add', | |||||
method: 'post', | method: 'post', | ||||
data: data | data: data | ||||
}) | }) | ||||
@@ -30,8 +38,8 @@ export function add${BusinessName}(data) { | |||||
// 修改${functionName} | // 修改${functionName} | ||||
export function update${BusinessName}(data) { | export function update${BusinessName}(data) { | ||||
return request({ | return request({ | ||||
url: '/${moduleName}/${businessName}', | |||||
method: 'put', | |||||
url: '/${moduleName}/${businessName}/update', | |||||
method: 'post', | |||||
data: data | data: data | ||||
}) | }) | ||||
} | } | ||||
@@ -39,8 +47,8 @@ export function update${BusinessName}(data) { | |||||
// 删除${functionName} | // 删除${functionName} | ||||
export function del${BusinessName}(${pkColumn.javaField}) { | export function del${BusinessName}(${pkColumn.javaField}) { | ||||
return request({ | return request({ | ||||
url: '/${moduleName}/${businessName}/' + ${pkColumn.javaField}, | |||||
method: 'delete' | |||||
url: '/${moduleName}/${businessName}/delete/' + ${pkColumn.javaField}, | |||||
method: 'get' | |||||
}) | }) | ||||
} | } | ||||
@@ -209,8 +209,8 @@ | |||||
</el-dialog> | </el-dialog> | ||||
<!-- 添加或修改${functionName}对话框 --> | <!-- 添加或修改${functionName}对话框 --> | ||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | |||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> | |||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> | |||||
#foreach($column in $columns) | #foreach($column in $columns) | ||||
#set($field=$column.javaField) | #set($field=$column.javaField) | ||||
#if($column.insert && !$column.pk) | #if($column.insert && !$column.pk) | ||||
@@ -359,7 +359,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName}, print${BusinessName} } from "@/api/${moduleName}/${businessName}" | |||||
import { list${BusinessName}, get${BusinessName}, get${BusinessName}Detail, del${BusinessName}, add${BusinessName}, update${BusinessName}, print${BusinessName} } from "@/api/${moduleName}/${businessName}" | |||||
import { getToken } from "@/utils/auth" | import { getToken } from "@/utils/auth" | ||||
export default { | export default { | ||||
name: "${BusinessName}", | name: "${BusinessName}", | ||||
@@ -563,7 +563,7 @@ export default { | |||||
/** 查看按钮操作 */ | /** 查看按钮操作 */ | ||||
handleLook(row) { | handleLook(row) { | ||||
const ${pkColumn.javaField} = row.${pkColumn.javaField} || this.ids | const ${pkColumn.javaField} = row.${pkColumn.javaField} || this.ids | ||||
get${BusinessName}(${pkColumn.javaField}).then(response => { | |||||
get${BusinessName}Detail(${pkColumn.javaField}).then(response => { | |||||
this.form = response.data; | this.form = response.data; | ||||
#foreach ($column in $columns) | #foreach ($column in $columns) | ||||
#if($column.htmlType == "checkbox") | #if($column.htmlType == "checkbox") | ||||