修复商品编辑分类不显示的问题
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
|
@Autowired
|
||||||
private IStoreSpecGoodsPriceService storeSpecGoodsPriceService;
|
private IStoreSpecGoodsPriceService storeSpecGoodsPriceService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IStoreGoodsCateService storeGoodsCateService;
|
||||||
|
|
||||||
@RequiresPermissions("shop:goods:view")
|
@RequiresPermissions("shop:goods:view")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public String goods()
|
public String goods()
|
||||||
@@ -477,6 +480,9 @@ public class StoreGoodsController extends BaseController
|
|||||||
public String edit(@PathVariable("goodsId") Integer goodsId, ModelMap mmap)
|
public String edit(@PathVariable("goodsId") Integer goodsId, ModelMap mmap)
|
||||||
{
|
{
|
||||||
StoreGoods storeGoods = storeGoodsService.selectStoreGoodsById(goodsId);
|
StoreGoods storeGoods = storeGoodsService.selectStoreGoodsById(goodsId);
|
||||||
|
StoreGoodsCate storeGoodsCate = storeGoodsCateService
|
||||||
|
.selectStoreGoodsCateById(storeGoods.getCateId());
|
||||||
|
storeGoods.setCateName(storeGoodsCate.getCateTitle());
|
||||||
mmap.put("storeGoods", storeGoods);
|
mmap.put("storeGoods", storeGoods);
|
||||||
return prefix + "/edit";
|
return prefix + "/edit";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="treeId" name="cateId" type="hidden" th:value="*{cateId}"/>
|
<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>
|
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ public class StoreGoods extends BaseEntity
|
|||||||
|
|
||||||
private String brandName;
|
private String brandName;
|
||||||
|
|
||||||
|
private String cateName;
|
||||||
|
|
||||||
//private
|
//private
|
||||||
|
|
||||||
/** 扩展分类id */
|
/** 扩展分类id */
|
||||||
@@ -165,6 +167,14 @@ public class StoreGoods extends BaseEntity
|
|||||||
/** 视频 */
|
/** 视频 */
|
||||||
private String goodsVideo;
|
private String goodsVideo;
|
||||||
|
|
||||||
|
public String getCateName() {
|
||||||
|
return cateName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCateName(String cateName) {
|
||||||
|
this.cateName = cateName;
|
||||||
|
}
|
||||||
|
|
||||||
public String getBrandName() {
|
public String getBrandName() {
|
||||||
return brandName;
|
return brandName;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user