|
@@ -5,7 +5,6 @@ import com.tzld.longarticle.recommend.server.common.enums.GhTypeEnum;
|
|
|
import com.tzld.longarticle.recommend.server.common.response.CommonResponse;
|
|
|
import com.tzld.longarticle.recommend.server.model.vo.GhDetailVo;
|
|
|
import com.tzld.longarticle.recommend.server.model.vo.GhTypeVo;
|
|
|
-import com.tzld.longarticle.recommend.server.repository.model.GhDetail;
|
|
|
import com.tzld.longarticle.recommend.server.service.exterior.GhDetailService;
|
|
|
import com.tzld.longarticle.recommend.server.util.page.Page;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -18,36 +17,36 @@ import java.util.stream.Collectors;
|
|
|
|
|
|
@Slf4j
|
|
|
@RestController
|
|
|
-@RequestMapping("/gh")
|
|
|
-public class GhDetailController {
|
|
|
+@RequestMapping("/account")
|
|
|
+public class AccountDetailController {
|
|
|
|
|
|
@Autowired
|
|
|
private GhDetailService ghDetailService;
|
|
|
|
|
|
@GetMapping("/getList")
|
|
|
- public CommonResponse<Page<GhDetailVo>> getGhDetailList(@RequestParam Integer pageNum,
|
|
|
+ public CommonResponse<Page<GhDetailVo>> getAccountDetailList(@RequestParam Integer pageNum,
|
|
|
@RequestParam Integer pageSize,
|
|
|
@RequestParam(defaultValue = "") String accountId) {
|
|
|
return ghDetailService.getGhDetailList(pageNum, pageSize, accountId);
|
|
|
}
|
|
|
|
|
|
@PostMapping("/add")
|
|
|
- public CommonResponse<Void> addGhDetail(@RequestBody GhDetailVo detailVo) {
|
|
|
+ public CommonResponse<Void> addAccountDetail(@RequestBody GhDetailVo detailVo) {
|
|
|
return ghDetailService.addGhDetail(detailVo);
|
|
|
}
|
|
|
|
|
|
@PostMapping("/update")
|
|
|
- public CommonResponse<Void> updateGhDetail(@RequestBody GhDetailVo detailVo) {
|
|
|
+ public CommonResponse<Void> updateAccountDetail(@RequestBody GhDetailVo detailVo) {
|
|
|
return ghDetailService.updateDetail(detailVo);
|
|
|
}
|
|
|
|
|
|
@GetMapping("/refresh")
|
|
|
- public CommonResponse<Void> refreshGhDetail() {
|
|
|
+ public CommonResponse<Void> refreshAccountDetail() {
|
|
|
return ghDetailService.refreshGhDetail();
|
|
|
}
|
|
|
|
|
|
@GetMapping("/types")
|
|
|
- public CommonResponse<List<GhTypeVo>> getAllGhTypes() {
|
|
|
+ public CommonResponse<List<GhTypeVo>> getAllAccountTypes() {
|
|
|
return CommonResponse.success(Arrays.stream(GhTypeEnum.values())
|
|
|
.map(ghTypeEnum -> new GhTypeVo(ghTypeEnum.type, ghTypeEnum.name))
|
|
|
.collect(Collectors.toList()));
|