chenbiao vor 2 Jahren
Ursprung
Commit
4b5fb6092e

+ 5 - 0
netflix-dao/src/main/java/com/cyksj/model/entity/CorpCustomerAcquistionCallback.java

@@ -31,4 +31,9 @@ public class CorpCustomerAcquistionCallback extends BaseEntity {
      * 回传状态
      */
     private Boolean status;
+
+    /**
+     * 意向 0无意向1有意向2很有意向
+     */
+    private Integer intention;
 }

+ 8 - 0
netflix-service/src/main/java/com/cyksj/service/corp/CorpService.java

@@ -1,6 +1,7 @@
 package com.cyksj.service.corp;
 
 import com.cyksj.dto.CorpOauth2UserInfo;
+import com.cyksj.model.entity.CorpCustomerAcquistionCallback;
 import com.cyksj.model.entity.CorpFollow;
 import com.cyksj.model.request.corp.Attachments;
 
@@ -42,4 +43,11 @@ public interface CorpService {
 	 * @param id 记录id
 	 */
 	void postAcquistionLinkCallback(Long id);
+
+	/**
+	 * 更新加粉回传 意向
+	 * @param corpCustomerAcquistionCallback
+	 */
+	void upCallbackIntention(CorpCustomerAcquistionCallback corpCustomerAcquistionCallback);
+
 }

+ 5 - 0
netflix-service/src/main/java/com/cyksj/service/corp/impl/CorpServiceImpl.java

@@ -358,4 +358,9 @@ public class CorpServiceImpl implements CorpService {
 			throw BusinessRuntimeException.getInstance("加粉回传出错. error:" + StringUtil.getErrorText(e));
 		}
 	}
+
+	@Override
+	public void upCallbackIntention(CorpCustomerAcquistionCallback corpCustomerAcquistionCallback) {
+		corpCustomerAcquistionCallbackMapper.update(null, Wrappers.lambdaUpdate(CorpCustomerAcquistionCallback.class).eq(CorpCustomerAcquistionCallback::getId, corpCustomerAcquistionCallback.getId()).set(CorpCustomerAcquistionCallback::getIntention, corpCustomerAcquistionCallback.getIntention()));
+	}
 }

+ 13 - 0
netflix-web/src/main/java/com/cyksj/web/controller/manage/corp/WxCorpController.java

@@ -325,4 +325,17 @@ public class WxCorpController {
 		corpService.postAcquistionLinkCallback(id);
 		return GatewayResponse.SUCCESS.newBuilder().toResult();
 	}
+
+	/**
+	 * 修改 意向
+	 */
+	@PutMapping("/upCallbackIntention")
+	public Result<String> upCallbackIntention(@RequestBody CorpCustomerAcquistionCallback corpCustomerAcquistionCallback){
+		log.info("修改意向:{}", corpCustomerAcquistionCallback);
+		if(corpCustomerAcquistionCallback.getId() == null || corpCustomerAcquistionCallback.getId() == 0 || corpCustomerAcquistionCallback.getIntention() == null){
+			throw BusinessRuntimeException.getInstance("缺少必填参数.");
+		}
+		corpService.upCallbackIntention(corpCustomerAcquistionCallback);
+		return GatewayResponse.SUCCESS.newBuilder().toResult();
+	}
 }