Showing
5 changed files
with
27 additions
and
4 deletions
@@ -8,5 +8,7 @@ public interface IdentifyRecordsMapper { | @@ -8,5 +8,7 @@ public interface IdentifyRecordsMapper { | ||
8 | IdentifyRecord selectByTagAndNfcId(@Param("tagId") String tagId, @Param("nfcUid") String nfcUid); | 8 | IdentifyRecord selectByTagAndNfcId(@Param("tagId") String tagId, @Param("nfcUid") String nfcUid); |
9 | 9 | ||
10 | int updateOwner(@Param("tagId") String tagId, @Param("nfcUid") String nfcUid, @Param("owner") Integer owner); | 10 | int updateOwner(@Param("tagId") String tagId, @Param("nfcUid") String nfcUid, @Param("owner") Integer owner); |
11 | + | ||
12 | + int updateAllowPop(@Param("tagId") String tagId, @Param("nfcUid") String nfcUid, @Param("allowPop") Integer allowPop); | ||
11 | 13 | ||
12 | } | 14 | } |
@@ -2,8 +2,6 @@ package com.yohoufo.dal.product.model; | @@ -2,8 +2,6 @@ package com.yohoufo.dal.product.model; | ||
2 | 2 | ||
3 | import lombok.Data; | 3 | import lombok.Data; |
4 | 4 | ||
5 | -import java.math.BigDecimal; | ||
6 | - | ||
7 | @Data | 5 | @Data |
8 | public class IdentifyRecord { | 6 | public class IdentifyRecord { |
9 | private int id; | 7 | private int id; |
@@ -14,4 +12,5 @@ public class IdentifyRecord { | @@ -14,4 +12,5 @@ public class IdentifyRecord { | ||
14 | private Long orderCode; | 12 | private Long orderCode; |
15 | private int authTime; | 13 | private int authTime; |
16 | private int authUid; | 14 | private int authUid; |
15 | + private int allowPop;//是否允许弹窗,0:不允许, 1允许 | ||
17 | } | 16 | } |
@@ -10,9 +10,10 @@ | @@ -10,9 +10,10 @@ | ||
10 | <result column="order_code" jdbcType="BIGINT" property="orderCode" /> | 10 | <result column="order_code" jdbcType="BIGINT" property="orderCode" /> |
11 | <result column="auth_time" jdbcType="INTEGER" property="authTime" /> | 11 | <result column="auth_time" jdbcType="INTEGER" property="authTime" /> |
12 | <result column="auth_uid" jdbcType="INTEGER" property="authUid" /> | 12 | <result column="auth_uid" jdbcType="INTEGER" property="authUid" /> |
13 | + <result column="allow_pop" jdbcType="INTEGER" property="allowPop" /> | ||
13 | </resultMap> | 14 | </resultMap> |
14 | <sql id="Base_Column_List"> | 15 | <sql id="Base_Column_List"> |
15 | - id, tag_id, nfc_uid, owner,allow_transfer, order_code, auth_time, auth_uid | 16 | + id, tag_id, nfc_uid, owner,allow_transfer, order_code, auth_time, auth_uid, allow_pop |
16 | </sql> | 17 | </sql> |
17 | <select id="selectByTagAndNfcId" resultMap="BaseResultMap"> | 18 | <select id="selectByTagAndNfcId" resultMap="BaseResultMap"> |
18 | select <include refid="Base_Column_List"/> | 19 | select <include refid="Base_Column_List"/> |
@@ -25,7 +26,15 @@ | @@ -25,7 +26,15 @@ | ||
25 | </select> | 26 | </select> |
26 | 27 | ||
27 | <update id="updateOwner"> | 28 | <update id="updateOwner"> |
28 | - update identify_records set owner=#{owner} | 29 | + update identify_records set owner=#{owner} |
30 | + where tag_id = #{tagId,jdbcType=VARCHAR} | ||
31 | + <if test="nfcUid != null" > | ||
32 | + and nfc_uid = #{nfcUid,jdbcType=VARCHAR} | ||
33 | + </if> | ||
34 | + </update> | ||
35 | + | ||
36 | + <update id="updateAllowPop"> | ||
37 | + update identify_records set allow_pop=#{allowPop} | ||
29 | where tag_id = #{tagId,jdbcType=VARCHAR} | 38 | where tag_id = #{tagId,jdbcType=VARCHAR} |
30 | <if test="nfcUid != null" > | 39 | <if test="nfcUid != null" > |
31 | and nfc_uid = #{nfcUid,jdbcType=VARCHAR} | 40 | and nfc_uid = #{nfcUid,jdbcType=VARCHAR} |
@@ -20,4 +20,5 @@ public class ProductIdentifyResp { | @@ -20,4 +20,5 @@ public class ProductIdentifyResp { | ||
20 | private String identifyUserName;//鉴定师名字 | 20 | private String identifyUserName;//鉴定师名字 |
21 | private Integer applyStatus;//申请物权转移状态 | 21 | private Integer applyStatus;//申请物权转移状态 |
22 | private String currentOwner;//当前物权所有人 | 22 | private String currentOwner;//当前物权所有人 |
23 | + private Integer allowPop;//是否允许弹窗 | ||
23 | } | 24 | } |
@@ -178,6 +178,10 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | @@ -178,6 +178,10 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | ||
178 | 178 | ||
179 | public static final Integer MESSAGE_TYPE_APPLICANT = 4;//申请人 | 179 | public static final Integer MESSAGE_TYPE_APPLICANT = 4;//申请人 |
180 | 180 | ||
181 | + public static final int ALLOW_POP = 1; | ||
182 | + | ||
183 | + public static final int NOT_ALLOW_POP = 0; | ||
184 | + | ||
181 | /** | 185 | /** |
182 | * 鉴定结果查询接口 | 186 | * 鉴定结果查询接口 |
183 | * @param tagId | 187 | * @param tagId |
@@ -355,11 +359,15 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | @@ -355,11 +359,15 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | ||
355 | //5)设置当前物权所有人 | 359 | //5)设置当前物权所有人 |
356 | result.setCurrentOwner(trackList.get(trackList.size()-1).getContent()); | 360 | result.setCurrentOwner(trackList.get(trackList.size()-1).getContent()); |
357 | 361 | ||
362 | + //设置是否弹窗 | ||
363 | + result.setAllowPop(identifyRecord.getAllowPop()); | ||
364 | + | ||
358 | //设置缓存--可能会有延时,不影响的 | 365 | //设置缓存--可能会有延时,不影响的 |
359 | setIdentifyCache(tagId, nfcUid, result); | 366 | setIdentifyCache(tagId, nfcUid, result); |
360 | 367 | ||
361 | //添加申请物权转移人信息 | 368 | //添加申请物权转移人信息 |
362 | rebuildResult(result, tagId, nfcUid, uid); | 369 | rebuildResult(result, tagId, nfcUid, uid); |
370 | + | ||
363 | logger.info("queryIdentifyInfo success!, tagId = {}, nfcUid={}, result ={}", tagId, nfcUid, result ); | 371 | logger.info("queryIdentifyInfo success!, tagId = {}, nfcUid={}, result ={}", tagId, nfcUid, result ); |
364 | return result; | 372 | return result; |
365 | } | 373 | } |
@@ -552,9 +560,13 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | @@ -552,9 +560,13 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | ||
552 | boolean isOwner = queryIsOwner(tagId, nfcUid, uid); | 560 | boolean isOwner = queryIsOwner(tagId, nfcUid, uid); |
553 | result.setIfOwner(isOwner); | 561 | result.setIfOwner(isOwner); |
554 | if(isOwner) { | 562 | if(isOwner) { |
563 | + if(result.getAllowPop() == ALLOW_POP) { | ||
564 | + identifyRecordsMapper.updateAllowPop(tagId, nfcUid, NOT_ALLOW_POP); | ||
565 | + } | ||
555 | return; | 566 | return; |
556 | } | 567 | } |
557 | 568 | ||
569 | + result.setAllowPop(NOT_ALLOW_POP);//非主人不弹窗 | ||
558 | //申请人申请状态 | 570 | //申请人申请状态 |
559 | TransferRecordsHistory history = transferRecordsHistoryMapper.selectByToUid(tagId, nfcUid, null); | 571 | TransferRecordsHistory history = transferRecordsHistoryMapper.selectByToUid(tagId, nfcUid, null); |
560 | result.setApplyStatus(OPERATE_TYPE_NO_APPLY); | 572 | result.setApplyStatus(OPERATE_TYPE_NO_APPLY); |
-
Please register or login to post a comment