From a5408cf6335bd2ea40cbf5a1afeb7a0ececdd9b0 Mon Sep 17 00:00:00 2001 From: Levi Date: Mon, 23 Dec 2024 01:17:28 +0800 Subject: [PATCH] =?UTF-8?q?Idea=E4=BB=A3=E7=A0=8112=E6=9C=8823=E6=97=A5?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/controller/Address2Controller.java | 104 --------- .../system/controller/AddressController.java | 104 --------- .../system/controller/PersonController.java | 37 ++-- .../system/controller/SalesidController.java | 104 --------- .../system/controller/ShangpinController.java | 105 --------- .../system/controller/ShoucangController.java | 104 --------- .../java/com/ruoyi/system/domain/Address.java | 65 ------ .../com/ruoyi/system/domain/Address2.java | 65 ------ .../com/ruoyi/system/domain/Favorite.java | 38 +++- .../java/com/ruoyi/system/domain/Order.java | 201 ++++++++++++------ .../java/com/ruoyi/system/domain/Salesid.java | 150 ------------- .../com/ruoyi/system/domain/Shangpin.java | 195 ----------------- .../com/ruoyi/system/domain/Shoucang.java | 65 ------ .../ruoyi/system/mapper/Address2Mapper.java | 61 ------ .../ruoyi/system/mapper/AddressMapper.java | 61 ------ .../com/ruoyi/system/mapper/PersonMapper.java | 2 + .../ruoyi/system/mapper/ShangpinMapper.java | 61 ------ .../ruoyi/system/mapper/ShoucangMapper.java | 61 ------ .../system/service/IAddress2Service.java | 61 ------ .../ruoyi/system/service/IAddressService.java | 61 ------ .../ruoyi/system/service/IPersonService.java | 4 +- .../ruoyi/system/service/ISalesidService.java | 61 ------ .../system/service/IShangpinService.java | 61 ------ .../system/service/IShoucangService.java | 61 ------ .../service/impl/Address2ServiceImpl.java | 93 -------- .../service/impl/AddressServiceImpl.java | 93 -------- .../service/impl/PersonServiceImpl.java | 4 + .../service/impl/SalesidServiceImpl.java | 131 ------------ .../service/impl/ShangpinServiceImpl.java | 93 -------- .../service/impl/ShoucangServiceImpl.java | 93 -------- .../mapper/system/Address2Mapper.xml | 61 ------ .../resources/mapper/system/AddressMapper.xml | 61 ------ .../mapper/system/FavoriteMapper.xml | 16 +- .../resources/mapper/system/OrderMapper.xml | 21 +- .../resources/mapper/system/PersonMapper.xml | 13 ++ .../resources/mapper/system/SalesidMapper.xml | 121 ----------- .../mapper/system/ShangpinMapper.xml | 106 --------- .../mapper/system/ShoucangMapper.xml | 61 ------ 38 files changed, 232 insertions(+), 2627 deletions(-) delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/controller/Address2Controller.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/controller/AddressController.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/controller/SalesidController.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/controller/ShangpinController.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/controller/ShoucangController.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/Address.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/Address2.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/Salesid.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/Shangpin.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/Shoucang.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/Address2Mapper.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/AddressMapper.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShangpinMapper.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShoucangMapper.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/IAddress2Service.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/IAddressService.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/ISalesidService.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/IShangpinService.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/IShoucangService.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/Address2ServiceImpl.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AddressServiceImpl.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SalesidServiceImpl.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ShangpinServiceImpl.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ShoucangServiceImpl.java delete mode 100644 ruoyi-system/src/main/resources/mapper/system/Address2Mapper.xml delete mode 100644 ruoyi-system/src/main/resources/mapper/system/AddressMapper.xml delete mode 100644 ruoyi-system/src/main/resources/mapper/system/SalesidMapper.xml delete mode 100644 ruoyi-system/src/main/resources/mapper/system/ShangpinMapper.xml delete mode 100644 ruoyi-system/src/main/resources/mapper/system/ShoucangMapper.xml diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/Address2Controller.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/Address2Controller.java deleted file mode 100644 index f4d985c..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/controller/Address2Controller.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.ruoyi.system.controller; - -import java.util.List; -import javax.servlet.http.HttpServletResponse; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -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.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.system.domain.Address2; -import com.ruoyi.system.service.IAddress2Service; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; - -/** - * 卖家地址Controller - * - * @author ruoyi - * @date 2024-12-20 - */ -@RestController -@RequestMapping("/system/address2") -public class Address2Controller extends BaseController -{ - @Autowired - private IAddress2Service address2Service; - - /** - * 查询卖家地址列表 - */ - @PreAuthorize("@ss.hasPermi('system:address2:list')") - @GetMapping("/list") - public TableDataInfo list(Address2 address2) - { - startPage(); - List list = address2Service.selectAddress2List(address2); - return getDataTable(list); - } - - /** - * 导出卖家地址列表 - */ - @PreAuthorize("@ss.hasPermi('system:address2:export')") - @Log(title = "卖家地址", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, Address2 address2) - { - List list = address2Service.selectAddress2List(address2); - ExcelUtil util = new ExcelUtil(Address2.class); - util.exportExcel(response, list, "卖家地址数据"); - } - - /** - * 获取卖家地址详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:address2:query')") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { - return success(address2Service.selectAddress2ById(id)); - } - - /** - * 新增卖家地址 - */ - @PreAuthorize("@ss.hasPermi('system:address2:add')") - @Log(title = "卖家地址", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody Address2 address2) - { - return toAjax(address2Service.insertAddress2(address2)); - } - - /** - * 修改卖家地址 - */ - @PreAuthorize("@ss.hasPermi('system:address2:edit')") - @Log(title = "卖家地址", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody Address2 address2) - { - return toAjax(address2Service.updateAddress2(address2)); - } - - /** - * 删除卖家地址 - */ - @PreAuthorize("@ss.hasPermi('system:address2:remove')") - @Log(title = "卖家地址", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { - return toAjax(address2Service.deleteAddress2ByIds(ids)); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/AddressController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/AddressController.java deleted file mode 100644 index 40439eb..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/controller/AddressController.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.ruoyi.system.controller; - -import java.util.List; -import javax.servlet.http.HttpServletResponse; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -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.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.system.domain.Address; -import com.ruoyi.system.service.IAddressService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; - -/** - * 用户地址Controller - * - * @author ruoyi - * @date 2024-12-20 - */ -@RestController -@RequestMapping("/system/address") -public class AddressController extends BaseController -{ - @Autowired - private IAddressService addressService; - - /** - * 查询用户地址列表 - */ - @PreAuthorize("@ss.hasPermi('system:address:list')") - @GetMapping("/list") - public TableDataInfo list(Address address) - { - startPage(); - List
list = addressService.selectAddressList(address); - return getDataTable(list); - } - - /** - * 导出用户地址列表 - */ - @PreAuthorize("@ss.hasPermi('system:address:export')") - @Log(title = "用户地址", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, Address address) - { - List
list = addressService.selectAddressList(address); - ExcelUtil
util = new ExcelUtil
(Address.class); - util.exportExcel(response, list, "用户地址数据"); - } - - /** - * 获取用户地址详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:address:query')") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { - return success(addressService.selectAddressById(id)); - } - - /** - * 新增用户地址 - */ - @PreAuthorize("@ss.hasPermi('system:address:add')") - @Log(title = "用户地址", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody Address address) - { - return toAjax(addressService.insertAddress(address)); - } - - /** - * 修改用户地址 - */ - @PreAuthorize("@ss.hasPermi('system:address:edit')") - @Log(title = "用户地址", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody Address address) - { - return toAjax(addressService.updateAddress(address)); - } - - /** - * 删除用户地址 - */ - @PreAuthorize("@ss.hasPermi('system:address:remove')") - @Log(title = "用户地址", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { - return toAjax(addressService.deleteAddressByIds(ids)); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/PersonController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/PersonController.java index e62bc25..6557554 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/controller/PersonController.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/PersonController.java @@ -24,10 +24,10 @@ import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; /** - * person模块Controller + * 用户信息Controller * * @author ruoyi - * @date 2024-11-28 + * @date 2024-12-22 */ @RestController @RequestMapping("/system/person") @@ -37,10 +37,9 @@ public class PersonController extends BaseController private IPersonService personService; /** - * 查询person模块列表 + * 查询用户信息列表 */ -// @PreAuthorize("@ss.hasPermi('system:person:list')") - @Anonymous + @PreAuthorize("@ss.hasPermi('system:person:list')") @GetMapping("/list") public TableDataInfo list(Person person) { @@ -50,20 +49,20 @@ public class PersonController extends BaseController } /** - * 导出person模块列表 + * 导出用户信息列表 */ @PreAuthorize("@ss.hasPermi('system:person:export')") - @Log(title = "person模块", businessType = BusinessType.EXPORT) + @Log(title = "用户信息", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, Person person) { List list = personService.selectPersonList(person); ExcelUtil util = new ExcelUtil(Person.class); - util.exportExcel(response, list, "person模块数据"); + util.exportExcel(response, list, "用户信息数据"); } /** - * 获取person模块详细信息 + * 获取用户信息详细信息 */ @PreAuthorize("@ss.hasPermi('system:person:query')") @GetMapping(value = "/{id}") @@ -73,10 +72,10 @@ public class PersonController extends BaseController } /** - * 新增person模块 + * 新增用户信息 */ @PreAuthorize("@ss.hasPermi('system:person:add')") - @Log(title = "person模块", businessType = BusinessType.INSERT) + @Log(title = "用户信息", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody Person person) { @@ -84,10 +83,10 @@ public class PersonController extends BaseController } /** - * 修改person模块 + * 修改用户信息 */ @PreAuthorize("@ss.hasPermi('system:person:edit')") - @Log(title = "person模块", businessType = BusinessType.UPDATE) + @Log(title = "用户信息", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody Person person) { @@ -95,13 +94,21 @@ public class PersonController extends BaseController } /** - * 删除person模块 + * 删除用户信息 */ @PreAuthorize("@ss.hasPermi('system:person:remove')") - @Log(title = "person模块", businessType = BusinessType.DELETE) + @Log(title = "用户信息", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(personService.deletePersonByIds(ids)); } + +// @PreAuthorize("@ss.hasPermi('system:person:login')") + @Anonymous + @GetMapping("/login") + public AjaxResult login(Person person) + { + return success(personService.login(person)); + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/SalesidController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/SalesidController.java deleted file mode 100644 index 4e5301e..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/controller/SalesidController.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.ruoyi.system.controller; - -import java.util.List; -import javax.servlet.http.HttpServletResponse; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -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.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.system.domain.Salesid; -import com.ruoyi.system.service.ISalesidService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; - -/** - * 卖家信息Controller - * - * @author ruoyi - * @date 2024-12-20 - */ -@RestController -@RequestMapping("/system/salesid") -public class SalesidController extends BaseController -{ - @Autowired - private ISalesidService salesidService; - - /** - * 查询卖家信息列表 - */ - @PreAuthorize("@ss.hasPermi('system:salesid:list')") - @GetMapping("/list") - public TableDataInfo list(Salesid salesid) - { - startPage(); - List list = salesidService.selectSalesidList(salesid); - return getDataTable(list); - } - - /** - * 导出卖家信息列表 - */ - @PreAuthorize("@ss.hasPermi('system:salesid:export')") - @Log(title = "卖家信息", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, Salesid salesid) - { - List list = salesidService.selectSalesidList(salesid); - ExcelUtil util = new ExcelUtil(Salesid.class); - util.exportExcel(response, list, "卖家信息数据"); - } - - /** - * 获取卖家信息详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:salesid:query')") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { - return success(salesidService.selectSalesidById(id)); - } - - /** - * 新增卖家信息 - */ - @PreAuthorize("@ss.hasPermi('system:salesid:add')") - @Log(title = "卖家信息", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody Salesid salesid) - { - return toAjax(salesidService.insertSalesid(salesid)); - } - - /** - * 修改卖家信息 - */ - @PreAuthorize("@ss.hasPermi('system:salesid:edit')") - @Log(title = "卖家信息", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody Salesid salesid) - { - return toAjax(salesidService.updateSalesid(salesid)); - } - - /** - * 删除卖家信息 - */ - @PreAuthorize("@ss.hasPermi('system:salesid:remove')") - @Log(title = "卖家信息", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { - return toAjax(salesidService.deleteSalesidByIds(ids)); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/ShangpinController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/ShangpinController.java deleted file mode 100644 index 4d22002..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/controller/ShangpinController.java +++ /dev/null @@ -1,105 +0,0 @@ -package com.ruoyi.system.controller; - -import java.util.List; -import javax.servlet.http.HttpServletResponse; - -import com.ruoyi.system.domain.Shangpin; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -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.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.system.service.IShangpinService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; - -/** - * 商品Controller - * - * @author ruoyi - * @date 2024-12-19 - */ -@RestController -@RequestMapping("/system/shangpin") -public class ShangpinController extends BaseController -{ - @Autowired - private IShangpinService shangpinService; - - /** - * 查询商品列表 - */ - @PreAuthorize("@ss.hasPermi('system:shangpin:list')") - @GetMapping("/list") - public TableDataInfo list(Shangpin shangpin) - { - startPage(); - List list = shangpinService.selectShangpinList(shangpin); - return getDataTable(list); - } - - /** - * 导出商品列表 - */ - @PreAuthorize("@ss.hasPermi('system:shangpin:export')") - @Log(title = "商品", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, Shangpin shangpin) - { - List list = shangpinService.selectShangpinList(shangpin); - ExcelUtil util = new ExcelUtil(Shangpin.class); - util.exportExcel(response, list, "商品数据"); - } - - /** - * 获取商品详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:shangpin:query')") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { - return success(shangpinService.selectShangpinById(id)); - } - - /** - * 新增商品 - */ - @PreAuthorize("@ss.hasPermi('system:shangpin:add')") - @Log(title = "商品", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody Shangpin shangpin) - { - return toAjax(shangpinService.insertShangpin(shangpin)); - } - - /** - * 修改商品 - */ - @PreAuthorize("@ss.hasPermi('system:shangpin:edit')") - @Log(title = "商品", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody Shangpin shangpin) - { - return toAjax(shangpinService.updateShangpin(shangpin)); - } - - /** - * 删除商品 - */ - @PreAuthorize("@ss.hasPermi('system:shangpin:remove')") - @Log(title = "商品", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { - return toAjax(shangpinService.deleteShangpinByIds(ids)); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/ShoucangController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/ShoucangController.java deleted file mode 100644 index 9453fc4..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/controller/ShoucangController.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.ruoyi.system.controller; - -import java.util.List; -import javax.servlet.http.HttpServletResponse; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -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.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.system.domain.Shoucang; -import com.ruoyi.system.service.IShoucangService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; - -/** - * 收藏Controller - * - * @author ruoyi - * @date 2024-12-18 - */ -@RestController -@RequestMapping("/system/shoucang") -public class ShoucangController extends BaseController -{ - @Autowired - private IShoucangService shoucangService; - - /** - * 查询收藏列表 - */ - @PreAuthorize("@ss.hasPermi('system:shoucang:list')") - @GetMapping("/list") - public TableDataInfo list(Shoucang shoucang) - { - startPage(); - List list = shoucangService.selectShoucangList(shoucang); - return getDataTable(list); - } - - /** - * 导出收藏列表 - */ - @PreAuthorize("@ss.hasPermi('system:shoucang:export')") - @Log(title = "收藏", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, Shoucang shoucang) - { - List list = shoucangService.selectShoucangList(shoucang); - ExcelUtil util = new ExcelUtil(Shoucang.class); - util.exportExcel(response, list, "收藏数据"); - } - - /** - * 获取收藏详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:shoucang:query')") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { - return success(shoucangService.selectShoucangById(id)); - } - - /** - * 新增收藏 - */ - @PreAuthorize("@ss.hasPermi('system:shoucang:add')") - @Log(title = "收藏", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody Shoucang shoucang) - { - return toAjax(shoucangService.insertShoucang(shoucang)); - } - - /** - * 修改收藏 - */ - @PreAuthorize("@ss.hasPermi('system:shoucang:edit')") - @Log(title = "收藏", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody Shoucang shoucang) - { - return toAjax(shoucangService.updateShoucang(shoucang)); - } - - /** - * 删除收藏 - */ - @PreAuthorize("@ss.hasPermi('system:shoucang:remove')") - @Log(title = "收藏", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { - return toAjax(shoucangService.deleteShoucangByIds(ids)); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Address.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Address.java deleted file mode 100644 index 9c12b64..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Address.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.ruoyi.system.domain; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 买家地址对象 address - * - * @author ruoyi - * @date 2024-12-20 - */ -public class Address extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** id */ - private Long id; - - /** 买家id */ - @Excel(name = "买家id") - private Long personid; - - /** 买家地址 */ - @Excel(name = "买家地址") - private String place; - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setPersonid(Long personid) - { - this.personid = personid; - } - - public Long getPersonid() - { - return personid; - } - public void setPlace(String place) - { - this.place = place; - } - - public String getPlace() - { - return place; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("personid", getPersonid()) - .append("place", getPlace()) - .toString(); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Address2.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Address2.java deleted file mode 100644 index a759e40..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Address2.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.ruoyi.system.domain; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 卖家地址对象 address2 - * - * @author ruoyi - * @date 2024-12-20 - */ -public class Address2 extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** id */ - private Long id; - - /** 卖家id */ - @Excel(name = "卖家id") - private Long salesid; - - /** 卖家地址 */ - @Excel(name = "卖家地址") - private String place; - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setSalesid(Long salesid) - { - this.salesid = salesid; - } - - public Long getSalesid() - { - return salesid; - } - public void setPlace(String place) - { - this.place = place; - } - - public String getPlace() - { - return place; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("salesid", getSalesid()) - .append("place", getPlace()) - .toString(); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Favorite.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Favorite.java index 17194b3..54032c7 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Favorite.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Favorite.java @@ -1,5 +1,6 @@ package com.ruoyi.system.domain; +import com.fasterxml.jackson.annotation.JsonFormat; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; @@ -39,6 +40,10 @@ public class Favorite extends BaseEntity private Long sellerid; + private String sellername; + + private String sellerpicture; + private BigDecimal price; private String classification; @@ -47,16 +52,9 @@ public class Favorite extends BaseEntity private String state; + @JsonFormat(pattern = "yyyy-MM-dd") private Date time; - public BigDecimal getPrice() { - return price; - } - - public void setPrice(BigDecimal price) { - this.price = price; - } - public Long getId() { return id; } @@ -121,6 +119,30 @@ public class Favorite extends BaseEntity this.sellerid = sellerid; } + public String getSellername() { + return sellername; + } + + public void setSellername(String sellername) { + this.sellername = sellername; + } + + public String getSellerpicture() { + return sellerpicture; + } + + public void setSellerpicture(String sellerpicture) { + this.sellerpicture = sellerpicture; + } + + public BigDecimal getPrice() { + return price; + } + + public void setPrice(BigDecimal price) { + this.price = price; + } + public String getClassification() { return classification; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Order.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Order.java index 45448f5..5fa5971 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Order.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Order.java @@ -1,5 +1,6 @@ package com.ruoyi.system.domain; +import java.math.BigDecimal; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; import org.apache.commons.lang3.builder.ToStringBuilder; @@ -21,6 +22,14 @@ public class Order extends BaseEntity /** id */ private Long id; + /** 买家id */ + @Excel(name = "买家id") + private Long buyerid; + + private String buyername; + + private String buyerpicture; + /** 商品id */ @Excel(name = "商品id") private Long commodityid; @@ -29,15 +38,19 @@ public class Order extends BaseEntity private String commoditypicture; - private String price; + private Long sellerid; - /** 买家id */ - @Excel(name = "买家id") - private Long buyerid; + private String sellername; - private String buyername; + private String sellerpicture; - private String buyerpicture; + private BigDecimal price; + + private String classification; + + private String description; + + private String state; /** 购买时间 */ @JsonFormat(pattern = "yyyy-MM-dd") @@ -48,68 +61,12 @@ public class Order extends BaseEntity @Excel(name = "状态") private String status; - public Long getId() { - return id; + public String getStatus() { + return status; } - public void setId(Long id) { - this.id = id; - } - - public Long getCommodityid() { - return commodityid; - } - - public void setCommodityid(Long commodityid) { - this.commodityid = commodityid; - } - - public String getCommodityname() { - return commodityname; - } - - public void setCommodityname(String commodityname) { - this.commodityname = commodityname; - } - - public String getCommoditypicture() { - return commoditypicture; - } - - public void setCommoditypicture(String commoditypicture) { - this.commoditypicture = commoditypicture; - } - - public String getPrice() { - return price; - } - - public void setPrice(String price) { - this.price = price; - } - - public Long getBuyerid() { - return buyerid; - } - - public void setBuyerid(Long buyerid) { - this.buyerid = buyerid; - } - - public String getBuyername() { - return buyername; - } - - public void setBuyername(String buyername) { - this.buyername = buyername; - } - - public String getBuyerpicture() { - return buyerpicture; - } - - public void setBuyerpicture(String buyerpicture) { - this.buyerpicture = buyerpicture; + public void setStatus(String status) { + this.status = status; } public Date getTime() { @@ -120,12 +77,116 @@ public class Order extends BaseEntity this.time = time; } - public String getStatus() { - return status; + public String getState() { + return state; } - public void setStatus(String status) { - this.status = status; + public void setState(String state) { + this.state = state; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getClassification() { + return classification; + } + + public void setClassification(String classification) { + this.classification = classification; + } + + public BigDecimal getPrice() { + return price; + } + + public void setPrice(BigDecimal price) { + this.price = price; + } + + public String getSellerpicture() { + return sellerpicture; + } + + public void setSellerpicture(String sellerpicture) { + this.sellerpicture = sellerpicture; + } + + public String getSellername() { + return sellername; + } + + public void setSellername(String sellername) { + this.sellername = sellername; + } + + public Long getSellerid() { + return sellerid; + } + + public void setSellerid(Long sellerid) { + this.sellerid = sellerid; + } + + public String getCommoditypicture() { + return commoditypicture; + } + + public void setCommoditypicture(String commoditypicture) { + this.commoditypicture = commoditypicture; + } + + public String getCommodityname() { + return commodityname; + } + + public void setCommodityname(String commodityname) { + this.commodityname = commodityname; + } + + public Long getCommodityid() { + return commodityid; + } + + public void setCommodityid(Long commodityid) { + this.commodityid = commodityid; + } + + public String getBuyerpicture() { + return buyerpicture; + } + + public void setBuyerpicture(String buyerpicture) { + this.buyerpicture = buyerpicture; + } + + public String getBuyername() { + return buyername; + } + + public void setBuyername(String buyername) { + this.buyername = buyername; + } + + public Long getBuyerid() { + return buyerid; + } + + public void setBuyerid(Long buyerid) { + this.buyerid = buyerid; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; } @Override diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Salesid.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Salesid.java deleted file mode 100644 index 47b7652..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Salesid.java +++ /dev/null @@ -1,150 +0,0 @@ -package com.ruoyi.system.domain; - -import java.util.List; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 卖家信息对象 salesid - * - * @author ruoyi - * @date 2024-12-20 - */ -public class Salesid extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** id */ - private Long id; - - /** 头像 */ - @Excel(name = "头像") - private String image; - - /** 昵称 */ - @Excel(name = "昵称") - private String name; - - /** 性别 */ - @Excel(name = "性别") - private String xingbie; - - /** 年龄 */ - @Excel(name = "年龄") - private Long age; - - /** 电话 */ - @Excel(name = "电话") - private String phone; - - /** 学院 */ - @Excel(name = "学院") - private String xueyuan; - - /** 专业 */ - @Excel(name = "专业") - private String zhuanye; - - /** 卖家地址信息 */ - private List address2List; - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setImage(String image) - { - this.image = image; - } - - public String getImage() - { - return image; - } - public void setName(String name) - { - this.name = name; - } - - public String getName() - { - return name; - } - public void setXingbie(String xingbie) - { - this.xingbie = xingbie; - } - - public String getXingbie() - { - return xingbie; - } - public void setAge(Long age) - { - this.age = age; - } - - public Long getAge() - { - return age; - } - public void setPhone(String phone) - { - this.phone = phone; - } - - public String getPhone() - { - return phone; - } - public void setXueyuan(String xueyuan) - { - this.xueyuan = xueyuan; - } - - public String getXueyuan() - { - return xueyuan; - } - public void setZhuanye(String zhuanye) - { - this.zhuanye = zhuanye; - } - - public String getZhuanye() - { - return zhuanye; - } - - public List getAddress2List() - { - return address2List; - } - - public void setAddress2List(List address2List) - { - this.address2List = address2List; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("image", getImage()) - .append("name", getName()) - .append("xingbie", getXingbie()) - .append("age", getAge()) - .append("phone", getPhone()) - .append("xueyuan", getXueyuan()) - .append("zhuanye", getZhuanye()) - .append("address2List", getAddress2List()) - .toString(); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Shangpin.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Shangpin.java deleted file mode 100644 index 685f1d6..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Shangpin.java +++ /dev/null @@ -1,195 +0,0 @@ -package com.ruoyi.system.domain; - -import java.math.BigDecimal; -import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 商品对象 shangpin - * - * @author ruoyi - * @date 2024-12-19 - */ -public class Shangpin extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** id */ - private Long id; - - /** 名称 */ - @Excel(name = "名称") - private String name; - - /** 卖家id */ - @Excel(name = "卖家id") - private Long salesid; - - /** 价格 */ - @Excel(name = "价格") - private BigDecimal price; - - /** 商品类型 */ - @Excel(name = "商品类型") - private String producttype; - - /** 商品描述 */ - @Excel(name = "商品描述") - private String productdescription; - - /** 商品图片 */ - @Excel(name = "商品图片") - private String productimage; - - /** 商品状态 */ - @Excel(name = "商品状态") - private String productstatus; - - /** 日期 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd") - private Date date; - - /** 评价 */ - @Excel(name = "评价") - private String pingjia; - - /** 点击量 */ - @Excel(name = "点击量") - private String dianjiliang; - - /** 收藏 */ - @Excel(name = "收藏") - private String shoucang; - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setName(String name) - { - this.name = name; - } - - public String getName() - { - return name; - } - public void setSalesid(Long salesid) - { - this.salesid = salesid; - } - - public Long getSalesid() - { - return salesid; - } - public void setPrice(BigDecimal price) - { - this.price = price; - } - - public BigDecimal getPrice() - { - return price; - } - public void setProducttype(String producttype) - { - this.producttype = producttype; - } - - public String getProducttype() - { - return producttype; - } - public void setProductdescription(String productdescription) - { - this.productdescription = productdescription; - } - - public String getProductdescription() - { - return productdescription; - } - public void setProductimage(String productimage) - { - this.productimage = productimage; - } - - public String getProductimage() - { - return productimage; - } - public void setProductstatus(String productstatus) - { - this.productstatus = productstatus; - } - - public String getProductstatus() - { - return productstatus; - } - public void setDate(Date date) - { - this.date = date; - } - - public Date getDate() - { - return date; - } - public void setPingjia(String pingjia) - { - this.pingjia = pingjia; - } - - public String getPingjia() - { - return pingjia; - } - public void setDianjiliang(String dianjiliang) - { - this.dianjiliang = dianjiliang; - } - - public String getDianjiliang() - { - return dianjiliang; - } - public void setShoucang(String shoucang) - { - this.shoucang = shoucang; - } - - public String getShoucang() - { - return shoucang; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("name", getName()) - .append("salesid", getSalesid()) - .append("price", getPrice()) - .append("producttype", getProducttype()) - .append("productdescription", getProductdescription()) - .append("productimage", getProductimage()) - .append("productstatus", getProductstatus()) - .append("date", getDate()) - .append("pingjia", getPingjia()) - .append("dianjiliang", getDianjiliang()) - .append("shoucang", getShoucang()) - .toString(); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Shoucang.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Shoucang.java deleted file mode 100644 index 32a4b83..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Shoucang.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.ruoyi.system.domain; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 收藏对象 shoucang - * - * @author ruoyi - * @date 2024-12-18 - */ -public class Shoucang extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** id */ - private Long id; - - /** 商品id */ - @Excel(name = "商品id") - private Long shangpinid; - - /** 买家id */ - @Excel(name = "买家id") - private Long personid; - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setShangpinid(Long shangpinid) - { - this.shangpinid = shangpinid; - } - - public Long getShangpinid() - { - return shangpinid; - } - public void setPersonid(Long personid) - { - this.personid = personid; - } - - public Long getPersonid() - { - return personid; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("shangpinid", getShangpinid()) - .append("personid", getPersonid()) - .toString(); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/Address2Mapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/Address2Mapper.java deleted file mode 100644 index a9c4e70..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/Address2Mapper.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; -import com.ruoyi.system.domain.Address2; - -/** - * 卖家地址Mapper接口 - * - * @author ruoyi - * @date 2024-12-20 - */ -public interface Address2Mapper -{ - /** - * 查询卖家地址 - * - * @param id 卖家地址主键 - * @return 卖家地址 - */ - public Address2 selectAddress2ById(Long id); - - /** - * 查询卖家地址列表 - * - * @param address2 卖家地址 - * @return 卖家地址集合 - */ - public List selectAddress2List(Address2 address2); - - /** - * 新增卖家地址 - * - * @param address2 卖家地址 - * @return 结果 - */ - public int insertAddress2(Address2 address2); - - /** - * 修改卖家地址 - * - * @param address2 卖家地址 - * @return 结果 - */ - public int updateAddress2(Address2 address2); - - /** - * 删除卖家地址 - * - * @param id 卖家地址主键 - * @return 结果 - */ - public int deleteAddress2ById(Long id); - - /** - * 批量删除卖家地址 - * - * @param ids 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteAddress2ByIds(Long[] ids); -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AddressMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AddressMapper.java deleted file mode 100644 index d372e2d..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AddressMapper.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; -import com.ruoyi.system.domain.Address; - -/** - * 用户地址Mapper接口 - * - * @author ruoyi - * @date 2024-12-20 - */ -public interface AddressMapper -{ - /** - * 查询用户地址 - * - * @param id 用户地址主键 - * @return 用户地址 - */ - public Address selectAddressById(Long id); - - /** - * 查询用户地址列表 - * - * @param address 用户地址 - * @return 用户地址集合 - */ - public List
selectAddressList(Address address); - - /** - * 新增用户地址 - * - * @param address 用户地址 - * @return 结果 - */ - public int insertAddress(Address address); - - /** - * 修改用户地址 - * - * @param address 用户地址 - * @return 结果 - */ - public int updateAddress(Address address); - - /** - * 删除用户地址 - * - * @param id 用户地址主键 - * @return 结果 - */ - public int deleteAddressById(Long id); - - /** - * 批量删除用户地址 - * - * @param ids 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteAddressByIds(Long[] ids); -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/PersonMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/PersonMapper.java index 81935ec..9f356ed 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/PersonMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/PersonMapper.java @@ -58,4 +58,6 @@ public interface PersonMapper * @return 结果 */ public int deletePersonByIds(Long[] ids); + + public Person login(Person person); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShangpinMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShangpinMapper.java deleted file mode 100644 index a6bb34f..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShangpinMapper.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; -import com.ruoyi.system.domain.Shangpin; - -/** - * 商品Mapper接口 - * - * @author ruoyi - * @date 2024-12-19 - */ -public interface ShangpinMapper -{ - /** - * 查询商品 - * - * @param id 商品主键 - * @return 商品 - */ - public Shangpin selectShangpinById(Long id); - - /** - * 查询商品列表 - * - * @param shangpin 商品 - * @return 商品集合 - */ - public List selectShangpinList(Shangpin shangpin); - - /** - * 新增商品 - * - * @param shangpin 商品 - * @return 结果 - */ - public int insertShangpin(Shangpin shangpin); - - /** - * 修改商品 - * - * @param shangpin 商品 - * @return 结果 - */ - public int updateShangpin(Shangpin shangpin); - - /** - * 删除商品 - * - * @param id 商品主键 - * @return 结果 - */ - public int deleteShangpinById(Long id); - - /** - * 批量删除商品 - * - * @param ids 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteShangpinByIds(Long[] ids); -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShoucangMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShoucangMapper.java deleted file mode 100644 index a7d582b..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShoucangMapper.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; -import com.ruoyi.system.domain.Shoucang; - -/** - * 收藏Mapper接口 - * - * @author ruoyi - * @date 2024-12-18 - */ -public interface ShoucangMapper -{ - /** - * 查询收藏 - * - * @param id 收藏主键 - * @return 收藏 - */ - public Shoucang selectShoucangById(Long id); - - /** - * 查询收藏列表 - * - * @param shoucang 收藏 - * @return 收藏集合 - */ - public List selectShoucangList(Shoucang shoucang); - - /** - * 新增收藏 - * - * @param shoucang 收藏 - * @return 结果 - */ - public int insertShoucang(Shoucang shoucang); - - /** - * 修改收藏 - * - * @param shoucang 收藏 - * @return 结果 - */ - public int updateShoucang(Shoucang shoucang); - - /** - * 删除收藏 - * - * @param id 收藏主键 - * @return 结果 - */ - public int deleteShoucangById(Long id); - - /** - * 批量删除收藏 - * - * @param ids 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteShoucangByIds(Long[] ids); -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IAddress2Service.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IAddress2Service.java deleted file mode 100644 index da7c282..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IAddress2Service.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; -import com.ruoyi.system.domain.Address2; - -/** - * 卖家地址Service接口 - * - * @author ruoyi - * @date 2024-12-20 - */ -public interface IAddress2Service -{ - /** - * 查询卖家地址 - * - * @param id 卖家地址主键 - * @return 卖家地址 - */ - public Address2 selectAddress2ById(Long id); - - /** - * 查询卖家地址列表 - * - * @param address2 卖家地址 - * @return 卖家地址集合 - */ - public List selectAddress2List(Address2 address2); - - /** - * 新增卖家地址 - * - * @param address2 卖家地址 - * @return 结果 - */ - public int insertAddress2(Address2 address2); - - /** - * 修改卖家地址 - * - * @param address2 卖家地址 - * @return 结果 - */ - public int updateAddress2(Address2 address2); - - /** - * 批量删除卖家地址 - * - * @param ids 需要删除的卖家地址主键集合 - * @return 结果 - */ - public int deleteAddress2ByIds(Long[] ids); - - /** - * 删除卖家地址信息 - * - * @param id 卖家地址主键 - * @return 结果 - */ - public int deleteAddress2ById(Long id); -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IAddressService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IAddressService.java deleted file mode 100644 index f0e7893..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IAddressService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; -import com.ruoyi.system.domain.Address; - -/** - * 用户地址Service接口 - * - * @author ruoyi - * @date 2024-12-20 - */ -public interface IAddressService -{ - /** - * 查询用户地址 - * - * @param id 用户地址主键 - * @return 用户地址 - */ - public Address selectAddressById(Long id); - - /** - * 查询用户地址列表 - * - * @param address 用户地址 - * @return 用户地址集合 - */ - public List
selectAddressList(Address address); - - /** - * 新增用户地址 - * - * @param address 用户地址 - * @return 结果 - */ - public int insertAddress(Address address); - - /** - * 修改用户地址 - * - * @param address 用户地址 - * @return 结果 - */ - public int updateAddress(Address address); - - /** - * 批量删除用户地址 - * - * @param ids 需要删除的用户地址主键集合 - * @return 结果 - */ - public int deleteAddressByIds(Long[] ids); - - /** - * 删除用户地址信息 - * - * @param id 用户地址主键 - * @return 结果 - */ - public int deleteAddressById(Long id); -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IPersonService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IPersonService.java index 08aa872..f584496 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IPersonService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IPersonService.java @@ -7,7 +7,7 @@ import com.ruoyi.system.domain.Person; * 用户信息Service接口 * * @author ruoyi - * @date 2024-12-20 + * @date 2024-12-22 */ public interface IPersonService { @@ -58,4 +58,6 @@ public interface IPersonService * @return 结果 */ public int deletePersonById(Long id); + + public Person login(Person person); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISalesidService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISalesidService.java deleted file mode 100644 index 1237db2..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISalesidService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; -import com.ruoyi.system.domain.Salesid; - -/** - * 卖家信息Service接口 - * - * @author ruoyi - * @date 2024-12-20 - */ -public interface ISalesidService -{ - /** - * 查询卖家信息 - * - * @param id 卖家信息主键 - * @return 卖家信息 - */ - public Salesid selectSalesidById(Long id); - - /** - * 查询卖家信息列表 - * - * @param salesid 卖家信息 - * @return 卖家信息集合 - */ - public List selectSalesidList(Salesid salesid); - - /** - * 新增卖家信息 - * - * @param salesid 卖家信息 - * @return 结果 - */ - public int insertSalesid(Salesid salesid); - - /** - * 修改卖家信息 - * - * @param salesid 卖家信息 - * @return 结果 - */ - public int updateSalesid(Salesid salesid); - - /** - * 批量删除卖家信息 - * - * @param ids 需要删除的卖家信息主键集合 - * @return 结果 - */ - public int deleteSalesidByIds(Long[] ids); - - /** - * 删除卖家信息信息 - * - * @param id 卖家信息主键 - * @return 结果 - */ - public int deleteSalesidById(Long id); -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IShangpinService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IShangpinService.java deleted file mode 100644 index 5d22107..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IShangpinService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; -import com.ruoyi.system.domain.Shangpin; - -/** - * 商品Service接口 - * - * @author ruoyi - * @date 2024-12-19 - */ -public interface IShangpinService -{ - /** - * 查询商品 - * - * @param id 商品主键 - * @return 商品 - */ - public Shangpin selectShangpinById(Long id); - - /** - * 查询商品列表 - * - * @param shangpin 商品 - * @return 商品集合 - */ - public List selectShangpinList(Shangpin shangpin); - - /** - * 新增商品 - * - * @param shangpin 商品 - * @return 结果 - */ - public int insertShangpin(Shangpin shangpin); - - /** - * 修改商品 - * - * @param shangpin 商品 - * @return 结果 - */ - public int updateShangpin(Shangpin shangpin); - - /** - * 批量删除商品 - * - * @param ids 需要删除的商品主键集合 - * @return 结果 - */ - public int deleteShangpinByIds(Long[] ids); - - /** - * 删除商品信息 - * - * @param id 商品主键 - * @return 结果 - */ - public int deleteShangpinById(Long id); -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IShoucangService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IShoucangService.java deleted file mode 100644 index 1437fb2..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IShoucangService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; -import com.ruoyi.system.domain.Shoucang; - -/** - * 收藏Service接口 - * - * @author ruoyi - * @date 2024-12-18 - */ -public interface IShoucangService -{ - /** - * 查询收藏 - * - * @param id 收藏主键 - * @return 收藏 - */ - public Shoucang selectShoucangById(Long id); - - /** - * 查询收藏列表 - * - * @param shoucang 收藏 - * @return 收藏集合 - */ - public List selectShoucangList(Shoucang shoucang); - - /** - * 新增收藏 - * - * @param shoucang 收藏 - * @return 结果 - */ - public int insertShoucang(Shoucang shoucang); - - /** - * 修改收藏 - * - * @param shoucang 收藏 - * @return 结果 - */ - public int updateShoucang(Shoucang shoucang); - - /** - * 批量删除收藏 - * - * @param ids 需要删除的收藏主键集合 - * @return 结果 - */ - public int deleteShoucangByIds(Long[] ids); - - /** - * 删除收藏信息 - * - * @param id 收藏主键 - * @return 结果 - */ - public int deleteShoucangById(Long id); -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/Address2ServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/Address2ServiceImpl.java deleted file mode 100644 index 6774933..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/Address2ServiceImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.system.mapper.Address2Mapper; -import com.ruoyi.system.domain.Address2; -import com.ruoyi.system.service.IAddress2Service; - -/** - * 卖家地址Service业务层处理 - * - * @author ruoyi - * @date 2024-12-20 - */ -@Service -public class Address2ServiceImpl implements IAddress2Service -{ - @Autowired - private Address2Mapper address2Mapper; - - /** - * 查询卖家地址 - * - * @param id 卖家地址主键 - * @return 卖家地址 - */ - @Override - public Address2 selectAddress2ById(Long id) - { - return address2Mapper.selectAddress2ById(id); - } - - /** - * 查询卖家地址列表 - * - * @param address2 卖家地址 - * @return 卖家地址 - */ - @Override - public List selectAddress2List(Address2 address2) - { - return address2Mapper.selectAddress2List(address2); - } - - /** - * 新增卖家地址 - * - * @param address2 卖家地址 - * @return 结果 - */ - @Override - public int insertAddress2(Address2 address2) - { - return address2Mapper.insertAddress2(address2); - } - - /** - * 修改卖家地址 - * - * @param address2 卖家地址 - * @return 结果 - */ - @Override - public int updateAddress2(Address2 address2) - { - return address2Mapper.updateAddress2(address2); - } - - /** - * 批量删除卖家地址 - * - * @param ids 需要删除的卖家地址主键 - * @return 结果 - */ - @Override - public int deleteAddress2ByIds(Long[] ids) - { - return address2Mapper.deleteAddress2ByIds(ids); - } - - /** - * 删除卖家地址信息 - * - * @param id 卖家地址主键 - * @return 结果 - */ - @Override - public int deleteAddress2ById(Long id) - { - return address2Mapper.deleteAddress2ById(id); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AddressServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AddressServiceImpl.java deleted file mode 100644 index fe80d04..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AddressServiceImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.system.mapper.AddressMapper; -import com.ruoyi.system.domain.Address; -import com.ruoyi.system.service.IAddressService; - -/** - * 用户地址Service业务层处理 - * - * @author ruoyi - * @date 2024-12-20 - */ -@Service -public class AddressServiceImpl implements IAddressService -{ - @Autowired - private AddressMapper addressMapper; - - /** - * 查询用户地址 - * - * @param id 用户地址主键 - * @return 用户地址 - */ - @Override - public Address selectAddressById(Long id) - { - return addressMapper.selectAddressById(id); - } - - /** - * 查询用户地址列表 - * - * @param address 用户地址 - * @return 用户地址 - */ - @Override - public List
selectAddressList(Address address) - { - return addressMapper.selectAddressList(address); - } - - /** - * 新增用户地址 - * - * @param address 用户地址 - * @return 结果 - */ - @Override - public int insertAddress(Address address) - { - return addressMapper.insertAddress(address); - } - - /** - * 修改用户地址 - * - * @param address 用户地址 - * @return 结果 - */ - @Override - public int updateAddress(Address address) - { - return addressMapper.updateAddress(address); - } - - /** - * 批量删除用户地址 - * - * @param ids 需要删除的用户地址主键 - * @return 结果 - */ - @Override - public int deleteAddressByIds(Long[] ids) - { - return addressMapper.deleteAddressByIds(ids); - } - - /** - * 删除用户地址信息 - * - * @param id 用户地址主键 - * @return 结果 - */ - @Override - public int deleteAddressById(Long id) - { - return addressMapper.deleteAddressById(id); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PersonServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PersonServiceImpl.java index 895afe6..1971df9 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PersonServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PersonServiceImpl.java @@ -90,4 +90,8 @@ public class PersonServiceImpl implements IPersonService { return personMapper.deletePersonById(id); } + + public Person login(Person person){ + return personMapper.login(person); + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SalesidServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SalesidServiceImpl.java deleted file mode 100644 index 7491fca..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SalesidServiceImpl.java +++ /dev/null @@ -1,131 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import java.util.ArrayList; -import com.ruoyi.common.utils.StringUtils; -import org.springframework.transaction.annotation.Transactional; -import com.ruoyi.system.domain.Address2; -import com.ruoyi.system.mapper.SalesidMapper; -import com.ruoyi.system.domain.Salesid; -import com.ruoyi.system.service.ISalesidService; - -/** - * 卖家信息Service业务层处理 - * - * @author ruoyi - * @date 2024-12-20 - */ -@Service -public class SalesidServiceImpl implements ISalesidService -{ - @Autowired - private SalesidMapper salesidMapper; - - /** - * 查询卖家信息 - * - * @param id 卖家信息主键 - * @return 卖家信息 - */ - @Override - public Salesid selectSalesidById(Long id) - { - return salesidMapper.selectSalesidById(id); - } - - /** - * 查询卖家信息列表 - * - * @param salesid 卖家信息 - * @return 卖家信息 - */ - @Override - public List selectSalesidList(Salesid salesid) - { - return salesidMapper.selectSalesidList(salesid); - } - - /** - * 新增卖家信息 - * - * @param salesid 卖家信息 - * @return 结果 - */ - @Transactional - @Override - public int insertSalesid(Salesid salesid) - { - int rows = salesidMapper.insertSalesid(salesid); - insertAddress2(salesid); - return rows; - } - - /** - * 修改卖家信息 - * - * @param salesid 卖家信息 - * @return 结果 - */ - @Transactional - @Override - public int updateSalesid(Salesid salesid) - { - salesidMapper.deleteAddress2BySalesid(salesid.getId()); - insertAddress2(salesid); - return salesidMapper.updateSalesid(salesid); - } - - /** - * 批量删除卖家信息 - * - * @param ids 需要删除的卖家信息主键 - * @return 结果 - */ - @Transactional - @Override - public int deleteSalesidByIds(Long[] ids) - { - salesidMapper.deleteAddress2BySalesids(ids); - return salesidMapper.deleteSalesidByIds(ids); - } - - /** - * 删除卖家信息信息 - * - * @param id 卖家信息主键 - * @return 结果 - */ - @Transactional - @Override - public int deleteSalesidById(Long id) - { - salesidMapper.deleteAddress2BySalesid(id); - return salesidMapper.deleteSalesidById(id); - } - - /** - * 新增卖家地址信息 - * - * @param salesid 卖家信息对象 - */ - public void insertAddress2(Salesid salesid) - { - List address2List = salesid.getAddress2List(); - Long id = salesid.getId(); - if (StringUtils.isNotNull(address2List)) - { - List list = new ArrayList(); - for (Address2 address2 : address2List) - { - address2.setSalesid(id); - list.add(address2); - } - if (list.size() > 0) - { - salesidMapper.batchAddress2(list); - } - } - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ShangpinServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ShangpinServiceImpl.java deleted file mode 100644 index a9d785f..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ShangpinServiceImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.system.mapper.ShangpinMapper; -import com.ruoyi.system.domain.Shangpin; -import com.ruoyi.system.service.IShangpinService; - -/** - * 商品Service业务层处理 - * - * @author ruoyi - * @date 2024-12-19 - */ -@Service -public class ShangpinServiceImpl implements IShangpinService -{ - @Autowired - private ShangpinMapper shangpinMapper; - - /** - * 查询商品 - * - * @param id 商品主键 - * @return 商品 - */ - @Override - public Shangpin selectShangpinById(Long id) - { - return shangpinMapper.selectShangpinById(id); - } - - /** - * 查询商品列表 - * - * @param shangpin 商品 - * @return 商品 - */ - @Override - public List selectShangpinList(Shangpin shangpin) - { - return shangpinMapper.selectShangpinList(shangpin); - } - - /** - * 新增商品 - * - * @param shangpin 商品 - * @return 结果 - */ - @Override - public int insertShangpin(Shangpin shangpin) - { - return shangpinMapper.insertShangpin(shangpin); - } - - /** - * 修改商品 - * - * @param shangpin 商品 - * @return 结果 - */ - @Override - public int updateShangpin(Shangpin shangpin) - { - return shangpinMapper.updateShangpin(shangpin); - } - - /** - * 批量删除商品 - * - * @param ids 需要删除的商品主键 - * @return 结果 - */ - @Override - public int deleteShangpinByIds(Long[] ids) - { - return shangpinMapper.deleteShangpinByIds(ids); - } - - /** - * 删除商品信息 - * - * @param id 商品主键 - * @return 结果 - */ - @Override - public int deleteShangpinById(Long id) - { - return shangpinMapper.deleteShangpinById(id); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ShoucangServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ShoucangServiceImpl.java deleted file mode 100644 index fdadc41..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ShoucangServiceImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.system.mapper.ShoucangMapper; -import com.ruoyi.system.domain.Shoucang; -import com.ruoyi.system.service.IShoucangService; - -/** - * 收藏Service业务层处理 - * - * @author ruoyi - * @date 2024-12-18 - */ -@Service -public class ShoucangServiceImpl implements IShoucangService -{ - @Autowired - private ShoucangMapper shoucangMapper; - - /** - * 查询收藏 - * - * @param id 收藏主键 - * @return 收藏 - */ - @Override - public Shoucang selectShoucangById(Long id) - { - return shoucangMapper.selectShoucangById(id); - } - - /** - * 查询收藏列表 - * - * @param shoucang 收藏 - * @return 收藏 - */ - @Override - public List selectShoucangList(Shoucang shoucang) - { - return shoucangMapper.selectShoucangList(shoucang); - } - - /** - * 新增收藏 - * - * @param shoucang 收藏 - * @return 结果 - */ - @Override - public int insertShoucang(Shoucang shoucang) - { - return shoucangMapper.insertShoucang(shoucang); - } - - /** - * 修改收藏 - * - * @param shoucang 收藏 - * @return 结果 - */ - @Override - public int updateShoucang(Shoucang shoucang) - { - return shoucangMapper.updateShoucang(shoucang); - } - - /** - * 批量删除收藏 - * - * @param ids 需要删除的收藏主键 - * @return 结果 - */ - @Override - public int deleteShoucangByIds(Long[] ids) - { - return shoucangMapper.deleteShoucangByIds(ids); - } - - /** - * 删除收藏信息 - * - * @param id 收藏主键 - * @return 结果 - */ - @Override - public int deleteShoucangById(Long id) - { - return shoucangMapper.deleteShoucangById(id); - } -} diff --git a/ruoyi-system/src/main/resources/mapper/system/Address2Mapper.xml b/ruoyi-system/src/main/resources/mapper/system/Address2Mapper.xml deleted file mode 100644 index 66f2b4b..0000000 --- a/ruoyi-system/src/main/resources/mapper/system/Address2Mapper.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - select id, salesid, place from address2 - - - - - - - - insert into address2 - - salesid, - place, - - - #{salesid}, - #{place}, - - - - - update address2 - - salesid = #{salesid}, - place = #{place}, - - where id = #{id} - - - - delete from address2 where id = #{id} - - - - delete from address2 where id in - - #{id} - - - \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/AddressMapper.xml b/ruoyi-system/src/main/resources/mapper/system/AddressMapper.xml deleted file mode 100644 index c6b0cfa..0000000 --- a/ruoyi-system/src/main/resources/mapper/system/AddressMapper.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - select id, personid, place from address - - - - - - - - insert into address - - personid, - place, - - - #{personid}, - #{place}, - - - - - update address - - personid = #{personid}, - place = #{place}, - - where id = #{id} - - - - delete from address where id = #{id} - - - - delete from address where id in - - #{id} - - - \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/FavoriteMapper.xml b/ruoyi-system/src/main/resources/mapper/system/FavoriteMapper.xml index 4120b35..f97f24d 100644 --- a/ruoyi-system/src/main/resources/mapper/system/FavoriteMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/FavoriteMapper.xml @@ -62,23 +62,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/OrderMapper.xml b/ruoyi-system/src/main/resources/mapper/system/OrderMapper.xml index b9360a4..ac93712 100644 --- a/ruoyi-system/src/main/resources/mapper/system/OrderMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/OrderMapper.xml @@ -73,19 +73,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT `order`.id AS id, buyerid, - person.`name` AS buyername, - person.picture AS buyerpicture, + p1.`name` AS buyername, + p1.picture AS buyerpicture, commodityid, commodity.`name` AS commodityname, commodity.picture AS commoditypicture, + sellerid, + p2.`name` AS sellername, + p2.picture AS sellerpicture, price, - `order`.time AS time + classification, + description, + state, + commodity.time AS commoditytime, + `order`.time AS time, + `status` FROM `order`, - person, + person p1, + person p2, commodity WHERE - `order`.buyerid = person.id + `order`.buyerid = #{buyerid} + AND `order`.buyerid = p1.id AND `order`.commodityid = commodity.id + AND commodity.sellerid = p2.id \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/PersonMapper.xml b/ruoyi-system/src/main/resources/mapper/system/PersonMapper.xml index d9fc86d..b45167f 100644 --- a/ruoyi-system/src/main/resources/mapper/system/PersonMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/PersonMapper.xml @@ -88,4 +88,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{id} + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/SalesidMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SalesidMapper.xml deleted file mode 100644 index 1abaab6..0000000 --- a/ruoyi-system/src/main/resources/mapper/system/SalesidMapper.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - select id, image, name, xingbie, age, phone, xueyuan, zhuanye from salesid - - - - - - - - - - insert into salesid - - image, - name, - xingbie, - age, - phone, - xueyuan, - zhuanye, - - - #{image}, - #{name}, - #{xingbie}, - #{age}, - #{phone}, - #{xueyuan}, - #{zhuanye}, - - - - - update salesid - - image = #{image}, - name = #{name}, - xingbie = #{xingbie}, - age = #{age}, - phone = #{phone}, - xueyuan = #{xueyuan}, - zhuanye = #{zhuanye}, - - where id = #{id} - - - - delete from salesid where id = #{id} - - - - delete from salesid where id in - - #{id} - - - - - delete from address2 where salesid in - - #{salesid} - - - - - delete from address2 where salesid = #{salesid} - - - - insert into address2( id, salesid, place) values - - ( #{item.id}, #{item.salesid}, #{item.place}) - - - \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/ShangpinMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ShangpinMapper.xml deleted file mode 100644 index e090e84..0000000 --- a/ruoyi-system/src/main/resources/mapper/system/ShangpinMapper.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - select id, name, salesid, price, producttype, productdescription, productimage, productstatus, date, pingjia, dianjiliang, shoucang from shangpin - - - - - - - - insert into shangpin - - name, - salesid, - price, - producttype, - productdescription, - productimage, - productstatus, - date, - pingjia, - dianjiliang, - shoucang, - - - #{name}, - #{salesid}, - #{price}, - #{producttype}, - #{productdescription}, - #{productimage}, - #{productstatus}, - #{date}, - #{pingjia}, - #{dianjiliang}, - #{shoucang}, - - - - - update shangpin - - name = #{name}, - salesid = #{salesid}, - price = #{price}, - producttype = #{producttype}, - productdescription = #{productdescription}, - productimage = #{productimage}, - productstatus = #{productstatus}, - date = #{date}, - pingjia = #{pingjia}, - dianjiliang = #{dianjiliang}, - shoucang = #{shoucang}, - - where id = #{id} - - - - delete from shangpin where id = #{id} - - - - delete from shangpin where id in - - #{id} - - - \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/ShoucangMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ShoucangMapper.xml deleted file mode 100644 index f444045..0000000 --- a/ruoyi-system/src/main/resources/mapper/system/ShoucangMapper.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - select id, shangpinid, personid from shoucang - - - - - - - - insert into shoucang - - shangpinid, - personid, - - - #{shangpinid}, - #{personid}, - - - - - update shoucang - - shangpinid = #{shangpinid}, - personid = #{personid}, - - where id = #{id} - - - - delete from shoucang where id = #{id} - - - - delete from shoucang where id in - - #{id} - - - \ No newline at end of file