|
@@ -15,11 +15,9 @@ import com.cyksj.config.corp.YHLXWxCorpConfig;
|
|
|
import com.cyksj.dto.CorpOauth2UserInfo;
|
|
import com.cyksj.dto.CorpOauth2UserInfo;
|
|
|
import com.cyksj.mapper.corp.CorpCustomerAcquistionCallbackMapper;
|
|
import com.cyksj.mapper.corp.CorpCustomerAcquistionCallbackMapper;
|
|
|
import com.cyksj.mapper.corp.CorpFollowMapper;
|
|
import com.cyksj.mapper.corp.CorpFollowMapper;
|
|
|
|
|
+import com.cyksj.mapper.corp.CorpUserPayIntentionMapper;
|
|
|
import com.cyksj.model.dto.WxCorpEncryptDto;
|
|
import com.cyksj.model.dto.WxCorpEncryptDto;
|
|
|
-import com.cyksj.model.entity.CorpCustomerAcquistionCallback;
|
|
|
|
|
-import com.cyksj.model.entity.CorpFollow;
|
|
|
|
|
-import com.cyksj.model.entity.OrderDonPost;
|
|
|
|
|
-import com.cyksj.model.entity.WxCorpApp;
|
|
|
|
|
|
|
+import com.cyksj.model.entity.*;
|
|
|
import com.cyksj.model.request.corp.Attachments;
|
|
import com.cyksj.model.request.corp.Attachments;
|
|
|
import com.cyksj.model.request.corp.CorpXmlMessage;
|
|
import com.cyksj.model.request.corp.CorpXmlMessage;
|
|
|
import com.cyksj.model.request.corp.CorpXmlOutMessage;
|
|
import com.cyksj.model.request.corp.CorpXmlOutMessage;
|
|
@@ -36,6 +34,7 @@ import com.cyksj.util.WxCorpUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
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.dao.DuplicateKeyException;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
@@ -80,6 +79,9 @@ public class CorpServiceImpl implements CorpService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private CorpCustomerAcquistionCallbackMapper corpCustomerAcquistionCallbackMapper;
|
|
private CorpCustomerAcquistionCallbackMapper corpCustomerAcquistionCallbackMapper;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private CorpUserPayIntentionMapper corpUserPayIntentionMapper;
|
|
|
|
|
+
|
|
|
@PostConstruct
|
|
@PostConstruct
|
|
|
private void init() {
|
|
private void init() {
|
|
|
corpMessageRouter = new CorpMessageRouter(this)
|
|
corpMessageRouter = new CorpMessageRouter(this)
|
|
@@ -372,4 +374,16 @@ public class CorpServiceImpl implements CorpService {
|
|
|
public void upCallbackIntention(CorpCustomerAcquistionCallback corpCustomerAcquistionCallback) {
|
|
public void upCallbackIntention(CorpCustomerAcquistionCallback corpCustomerAcquistionCallback) {
|
|
|
corpCustomerAcquistionCallbackMapper.update(null, Wrappers.lambdaUpdate(CorpCustomerAcquistionCallback.class).eq(CorpCustomerAcquistionCallback::getId, corpCustomerAcquistionCallback.getId()).set(CorpCustomerAcquistionCallback::getIntention, corpCustomerAcquistionCallback.getIntention()));
|
|
corpCustomerAcquistionCallbackMapper.update(null, Wrappers.lambdaUpdate(CorpCustomerAcquistionCallback.class).eq(CorpCustomerAcquistionCallback::getId, corpCustomerAcquistionCallback.getId()).set(CorpCustomerAcquistionCallback::getIntention, corpCustomerAcquistionCallback.getIntention()));
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void updateUserIntention(CorpUserPayIntention corpUserPayIntention) {
|
|
|
|
|
+ if (corpUserPayIntention.getId() == null) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ corpUserPayIntentionMapper.insert(corpUserPayIntention);
|
|
|
|
|
+ } catch (DuplicateKeyException e) {
|
|
|
|
|
+ }
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ corpUserPayIntentionMapper.updateById(corpUserPayIntention);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|