记得上下班打卡 | git大法好,push需谨慎

Commit ddf2754c authored by zhanggb's avatar zhanggb

~API:商品管理:添加/编辑SKU:+更新商品价格区间逻辑;

parent 756133c9
...@@ -83,30 +83,30 @@ ...@@ -83,30 +83,30 @@
<body class="gray-bg"> <body class="gray-bg">
<div class="container-div"> <div class="container-div">
<div class="row"> <div class="row">
<div class="col-sm-12 search-collapse"> <!-- <div class="col-sm-12 search-collapse">-->
<form id="role-form"> <!-- <form id="role-form">-->
<div class="select-list"> <!-- <div class="select-list">-->
<ul> <!-- <ul>-->
<li> <!-- <li>-->
名称:<input type="text" name="tagName"/> <!-- 名称:<input type="text" name="tagName"/>-->
</li> <!-- </li>-->
<li> <!-- <li>-->
类型:<select name="tagType" th:with="type=${@dict.getType('zhengzai_store_cert_type')}"> <!-- 类型:<select name="tagType" th:with="type=${@dict.getType('zhengzai_store_cert_type')}">-->
<option value="">全部</option> <!-- <option value="">全部</option>-->
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" <!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}"-->
th:value="${dict.dictValue}"></option> <!-- th:value="${dict.dictValue}"></option>-->
</select> <!-- </select>-->
</li> <!-- </li>-->
<li> <!-- <li>-->
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i <!-- <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i-->
class="fa fa-search"></i>&nbsp;搜索</a> <!-- class="fa fa-search"></i>&nbsp;搜索</a>-->
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i <!-- <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i-->
class="fa fa-refresh"></i>&nbsp;重置</a> <!-- class="fa fa-refresh"></i>&nbsp;重置</a>-->
</li> <!-- </li>-->
</ul> <!-- </ul>-->
</div> <!-- </div>-->
</form> <!-- </form>-->
</div> <!-- </div>-->
<div class="btn-group-sm" id="toolbar" role="group"> <div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" id="button-open-10" shiro:hasPermission="goblin:extag:add"> <a class="btn btn-success" id="button-open-10" shiro:hasPermission="goblin:extag:add">
......
...@@ -341,6 +341,7 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi ...@@ -341,6 +341,7 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
priceGe = priceGe.compareTo(BigDecimal.ZERO) == 0 ? skuInfoVo.getPrice() : (priceGe.compareTo(skuInfoVo.getPrice()) > 0 ? skuInfoVo.getPrice() : priceGe); priceGe = priceGe.compareTo(BigDecimal.ZERO) == 0 ? skuInfoVo.getPrice() : (priceGe.compareTo(skuInfoVo.getPrice()) > 0 ? skuInfoVo.getPrice() : priceGe);
priceLe = priceLe.compareTo(skuInfoVo.getPrice()) < 0 ? skuInfoVo.getPrice() : priceLe; priceLe = priceLe.compareTo(skuInfoVo.getPrice()) < 0 ? skuInfoVo.getPrice() : priceLe;
} }
LinkedList<Object[]> updateGoodsObjs = CollectionUtil.linkedListObjectArr(); LinkedList<Object[]> updateGoodsObjs = CollectionUtil.linkedListObjectArr();
if (priceGe.compareTo(goodsInfoVo.getPriceGe()) != 0 || priceLe.compareTo(goodsInfoVo.getPriceLe()) != 0) { if (priceGe.compareTo(goodsInfoVo.getPriceGe()) != 0 || priceLe.compareTo(goodsInfoVo.getPriceLe()) != 0) {
...@@ -348,6 +349,9 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi ...@@ -348,6 +349,9 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
goodsInfoVo.setPriceLe(priceLe); goodsInfoVo.setPriceLe(priceLe);
goodsInfoVo.setUpdatedBy(uid); goodsInfoVo.setUpdatedBy(uid);
goodsInfoVo.setUpdatedAt(now); goodsInfoVo.setUpdatedAt(now);
goblinMongoUtils.updateGoodsInfoVo(goodsInfoVo);
updateGoodsObjs.add(new Object[]{priceGe, priceLe, uid, now, spuId}); updateGoodsObjs.add(new Object[]{priceGe, priceLe, uid, now, spuId});
} }
......
Markdown is supported
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