Authored by mali

Merge branch 'test6.9.9' into test6.9.10

... ... @@ -262,7 +262,7 @@
</update>
<update id="changeSaleStatusOn">
update storage_deposit
set order_status = 1, new_skup = #{newSkup} ,update_time = unix_timestamp(now())
set order_status = 1, lock_flag=0, new_skup = #{newSkup} ,update_time = unix_timestamp(now())
where owner_uid=#{uid} and deposit_code = #{depositCode,jdbcType=VARCHAR} and status=1 and order_status = 0
</update>
<update id="changeSaleStatusOff">
... ... @@ -320,7 +320,10 @@
where owner_uid = #{uid} and new_skup =#{skup}
</select>
<update id="sale">
update storage_deposit set del_status=1, new_order_code =#{orderCode}, update_time = unix_timestamp(now())
update storage_deposit set del_status=1,
order_status=0,
new_order_code =#{orderCode},
update_time = unix_timestamp(now())
where owner_uid = #{uid} and new_skup =#{skup} and del_status=0
</update>
<select id="getDepositOffShelvesCount" resultType="java.lang.Integer">
... ... @@ -420,7 +423,7 @@
where owner_uid = #{uid,jdbcType=INTEGER}
and deposit_code = #{depositCode,jdbcType=VARCHAR}
AND lock_flag = #{expectStatus,jdbcType=INTEGER}
and status = 1
and order_status = #{expectStatus,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
... ...
... ... @@ -321,13 +321,13 @@ public class DepositServiceImpl implements DepositService {
boolean lock(){
int rows = storageDepositMapper.updateStorageLockFlagByCAS(sellerUid, depositCode, lockStatus, unlockStatus);
LOGGER.info("in DepositLock.lock sellerUid {} depositCode {} rows {}", sellerUid, depositCode, rows);
return rows == 1;
return rows > 0;
}
boolean unlock(){
int rows = storageDepositMapper.updateStorageLockFlagByCAS(sellerUid, depositCode, unlockStatus, lockStatus);
LOGGER.info("in DepositLock.unlock sellerUid {} depositCode {} rows {}", sellerUid, depositCode, rows);
return rows == 1;
return rows > 0;
}
}
/**
... ...