Merge branch 'dev_NFC' into test6.9.9
Showing
4 changed files
with
8 additions
and
4 deletions
@@ -9,7 +9,7 @@ import java.util.List; | @@ -9,7 +9,7 @@ import java.util.List; | ||
9 | public interface IdentifyRecordsMapper { | 9 | public interface IdentifyRecordsMapper { |
10 | IdentifyRecord selectByTagAndNfcId(@Param("tagId") String tagId, @Param("nfcUid") String nfcUid); | 10 | IdentifyRecord selectByTagAndNfcId(@Param("tagId") String tagId, @Param("nfcUid") String nfcUid); |
11 | 11 | ||
12 | - int updateOwner(@Param("tagId") String tagId, @Param("nfcUid") String nfcUid, @Param("owner") Integer owner); | 12 | + int updateOwner(@Param("tagId") String tagId, @Param("nfcUid") String nfcUid, @Param("owner") Integer owner, @Param("newOrderCode")Long newOrderCode); |
13 | 13 | ||
14 | int updateAllowPop(@Param("tagId") String tagId, @Param("nfcUid") String nfcUid, @Param("allowPop") Integer allowPop); | 14 | int updateAllowPop(@Param("tagId") String tagId, @Param("nfcUid") String nfcUid, @Param("allowPop") Integer allowPop); |
15 | 15 |
@@ -27,6 +27,9 @@ | @@ -27,6 +27,9 @@ | ||
27 | 27 | ||
28 | <update id="updateOwner"> | 28 | <update id="updateOwner"> |
29 | update identify_records set owner=#{owner}, allow_pop=1 | 29 | update identify_records set owner=#{owner}, allow_pop=1 |
30 | + <if test="newOrderCode != null" > | ||
31 | + , last_order_code = #{newOrderCode,jdbcType=BIGINT} | ||
32 | + </if> | ||
30 | where tag_id = #{tagId,jdbcType=VARCHAR} | 33 | where tag_id = #{tagId,jdbcType=VARCHAR} |
31 | <if test="nfcUid != null" > | 34 | <if test="nfcUid != null" > |
32 | and nfc_uid = #{nfcUid,jdbcType=VARCHAR} | 35 | and nfc_uid = #{nfcUid,jdbcType=VARCHAR} |
@@ -42,6 +45,6 @@ | @@ -42,6 +45,6 @@ | ||
42 | </update> | 45 | </update> |
43 | <select id="selectByOrderCode" resultMap="BaseResultMap"> | 46 | <select id="selectByOrderCode" resultMap="BaseResultMap"> |
44 | select <include refid="Base_Column_List" /> | 47 | select <include refid="Base_Column_List" /> |
45 | - from identify_records where order_code = #{orderCode} limit 1 | 48 | + from identify_records where order_code = #{orderCode} or last_order_code = #{orderCode} limit 1 |
46 | </select> | 49 | </select> |
47 | </mapper> | 50 | </mapper> |
@@ -406,6 +406,7 @@ public class DepositServiceImpl implements DepositService { | @@ -406,6 +406,7 @@ public class DepositServiceImpl implements DepositService { | ||
406 | storageDepositMapper.insert(sd); | 406 | storageDepositMapper.insert(sd); |
407 | autoTransfer(orderCode, newUid); | 407 | autoTransfer(orderCode, newUid); |
408 | clearCache(uid, sd.getProductId(), sd.getStorageId()); | 408 | clearCache(uid, sd.getProductId(), sd.getStorageId()); |
409 | + clearCache(newUid, sd.getProductId(), sd.getStorageId()); | ||
409 | return true; | 410 | return true; |
410 | } | 411 | } |
411 | // 可上架数量 | 412 | // 可上架数量 |
@@ -496,7 +496,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | @@ -496,7 +496,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | ||
496 | addTransferRecord(tagId, nfcUid, histroy.getFromUid(), history.getToUid()); | 496 | addTransferRecord(tagId, nfcUid, histroy.getFromUid(), history.getToUid()); |
497 | 497 | ||
498 | //更新identify_record | 498 | //更新identify_record |
499 | - result = identifyRecordsMapper.updateOwner(tagId, nfcUid, toUid); | 499 | + result = identifyRecordsMapper.updateOwner(tagId, nfcUid, toUid, null); |
500 | setFinalTimeToEnd(inboxId, identifyRecord.getOwner()); | 500 | setFinalTimeToEnd(inboxId, identifyRecord.getOwner()); |
501 | 501 | ||
502 | //发信息 | 502 | //发信息 |
@@ -1015,7 +1015,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | @@ -1015,7 +1015,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | ||
1015 | addTransferRecord(tagId, nfcUid, String.valueOf(identifyRecord.getOwner()), String.valueOf(toUid)); //新增转移记录 | 1015 | addTransferRecord(tagId, nfcUid, String.valueOf(identifyRecord.getOwner()), String.valueOf(toUid)); //新增转移记录 |
1016 | 1016 | ||
1017 | //更新identify_record | 1017 | //更新identify_record |
1018 | - identifyRecordsMapper.updateOwner(tagId, nfcUid, toUid); | 1018 | + identifyRecordsMapper.updateOwner(tagId, nfcUid, toUid, orderCode); |
1019 | 1019 | ||
1020 | //发信息 | 1020 | //发信息 |
1021 | messageFacade.ownerPass(String.valueOf(toUid), identifyRecord.getOrderCode()); | 1021 | messageFacade.ownerPass(String.valueOf(toUid), identifyRecord.getOrderCode()); |
-
Please register or login to post a comment