Commit 4a48bccd by danmo

任务bug修改

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