道具ID修复
This commit is contained in:
parent
b1721cf894
commit
5f193ad99a
@ -61,18 +61,13 @@ public class PropCouponGrantCmdExe {
|
||||
Set<Long> userIds = Set.copyOf(cmd.getUserIds());
|
||||
Map<Long, UserProfileDTO> userMap = validateUsers(userIds);
|
||||
|
||||
// 4. 批量生成券
|
||||
PropsCommodityStore commodityStore = propsCommodityStoreService.getById(cmd.getPropId());
|
||||
ResponseAssert.notNull(OtherErrorCode.PROP_COUPON_PROP_NOT_FOUND, commodityStore);
|
||||
ResponseAssert.isTrue(OtherErrorCode.PROP_COUPON_OFF, commodityStore.getShelfStatus());
|
||||
|
||||
PropCouponType couponType = PropCouponType.getByName(commodityStore.getPropsType());
|
||||
ResponseAssert.notNull(OtherErrorCode.PROP_COUPON_TYPE_NOT_SUPPORT, couponType);
|
||||
|
||||
PropsResourcesDTO propsResourcesDTO = ResponseAssert.requiredSuccess(
|
||||
propsSourceClient.getById(commodityStore.getSourceId()));
|
||||
propsSourceClient.getById(cmd.getPropId()));
|
||||
ResponseAssert.notNull(OtherErrorCode.PROP_COUPON_PROP_NOT_FOUND, propsResourcesDTO);
|
||||
|
||||
PropCouponType couponType = PropCouponType.getByName(propsResourcesDTO.getType());
|
||||
ResponseAssert.notNull(OtherErrorCode.PROP_COUPON_TYPE_NOT_SUPPORT, couponType);
|
||||
|
||||
cmd.setPropIcon(propsResourcesDTO.getCover());
|
||||
cmd.setPropName(propsResourcesDTO.getName());
|
||||
cmd.setCouponType(couponType.getCode());
|
||||
|
||||
@ -12,6 +12,8 @@ import com.red.circle.other.domain.propcoupon.PropCouponStatus;
|
||||
import com.red.circle.other.domain.propcoupon.PropCouponType;
|
||||
import com.red.circle.other.infra.database.rds.dao.props.PropCouponUseRecordDAO;
|
||||
import com.red.circle.other.infra.database.rds.entity.props.PropCouponUseRecordDO;
|
||||
import com.red.circle.other.infra.database.rds.entity.props.PropsCommodityStore;
|
||||
import com.red.circle.other.infra.database.rds.service.props.PropsCommodityStoreService;
|
||||
import com.red.circle.other.inner.asserts.OtherErrorCode;
|
||||
import com.red.circle.other.inner.asserts.user.UserErrorCode;
|
||||
import com.red.circle.other.inner.endpoint.live.RoomManagerClient;
|
||||
@ -50,6 +52,7 @@ public class PropCouponUseCmdExe {
|
||||
private final RoomThemeBackpackClient roomThemeBackpackClient;
|
||||
private final PropCouponUseRecordDAO propCouponUseRecordDAO;
|
||||
private final PropsCommodityStoreClient propsCommodityStoreClient;
|
||||
private final PropsCommodityStoreService propsCommodityStoreService;
|
||||
private final PropsNobleVipClient propsNobleVipClient;
|
||||
private final RoomManagerClient roomManagerClient;
|
||||
|
||||
@ -258,9 +261,7 @@ public class PropCouponUseCmdExe {
|
||||
|
||||
private PropsNobleVipAbilityDTO getVipAbilityBySysOriginSourceId(Long propId,
|
||||
String sysOrigin) {
|
||||
PropsCommodityStoreDTO commodityStore = ResponseAssert.requiredSuccess(
|
||||
propsCommodityStoreClient.getPropsCommodityStore(sysOrigin, propId));
|
||||
|
||||
PropsCommodityStore commodityStore = propsCommodityStoreService.getById(propId);
|
||||
ResponseAssert.notNull(OtherErrorCode.PROP_COUPON_PROP_NOT_FOUND, commodityStore);
|
||||
PropsNobleVipAbilityDTO nobleVipAbility = ResponseAssert.requiredSuccess(
|
||||
propsNobleVipClient.getAbilityDTO(commodityStore.getSourceId()));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user