6 changed files with 280 additions and 0 deletions
@ -0,0 +1,58 @@ |
|||||
|
package com.elink.esua.epdc.controller; |
||||
|
|
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
||||
|
import com.elink.esua.epdc.dto.category.EventCategoryDTO; |
||||
|
import com.elink.esua.epdc.dto.comment.form.WorkCommentReplyFormDTO; |
||||
|
import com.elink.esua.epdc.dto.comment.result.WorkEventsCommentsDTO; |
||||
|
import com.elink.esua.epdc.dto.events.EpdcEventsDetailDTO; |
||||
|
import com.elink.esua.epdc.dto.events.form.EpdcEventsReviewFormDTO; |
||||
|
import com.elink.esua.epdc.dto.form.ExchangedCheckFormDTO; |
||||
|
import com.elink.esua.epdc.dto.form.ExchangedListFormDTO; |
||||
|
import com.elink.esua.epdc.dto.issue.form.*; |
||||
|
import com.elink.esua.epdc.dto.issue.result.*; |
||||
|
import com.elink.esua.epdc.dto.result.ExchangedCheckResultDTO; |
||||
|
import com.elink.esua.epdc.dto.result.ExchangedListResultDTO; |
||||
|
import com.elink.esua.epdc.service.WorkIssueService; |
||||
|
import com.elink.esua.epdc.service.WorkPointsService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 工作端-议题管理模块 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("work/points") |
||||
|
public class ApiWorkPointsController { |
||||
|
|
||||
|
@Autowired |
||||
|
private WorkPointsService workPointsService; |
||||
|
|
||||
|
/** |
||||
|
* 工作端-核销记录 |
||||
|
* @param formDto |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("getExchangedList") |
||||
|
public Result<List<ExchangedListResultDTO>> getExchangedList(ExchangedListFormDTO formDto) { |
||||
|
return workPointsService.getExchangedList(formDto); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 工作端-兑换核销 |
||||
|
* @param formDto |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("exchangedCheck") |
||||
|
public Result<ExchangedCheckResultDTO> exchangedCheck(ExchangedCheckFormDTO formDto){ |
||||
|
return workPointsService.exchangedCheck(formDto); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,54 @@ |
|||||
|
package com.elink.esua.epdc.feign; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.config.FeignRequestInterceptor; |
||||
|
import com.elink.esua.epdc.dto.EventDeptFormDTO; |
||||
|
import com.elink.esua.epdc.dto.form.ExchangedCheckFormDTO; |
||||
|
import com.elink.esua.epdc.dto.form.ExchangedListFormDTO; |
||||
|
import com.elink.esua.epdc.dto.item.ItemEvaluateDeptDTO; |
||||
|
import com.elink.esua.epdc.dto.item.form.*; |
||||
|
import com.elink.esua.epdc.dto.item.result.*; |
||||
|
import com.elink.esua.epdc.dto.result.ExchangedCheckResultDTO; |
||||
|
import com.elink.esua.epdc.dto.result.ExchangedListResultDTO; |
||||
|
import com.elink.esua.epdc.feign.fallback.WorkItemFeignClientFallback; |
||||
|
import com.elink.esua.epdc.feign.fallback.WorkPointsFeignClientFallback; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.http.MediaType; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 项目模块调用-移动app端 |
||||
|
* @Author LPF |
||||
|
* @Date 2019/11/18 16:39 |
||||
|
*/ |
||||
|
@FeignClient(name = ServiceConstant.EPDC_POINTS_SERVER, fallback = WorkPointsFeignClientFallback.class, configuration = FeignRequestInterceptor.class |
||||
|
,url = "http://127.0.0.1:9070" |
||||
|
) |
||||
|
public interface WorkPointsFeignClient { |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 工作端-核销记录 |
||||
|
* @Params: [formDto] |
||||
|
* @Author: wgf |
||||
|
* @Date: 2021/9/28 11:39 |
||||
|
*/ |
||||
|
@GetMapping(value = "points/appAcitve/getExchangedList", consumes = MediaType.APPLICATION_JSON_VALUE) |
||||
|
Result<List<ExchangedListResultDTO>> getExchangedList(ExchangedListFormDTO formDto); |
||||
|
|
||||
|
/** |
||||
|
* 工作端-兑换核销 |
||||
|
* @Params: [formDto] |
||||
|
* @Author: wgf |
||||
|
* @Date: 2021/9/28 11:39 |
||||
|
*/ |
||||
|
@GetMapping(value = "points/appAcitve/exchangedCheck", consumes = MediaType.APPLICATION_JSON_VALUE) |
||||
|
Result<ExchangedCheckResultDTO> exchangedCheck(ExchangedCheckFormDTO formDto); |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,39 @@ |
|||||
|
package com.elink.esua.epdc.feign.fallback; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.dto.EventDeptFormDTO; |
||||
|
import com.elink.esua.epdc.dto.form.ExchangedCheckFormDTO; |
||||
|
import com.elink.esua.epdc.dto.form.ExchangedListFormDTO; |
||||
|
import com.elink.esua.epdc.dto.item.ItemEvaluateDeptDTO; |
||||
|
import com.elink.esua.epdc.dto.item.form.*; |
||||
|
import com.elink.esua.epdc.dto.item.result.*; |
||||
|
import com.elink.esua.epdc.dto.result.ExchangedCheckResultDTO; |
||||
|
import com.elink.esua.epdc.dto.result.ExchangedListResultDTO; |
||||
|
import com.elink.esua.epdc.feign.WorkItemFeignClient; |
||||
|
import com.elink.esua.epdc.feign.WorkPointsFeignClient; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author wgf |
||||
|
* @Date 2021/9/28 11:39 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class WorkPointsFeignClientFallback implements WorkPointsFeignClient { |
||||
|
|
||||
|
@Override |
||||
|
public Result<List<ExchangedListResultDTO>> getExchangedList(ExchangedListFormDTO formDto) { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.EPDC_POINTS_SERVER, "getExchangedList", formDto); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Result<ExchangedCheckResultDTO> exchangedCheck(ExchangedCheckFormDTO formDto) { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.EPDC_POINTS_SERVER, "exchangedCheck", formDto); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,53 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.service; |
||||
|
|
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.dto.category.EventCategoryDTO; |
||||
|
import com.elink.esua.epdc.dto.comment.form.WorkCommentReplyFormDTO; |
||||
|
import com.elink.esua.epdc.dto.comment.result.WorkEventsCommentsDTO; |
||||
|
import com.elink.esua.epdc.dto.events.EpdcEventsDetailDTO; |
||||
|
import com.elink.esua.epdc.dto.events.form.EpdcEventsReviewFormDTO; |
||||
|
import com.elink.esua.epdc.dto.form.ExchangedCheckFormDTO; |
||||
|
import com.elink.esua.epdc.dto.form.ExchangedListFormDTO; |
||||
|
import com.elink.esua.epdc.dto.issue.form.*; |
||||
|
import com.elink.esua.epdc.dto.issue.result.*; |
||||
|
import com.elink.esua.epdc.dto.result.ExchangedCheckResultDTO; |
||||
|
import com.elink.esua.epdc.dto.result.ExchangedListResultDTO; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface WorkPointsService { |
||||
|
|
||||
|
/** |
||||
|
* 工作端-核销记录 |
||||
|
* @param formDto |
||||
|
* @return |
||||
|
*/ |
||||
|
Result<List<ExchangedListResultDTO>> getExchangedList(ExchangedListFormDTO formDto); |
||||
|
|
||||
|
/** |
||||
|
* 工作端-兑换核销 |
||||
|
* @param formDto |
||||
|
* @return |
||||
|
*/ |
||||
|
Result<ExchangedCheckResultDTO> exchangedCheck(ExchangedCheckFormDTO formDto); |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,70 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.service.impl; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.dto.category.EventCategoryDTO; |
||||
|
import com.elink.esua.epdc.dto.comment.form.WorkCommentReplyFormDTO; |
||||
|
import com.elink.esua.epdc.dto.comment.result.WorkEventsCommentsDTO; |
||||
|
import com.elink.esua.epdc.dto.events.EpdcEventsDetailDTO; |
||||
|
import com.elink.esua.epdc.dto.events.form.EpdcEventsReviewFormDTO; |
||||
|
import com.elink.esua.epdc.dto.form.ExchangedCheckFormDTO; |
||||
|
import com.elink.esua.epdc.dto.form.ExchangedListFormDTO; |
||||
|
import com.elink.esua.epdc.dto.issue.form.*; |
||||
|
import com.elink.esua.epdc.dto.issue.result.*; |
||||
|
import com.elink.esua.epdc.dto.result.ExchangedCheckResultDTO; |
||||
|
import com.elink.esua.epdc.dto.result.ExchangedListResultDTO; |
||||
|
import com.elink.esua.epdc.feign.WorkIssueFeignClient; |
||||
|
import com.elink.esua.epdc.feign.WorkPointsFeignClient; |
||||
|
import com.elink.esua.epdc.service.WorkIssueService; |
||||
|
import com.elink.esua.epdc.service.WorkPointsService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
@Service |
||||
|
public class WorkPointsServiceImpl implements WorkPointsService { |
||||
|
|
||||
|
@Autowired |
||||
|
private WorkPointsFeignClient workPointsFeignClient; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 工作端-核销记录 |
||||
|
* @param formDto |
||||
|
* @return |
||||
|
*/ |
||||
|
@Override |
||||
|
public Result<List<ExchangedListResultDTO>> getExchangedList(ExchangedListFormDTO formDto) { |
||||
|
return workPointsFeignClient.getExchangedList(formDto); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 工作端-兑换核销 |
||||
|
* @param formDto |
||||
|
* @return |
||||
|
*/ |
||||
|
@Override |
||||
|
public Result<ExchangedCheckResultDTO> exchangedCheck(ExchangedCheckFormDTO formDto) { |
||||
|
return workPointsFeignClient.exchangedCheck(formDto); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
Loading…
Reference in new issue