forked from Q-1515/reggie_parent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
435 additions
and
2 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
reggie_server/src/main/java/com/reggie/mapper/DishFlavorMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.reggie.mapper; | ||
|
||
import org.apache.ibatis.annotations.Mapper; | ||
|
||
@Mapper | ||
public interface DishFlavorMapper { | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
reggie_server/src/main/java/com/reggie/mapper/DishMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.reggie.mapper; | ||
|
||
import org.apache.ibatis.annotations.Mapper; | ||
|
||
@Mapper | ||
public interface DishMapper { | ||
|
||
//根据分类id查询对应的菜品数量 | ||
Long cuntByCategoryId(Long id); | ||
} |
10 changes: 10 additions & 0 deletions
10
reggie_server/src/main/java/com/reggie/mapper/SetmealMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.reggie.mapper; | ||
|
||
import org.apache.ibatis.annotations.Mapper; | ||
|
||
@Mapper | ||
public interface SetmealMapper { | ||
|
||
//根据分类id查询对应的套餐数量 | ||
Long cuntByCategoryId(Long id); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
reggie_server/src/main/java/com/reggie/service/DishService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.reggie.service; | ||
|
||
public interface DishService { | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
reggie_server/src/main/java/com/reggie/service/SetmealService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.reggie.service; | ||
|
||
public interface SetmealService { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
reggie_server/src/main/java/com/reggie/service/impl/DishServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.reggie.service.impl; | ||
|
||
import com.reggie.mapper.DishFlavorMapper; | ||
import com.reggie.mapper.DishMapper; | ||
import com.reggie.service.DishService; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Service; | ||
|
||
/** | ||
* 菜品业务实现 | ||
*/ | ||
@Service | ||
@Slf4j | ||
public class DishServiceImpl implements DishService { | ||
@Autowired | ||
private DishMapper dishMapper; | ||
@Autowired | ||
private DishFlavorMapper dishFlavorMapper; | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
reggie_server/src/main/java/com/reggie/service/impl/SetmealServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.reggie.service.impl; | ||
|
||
import com.reggie.mapper.SetmealMapper; | ||
import com.reggie.service.SetmealService; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Service; | ||
|
||
/** | ||
* 套餐业务实现 | ||
*/ | ||
@Service | ||
@Slf4j | ||
public class SetmealServiceImpl implements SetmealService { | ||
@Autowired | ||
private SetmealMapper setmealMapper; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | ||
<mapper namespace="com.reggie.mapper.DishFlavorMapper"> | ||
</mapper> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | ||
<mapper namespace="com.reggie.mapper.DishMapper"> | ||
|
||
<!--根据分类id查询对应的菜品数量--> | ||
<select id="cuntByCategoryId" resultType="java.lang.Long"> | ||
select count(id) | ||
from dish | ||
where category_id = #{id}; | ||
</select> | ||
</mapper> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | ||
<mapper namespace="com.reggie.mapper.SetmealMapper"> | ||
|
||
<select id="cuntByCategoryId" resultType="java.lang.Long"> | ||
select count(*) | ||
from setmeal | ||
where category_id = #{id} | ||
</select> | ||
</mapper> |