Commit 5974a31d by 王祖波

校验校验

parent f43b2f3d
...@@ -12,16 +12,21 @@ import com.gic.haoban.manage.api.qdto.contact.ContactLogQDTO; ...@@ -12,16 +12,21 @@ import com.gic.haoban.manage.api.qdto.contact.ContactLogQDTO;
import com.gic.haoban.manage.api.service.contact.ContactLogApiService; import com.gic.haoban.manage.api.service.contact.ContactLogApiService;
import com.gic.haoban.manage.service.entity.contact.TabContactLog; import com.gic.haoban.manage.service.entity.contact.TabContactLog;
import com.gic.haoban.manage.service.service.contact.ContactLogService; import com.gic.haoban.manage.service.service.contact.ContactLogService;
import com.gic.member.api.dto.MemberStoreClerkDTO;
import com.gic.member.api.service.MemberService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Objects;
/** /**
* Created by wangzubo on 2022/11/1. * Created by wangzubo on 2022/11/1.
*/ */
@Slf4j
@Service("contactLogApiService") @Service("contactLogApiService")
public class ContactLogApiServiceImpl implements ContactLogApiService { public class ContactLogApiServiceImpl implements ContactLogApiService {
...@@ -29,6 +34,8 @@ public class ContactLogApiServiceImpl implements ContactLogApiService { ...@@ -29,6 +34,8 @@ public class ContactLogApiServiceImpl implements ContactLogApiService {
private ContactLogService contactLogService; private ContactLogService contactLogService;
@Autowired @Autowired
private ClerkService clerkService; private ClerkService clerkService;
@Autowired
private MemberService memberService;
@Override @Override
public ServiceResponse<ContactLogDTO> getClerkContactTime(String memberId) { public ServiceResponse<ContactLogDTO> getClerkContactTime(String memberId) {
...@@ -78,6 +85,16 @@ public class ContactLogApiServiceImpl implements ContactLogApiService { ...@@ -78,6 +85,16 @@ public class ContactLogApiServiceImpl implements ContactLogApiService {
if (clerkDTO == null) { if (clerkDTO == null) {
return ServiceResponse.success(Boolean.FALSE); return ServiceResponse.success(Boolean.FALSE);
} }
MemberStoreClerkDTO memberStoreClerk = memberService.getMemberStoreClerk(checkQDTO.getMemberId());
if (memberStoreClerk == null) {
log.info("无专属导购无法建联");
return ServiceResponse.success(Boolean.FALSE);
}
String mainClerkId = memberStoreClerk.getClerkId();
if (!Objects.equals(mainClerkId, checkQDTO.getClerkId())) {
log.info("非专属导购无法建联");
return ServiceResponse.success(Boolean.FALSE);
}
Integer contactCheck = contactLogService.contactCheck(checkQDTO.getEnterpriseId(), checkQDTO.getMemberId(), clerkDTO, checkQDTO.getBizType()); Integer contactCheck = contactLogService.contactCheck(checkQDTO.getEnterpriseId(), checkQDTO.getMemberId(), clerkDTO, checkQDTO.getBizType());
return ServiceResponse.success(contactCheck != null); return ServiceResponse.success(contactCheck != null);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment