修复商品编辑分类不显示的问题
This commit is contained in:
1 parent
6883730ea5
commit
4ae8d364b9
3 files changed
+17
-1
No files matched your search
@@ -63,6 +63,9 @@ public class StoreGoodsController extends BaseController
|
||||
@Autowired
|
||||
private IStoreSpecGoodsPriceService storeSpecGoodsPriceService;
|
||||
|
||||
@Autowired
|
||||
private IStoreGoodsCateService storeGoodsCateService;
|
||||
|
||||
@RequiresPermissions("shop:goods:view")
|
||||
@GetMapping()
|
||||
public String goods()
|
||||
@@ -477,6 +480,9 @@ public class StoreGoodsController extends BaseController
|
||||
public String edit(@PathVariable("goodsId") Integer goodsId, ModelMap mmap)
|
||||
{
|
||||
StoreGoods storeGoods = storeGoodsService.selectStoreGoodsById(goodsId);
|
||||
StoreGoodsCate storeGoodsCate = storeGoodsCateService
|
||||
.selectStoreGoodsCateById(storeGoods.getCateId());
|
||||
storeGoods.setCateName(storeGoodsCate.getCateTitle());
|
||||
mmap.put("storeGoods", storeGoods);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
<input id="treeId" name="cateId" type="hidden" th:value="*{cateId}"/>
|
||||
<input onclick="selectCateTree()" id="treeName" type="text" placeholder="请选择分类" class="form-control" required>
|
||||
<input onclick="selectCateTree()" id="treeName" type="text" placeholder="请选择分类" class="form-control" th:value="*{cateName}" required>
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user