Browse Source

feat 主流云存储均以支持

1 month ago
parent
commit
fbebb89583

+ 71 - 0
edu-travel-service/edu-travel-service-commodity/src/main/java/edu/travel/commodity/dto/BaseCountryServeDTO.java

@@ -0,0 +1,71 @@
+package edu.travel.commodity.dto;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 服务国家表
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class BaseCountryServeDTO extends BaseDto{
+    /**
+     * ID
+     */
+    private Long id;
+
+    /**
+     * 所属洲
+     */
+    private Long parentId;
+
+    /**
+     * 关联国家id
+     */
+    private Long countryId;
+
+    /**
+     * 服务费比率
+     */
+    private BigDecimal serviceChargeValue;
+
+    /**
+     * 结算显示方式 -0 CNY100 -1 ¥100 -2 100RMB
+     */
+    private Integer payViewWay;
+
+    /**
+     * 中文国家/洲名称
+     */
+    private String countryNameZh;
+
+    /**
+     * 英文国家/洲名称
+     */
+    private String countryNameEn;
+
+    /**
+     * 本地国家/洲名称
+     */
+    private String countryNameLocal;
+
+    /**
+     * 服务状态,默认0,-0未开通,-1开通
+     */
+    private Integer serveEnable;
+
+
+    /**
+     * 货币表id
+     */
+    private Long currencyId;
+}

+ 4 - 1
edu-travel-service/edu-travel-service-commodity/src/main/java/edu/travel/commodity/dto/BaseDto.java

@@ -1,9 +1,12 @@
 package edu.travel.commodity.dto;
 
+import edu.travel.entity.BaseEntity;
+import edu.travel.model.PageDto;
+import edu.travel.po.PagePO;
 import lombok.Data;
 
 @Data
-public class BaseDto {
+public class BaseDto  extends PagePO {
     /**地区id*/
     private String countryId;
 }

+ 6 - 0
edu-travel-service/edu-travel-service-commodity/src/main/java/edu/travel/commodity/service/BaseCountryServeService.java

@@ -1,8 +1,14 @@
 package edu.travel.commodity.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import edu.travel.commodity.dto.BaseCountryServeDTO;
 import edu.travel.commodity.entity.BaseCountryServe;
 import com.baomidou.mybatisplus.extension.service.IService;
+import edu.travel.rpc.RPCBaseResponse;
+
 public interface BaseCountryServeService extends IService<BaseCountryServe>{
 
 
+    RPCBaseResponse<IPage<BaseCountryServe>> getCountryServePage(BaseCountryServeDTO dto);
 }

+ 16 - 2
edu-travel-service/edu-travel-service-commodity/src/main/java/edu/travel/commodity/service/impl/BaseCountryServeServiceImpl.java

@@ -1,12 +1,26 @@
 package edu.travel.commodity.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import edu.travel.commodity.dto.BaseCountryServeDTO;
 import edu.travel.commodity.entity.BaseCountryServe;
 import edu.travel.commodity.mapper.BaseCountryServeMapper;
 import edu.travel.commodity.service.BaseCountryServeService;
+import edu.travel.rpc.RPCBaseResponse;
+import edu.travel.rpc.RPCPageResponse;
+import edu.travel.service.SysServiceImpl;
 import org.springframework.stereotype.Service;
 
 @Service
-public class BaseCountryServeServiceImpl extends ServiceImpl<BaseCountryServeMapper, BaseCountryServe> implements BaseCountryServeService {
-
+public class BaseCountryServeServiceImpl extends SysServiceImpl<BaseCountryServeMapper, BaseCountryServe> implements BaseCountryServeService {
+    @Override
+    public RPCBaseResponse<IPage<BaseCountryServe>> getCountryServePage(BaseCountryServeDTO dto) {
+        Page<BaseCountryServe> baseCountryServePage = new Page<>(dto.getCurrentPage(), dto.getPageSize());
+        IPage<BaseCountryServe> pageLink = super.getPageLink(new LambdaQueryWrapper<BaseCountryServe>(), baseCountryServePage);
+        Page<BaseCountryServe> page = this.page(baseCountryServePage, new LambdaQueryWrapper<BaseCountryServe>());
+        RPCBaseResponse<IPage<BaseCountryServe>> pageRPCPageResponse = new RPCBaseResponse<>(200,"SUCCESS",pageLink);
+        return pageRPCPageResponse;
+    }
 }

+ 14 - 2
edu-travel-service/edu-travel-service-commodity/src/main/java/edu/travel/commodity/web/BaseCountryServeController.java

@@ -1,6 +1,11 @@
 package edu.travel.commodity.web;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import edu.travel.commodity.dto.BaseCountryServeDTO;
 import edu.travel.commodity.entity.BaseCountryServe;
-import edu.travel.commodity.service.impl.BaseCountryServeServiceImpl;
+import edu.travel.commodity.service.BaseCountryServeService;
+import edu.travel.rpc.RPCBaseResponse;
+import edu.travel.web.BaseController;
 import org.springframework.web.bind.annotation.*;
 
 import org.springframework.beans.factory.annotation.Autowired;
@@ -12,6 +17,13 @@ import org.springframework.beans.factory.annotation.Autowired;
 */
 @RestController
 @RequestMapping("/base_country_serve")
-public class BaseCountryServeController {
+public class BaseCountryServeController  extends BaseController {
+    @Autowired
+    private BaseCountryServeService baseCountryServeService;
+
+    @GetMapping("/getCountryServePage")
+    public RPCBaseResponse<IPage<BaseCountryServe>> getCountryServePage(BaseCountryServeDTO dto) {
+        return baseCountryServeService.getCountryServePage(dto);
+    }
 
 }