Commit ede68dac by lijinqi

客户端 banner接口

parent c9757056
package com.luhu.computility.module.biz.controller.app.bannerinfo;
import com.luhu.computility.framework.common.pojo.CommonResult;
import com.luhu.computility.framework.common.util.object.BeanUtils;
import com.luhu.computility.module.biz.controller.app.bannerinfo.vo.AppBannerInfoRespVO;
import com.luhu.computility.module.biz.dal.dataobject.bannerinfo.BannerInfoDO;
import com.luhu.computility.module.biz.service.bannerinfo.BannerInfoService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.annotation.security.PermitAll;
import java.util.List;
import static com.luhu.computility.framework.common.pojo.CommonResult.success;
@Tag(name = "app - banner页")
@RestController
@RequestMapping("/biz/banner-info")
@Validated
public class AppBannerInfoController {
@Resource
private BannerInfoService bannerInfoService;
@GetMapping("/get")
@Operation(summary = "获得所有bannerInfo")
@PermitAll
public CommonResult<List<AppBannerInfoRespVO>> getAllBannerInfo() {
List<BannerInfoDO> allBanner = bannerInfoService.getAllBanner();
return success(BeanUtils.toBean(allBanner, AppBannerInfoRespVO.class));
}
}
\ No newline at end of file
package com.luhu.computility.module.biz.controller.client.dto; package com.luhu.computility.module.biz.controller.app.bannerinfo.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
...@@ -7,10 +7,13 @@ import lombok.Data; ...@@ -7,10 +7,13 @@ import lombok.Data;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@Schema(description = "客户端 - banner页管理 Request DTO") @Schema(description = "管理后台 - banner页管理 Response VO")
@Data @Data
@ExcelIgnoreUnannotated @ExcelIgnoreUnannotated
public class ClientBannerInfoReqDTO { public class AppBannerInfoRespVO {
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id;
@Schema(description = "轮播图地址") @Schema(description = "轮播图地址")
@ExcelProperty("轮播图地址") @ExcelProperty("轮播图地址")
...@@ -38,7 +41,7 @@ public class ClientBannerInfoReqDTO { ...@@ -38,7 +41,7 @@ public class ClientBannerInfoReqDTO {
@Schema(description = "状态:0-已隐藏,1-已显示", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @Schema(description = "状态:0-已隐藏,1-已显示", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("状态:0-已隐藏,1-已显示") @ExcelProperty("状态:0-已隐藏,1-已显示")
private Boolean showStatus; private Integer showStatus;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间") @ExcelProperty("创建时间")
......
package com.luhu.computility.module.biz.controller.client.dto;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
@Schema(description = "客户端 - banner页管理 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ClientBannerInfoRespVO {
@Schema(description = "轮播图地址")
@ExcelProperty("轮播图地址")
private String image;
@Schema(description = "内容", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("内容")
private String information;
@Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("标题")
private String title;
@Schema(description = "链接地址", example = "https://www.iocoder.cn")
@ExcelProperty("链接地址")
private String url;
@Schema(description = "描述内容", example = "随便")
@ExcelProperty("描述内容")
private String description;
@Schema(description = "排序值")
@ExcelProperty("排序值")
private Integer orderNum;
@Schema(description = "状态:0-已隐藏,1-已显示", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("状态:0-已隐藏,1-已显示")
private Boolean showStatus;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@Schema(description = "备注", example = "你说的对")
@ExcelProperty("备注")
private String remark;
}
\ No newline at end of file
...@@ -65,4 +65,7 @@ public interface BannerInfoService { ...@@ -65,4 +65,7 @@ public interface BannerInfoService {
*/ */
List<BannerInfoDO> getBannerInfo(BannerInfoPageReqVO pageReqVO); List<BannerInfoDO> getBannerInfo(BannerInfoPageReqVO pageReqVO);
} List<BannerInfoDO> getAllBanner();
\ No newline at end of file
}
\ No newline at end of file
...@@ -88,4 +88,10 @@ public class BannerInfoServiceImpl implements BannerInfoService { ...@@ -88,4 +88,10 @@ public class BannerInfoServiceImpl implements BannerInfoService {
return bannerInfoMapper.selectList(pageReqVO); return bannerInfoMapper.selectList(pageReqVO);
} }
@Override
public List<BannerInfoDO> getAllBanner() {
return bannerInfoMapper.selectList();
}
} }
\ No newline at end of file
...@@ -6,6 +6,8 @@ import com.luhu.computility.framework.common.pojo.CommonResult; ...@@ -6,6 +6,8 @@ import com.luhu.computility.framework.common.pojo.CommonResult;
import com.luhu.computility.framework.common.pojo.PageResult; import com.luhu.computility.framework.common.pojo.PageResult;
import com.luhu.computility.framework.common.util.object.BeanUtils; import com.luhu.computility.framework.common.util.object.BeanUtils;
import com.luhu.computility.framework.excel.core.util.ExcelUtils; import com.luhu.computility.framework.excel.core.util.ExcelUtils;
import com.luhu.computility.module.pay.api.notify.dto.PayOrderNotifyReqDTO;
import com.luhu.computility.module.pay.api.notify.dto.PayRefundNotifyReqDTO;
import com.luhu.computility.module.pay.controller.admin.order.vo.*; import com.luhu.computility.module.pay.controller.admin.order.vo.*;
import com.luhu.computility.module.pay.convert.order.PayOrderConvert; import com.luhu.computility.module.pay.convert.order.PayOrderConvert;
import com.luhu.computility.module.pay.dal.dataobject.app.PayAppDO; import com.luhu.computility.module.pay.dal.dataobject.app.PayAppDO;
...@@ -23,11 +25,14 @@ import io.swagger.v3.oas.annotations.Operation; ...@@ -23,11 +25,14 @@ 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;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.annotation.security.PermitAll;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.io.IOException; import java.io.IOException;
...@@ -49,6 +54,7 @@ import static com.luhu.computility.framework.web.core.util.WebFrameworkUtils.get ...@@ -49,6 +54,7 @@ import static com.luhu.computility.framework.web.core.util.WebFrameworkUtils.get
@Validated @Validated
public class PayOrderController { public class PayOrderController {
private static final Logger log = LoggerFactory.getLogger(PayOrderController.class);
@Resource @Resource
private PayOrderService orderService; private PayOrderService orderService;
@Resource @Resource
...@@ -142,4 +148,29 @@ public class PayOrderController { ...@@ -142,4 +148,29 @@ public class PayOrderController {
ExcelUtils.write(response, "支付订单.xls", "数据", PayOrderExcelVO.class, excelList); ExcelUtils.write(response, "支付订单.xls", "数据", PayOrderExcelVO.class, excelList);
} }
/**
* 内部支付任务回调
*/
@PostMapping("/update-paid")
@PermitAll
public CommonResult<Boolean> updateOrderPaid(@RequestBody PayOrderNotifyReqDTO notifyReqDTO) {
/*ticketOrderService.updateOrderPaid(notifyReqDTO.getMerchantOrderId(),
notifyReqDTO.getPayOrderId());*/
log.error("内部支付任务回调 ");
return success(true);
}
/**
* 内部退款任务回调
*/
@PostMapping("/update-refunded")
@PermitAll
public CommonResult<Boolean> refunded(@RequestBody PayRefundNotifyReqDTO notifyReqDTO) {
/*ticketOrderService.updateOrderRefunded(notifyReqDTO.getMerchantOrderId(),
notifyReqDTO.getPayRefundId());*/
log.error("内部退款任务回调");
return success(true);
}
} }
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 sign in to comment