Authored by tanling

邀请

@@ -39,6 +39,7 @@ @@ -39,6 +39,7 @@
39 update invite_record 39 update invite_record
40 set status=#{status,jdbcType=INTEGER} 40 set status=#{status,jdbcType=INTEGER}
41 where inviter_uid = #{inviterUid,jdbcType=INTEGER} 41 where inviter_uid = #{inviterUid,jdbcType=INTEGER}
  42 + and invite_activity_id!=0
42 </update> 43 </update>
43 44
44 45
@@ -361,7 +361,7 @@ public class InviteServiceImpl implements IInviteService { @@ -361,7 +361,7 @@ public class InviteServiceImpl implements IInviteService {
361 */ 361 */
362 public int quitInviter(int uid){ 362 public int quitInviter(int uid){
363 363
364 - // 检查该退驻的商户是否是邀请人,则之前的所有绑定关系无效 364 + // 检查该退驻的商户是否邀请人,将使用A类邀请码的绑定关系设置成无效
365 InviteRecord inviteRecord = new InviteRecord(); 365 InviteRecord inviteRecord = new InviteRecord();
366 inviteRecord.setInviterUid(uid); 366 inviteRecord.setInviterUid(uid);
367 inviteRecord.setStatus(InviteRecordStatusEnum.INVALID.getCode()); 367 inviteRecord.setStatus(InviteRecordStatusEnum.INVALID.getCode());
@@ -421,7 +421,7 @@ public class InviteServiceImpl implements IInviteService { @@ -421,7 +421,7 @@ public class InviteServiceImpl implements IInviteService {
421 record.setInviterUid(inviter.getUid()); 421 record.setInviterUid(inviter.getUid());
422 record.setInviteeUid(uid); 422 record.setInviteeUid(uid);
423 record.setInviterId(inviter.getId()); 423 record.setInviterId(inviter.getId());
424 - record.setInviteActivityId(inviteActivity.getId()); 424 + record.setInviteActivityId(inviterType == InviterType.STORED_SELLER ? inviteActivity.getId() : 0);
425 record.setCreateTime(DateUtils.getCurrentTimeSeconds()); 425 record.setCreateTime(DateUtils.getCurrentTimeSeconds());
426 inviteRecordMapper.insert(record); 426 inviteRecordMapper.insert(record);
427 427