|
@@ -1,22 +1,20 @@
|
|
|
package edu.travel.commodity.web;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import edu.travel.commodity.dto.BaseCountryDto;
|
|
|
import edu.travel.commodity.dto.BaseCountryServeDTO;
|
|
|
import edu.travel.commodity.entity.BaseCountryServe;
|
|
|
import edu.travel.commodity.remote.BaseCountryServeRemoteController;
|
|
|
import edu.travel.commodity.service.BaseCountryServeService;
|
|
|
import edu.travel.commodity.vo.BaseCountryServeVo;
|
|
|
-import edu.travel.interfaces.UpdateGroups;
|
|
|
-import edu.travel.resp.BaseResponse;
|
|
|
import edu.travel.rpc.RPCBaseResponse;
|
|
|
-import edu.travel.utils.tree.CustomDeepCopy;
|
|
|
import edu.travel.web.BaseController;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
-import org.springframework.validation.Errors;
|
|
|
-import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* 服务国家表(base_country_serve)表控制层
|
|
|
*
|
|
@@ -39,4 +37,53 @@ public class BaseCountryServeController extends BaseController<BaseCountryServe
|
|
|
RPCBaseResponse baseResponse = super.getById(id);
|
|
|
return baseResponse;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @GetMapping("/getFormId")
|
|
|
+ public RPCBaseResponse<BaseCountryServeVo> getFormId(String id) {
|
|
|
+ RPCBaseResponse<BaseCountryServe> byId = super.getById(id);
|
|
|
+ RPCBaseResponse<BaseCountryServeVo> baseCountryServeVoRPCBaseResponse = new RPCBaseResponse<>();
|
|
|
+ BeanUtils.copyProperties(byId, baseCountryServeVoRPCBaseResponse);
|
|
|
+ return baseCountryServeVoRPCBaseResponse;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @PostMapping("/updateFormId")
|
|
|
+ public RPCBaseResponse<BaseCountryServeVo> updateTargetFormId(BaseCountryDto entity) {
|
|
|
+ BaseCountryServe baseCountryServe = new BaseCountryServe();
|
|
|
+ BeanUtils.copyProperties(entity, baseCountryServe);
|
|
|
+ RPCBaseResponse<BaseCountryServe> baseCountryServeRPCBaseResponse = super.updateTargetById(baseCountryServe);
|
|
|
+ RPCBaseResponse<BaseCountryServeVo> baseCountryServeVoRPCBaseResponse = new RPCBaseResponse<>();
|
|
|
+ BeanUtils.copyProperties(baseCountryServeRPCBaseResponse, baseCountryServeVoRPCBaseResponse);
|
|
|
+ return baseCountryServeVoRPCBaseResponse;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @PostMapping("/saveForm")
|
|
|
+ public RPCBaseResponse<BaseCountryServeVo> saveFormTarget(BaseCountryDto entity) {
|
|
|
+ BaseCountryServe baseCountryServe = new BaseCountryServe();
|
|
|
+ BeanUtils.copyProperties(entity, baseCountryServe);
|
|
|
+ RPCBaseResponse<BaseCountryServe> baseCountryServeRPCBaseResponse = super.saveTarget(baseCountryServe);
|
|
|
+ RPCBaseResponse<BaseCountryServeVo> baseCountryServeVoRPCBaseResponse = new RPCBaseResponse<>();
|
|
|
+ BeanUtils.copyProperties(baseCountryServeRPCBaseResponse, baseCountryServeVoRPCBaseResponse);
|
|
|
+ return baseCountryServeVoRPCBaseResponse;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @PostMapping("/deleteFormId")
|
|
|
+ public RPCBaseResponse<BaseCountryServeVo> deleteTargetFormId(@RequestBody List<String> ids) {
|
|
|
+ RPCBaseResponse<BaseCountryServe> baseCountryServeRPCBaseResponse = super.deleteTargetById(ids);
|
|
|
+ RPCBaseResponse<BaseCountryServeVo> baseCountryServeVoRPCBaseResponse = new RPCBaseResponse<>();
|
|
|
+ BeanUtils.copyProperties(baseCountryServeRPCBaseResponse, baseCountryServeVoRPCBaseResponse);
|
|
|
+ return baseCountryServeVoRPCBaseResponse;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @GetMapping("/listForm")
|
|
|
+ public RPCBaseResponse<List<BaseCountryServeVo>> getAllForm() {
|
|
|
+ RPCBaseResponse<List<BaseCountryServe>> listRPCBaseResponse = super.listAll();
|
|
|
+ RPCBaseResponse<List<BaseCountryServeVo>> baseCountryServeVoRPCBaseResponse = new RPCBaseResponse<>();
|
|
|
+ BeanUtils.copyProperties(listRPCBaseResponse, baseCountryServeVoRPCBaseResponse);
|
|
|
+ return baseCountryServeVoRPCBaseResponse;
|
|
|
+ }
|
|
|
}
|