ymnets 5 months ago
parent 785f396d5d
commit cf3285b9cd

@ -5,16 +5,9 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="ef55dc1b-11d9-4203-81db-14a06469a368" name="更改" comment=""> <list default="true" id="ef55dc1b-11d9-4203-81db-14a06469a368" name="更改" comment="">
<change afterPath="$PROJECT_DIR$/gp-web/src/main/java/com/hc/gpweb/controller/front/FrontBannerController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gp-business/src/main/java/com/hc/gpbusiness/dto/WebNewsDto.java" beforeDir="false" afterPath="$PROJECT_DIR$/gp-business/src/main/java/com/hc/gpbusiness/dto/WebNewsDto.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/gp-web/src/main/java/com/hc/gpweb/controller/api/BannerController.java" beforeDir="false" afterPath="$PROJECT_DIR$/gp-web/src/main/java/com/hc/gpweb/controller/api/BannerController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gp-business/src/main/java/com/hc/gpbusiness/model/WebBanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/gp-business/src/main/java/com/hc/gpbusiness/model/WebBanner.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gp-business/src/main/java/com/hc/gpbusiness/model/WebNews.java" beforeDir="false" afterPath="$PROJECT_DIR$/gp-business/src/main/java/com/hc/gpbusiness/model/WebNews.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gp-business/src/main/java/com/hc/gpbusiness/service/impl/WebCourseServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/gp-business/src/main/java/com/hc/gpbusiness/service/impl/WebCourseServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gp-business/src/main/java/com/hc/gpbusiness/service/impl/WebNewsServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/gp-business/src/main/java/com/hc/gpbusiness/service/impl/WebNewsServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gp-business/src/main/resources/mapper/WebBannerMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/gp-business/src/main/resources/mapper/WebBannerMapper.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gp-business/src/main/resources/mapper/WebCourseMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/gp-business/src/main/resources/mapper/WebCourseMapper.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gp-business/src/main/resources/mapper/WebNewsMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/gp-business/src/main/resources/mapper/WebNewsMapper.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gp-web/src/main/java/com/hc/gpweb/aspect/BackUserAspect.java" beforeDir="false" afterPath="$PROJECT_DIR$/gp-web/src/main/java/com/hc/gpweb/aspect/BackUserAspect.java" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -34,6 +27,9 @@
</MavenGeneralSettings> </MavenGeneralSettings>
</option> </option>
</component> </component>
<component name="MavenRunner">
<option name="skipTests" value="true" />
</component>
<component name="ProjectId" id="2oDAA2oK6oQGcBxkVPnVT6SNIvT" /> <component name="ProjectId" id="2oDAA2oK6oQGcBxkVPnVT6SNIvT" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true"> <component name="ProjectLevelVcsManager" settingsEditedManually="true">
<ConfirmationsSetting value="2" id="Add" /> <ConfirmationsSetting value="2" id="Add" />
@ -70,11 +66,11 @@
<recent name="F:\02.FNSProject\政采\JAVA_MYSQL_WEBSITE\gp-business\src\main\resources\mapper" /> <recent name="F:\02.FNSProject\政采\JAVA_MYSQL_WEBSITE\gp-business\src\main\resources\mapper" />
</key> </key>
<key name="CopyClassDialog.RECENTS_KEY"> <key name="CopyClassDialog.RECENTS_KEY">
<recent name="com.hc.gpweb.controller.front" />
<recent name="com.hc.gpweb.controller.back" /> <recent name="com.hc.gpweb.controller.back" />
<recent name="com.hc.gpbusiness.dto" /> <recent name="com.hc.gpbusiness.dto" />
<recent name="com.hc.gpbusiness.service" /> <recent name="com.hc.gpbusiness.service" />
<recent name="com.hc.gpbusiness.service.impl" /> <recent name="com.hc.gpbusiness.service.impl" />
<recent name="com.hc.gpbusiness.mapper" />
</key> </key>
</component> </component>
<component name="RunManager"> <component name="RunManager">
@ -103,7 +99,8 @@
<workItem from="1730686222084" duration="14019000" /> <workItem from="1730686222084" duration="14019000" />
<workItem from="1730707640328" duration="6890000" /> <workItem from="1730707640328" duration="6890000" />
<workItem from="1730768520960" duration="2315000" /> <workItem from="1730768520960" duration="2315000" />
<workItem from="1730775057656" duration="169000" /> <workItem from="1730775057656" duration="322000" />
<workItem from="1730786878796" duration="291000" />
</task> </task>
<task id="LOCAL-00001" summary="更改表名字"> <task id="LOCAL-00001" summary="更改表名字">
<created>1730470371982</created> <created>1730470371982</created>
@ -119,7 +116,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1730697159202</updated> <updated>1730697159202</updated>
</task> </task>
<option name="localTasksCounter" value="3" /> <task id="LOCAL-00003" summary="官网优化">
<created>1730775248144</created>
<option name="number" value="00003" />
<option name="presentableId" value="LOCAL-00003" />
<option name="project" value="LOCAL" />
<updated>1730775248145</updated>
</task>
<option name="localTasksCounter" value="4" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
@ -127,6 +131,7 @@
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value="更改表名字" /> <MESSAGE value="更改表名字" />
<option name="LAST_COMMIT_MESSAGE" value="更改表名字" /> <MESSAGE value="官网优化" />
<option name="LAST_COMMIT_MESSAGE" value="官网优化" />
</component> </component>
</project> </project>

@ -36,23 +36,6 @@ public class BannerController {
return Result.success(this.bannerService.queryById(id)); return Result.success(this.bannerService.queryById(id));
} }
@PostMapping("/insert")
@ApiOperation(value = "新增 WebBanner", response = Result.class)
public Result addWebBanner(@Valid @RequestBody WebBanner banner) {
return Result.success(bannerService.insert(banner));
}
@PutMapping("/update")
@ApiOperation(value = "修改 WebBanner", response = Result.class)
public Result updateWebBanner(@RequestBody WebBanner banner) {
return Result.success(bannerService.update(banner));
}
@DeleteMapping("/delete/{id}")
@ApiOperation(value = "依据主键删除 WebBanner", response = Result.class)
public Result deleteWebBanner(@PathVariable("id") Integer id) {
return Result.success(bannerService.deleteById(id));
}
@GetMapping("/list") @GetMapping("/list")
@ApiOperation(value = "获取 WebBanner列表(分页)", response = Result.class) @ApiOperation(value = "获取 WebBanner列表(分页)", response = Result.class)

@ -0,0 +1,48 @@
package com.hc.gpweb.controller.front;
import com.hc.gpbusiness.model.WebBanner;
import com.hc.gpbusiness.service.WebBannerService;
import com.hc.gpcore.utils.result.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
/**
* 广
* (WebBanner)
*
* @author java
* @since 2020-07-29 16:23:04
*/
@RestController
@RequestMapping("/api/front/banner")
public class FrontBannerController {
/**
*
*/
private final WebBannerService bannerService;
public FrontBannerController(WebBannerService bannerService) {
this.bannerService = bannerService;
}
@GetMapping("/{id}")
@ApiOperation(value = "依据主键获取 WebBanner", response = Result.class)
public Result selectWebBanner(@PathVariable("id") Integer id) {
return Result.success(this.bannerService.queryById(id));
}
@GetMapping("/list")
@ApiOperation(value = "获取 WebBanner列表(分页)", response = Result.class)
public Result listWebBanner(@RequestParam(defaultValue = "0") Integer page,
@RequestParam(defaultValue = "0") Integer size) {
return Result.success(bannerService.queryAllByLimit(page, size));
}
}
Loading…
Cancel
Save