ソースを参照

添加活动作品名称

silent 4 年 前
コミット
9d03175504

+ 4 - 0
src/main/java/org/springblade/gateway/goods_gateway/service/impl/AppHelpGoodsServiceImpl.java

@@ -228,6 +228,10 @@ public class AppHelpGoodsServiceImpl implements AppHelpGoodsService {
 
 			//设置状态为支付成功
 			oldCmccPointRecord.setPayStatus(CmccPayStatus.SUCCESS);
+			//设置活动
+			oldCmccPointRecord.setActiveId(activeHelpRecord.getActiveId());
+			//设置作品
+			oldCmccPointRecord.setActiveProductId(activeHelpRecord.getActiveId());
 
 			//更新支付状态
 			Assert.isTrue(cmccPointRecordService.updateById(oldCmccPointRecord));

+ 10 - 0
src/main/java/org/springblade/sing/point/entity/CmccPointRecord.java

@@ -45,6 +45,16 @@ public class CmccPointRecord extends BaseEntity {
 	 */
 	@ApiModelProperty(value = "用户id")
 	private Long userId;
+	/**
+	 * 活动id
+	 */
+	@ApiModelProperty(value = "活动作品id")
+	private Long activeId;
+	/**
+	 * 活动作品id
+	 */
+	@ApiModelProperty(value = "活动作品id")
+	private Long activeProductId;
 	/**
 	 * 商户订单号全局唯一
 	 */

+ 4 - 0
src/main/java/org/springblade/sing/point/vo/CmccPointRecordVO.java

@@ -37,4 +37,8 @@ public class CmccPointRecordVO extends CmccPointRecord {
 
 	private String userName;
 
+	private String activeName;
+
+	private String activeProductName;
+
 }

+ 17 - 0
src/main/java/org/springblade/sing/point/wrapper/CmccPointRecordWrapper.java

@@ -20,6 +20,10 @@ import org.springblade.common.utils.SpringContextHolder;
 import org.springblade.core.mp.support.BaseEntityWrapper;
 import org.springblade.core.tool.utils.BeanUtil;
 import org.springblade.core.tool.utils.ObjectUtil;
+import org.springblade.sing.active.entity.ActiveProductRecord;
+import org.springblade.sing.active.entity.ActiveRecord;
+import org.springblade.sing.active.service.IActiveProductRecordService;
+import org.springblade.sing.active.service.IActiveRecordService;
 import org.springblade.sing.goods.entity.HelpGoods;
 import org.springblade.sing.goods.service.IHelpGoodsService;
 import org.springblade.sing.point.entity.CmccPointRecord;
@@ -39,6 +43,8 @@ public class CmccPointRecordWrapper extends BaseEntityWrapper<CmccPointRecord, C
 
 	private static final IHelpGoodsService helpGoodsService = SpringContextHolder.getBean(IHelpGoodsService.class);
 	private static final ILoginUserService loginUserService = SpringContextHolder.getBean(ILoginUserService.class);
+	private static final IActiveRecordService activeRecordService = SpringContextHolder.getBean(IActiveRecordService.class);
+	private static final IActiveProductRecordService activeProductRecordService = SpringContextHolder.getBean(IActiveProductRecordService.class);
 
 	public static CmccPointRecordWrapper build() {
 		return new CmccPointRecordWrapper();
@@ -57,6 +63,17 @@ public class CmccPointRecordWrapper extends BaseEntityWrapper<CmccPointRecord, C
 		if (ObjectUtil.isNotEmpty(loginUser)){
 			cmccPointRecordVO.setUserName(loginUser.getNickName());
 		}
+
+		ActiveRecord activeRecord = activeRecordService.getById(cmccPointRecordVO.getActiveId());
+		if(ObjectUtil.isNotEmpty(activeRecord)){
+			cmccPointRecordVO.setActiveName(activeRecord.getTitle());
+		}
+
+		ActiveProductRecord activeProductRecord = activeProductRecordService.getById(cmccPointRecordVO.getActiveProductId());
+		if(ObjectUtil.isNotEmpty(activeProductRecord)){
+			cmccPointRecordVO.setActiveName(activeProductRecord.getTitle());
+		}
+
 		//User createUser = UserCache.getUser(cmccPointRecord.getCreateUser());
 		//User updateUser = UserCache.getUser(cmccPointRecord.getUpdateUser());
 		//cmccPointRecordVO.setCreateUserName(createUser.getName());