diff --git a/hchyun-ui/src/api/system/apiclass.js b/hchyun-ui/src/api/system/apiclass.js
new file mode 100644
index 0000000..2577dd3
--- /dev/null
+++ b/hchyun-ui/src/api/system/apiclass.js
@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询接口类名列表
+export function listApiclass(query) {
+ return request({
+ url: '/system/apiclass/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询接口类名详细
+export function getApiclass(id) {
+ return request({
+ url: '/system/apiclass/' + id,
+ method: 'get'
+ })
+}
+
+// 新增接口类名
+export function addApiclass(data) {
+ return request({
+ url: '/system/apiclass',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改接口类名
+export function updateApiclass(data) {
+ return request({
+ url: '/system/apiclass',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除接口类名
+export function delApiclass(id) {
+ return request({
+ url: '/system/apiclass/' + id,
+ method: 'delete'
+ })
+}
+
+// 导出接口类名
+export function exportApiclass(query) {
+ return request({
+ url: '/system/apiclass/export',
+ method: 'get',
+ params: query
+ })
+}
\ No newline at end of file
diff --git a/hchyun-ui/src/views/system/apiclass/index.vue b/hchyun-ui/src/views/system/apiclass/index.vue
new file mode 100644
index 0000000..e132ef9
--- /dev/null
+++ b/hchyun-ui/src/views/system/apiclass/index.vue
@@ -0,0 +1,323 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{m}:{s}') }}
+
+
+
+
+ {{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{m}:{s}') }}
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hchyun/hchyun-admin/src/main/java/com/hchyun/web/controller/system/ApiclassController.java b/hchyun/hchyun-admin/src/main/java/com/hchyun/web/controller/system/ApiclassController.java
new file mode 100644
index 0000000..7ce441d
--- /dev/null
+++ b/hchyun/hchyun-admin/src/main/java/com/hchyun/web/controller/system/ApiclassController.java
@@ -0,0 +1,199 @@
+package com.hchyun.web.controller.system;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.regex.Pattern;
+
+
+import com.hchyun.common.constant.ReturnConstants;
+import com.hchyun.common.core.controller.HcyBaseController;
+import com.hchyun.common.utils.ServerResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.hchyun.common.annotation.Log;
+import com.hchyun.common.core.entity.AjaxResult;
+import com.hchyun.common.enums.BusinessType;
+import com.hchyun.system.entity.Apiclass;
+import com.hchyun.system.service.ApiclassService;
+import com.hchyun.common.utils.poi.ExcelUtil;
+
+/**
+ * 接口类名Controller
+ *
+ * @author hchyun
+ * @date 2021-01-24
+ */
+@Api(value = "接口类名管理",tags = "接口类名管理")
+@RestController
+@RequestMapping("/system/apiclass")
+public class ApiclassController extends HcyBaseController {
+ protected final Logger logger = LoggerFactory.getLogger(ApiclassController.class);
+
+ @Autowired
+ private ApiclassService apiclassService;
+
+ /**
+ * 查询接口类名列表
+ */
+ @ApiOperation("查询接口类名列表")
+ @PreAuthorize("@ss.hasPermi('system:apiclass:list')")
+ @GetMapping("/list")
+ public Serializable list(Apiclass apiclass) {
+ try {
+ startPage();
+ ServerResult> serverResult = apiclassService.selectApiclassList(apiclass);
+ if (serverResult.isStart()) {
+ return getDataTable(serverResult.getData());
+ } else {
+ return AjaxResult.info(serverResult.getMsg());
+ }
+ } catch (RuntimeException e) {
+ logger.error(e.getMessage());
+ return AjaxResult.error(ReturnConstants.SYS_ERROR);
+ }
+ }
+
+ /**
+ * 导出接口类名列表
+ */
+ @ApiOperation("导出接口类名列表")
+ @PreAuthorize("@ss.hasPermi('system:apiclass:export')")
+ @Log(title = "接口类名", businessType = BusinessType.EXPORT)
+ @GetMapping("/export")
+ public AjaxResult export(Apiclass apiclass) {
+ try {
+ ServerResult> serverResult = apiclassService.selectApiclassList(apiclass);
+ ExcelUtil util = new ExcelUtil(Apiclass. class);
+ if (serverResult.isStart()) {
+ return util.exportExcel(serverResult.getData(), "apiclass");
+ } else {
+ return AjaxResult.error(serverResult.getMsg());
+ }
+ } catch (RuntimeException e) {
+ logger.error(e.getMessage());
+ return AjaxResult.error(ReturnConstants.SYS_ERROR);
+ }
+ }
+
+ /**
+ * 获取接口类名详细信息
+ */
+ @ApiOperation("获取接口类名详细信息")
+ @ApiImplicitParam(name = "id" , value = "接口类名id" , required = true, dataType = "Long" , paramType = "path")
+ @PreAuthorize("@ss.hasPermi('system:apiclass:query')")
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Long id) {
+ try {
+ ServerResult serverResult = apiclassService.selectApiclassById(id);
+ if (serverResult.isStart()) {
+ return AjaxResult.success(serverResult.getData());
+ } else {
+ return AjaxResult.info(serverResult.getMsg());
+ }
+ } catch (RuntimeException e) {
+ logger.error(e.getMessage());
+ return AjaxResult.error(ReturnConstants.SYS_ERROR);
+ }
+ }
+
+ /**
+ * 新增接口类名
+ */
+ @ApiOperation("新增接口类名")
+ @ApiImplicitParam(name = "apiclass" , value = "新增接口类名信息" , dataType = "Apiclass")
+ @PreAuthorize("@ss.hasPermi('system:apiclass:add')")
+ @Log(title = "接口类名", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody Apiclass apiclass) {
+ if (apiclass.getmId() == null || apiclass.getmId()<0) {
+ return AjaxResult.error("模块id不能为空!");
+ }
+ if (apiclass.getcName() == null || apiclass.getcName().equals("")) {
+ return AjaxResult.error("类名不能为空!");
+ }
+ if (apiclass.getcDescribe() == null || apiclass.getcDescribe().equals("")) {
+ return AjaxResult.error("类描述不能为空!");
+ }
+ try {
+ ServerResult serverResult = apiclassService.insertApiclass(apiclass);
+ if (serverResult.isStart()) {
+ return AjaxResult.success();
+ } else {
+ return AjaxResult.error(serverResult.getMsg());
+ }
+ } catch (RuntimeException e) {
+ logger.error(e.getMessage());
+ return AjaxResult.error(ReturnConstants.SYS_ERROR);
+ }
+ }
+
+ /**
+ * 修改接口类名
+ */
+ @ApiOperation("修改接口类名")
+ @ApiImplicitParam(name = "apiclass" , value = "修改接口类名信息" , dataType = "Apiclass")
+ @PreAuthorize("@ss.hasPermi('system:apiclass:edit')")
+ @Log(title = "接口类名", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody Apiclass apiclass) {
+ try {
+
+ if (apiclass.getmId() == null || apiclass.getmId()<0) {
+ return AjaxResult.error("模块id不能为空!");
+ }
+ if (apiclass.getcName() == null || apiclass.getcName().equals("")) {
+ return AjaxResult.error("类名不能为空!");
+ }
+ if (apiclass.getcDescribe() == null || apiclass.getcDescribe().equals("")) {
+ return AjaxResult.error("类描述不能为空!");
+ }
+ ServerResult serverResult = apiclassService.updateApiclass(apiclass);
+ if (serverResult.isStart()) {
+ return AjaxResult.success();
+ } else {
+ return AjaxResult.error(serverResult.getMsg());
+ }
+ } catch (RuntimeException e) {
+ logger.error(e.getMessage());
+ return AjaxResult.error(ReturnConstants.SYS_ERROR);
+ }
+ }
+
+ /**
+ * 删除接口类名
+ */
+ @ApiOperation("删除接口类名")
+ @ApiImplicitParam(name = "ids" , value = "接口类名ids" , required = true, dataType = "Long" , paramType = "path")
+ @PreAuthorize("@ss.hasPermi('system:apiclass:remove')")
+ @Log(title = "接口类名", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids) {
+ try {
+ if (ids.length<0){
+ return AjaxResult.error("id不能为空!");
+ }
+ ServerResult serverResult = apiclassService.deleteApiclassByIds(ids);
+ if (serverResult.isStart()) {
+ return AjaxResult.success();
+ } else {
+ return AjaxResult.error(serverResult.getMsg());
+ }
+ }catch (RuntimeException e){
+ logger.error(e.getMessage());
+ return AjaxResult.error(ReturnConstants.SYS_ERROR);
+ }
+ }
+}
diff --git a/hchyun/hchyun-admin/src/main/java/com/hchyun/web/controller/system/ModuleController.java b/hchyun/hchyun-admin/src/main/java/com/hchyun/web/controller/system/ModuleController.java
index a02bbab..fb4fa72 100644
--- a/hchyun/hchyun-admin/src/main/java/com/hchyun/web/controller/system/ModuleController.java
+++ b/hchyun/hchyun-admin/src/main/java/com/hchyun/web/controller/system/ModuleController.java
@@ -2,15 +2,11 @@ package com.hchyun.web.controller.system;
import java.io.Serializable;
import java.util.List;
-import java.util.regex.Pattern;
import com.hchyun.common.constant.ReturnConstants;
import com.hchyun.common.core.controller.HcyBaseController;
import com.hchyun.common.utils.ServerResult;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -37,7 +33,6 @@ import com.hchyun.common.core.page.TableDataInfo;
* @author hchyun
* @date 2021-01-24
*/
-@Api(value = "模块管理管理",tags = "模块管理管理")
@RestController
@RequestMapping("/system/module")
public class ModuleController extends HcyBaseController {
@@ -49,7 +44,6 @@ public class ModuleController extends HcyBaseController {
/**
* 查询模块管理列表
*/
- @ApiOperation("查询模块管理列表")
@PreAuthorize("@ss.hasPermi('system:module:list')")
@GetMapping("/list")
public Serializable list(Module module) {
@@ -70,7 +64,6 @@ public class ModuleController extends HcyBaseController {
/**
* 导出模块管理列表
*/
- @ApiOperation("导出模块管理列表")
@PreAuthorize("@ss.hasPermi('system:module:export')")
@Log(title = "模块管理", businessType = BusinessType.EXPORT)
@GetMapping("/export")
@@ -92,8 +85,6 @@ public class ModuleController extends HcyBaseController {
/**
* 获取模块管理详细信息
*/
- @ApiOperation("获取模块管理详细信息")
- @ApiImplicitParam(name = "id" , value = "模块管理id" , required = true, dataType = "Long" , paramType = "path")
@PreAuthorize("@ss.hasPermi('system:module:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
@@ -113,8 +104,6 @@ public class ModuleController extends HcyBaseController {
/**
* 新增模块管理
*/
- @ApiOperation("新增模块管理")
- @ApiImplicitParam(name = "module" , value = "新增模块管理信息" , dataType = "Module")
@PreAuthorize("@ss.hasPermi('system:module:add')")
@Log(title = "模块管理", businessType = BusinessType.INSERT)
@PostMapping
@@ -141,8 +130,6 @@ public class ModuleController extends HcyBaseController {
/**
* 修改模块管理
*/
- @ApiOperation("修改模块管理")
- @ApiImplicitParam(name = "module" , value = "修改模块管理信息" , dataType = "Module")
@PreAuthorize("@ss.hasPermi('system:module:edit')")
@Log(title = "模块管理", businessType = BusinessType.UPDATE)
@PutMapping
@@ -170,8 +157,6 @@ public class ModuleController extends HcyBaseController {
/**
* 删除模块管理
*/
- @ApiOperation("删除模块管理")
- @ApiImplicitParam(name = "ids" , value = "模块管理ids" , required = true, dataType = "Long" , paramType = "path")
@PreAuthorize("@ss.hasPermi('system:module:remove')")
@Log(title = "模块管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
diff --git a/hchyun/hchyun-generator/src/main/resources/vm/xml/mapper.xml.vm b/hchyun/hchyun-generator/src/main/resources/vm/xml/mapper.xml.vm
index 7874b05..0de1712 100644
--- a/hchyun/hchyun-generator/src/main/resources/vm/xml/mapper.xml.vm
+++ b/hchyun/hchyun-generator/src/main/resources/vm/xml/mapper.xml.vm
@@ -76,14 +76,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into ${tableName}
#foreach($column in $columns)
-#if($column.columnName != $pkColumn.columnName || !$pkColumn.increment)
+#if(($column.columnName != $pkColumn.columnName || !$pkColumn.increment) && $column.isInsert == 1)
$column.columnName,
#end
#end
#foreach($column in $columns)
-#if($column.columnName != $pkColumn.columnName || !$pkColumn.increment)
+#if(($column.columnName != $pkColumn.columnName || !$pkColumn.increment) && $column.isInsert == 1)
#{$column.javaField},
#end
#end
@@ -94,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update ${tableName}
#foreach($column in $columns)
-#if($column.columnName != $pkColumn.columnName)
+#if($column.columnName != $pkColumn.columnName && $column.isInsert == 1)
$column.columnName = #{$column.javaField},
#end
#end
diff --git a/hchyun/hchyun-system/src/main/java/com/hchyun/system/dao/ApiclassDao.java b/hchyun/hchyun-system/src/main/java/com/hchyun/system/dao/ApiclassDao.java
new file mode 100644
index 0000000..c37aeae
--- /dev/null
+++ b/hchyun/hchyun-system/src/main/java/com/hchyun/system/dao/ApiclassDao.java
@@ -0,0 +1,61 @@
+package com.hchyun.system.dao;
+
+import java.util.List;
+import com.hchyun.system.entity.Apiclass;
+
+/**
+ * 接口类名Mapper接口
+ *
+ * @author hchyun
+ * @date 2021-01-24
+ */
+public interface ApiclassDao
+{
+ /**
+ * 查询接口类名
+ *
+ * @param id 接口类名ID
+ * @return 接口类名
+ */
+ Apiclass selectApiclassById(Long id);
+
+ /**
+ * 查询接口类名列表
+ *
+ * @param apiclass 接口类名
+ * @return 接口类名集合
+ */
+ List selectApiclassList(Apiclass apiclass);
+
+ /**
+ * 新增接口类名
+ *
+ * @param apiclass 接口类名
+ * @return 结果
+ */
+ int insertApiclass(Apiclass apiclass);
+
+ /**
+ * 修改接口类名
+ *
+ * @param apiclass 接口类名
+ * @return 结果
+ */
+ int updateApiclass(Apiclass apiclass);
+
+ /**
+ * 删除接口类名
+ *
+ * @param id 接口类名ID
+ * @return 结果
+ */
+ int deleteApiclassById(Long id);
+
+ /**
+ * 批量删除接口类名
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteApiclassByIds(Long[] ids);
+}
diff --git a/hchyun/hchyun-system/src/main/java/com/hchyun/system/entity/Apiclass.java b/hchyun/hchyun-system/src/main/java/com/hchyun/system/entity/Apiclass.java
new file mode 100644
index 0000000..71ef79d
--- /dev/null
+++ b/hchyun/hchyun-system/src/main/java/com/hchyun/system/entity/Apiclass.java
@@ -0,0 +1,90 @@
+package com.hchyun.system.entity;
+
+import com.hchyun.common.annotation.Excel;
+import com.hchyun.common.core.entity.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 接口类名对象 sys_apiclass
+ *
+ * @author hchyun
+ * @date 2021-01-24
+ */
+@ApiModel("接口类名")
+public class Apiclass extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 类id */
+ @ApiModelProperty("类id")
+ private Long id;
+
+ /** 模块id */
+ @Excel(name = "模块id")
+ @ApiModelProperty("模块id")
+ private Long mId;
+
+ /** 类名 */
+ @Excel(name = "类名")
+ @ApiModelProperty("类名")
+ private String cName;
+
+ /** 类描述 */
+ @Excel(name = "类描述")
+ @ApiModelProperty("类描述")
+ private String cDescribe;
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ public Long getId()
+ {
+ return id;
+ }
+ public void setmId(Long mId)
+ {
+ this.mId = mId;
+ }
+
+ public Long getmId()
+ {
+ return mId;
+ }
+ public void setcName(String cName)
+ {
+ this.cName = cName;
+ }
+
+ public String getcName()
+ {
+ return cName;
+ }
+ public void setcDescribe(String cDescribe)
+ {
+ this.cDescribe = cDescribe;
+ }
+
+ public String getcDescribe()
+ {
+ return cDescribe;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("mId", getmId())
+ .append("cName", getcName())
+ .append("cDescribe", getcDescribe())
+ .append("createTime", getCreateTime())
+ .append("createBy", getCreateBy())
+ .append("updateTime", getUpdateTime())
+ .append("updateBy", getUpdateBy())
+ .toString();
+ }
+}
diff --git a/hchyun/hchyun-system/src/main/java/com/hchyun/system/entity/Module.java b/hchyun/hchyun-system/src/main/java/com/hchyun/system/entity/Module.java
index fb8f013..d8ec97b 100644
--- a/hchyun/hchyun-system/src/main/java/com/hchyun/system/entity/Module.java
+++ b/hchyun/hchyun-system/src/main/java/com/hchyun/system/entity/Module.java
@@ -2,8 +2,6 @@ package com.hchyun.system.entity;
import com.hchyun.common.annotation.Excel;
import com.hchyun.common.core.entity.BaseEntity;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@@ -13,23 +11,19 @@ import org.apache.commons.lang3.builder.ToStringStyle;
* @author hchyun
* @date 2021-01-24
*/
-@ApiModel("模块管理")
public class Module extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 模块id */
- @ApiModelProperty("模块id")
private Long id;
/** 模块名称 */
@Excel(name = "模块名称")
- @ApiModelProperty("模块名称")
private String mName;
/** 模块描述 */
@Excel(name = "模块描述")
- @ApiModelProperty("模块描述")
private String mDescribe;
public void setId(Long id)
diff --git a/hchyun/hchyun-system/src/main/java/com/hchyun/system/service/ApiclassService.java b/hchyun/hchyun-system/src/main/java/com/hchyun/system/service/ApiclassService.java
new file mode 100644
index 0000000..58b17f1
--- /dev/null
+++ b/hchyun/hchyun-system/src/main/java/com/hchyun/system/service/ApiclassService.java
@@ -0,0 +1,63 @@
+package com.hchyun.system.service;
+
+import java.util.List;
+
+import com.hchyun.common.utils.ServerResult;
+import com.hchyun.system.entity.Apiclass;
+
+/**
+ * 接口类名Service接口
+ *
+ * @author hchyun
+ * @date 2021-01-24
+ */
+public interface ApiclassService
+{
+ /**
+ * 查询接口类名
+ *
+ * @param id 接口类名ID
+ * @return 接口类名
+ */
+ ServerResult selectApiclassById(Long id);
+
+ /**
+ * 查询接口类名列表
+ *
+ * @param apiclass 接口类名
+ * @return 接口类名集合
+ */
+ ServerResult> selectApiclassList(Apiclass apiclass);
+
+ /**
+ * 新增接口类名
+ *
+ * @param apiclass 接口类名
+ * @return 结果
+ */
+ ServerResult insertApiclass(Apiclass apiclass);
+
+ /**
+ * 修改接口类名
+ *
+ * @param apiclass 接口类名
+ * @return 结果
+ */
+ ServerResult updateApiclass(Apiclass apiclass);
+
+ /**
+ * 批量删除接口类名
+ *
+ * @param ids 需要删除的接口类名ID
+ * @return 结果
+ */
+ ServerResult deleteApiclassByIds(Long[] ids);
+
+ /**
+ * 删除接口类名信息
+ *
+ * @param id 接口类名ID
+ * @return 结果
+ */
+ ServerResult deleteApiclassById(Long id);
+}
diff --git a/hchyun/hchyun-system/src/main/java/com/hchyun/system/service/impl/ApiclassServiceImpl.java b/hchyun/hchyun-system/src/main/java/com/hchyun/system/service/impl/ApiclassServiceImpl.java
new file mode 100644
index 0000000..20b85f2
--- /dev/null
+++ b/hchyun/hchyun-system/src/main/java/com/hchyun/system/service/impl/ApiclassServiceImpl.java
@@ -0,0 +1,159 @@
+package com.hchyun.system.service.impl;
+
+import java.util.List;
+
+import com.hchyun.common.constant.ReturnConstants;
+import com.hchyun.common.utils.DateUtils;
+import com.hchyun.common.utils.SecurityUtils;
+import com.hchyun.common.utils.DateUtils;
+import com.hchyun.common.utils.SecurityUtils;
+import com.hchyun.common.utils.ServerResult;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.hchyun.system.dao.ApiclassDao;
+import com.hchyun.system.entity.Apiclass;
+import com.hchyun.system.service.ApiclassService;
+
+/**
+ * 接口类名Service业务层处理
+ *
+ * @author hchyun
+ * @date 2021-01-24
+ */
+@Service
+public class ApiclassServiceImpl implements ApiclassService {
+ private Logger logger = LoggerFactory.getLogger(ApiclassServiceImpl.class);
+
+ @Autowired
+ private ApiclassDao apiclassDao;
+
+ /**
+ * 查询接口类名
+ *
+ * @param id 接口类名ID
+ * @return 接口类名
+ */
+ @Override
+ public ServerResult selectApiclassById(Long id) {
+ try {
+ Apiclass apiclass = apiclassDao.selectApiclassById(id);
+ if (apiclass != null){
+ return new ServerResult(true,apiclass);
+ }else {
+ return new ServerResult(false, ReturnConstants.RESULT_EMPTY);
+ }
+ }catch (RuntimeException e){
+ logger.error(e.getMessage());
+ return new ServerResult(false,ReturnConstants.DB_EX);
+ }
+ }
+
+ /**
+ * 查询接口类名列表
+ *
+ * @param apiclass 接口类名
+ * @return 接口类名
+ */
+ @Override
+ public ServerResult> selectApiclassList(Apiclass apiclass) {
+ try {
+ List apiclassList = apiclassDao.selectApiclassList(apiclass);
+ if (apiclassList.size()>0){
+ return new ServerResult>(true,apiclassList);
+ }else {
+ return new ServerResult>(false,ReturnConstants.RESULT_EMPTY);
+ }
+ }catch (RuntimeException e){
+ logger.error(e.getMessage());
+ return new ServerResult>(false,ReturnConstants.DB_EX);
+ }
+ }
+
+ /**
+ * 新增接口类名
+ *
+ * @param apiclass 接口类名
+ * @return 结果
+ */
+ @Override
+ public ServerResult insertApiclass(Apiclass apiclass) {
+ try {
+ apiclass.setCreateBy(SecurityUtils.getUserId());
+ Integer renewal = apiclassDao.insertApiclass(apiclass);
+ if (renewal >0){
+ return new ServerResult(true,renewal);
+ }else {
+ return new ServerResult(false,ReturnConstants.SYS_FAILL);
+ }
+ }catch (RuntimeException e){
+ logger.error(e.getMessage());
+ return new ServerResult(false,ReturnConstants.DB_EX);
+ }
+ }
+
+ /**
+ * 修改接口类名
+ *
+ * @param apiclass 接口类名
+ * @return 结果
+ */
+ @Override
+ public ServerResult updateApiclass(Apiclass apiclass) {
+ try {
+ apiclass.setUpdateBy(SecurityUtils.getUserId());
+ Integer renewal = apiclassDao.updateApiclass(apiclass);
+ if (renewal >0){
+ return new ServerResult(true,renewal);
+ }else {
+ return new ServerResult(false,ReturnConstants.SYS_FAILL);
+ }
+ }catch (RuntimeException e){
+ logger.error(e.getMessage());
+ return new ServerResult(false,ReturnConstants.DB_EX);
+ }
+ }
+
+ /**
+ * 批量删除接口类名
+ *
+ * @param ids 需要删除的接口类名ID
+ * @return 结果
+ */
+ @Override
+ public ServerResult deleteApiclassByIds(Long[] ids) {
+ try {
+ Integer renewal = apiclassDao.deleteApiclassByIds(ids);
+ if (renewal >0){
+ return new ServerResult(true,renewal);
+ }else {
+ return new ServerResult(false,ReturnConstants.SYS_FAILL);
+ }
+ }catch (RuntimeException e){
+ logger.error(e.getMessage());
+ return new ServerResult(false,ReturnConstants.DB_EX);
+ }
+ }
+
+ /**
+ * 删除接口类名信息
+ *
+ * @param id 接口类名ID
+ * @return 结果
+ */
+ @Override
+ public ServerResult deleteApiclassById(Long id) {
+ try {
+ Integer renewal = apiclassDao.deleteApiclassById(id);
+ if (renewal >0){
+ return new ServerResult(true,renewal);
+ }else {
+ return new ServerResult(false,ReturnConstants.SYS_FAILL);
+ }
+ }catch (RuntimeException e){
+ logger.error(e.getMessage());
+ return new ServerResult(false,ReturnConstants.DB_EX);
+ }
+ }
+}
diff --git a/hchyun/hchyun-system/src/main/resources/mapper/system/ApiclassMapper.xml b/hchyun/hchyun-system/src/main/resources/mapper/system/ApiclassMapper.xml
new file mode 100644
index 0000000..4434491
--- /dev/null
+++ b/hchyun/hchyun-system/src/main/resources/mapper/system/ApiclassMapper.xml
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ select id, m_id, c_name, c_describe, create_time, create_by, update_time, update_by from sys_apiclass
+
+
+
+
+
+
+
+ insert into sys_apiclass
+
+ m_id,
+ c_name,
+ c_describe,
+ create_by,
+ update_by,
+
+
+ #{mId},
+ #{cName},
+ #{cDescribe},
+ #{createBy},
+ #{updateBy},
+
+
+
+
+ update sys_apiclass
+
+ m_id = #{mId},
+ c_name = #{cName},
+ c_describe = #{cDescribe},
+ create_by = #{createBy},
+ update_by = #{updateBy},
+
+ where id = #{id}
+
+
+
+ delete from sys_apiclass where id = #{id}
+
+
+
+ delete from sys_apiclass where id in
+
+ #{id}
+
+
+
\ No newline at end of file