|
|
@@ -10,7 +10,9 @@ import com.cyksj.model.entity.UserMirrorShopFeeOrderDon;
|
|
|
import com.cyksj.model.request.AlipayOrderDonReq;
|
|
|
import com.cyksj.model.request.UserMirrorShopSubmitReq;
|
|
|
import com.cyksj.model.response.AliPayTradeStatus;
|
|
|
+import com.cyksj.model.views.UserMirrorShopAdvertiseFrontView;
|
|
|
import com.cyksj.model.views.UserMirrorShopInfoView;
|
|
|
+import com.cyksj.redis.RedisService;
|
|
|
import com.cyksj.service.order.UserMirrorShopOrderService;
|
|
|
import com.cyksj.web.util.StpUserUtil;
|
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
|
@@ -22,6 +24,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Set;
|
|
|
|
|
|
@@ -42,6 +45,8 @@ public class UserMirrorShopFrontController {
|
|
|
|
|
|
private final UserMirrorShopOrderService userMirrorShopOrderService;
|
|
|
|
|
|
+ private final RedisService redisService;
|
|
|
+
|
|
|
/**
|
|
|
* 镜像店铺主 个人信息
|
|
|
*/
|
|
|
@@ -51,6 +56,23 @@ public class UserMirrorShopFrontController {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(userMirrorShopInfoView);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 用户镜像店铺广告列表
|
|
|
+ */
|
|
|
+ @GetMapping("/get/advertise/{customId}")
|
|
|
+ public Result<List<UserMirrorShopAdvertiseFrontView>> getAdvertise(@PathVariable String customId) {
|
|
|
+ String key = RedisService.key.USER_MIRROR_SHOP_ADVERTISE_CACHE_KEY.getName() + customId;
|
|
|
+ Object value = redisService.get(key);
|
|
|
+ List<UserMirrorShopAdvertiseFrontView> userMirrorShopAdvertiseFrontViews;
|
|
|
+ if (value == null) {
|
|
|
+ userMirrorShopAdvertiseFrontViews = beanSearcher.searchList(UserMirrorShopAdvertiseFrontView.class, MapUtils.flatBuilder(request.getParameterMap()).field(UserMirrorShopAdvertiseFrontView::getCustomId, customId).build());
|
|
|
+ redisService.set(key, userMirrorShopAdvertiseFrontViews, RedisService.key.USER_MIRROR_SHOP_ADVERTISE_CACHE_KEY.getTimeout());
|
|
|
+ } else {
|
|
|
+ userMirrorShopAdvertiseFrontViews = (List<UserMirrorShopAdvertiseFrontView>) value;
|
|
|
+ }
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult(userMirrorShopAdvertiseFrontViews);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 立即开店
|
|
|
*/
|