|
|
@@ -1,20 +1,12 @@
|
|
|
package org.springblade.gateway.active_gateway.controller;
|
|
|
|
|
|
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springblade.common.utils.IPUtils;
|
|
|
import org.springblade.core.boot.ctrl.BladeController;
|
|
|
-import org.springblade.core.log.annotation.ApiLog;
|
|
|
-import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.gateway.active_gateway.service.AppActiveProductService;
|
|
|
-import org.springblade.sing.active.entity.ActiveHelpRecord;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
-
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
-import javax.validation.Valid;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
/**
|
|
|
* @Author: Silent
|
|
|
@@ -30,23 +22,23 @@ import javax.validation.Valid;
|
|
|
public class AppActiveProductController extends BladeController {
|
|
|
private AppActiveProductService activeService;
|
|
|
|
|
|
- /**
|
|
|
- * 作品助力
|
|
|
- */
|
|
|
- @ApiLog("作品助力")
|
|
|
- @PostMapping("/productHelp")
|
|
|
- @ApiOperationSupport(order = 1)
|
|
|
- @ApiOperation(value = "作品助力", notes = "传入activeHelpRecord")
|
|
|
- public R<String> productHelp(@Valid ActiveHelpRecord activeHelpRecord, HttpServletRequest request){
|
|
|
- try {
|
|
|
- //获取用户IP地址
|
|
|
- activeHelpRecord.setIp(IPUtils.getRealIp(request));
|
|
|
- activeService.activeHelp(activeHelpRecord);
|
|
|
- return R.success("助力成功!");
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(e.getMessage());
|
|
|
- return R.fail(e.getMessage());
|
|
|
- }
|
|
|
- }
|
|
|
+// /**
|
|
|
+// * 作品助力
|
|
|
+// */
|
|
|
+// @ApiLog("作品助力")
|
|
|
+// @PostMapping("/productHelp")
|
|
|
+// @ApiOperationSupport(order = 1)
|
|
|
+// @ApiOperation(value = "作品助力", notes = "传入activeHelpRecord")
|
|
|
+// public R<String> productHelp(@Valid ActiveHelpRecord activeHelpRecord, HttpServletRequest request){
|
|
|
+// try {
|
|
|
+// //获取用户IP地址
|
|
|
+// activeHelpRecord.setIp(IPUtils.getRealIp(request));
|
|
|
+// activeService.activeHelp(activeHelpRecord);
|
|
|
+// return R.success("助力成功!");
|
|
|
+// } catch (Exception e) {
|
|
|
+// log.error(e.getMessage());
|
|
|
+// return R.fail(e.getMessage());
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
}
|