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;
import com.luhu.computility.framework.apilog.core.annotation.ApiAccessLog;
import com.luhu.computility.framework.common.exception.ServiceException;
import com.luhu.computility.framework.common.pojo.CommonResult;
import com.luhu.computility.framework.common.pojo.PageResult;
import com.luhu.computility.framework.common.util.object.BeanUtils;
import com.luhu.computility.module.biz.controller.admin.bannerinfo.vo.BannerInfoPageReqVO;
import com.luhu.computility.module.biz.controller.admin.bannerinfo.vo.BannerInfoRespVO;
import com.luhu.computility.module.biz.controller.admin.computilityinformation.vo.ComputilityInformationRespVO;
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 lombok.extern.java.Log;
import org.apache.ibatis.annotations.Param;
import org.checkerframework.checker.units.qual.C;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.cache.RedisCache;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static com.luhu.computility.framework.common.pojo.CommonResult.success;
/**
* 接口实现控制层
* @author fanjiang.zeng
*/
@Tag(name = "管理后台 - banner页管理")
@RestController
@RequestMapping("/api/v1")
@Validated
public class ApiController {
/*
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
@Resource
private BannerInfoService bannerInfoService;
*//**
*banner接口
*//*
@ApiAccessLog
@Operation(summary = "banner接口", description = "banner接口")
@GetMapping(value = "/banner")
public CommonResult<List<BannerInfoRespVO>> getBannerInfo(@Valid BannerInfoPageReqVO reqVO) {
List<BannerInfoDO> bannerInfoDOS = bannerInfoService.getBannerInfo(reqVO);
return success(BeanUtils.toBean(bannerInfoDOS, BannerInfoRespVO.class));
}
*//**
*计算资源首页展示
*//*
@Operation(summary = "计算资源首页展示", description = "计算资源首页展示")
@GetMapping(value = "/computility")
@ApiAccessLog
public CommonResult<List<ComputilityInformationRespVO>> getComputilityInformation(@Valid ComputilityInformationRespVO reqVO) {
List<BannerInfoDO> bannerInfoDOS = bannerInfoService.getBannerInfo(reqVO);
return success(BeanUtils.toBean(bannerInfoDOS, BannerInfoRespVO.class));
}
*//**
*计算资源列表获取
*//*
@ApiOperation(value = "计算资源列表获取",notes = "计算资源列表获取")
@GetMapping(value = "/computilityList")
@ResponseBody
public R<List<BizComputility>> computilityList(BizComputility bizComputility){
List<BizComputility> list =
bizComputilityService.selectBizComputilityList(bizComputility);
return R.ok(list);
}
*//**
*计算资源详情
*//*
@ApiOperation(value = "计算资源详情",notes = "计算资源详情")
@GetMapping(value = "/computilityDetail")
@ResponseBody
public R<ComputilityDetailDTO> computilityDetail(@Param(value = "id") Long id){
Integer groundingStatus = Integer.valueOf(DictUtils.getDictValue("grounding_status","已上架"));
BizComputility computility =
bizComputilityService.selectBizComputilityById(id);
ComputilityDetailDTO computilityDetailDTO = new ComputilityDetailDTO();
BeanUtils.copyProperties(computility, computilityDetailDTO);
BizComputilityAccessory bizComputilityAccessory = new BizComputilityAccessory();
bizComputilityAccessory.setGroundingStatus(groundingStatus);
computilityDetailDTO.setAccessories(bizComputilityAccessoryService.selectBizComputilityAccessoryList(bizComputilityAccessory));
return R.ok(computilityDetailDTO);
}
*//**
*计算资源二级菜单
*//*
@ApiOperation(value = "计算资源二级菜单",notes = "计算资源二级菜单")
@GetMapping(value = "/computilityMenu")
@ResponseBody
public R<List<MenuDTO>> computilityMenu(){
List<MenuDTO> menuDTOList = getMenus("application_category");
return R.ok(menuDTOList);
}
private List<MenuDTO> getMenus(String type) {
List<SysDictData> dictData = DictUtils.getDictCache(type);
List<MenuDTO> list = new ArrayList<>();
dictData.forEach(item -> {
MenuDTO menuDTO = new MenuDTO();
menuDTO.setName(item.getDictLabel());
menuDTO.setValue(item.getDictValue());
list.add(menuDTO);
});
return list;
}
*//**
*行业应用二级菜单
*//*
@ApiOperation(value = "行业应用二级菜单",notes = "行业应用二级菜单")
@GetMapping(value = "/industryMenu")
@ResponseBody
public R<JSONArray> industryMenu() {
Integer groundingStatus = Integer.valueOf(DictUtils.getDictValue("grounding_status", "已上架"));
BizSolution bizSolution = new BizSolution();
bizSolution.setGroundingStatus(groundingStatus);
List<BizSolutionVO> bizSolutions = bizSolutionService.selectSolutionByIdAndName(bizSolution);
Map<Integer, List<BizSolutionVO>> category =
bizSolutions.stream().collect(Collectors.groupingBy(BizSolutionVO::getCategory));
JSONArray categoryArray = new JSONArray();
for (Map.Entry<Integer, List<BizSolutionVO>> entry : category.entrySet()) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("name", DictUtils.getDictLabel("solution_category", String.valueOf(entry.getKey())));
jsonObject.put("value", entry.getKey());
JSONArray jsonArray = new JSONArray();
Map<Integer, List<BizSolutionVO>> industryMap =
entry.getValue().stream().collect(Collectors.groupingBy(BizSolutionVO::getIndustryCategory));
for (Map.Entry<Integer, List<BizSolutionVO>> integerListEntry : industryMap.entrySet()) {
JSONObject industry = new JSONObject();
industry.put("name", DictUtils.getDictLabel("industry_category", String.valueOf(integerListEntry.getKey())));
industry.put("value", integerListEntry.getKey());
industry.put("child",
entry.getValue().stream().filter(object -> object.getIndustryCategory().equals(integerListEntry.getKey())).collect(Collectors.toList()));
jsonArray.add(industry);
}
jsonObject.put("child", jsonArray);
categoryArray.add(jsonObject);
}
return R.ok(categoryArray);
}
*//**
*行业应用详情-解决方案
*//*
@ApiOperation(value = "行业应用详情-解决方案",notes = "行业应用详情-解决方案")
@GetMapping(value = "/solutionDetail")
@ResponseBody
public R solutionDetail(@Param(value = "id") Long id){
//业务实现部分
BizSolution detail = bizSolutionService.selectBizSolutionById(id);
if(detail != null) {
return R.ok(detail);
}else {
return R.fail("无法获取详情,请重试!");
}
}
*//**
*活动咨询列表
*//*
@ApiOperation(value = "活动咨询列表",notes = "活动咨询列表")
@GetMapping(value = "/information")
@ResponseBody
public R<List<BizInformation>> information(BizInformation bizInformation){
//业务实现部分
Integer showStatus = Integer.valueOf(DictUtils.getDictValue("show_status","已显示"));
bizInformation.setShowStatus(showStatus);
List<BizInformation> list = bizInformationService.selectBizInformationList(bizInformation);
if(list != null) {
return R.ok(list);
}else {
return R.fail("无法获取详情,请重试!");
}
}
*//**
*活动咨询详情
*//*
@ApiOperation(value = "活动咨询详情",notes = "活动咨询详情")
@GetMapping(value = "/informationDetail")
@ResponseBody
public R<BizInformation> informationDetail(@Param(value = "id") Long id){
//业务实现部分
BizInformation detail = bizInformationService.selectBizInformationById(id);
if(detail != null) {
return R.ok(detail);
}else {
return R.fail("无法获取详情,请重试!");
}
}
*//**
*组件服务类型
*//*
@ApiOperation(value = "组件服务类型",notes = "组件服务类型")
@GetMapping(value = "/assemblyType")
@ResponseBody
public R<JSONArray> assemblyType(){
JSONArray jsonArray = new JSONArray();
List<SysDictData> dataList = DictUtils.getDictCache("assembly_type");
dataList.forEach(e->{
JSONObject jsonObject = new JSONObject();
jsonObject.put("name",e.getDictLabel());
jsonObject.put("value",e.getDictValue());
jsonArray.add(jsonObject);
});
return R.ok(jsonArray);
}
*//**
*组件服务列表
*//*
@ApiOperation(value = "组件服务列表",notes = "组件服务列表")
@GetMapping(value = "/assemblyList")
@ResponseBody
public R<List<BizAssembly>> assemblyList(@Param(value = "type") int type){
BizAssembly bizAssembly = new BizAssembly();
Integer showStatus = Integer.valueOf(DictUtils.getDictValue("show_status","已显示"));
Integer assemblyType = Integer.valueOf(DictUtils.getDictValue("assembly_type","全部"));
bizAssembly.setShowStatus(showStatus);
if(type != assemblyType) {
bizAssembly.setAssemblyType(type);
}
List<BizAssembly> bizAssemblies = bizAssemblyService.selectBizAssemblyList(bizAssembly);
return R.ok(bizAssemblies);
}
*//**
*合作伙伴列表
*//*
@ApiOperation(value = "合作伙伴列表",notes = "合作伙伴列表")
@GetMapping(value = "/partnerList")
@ResponseBody
public R<List<BizPartner>> partnerList(){
BizPartner bizPartner = new BizPartner();
Integer showStatus = Integer.valueOf(DictUtils.getDictValue("show_status","已显示"));
bizPartner.setShowStatus(showStatus);
List<BizPartner> bizPartners = bizPartnerService.selectBizPartnerList(bizPartner);
return R.ok(bizPartners);
}
*//**
* 根据应用类别返回对应计算机资源列表
*//*
@ApiOperation(value = "计算机资源 - 根据应用类别返回对应计算机资源列表",notes = "根据应用类别返回对应计算机资源列表")
@GetMapping(value = "/getRListByCategory")
@ResponseBody
public TableDataInfo getResourceListByCategory(@NotNull(message = "计算机资源编号不能为空") Integer nav) {
startPage();
BizComputility bizComputility = new BizComputility();
bizComputility.setCategory(nav);
Integer groundingStatus = Integer.valueOf(DictUtils.getDictValue("grounding_status", "已上架"));
bizComputility.setGroundingStatus(groundingStatus);
List<BizComputility> bizComputilities = bizComputilityService.selectBizComputilityDetailList(bizComputility);
List<BizResourceDetail> bizResourceDetails = new ArrayList<>();
bizComputilities.forEach(item -> {
BizResourceDetail bizResourceDetail = bizComputilityService.bizResourceDetail(item);
bizResourceDetails.add(bizResourceDetail);
});
return getDataTable(bizResourceDetails,bizComputilities);
}
*//**
* 订单 - 计算机资源详情
*//*
@ApiOperation(value = "计算机资源 - 详情2",notes = "计算机资源详情2")
@GetMapping(value = "/getRDetail")
@ResponseBody
public R<BizResourceDetailRespVO> getResourceDetail(@Param(value = "id") @NotNull(message = "计算机资源编号不能为空") Long id){
BizResourceDetailRespVO getResourceDetail = bizComputilityService.getResourceDetail(id);
return R.ok(getResourceDetail);
}
*//**
* 订单-我的订单列表
*//*
@GetMapping("/orderMyList")
@ApiOperation("订单-我的订单列表")
@ResponseBody
public TableDataInfo list(BizOrder bizOrder)
{
boolean b = SecurityUtils.hasRole("admin");
if (!b){
bizOrder.setApplyUser(SecurityUtils.getUserId());
}
startPage();
List<BizOrderDetailRespVO> list = bizOrderService.selectBizOrderDetailList(bizOrder);
return getDataTable(list);
}
*//**
* 订单-计算接口
*//*
@ApiOperation(value = "订单-计算接口",notes = "订单-计算接口")
@PostMapping(value = "/orderComputer")
@ResponseBody
public R<ComputerPriceRespVO> order(@RequestBody BizResourceOrderSavaVO bizResourceOrderSavaVO){
return R.ok(bizOrderService.computerOrderPrice(bizResourceOrderSavaVO));
}
*//**
* 获取订单管理-需求单管理详细信息
*//*
@GetMapping(value = "/{id}")
@ApiOperation("订单-订单详细信息")
@ResponseBody
public R<BizOrderDetailRespVO> getInfo(@PathVariable("id") Long id)
{
return R.ok(bizOrderService.selectBizOrderDetailById(id));
}
*//**
* 订单 - 购买接口
*//*
@ApiOperation(value = "订单 - 购买接口",notes = "订单 - 购买接口")
@PostMapping(value = "/orderBuy")
@ResponseBody
public R<Long> buy(@RequestBody BizResourceOrderSavaVO bizResourceOrderSavaVO){
return R.ok(bizOrderService.orderBuy(bizResourceOrderSavaVO));
}
*//**
* 订单 - 提交
*//*
@ApiOperation(value = "订单 - 提交",notes = "订单 - 提交")
@PostMapping(value = "/orderSubmit")
@ResponseBody
public R<Long> submit(@RequestBody OrderId orderId){
return R.ok(bizOrderService.submitOrder(orderId));
}
*//**
* 订单 - 取消
*//*
@ApiOperation(value = "订单 - 取消",notes = "订单 - 取消")
@PostMapping(value = "/orderCancel")
@ResponseBody
public R<Integer> cancel(@RequestBody OrderId orderId){
BizOrder bizOrder = bizOrderService.vailSelectBizOrderById(orderId.getId());
if (!bizOrder.getOrderStatus().equals(OrderStatus.审核中.getCode())){
throw new ServiceException(500 , "订单状态错误,无法取消");
}
bizOrder.setOrderStatus(OrderStatus.已取消.getCode());
return R.ok(bizOrderService.updateBizOrder(bizOrder));
}
*//**
* 购物车- 列表
*//*
@GetMapping("/list")
@ApiOperation("购物车 - 列表")
@ResponseBody
public TableDataInfo list()
{
startPage();
BizShopping bizShopping = new BizShopping();
bizShopping.setUserId(SecurityUtils.getUserId());
List<BizShoppingDetail> list = bizShoppingService.selectBizShoppingSDetailList(bizShopping);
return getDataTable(list);
}
@ApiOperation(value = "购物车 - 添加接口",notes = "购物车 - 添加接口")
@PostMapping(value = "shoppingAdd")
@ResponseBody
public R<Long> shoppingAdd(@RequestBody BizResourceOrderSavaVO savaVO)
{
return R.ok(bizShoppingService.shoppingAdd(savaVO));
}
@ApiOperation(value = "购物车 - 提交接口",notes = "购物车 - 提交接口")
@GetMapping(value = "shoppingComputer/{ids}")
@ResponseBody
public R<String> shoppingComputer(@PathVariable @NotEmpty(message = "编号不能为空") Long[] ids)
{
bizOrderService.submitShoppingOrder(ids);
return R.ok("提交成功");
}
@ApiOperation(value = "购物车 - 计算接口",notes = "购物车 - 计算接口")
@GetMapping(value = "shoppingComputerVo/{ids}")
@ResponseBody
public R<ComputerPriceRespVO> shoppingComputerVo(@PathVariable @NotEmpty(message = "编号不能为空") Long[] ids)
{
BigDecimal totalPublicPrice = new BigDecimal(0);
BigDecimal totalInnerPrice = new BigDecimal(0);
for (Long id : ids) {
BizShopping bizShopping = bizShoppingService.vailSelectBizShoppingById(id);
totalInnerPrice = totalInnerPrice.add(bizShopping.getInnerTotalPrice());
totalPublicPrice = totalPublicPrice.add(bizShopping.getPublicTotalPrice());
}
ComputerPriceRespVO computerPriceRespVO = new ComputerPriceRespVO();
computerPriceRespVO.setTotalInnerPrice(totalInnerPrice.toString());
computerPriceRespVO.setTotalPulicPrice(totalPublicPrice.toString());
return R.ok(computerPriceRespVO);
}
*//**
* 购物车 - 删除管理
*//*
@Log(title = "购物车管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
@ApiOperation("购物车 - 删除管理")
@ResponseBody
public R<Integer> remove(@PathVariable Long[] ids)
{
return R.ok(bizShoppingService.deleteBizShoppingByIds(ids));
}
*//**
* 购物车 - 数量修改
*//*
@Log(title = "购物车 - 数量修改", businessType = BusinessType.UPDATE)
@PutMapping("/shoppingEdit")
@ApiOperation("购物车 - 数量修改")
@ResponseBody
public R<ComputerPriceRespVO> edit(@RequestBody ShoppingNumSaveVO saveVO)
{
BizShopping bizShopping = bizShoppingService.selectBizShoppingById(saveVO.getId());
//修改价格 对外
BigDecimal onPublicePrice = bizShopping.getPublicTotalPrice().divide(new BigDecimal(bizShopping.getUseNum()));
BigDecimal publicTotal = onPublicePrice.multiply(new BigDecimal(saveVO.getUseNum()));
bizShopping.setPublicTotalPrice(publicTotal);
//修改价格 对内
BigDecimal onInnerPrice = bizShopping.getInnerTotalPrice().divide(new BigDecimal(bizShopping.getUseNum()));
BigDecimal innerPrice = onInnerPrice.multiply(new BigDecimal(saveVO.getUseNum()));
bizShopping.setInnerTotalPrice(innerPrice);
bizShopping.setUseNum(saveVO.getUseNum());
bizShoppingService.updateBizShopping(bizShopping);
ComputerPriceRespVO computerPriceRespVO = new ComputerPriceRespVO();
computerPriceRespVO.setTotalPulicPrice(bizShopping.getPublicTotalPrice().toString());
computerPriceRespVO.setTotalInnerPrice(bizShopping.getInnerTotalPrice().toString());
return R.ok(computerPriceRespVO);
}
*//**
* 新增企业人认证审核
*//*
@Log(title = "企业人认证审核", businessType = BusinessType.INSERT)
@PostMapping("/enterpriseAudit")
@ApiOperation("企业人认证 - 新增")
@ResponseBody
public R<Long> add(@RequestBody BizEnterpriseAuditSaveVO saveVO)
{
return R.ok(bizEnterpriseAuditService.insertBizEnterpriseAuditLong(saveVO));
}
*//**
* 根据用户查询企业认证信息和用户信息
*//*
@GetMapping("/enterpriseAudit")
@ApiOperation("企业人认证 - 根据用户查询企业认证信息和用户信息")
@ResponseBody
public R<BizEnterpriseAuditUser> enterpriseAudit()
{
return R.ok(bizEnterpriseAuditService.selectBizEnterpriseAuditByUserId());
}
*//**
* 订单 - 驳回理由
*//*
@GetMapping(value = "/orderReason/{id}")
@ApiOperation("订单 - 驳回理由")
@ResponseBody
public R<String> getOrderReason(@PathVariable("id") Long id)
{
BizOrder bizOrder = bizOrderService.vailSelectBizOrderById(id);
//判断状态
if (!OrderStatus.已驳回.getCode().equals(bizOrder.getOrderStatus())) {
throw new ServiceException(500 , "订单状态错误");
}
return R.ok(bizOrder.getRemark());
}
*//**
* 根据用户编号获取详细信息
*//*
@GetMapping(value = { "/userInfo" })
@ApiOperation("用户信息 - 用户信息")
@ResponseBody
public R<SysUser> getUserInfo()
{
Long userId = SecurityUtils.getLoginUser().getUser().getUserId();
userService.checkUserDataScope(userId);
SysUser sysUser = userService.selectUserById(userId);
return R.ok(sysUser);
}
public static void main(String[] args) {
final Integer[] result = {0};
for(int i=0;i<=10;i++){
int finalI = i;
new Thread(){
@Override
public void run() {
System.out.println(finalI);
result[0] = finalI;
}
}.start();
}
while (result[0] == 10) {
System.out.println("我执行完了");
break;
}
}*/
}
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