是否有认识的人 逻辑添加

This commit is contained in:
苏竹红
2023-09-15 12:23:22 +08:00
parent 96550202b4
commit c62c2a5192
6 changed files with 81 additions and 1 deletions

View File

@@ -71,4 +71,12 @@ public class HyPartnerIntentInfoDAO {
return hyPartnerIntentInfoMapper.updateLineId(newPartnerId,newLineId, oldLineId);
}
public int updateAcquaintanceFlag(Long id ,Integer acquaintanceFlag,String acquaintanceName, String acquaintanceRelationshipType,String otherRelationshipType){
if (id==null){
return 0;
}
return hyPartnerIntentInfoMapper.updateAcquaintanceFlag(id,acquaintanceFlag,acquaintanceName,acquaintanceRelationshipType,otherRelationshipType);
}
}

View File

@@ -64,4 +64,14 @@ public interface HyPartnerIntentInfoMapper {
* @return
*/
int updateLineId(@Param("newPartnerId")String newPartnerId,@Param("newLineId") Long newLineId, @Param("oldLineId") Long oldLineId);
/**
* 更新数据
* @param id
* @param acquaintanceFlag
* @param acquaintanceName
* @param acquaintanceRelationshipType
* @param otherRelationshipType
*/
int updateAcquaintanceFlag(Long id ,Integer acquaintanceFlag,String acquaintanceName, String acquaintanceRelationshipType,String otherRelationshipType);
}

View File

@@ -25,12 +25,16 @@
<result column="weakness" jdbcType="VARCHAR" property="weakness" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="acquaintance_flag" jdbcType="TINYINT" property="acquaintanceFlag" />
<result column="acquaintance_name" jdbcType="VARCHAR" property="acquaintanceName" />
<result column="acquaintance_relationship_type" jdbcType="VARCHAR" property="acquaintanceRelationshipType" />
<result column="other_relationship_type" jdbcType="VARCHAR" property="otherRelationshipType" />
</resultMap>
<sql id="Base_Column_List">
id, partner_id, partner_line_id, live_area, want_shop_area, accept_adjust_type, is_have_want_shop,
want_shop_info, max_budget, money_source, money_prove, education, work_year, is_have_work_exp,
work_exp, is_consumer, other_band, brand_strength, need_improve, strength, weakness,
create_time, update_time
create_time, update_time,acquaintance_flag,acquaintance_name,acquaintance_relationship_type,other_relationship_type
</sql>
<select id="selectByPrimaryKeySelective" resultMap="BaseResultMap">
select
@@ -109,6 +113,18 @@
<if test="record.updateTime != null">
update_time,
</if>
<if test="record.acquaintanceFlag != null">
acquaintance_flag,
</if>
<if test="record.acquaintanceName != null">
acquaintance_name,
</if>
<if test="record.acquaintanceRelationshipType != null">
acquaintance_relationship_type,
</if>
<if test="record.otherRelationshipType != null">
other_relationship_type,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="record.partnerId != null">
@@ -177,6 +193,18 @@
<if test="record.updateTime != null">
#{record.updateTime},
</if>
<if test="record.acquaintanceFlag != null">
#{record.acquaintanceFlag},
</if>
<if test="record.acquaintanceName != null">
#{record.acquaintanceName},
</if>
<if test="record.acquaintanceRelationshipType != null">
#{record.acquaintanceRelationshipType},
</if>
<if test="record.otherRelationshipType != null">
#{record.otherRelationshipType},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective">
@@ -337,6 +365,16 @@
where partner_line_id = #{oldLineId}
</update>
<update id="updateAcquaintanceFlag">
update hy_partner_intent_info
set
acquaintance_flag = #{acquaintanceFlag} ,
other_relationship_type = #{otherRelationshipType},
acquaintance_name = #{acquaintanceName},
acquaintance_relationship_type = #{acquaintanceRelationshipType}
where id = #{id}
</update>
</mapper>

View File

@@ -98,4 +98,12 @@ public class HyPartnerIntentInfoDO implements Serializable {
@ApiModelProperty("通过证明")
private String passCertifyFile;
private Integer acquaintanceFlag;
private String acquaintanceName;
private String acquaintanceRelationshipType;
private String otherRelationshipType;
}

View File

@@ -96,5 +96,12 @@ public class PartnerIntentInfoVO {
@ApiModelProperty("创建时间")
private Date createTime;
private Integer acquaintanceFlag;
private String acquaintanceName;
private String acquaintanceRelationshipType;
private String otherRelationshipType;
}

View File

@@ -219,6 +219,11 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
BeanUtil.copyProperties(intentInfoDO, beforeIntentInfoUpdate);
fillIntentInfo(intentInfoDO, request);
hyPartnerIntentInfoDAO.updateByPrimaryKeySelective(intentInfoDO);
//PC端 AcquaintanceFlag 不传值 移动端修改必填
if (request.getAcquaintanceFlag()!=null){
hyPartnerIntentInfoDAO.updateAcquaintanceFlag(intentInfoDO.getId(),request.getAcquaintanceFlag(), request.getAcquaintanceName(),
request.getAcquaintanceRelationshipType(),request.getOtherRelationshipType());
}
BeanUtil.copyProperties(intentInfoDO, afterIntentInfoUpdate);
}
redisUtilPool.delKey(cacheKey);
@@ -499,6 +504,10 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
if(StringUtils.isNotEmpty(hyPartnerIntentInfoDO.getWantShopInfo())){
partnerIntentInfoVO.setWantShopInfo(JSONObject.parseArray(hyPartnerIntentInfoDO.getWantShopInfo(), WantShopInfoVO.class));
}
partnerIntentInfoVO.setAcquaintanceFlag(hyPartnerIntentInfoDO.getAcquaintanceFlag());
partnerIntentInfoVO.setAcquaintanceName(hyPartnerIntentInfoDO.getAcquaintanceName());
partnerIntentInfoVO.setAcquaintanceRelationshipType(hyPartnerIntentInfoDO.getAcquaintanceRelationshipType());
partnerIntentInfoVO.setOtherRelationshipType(hyPartnerIntentInfoDO.getOtherRelationshipType());
return partnerIntentInfoVO;
}