Commit 0424e141 by 郑云飞

init

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