Commit 32fc9fbe by 程裕兵

feat:save rule

parent 84fe0f3f
......@@ -277,11 +277,17 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
@Override
public List<String> checkUnbind(Long studioId) {
List<PartyToMerchant> relation = partyToMerchantRpService.listByParty(studioId, PartyTypeEnum.STUDIO, config.getCashier());
List<PartyToMerchant> relation = partyToMerchantRpService.listByParty(studioId, PartyTypeEnum.STUDIO,
config.getCashier());
if (CollectionUtil.isEmpty(relation)) {
return Lists.newArrayList();
}
Long merchantId = relation.stream().findFirst().orElse(new PartyToMerchant()).getMerchantId();
StudioMerchantApply apply = studioMerchantApplyRpService.getLatestOneSuccessByMerchantId(merchantId);
if (!Objects.equals(studioId,
Optional.ofNullable(apply).map(StudioMerchantApply::getStudioId).orElse(null))) {
return Lists.newArrayList();
}
List<PartyToMerchant> merchants = partyToMerchantRpService.listByMerchantIdAndPartyType(merchantId,
PartyTypeEnum.STUDIO);
if (CollectionUtil.isEmpty(merchants)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment