Commit b4d3fe9e by 孙喜旺

任务bug修改

1 parent 768579c9
......@@ -229,7 +229,7 @@ public class WeTaskFissionController extends BaseController {
public AjaxResult<JSONObject> upload(@RequestParam(value = "file") MultipartFile file) throws IOException {
String url = FileUploadUtils.upload2Cos(file, cosConfig);
JSONObject json = new JSONObject();
json.put("rewardImageUrl", url);
json.put("rewardImageUrl", cosConfig.getImgUrlPrefix()+url);
return AjaxResult.success(json);
}
......
......@@ -48,14 +48,15 @@ public class WeCallBackAddExternalContactImpl extends WeEventStrategy {
private IWeTaskFissionRewardService weTaskFissionRewardService;
@Autowired
private IWeTaskFissionService weTaskFissionService;
@Autowired
private ThreadLocal<WeCustomer> weCustomerThreadLocal = new ThreadLocal<>();
private ThreadLocal<WeFlowerCustomerRel> weFlowerCustomerRelThreadLocal = new ThreadLocal<>();
@Override
public void eventHandle(WxCpXmlMessageVO message) {
if (message.getExternalUserId() != null) {
WeCustomer weCustomer = weCustomerService.getOne(new LambdaQueryWrapper<WeCustomer>().eq(WeCustomer::getExternalUserid, message.getExternalUserId()));
weCustomerThreadLocal.set(weCustomer);
WeFlowerCustomerRel weFlowerCustomerRel = weFlowerCustomerRelService.getOne(new LambdaQueryWrapper<WeFlowerCustomerRel>()
.eq(WeFlowerCustomerRel::getExternalUserid, message.getExternalUserId())
.eq(WeFlowerCustomerRel::getUserId,message.getUserId()));
weFlowerCustomerRelThreadLocal.set(weFlowerCustomerRel);
weCustomerService.getCustomersInfoAndSynchWeCustomer(message.getExternalUserId());
}
if (message.getState() != null && message.getWelcomeCode() != null) {
......@@ -78,7 +79,7 @@ public class WeCallBackAddExternalContactImpl extends WeEventStrategy {
WeTaskFission weTaskFission = weTaskFissionService
.selectWeTaskFissionById(weTaskFissionRecord.getTaskFissionId());
Long fissNum = weTaskFissionRecord.getFissNum();
if (weCustomerThreadLocal.get() != null){
if (weFlowerCustomerRelThreadLocal.get() == null){
fissNum++;
weTaskFissionRecord.setFissNum(fissNum);
}
......
......@@ -482,6 +482,8 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
//客户入库
WeCustomer weCustomer = new WeCustomer();
BeanUtils.copyPropertiesASM(externalUserDetail.getExternal_contact(), weCustomer);
weCustomer.setCreateTime(new Date());
weCustomer.setUpdateTime(new Date());
this.saveOrUpdate(weCustomer);
//客户与通讯录客户关系
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!