Authored by caoyan

Merge branch 'dev_物权转移' into test6.8.6

... ... @@ -12,4 +12,6 @@ public interface TransferRecordsHistoryMapper {
TransferRecordsHistory selectByToUid(@Param("tagId") String tagId, @Param("nfcUid") String nfcUid, @Param("toUid") Integer toUid);
int updateStatus(@Param("tagId") String tagId, @Param("nfcUid") String nfcUid, @Param("status") Integer status);
TransferRecordsHistory selectByStatus(@Param("tagId") String tagId, @Param("nfcUid") String nfcUid, @Param("status") Integer status);
}
... ...
... ... @@ -34,6 +34,20 @@
limit 1
</select>
<select id="selectByStatus" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from transfer_records_history
where tag_id=#{tagId}
<if test="nfcUid != null and nfcUid != '' ">
and nfc_uid=#{nfcUid}
</if>
<if test="status != null">
and status=#{status}
</if>
order by operate_time desc
limit 1
</select>
<update id="updateStatus">
update transfer_records_history set status=#{status}
where tag_id=#{tagId}
... ...
... ... @@ -10,4 +10,5 @@ public class IdentifyTrackResp {
private String timeStr;
private Integer time;
private String mobile;
private Integer type;//1:鉴定信息 2:EX主人 3:现主人 4:申请人
}
... ...
... ... @@ -134,6 +134,14 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{
public static final Integer OPERATE_TYPE_NO_APPLY = 4; //未申请
public static final Integer MESSAGE_TYPE_JUDGE_INFO = 1; //鉴定信息
public static final Integer MESSAGE_TYPE_EX_OWNER = 2; //前主人
public static final Integer MESSAGE_TYPE_CURRENT_OWNER = 3; //现主人
public static final Integer MESSAGE_TYPE_APPLICANT = 4;//申请人
/**
* 鉴定结果查询接口
* @param tagId
... ... @@ -409,9 +417,11 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{
}
//申请人申请状态
TransferRecordsHistory history = transferRecordsHistoryMapper.selectByToUid(tagId, nfcUid, uid);
if(null == history) {
TransferRecordsHistory history = transferRecordsHistoryMapper.selectByToUid(tagId, nfcUid, null);
if(null == history || !history.getStatus().equals(OPERATE_TYPE_APPLYING)) {
result.setApplyStatus(OPERATE_TYPE_NO_APPLY);//未申请
}else if(!(history.getToUid().equals(String.valueOf(uid)))) {
return;
}else {
result.setApplyStatus(history.getStatus());
}
... ... @@ -424,6 +434,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{
ProfileInfoRsp profileInfo = profileInfoArray[0];
IdentifyTrackResp track = new IdentifyTrackResp();
track.setUid(uid);
track.setType(MESSAGE_TYPE_APPLICANT);;
String mobileMask = MobileHelper.coverMobile2(profileInfo.getMobile());//隐位的手机号码--隐藏中间6位
track.setContent(StringUtils.isEmpty(profileInfo.getNickname()) ? mobileMask : profileInfo.getNickname());
String headIcon = profileInfo.getHead_ico();
... ... @@ -444,6 +455,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{
identifyTrack.setTime(authTime);
identifyTrack.setTimeStr(formatDate(authTime, "yyyy.MM.dd HH:mm:ss"));
identifyTrack.setContent(authGroup + "鉴定结果为\"真\"");
identifyTrack.setType(MESSAGE_TYPE_JUDGE_INFO);
//鉴定中心,默认的展示头像
String authIco = configReader.getString("ufo.product.defaultAuthHeadIcon", "http://head.static.yhbimg.com/yhb-head/2018/12/28/14/01384244a3ca86fa5345df87c59317b81f.png?imageView2/{mode}/w/{width}/h/{height}");
identifyTrack.setHeadIcon(authIco);
... ... @@ -477,6 +489,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{
headIcon = configReader.getString("ufo.product.defaultUserHeadIcon", "http://head.static.yhbimg.com/yhb-head/2018/12/28/14/0160773bb87685aade796ea4f94e0587cf.png?imageView2/{mode}/w/{width}/h/{height}");
}
item.setHeadIcon(headIcon);
item.setType(MESSAGE_TYPE_EX_OWNER);
if(null != transferMap.get(String.valueOf(entry.getKey()))) {
Integer createTime = transferMap.get(String.valueOf(entry.getKey())).getCreateTime();
item.setTime(createTime);
... ... @@ -494,6 +507,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{
}
});
trackList.get(trackList.size()-1).setType(MESSAGE_TYPE_CURRENT_OWNER);
return trackList;
}
... ...