类目调整
This commit is contained in:
parent
e2d4a86ac4
commit
d31a921bb1
|
|
@ -72,11 +72,11 @@ public class GoodsCategoryController extends BaseController {
|
|||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(@Validated GoodsCategory category) {
|
||||
if (goodsCategoryService.checkGoodsCategoryNameUnique(category)) {
|
||||
return error("新增商品类别'" + category.getGoodsCategoryName() + "'失败,商品类别名称已存在");
|
||||
} else if (goodsCategoryService.checkGoodsCategoryCodeUnique(category)) {
|
||||
return error("新增商品类别'" + category.getGoodsCategoryCode() + "'失败,商品类别编码已存在");
|
||||
}
|
||||
// if (goodsCategoryService.checkGoodsCategoryNameUnique(category)) {
|
||||
// return error("新增商品类别'" + category.getGoodsCategoryName() + "'失败,商品类别名称已存在");
|
||||
// } else if (goodsCategoryService.checkGoodsCategoryCodeUnique(category)) {
|
||||
// return error("新增商品类别'" + category.getGoodsCategoryCode() + "'失败,商品类别编码已存在");
|
||||
// }
|
||||
category.setCreateBy(getLoginName());
|
||||
return toAjax(goodsCategoryService.insertGoodsCategory(category));
|
||||
}
|
||||
|
|
@ -104,11 +104,11 @@ public class GoodsCategoryController extends BaseController {
|
|||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(@Validated GoodsCategory category) {
|
||||
if (goodsCategoryService.checkGoodsCategoryNameUnique(category)) {
|
||||
return error("新增商品类别'" + category.getGoodsCategoryName() + "'失败,商品类别名称已存在");
|
||||
} else if (goodsCategoryService.checkGoodsCategoryCodeUnique(category)) {
|
||||
return error("新增商品类别'" + category.getGoodsCategoryCode() + "'失败,商品类别编码已存在");
|
||||
}
|
||||
// if (goodsCategoryService.checkGoodsCategoryNameUnique(category)) {
|
||||
// return error("新增商品类别'" + category.getGoodsCategoryName() + "'失败,商品类别名称已存在");
|
||||
// } else if (goodsCategoryService.checkGoodsCategoryCodeUnique(category)) {
|
||||
// return error("新增商品类别'" + category.getGoodsCategoryCode() + "'失败,商品类别编码已存在");
|
||||
// }
|
||||
category.setUpdateBy(getLoginName());
|
||||
return toAjax(goodsCategoryService.updateGoodsCategory(category));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@
|
|||
var editFlag = [[${@permission.hasPermi('goods:category:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('goods:category:remove')}]];
|
||||
var datas = [[${@dict.getType('sys_normal_disable')}]];
|
||||
var levelData = [[${@dict.getType('sys_category_level')}]];
|
||||
var prefix = ctx + "goods/category"
|
||||
|
||||
$(function () {
|
||||
|
|
@ -88,6 +89,14 @@
|
|||
return $.table.selectDictLabel(datas, item.status);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'level',
|
||||
title: '级别',
|
||||
align: "left",
|
||||
formatter: function (value, item, index) {
|
||||
return $.table.selectDictLabel(levelData, item.level);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
|
|
|
|||
Loading…
Reference in New Issue