forked from yangzongzhuan/RuoYi-Cloud
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mingxing.ai
committed
Aug 20, 2023
1 parent
c45b16d
commit 2acc74b
Showing
25 changed files
with
2,163 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
...les/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductCategoryController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
package com.ruoyi.system.controller; | ||
|
||
import java.util.List; | ||
import java.io.IOException; | ||
import javax.servlet.http.HttpServletResponse; | ||
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.ruoyi.common.log.annotation.Log; | ||
import com.ruoyi.common.log.enums.BusinessType; | ||
import com.ruoyi.common.security.annotation.RequiresPermissions; | ||
import com.ruoyi.system.domain.ProductCategory; | ||
import com.ruoyi.system.service.IProductCategoryService; | ||
import com.ruoyi.common.core.web.controller.BaseController; | ||
import com.ruoyi.common.core.web.domain.AjaxResult; | ||
import com.ruoyi.common.core.utils.poi.ExcelUtil; | ||
import com.ruoyi.common.core.web.page.TableDataInfo; | ||
|
||
/** | ||
* 产品类别Controller | ||
* | ||
* @author ruoyi | ||
* @date 2023-08-20 | ||
*/ | ||
@RestController | ||
@RequestMapping("/category") | ||
public class ProductCategoryController extends BaseController | ||
{ | ||
@Autowired | ||
private IProductCategoryService productCategoryService; | ||
|
||
/** | ||
* 查询产品类别列表 | ||
*/ | ||
@RequiresPermissions("system:category:list") | ||
@GetMapping("/list") | ||
public TableDataInfo list(ProductCategory productCategory) | ||
{ | ||
startPage(); | ||
List<ProductCategory> list = productCategoryService.selectProductCategoryList(productCategory); | ||
return getDataTable(list); | ||
} | ||
|
||
/** | ||
* 导出产品类别列表 | ||
*/ | ||
@RequiresPermissions("system:category:export") | ||
@Log(title = "产品类别", businessType = BusinessType.EXPORT) | ||
@PostMapping("/export") | ||
public void export(HttpServletResponse response, ProductCategory productCategory) | ||
{ | ||
List<ProductCategory> list = productCategoryService.selectProductCategoryList(productCategory); | ||
ExcelUtil<ProductCategory> util = new ExcelUtil<ProductCategory>(ProductCategory.class); | ||
util.exportExcel(response, list, "产品类别数据"); | ||
} | ||
|
||
/** | ||
* 获取产品类别详细信息 | ||
*/ | ||
@RequiresPermissions("system:category:query") | ||
@GetMapping(value = "/{id}") | ||
public AjaxResult getInfo(@PathVariable("id") Long id) | ||
{ | ||
return success(productCategoryService.selectProductCategoryById(id)); | ||
} | ||
|
||
/** | ||
* 新增产品类别 | ||
*/ | ||
@RequiresPermissions("system:category:add") | ||
@Log(title = "产品类别", businessType = BusinessType.INSERT) | ||
@PostMapping | ||
public AjaxResult add(@RequestBody ProductCategory productCategory) | ||
{ | ||
return toAjax(productCategoryService.insertProductCategory(productCategory)); | ||
} | ||
|
||
/** | ||
* 修改产品类别 | ||
*/ | ||
@RequiresPermissions("system:category:edit") | ||
@Log(title = "产品类别", businessType = BusinessType.UPDATE) | ||
@PutMapping | ||
public AjaxResult edit(@RequestBody ProductCategory productCategory) | ||
{ | ||
return toAjax(productCategoryService.updateProductCategory(productCategory)); | ||
} | ||
|
||
/** | ||
* 删除产品类别 | ||
*/ | ||
@RequiresPermissions("system:category:remove") | ||
@Log(title = "产品类别", businessType = BusinessType.DELETE) | ||
@DeleteMapping("/{ids}") | ||
public AjaxResult remove(@PathVariable Long[] ids) | ||
{ | ||
return toAjax(productCategoryService.deleteProductCategoryByIds(ids)); | ||
} | ||
} |
105 changes: 105 additions & 0 deletions
105
...dules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductConfigController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
package com.ruoyi.system.controller; | ||
|
||
import java.util.List; | ||
import java.io.IOException; | ||
import javax.servlet.http.HttpServletResponse; | ||
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.ruoyi.common.log.annotation.Log; | ||
import com.ruoyi.common.log.enums.BusinessType; | ||
import com.ruoyi.common.security.annotation.RequiresPermissions; | ||
import com.ruoyi.system.domain.ProductConfig; | ||
import com.ruoyi.system.service.IProductConfigService; | ||
import com.ruoyi.common.core.web.controller.BaseController; | ||
import com.ruoyi.common.core.web.domain.AjaxResult; | ||
import com.ruoyi.common.core.utils.poi.ExcelUtil; | ||
import com.ruoyi.common.core.web.page.TableDataInfo; | ||
|
||
/** | ||
* 产品配置Controller | ||
* | ||
* @author ruoyi | ||
* @date 2023-08-20 | ||
*/ | ||
@RestController | ||
@RequestMapping("/config") | ||
public class ProductConfigController extends BaseController | ||
{ | ||
@Autowired | ||
private IProductConfigService productConfigService; | ||
|
||
/** | ||
* 查询产品配置列表 | ||
*/ | ||
@RequiresPermissions("system:config:list") | ||
@GetMapping("/list") | ||
public TableDataInfo list(ProductConfig productConfig) | ||
{ | ||
startPage(); | ||
List<ProductConfig> list = productConfigService.selectProductConfigList(productConfig); | ||
return getDataTable(list); | ||
} | ||
|
||
/** | ||
* 导出产品配置列表 | ||
*/ | ||
@RequiresPermissions("system:config:export") | ||
@Log(title = "产品配置", businessType = BusinessType.EXPORT) | ||
@PostMapping("/export") | ||
public void export(HttpServletResponse response, ProductConfig productConfig) | ||
{ | ||
List<ProductConfig> list = productConfigService.selectProductConfigList(productConfig); | ||
ExcelUtil<ProductConfig> util = new ExcelUtil<ProductConfig>(ProductConfig.class); | ||
util.exportExcel(response, list, "产品配置数据"); | ||
} | ||
|
||
/** | ||
* 获取产品配置详细信息 | ||
*/ | ||
@RequiresPermissions("system:config:query") | ||
@GetMapping(value = "/{id}") | ||
public AjaxResult getInfo(@PathVariable("id") Long id) | ||
{ | ||
return success(productConfigService.selectProductConfigById(id)); | ||
} | ||
|
||
/** | ||
* 新增产品配置 | ||
*/ | ||
@RequiresPermissions("system:config:add") | ||
@Log(title = "产品配置", businessType = BusinessType.INSERT) | ||
@PostMapping | ||
public AjaxResult add(@RequestBody ProductConfig productConfig) | ||
{ | ||
return toAjax(productConfigService.insertProductConfig(productConfig)); | ||
} | ||
|
||
/** | ||
* 修改产品配置 | ||
*/ | ||
@RequiresPermissions("system:config:edit") | ||
@Log(title = "产品配置", businessType = BusinessType.UPDATE) | ||
@PutMapping | ||
public AjaxResult edit(@RequestBody ProductConfig productConfig) | ||
{ | ||
return toAjax(productConfigService.updateProductConfig(productConfig)); | ||
} | ||
|
||
/** | ||
* 删除产品配置 | ||
*/ | ||
@RequiresPermissions("system:config:remove") | ||
@Log(title = "产品配置", businessType = BusinessType.DELETE) | ||
@DeleteMapping("/{ids}") | ||
public AjaxResult remove(@PathVariable Long[] ids) | ||
{ | ||
return toAjax(productConfigService.deleteProductConfigByIds(ids)); | ||
} | ||
} |
105 changes: 105 additions & 0 deletions
105
...modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductInfoController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
package com.ruoyi.system.controller; | ||
|
||
import java.util.List; | ||
import java.io.IOException; | ||
import javax.servlet.http.HttpServletResponse; | ||
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.ruoyi.common.log.annotation.Log; | ||
import com.ruoyi.common.log.enums.BusinessType; | ||
import com.ruoyi.common.security.annotation.RequiresPermissions; | ||
import com.ruoyi.system.domain.ProductInfo; | ||
import com.ruoyi.system.service.IProductInfoService; | ||
import com.ruoyi.common.core.web.controller.BaseController; | ||
import com.ruoyi.common.core.web.domain.AjaxResult; | ||
import com.ruoyi.common.core.utils.poi.ExcelUtil; | ||
import com.ruoyi.common.core.web.page.TableDataInfo; | ||
|
||
/** | ||
* 产品信息Controller | ||
* | ||
* @author ruoyi | ||
* @date 2023-08-20 | ||
*/ | ||
@RestController | ||
@RequestMapping("/info") | ||
public class ProductInfoController extends BaseController | ||
{ | ||
@Autowired | ||
private IProductInfoService productInfoService; | ||
|
||
/** | ||
* 查询产品信息列表 | ||
*/ | ||
@RequiresPermissions("system:info:list") | ||
@GetMapping("/list") | ||
public TableDataInfo list(ProductInfo productInfo) | ||
{ | ||
startPage(); | ||
List<ProductInfo> list = productInfoService.selectProductInfoList(productInfo); | ||
return getDataTable(list); | ||
} | ||
|
||
/** | ||
* 导出产品信息列表 | ||
*/ | ||
@RequiresPermissions("system:info:export") | ||
@Log(title = "产品信息", businessType = BusinessType.EXPORT) | ||
@PostMapping("/export") | ||
public void export(HttpServletResponse response, ProductInfo productInfo) | ||
{ | ||
List<ProductInfo> list = productInfoService.selectProductInfoList(productInfo); | ||
ExcelUtil<ProductInfo> util = new ExcelUtil<ProductInfo>(ProductInfo.class); | ||
util.exportExcel(response, list, "产品信息数据"); | ||
} | ||
|
||
/** | ||
* 获取产品信息详细信息 | ||
*/ | ||
@RequiresPermissions("system:info:query") | ||
@GetMapping(value = "/{id}") | ||
public AjaxResult getInfo(@PathVariable("id") Long id) | ||
{ | ||
return success(productInfoService.selectProductInfoById(id)); | ||
} | ||
|
||
/** | ||
* 新增产品信息 | ||
*/ | ||
@RequiresPermissions("system:info:add") | ||
@Log(title = "产品信息", businessType = BusinessType.INSERT) | ||
@PostMapping | ||
public AjaxResult add(@RequestBody ProductInfo productInfo) | ||
{ | ||
return toAjax(productInfoService.insertProductInfo(productInfo)); | ||
} | ||
|
||
/** | ||
* 修改产品信息 | ||
*/ | ||
@RequiresPermissions("system:info:edit") | ||
@Log(title = "产品信息", businessType = BusinessType.UPDATE) | ||
@PutMapping | ||
public AjaxResult edit(@RequestBody ProductInfo productInfo) | ||
{ | ||
return toAjax(productInfoService.updateProductInfo(productInfo)); | ||
} | ||
|
||
/** | ||
* 删除产品信息 | ||
*/ | ||
@RequiresPermissions("system:info:remove") | ||
@Log(title = "产品信息", businessType = BusinessType.DELETE) | ||
@DeleteMapping("/{ids}") | ||
public AjaxResult remove(@PathVariable Long[] ids) | ||
{ | ||
return toAjax(productInfoService.deleteProductInfoByIds(ids)); | ||
} | ||
} |
Oops, something went wrong.