|
@@ -1,6 +1,6 @@
|
|
|
package net.mingsoft.tf.wx;
|
|
package net.mingsoft.tf.wx;
|
|
|
|
|
|
|
|
-import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
|
import io.swagger.v3.oas.annotations.Parameters;
|
|
import io.swagger.v3.oas.annotations.Parameters;
|
|
@@ -18,7 +18,6 @@ import net.mingsoft.tf.biz.IExhibitionBiz;
|
|
|
import net.mingsoft.tf.biz.IExhibitorBiz;
|
|
import net.mingsoft.tf.biz.IExhibitorBiz;
|
|
|
import net.mingsoft.tf.biz.IPeopleExhibitorBiz;
|
|
import net.mingsoft.tf.biz.IPeopleExhibitorBiz;
|
|
|
import net.mingsoft.tf.biz.impl.ExhibitorBizImpl;
|
|
import net.mingsoft.tf.biz.impl.ExhibitorBizImpl;
|
|
|
-import net.mingsoft.tf.entity.BoothEntity;
|
|
|
|
|
import net.mingsoft.tf.entity.ExhibitionEntity;
|
|
import net.mingsoft.tf.entity.ExhibitionEntity;
|
|
|
import net.mingsoft.tf.entity.ExhibitorEntity;
|
|
import net.mingsoft.tf.entity.ExhibitorEntity;
|
|
|
import net.mingsoft.tf.wx.dto.ExhibitorInfoResponse;
|
|
import net.mingsoft.tf.wx.dto.ExhibitorInfoResponse;
|
|
@@ -29,6 +28,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.time.format.DateTimeFormatter;
|
|
|
|
|
+import java.util.Collection;
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
import java.util.Optional;
|
|
import java.util.Optional;
|
|
@@ -104,6 +104,22 @@ public class ExhibitorAction extends BaseAction {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Operation(summary = "微信-展商-申请")
|
|
@Operation(summary = "微信-展商-申请")
|
|
|
|
|
+ @GetMapping(value = "/exhibitor/query")
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public ResultData exhibitorQuery(String name) {
|
|
|
|
|
+ return ResultData.build().success(Optional.ofNullable(name)
|
|
|
|
|
+ .filter(StrUtil::isNotBlank)
|
|
|
|
|
+ .stream()
|
|
|
|
|
+ .map(exhibitorBiz::queryByName)
|
|
|
|
|
+ .flatMap(Collection::stream)
|
|
|
|
|
+ .peek(item -> {
|
|
|
|
|
+ item.setExhibitorContact(null);
|
|
|
|
|
+ item.setExhibitorPhone(null);
|
|
|
|
|
+ })
|
|
|
|
|
+ .toList());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Operation(summary = "微信-展商-申请")
|
|
|
@PostMapping(value = "/exhibitor/create")
|
|
@PostMapping(value = "/exhibitor/create")
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public ResultData exhibitorCreate(@RequestBody ExhibitorEntity exhibitor) {
|
|
public ResultData exhibitorCreate(@RequestBody ExhibitorEntity exhibitor) {
|
|
@@ -115,14 +131,15 @@ public class ExhibitorAction extends BaseAction {
|
|
|
if (exhibitorBiz.query(userId, exhibition.getId()) != null) {
|
|
if (exhibitorBiz.query(userId, exhibition.getId()) != null) {
|
|
|
return ResultData.build().error("已经申请,不需重新申请");
|
|
return ResultData.build().error("已经申请,不需重新申请");
|
|
|
}
|
|
}
|
|
|
- BoothEntity booth = new BoothEntity();
|
|
|
|
|
- booth.setBoothCode(exhibitor.getExhibitorBooth());
|
|
|
|
|
- if (CollUtil.isEmpty(boothBiz.query(booth))) {
|
|
|
|
|
- return ResultData.build().error("展位不存在");
|
|
|
|
|
- }
|
|
|
|
|
- if (exhibitorBiz.queryByBooth(userId, exhibition.getId()) != null) {
|
|
|
|
|
- return ResultData.build().error("展位已被申请");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // BoothEntity booth = new BoothEntity();
|
|
|
|
|
+ // booth.setBoothCode(exhibitor.getExhibitorBooth());
|
|
|
|
|
+ // if (CollUtil.isEmpty(boothBiz.query(booth))) {
|
|
|
|
|
+ // return ResultData.build().error("展位不存在");
|
|
|
|
|
+ // }
|
|
|
|
|
+ // if (exhibitorBiz.queryByBooth(userId, exhibition.getId()) != null) {
|
|
|
|
|
+ // return ResultData.build().error("展位已被申请");
|
|
|
|
|
+ // }
|
|
|
|
|
+ exhibitor.setId(null);
|
|
|
exhibitor.setExhibitorUser(userId);
|
|
exhibitor.setExhibitorUser(userId);
|
|
|
exhibitor.setExhibitorActivities(exhibition.getId());
|
|
exhibitor.setExhibitorActivities(exhibition.getId());
|
|
|
exhibitor.setExhibitorCode(ExhibitorBizImpl.createInvitationCode(exhibitorBiz::queryByInvitationCode));
|
|
exhibitor.setExhibitorCode(ExhibitorBizImpl.createInvitationCode(exhibitorBiz::queryByInvitationCode));
|