feat(新增-首页接口管理): 获取首页数据-修复SQL语句写错
Signed-off-by: bunny <1319900154@qq.com>
This commit is contained in:
parent
e648c9b1ee
commit
52004cf2ba
|
@ -23,9 +23,9 @@ spring:
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
com.atguigu.mapper: debug
|
com.atguigu.spzx.manger.mapper: debug
|
||||||
com.atguigu.controller: info
|
com.atguigu.spzx.manger.controller: info
|
||||||
com.atguigu.service: info
|
com.atguigu.spzx.manger.service: info
|
||||||
pattern:
|
pattern:
|
||||||
dateformat: HH:mm:ss:SSS
|
dateformat: HH:mm:ss:SSS
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -9,6 +9,7 @@ import com.atguigu.spzx.model.vo.result.Result;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
@ -18,6 +19,7 @@ import java.util.List;
|
||||||
@Tag(name = "首页接口管理")
|
@Tag(name = "首页接口管理")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/api/product/index")
|
@RequestMapping(value = "/api/product/index")
|
||||||
|
@CrossOrigin
|
||||||
public class IndexController {
|
public class IndexController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private CategoryService categoryService;
|
private CategoryService categoryService;
|
||||||
|
|
|
@ -17,6 +17,20 @@ spring:
|
||||||
username: ${bunny.datasource.username}
|
username: ${bunny.datasource.username}
|
||||||
password: "${bunny.datasource.password}"
|
password: "${bunny.datasource.password}"
|
||||||
|
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
com.atguigu.product.mapper: debug
|
||||||
|
com.atguigu.product.controller: info
|
||||||
|
com.atguigu.product.service: info
|
||||||
|
pattern:
|
||||||
|
dateformat: HH:mm:ss:SSS
|
||||||
|
file:
|
||||||
|
path: "logs/${spring.application.name}"
|
||||||
|
|
||||||
mybatis:
|
mybatis:
|
||||||
config-location: classpath:mybatis-config.xml
|
type-aliases-package: com.atguigu.spzx.model
|
||||||
mapper-locations: classpath:/mapper/*/*.xml
|
mapper-locations: classpath:/mapper/*/*.xml
|
||||||
|
configuration:
|
||||||
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
|
map-underscore-to-camel-case: true
|
||||||
|
auto-mapping-behavior: full
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<contextName>logback</contextName>
|
<contextName>logback</contextName>
|
||||||
|
|
||||||
<!-- 日志的输出目录 -->
|
<!-- 日志的输出目录 -->
|
||||||
<property name="log.path" value="logs//spzx-manager//logs"/>
|
<property name="log.path" value="logs/service-product/logs"/>
|
||||||
|
|
||||||
<!--控制台日志格式:彩色日志-->
|
<!--控制台日志格式:彩色日志-->
|
||||||
<!-- magenta:洋红 -->
|
<!-- magenta:洋红 -->
|
||||||
|
|
|
@ -11,7 +11,9 @@
|
||||||
select
|
select
|
||||||
<include refid="columns"/>
|
<include refid="columns"/>
|
||||||
from category
|
from category
|
||||||
where is_deleted = 0
|
where parent_id = 0
|
||||||
and parent_id = #{parentId} order by id
|
and status = 1
|
||||||
|
and is_deleted = 0
|
||||||
|
order by order_num
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue