|
@@ -146,11 +146,22 @@ public class ExhibitorAction extends BaseAction {
|
|
|
// if (exhibitorBiz.queryByBooth(userId, exhibition.getId()) != null) {
|
|
// if (exhibitorBiz.queryByBooth(userId, exhibition.getId()) != null) {
|
|
|
// return ResultData.build().error("展位已被申请");
|
|
// return ResultData.build().error("展位已被申请");
|
|
|
// }
|
|
// }
|
|
|
- exhibitor.setId(null);
|
|
|
|
|
- exhibitor.setExhibitorUser(userId);
|
|
|
|
|
- exhibitor.setExhibitorActivities(exhibition.getId());
|
|
|
|
|
- exhibitor.setExhibitorCode(ExhibitorBizImpl.createInvitationCode(exhibitorBiz::queryByInvitationCode));
|
|
|
|
|
- return exhibitorAction.save(exhibitor);
|
|
|
|
|
|
|
+ return Optional.ofNullable(enterpriseBiz.getById(exhibitor.getId()))
|
|
|
|
|
+ .map(e -> {
|
|
|
|
|
+ ExhibitorEntity ee = new ExhibitorEntity();
|
|
|
|
|
+ ee.setExhibitorName(e.getEnterpriseName());
|
|
|
|
|
+ ee.setExhibitorBooth(e.getEnterpriseBooth());
|
|
|
|
|
+ ee.setExhibitorContact(exhibitor.getExhibitorContact());
|
|
|
|
|
+ ee.setExhibitorPhone(exhibitor.getExhibitorPhone());
|
|
|
|
|
+ ee.setExhibitorLogo(e.getEnterpriseLogo());
|
|
|
|
|
+ ee.setExhibitorIntroduction(e.getEnterpriseIntroduction());
|
|
|
|
|
+ ee.setExhibitorUser(userId);
|
|
|
|
|
+ ee.setExhibitorActivities(exhibition.getId());
|
|
|
|
|
+ ee.setExhibitorCode(ExhibitorBizImpl.createInvitationCode(exhibitorBiz::queryByInvitationCode));
|
|
|
|
|
+ return ee;
|
|
|
|
|
+ })
|
|
|
|
|
+ .map(exhibitorAction::save)
|
|
|
|
|
+ .orElse(ResultData.build().error("未查询到企业"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Operation(summary = "微信-展商-详情")
|
|
@Operation(summary = "微信-展商-详情")
|