瀏覽代碼

修改代码逻辑

songyh 3 年之前
父節點
當前提交
391ae5cc25

+ 10 - 3
jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/advertise/controller/AiBytedanceAdvertiserStrategyController.java

@@ -16,8 +16,10 @@ import ctop.bytedance.ad.advertise.vo.PlanSearchVo;
 import ctop.bytedance.ad.common.constant.BytedanceConstant;
 import ctop.bytedance.ad.common.entity.CtopOauthToken;
 import ctop.bytedance.ad.common.entity.MaterialImageInfo;
+import ctop.bytedance.ad.common.entity.UserAllocation;
 import ctop.bytedance.ad.common.service.ICtopOauthTokenService;
 import ctop.bytedance.ad.common.service.IMaterialImageInfoService;
+import ctop.bytedance.ad.common.service.IUserAllocationService;
 import ctop.bytedance.ad.common.utils.*;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -56,13 +58,14 @@ public class AiBytedanceAdvertiserStrategyController {
 	private IRuleDataAccountService ruleDataAccountService;
 	@Autowired
 	private IMaterialImageInfoService materialImageInfoService;
-	@Reference
-	private ICommonService commonService;
 	@Autowired
 	private MarketingService marketingService;
 	@Autowired
 	private ICtopOauthTokenService tokenService;
-
+	@Autowired
+	private IUserAllocationService userAllocationService;
+	@Reference
+	private ICommonService commonService;
 
 	/**
 	  * 分页列表查询
@@ -91,6 +94,10 @@ public class AiBytedanceAdvertiserStrategyController {
 		IPage<AiBytedanceAdvertiserStrategy> pageList = aiBytedanceAdvertiserStrategyService.page(page, queryWrapper);
 		pageList.getRecords().forEach(pojo ->{
 			if (!Check.isNull(pojo.getAccountId())){
+				UserAllocation allocation = userAllocationService.getByAccountId(pojo.getAccountId());
+				if(null!=allocation){
+					pojo.setAccountName(allocation.getAuthName());
+				}
 				QueryWrapper<RuleDataAccount> ruleDataAccountQueryWrapper = new QueryWrapper<>();
 				ruleDataAccountQueryWrapper.eq("account_id",pojo.getAccountId());
 				//获取消耗 余额

+ 2 - 2
jeecg-boot-bytedance-ad/src/main/java/ctop/bytedance/ad/advertise/entity/AiBytedanceAdvertiserStrategy.java

@@ -23,9 +23,9 @@ public class AiBytedanceAdvertiserStrategy{
 	/**id*/
 	@TableId(type = IdType.AUTO)
 	private Long id;
-	/**账户id*/
-	@Dict(dicCode = "account_id",dictTable = "ctop_user_allocation",dicText = "auth_name")
 	private Long accountId;
+	@TableField(exist = false)
+	private String accountName;
 
 	/**组名称*/
 	private String campaignName;