Commit 4187408e by 王祖波

标识字段

parent d5325d3f
...@@ -29,7 +29,17 @@ public class CombinedQDTO implements Serializable { ...@@ -29,7 +29,17 @@ public class CombinedQDTO implements Serializable {
/** /**
* 1群发 2朋友圈 * 1群发 2朋友圈
*/ */
private Integer mediaType ; private Integer mediaType;
/**
* 导购id(作标识)
*/
private String clerkId;
/**
* 业务id(作标识)
*/
private String businessId;
public String getImageUrl() { public String getImageUrl() {
return imageUrl; return imageUrl;
...@@ -83,6 +93,20 @@ public class CombinedQDTO implements Serializable { ...@@ -83,6 +93,20 @@ public class CombinedQDTO implements Serializable {
return this.getImageUrl() + this.getQrCodeUrl() + this.getShowStyle() + this.getLineOne() + this.getLineTwo() + this.getMediaType(); return this.getImageUrl() + this.getQrCodeUrl() + this.getShowStyle() + this.getLineOne() + this.getLineTwo() + this.getMediaType();
} }
public String getClerkId() {
return clerkId;
}
public void setClerkId(String clerkId) {
this.clerkId = clerkId;
}
public String getBusinessId() {
return businessId;
}
public void setBusinessId(String businessId) {
this.businessId = businessId;
}
} }
...@@ -9,6 +9,7 @@ import java.util.function.Function; ...@@ -9,6 +9,7 @@ import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.gic.commons.util.TraceIdUtil; import com.gic.commons.util.TraceIdUtil;
import com.gic.dubbo.entity.ProviderLocalTag;
import com.gic.haoban.manage.api.qdto.combined.CombinedQDTO; import com.gic.haoban.manage.api.qdto.combined.CombinedQDTO;
import com.gic.haoban.manage.service.context.combined.ImageCombined; import com.gic.haoban.manage.service.context.combined.ImageCombined;
import com.gic.redis.data.util.RedisUtil; import com.gic.redis.data.util.RedisUtil;
...@@ -530,13 +531,15 @@ public class MaterialApiServiceImpl implements MaterialApiService { ...@@ -530,13 +531,15 @@ public class MaterialApiServiceImpl implements MaterialApiService {
if (StringUtils.isNotBlank(cache)) { if (StringUtils.isNotBlank(cache)) {
return com.gic.api.base.commons.ServiceResponse.success(cache); return com.gic.api.base.commons.ServiceResponse.success(cache);
} }
logger.info("请求合成图片并上传企微"); logger.info("请求合成图片并上传企微clerkId:{},businessId:{}", combinedQDTO.getClerkId(), combinedQDTO.getBusinessId());
ProviderLocalTag localTag = ProviderLocalTag.tag.get();
String traceId = localTag.traceId;
Future<JSONResponse> future = null; Future<JSONResponse> future = null;
JSONResponse json = null; JSONResponse json = null;
try { try {
future = ImageCombined.EXECUTOR.submit(() -> { future = ImageCombined.EXECUTOR.submit(() -> {
TraceIdUtil.traceBegin(TraceIdUtil.EntranceType.THREAD_POOL); TraceIdUtil.traceBegin(TraceIdUtil.EntranceType.THREAD_POOL);
logger.info("线程池合成图片"); logger.info("线程池合成图片clerkId:{},businessId:{},traceId:{}", combinedQDTO.getClerkId(), combinedQDTO.getBusinessId(), traceId);
JSONResponse jr = materialService.getMaterialIdByCombined(wxEnterpriseId, combinedQDTO); JSONResponse jr = materialService.getMaterialIdByCombined(wxEnterpriseId, combinedQDTO);
TraceIdUtil.traceEnd(); TraceIdUtil.traceEnd();
return jr; return jr;
......
...@@ -187,21 +187,4 @@ public class QwMessageController extends WebBaseController { ...@@ -187,21 +187,4 @@ public class QwMessageController extends WebBaseController {
return RestResponse.failure("-1", resp.getMessage()) ; return RestResponse.failure("-1", resp.getMessage()) ;
} }
@RequestMapping("combined-qw-materialids")
public RestResponse<Object> combinedMaterialIds(@RequestBody CombinedsQO combinedQO) {
String wxEnterpriseId = combinedQO.getWxEnterpriseId();
CombinedQDTO combinedQDTO = com.gic.commons.util.EntityUtil.changeEntityNew(CombinedQDTO.class, combinedQO);
List<String> imageUrlList = combinedQO.getImageUrlList();
List<String> resultList = new ArrayList<>();
for (String imageUrl : imageUrlList) {
combinedQDTO.setImageUrl(imageUrl);
ServiceResponse<String> resp = this.materialApiService.getMaterialIdByCombined(wxEnterpriseId, combinedQDTO) ;
if(!resp.isSuccess() || StringUtils.isBlank(resp.getResult())) {
return RestResponse.failure("-1", resp.getMessage()) ;
}
String result = resp.getResult();
resultList.add(result);
}
return RestResponse.successResult(resultList) ;
}
} }
...@@ -30,6 +30,15 @@ public class CombinedQO implements Serializable { ...@@ -30,6 +30,15 @@ public class CombinedQO implements Serializable {
* 1群发 2朋友圈 * 1群发 2朋友圈
*/ */
private Integer mediaType ; private Integer mediaType ;
/**
* 导购id(作标识)
*/
private String clerkId;
/**
* 业务id(作标识)
*/
private String businessId;
public String getWxEnterpriseId() { public String getWxEnterpriseId() {
return wxEnterpriseId; return wxEnterpriseId;
...@@ -86,5 +95,21 @@ public class CombinedQO implements Serializable { ...@@ -86,5 +95,21 @@ public class CombinedQO implements Serializable {
public void setMediaType(Integer mediaType) { public void setMediaType(Integer mediaType) {
this.mediaType = mediaType; this.mediaType = mediaType;
} }
public String getClerkId() {
return clerkId;
}
public void setClerkId(String clerkId) {
this.clerkId = clerkId;
}
public String getBusinessId() {
return businessId;
}
public void setBusinessId(String businessId) {
this.businessId = businessId;
}
} }
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