diff --git a/ndmall-user/pom.xml b/ndmall-user/pom.xml index 0b0bdc2e4a487f2d05498eda24f5ccb9bcc1b7f4..f0878c5272e9a02d40e288f96f887b00b4ae9adc 100644 --- a/ndmall-user/pom.xml +++ b/ndmall-user/pom.xml @@ -3,10 +3,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - org.springframework.boot - spring-boot-starter-parent - 2.3.5.RELEASE - + com.cc.ndmall-common + ndmall-common + 0.0.1-SNAPSHOT com.cc.ndmall ndmall-user @@ -40,6 +39,11 @@ + + com.cc.ndmall-common + ndmall-common + 0.0.1-SNAPSHOT + diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/NdmallUserApplication.java b/ndmall-user/src/main/java/com/cc/ndmall/user/NdmallUserApplication.java index 271ae112c8692940e43b3e73fd19e425fb2a7ea7..c3695b159ad700fd9e77d4a706509be756b81678 100644 --- a/ndmall-user/src/main/java/com/cc/ndmall/user/NdmallUserApplication.java +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/NdmallUserApplication.java @@ -1,9 +1,13 @@ package com.cc.ndmall.user; +import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; @SpringBootApplication +@MapperScan("com.cc.ndmall.user.dao") +@EnableDiscoveryClient public class NdmallUserApplication { public static void main(String[] args) { diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/controller/AddressController.java b/ndmall-user/src/main/java/com/cc/ndmall/user/controller/AddressController.java new file mode 100644 index 0000000000000000000000000000000000000000..e2f53953135099765ed2291b35ce3c947e061030 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/controller/AddressController.java @@ -0,0 +1,89 @@ +package com.cc.ndmall.user.controller; + +import java.util.Arrays; +import java.util.Map; + +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.common.utils.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.cc.ndmall.user.entity.AddressEntity; +import com.cc.ndmall.user.service.AddressService; + + + +/** + * 收货地址表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@RestController +@RequestMapping("user/address") +public class AddressController { + @Autowired + private AddressService addressService; + + /** + * 列表 + */ + @RequestMapping("/list") +// @RequiresPermissions("user:address:list") + public R list(@RequestParam Map params){ + PageUtils page = addressService.queryPage(params); + + return R.ok().put("page", page); + } + + + /** + * 信息 + */ + @RequestMapping("/info/{id}") +// @RequiresPermissions("user:address:info") + public R info(@PathVariable("id") Integer id){ + AddressEntity address = addressService.getById(id); + + return R.ok().put("address", address); + } + + /** + * 保存 + */ + @RequestMapping("/save") +// @RequiresPermissions("user:address:save") + public R save(@RequestBody AddressEntity address){ + addressService.save(address); + + return R.ok(); + } + + /** + * 修改 + */ + @RequestMapping("/update") +// @RequiresPermissions("user:address:update") + public R update(@RequestBody AddressEntity address){ + addressService.updateById(address); + + return R.ok(); + } + + /** + * 删除 + */ + @RequestMapping("/delete") +// @RequiresPermissions("user:address:delete") + public R delete(@RequestBody Integer[] ids){ + addressService.removeByIds(Arrays.asList(ids)); + + return R.ok(); + } + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/controller/CollectController.java b/ndmall-user/src/main/java/com/cc/ndmall/user/controller/CollectController.java new file mode 100644 index 0000000000000000000000000000000000000000..47e3fdb30ba50ee1ba6813f2f708ffedd500fa1d --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/controller/CollectController.java @@ -0,0 +1,84 @@ +package com.cc.ndmall.user.controller; + +import java.util.Arrays; +import java.util.Map; + +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.common.utils.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.cc.ndmall.user.entity.CollectEntity; +import com.cc.ndmall.user.service.CollectService; + + + +/** + * 收藏表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@RestController +@RequestMapping("user/collect") +public class CollectController { + @Autowired + private CollectService collectService; + + /** + * 列表 + */ + @RequestMapping("/list") + public R list(@RequestParam Map params){ + PageUtils page = collectService.queryPage(params); + + return R.ok().put("page", page); + } + + + /** + * 信息 + */ + @RequestMapping("/info/{id}") + public R info(@PathVariable("id") Integer id){ + CollectEntity collect = collectService.getById(id); + + return R.ok().put("collect", collect); + } + + /** + * 保存 + */ + @RequestMapping("/save") + public R save(@RequestBody CollectEntity collect){ + collectService.save(collect); + + return R.ok(); + } + + /** + * 修改 + */ + @RequestMapping("/update") + public R update(@RequestBody CollectEntity collect){ + collectService.updateById(collect); + + return R.ok(); + } + + /** + * 删除 + */ + @RequestMapping("/delete") + public R delete(@RequestBody Integer[] ids){ + collectService.removeByIds(Arrays.asList(ids)); + + return R.ok(); + } + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/controller/FeedbackController.java b/ndmall-user/src/main/java/com/cc/ndmall/user/controller/FeedbackController.java new file mode 100644 index 0000000000000000000000000000000000000000..2edeebb905d565423b0648973aa94635d0f00a91 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/controller/FeedbackController.java @@ -0,0 +1,84 @@ +package com.cc.ndmall.user.controller; + +import java.util.Arrays; +import java.util.Map; + +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.common.utils.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.cc.ndmall.user.entity.FeedbackEntity; +import com.cc.ndmall.user.service.FeedbackService; + + + +/** + * 意见反馈表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@RestController +@RequestMapping("user/feedback") +public class FeedbackController { + @Autowired + private FeedbackService feedbackService; + + /** + * 列表 + */ + @RequestMapping("/list") + public R list(@RequestParam Map params){ + PageUtils page = feedbackService.queryPage(params); + + return R.ok().put("page", page); + } + + + /** + * 信息 + */ + @RequestMapping("/info/{id}") + public R info(@PathVariable("id") Integer id){ + FeedbackEntity feedback = feedbackService.getById(id); + + return R.ok().put("feedback", feedback); + } + + /** + * 保存 + */ + @RequestMapping("/save") + public R save(@RequestBody FeedbackEntity feedback){ + feedbackService.save(feedback); + + return R.ok(); + } + + /** + * 修改 + */ + @RequestMapping("/update") + public R update(@RequestBody FeedbackEntity feedback){ + feedbackService.updateById(feedback); + + return R.ok(); + } + + /** + * 删除 + */ + @RequestMapping("/delete") + public R delete(@RequestBody Integer[] ids){ + feedbackService.removeByIds(Arrays.asList(ids)); + + return R.ok(); + } + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/controller/FootprintController.java b/ndmall-user/src/main/java/com/cc/ndmall/user/controller/FootprintController.java new file mode 100644 index 0000000000000000000000000000000000000000..ef9219158a075c82ad6b14af184c697426f33c1f --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/controller/FootprintController.java @@ -0,0 +1,84 @@ +package com.cc.ndmall.user.controller; + +import java.util.Arrays; +import java.util.Map; + +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.common.utils.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.cc.ndmall.user.entity.FootprintEntity; +import com.cc.ndmall.user.service.FootprintService; + + + +/** + * 用户浏览足迹表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@RestController +@RequestMapping("user/footprint") +public class FootprintController { + @Autowired + private FootprintService footprintService; + + /** + * 列表 + */ + @RequestMapping("/list") + public R list(@RequestParam Map params){ + PageUtils page = footprintService.queryPage(params); + + return R.ok().put("page", page); + } + + + /** + * 信息 + */ + @RequestMapping("/info/{id}") + public R info(@PathVariable("id") Integer id){ + FootprintEntity footprint = footprintService.getById(id); + + return R.ok().put("footprint", footprint); + } + + /** + * 保存 + */ + @RequestMapping("/save") + public R save(@RequestBody FootprintEntity footprint){ + footprintService.save(footprint); + + return R.ok(); + } + + /** + * 修改 + */ + @RequestMapping("/update") + public R update(@RequestBody FootprintEntity footprint){ + footprintService.updateById(footprint); + + return R.ok(); + } + + /** + * 删除 + */ + @RequestMapping("/delete") + public R delete(@RequestBody Integer[] ids){ + footprintService.removeByIds(Arrays.asList(ids)); + + return R.ok(); + } + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/controller/PermissionController.java b/ndmall-user/src/main/java/com/cc/ndmall/user/controller/PermissionController.java new file mode 100644 index 0000000000000000000000000000000000000000..68c6e9698d6246e905c20c7b96514bc0b9c83d9e --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/controller/PermissionController.java @@ -0,0 +1,84 @@ +package com.cc.ndmall.user.controller; + +import java.util.Arrays; +import java.util.Map; + +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.common.utils.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.cc.ndmall.user.entity.PermissionEntity; +import com.cc.ndmall.user.service.PermissionService; + + + +/** + * 权限表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@RestController +@RequestMapping("user/permission") +public class PermissionController { + @Autowired + private PermissionService permissionService; + + /** + * 列表 + */ + @RequestMapping("/list") + public R list(@RequestParam Map params){ + PageUtils page = permissionService.queryPage(params); + + return R.ok().put("page", page); + } + + + /** + * 信息 + */ + @RequestMapping("/info/{id}") + public R info(@PathVariable("id") Integer id){ + PermissionEntity permission = permissionService.getById(id); + + return R.ok().put("permission", permission); + } + + /** + * 保存 + */ + @RequestMapping("/save") + public R save(@RequestBody PermissionEntity permission){ + permissionService.save(permission); + + return R.ok(); + } + + /** + * 修改 + */ + @RequestMapping("/update") + public R update(@RequestBody PermissionEntity permission){ + permissionService.updateById(permission); + + return R.ok(); + } + + /** + * 删除 + */ + @RequestMapping("/delete") + public R delete(@RequestBody Integer[] ids){ + permissionService.removeByIds(Arrays.asList(ids)); + + return R.ok(); + } + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/controller/RoleController.java b/ndmall-user/src/main/java/com/cc/ndmall/user/controller/RoleController.java new file mode 100644 index 0000000000000000000000000000000000000000..48349df6bc89656ca0eff7fb7cc21e0b087bbda2 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/controller/RoleController.java @@ -0,0 +1,84 @@ +package com.cc.ndmall.user.controller; + +import java.util.Arrays; +import java.util.Map; + +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.common.utils.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.cc.ndmall.user.entity.RoleEntity; +import com.cc.ndmall.user.service.RoleService; + + + +/** + * 角色表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@RestController +@RequestMapping("user/role") +public class RoleController { + @Autowired + private RoleService roleService; + + /** + * 列表 + */ + @RequestMapping("/list") + public R list(@RequestParam Map params){ + PageUtils page = roleService.queryPage(params); + + return R.ok().put("page", page); + } + + + /** + * 信息 + */ + @RequestMapping("/info/{id}") + public R info(@PathVariable("id") Integer id){ + RoleEntity role = roleService.getById(id); + + return R.ok().put("role", role); + } + + /** + * 保存 + */ + @RequestMapping("/save") + public R save(@RequestBody RoleEntity role){ + roleService.save(role); + + return R.ok(); + } + + /** + * 修改 + */ + @RequestMapping("/update") + public R update(@RequestBody RoleEntity role){ + roleService.updateById(role); + + return R.ok(); + } + + /** + * 删除 + */ + @RequestMapping("/delete") + public R delete(@RequestBody Integer[] ids){ + roleService.removeByIds(Arrays.asList(ids)); + + return R.ok(); + } + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/controller/SearchHistoryController.java b/ndmall-user/src/main/java/com/cc/ndmall/user/controller/SearchHistoryController.java new file mode 100644 index 0000000000000000000000000000000000000000..7b3179be92f9fdf88c7211de7ff7084605cdd7df --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/controller/SearchHistoryController.java @@ -0,0 +1,84 @@ +package com.cc.ndmall.user.controller; + +import java.util.Arrays; +import java.util.Map; + +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.common.utils.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.cc.ndmall.user.entity.SearchHistoryEntity; +import com.cc.ndmall.user.service.SearchHistoryService; + + + +/** + * 搜索历史表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@RestController +@RequestMapping("user/searchhistory") +public class SearchHistoryController { + @Autowired + private SearchHistoryService searchHistoryService; + + /** + * 列表 + */ + @RequestMapping("/list") + public R list(@RequestParam Map params){ + PageUtils page = searchHistoryService.queryPage(params); + + return R.ok().put("page", page); + } + + + /** + * 信息 + */ + @RequestMapping("/info/{id}") + public R info(@PathVariable("id") Integer id){ + SearchHistoryEntity searchHistory = searchHistoryService.getById(id); + + return R.ok().put("searchHistory", searchHistory); + } + + /** + * 保存 + */ + @RequestMapping("/save") + public R save(@RequestBody SearchHistoryEntity searchHistory){ + searchHistoryService.save(searchHistory); + + return R.ok(); + } + + /** + * 修改 + */ + @RequestMapping("/update") + public R update(@RequestBody SearchHistoryEntity searchHistory){ + searchHistoryService.updateById(searchHistory); + + return R.ok(); + } + + /** + * 删除 + */ + @RequestMapping("/delete") + public R delete(@RequestBody Integer[] ids){ + searchHistoryService.removeByIds(Arrays.asList(ids)); + + return R.ok(); + } + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/controller/UserController.java b/ndmall-user/src/main/java/com/cc/ndmall/user/controller/UserController.java new file mode 100644 index 0000000000000000000000000000000000000000..89770f04aed7cfcaed8d40bee21cb5e5a50a4aea --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/controller/UserController.java @@ -0,0 +1,84 @@ +package com.cc.ndmall.user.controller; + +import java.util.Arrays; +import java.util.Map; + +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.common.utils.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.cc.ndmall.user.entity.UserEntity; +import com.cc.ndmall.user.service.UserService; + + + +/** + * 用户表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@RestController +@RequestMapping("user/user") +public class UserController { + @Autowired + private UserService userService; + + /** + * 列表 + */ + @RequestMapping("/list") + public R list(@RequestParam Map params){ + PageUtils page = userService.queryPage(params); + + return R.ok().put("page", page); + } + + + /** + * 信息 + */ + @RequestMapping("/info/{id}") + public R info(@PathVariable("id") Integer id){ + UserEntity user = userService.getById(id); + + return R.ok().put("user", user); + } + + /** + * 保存 + */ + @RequestMapping("/save") + public R save(@RequestBody UserEntity user){ + userService.save(user); + + return R.ok(); + } + + /** + * 修改 + */ + @RequestMapping("/update") + public R update(@RequestBody UserEntity user){ + userService.updateById(user); + + return R.ok(); + } + + /** + * 删除 + */ + @RequestMapping("/delete") + public R delete(@RequestBody Integer[] ids){ + userService.removeByIds(Arrays.asList(ids)); + + return R.ok(); + } + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/controller/UserFormidController.java b/ndmall-user/src/main/java/com/cc/ndmall/user/controller/UserFormidController.java new file mode 100644 index 0000000000000000000000000000000000000000..b8af73d4fa440a72ac78766e10f9f26d154eac23 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/controller/UserFormidController.java @@ -0,0 +1,84 @@ +package com.cc.ndmall.user.controller; + +import java.util.Arrays; +import java.util.Map; + +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.common.utils.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.cc.ndmall.user.entity.UserFormidEntity; +import com.cc.ndmall.user.service.UserFormidService; + + + +/** + * + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@RestController +@RequestMapping("user/userformid") +public class UserFormidController { + @Autowired + private UserFormidService userFormidService; + + /** + * 列表 + */ + @RequestMapping("/list") + public R list(@RequestParam Map params){ + PageUtils page = userFormidService.queryPage(params); + + return R.ok().put("page", page); + } + + + /** + * 信息 + */ + @RequestMapping("/info/{id}") + public R info(@PathVariable("id") Integer id){ + UserFormidEntity userFormid = userFormidService.getById(id); + + return R.ok().put("userFormid", userFormid); + } + + /** + * 保存 + */ + @RequestMapping("/save") + public R save(@RequestBody UserFormidEntity userFormid){ + userFormidService.save(userFormid); + + return R.ok(); + } + + /** + * 修改 + */ + @RequestMapping("/update") + public R update(@RequestBody UserFormidEntity userFormid){ + userFormidService.updateById(userFormid); + + return R.ok(); + } + + /** + * 删除 + */ + @RequestMapping("/delete") + public R delete(@RequestBody Integer[] ids){ + userFormidService.removeByIds(Arrays.asList(ids)); + + return R.ok(); + } + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/dao/AddressDao.java b/ndmall-user/src/main/java/com/cc/ndmall/user/dao/AddressDao.java new file mode 100644 index 0000000000000000000000000000000000000000..5aefe9a1b2f12a184ecc45f4b52a028939fc3b73 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/dao/AddressDao.java @@ -0,0 +1,17 @@ +package com.cc.ndmall.user.dao; + +import com.cc.ndmall.user.entity.AddressEntity; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * 收货地址表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@Mapper +public interface AddressDao extends BaseMapper { + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/dao/CollectDao.java b/ndmall-user/src/main/java/com/cc/ndmall/user/dao/CollectDao.java new file mode 100644 index 0000000000000000000000000000000000000000..3b7a182ef04e1ab787ec8fb26fd5e163b29b1d9f --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/dao/CollectDao.java @@ -0,0 +1,17 @@ +package com.cc.ndmall.user.dao; + +import com.cc.ndmall.user.entity.CollectEntity; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * 收藏表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@Mapper +public interface CollectDao extends BaseMapper { + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/dao/FeedbackDao.java b/ndmall-user/src/main/java/com/cc/ndmall/user/dao/FeedbackDao.java new file mode 100644 index 0000000000000000000000000000000000000000..ef8a1ae63c222e216406aec65254053df3b6cab6 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/dao/FeedbackDao.java @@ -0,0 +1,17 @@ +package com.cc.ndmall.user.dao; + +import com.cc.ndmall.user.entity.FeedbackEntity; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * 意见反馈表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@Mapper +public interface FeedbackDao extends BaseMapper { + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/dao/FootprintDao.java b/ndmall-user/src/main/java/com/cc/ndmall/user/dao/FootprintDao.java new file mode 100644 index 0000000000000000000000000000000000000000..845668452c06ad426a9bfe18bde54d8a0b60c29d --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/dao/FootprintDao.java @@ -0,0 +1,17 @@ +package com.cc.ndmall.user.dao; + +import com.cc.ndmall.user.entity.FootprintEntity; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * 用户浏览足迹表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@Mapper +public interface FootprintDao extends BaseMapper { + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/dao/PermissionDao.java b/ndmall-user/src/main/java/com/cc/ndmall/user/dao/PermissionDao.java new file mode 100644 index 0000000000000000000000000000000000000000..201a6e4d0274db3ea861a0078ef1c71181fcff7e --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/dao/PermissionDao.java @@ -0,0 +1,17 @@ +package com.cc.ndmall.user.dao; + +import com.cc.ndmall.user.entity.PermissionEntity; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * 权限表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@Mapper +public interface PermissionDao extends BaseMapper { + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/dao/RoleDao.java b/ndmall-user/src/main/java/com/cc/ndmall/user/dao/RoleDao.java new file mode 100644 index 0000000000000000000000000000000000000000..816ce0d1e69b40a7a3adc3ffed416219d3a4f595 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/dao/RoleDao.java @@ -0,0 +1,17 @@ +package com.cc.ndmall.user.dao; + +import com.cc.ndmall.user.entity.RoleEntity; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * 角色表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@Mapper +public interface RoleDao extends BaseMapper { + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/dao/SearchHistoryDao.java b/ndmall-user/src/main/java/com/cc/ndmall/user/dao/SearchHistoryDao.java new file mode 100644 index 0000000000000000000000000000000000000000..f17384bd70d82b6c31082a88eeb9b0dfed1e8075 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/dao/SearchHistoryDao.java @@ -0,0 +1,17 @@ +package com.cc.ndmall.user.dao; + +import com.cc.ndmall.user.entity.SearchHistoryEntity; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * 搜索历史表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@Mapper +public interface SearchHistoryDao extends BaseMapper { + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/dao/UserDao.java b/ndmall-user/src/main/java/com/cc/ndmall/user/dao/UserDao.java new file mode 100644 index 0000000000000000000000000000000000000000..93b7e65d21d7f33c5f340f3e8d4c695f498df2fb --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/dao/UserDao.java @@ -0,0 +1,17 @@ +package com.cc.ndmall.user.dao; + +import com.cc.ndmall.user.entity.UserEntity; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * 用户表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@Mapper +public interface UserDao extends BaseMapper { + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/dao/UserFormidDao.java b/ndmall-user/src/main/java/com/cc/ndmall/user/dao/UserFormidDao.java new file mode 100644 index 0000000000000000000000000000000000000000..bbcb160b441443a2684c94c4abeed303f85c7274 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/dao/UserFormidDao.java @@ -0,0 +1,17 @@ +package com.cc.ndmall.user.dao; + +import com.cc.ndmall.user.entity.UserFormidEntity; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@Mapper +public interface UserFormidDao extends BaseMapper { + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/entity/AddressEntity.java b/ndmall-user/src/main/java/com/cc/ndmall/user/entity/AddressEntity.java new file mode 100644 index 0000000000000000000000000000000000000000..fcf99847b2eacd49abed6559b047fdb943d9f299 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/entity/AddressEntity.java @@ -0,0 +1,80 @@ +package com.cc.ndmall.user.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * 收货地址表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@Data +@TableName("ndmall_address") +public class AddressEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId + private Integer id; + /** + * 收货人名称 + */ + private String name; + /** + * 用户表的用户ID + */ + private Integer userId; + /** + * 行政区域表的省ID + */ + private String province; + /** + * 行政区域表的市ID + */ + private String city; + /** + * 行政区域表的区县ID + */ + private String county; + /** + * 详细收货地址 + */ + private String addressDetail; + /** + * 地区编码 + */ + private String areaCode; + /** + * 邮政编码 + */ + private String postalCode; + /** + * 手机号码 + */ + private String tel; + /** + * 是否默认地址 + */ + private Integer isDefault; + /** + * 创建时间 + */ + private Date addTime; + /** + * 更新时间 + */ + private Date updateTime; + /** + * 逻辑删除 + */ + private Integer deleted; + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/entity/CollectEntity.java b/ndmall-user/src/main/java/com/cc/ndmall/user/entity/CollectEntity.java new file mode 100644 index 0000000000000000000000000000000000000000..387cd51a2c2fdd5e3fb9a698a7c8d64004e4cea7 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/entity/CollectEntity.java @@ -0,0 +1,52 @@ +package com.cc.ndmall.user.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * 收藏表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@Data +@TableName("ndmall_collect") +public class CollectEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId + private Integer id; + /** + * 用户表的用户ID + */ + private Integer userId; + /** + * 如果type=0,则是商品ID;如果type=1,则是专题ID + */ + private Integer valueId; + /** + * 收藏类型,如果type=0,则是商品ID;如果type=1,则是专题ID + */ + private Integer type; + /** + * 创建时间 + */ + private Date addTime; + /** + * 更新时间 + */ + private Date updateTime; + /** + * 逻辑删除 + */ + private Integer deleted; + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/entity/FeedbackEntity.java b/ndmall-user/src/main/java/com/cc/ndmall/user/entity/FeedbackEntity.java new file mode 100644 index 0000000000000000000000000000000000000000..e98975e2b28ccd721d7d320e35b78450d975d19f --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/entity/FeedbackEntity.java @@ -0,0 +1,72 @@ +package com.cc.ndmall.user.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * 意见反馈表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@Data +@TableName("ndmall_feedback") +public class FeedbackEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId + private Integer id; + /** + * 用户表的用户ID + */ + private Integer userId; + /** + * 用户名称 + */ + private String username; + /** + * 手机号 + */ + private String mobile; + /** + * 反馈类型 + */ + private String feedType; + /** + * 反馈内容 + */ + private String content; + /** + * 状态 + */ + private Integer status; + /** + * 是否含有图片 + */ + private Integer hasPicture; + /** + * 图片地址列表,采用JSON数组格式 + */ + private String picUrls; + /** + * 创建时间 + */ + private Date addTime; + /** + * 更新时间 + */ + private Date updateTime; + /** + * 逻辑删除 + */ + private Integer deleted; + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/entity/FootprintEntity.java b/ndmall-user/src/main/java/com/cc/ndmall/user/entity/FootprintEntity.java new file mode 100644 index 0000000000000000000000000000000000000000..1a00d32568349a77ffcbf83b9c8b710890b98e80 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/entity/FootprintEntity.java @@ -0,0 +1,48 @@ +package com.cc.ndmall.user.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * 用户浏览足迹表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@Data +@TableName("ndmall_footprint") +public class FootprintEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId + private Integer id; + /** + * 用户表的用户ID + */ + private Integer userId; + /** + * 浏览商品ID + */ + private Integer goodsId; + /** + * 创建时间 + */ + private Date addTime; + /** + * 更新时间 + */ + private Date updateTime; + /** + * 逻辑删除 + */ + private Integer deleted; + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/entity/PermissionEntity.java b/ndmall-user/src/main/java/com/cc/ndmall/user/entity/PermissionEntity.java new file mode 100644 index 0000000000000000000000000000000000000000..1c0c9e0e92d77fd3e82a93527c3c2fd03996fb10 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/entity/PermissionEntity.java @@ -0,0 +1,48 @@ +package com.cc.ndmall.user.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * 权限表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@Data +@TableName("ndmall_permission") +public class PermissionEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId + private Integer id; + /** + * 角色ID + */ + private Integer roleId; + /** + * 权限 + */ + private String permission; + /** + * 创建时间 + */ + private Date addTime; + /** + * 更新时间 + */ + private Date updateTime; + /** + * 逻辑删除 + */ + private Integer deleted; + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/entity/RoleEntity.java b/ndmall-user/src/main/java/com/cc/ndmall/user/entity/RoleEntity.java new file mode 100644 index 0000000000000000000000000000000000000000..533444b81cda5daf97da04bfef17fecdbec8e0e0 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/entity/RoleEntity.java @@ -0,0 +1,52 @@ +package com.cc.ndmall.user.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * 角色表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@Data +@TableName("ndmall_role") +public class RoleEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId + private Integer id; + /** + * 角色名称 + */ + private String name; + /** + * 角色描述 + */ + private String desc; + /** + * 是否启用 + */ + private Integer enabled; + /** + * 创建时间 + */ + private Date addTime; + /** + * 更新时间 + */ + private Date updateTime; + /** + * 逻辑删除 + */ + private Integer deleted; + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/entity/SearchHistoryEntity.java b/ndmall-user/src/main/java/com/cc/ndmall/user/entity/SearchHistoryEntity.java new file mode 100644 index 0000000000000000000000000000000000000000..7f111b270836316dfe6b8318f08c509a52fc1b70 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/entity/SearchHistoryEntity.java @@ -0,0 +1,52 @@ +package com.cc.ndmall.user.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * 搜索历史表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@Data +@TableName("ndmall_search_history") +public class SearchHistoryEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId + private Integer id; + /** + * 用户表的用户ID + */ + private Integer userId; + /** + * 搜索关键字 + */ + private String keyword; + /** + * 搜索来源,如pc、wx、app + */ + private String from; + /** + * 创建时间 + */ + private Date addTime; + /** + * 更新时间 + */ + private Date updateTime; + /** + * 逻辑删除 + */ + private Integer deleted; + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/entity/UserEntity.java b/ndmall-user/src/main/java/com/cc/ndmall/user/entity/UserEntity.java new file mode 100644 index 0000000000000000000000000000000000000000..2cf7819ea2380bd08019fa8c5180538b70f72893 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/entity/UserEntity.java @@ -0,0 +1,92 @@ +package com.cc.ndmall.user.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * 用户表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@Data +@TableName("ndmall_user") +public class UserEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId + private Integer id; + /** + * 用户名称 + */ + private String username; + /** + * 用户密码 + */ + private String password; + /** + * 性别:0 未知, 1男, 1 女 + */ + private Integer gender; + /** + * 生日 + */ + private Date birthday; + /** + * 最近一次登录时间 + */ + private Date lastLoginTime; + /** + * 最近一次登录IP地址 + */ + private String lastLoginIp; + /** + * 0 普通用户,1 VIP用户,2 高级VIP用户 + */ + private Integer userLevel; + /** + * 用户昵称或网络名称 + */ + private String nickname; + /** + * 用户手机号码 + */ + private String mobile; + /** + * 用户头像图片 + */ + private String avatar; + /** + * 微信登录openid + */ + private String weixinOpenid; + /** + * 微信登录会话KEY + */ + private String sessionKey; + /** + * 0 可用, 1 禁用, 2 注销 + */ + private Integer status; + /** + * 创建时间 + */ + private Date addTime; + /** + * 更新时间 + */ + private Date updateTime; + /** + * 逻辑删除 + */ + private Integer deleted; + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/entity/UserFormidEntity.java b/ndmall-user/src/main/java/com/cc/ndmall/user/entity/UserFormidEntity.java new file mode 100644 index 0000000000000000000000000000000000000000..1fcc6e1840860e62f63aa156be08cfa6fc2fd629 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/entity/UserFormidEntity.java @@ -0,0 +1,60 @@ +package com.cc.ndmall.user.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +@Data +@TableName("ndmall_user_formid") +public class UserFormidEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId + private Integer id; + /** + * 缓存的FormId + */ + private String formid; + /** + * 是FormId还是prepayId + */ + private Integer isprepay; + /** + * 可用次数,fromId为1,prepay为3,用1次减1 + */ + private Integer useamount; + /** + * 过期时间,腾讯规定为7天 + */ + private Date expireTime; + /** + * 微信登录openid + */ + private String openid; + /** + * 创建时间 + */ + private Date addTime; + /** + * 更新时间 + */ + private Date updateTime; + /** + * 逻辑删除 + */ + private Integer deleted; + +} diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/service/AddressService.java b/ndmall-user/src/main/java/com/cc/ndmall/user/service/AddressService.java new file mode 100644 index 0000000000000000000000000000000000000000..e4f021cdee6b3302c6935028ee1d03d74109e1f5 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/service/AddressService.java @@ -0,0 +1,20 @@ +package com.cc.ndmall.user.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.user.entity.AddressEntity; + +import java.util.Map; + +/** + * 收货地址表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +public interface AddressService extends IService { + + PageUtils queryPage(Map params); +} + diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/service/CollectService.java b/ndmall-user/src/main/java/com/cc/ndmall/user/service/CollectService.java new file mode 100644 index 0000000000000000000000000000000000000000..03b0661d16efab982577d0f0a23a278c91878382 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/service/CollectService.java @@ -0,0 +1,20 @@ +package com.cc.ndmall.user.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.user.entity.CollectEntity; + +import java.util.Map; + +/** + * 收藏表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +public interface CollectService extends IService { + + PageUtils queryPage(Map params); +} + diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/service/FeedbackService.java b/ndmall-user/src/main/java/com/cc/ndmall/user/service/FeedbackService.java new file mode 100644 index 0000000000000000000000000000000000000000..5ca7c09d25f82c3e9f26d316efc01ce936fdc66c --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/service/FeedbackService.java @@ -0,0 +1,20 @@ +package com.cc.ndmall.user.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.user.entity.FeedbackEntity; + +import java.util.Map; + +/** + * 意见反馈表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +public interface FeedbackService extends IService { + + PageUtils queryPage(Map params); +} + diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/service/FootprintService.java b/ndmall-user/src/main/java/com/cc/ndmall/user/service/FootprintService.java new file mode 100644 index 0000000000000000000000000000000000000000..4f634dc3c7b6b60455923465398567de250f4b48 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/service/FootprintService.java @@ -0,0 +1,20 @@ +package com.cc.ndmall.user.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.user.entity.FootprintEntity; + +import java.util.Map; + +/** + * 用户浏览足迹表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +public interface FootprintService extends IService { + + PageUtils queryPage(Map params); +} + diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/service/PermissionService.java b/ndmall-user/src/main/java/com/cc/ndmall/user/service/PermissionService.java new file mode 100644 index 0000000000000000000000000000000000000000..07d27196321124b8c558a0532b0cc1cd597287cc --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/service/PermissionService.java @@ -0,0 +1,20 @@ +package com.cc.ndmall.user.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.user.entity.PermissionEntity; + +import java.util.Map; + +/** + * 权限表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +public interface PermissionService extends IService { + + PageUtils queryPage(Map params); +} + diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/service/RoleService.java b/ndmall-user/src/main/java/com/cc/ndmall/user/service/RoleService.java new file mode 100644 index 0000000000000000000000000000000000000000..291b81afd055203498471b304020588b59864f0a --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/service/RoleService.java @@ -0,0 +1,20 @@ +package com.cc.ndmall.user.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.user.entity.RoleEntity; + +import java.util.Map; + +/** + * 角色表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +public interface RoleService extends IService { + + PageUtils queryPage(Map params); +} + diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/service/SearchHistoryService.java b/ndmall-user/src/main/java/com/cc/ndmall/user/service/SearchHistoryService.java new file mode 100644 index 0000000000000000000000000000000000000000..12bc62447673fadd5da21b8ea8363b98dec8914a --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/service/SearchHistoryService.java @@ -0,0 +1,20 @@ +package com.cc.ndmall.user.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.user.entity.SearchHistoryEntity; + +import java.util.Map; + +/** + * 搜索历史表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +public interface SearchHistoryService extends IService { + + PageUtils queryPage(Map params); +} + diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/service/UserFormidService.java b/ndmall-user/src/main/java/com/cc/ndmall/user/service/UserFormidService.java new file mode 100644 index 0000000000000000000000000000000000000000..f24d0c6aefeb26307b6462de5b50df204980aa49 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/service/UserFormidService.java @@ -0,0 +1,20 @@ +package com.cc.ndmall.user.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.user.entity.UserFormidEntity; + +import java.util.Map; + +/** + * + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +public interface UserFormidService extends IService { + + PageUtils queryPage(Map params); +} + diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/service/UserService.java b/ndmall-user/src/main/java/com/cc/ndmall/user/service/UserService.java new file mode 100644 index 0000000000000000000000000000000000000000..bed81831fffc42d8813ff662e79ee56787f81216 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/service/UserService.java @@ -0,0 +1,20 @@ +package com.cc.ndmall.user.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.user.entity.UserEntity; + +import java.util.Map; + +/** + * 用户表 + * + * @author yang + * @email 1369574042@qq.com + * @date 2020-11-06 14:23:49 + */ +public interface UserService extends IService { + + PageUtils queryPage(Map params); +} + diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/AddressServiceImpl.java b/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/AddressServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..4a9e5aaefe8922cda30709628eefaedb8f7b71ec --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/AddressServiceImpl.java @@ -0,0 +1,29 @@ +package com.cc.ndmall.user.service.impl; + +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.common.utils.Query; +import org.springframework.stereotype.Service; +import java.util.Map; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import com.cc.ndmall.user.dao.AddressDao; +import com.cc.ndmall.user.entity.AddressEntity; +import com.cc.ndmall.user.service.AddressService; + + +@Service("addressService") +public class AddressServiceImpl extends ServiceImpl implements AddressService { + + @Override + public PageUtils queryPage(Map params) { + IPage page = this.page( + new Query().getPage(params), + new QueryWrapper() + ); + + return new PageUtils(page); + } + +} \ No newline at end of file diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/CollectServiceImpl.java b/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/CollectServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..d900fc1a966198e43199587ba7bc6d444f3ba0c8 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/CollectServiceImpl.java @@ -0,0 +1,29 @@ +package com.cc.ndmall.user.service.impl; + +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.common.utils.Query; +import org.springframework.stereotype.Service; +import java.util.Map; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import com.cc.ndmall.user.dao.CollectDao; +import com.cc.ndmall.user.entity.CollectEntity; +import com.cc.ndmall.user.service.CollectService; + + +@Service("collectService") +public class CollectServiceImpl extends ServiceImpl implements CollectService { + + @Override + public PageUtils queryPage(Map params) { + IPage page = this.page( + new Query().getPage(params), + new QueryWrapper() + ); + + return new PageUtils(page); + } + +} \ No newline at end of file diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/FeedbackServiceImpl.java b/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/FeedbackServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..e2e25efb9584cff406247b12e72ec4f6d4ce9c32 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/FeedbackServiceImpl.java @@ -0,0 +1,29 @@ +package com.cc.ndmall.user.service.impl; + +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.common.utils.Query; +import org.springframework.stereotype.Service; +import java.util.Map; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import com.cc.ndmall.user.dao.FeedbackDao; +import com.cc.ndmall.user.entity.FeedbackEntity; +import com.cc.ndmall.user.service.FeedbackService; + + +@Service("feedbackService") +public class FeedbackServiceImpl extends ServiceImpl implements FeedbackService { + + @Override + public PageUtils queryPage(Map params) { + IPage page = this.page( + new Query().getPage(params), + new QueryWrapper() + ); + + return new PageUtils(page); + } + +} \ No newline at end of file diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/FootprintServiceImpl.java b/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/FootprintServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..95548c68235ae5603418ac04abff574839abb857 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/FootprintServiceImpl.java @@ -0,0 +1,29 @@ +package com.cc.ndmall.user.service.impl; + +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.common.utils.Query; +import org.springframework.stereotype.Service; +import java.util.Map; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import com.cc.ndmall.user.dao.FootprintDao; +import com.cc.ndmall.user.entity.FootprintEntity; +import com.cc.ndmall.user.service.FootprintService; + + +@Service("footprintService") +public class FootprintServiceImpl extends ServiceImpl implements FootprintService { + + @Override + public PageUtils queryPage(Map params) { + IPage page = this.page( + new Query().getPage(params), + new QueryWrapper() + ); + + return new PageUtils(page); + } + +} \ No newline at end of file diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/PermissionServiceImpl.java b/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/PermissionServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..ffe08c8497c09e81135c7f0d8e7c2fec71654f9e --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/PermissionServiceImpl.java @@ -0,0 +1,29 @@ +package com.cc.ndmall.user.service.impl; + +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.common.utils.Query; +import org.springframework.stereotype.Service; +import java.util.Map; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import com.cc.ndmall.user.dao.PermissionDao; +import com.cc.ndmall.user.entity.PermissionEntity; +import com.cc.ndmall.user.service.PermissionService; + + +@Service("permissionService") +public class PermissionServiceImpl extends ServiceImpl implements PermissionService { + + @Override + public PageUtils queryPage(Map params) { + IPage page = this.page( + new Query().getPage(params), + new QueryWrapper() + ); + + return new PageUtils(page); + } + +} \ No newline at end of file diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/RoleServiceImpl.java b/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/RoleServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..6f39a7bbb368f07f0566b421950d74e88fd41421 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/RoleServiceImpl.java @@ -0,0 +1,29 @@ +package com.cc.ndmall.user.service.impl; + +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.common.utils.Query; +import org.springframework.stereotype.Service; +import java.util.Map; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import com.cc.ndmall.user.dao.RoleDao; +import com.cc.ndmall.user.entity.RoleEntity; +import com.cc.ndmall.user.service.RoleService; + + +@Service("roleService") +public class RoleServiceImpl extends ServiceImpl implements RoleService { + + @Override + public PageUtils queryPage(Map params) { + IPage page = this.page( + new Query().getPage(params), + new QueryWrapper() + ); + + return new PageUtils(page); + } + +} \ No newline at end of file diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/SearchHistoryServiceImpl.java b/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/SearchHistoryServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..04e26e5e288d192f9e30e27608c036848488fb46 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/SearchHistoryServiceImpl.java @@ -0,0 +1,29 @@ +package com.cc.ndmall.user.service.impl; + +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.common.utils.Query; +import org.springframework.stereotype.Service; +import java.util.Map; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import com.cc.ndmall.user.dao.SearchHistoryDao; +import com.cc.ndmall.user.entity.SearchHistoryEntity; +import com.cc.ndmall.user.service.SearchHistoryService; + + +@Service("searchHistoryService") +public class SearchHistoryServiceImpl extends ServiceImpl implements SearchHistoryService { + + @Override + public PageUtils queryPage(Map params) { + IPage page = this.page( + new Query().getPage(params), + new QueryWrapper() + ); + + return new PageUtils(page); + } + +} \ No newline at end of file diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/UserFormidServiceImpl.java b/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/UserFormidServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..54d41c6a5b85eff2ab3b05eae314f753bf8967a8 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/UserFormidServiceImpl.java @@ -0,0 +1,29 @@ +package com.cc.ndmall.user.service.impl; + +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.common.utils.Query; +import org.springframework.stereotype.Service; +import java.util.Map; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import com.cc.ndmall.user.dao.UserFormidDao; +import com.cc.ndmall.user.entity.UserFormidEntity; +import com.cc.ndmall.user.service.UserFormidService; + + +@Service("userFormidService") +public class UserFormidServiceImpl extends ServiceImpl implements UserFormidService { + + @Override + public PageUtils queryPage(Map params) { + IPage page = this.page( + new Query().getPage(params), + new QueryWrapper() + ); + + return new PageUtils(page); + } + +} \ No newline at end of file diff --git a/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/UserServiceImpl.java b/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/UserServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..aa3a1fb10dbfe75c850058a731d9877108d4b8a5 --- /dev/null +++ b/ndmall-user/src/main/java/com/cc/ndmall/user/service/impl/UserServiceImpl.java @@ -0,0 +1,29 @@ +package com.cc.ndmall.user.service.impl; + +import com.cc.ndmall.common.utils.PageUtils; +import com.cc.ndmall.common.utils.Query; +import org.springframework.stereotype.Service; +import java.util.Map; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import com.cc.ndmall.user.dao.UserDao; +import com.cc.ndmall.user.entity.UserEntity; +import com.cc.ndmall.user.service.UserService; + + +@Service("userService") +public class UserServiceImpl extends ServiceImpl implements UserService { + + @Override + public PageUtils queryPage(Map params) { + IPage page = this.page( + new Query().getPage(params), + new QueryWrapper() + ); + + return new PageUtils(page); + } + +} \ No newline at end of file diff --git a/ndmall-user/src/main/resources/application.properties b/ndmall-user/src/main/resources/application.properties index 8b137891791fe96927ad78e64b0aad7bded08bdc..040952a718e786c3c0464c432ac09663eba01a2b 100644 --- a/ndmall-user/src/main/resources/application.properties +++ b/ndmall-user/src/main/resources/application.properties @@ -1 +1,3 @@ +spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848 + diff --git a/ndmall-user/src/main/resources/application.yml b/ndmall-user/src/main/resources/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..2fb6737093185856ee400738a3b5195837b91532 --- /dev/null +++ b/ndmall-user/src/main/resources/application.yml @@ -0,0 +1,22 @@ +server: + port: 8000 +spring: + application: + name: ndmall-user + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + username: root + password: 123456 + url: jdbc:mysql://192.168.4.56:3307/ndmall-ums?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8 + + + +mybatis-plus: + global-config: + db-config: + #默认ASSIGN_ID 通过mybaits-plus生成自定义主键 + # + id-type: auto + #classpath*: *表示从自己的类路径和依赖的类路径扫描xml文件 + #classpath:mapper/**/*.xml 表示扫描mapper下的所有目录 + mapper-locations: classpath:mapper/**/*.xml diff --git a/ndmall-user/src/main/resources/mapper/user/AddressDao.xml b/ndmall-user/src/main/resources/mapper/user/AddressDao.xml new file mode 100644 index 0000000000000000000000000000000000000000..fdd7c4eb55873130febf7b2933a0097e2e4a866b --- /dev/null +++ b/ndmall-user/src/main/resources/mapper/user/AddressDao.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ndmall-user/src/main/resources/mapper/user/CollectDao.xml b/ndmall-user/src/main/resources/mapper/user/CollectDao.xml new file mode 100644 index 0000000000000000000000000000000000000000..d27fcb7f370d69be91ace18552b15800d2ba06ac --- /dev/null +++ b/ndmall-user/src/main/resources/mapper/user/CollectDao.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ndmall-user/src/main/resources/mapper/user/FeedbackDao.xml b/ndmall-user/src/main/resources/mapper/user/FeedbackDao.xml new file mode 100644 index 0000000000000000000000000000000000000000..a470204322772e8dccbc8984c55c0671cd38a03b --- /dev/null +++ b/ndmall-user/src/main/resources/mapper/user/FeedbackDao.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ndmall-user/src/main/resources/mapper/user/FootprintDao.xml b/ndmall-user/src/main/resources/mapper/user/FootprintDao.xml new file mode 100644 index 0000000000000000000000000000000000000000..d0e710dc64a167c329f70dd82f76941339396344 --- /dev/null +++ b/ndmall-user/src/main/resources/mapper/user/FootprintDao.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ndmall-user/src/main/resources/mapper/user/PermissionDao.xml b/ndmall-user/src/main/resources/mapper/user/PermissionDao.xml new file mode 100644 index 0000000000000000000000000000000000000000..03ced86447d231b5340cdfbd5d3eae42fb8bd33d --- /dev/null +++ b/ndmall-user/src/main/resources/mapper/user/PermissionDao.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ndmall-user/src/main/resources/mapper/user/RoleDao.xml b/ndmall-user/src/main/resources/mapper/user/RoleDao.xml new file mode 100644 index 0000000000000000000000000000000000000000..a7d0fb9396936aeb9be20a0b8d2fd04333be78de --- /dev/null +++ b/ndmall-user/src/main/resources/mapper/user/RoleDao.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ndmall-user/src/main/resources/mapper/user/SearchHistoryDao.xml b/ndmall-user/src/main/resources/mapper/user/SearchHistoryDao.xml new file mode 100644 index 0000000000000000000000000000000000000000..db7cb61029c95c8e3ec65d3e1becc68a605acfea --- /dev/null +++ b/ndmall-user/src/main/resources/mapper/user/SearchHistoryDao.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ndmall-user/src/main/resources/mapper/user/UserDao.xml b/ndmall-user/src/main/resources/mapper/user/UserDao.xml new file mode 100644 index 0000000000000000000000000000000000000000..fb9f4c885d9947d524eb867d91558ad45e1eceef --- /dev/null +++ b/ndmall-user/src/main/resources/mapper/user/UserDao.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ndmall-user/src/main/resources/mapper/user/UserFormidDao.xml b/ndmall-user/src/main/resources/mapper/user/UserFormidDao.xml new file mode 100644 index 0000000000000000000000000000000000000000..9e8942c9d2231d4780ed503652aac597fda37453 --- /dev/null +++ b/ndmall-user/src/main/resources/mapper/user/UserFormidDao.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ndmall-user/src/test/java/com/cc/ndmall/user/NdmallUserApplicationTests.java b/ndmall-user/src/test/java/com/cc/ndmall/user/NdmallUserApplicationTests.java index 53ede5b3ca0b67bed27ea89fdf7e2d605a4ab529..4ea81f5f35eae4cdc8747eeed1e36a32607b27b6 100644 --- a/ndmall-user/src/test/java/com/cc/ndmall/user/NdmallUserApplicationTests.java +++ b/ndmall-user/src/test/java/com/cc/ndmall/user/NdmallUserApplicationTests.java @@ -1,13 +1,23 @@ package com.cc.ndmall.user; +import com.cc.ndmall.user.entity.PermissionEntity; +import com.cc.ndmall.user.service.PermissionService; import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; +import java.util.List; + @SpringBootTest class NdmallUserApplicationTests { - +@Autowired +private PermissionService permissionService; @Test void contextLoads() { + List permissionEntities = permissionService.list(); + permissionEntities.forEach(permissionEntitie->{ + System.out.println(permissionEntities); + }); } }