|
|
@@ -19,6 +19,7 @@ import com.cyksj.redis.RedisService;
|
|
|
import com.cyksj.service.mange.CmsGoodsDonService;
|
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
|
import com.ejlchina.searcher.SearchResult;
|
|
|
+import com.ejlchina.searcher.param.Operator;
|
|
|
import com.ejlchina.searcher.util.MapUtils;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -53,6 +54,7 @@ public class CmsGoodsDonController {
|
|
|
public Result<SearchResult<GoodsDon>> get(){
|
|
|
SearchResult<GoodsDon> search = beanSearcher.search(GoodsDon.class, MapUtils.flatBuilder(request.getParameterMap())
|
|
|
.field(GoodsDon::getDeleted,true)
|
|
|
+ .field(GoodsDon::getSpecialType, GoodsDon.SpecialType.giftCard.name()).op(Operator.NotEqual)
|
|
|
.build());
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
|
}
|
|
|
@@ -188,8 +190,20 @@ public class CmsGoodsDonController {
|
|
|
@GetMapping("/get/all")
|
|
|
public Result<List<GoodsDon>> getAllGoodsList() {
|
|
|
List<GoodsDon> goodsDons = beanSearcher.searchAll(GoodsDon.class, MapUtils.flatBuilder(request.getParameterMap())
|
|
|
- .field(GoodsDon::getDeleted,true)
|
|
|
+ .field(GoodsDon::getDeleted, true)
|
|
|
+ .field(GoodsDon::getSpecialType, GoodsDon.SpecialType.giftCard.name()).op(Operator.NotEqual)
|
|
|
.onlySelect(GoodsDon::getId, GoodsDon::getCategory, GoodsDon::getType, GoodsDon::getTitle).build());
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(goodsDons);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取礼品卡平台
|
|
|
+ */
|
|
|
+ @GetMapping("/get/giftCard")
|
|
|
+ public Result<GoodsDon> getGiftCard() {
|
|
|
+ GoodsDon goodsDon = beanSearcher.searchFirst(GoodsDon.class, MapUtils.builder()
|
|
|
+ .field(GoodsDon::getSpecialType, GoodsDon.SpecialType.giftCard.name())
|
|
|
+ .build());
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult(goodsDon);
|
|
|
+ }
|
|
|
}
|