|
|
@@ -69,10 +69,10 @@ public class StoreProductGymController {
|
|
|
@ApiOperation("删除运动健身商品")
|
|
|
@ApiOperationSupport(order = 3)
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", paramType = "path", required = true)
|
|
|
+ @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Integer", paramType = "path", required = true)
|
|
|
})
|
|
|
@DeleteMapping("/{id}")
|
|
|
- public R<String> deleteGym(@PathVariable("id") Long id) {
|
|
|
+ public R<String> deleteGym(@PathVariable("id") Integer id) {
|
|
|
log.info("StoreProductGymController.deleteGym?id={}", id);
|
|
|
R<Boolean> result = storeProductGymService.deleteStoreProductGym(id);
|
|
|
if (result.getCode() == 200) {
|
|
|
@@ -84,10 +84,10 @@ public class StoreProductGymController {
|
|
|
@ApiOperation("根据ID查询运动健身商品详情")
|
|
|
@ApiOperationSupport(order = 4)
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", paramType = "path", required = true)
|
|
|
+ @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Integer", paramType = "path", required = true)
|
|
|
})
|
|
|
@GetMapping("/{id}")
|
|
|
- public R<StoreProductGym> getById(@PathVariable("id") Long id) {
|
|
|
+ public R<StoreProductGym> getById(@PathVariable("id") Integer id) {
|
|
|
log.info("StoreProductGymController.getById?id={}", id);
|
|
|
R<StoreProductGym> result = storeProductGymService.getStoreProductGymById(id);
|
|
|
if (result.getCode() == 200 && result.getData() != null) {
|
|
|
@@ -104,7 +104,7 @@ public class StoreProductGymController {
|
|
|
@ApiImplicitParam(name = "name", value = "名称(模糊查询)", dataType = "String", paramType = "query"),
|
|
|
@ApiImplicitParam(name = "classMode", value = "上课形式", dataType = "String", paramType = "query"),
|
|
|
@ApiImplicitParam(name = "status", value = "状态(0:禁用,1:启用)", dataType = "Integer", paramType = "query"),
|
|
|
- @ApiImplicitParam(name = "extId", value = "商品表主键", dataType = "Long", paramType = "query")
|
|
|
+ @ApiImplicitParam(name = "extId", value = "商品表主键", dataType = "Integer", paramType = "query")
|
|
|
})
|
|
|
@GetMapping("/page")
|
|
|
public R<IPage<StoreProductGym>> getPage(
|
|
|
@@ -113,7 +113,7 @@ public class StoreProductGymController {
|
|
|
@RequestParam(required = false) String name,
|
|
|
@RequestParam(required = false) String classMode,
|
|
|
@RequestParam(required = false) Integer status,
|
|
|
- @RequestParam(required = false) Long extId) {
|
|
|
+ @RequestParam(required = false) Integer extId) {
|
|
|
log.info("StoreProductGymController.getPage?pageNum={}, pageSize={}, name={}, classMode={}, status={}, extId={}",
|
|
|
pageNum, pageSize, name, classMode, status, extId);
|
|
|
IPage<StoreProductGym> page = storeProductGymService.getPage(pageNum, pageSize, name, classMode, status, extId);
|
|
|
@@ -123,7 +123,7 @@ public class StoreProductGymController {
|
|
|
@ApiOperation("批量删除运动健身商品")
|
|
|
@ApiOperationSupport(order = 6)
|
|
|
@PostMapping("/batchDelete")
|
|
|
- public R<String> deleteBatch(@RequestBody List<Long> ids) {
|
|
|
+ public R<String> deleteBatch(@RequestBody List<Integer> ids) {
|
|
|
log.info("StoreProductGymController.deleteBatch?ids={}", ids);
|
|
|
if (ids == null || ids.isEmpty()) {
|
|
|
return R.fail("ID列表不能为空");
|
|
|
@@ -138,12 +138,12 @@ public class StoreProductGymController {
|
|
|
@ApiOperation("更新运动健身商品状态")
|
|
|
@ApiOperationSupport(order = 7)
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", paramType = "path", required = true),
|
|
|
+ @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Integer", paramType = "path", required = true),
|
|
|
@ApiImplicitParam(name = "status", value = "状态(0:禁用,1:启用)", dataType = "Integer", paramType = "query", required = true)
|
|
|
})
|
|
|
@PutMapping("/{id}/status")
|
|
|
public R<String> updateStatus(
|
|
|
- @PathVariable("id") Long id,
|
|
|
+ @PathVariable("id") Integer id,
|
|
|
@RequestParam("status") Integer status) {
|
|
|
log.info("StoreProductGymController.updateStatus?id={}, status={}", id, status);
|
|
|
if (status == null || (status != 0 && status != 1)) {
|
|
|
@@ -159,10 +159,10 @@ public class StoreProductGymController {
|
|
|
@ApiOperation("根据商品表主键查询运动健身商品列表")
|
|
|
@ApiOperationSupport(order = 8)
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "extId", value = "商品表主键", dataType = "Long", paramType = "query", required = true)
|
|
|
+ @ApiImplicitParam(name = "extId", value = "商品表主键", dataType = "Integer", paramType = "query", required = true)
|
|
|
})
|
|
|
@GetMapping("/listByExtId")
|
|
|
- public R<List<StoreProductGym>> getListByExtId(@RequestParam("extId") Long extId) {
|
|
|
+ public R<List<StoreProductGym>> getListByExtId(@RequestParam("extId") Integer extId) {
|
|
|
log.info("StoreProductGymController.getListByExtId?extId={}", extId);
|
|
|
List<StoreProductGym> list = storeProductGymService.getListByExtId(extId);
|
|
|
return R.data(list);
|