Commit a923700c authored by 季圣华's avatar 季圣华
Browse files

给接口增加swagger描述

parent 744691d9
......@@ -33,11 +33,11 @@ public class Swagger2Config {
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("Mybatis-Plus Plugin Example RESTful APIs")
.description("集成Mybatis-Plus模块接口描述")
.title("华夏ERP Restful Api")
.description("华夏ERP接口描述")
.termsOfServiceUrl("http://127.0.0.1")
.contact(new Contact("jishenghua", "", ""))
.version("2.1.1")
.version("3.0")
.build();
}
......
......@@ -11,8 +11,11 @@ import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.account.AccountService;
import com.jsh.erp.utils.BaseResponseInfo;
import com.jsh.erp.utils.ErpInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Description;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
......@@ -29,6 +32,7 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
*/
@RestController
@RequestMapping(value = "/account")
@Api(tags = {"账户管理"})
public class AccountController {
private Logger logger = LoggerFactory.getLogger(AccountController.class);
......@@ -41,6 +45,7 @@ public class AccountController {
* @return
*/
@GetMapping(value = "/findBySelect")
@ApiOperation(value = "查找结算账户信息-下拉框")
public String findBySelect(HttpServletRequest request) throws Exception {
String res = null;
try {
......@@ -70,6 +75,7 @@ public class AccountController {
* @return
*/
@GetMapping(value = "/getAccount")
@ApiOperation(value = "获取所有结算账户")
public BaseResponseInfo getAccount(HttpServletRequest request) throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
......@@ -96,6 +102,7 @@ public class AccountController {
* @return
*/
@GetMapping(value = "/findAccountInOutList")
@ApiOperation(value = "账户流水信息")
public BaseResponseInfo findAccountInOutList(@RequestParam("currentPage") Integer currentPage,
@RequestParam("pageSize") Integer pageSize,
@RequestParam("accountId") Long accountId,
......@@ -130,7 +137,15 @@ public class AccountController {
return res;
}
/**
* 更新默认账户
* @param object
* @param request
* @return
* @throws Exception
*/
@PostMapping(value = "/updateIsDefault")
@ApiOperation(value = "更新默认账户")
public String updateIsDefault(@RequestBody JSONObject object,
HttpServletRequest request) throws Exception{
Long accountId = object.getLong("id");
......@@ -149,6 +164,7 @@ public class AccountController {
* @return
*/
@GetMapping(value = "/getStatistics")
@ApiOperation(value = "结算账户的统计")
public BaseResponseInfo getStatistics(@RequestParam("name") String name,
@RequestParam("serialNo") String serialNo,
HttpServletRequest request) throws Exception {
......
......@@ -8,6 +8,8 @@ import com.jsh.erp.datasource.entities.AccountHeadVo4ListEx;
import com.jsh.erp.service.accountHead.AccountHeadService;
import com.jsh.erp.utils.BaseResponseInfo;
import com.jsh.erp.utils.ErpInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
......@@ -25,6 +27,7 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
*/
@RestController
@RequestMapping(value = "/accountHead")
@Api(tags = {"财务管理"})
public class AccountHeadController {
private Logger logger = LoggerFactory.getLogger(AccountHeadController.class);
......@@ -38,6 +41,7 @@ public class AccountHeadController {
* @return
*/
@PostMapping(value = "/batchSetStatus")
@ApiOperation(value = "批量设置状态-审核或者反审核")
public String batchSetStatus(@RequestBody JSONObject jsonObject,
HttpServletRequest request) throws Exception{
Map<String, Object> objectMap = new HashMap<>();
......@@ -59,6 +63,7 @@ public class AccountHeadController {
* @throws Exception
*/
@PostMapping(value = "/addAccountHeadAndDetail")
@ApiOperation(value = "新增财务主表及财务子表信息")
public Object addAccountHeadAndDetail(@RequestBody AccountHeadVo4Body body, HttpServletRequest request) throws Exception{
JSONObject result = ExceptionConstants.standardSuccess();
String beanJson = body.getInfo();
......@@ -75,6 +80,7 @@ public class AccountHeadController {
* @throws Exception
*/
@PutMapping(value = "/updateAccountHeadAndDetail")
@ApiOperation(value = "更新财务主表及财务子表信息")
public Object updateAccountHeadAndDetail(@RequestBody AccountHeadVo4Body body, HttpServletRequest request) throws Exception{
JSONObject result = ExceptionConstants.standardSuccess();
String beanJson = body.getInfo();
......@@ -90,6 +96,7 @@ public class AccountHeadController {
* @return
*/
@GetMapping(value = "/getDetailByNumber")
@ApiOperation(value = "根据编号查询单据信息")
public BaseResponseInfo getDetailByNumber(@RequestParam("billNo") String billNo,
HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
......
......@@ -5,6 +5,8 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.vo.AccountItemVo4List;
import com.jsh.erp.service.accountItem.AccountItemService;
import com.jsh.erp.utils.BaseResponseInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -25,6 +27,7 @@ import java.util.Map;
*/
@RestController
@RequestMapping(value = "/accountItem")
@Api(tags = {"财务明细"})
public class AccountItemController {
private Logger logger = LoggerFactory.getLogger(AccountItemController.class);
......@@ -32,6 +35,7 @@ public class AccountItemController {
private AccountItemService accountItemService;
@GetMapping(value = "/getDetailList")
@ApiOperation(value = "明细列表")
public BaseResponseInfo getDetailList(@RequestParam("headerId") Long headerId,
HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
......
......@@ -15,6 +15,8 @@ import com.jsh.erp.service.systemConfig.SystemConfigService;
import com.jsh.erp.service.user.UserService;
import com.jsh.erp.service.userBusiness.UserBusinessService;
import com.jsh.erp.utils.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.dao.DataAccessException;
......@@ -33,6 +35,7 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
*/
@RestController
@RequestMapping(value = "/depot")
@Api(tags = {"仓库管理"})
public class DepotController {
private Logger logger = LoggerFactory.getLogger(DepotController.class);
......@@ -45,7 +48,14 @@ public class DepotController {
@Resource
private MaterialService materialService;
/**
* 仓库列表
* @param request
* @return
* @throws Exception
*/
@GetMapping(value = "/getAllList")
@ApiOperation(value = "仓库列表")
public BaseResponseInfo getAllList(HttpServletRequest request) throws Exception{
BaseResponseInfo res = new BaseResponseInfo();
try {
......@@ -68,6 +78,7 @@ public class DepotController {
* @return
*/
@GetMapping(value = "/findUserDepot")
@ApiOperation(value = "用户对应仓库显示")
public JSONArray findUserDepot(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
HttpServletRequest request) throws Exception{
JSONArray arr = new JSONArray();
......@@ -114,6 +125,7 @@ public class DepotController {
* @throws Exception
*/
@GetMapping(value = "/findDepotByCurrentUser")
@ApiOperation(value = "获取当前用户拥有权限的仓库列表")
public BaseResponseInfo findDepotByCurrentUser(HttpServletRequest request) throws Exception{
BaseResponseInfo res = new BaseResponseInfo();
try {
......@@ -128,7 +140,15 @@ public class DepotController {
return res;
}
/**
* 更新默认仓库
* @param object
* @param request
* @return
* @throws Exception
*/
@PostMapping(value = "/updateIsDefault")
@ApiOperation(value = "更新默认仓库")
public String updateIsDefault(@RequestBody JSONObject object,
HttpServletRequest request) throws Exception{
Long depotId = object.getLong("id");
......@@ -141,7 +161,14 @@ public class DepotController {
}
}
/**
* 仓库列表-带库存
* @param mId
* @param request
* @return
*/
@GetMapping(value = "/getAllListWithStock")
@ApiOperation(value = "仓库列表-带库存")
public BaseResponseInfo getAllList(@RequestParam("mId") Long mId,
HttpServletRequest request) {
BaseResponseInfo res = new BaseResponseInfo();
......
......@@ -18,6 +18,8 @@ import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.redis.RedisService;
import com.jsh.erp.service.supplier.SupplierService;
import com.jsh.erp.utils.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
......@@ -41,6 +43,7 @@ import static com.jsh.erp.utils.Tools.getNow3;
*/
@RestController
@RequestMapping(value = "/depotHead")
@Api(tags = {"单据管理"})
public class DepotHeadController {
private Logger logger = LoggerFactory.getLogger(DepotHeadController.class);
......@@ -63,6 +66,7 @@ public class DepotHeadController {
* @return
*/
@PostMapping(value = "/batchSetStatus")
@ApiOperation(value = "批量设置状态-审核或者反审核")
public String batchSetStatus(@RequestBody JSONObject jsonObject,
HttpServletRequest request) throws Exception{
Map<String, Object> objectMap = new HashMap<>();
......@@ -90,6 +94,7 @@ public class DepotHeadController {
* @return
*/
@GetMapping(value = "/findInDetail")
@ApiOperation(value = "入库出库明细接口")
public BaseResponseInfo findInDetail(@RequestParam("currentPage") Integer currentPage,
@RequestParam("pageSize") Integer pageSize,
@RequestParam("organId") Integer oId,
......@@ -139,6 +144,7 @@ public class DepotHeadController {
* @return
*/
@GetMapping(value = "/findInOutMaterialCount")
@ApiOperation(value = "入库出库统计接口")
public BaseResponseInfo findInOutMaterialCount(@RequestParam("currentPage") Integer currentPage,
@RequestParam("pageSize") Integer pageSize,
@RequestParam("organId") Integer oId,
......@@ -175,6 +181,7 @@ public class DepotHeadController {
}
/**
* 调拨明细统计
* @param currentPage
* @param pageSize
* @param oId
......@@ -188,6 +195,7 @@ public class DepotHeadController {
* @return
*/
@GetMapping(value = "/findAllocationDetail")
@ApiOperation(value = "调拨明细统计")
public BaseResponseInfo findallocationDetail(@RequestParam("currentPage") Integer currentPage,
@RequestParam("pageSize") Integer pageSize,
@RequestParam("organId") Integer oId,
......@@ -229,6 +237,7 @@ public class DepotHeadController {
* @return
*/
@GetMapping(value = "/findStatementAccount")
@ApiOperation(value = "对账单接口")
public BaseResponseInfo findStatementAccount(@RequestParam("currentPage") Integer currentPage,
@RequestParam("pageSize") Integer pageSize,
@RequestParam("beginTime") String beginTime,
......@@ -281,6 +290,7 @@ public class DepotHeadController {
* @return
*/
@GetMapping(value = "/getDetailByNumber")
@ApiOperation(value = "根据编号查询单据信息")
public BaseResponseInfo getDetailByNumber(@RequestParam("number") String number,
HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
......@@ -308,6 +318,7 @@ public class DepotHeadController {
* @throws Exception
*/
@PostMapping(value = "/addDepotHeadAndDetail")
@ApiOperation(value = "新增单据主表及单据子表信息")
public Object addDepotHeadAndDetail(@RequestBody DepotHeadVo4Body body, HttpServletRequest request) throws Exception{
JSONObject result = ExceptionConstants.standardSuccess();
String beanJson = body.getInfo();
......@@ -324,6 +335,7 @@ public class DepotHeadController {
* @throws Exception
*/
@PutMapping(value = "/updateDepotHeadAndDetail")
@ApiOperation(value = "更新单据主表及单据子表信息")
public Object updateDepotHeadAndDetail(@RequestBody DepotHeadVo4Body body, HttpServletRequest request) throws Exception{
JSONObject result = ExceptionConstants.standardSuccess();
String beanJson = body.getInfo();
......@@ -338,6 +350,7 @@ public class DepotHeadController {
* @return
*/
@GetMapping(value = "/getBuyAndSaleStatistics")
@ApiOperation(value = "统计今日销售额、今日进货额、本月销售额、本月进货额")
public BaseResponseInfo getBuyAndSaleStatistics(HttpServletRequest request) {
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
......@@ -377,6 +390,7 @@ public class DepotHeadController {
* @return
*/
@GetMapping(value = "/getCreatorByCurrentUser")
@ApiOperation(value = "根据当前用户获取操作员数组")
public BaseResponseInfo getCreatorByRoleType(HttpServletRequest request) {
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
......@@ -404,6 +418,7 @@ public class DepotHeadController {
* @throws Exception
*/
@GetMapping(value = "/debtList")
@ApiOperation(value = "查询存在欠款的单据")
public String debtList(@RequestParam(value = Constants.SEARCH, required = false) String search,
HttpServletRequest request)throws Exception {
Map<String, Object> objectMap = new HashMap<>();
......
......@@ -14,6 +14,8 @@ import com.jsh.erp.service.material.MaterialService;
import com.jsh.erp.service.redis.RedisService;
import com.jsh.erp.service.unit.UnitService;
import com.jsh.erp.utils.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
......@@ -35,6 +37,7 @@ import static com.jsh.erp.utils.Tools.getCenternTime;
*/
@RestController
@RequestMapping(value = "/depotItem")
@Api(tags = {"单据明细"})
public class DepotItemController {
private Logger logger = LoggerFactory.getLogger(DepotItemController.class);
......@@ -60,6 +63,7 @@ public class DepotItemController {
* @return
*/
@GetMapping(value = "/findDetailByTypeAndMaterialId")
@ApiOperation(value = "只根据商品id查询单据列表")
public String findDetailByTypeAndMaterialId(
@RequestParam(value = Constants.PAGE_SIZE, required = false) Integer pageSize,
@RequestParam(value = Constants.CURRENT_PAGE, required = false) Integer currentPage,
......@@ -114,6 +118,7 @@ public class DepotItemController {
* @throws Exception
*/
@GetMapping(value = "/findStockByDepotAndBarCode")
@ApiOperation(value = "根据商品条码和仓库id查询库存数量")
public BaseResponseInfo findStockByDepotAndBarCode(
@RequestParam("depotId") Long depotId,
@RequestParam("barCode") String barCode,
......@@ -154,7 +159,16 @@ public class DepotItemController {
return res;
}
/**
* 单据明细列表
* @param headerId
* @param mpList
* @param request
* @return
* @throws Exception
*/
@GetMapping(value = "/getDetailList")
@ApiOperation(value = "单据明细列表")
public BaseResponseInfo getDetailList(@RequestParam("headerId") Long headerId,
@RequestParam("mpList") String mpList,
HttpServletRequest request)throws Exception {
......@@ -272,6 +286,7 @@ public class DepotItemController {
* @throws Exception
*/
@GetMapping(value = "/findByAll")
@ApiOperation(value = "查找所有的明细")
public BaseResponseInfo findByAll(@RequestParam("currentPage") Integer currentPage,
@RequestParam("pageSize") Integer pageSize,
@RequestParam("depotId") Long depotId,
......@@ -346,6 +361,7 @@ public class DepotItemController {
* @return
*/
@GetMapping(value = "/totalCountMoney")
@ApiOperation(value = "统计总计金额")
public BaseResponseInfo totalCountMoney(@RequestParam("depotId") Long depotId,
@RequestParam("monthTime") String monthTime,
@RequestParam("materialParam") String materialParam,
......@@ -390,6 +406,7 @@ public class DepotItemController {
* @return
*/
@GetMapping(value = "/buyIn")
@ApiOperation(value = "进货统计")
public BaseResponseInfo buyIn(@RequestParam("currentPage") Integer currentPage,
@RequestParam("pageSize") Integer pageSize,
@RequestParam("monthTime") String monthTime,
......@@ -453,6 +470,7 @@ public class DepotItemController {
* @return
*/
@GetMapping(value = "/saleOut")
@ApiOperation(value = "销售统计")
public BaseResponseInfo saleOut(@RequestParam("currentPage") Integer currentPage,
@RequestParam("pageSize") Integer pageSize,
@RequestParam("monthTime") String monthTime,
......@@ -534,6 +552,7 @@ public class DepotItemController {
* @return
*/
@GetMapping(value = "/findStockWarningCount")
@ApiOperation(value = "库存预警报表")
public BaseResponseInfo findStockWarningCount(@RequestParam("currentPage") Integer currentPage,
@RequestParam("pageSize") Integer pageSize,
@RequestParam("materialParam") String materialParam,
......@@ -585,6 +604,7 @@ public class DepotItemController {
* @throws Exception
*/
@GetMapping(value = "/buyOrSalePrice")
@ApiOperation(value = "统计采购或销售的总金额")
public BaseResponseInfo buyOrSalePrice(HttpServletRequest request, HttpServletResponse response)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
......@@ -627,6 +647,7 @@ public class DepotItemController {
* @return
*/
@GetMapping(value = "/getBatchNumberList")
@ApiOperation(value = "获取批次商品列表信息")
public BaseResponseInfo getBatchNumberList(@RequestParam("name") String name,
@RequestParam("depotId") Long depotId,
@RequestParam("barCode") String barCode,
......
......@@ -12,6 +12,8 @@ import com.jsh.erp.service.userBusiness.UserBusinessService;
import com.jsh.erp.utils.BaseResponseInfo;
import com.jsh.erp.utils.StringUtil;
import com.jsh.erp.utils.Tools;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.dao.DataAccessException;
......@@ -29,6 +31,7 @@ import java.util.Map;
*/
@RestController
@RequestMapping(value = "/function")
@Api(tags = {"功能管理"})
public class FunctionController {
private Logger logger = LoggerFactory.getLogger(FunctionController.class);
......@@ -38,7 +41,15 @@ public class FunctionController {
@Resource
private UserBusinessService userBusinessService;
/**
* 根据父编号查询菜单
* @param jsonObject
* @param request
* @return
* @throws Exception
*/
@PostMapping(value = "/findMenuByPNumber")
@ApiOperation(value = "根据父编号查询菜单")
public JSONArray findMenuByPNumber(@RequestBody JSONObject jsonObject,
HttpServletRequest request)throws Exception {
String pNumber = jsonObject.getString("pNumber");
......@@ -110,6 +121,7 @@ public class FunctionController {
* @return
*/
@GetMapping(value = "/findRoleFunction")
@ApiOperation(value = "角色对应功能显示")
public JSONArray findRoleFunction(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
HttpServletRequest request)throws Exception {
JSONArray arr = new JSONArray();
......@@ -183,6 +195,7 @@ public class FunctionController {
* @return
*/
@GetMapping(value = "/findRoleFunctionsById")
@ApiOperation(value = "根据id列表查找功能信息")
public BaseResponseInfo findByIds(@RequestParam("roleId") Long roleId,
HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
......
......@@ -8,6 +8,8 @@ import com.jsh.erp.datasource.entities.InOutItem;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.inOutItem.InOutItemService;
import com.jsh.erp.utils.BaseResponseInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
......@@ -23,6 +25,7 @@ import java.util.Map;
*/
@RestController
@RequestMapping(value = "/inOutItem")
@Api(tags = {"收支项目"})
public class InOutItemController {
private Logger logger = LoggerFactory.getLogger(InOutItemController.class);
......@@ -35,6 +38,7 @@ public class InOutItemController {
* @return
*/
@GetMapping(value = "/findBySelect")
@ApiOperation(value = "查找收支项目信息")
public String findBySelect(@RequestParam("type") String type, HttpServletRequest request) throws Exception{
String res = null;
try {
......
......@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.MaterialAttribute;
import com.jsh.erp.service.materialAttribute.MaterialAttributeService;
import com.jsh.erp.utils.BaseResponseInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -20,13 +22,21 @@ import java.util.List;
*/
@RestController
@RequestMapping(value = "/materialAttribute")
@Api(tags = {"商品属性"})
public class MaterialAttributeController {
private Logger logger = LoggerFactory.getLogger(MaterialAttributeController.class);
@Resource
private MaterialAttributeService materialAttributeService;
/**
* 获取全部商品属性
* @param request
* @return
* @throws Exception
*/
@GetMapping("/getAll")
@ApiOperation(value = "获取全部商品属性")
public BaseResponseInfo getAll(HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
try {
......
......@@ -11,6 +11,8 @@ import com.jsh.erp.datasource.vo.TreeNode;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.materialCategory.MaterialCategoryService;
import com.jsh.erp.utils.BaseResponseInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
......@@ -24,13 +26,22 @@ import java.util.List;
*/
@RestController
@RequestMapping(value = "/materialCategory")
@Api(tags = {"商品类别"})
public class MaterialCategoryController {
private Logger logger = LoggerFactory.getLogger(MaterialCategoryController.class);
@Resource
private MaterialCategoryService materialCategoryService;
/**
* 获取全部商品类别
* @param parentId
* @param request
* @return
* @throws Exception
*/
@GetMapping(value = "/getAllList")
@ApiOperation(value = "获取全部商品类别")
public BaseResponseInfo getAllList(@RequestParam("parentId") Long parentId, HttpServletRequest request) throws Exception{
BaseResponseInfo res = new BaseResponseInfo();
try {
......@@ -52,6 +63,7 @@ public class MaterialCategoryController {
* @return
*/
@GetMapping(value = "/findById")
@ApiOperation(value = "根据id来查询商品名称")
public BaseResponseInfo findById(@RequestParam("id") Long id, HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
try {
......@@ -89,6 +101,7 @@ public class MaterialCategoryController {
* @return com.alibaba.fastjson.JSONArray
*/
@RequestMapping(value = "/getMaterialCategoryTree")
@ApiOperation(value = "获取商品类别树数据")
public JSONArray getMaterialCategoryTree(@RequestParam("id") Long id) throws Exception{
JSONArray arr=new JSONArray();
List<TreeNode> materialCategoryTree = materialCategoryService.getMaterialCategoryTree(id);
......@@ -110,6 +123,7 @@ public class MaterialCategoryController {
* @return java.lang.Object
*/
@RequestMapping(value = "/addMaterialCategory")
@ApiOperation(value = "新增商品类别数据")
public Object addMaterialCategory(@RequestParam("info") String beanJson) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
MaterialCategory mc= JSON.parseObject(beanJson, MaterialCategory.class);
......@@ -129,6 +143,7 @@ public class MaterialCategoryController {
* @return java.lang.Object
*/
@RequestMapping(value = "/editMaterialCategory")
@ApiOperation(value = "修改商品类别数据")
public Object editMaterialCategory(@RequestParam("info") String beanJson) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
MaterialCategory mc= JSON.parseObject(beanJson, MaterialCategory.class);
......
......@@ -13,6 +13,8 @@ import com.jsh.erp.service.material.MaterialService;
import com.jsh.erp.service.redis.RedisService;
import com.jsh.erp.service.unit.UnitService;
import com.jsh.erp.utils.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jxl.Sheet;
import jxl.Workbook;
import org.slf4j.Logger;
......@@ -34,6 +36,7 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
*/
@RestController
@RequestMapping(value = "/material")
@Api(tags = {"商品管理"})
public class MaterialController {
private Logger logger = LoggerFactory.getLogger(MaterialController.class);
......@@ -52,7 +55,25 @@ public class MaterialController {
@Resource
private RedisService redisService;
/**
* 检查商品是否存在
* @param id
* @param name
* @param model
* @param color
* @param standard
* @param mfrs
* @param otherField1
* @param otherField2
* @param otherField3
* @param unit
* @param unitId
* @param request
* @return
* @throws Exception
*/
@GetMapping(value = "/checkIsExist")
@ApiOperation(value = "检查商品是否存在")
public String checkIsExist(@RequestParam("id") Long id, @RequestParam("name") String name,
@RequestParam("model") String model, @RequestParam("color") String color,
@RequestParam("standard") String standard, @RequestParam("mfrs") String mfrs,
......@@ -79,6 +100,7 @@ public class MaterialController {
* @throws Exception
*/
@PostMapping(value = "/batchSetStatus")
@ApiOperation(value = "批量设置状态-启用或者禁用")
public String batchSetStatus(@RequestBody JSONObject jsonObject,
HttpServletRequest request)throws Exception {
Boolean status = jsonObject.getBoolean("status");
......@@ -99,6 +121,7 @@ public class MaterialController {
* @return
*/
@GetMapping(value = "/findById")
@ApiOperation(value = "根据id来查询商品名称")
public BaseResponseInfo findById(@RequestParam("id") Long id, HttpServletRequest request) throws Exception{
BaseResponseInfo res = new BaseResponseInfo();
try {
......@@ -120,6 +143,7 @@ public class MaterialController {
* @return
*/
@GetMapping(value = "/findByIdWithBarCode")
@ApiOperation(value = "根据meId来查询商品名称")
public BaseResponseInfo findByIdWithBarCode(@RequestParam("meId") Long meId,
@RequestParam("mpList") String mpList,
HttpServletRequest request) throws Exception{
......@@ -164,6 +188,7 @@ public class MaterialController {
* @return
*/
@GetMapping(value = "/findBySelect")
@ApiOperation(value = "查找商品信息")
public JSONObject findBySelect(@RequestParam(value = "categoryId", required = false) Long categoryId,
@RequestParam(value = "q", required = false) String q,
@RequestParam("mpList") String mpList,
......@@ -251,6 +276,7 @@ public class MaterialController {
* @throws Exception
*/
@GetMapping(value = "/getMaterialByMeId")
@ApiOperation(value = "根据商品id查找商品信息")
public JSONObject getMaterialByMeId(@RequestParam(value = "meId", required = false) Long meId,
@RequestParam("mpList") String mpList,
HttpServletRequest request) throws Exception{
......@@ -317,6 +343,7 @@ public class MaterialController {
* @param response
*/
@GetMapping(value = "/exportExcel")
@ApiOperation(value = "生成excel表格")
public void exportExcel(@RequestParam("categoryId") String categoryId,
@RequestParam("barCode") String barCode,
@RequestParam("name") String name,
......@@ -361,6 +388,7 @@ public class MaterialController {
* @return
*/
@PostMapping(value = "/importExcel")
@ApiOperation(value = "excel表格导入产品")
public BaseResponseInfo importExcel(MultipartFile file,
HttpServletRequest request, HttpServletResponse response) throws Exception{
BaseResponseInfo res = new BaseResponseInfo();
......@@ -387,7 +415,19 @@ public class MaterialController {
return null;
}
}
/**
* 获取商品序列号
* @param q
* @param currentPage
* @param pageSize
* @param request
* @param response
* @return
* @throws Exception
*/
@GetMapping(value = "/getMaterialEnableSerialNumberList")
@ApiOperation(value = "获取商品序列号")
public JSONObject getMaterialEnableSerialNumberList(
@RequestParam(value = "q", required = false) String q,
@RequestParam("page") Integer currentPage,
......@@ -406,7 +446,13 @@ public class MaterialController {
return object;
}
/**
* 获取最大条码
* @return
* @throws Exception
*/
@GetMapping(value = "/getMaxBarCode")
@ApiOperation(value = "获取最大条码")
public BaseResponseInfo getMaxBarCode() throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
......@@ -423,6 +469,7 @@ public class MaterialController {
* @throws Exception
*/
@GetMapping(value = "/getMaterialNameList")
@ApiOperation(value = "商品名称模糊匹配")
public JSONArray getMaterialNameList() throws Exception {
JSONArray arr = new JSONArray();
try {
......@@ -445,6 +492,7 @@ public class MaterialController {
* @throws Exception
*/
@GetMapping(value = "/getMaterialByBarCode")
@ApiOperation(value = "根据条码查询商品信息")
public BaseResponseInfo getMaterialByBarCode(@RequestParam("barCode") String barCode,
@RequestParam("mpList") String mpList,
@RequestParam(required = false, value = "prefixNo") String prefixNo,
......@@ -541,6 +589,7 @@ public class MaterialController {
* @throws Exception
*/
@GetMapping(value = "/getListWithStock")
@ApiOperation(value = "商品库存查询")
public BaseResponseInfo getListWithStock(@RequestParam("currentPage") Integer currentPage,
@RequestParam("pageSize") Integer pageSize,
@RequestParam("depotId") Long depotId,
......@@ -585,6 +634,7 @@ public class MaterialController {
* @throws Exception
*/
@PostMapping(value = "/batchSetMaterialCurrentStock")
@ApiOperation(value = "批量设置商品当前的实时库存(按每个仓库)")
public String batchSetMaterialCurrentStock(@RequestBody JSONObject jsonObject,
HttpServletRequest request)throws Exception {
String ids = jsonObject.getString("ids");
......
......@@ -7,6 +7,8 @@ import com.jsh.erp.datasource.vo.MaterialExtendVo4List;
import com.jsh.erp.service.materialExtend.MaterialExtendService;
import com.jsh.erp.utils.BaseResponseInfo;
import com.jsh.erp.utils.StringUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
......@@ -23,12 +25,14 @@ import java.util.Map;
*/
@RestController
@RequestMapping(value = "/materialsExtend")
@Api(tags = {"商品价格扩展"})
public class MaterialExtendController {
private Logger logger = LoggerFactory.getLogger(MaterialExtendController.class);
@Resource
private MaterialExtendService materialExtendService;
@GetMapping(value = "/getDetailList")
@ApiOperation(value = "价格信息列表")
public BaseResponseInfo getDetailList(@RequestParam("materialId") Long materialId,
HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
......@@ -69,7 +73,15 @@ public class MaterialExtendController {
return res;
}
/**
* 根据条码查询商品信息
* @param barCode
* @param request
* @return
* @throws Exception
*/
@GetMapping(value = "/getInfoByBarCode")
@ApiOperation(value = "根据条码查询商品信息")
public BaseResponseInfo getInfoByBarCode(@RequestParam("barCode") String barCode,
HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
......@@ -86,7 +98,16 @@ public class MaterialExtendController {
return res;
}
/**
* 校验条码是否存在
* @param id
* @param barCode
* @param request
* @return
* @throws Exception
*/
@GetMapping(value = "/checkIsBarCodeExist")
@ApiOperation(value = "校验条码是否存在")
public BaseResponseInfo checkIsBarCodeExist(@RequestParam("id") Long id,
@RequestParam("barCode") String barCode,
HttpServletRequest request)throws Exception {
......
......@@ -5,6 +5,7 @@ import com.jsh.erp.constants.ExceptionConstants;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.material.MaterialService;
import com.jsh.erp.service.materialProperty.MaterialPropertyService;
import io.swagger.annotations.Api;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -22,6 +23,7 @@ import javax.annotation.Resource;
*/
@RestController
@RequestMapping(value = "/materialProperty")
@Api(tags = {"商品扩展字段"})
public class MaterialPropertyController {
......
......@@ -3,6 +3,8 @@ package com.jsh.erp.controller;
import com.jsh.erp.datasource.entities.Msg;
import com.jsh.erp.service.msg.MsgService;
import com.jsh.erp.utils.BaseResponseInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
......@@ -18,13 +20,22 @@ import java.util.Map;
*/
@RestController
@RequestMapping(value = "/msg")
@Api(tags = {"消息管理"})
public class MsgController {
private Logger logger = LoggerFactory.getLogger(MsgController.class);
@Resource
private MsgService msgService;
/**
* 根据状态查询消息
* @param status
* @param request
* @return
* @throws Exception
*/
@GetMapping("/getMsgByStatus")
@ApiOperation(value = "根据状态查询消息")
public BaseResponseInfo getMsgByStatus(@RequestParam("status") String status,
HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
......@@ -40,7 +51,16 @@ public class MsgController {
return res;
}
/**
* 批量更新状态
* @param ids
* @param status
* @param request
* @return
* @throws Exception
*/
@PostMapping("/batchUpdateStatus")
@ApiOperation(value = "批量更新状态")
public BaseResponseInfo batchUpdateStatus(@RequestParam("ids") String ids,
@RequestParam("status") String status,
HttpServletRequest request)throws Exception {
......@@ -57,7 +77,15 @@ public class MsgController {
return res;
}
/**
* 根据状态查询数量
* @param status
* @param request
* @return
* @throws Exception
*/
@GetMapping("/getMsgCountByStatus")
@ApiOperation(value = "根据状态查询数量")
public BaseResponseInfo getMsgCountByStatus(@RequestParam("status") String status,
HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
......
......@@ -11,6 +11,8 @@ import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.materialCategory.MaterialCategoryService;
import com.jsh.erp.service.organization.OrganizationService;
import com.jsh.erp.utils.BaseResponseInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
......@@ -28,6 +30,7 @@ import java.util.List;
*/
@RestController
@RequestMapping(value = "/organization")
@Api(tags = {"机构管理"})
public class OrganizationController {
private Logger logger = LoggerFactory.getLogger(OrganizationController.class);
......@@ -40,6 +43,7 @@ public class OrganizationController {
* @return
*/
@GetMapping(value = "/findById")
@ApiOperation(value = "根据id来查询机构信息")
public BaseResponseInfo findById(@RequestParam("id") Long id, HttpServletRequest request) throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
......@@ -80,6 +84,7 @@ public class OrganizationController {
* @return com.alibaba.fastjson.JSONArray
*/
@RequestMapping(value = "/getOrganizationTree")
@ApiOperation(value = "获取机构树数据")
public JSONArray getOrganizationTree(@RequestParam("id") Long id) throws Exception{
JSONArray arr=new JSONArray();
List<TreeNode> organizationTree= organizationService.getOrganizationTree(id);
......@@ -101,6 +106,7 @@ public class OrganizationController {
* @return java.lang.Object
*/
@PostMapping(value = "/addOrganization")
@ApiOperation(value = "新增机构信息")
public Object addOrganization(@RequestParam("info") String beanJson) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
Organization org= JSON.parseObject(beanJson, Organization.class);
......@@ -120,6 +126,7 @@ public class OrganizationController {
* @return java.lang.Object
*/
@PostMapping(value = "/editOrganization")
@ApiOperation(value = "修改机构信息")
public Object editOrganization(@RequestParam("info") String beanJson) throws Exception {
JSONObject result = ExceptionConstants.standardSuccess();
Organization org= JSON.parseObject(beanJson, Organization.class);
......
......@@ -8,6 +8,8 @@ import com.jsh.erp.datasource.entities.Person;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.person.PersonService;
import com.jsh.erp.utils.BaseResponseInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
......@@ -23,13 +25,21 @@ import java.util.Map;
*/
@RestController
@RequestMapping(value = "/person")
@Api(tags = {"经手人管理"})
public class PersonController {
private Logger logger = LoggerFactory.getLogger(PersonController.class);
@Resource
private PersonService personService;
/**
* 全部数据列表
* @param request
* @return
* @throws Exception
*/
@GetMapping(value = "/getAllList")
@ApiOperation(value = "全部数据列表")
public BaseResponseInfo getAllList(HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
......@@ -53,6 +63,7 @@ public class PersonController {
* @return
*/
@GetMapping(value = "/getPersonByIds")
@ApiOperation(value = "根据Id获取经手人信息")
public BaseResponseInfo getPersonByIds(@RequestParam("personIds") String personIds,
HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
......@@ -78,6 +89,7 @@ public class PersonController {
* @return
*/
@GetMapping(value = "/getPersonByType")
@ApiOperation(value = "根据类型获取经手人信息")
public BaseResponseInfo getPersonByType(@RequestParam("type") String type,
HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
......@@ -102,6 +114,7 @@ public class PersonController {
* @return
*/
@GetMapping(value = "/getPersonByNumType")
@ApiOperation(value = "根据类型获取经手人信息1-业务员,2-仓管员,3-财务员")
public JSONArray getPersonByNumType(@RequestParam("type") String typeNum,
HttpServletRequest request)throws Exception {
JSONArray dataArray = new JSONArray();
......
......@@ -7,6 +7,8 @@ import com.jsh.erp.service.platformConfig.PlatformConfigService;
import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.BaseResponseInfo;
import com.jsh.erp.utils.ErpInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
......@@ -24,6 +26,7 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
*/
@RestController
@RequestMapping(value = "/platformConfig")
@Api(tags = {"平台参数"})
public class PlatformConfigController {
private Logger logger = LoggerFactory.getLogger(PlatformConfigController.class);
......@@ -44,6 +47,7 @@ public class PlatformConfigController {
* @return
*/
@GetMapping(value = "/getPlatform/name")
@ApiOperation(value = "获取平台名称")
public String getPlatformName(HttpServletRequest request)throws Exception {
String res;
try {
......@@ -63,6 +67,7 @@ public class PlatformConfigController {
* @return
*/
@GetMapping(value = "/getPlatform/url")
@ApiOperation(value = "获取官方网站地址")
public String getPlatformUrl(HttpServletRequest request)throws Exception {
String res;
try {
......@@ -83,6 +88,7 @@ public class PlatformConfigController {
* @return
*/
@PostMapping(value = "/updatePlatformConfigByKey")
@ApiOperation(value = "根据platformKey更新platformValue")
public String updatePlatformConfigByKey(@RequestBody JSONObject object,
HttpServletRequest request)throws Exception {
Map<String, Object> objectMap = new HashMap<>();
......@@ -103,6 +109,7 @@ public class PlatformConfigController {
* @return
*/
@GetMapping(value = "/getPlatformConfigByKey")
@ApiOperation(value = "根据platformKey查询信息")
public BaseResponseInfo getPlatformConfigByKey(@RequestParam("platformKey") String platformKey,
HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
......
......@@ -6,6 +6,8 @@ import com.gitee.starblues.integration.operator.module.PluginInfo;
import com.jsh.erp.utils.BaseResponseInfo;
import com.jsh.erp.utils.ComputerInfo;
import com.jsh.erp.utils.StringUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.DigestUtils;
import org.springframework.web.bind.annotation.*;
......@@ -23,6 +25,7 @@ import java.util.*;
*/
@RestController
@RequestMapping("/plugin")
@Api(tags = {"插件管理"})
public class PluginController {
......@@ -37,6 +40,7 @@ public class PluginController {
* @return 返回插件信息
*/
@GetMapping(value = "/list")
@ApiOperation(value = "获取插件信息")
public BaseResponseInfo getPluginInfo(@RequestParam(value = "name",required = false) String name,
@RequestParam("currentPage") Integer currentPage,
@RequestParam("pageSize") Integer pageSize,
......@@ -73,6 +77,7 @@ public class PluginController {
* @return 获取插件文件名。只在生产环境显示
*/
@GetMapping("/files")
@ApiOperation(value = "获取插件jar文件名")
public Set<String> getPluginFilePaths(){
try {
return pluginOperator.getPluginFilePaths();
......@@ -89,6 +94,7 @@ public class PluginController {
* @return 返回操作结果
*/
@PostMapping("/stop/{id}")
@ApiOperation(value = "根据插件id停止插件")
public BaseResponseInfo stop(@PathVariable("id") String id){
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
......@@ -117,6 +123,7 @@ public class PluginController {
* @return 返回操作结果
*/
@PostMapping("/start/{id}")
@ApiOperation(value = "根据插件id启动插件")
public BaseResponseInfo start(@PathVariable("id") String id){
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
......@@ -146,6 +153,7 @@ public class PluginController {
* @return 返回操作结果
*/
@PostMapping("/uninstall/{id}")
@ApiOperation(value = "根据插件id卸载插件")
public BaseResponseInfo uninstall(@PathVariable("id") String id){
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
......@@ -175,6 +183,7 @@ public class PluginController {
* @return 操作结果
*/
@PostMapping("/installByPath")
@ApiOperation(value = "根据插件路径安装插件")
public String install(@RequestParam("path") String path){
try {
if(pluginOperator.install(Paths.get(path))){
......@@ -195,6 +204,7 @@ public class PluginController {
* @return 操作结果
*/
@PostMapping("/uploadInstallPluginJar")
@ApiOperation(value = "上传并安装插件")
public BaseResponseInfo install(MultipartFile file, HttpServletRequest request, HttpServletResponse response){
BaseResponseInfo res = new BaseResponseInfo();
try {
......@@ -215,6 +225,7 @@ public class PluginController {
* @return 操作结果
*/
@PostMapping("/uploadPluginConfigFile")
@ApiOperation(value = "上传插件的配置文件")
public String uploadConfig(@RequestParam("configFile") MultipartFile multipartFile){
try {
if(pluginOperator.uploadConfigFile(multipartFile)){
......@@ -235,6 +246,7 @@ public class PluginController {
* @return 操作结果
*/
@PostMapping("/back/{pluginId}")
@ApiOperation(value = "备份插件")
public String backupPlugin(@PathVariable("pluginId") String pluginId){
try {
if(pluginOperator.backupPlugin(pluginId, "testBack")){
......@@ -253,6 +265,7 @@ public class PluginController {
* @return
*/
@GetMapping("/getMacWithSecret")
@ApiOperation(value = "获取加密后的mac")
public BaseResponseInfo getMacWithSecret(){
BaseResponseInfo res = new BaseResponseInfo();
try {
......
......@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.constants.BusinessConstants;
import com.jsh.erp.service.CommonQueryManager;
import com.jsh.erp.utils.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
......@@ -21,12 +23,14 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
* by jishenghua 2018-9-12 23:58:10 华夏erp
*/
@RestController
@Api(tags = {"资源接口"})
public class ResourceController {
@Resource
private CommonQueryManager configResourceManager;
@GetMapping(value = "/{apiName}/info")
@ApiOperation(value = "根据id获取信息")
public String getList(@PathVariable("apiName") String apiName,
@RequestParam("id") Long id,
HttpServletRequest request) throws Exception {
......@@ -41,6 +45,7 @@ public class ResourceController {
}
@GetMapping(value = "/{apiName}/list")
@ApiOperation(value = "获取信息列表")
public String getList(@PathVariable("apiName") String apiName,
@RequestParam(value = Constants.PAGE_SIZE, required = false) Integer pageSize,
@RequestParam(value = Constants.CURRENT_PAGE, required = false) Integer currentPage,
......@@ -69,6 +74,7 @@ public class ResourceController {
}
@PostMapping(value = "/{apiName}/add", produces = {"application/javascript", "application/json"})
@ApiOperation(value = "新增")
public String addResource(@PathVariable("apiName") String apiName,
@RequestBody JSONObject obj, HttpServletRequest request)throws Exception {
Map<String, Object> objectMap = new HashMap<String, Object>();
......@@ -83,6 +89,7 @@ public class ResourceController {
}
@PutMapping(value = "/{apiName}/update", produces = {"application/javascript", "application/json"})
@ApiOperation(value = "修改")
public String updateResource(@PathVariable("apiName") String apiName,
@RequestBody JSONObject obj, HttpServletRequest request)throws Exception {
Map<String, Object> objectMap = new HashMap<String, Object>();
......@@ -97,6 +104,7 @@ public class ResourceController {
}
@DeleteMapping(value = "/{apiName}/delete", produces = {"application/javascript", "application/json"})
@ApiOperation(value = "删除")
public String deleteResource(@PathVariable("apiName") String apiName,
@RequestParam("id") Long id, HttpServletRequest request)throws Exception {
Map<String, Object> objectMap = new HashMap<String, Object>();
......@@ -111,6 +119,7 @@ public class ResourceController {
}
@DeleteMapping(value = "/{apiName}/deleteBatch", produces = {"application/javascript", "application/json"})
@ApiOperation(value = "批量删除")
public String batchDeleteResource(@PathVariable("apiName") String apiName,
@RequestParam("ids") String ids, HttpServletRequest request)throws Exception {
Map<String, Object> objectMap = new HashMap<String, Object>();
......@@ -125,6 +134,7 @@ public class ResourceController {
}
@GetMapping(value = "/{apiName}/checkIsNameExist")
@ApiOperation(value = "检查名称是否存在")
public String checkIsNameExist(@PathVariable("apiName") String apiName,
@RequestParam Long id, @RequestParam(value ="name", required = false) String name,
HttpServletRequest request)throws Exception {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment