Эх сурвалжийг харах

新增国家状态接口,解决精度丢失问题,方法补全。

Sakana 1 долоо хоног өмнө
parent
commit
5e69a42035
23 өөрчлөгдсөн 184 нэмэгдсэн , 52 устгасан
  1. 3 0
      edu-travel-remote/edu-travel-remote-commodity/src/main/java/edu/travel/remote/dto/ParametersDto.java
  2. 2 2
      edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/dto/BaseCountryDto.java
  3. 3 3
      edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/dto/BaseCountryServeCurrencyDto.java
  4. 7 3
      edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/dto/BaseCountryServeDto.java
  5. 26 0
      edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/dto/BaseCountryServeStatusDto.java
  6. 1 1
      edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/dto/ShopCurrencyDto.java
  7. 2 3
      edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/dto/ShopCurrencyStatusDto.java
  8. 5 1
      edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/remote/ShopCurrencyRemoteController.java
  9. 3 3
      edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/vo/BaseCountryServeCurrencyVo.java
  10. 23 0
      edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/vo/BaseCountryServeStatusVo.java
  11. 7 4
      edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/vo/BaseCountryServeVo.java
  12. 2 2
      edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/vo/BaseCountryVo.java
  13. 2 3
      edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/vo/ShopCurrencyStatusVo.java
  14. 1 1
      edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/vo/ShopCurrencyVo.java
  15. 8 7
      edu-travel-service/edu-travel-service-commodity/src/main/java/edu/travel/commodity/service/impl/ShopParametersServiceImpl.java
  16. 2 2
      edu-travel-service/edu-travel-service-country/src/main/java/edu/travel/country/entity/BaseCountry.java
  17. 8 3
      edu-travel-service/edu-travel-service-country/src/main/java/edu/travel/country/entity/BaseCountryServe.java
  18. 2 2
      edu-travel-service/edu-travel-service-country/src/main/java/edu/travel/country/entity/ShopCurrency.java
  19. 7 1
      edu-travel-service/edu-travel-service-country/src/main/java/edu/travel/country/service/BaseCountryServeService.java
  20. 53 7
      edu-travel-service/edu-travel-service-country/src/main/java/edu/travel/country/service/impl/BaseCountryServeServiceImpl.java
  21. 2 2
      edu-travel-service/edu-travel-service-country/src/main/java/edu/travel/country/service/impl/BaseCountryServiceImpl.java
  22. 2 1
      edu-travel-service/edu-travel-service-country/src/main/java/edu/travel/country/service/impl/ShopCurrencyServiceImpl.java
  23. 13 1
      edu-travel-service/edu-travel-service-country/src/main/java/edu/travel/country/web/BaseCountryServeController.java

+ 3 - 0
edu-travel-remote/edu-travel-remote-commodity/src/main/java/edu/travel/remote/dto/ParametersDto.java

@@ -3,6 +3,8 @@ package edu.travel.remote.dto;
 import edu.travel.po.PagePO;
 import lombok.Data;
 
+import java.util.Map;
+
 @Data
 public class ParametersDto extends PagePO {
 
@@ -18,5 +20,6 @@ public class ParametersDto extends PagePO {
      * 是否必填参数  0 是 1 否
      */
     private String isNecessary;
+//    private Map<String,Object> productParametersMap;
 
 }

+ 2 - 2
edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/dto/BaseCountryDto.java

@@ -14,12 +14,12 @@ public class BaseCountryDto extends PagePO {
     /**
      * ID
      */
-    private Long id;
+    private String id;
 
     /**
      * 所属洲
      */
-    private Long parentId;
+    private String parentId;
     /**
      * 图片
      */

+ 3 - 3
edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/dto/BaseCountryServeCurrencyDto.java

@@ -20,17 +20,17 @@ public class BaseCountryServeCurrencyDto extends PagePO {
     /**
      * ID
      */
-    private Long id;
+    private String id;
 
     /**
      * 所属洲
      */
-    private Long parentId;
+    private String parentId;
 
     /**
      * 关联国家id
      */
-    private Long countryId;
+    private String countryId;
 
     /**
      * 服务费比率

+ 7 - 3
edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/dto/BaseCountryServeDto.java

@@ -19,17 +19,17 @@ public class BaseCountryServeDto extends PagePO {
     /**
      * ID
      */
-    private Long id;
+    private String id;
 
     /**
      * 所属洲
      */
-    private Long parentId;
+    private String parentId;
 
     /**
      * 关联国家id
      */
-    private Long countryId;
+    private String countryId;
 
     /**
      * 服务费比率
@@ -77,4 +77,8 @@ public class BaseCountryServeDto extends PagePO {
      */
     @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
     private Date updateTime;
+    /**
+     * 服务电话
+     */
+    private String servePhone;
 }

+ 26 - 0
edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/dto/BaseCountryServeStatusDto.java

@@ -0,0 +1,26 @@
+package edu.travel.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import edu.travel.po.PagePO;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 服务国家表
+ */
+@Data
+public class BaseCountryServeStatusDto extends PagePO {
+    /**
+     * ID
+     */
+    private String id;
+
+    /**
+     * 服务状态,默认0,-0未开通,-1开通
+     */
+    private Integer serveEnable;
+}

+ 1 - 1
edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/dto/ShopCurrencyDto.java

@@ -53,7 +53,7 @@ public class ShopCurrencyDto extends PagePO {
     /**
      * 状态 -0启用  -1禁用
      * */
-    private String status;
+    private Integer status;
     /**
      * 创建时间
      */

+ 2 - 3
edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/dto/ShopCurrencyStatusDto.java

@@ -7,14 +7,13 @@ import lombok.Data;
  * 货币表
  */
 @Data
-@TableName(value = "shop_currency")
 public class ShopCurrencyStatusDto{
     /**
      * ID
      */
-    private Long id;
+    private String id;
     /**
      * 状态 -0启用  -1禁用
      * */
-    private String status;
+    private Integer status;
 }

+ 5 - 1
edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/remote/ShopCurrencyRemoteController.java

@@ -2,12 +2,15 @@ package edu.travel.remote;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import edu.travel.dto.ShopCurrencyDto;
+import edu.travel.dto.ShopCurrencyStatusDto;
 import edu.travel.remote.base.RemoteBaseController;
 import edu.travel.rpc.RPCBaseResponse;
+import edu.travel.vo.ShopCurrencyStatusVo;
 import edu.travel.vo.ShopCurrencyVo;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
 
 import java.util.List;
@@ -16,5 +19,6 @@ import java.util.List;
 public interface ShopCurrencyRemoteController extends RemoteBaseController<ShopCurrencyVo, ShopCurrencyDto> {
     @GetMapping("/getCurrencyPage")
     public RPCBaseResponse<IPage<ShopCurrencyVo>> getCurrencyPage(ShopCurrencyDto dto);
-
+    @PostMapping("/updateCurrencyStatus")
+    public RPCBaseResponse<ShopCurrencyStatusVo> updateCurrencyStatus(@RequestBody ShopCurrencyStatusDto shopCurrencyStatusDto);
 }

+ 3 - 3
edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/vo/BaseCountryServeCurrencyVo.java

@@ -21,17 +21,17 @@ public class BaseCountryServeCurrencyVo extends BaseEntity {
     /**
      * ID
      */
-    private Long id;
+    private String id;
 
     /**
      * 所属洲
      */
-    private Long parentId;
+    private String parentId;
 
     /**
      * 关联国家id
      */
-    private Long countryId;
+    private String countryId;
 
     /**
      * 服务费比率

+ 23 - 0
edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/vo/BaseCountryServeStatusVo.java

@@ -0,0 +1,23 @@
+package edu.travel.vo;
+
+import edu.travel.entity.BaseEntity;
+import edu.travel.po.PagePO;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 服务国家表
+ */
+@Data
+public class BaseCountryServeStatusVo extends BaseEntity {
+    /**
+     * ID
+     */
+    private String id;
+
+    /**
+     * 服务状态,默认0,-0未开通,-1开通
+     */
+    private Integer serveEnable;
+}

+ 7 - 4
edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/vo/BaseCountryServeVo.java

@@ -21,17 +21,17 @@ public class BaseCountryServeVo extends BaseEntity {
     /**
      * ID
      */
-    private Long id;
+    private String id;
 
     /**
      * 所属洲
      */
-    private Long parentId;
+    private String parentId;
 
     /**
      * 关联国家id
      */
-    private Long countryId;
+    private String countryId;
 
     /**
      * 服务费比率
@@ -76,7 +76,10 @@ public class BaseCountryServeVo extends BaseEntity {
      * 区号
      */
     private String areaCode;
-
+    /**
+     * 服务电话
+     */
+    private String servePhone;
     /**
      *map
      */

+ 2 - 2
edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/vo/BaseCountryVo.java

@@ -15,12 +15,12 @@ public class BaseCountryVo extends BaseEntity {
     /**
      * ID
      */
-    private Long id;
+    private String id;
 
     /**
      * 所属洲
      */
-    private Long parentId;
+    private String parentId;
     /**
      * 图片
      */

+ 2 - 3
edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/vo/ShopCurrencyStatusVo.java

@@ -17,14 +17,13 @@ import java.util.Date;
  * 货币表
  */
 @Data
-@TableName(value = "shop_currency")
 public class ShopCurrencyStatusVo extends BaseEntity {
     /**
      * ID
      */
-    private Long id;
+    private String id;
     /**
      * 状态 -0启用  -1禁用
      * */
-    private String status;
+    private Integer status;
 }

+ 1 - 1
edu-travel-remote/edu-travel-remote-country/src/main/java/edu/travel/vo/ShopCurrencyVo.java

@@ -50,5 +50,5 @@ public class ShopCurrencyVo extends BaseEntity {
      * 状态 -0启用  -1禁用
      * */
 
-    private String status;
+    private Integer status;
 }

+ 8 - 7
edu-travel-service/edu-travel-service-commodity/src/main/java/edu/travel/commodity/service/impl/ShopParametersServiceImpl.java

@@ -82,24 +82,24 @@ public class ShopParametersServiceImpl extends SysServiceImpl<ShopParametersMapp
 
     @Override
     public RPCBaseResponse<Page<ShopParameters>> getAllParametersPage(ParametersDto parametersDto) {
-        // 查询参数数据,确保并计算总记录数
+        // Step 1: 查询参数数据,确保并计算总记录数
         List<ShopParametersVo> shopParametersVoList = shopParametersMapper.selectParametersWithCountry(parametersDto);
         int total = shopParametersMapper.selectParametersCount(parametersDto);
 
-        // 将 ShopParametersVo 转换为 ShopParameters
+        // Step 2: 将 ShopParametersVo 转换为 ShopParameters
         List<ShopParameters> shopParametersList = shopParametersVoList.stream()
                 .map(this::convertVoToEntity) // 使用转换方法
                 .collect(Collectors.toList());
 
-        // 提取国家服务ID
+        // Step 3: 提取国家服务ID
         Set<Long> countryServeIds = shopParametersList.stream()
                 .map(ShopParameters::getCountryId)
                 .collect(Collectors.toSet());
 
-        // 查询国家信息
+        // Step 4: 查询国家信息
         Map<String, BaseCountryServeVo> countryMap = fetchCountryData(countryServeIds);
 
-        // 将国家信息放入参数列表中
+        // Step 5: 将国家信息放入参数列表中
         for (ShopParameters shopParameters : shopParametersList) {
             if (shopParameters.getProductParametersMap() == null) {
                 shopParameters.setProductParametersMap(new HashMap<>());
@@ -109,15 +109,16 @@ public class ShopParametersServiceImpl extends SysServiceImpl<ShopParametersMapp
             }
         }
 
-        // 封装返回结果
+        // Step 6: 封装返回结果
         Page<ShopParameters> shopParametersPage = new Page<>();
         shopParametersPage.setRecords(shopParametersList);
         shopParametersPage.setTotal(total);
         shopParametersPage.setCurrent(parametersDto.getCurrentPage());
         shopParametersPage.setSize(parametersDto.getPageSize());
+
+        // Step 7: 返回结果
         return new RPCBaseResponse<>(200, "SUCCESS", shopParametersPage);
     }
-
     /**
      * 将 ShopParametersVo 转换为 ShopParameters
      */

+ 2 - 2
edu-travel-service/edu-travel-service-country/src/main/java/edu/travel/country/entity/BaseCountry.java

@@ -21,13 +21,13 @@ public class BaseCountry extends BaseEntity {
      * ID
      */
     @TableId(value = "id", type = IdType.ASSIGN_ID)
-    private Long id;
+    private String id;
 
     /**
      * 所属洲
      */
     @TableField(value = "parent_id")
-    private Long parentId;
+    private String parentId;
     /**
      * 图片
      */

+ 8 - 3
edu-travel-service/edu-travel-service-country/src/main/java/edu/travel/country/entity/BaseCountryServe.java

@@ -27,19 +27,19 @@ public class BaseCountryServe extends BaseEntity {
      * ID
      */
     @TableId(value = "id", type = IdType.ASSIGN_ID)
-    private Long id;
+    private String id;
 
     /**
      * 所属洲
      */
     @TableField(value = "parent_id")
-    private Long parentId;
+    private String parentId;
 
     /**
      * 关联国家id
      */
     @TableField(value = "country_id")
-    private Long countryId;
+    private String countryId;
 
     /**
      * 服务费比率
@@ -123,6 +123,11 @@ public class BaseCountryServe extends BaseEntity {
      */
     @TableField(value = "language_id")
     private Long languageId;
+    /**
+     * 服务电话
+     */
+    @TableField(value = "serve_phone")
+    private String servePhone;
 
     @TableField(exist = false)
     @LinkOne(linkField = "currencyId", linkMapper = ShopCurrencyMapper.class, linkPrimaryField = "id")

+ 2 - 2
edu-travel-service/edu-travel-service-country/src/main/java/edu/travel/country/entity/ShopCurrency.java

@@ -25,7 +25,7 @@ public class ShopCurrency extends BaseEntity {
      * ID
      */
     @TableId(value = "id", type = IdType.ASSIGN_ID)
-    private Long id;
+    private String id;
 
     /**
      * 货币名称_en
@@ -60,6 +60,6 @@ public class ShopCurrency extends BaseEntity {
      * 状态 -0启用  -1禁用
      * */
     @TableField(value = "status")
-    private String status;
+    private Integer status;
 
 }

+ 7 - 1
edu-travel-service/edu-travel-service-country/src/main/java/edu/travel/country/service/BaseCountryServeService.java

@@ -1,9 +1,13 @@
 package edu.travel.country.service;
 
+import cn.hutool.db.Page;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import edu.travel.country.entity.BaseCountryServe;
 import edu.travel.dto.BaseCountryServeDto;
+import edu.travel.dto.BaseCountryServeStatusDto;
 import edu.travel.rpc.RPCBaseResponse;
+import edu.travel.vo.BaseCountryServeStatusVo;
 import edu.travel.vo.BaseCountryServeVo;
 
 import java.util.List;
@@ -14,5 +18,7 @@ public interface BaseCountryServeService extends IService<BaseCountryServe>{
 //服务国家树
     RPCBaseResponse<List<BaseCountryServeVo>> getCountryServeTree();
 //分页
-    RPCBaseResponse<List<BaseCountryServe>> getCountryServeCurrencyPageForm(BaseCountryServeDto dto);
+    RPCBaseResponse<IPage<BaseCountryServe>> getCountryServeCurrencyPageForm(BaseCountryServeDto dto);
+//更新国家状态
+    RPCBaseResponse<BaseCountryServeStatusVo> updateServeStatus(BaseCountryServeStatusDto entity);
 }

+ 53 - 7
edu-travel-service/edu-travel-service-country/src/main/java/edu/travel/country/service/impl/BaseCountryServeServiceImpl.java

@@ -2,6 +2,8 @@ package edu.travel.country.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 edu.travel.country.entity.BaseCountry;
 import edu.travel.country.entity.BaseCountryServe;
 import edu.travel.country.mapper.BaseCountryMapper;
@@ -9,8 +11,10 @@ import edu.travel.country.mapper.BaseCountryServeMapper;
 import edu.travel.country.mapper.ShopCurrencyMapper;
 import edu.travel.country.service.BaseCountryServeService;
 import edu.travel.dto.BaseCountryServeDto;
+import edu.travel.dto.BaseCountryServeStatusDto;
 import edu.travel.rpc.RPCBaseResponse;
 import edu.travel.service.SysServiceImpl;
+import edu.travel.vo.BaseCountryServeStatusVo;
 import edu.travel.vo.BaseCountryServeVo;
 
 import org.springframework.beans.BeanUtils;
@@ -18,23 +22,65 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.*;
+import java.util.stream.Collectors;
 
 @Service
 public class BaseCountryServeServiceImpl extends SysServiceImpl<BaseCountryServeMapper, BaseCountryServe> implements BaseCountryServeService {
     @Autowired
     private BaseCountryMapper baseCountryMapper;
+    @Autowired
+    private BaseCountryServeMapper baseCountryServeMapper;
 
 //分页连表
 @Override
-public RPCBaseResponse<List<BaseCountryServe>> getCountryServeCurrencyPageForm(BaseCountryServeDto dto) {
-    // 查询所有国家服务数据
+public RPCBaseResponse<IPage<BaseCountryServe>> getCountryServeCurrencyPageForm(BaseCountryServeDto dto) {
+    // 检查参数
+    if (dto.getCurrentPage() == null || dto.getPageSize() == null) {
+        return new RPCBaseResponse<>(400, "Current page and page size must not be null", null);
+    }
+
+    // 构建分页查询
+    Page<BaseCountryServe> page = new Page<>(dto.getCurrentPage(), dto.getPageSize());
+
+    // 创建查询条件
     LambdaQueryWrapper<BaseCountryServe> queryWrapper = new LambdaQueryWrapper<>();
-    // 查询所有的数据
-    List<BaseCountryServe> baseCountryServeList = super.getListLink(queryWrapper);
-    return new RPCBaseResponse <>(200, "SUCCESS", baseCountryServeList);
+    if (dto.getCountryId() != null) {
+        queryWrapper.eq(BaseCountryServe::getCountryId, dto.getCountryId());
+    }
+
+    // 执行分页查询
+    IPage<BaseCountryServe> countryServePage = super.getBaseMapper().selectPage(page, queryWrapper);
+
+    // 返回成功的响应
+    return new RPCBaseResponse<>(200, "SUCCESS", countryServePage);
 }
 
 
+
+    @Override
+    public RPCBaseResponse<BaseCountryServeStatusVo> updateServeStatus(BaseCountryServeStatusDto entity) {
+    //检查参数是否合法
+        if (entity.getId() == null) {
+            return new RPCBaseResponse<>(400, "Currency id is not null", null);
+        }
+        //创建对象,用于更新
+        BaseCountryServe baseCountryServe = new BaseCountryServe();
+        baseCountryServe.setId(entity.getId());
+        baseCountryServe.setServeEnable(entity.getServeEnable());
+        //执行更新操作
+        boolean success = super.updateById(baseCountryServe);
+        //检查是否更新成功
+        if (!success) {
+            return new RPCBaseResponse<>(500, "FAIL", null);
+        }
+        //创建返回的结果对象
+        BaseCountryServeStatusVo baseCountryServeStatusVo = new BaseCountryServeStatusVo();
+        BeanUtils.copyProperties(baseCountryServe, baseCountryServeStatusVo);
+        //返回成功的响应
+        return new RPCBaseResponse<>(200, "SUCCESS", baseCountryServeStatusVo);
+    }
+
+
     /**
      * 服务国家树
      * @return
@@ -71,12 +117,12 @@ public RPCBaseResponse<List<BaseCountryServe>> getCountryServeCurrencyPageForm(B
                 serveVo.setAreaCode(String.valueOf(country.getAreaCode()));
             }
 
-            serveMap.put(serve.getId(), serveVo);
+            serveMap.put(Long.valueOf(serve.getId()), serveVo);
         }
 
         // 构建树形结构
         for (BaseCountryServe serve : baseCountryServeList) {
-            Long parentId = serve.getParentId();
+            Long parentId = Long.valueOf(serve.getParentId());
             BaseCountryServeVo serveVo = serveMap.get(serve.getId());
 
             if (serveVo == null) {

+ 2 - 2
edu-travel-service/edu-travel-service-country/src/main/java/edu/travel/country/service/impl/BaseCountryServiceImpl.java

@@ -62,13 +62,13 @@ public class BaseCountryServiceImpl extends SysServiceImpl<BaseCountryMapper, Ba
             baseCountryVo.setCountryNameEn(baseCountry.getCountryNameEn());
             baseCountryVo.setCountryNameLocal(baseCountry.getCountryNameLocal());
             baseCountryVo.setAreaCode(String.valueOf(baseCountry.getAreaCode()));
-            countryMap.put(baseCountry.getId(),baseCountryVo);
+            countryMap.put(Long.valueOf(baseCountry.getId()),baseCountryVo);
         }
 
         //构建树形结构
         for (BaseCountry baseCountry : baseCountryList){
             BaseCountryVo baseCountryVo = countryMap.get(baseCountry.getId());
-            Long parentId = baseCountry.getParentId();
+            Long parentId = Long.valueOf(baseCountry.getParentId());
 
             if (parentId == 0|| parentId == null){
                 rootCountries.add(baseCountryVo);

+ 2 - 1
edu-travel-service/edu-travel-service-country/src/main/java/edu/travel/country/service/impl/ShopCurrencyServiceImpl.java

@@ -43,7 +43,7 @@ public class ShopCurrencyServiceImpl extends SysServiceImpl<ShopCurrencyMapper,
 
         // 创建一个 ShopCurrency 对象,用于更新
         ShopCurrency shopCurrency = new ShopCurrency();
-        shopCurrency.setId(shopCurrencyStatusDto.getId());
+        shopCurrency.setId(shopCurrencyStatusDto.getId()); // 保持 ID 为 String 类型
         shopCurrency.setStatus(shopCurrencyStatusDto.getStatus());
 
         // 执行更新操作
@@ -62,4 +62,5 @@ public class ShopCurrencyServiceImpl extends SysServiceImpl<ShopCurrencyMapper,
         return new RPCBaseResponse<>(200, "SUCCESS", shopCurrencyStatusVo);
     }
 
+
 }

+ 13 - 1
edu-travel-service/edu-travel-service-country/src/main/java/edu/travel/country/web/BaseCountryServeController.java

@@ -1,11 +1,15 @@
 package edu.travel.country.web;
 
 
+import cn.hutool.db.Page;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import edu.travel.country.entity.BaseCountryServe;
 import edu.travel.country.service.BaseCountryServeService;
 import edu.travel.dto.BaseCountryServeDto;
+import edu.travel.dto.BaseCountryServeStatusDto;
 import edu.travel.remote.BaseCountryServeRemoteController;
 import edu.travel.rpc.RPCBaseResponse;
+import edu.travel.vo.BaseCountryServeStatusVo;
 import edu.travel.vo.BaseCountryServeVo;
 import edu.travel.web.BaseController;
 import org.springframework.beans.BeanUtils;
@@ -33,9 +37,17 @@ public class BaseCountryServeController extends BaseController<BaseCountryServe>
      * 分页连表
      */
     @GetMapping("/getCountryServeCurrencyPageForm")
-    public RPCBaseResponse<List<BaseCountryServe>> getCountryServeCurrencyPageForm(BaseCountryServeDto dto) {
+    public RPCBaseResponse<IPage<BaseCountryServe>> getCountryServeCurrencyPageForm(BaseCountryServeDto dto) {
         return baseCountryServeService.getCountryServeCurrencyPageForm(dto);
     }
+    /**
+     * 服务国家状态更新
+     */
+    @PostMapping("/updateServeStatus")
+    public RPCBaseResponse<BaseCountryServeStatusVo> updateServeStatus(@RequestBody BaseCountryServeStatusDto entity) {
+        return baseCountryServeService.updateServeStatus(entity);
+    }
+
 
 
     /**