...
|
...
|
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONException; |
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yoho.core.common.utils.JsonUtil;
|
|
|
import com.yoho.core.config.ConfigReader;
|
|
|
import com.yoho.core.dal.datasource.annotation.Database;
|
|
|
import com.yoho.core.rabbitmq.YhProducer;
|
|
|
import com.yoho.error.ServiceError;
|
|
|
import com.yoho.error.exception.ServiceException;
|
...
|
...
|
@@ -344,6 +345,7 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport |
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
@Database(ForceMaster = true)
|
|
|
public int agreeApply(IdOrIdsBo req){
|
|
|
logger.info("agreeApply,req is {}", req);
|
|
|
if (req.getId() != null) {
|
...
|
...
|
@@ -383,12 +385,15 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport |
|
|
logger.info("agreeApply,updateStatus null,req is {}", req);
|
|
|
return 0;
|
|
|
}
|
|
|
logger.info("agreeApply,updateStatus num is {}", result);
|
|
|
List<UnionShareUserApply> unionShareUserApplies = unionShareUserApplyMapper.selectByIds(idSet);
|
|
|
if (CollectionUtils.isEmpty(unionShareUserApplies)) {
|
|
|
logger.info("agreeApply,selectByIds null,req is {}", req);
|
|
|
return 0;
|
|
|
}
|
|
|
logger.info("agreeApply,selectByIds num is {},idSet is {}", unionShareUserApplies.size(),idSet);
|
|
|
unionShareUserApplies.forEach(u->{
|
|
|
logger.info("agreeApply,begin to relateUnionType ,uid is {}",u.getUid());
|
|
|
if (u.getCheckTime() == null ||u.getCheckTime() != currentTimeSecond) {
|
|
|
return;
|
|
|
}
|
...
|
...
|
@@ -399,6 +404,7 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport |
|
|
}
|
|
|
redisHashCache.delete(ShareOrdersKeyEnum.UNION_TYPE.getPreKey(),u.getUid());
|
|
|
});
|
|
|
logger.info("agreeApply end,req is {}", req);
|
|
|
return result;
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -422,7 +428,18 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport |
|
|
|
|
|
//生成unionType
|
|
|
MktMarketingUrl unionDepartmentUrl = buildMktMarketingUrl(uid);
|
|
|
try {
|
|
|
mktMarketingUrlDAO.insertSelective(unionDepartmentUrl);
|
|
|
} catch (Exception e) {
|
|
|
//重试一次
|
|
|
//生成unionType
|
|
|
unionDepartmentUrl = buildMktMarketingUrl(uid);
|
|
|
try {
|
|
|
mktMarketingUrlDAO.insertSelective(unionDepartmentUrl);
|
|
|
} catch (Exception e2) {
|
|
|
logger.info("relateUnionType error,bind unionType,uid is {},unionType is {}", uid,unionDepartmentUrl.getUnionType());
|
|
|
}
|
|
|
}
|
|
|
logger.info("relateUnionType,bind unionType,uid is {},unionType is {}", uid,unionDepartmentUrl.getUnionType());
|
|
|
//绑定uid和unionType
|
|
|
UnionShareUser unionShareUser = new UnionShareUser();
|
...
|
...
|
|