Authored by mali

Merge branch 'dev_NFC' into test6.9.9

... ... @@ -9,7 +9,7 @@ import java.util.List;
public interface IdentifyRecordsMapper {
IdentifyRecord selectByTagAndNfcId(@Param("tagId") String tagId, @Param("nfcUid") String nfcUid);
int updateOwner(@Param("tagId") String tagId, @Param("nfcUid") String nfcUid, @Param("owner") Integer owner);
int updateOwner(@Param("tagId") String tagId, @Param("nfcUid") String nfcUid, @Param("owner") Integer owner, @Param("newOrderCode")Long newOrderCode);
int updateAllowPop(@Param("tagId") String tagId, @Param("nfcUid") String nfcUid, @Param("allowPop") Integer allowPop);
... ...
... ... @@ -26,7 +26,10 @@
</select>
<update id="updateOwner">
update identify_records set owner=#{owner}, allow_pop=1
update identify_records set owner=#{owner}, allow_pop=1
<if test="newOrderCode != null" >
, last_order_code = #{newOrderCode,jdbcType=BIGINT}
</if>
where tag_id = #{tagId,jdbcType=VARCHAR}
<if test="nfcUid != null" >
and nfc_uid = #{nfcUid,jdbcType=VARCHAR}
... ... @@ -42,6 +45,6 @@
</update>
<select id="selectByOrderCode" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from identify_records where order_code = #{orderCode} limit 1
from identify_records where order_code = #{orderCode} or last_order_code = #{orderCode} limit 1
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -406,6 +406,7 @@ public class DepositServiceImpl implements DepositService {
storageDepositMapper.insert(sd);
autoTransfer(orderCode, newUid);
clearCache(uid, sd.getProductId(), sd.getStorageId());
clearCache(newUid, sd.getProductId(), sd.getStorageId());
return true;
}
// 可上架数量
... ...
... ... @@ -496,7 +496,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{
addTransferRecord(tagId, nfcUid, histroy.getFromUid(), history.getToUid());
//更新identify_record
result = identifyRecordsMapper.updateOwner(tagId, nfcUid, toUid);
result = identifyRecordsMapper.updateOwner(tagId, nfcUid, toUid, null);
setFinalTimeToEnd(inboxId, identifyRecord.getOwner());
//发信息
... ... @@ -1015,7 +1015,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{
addTransferRecord(tagId, nfcUid, String.valueOf(identifyRecord.getOwner()), String.valueOf(toUid)); //新增转移记录
//更新identify_record
identifyRecordsMapper.updateOwner(tagId, nfcUid, toUid);
identifyRecordsMapper.updateOwner(tagId, nfcUid, toUid, orderCode);
//发信息
messageFacade.ownerPass(String.valueOf(toUid), identifyRecord.getOrderCode());
... ...