Commit 0424e141 by 郑云飞

init

parent f24e8652
package com.ruoyi;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
......@@ -11,8 +10,7 @@ import org.springframework.context.annotation.ComponentScan;
*
* @author ruoyi
*/
@MapperScan({ "com.ruoyi.*", "com.yongqi.*" })
@ComponentScan({ "com.ruoyi.*", "com.yongqi.*" })
@ComponentScan({"com.ruoyi.*", "com.yongqi.*"})
@SpringBootApplication
public class RuoYiApplication {
......
......@@ -142,7 +142,7 @@ security:
mybatis-plus:
# 不支持多包, 如有需要可在注解配置 或 提升扫包等级
# 例如 com.**.**.mapper
mapperPackage: com.ruoyi.**.mapper,con.yonqi.**.mapper
mapperPackage: com.**.**.mapper
# 对应的 XML 文件位置
mapperLocations: classpath*:mapper/**/*Mapper.xml
# 实体扫描,多个package用逗号或者分号分隔
......
......@@ -2,7 +2,7 @@ package com.yongqi.xinrenli.mapper;
import com.yongqi.xinrenli.domain.Order;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/**
* <p>
......@@ -13,7 +13,6 @@ import org.apache.ibatis.annotations.Mapper;
* @since 2023-03-02
*/
@Mapper
public interface OrderMapper extends BaseMapper<Order> {
}
......@@ -2,8 +2,10 @@ package com.yongqi.xinrenli.service.impl;
import com.yongqi.xinrenli.domain.Coupon;
import com.yongqi.xinrenli.mapper.CouponMapper;
import com.yongqi.xinrenli.mapper.OrderMapper;
import com.yongqi.xinrenli.service.ICouponService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
......@@ -17,4 +19,6 @@ import org.springframework.stereotype.Service;
@Service
public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> implements ICouponService {
@Autowired
private OrderMapper orderMapper;
}
......@@ -4,7 +4,6 @@ import com.yongqi.xinrenli.domain.Order;
import com.yongqi.xinrenli.mapper.OrderMapper;
import com.yongqi.xinrenli.service.IOrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
......@@ -18,13 +17,9 @@ import org.springframework.stereotype.Service;
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements IOrderService {
@Autowired
OrderMapper orderMapper;
@Override
public boolean addOrder(Order order) {
orderMapper.insert(order);
this.save(order);
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment