Authored by mali

Merge branch 'dev_product'

... ... @@ -59,7 +59,7 @@
</select>
<update id="addStorageNum">
update storage set storage_num = storage_num + #{storageNum,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=INTEGER},
update_time = unix_timestamp()
where id = #{storageId,jdbcType=INTEGER}
</update>
... ...
... ... @@ -61,12 +61,12 @@
</select>
<update id="saleSkup" parameterType="java.lang.Integer">
update storage_price set status = 2,
update_time = unix_timestamp(),
update_time = unix_timestamp()
where skup = #{skup,jdbcType=INTEGER} and status = 1
</update>
<update id="cancelSaleSkup" parameterType="java.lang.Integer">
update storage_price set status = 1,
update_time = unix_timestamp(),
update_time = unix_timestamp()
where skup = #{skup,jdbcType=INTEGER} and status = 2
</update>
<select id="selectLeastPrice" resultMap="BaseResultMap">
... ...
... ... @@ -210,7 +210,7 @@ public class ProductServiceImpl implements ProductService{
if (storageId == null) {
StoragePrice sp = storagePriceMapper.selectBySkup(skup);
storageId = sp.getStorageId();
if (storageId == null) {
if (sp == null || (storageId = sp.getStorageId()) == null) {
LOGGER.error("addStorageNum skup={}, storageId={}, num={}, find storageId is null", skup, storageId,
num);
}
... ...