目录
package com.goalias.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* </p>
*
* @author 高文升
* @since 2021-12-22
*/
@RestController
@RequestMapping("/blog-comments")
public class BlogCommentsController {
}
package com.goalias.controller;
import com.goalias.dto.Result;
import com.goalias.entity.ShopType;
import com.goalias.service.IShopTypeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* <p>
* </p>
*
* @author 高文升
*/
@RestController
@RequestMapping("/shop-type")
public class ShopTypeController {
@Resource
private IShopTypeService typeService;
@GetMapping("list")
public Result queryTypeList() {
List<ShopType> typeList = typeService
.query().orderByAsc("sort").list();
return Result.ok(typeList);
}
}