Idea代码12月23日提交

This commit is contained in:
Levi 2024-12-23 01:17:28 +08:00
parent bb37d0e5f1
commit a5408cf633
38 changed files with 232 additions and 2627 deletions

View File

@ -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<Address2> 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<Address2> list = address2Service.selectAddress2List(address2);
ExcelUtil<Address2> util = new ExcelUtil<Address2>(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));
}
}

View File

@ -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<Address> 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<Address> list = addressService.selectAddressList(address);
ExcelUtil<Address> util = new ExcelUtil<Address>(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));
}
}

View File

@ -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<Person> list = personService.selectPersonList(person);
ExcelUtil<Person> util = new ExcelUtil<Person>(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));
}
}

View File

@ -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<Salesid> 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<Salesid> list = salesidService.selectSalesidList(salesid);
ExcelUtil<Salesid> util = new ExcelUtil<Salesid>(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));
}
}

View File

@ -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<Shangpin> 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<Shangpin> list = shangpinService.selectShangpinList(shangpin);
ExcelUtil<Shangpin> util = new ExcelUtil<Shangpin>(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));
}
}

View File

@ -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<Shoucang> 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<Shoucang> list = shoucangService.selectShoucangList(shoucang);
ExcelUtil<Shoucang> util = new ExcelUtil<Shoucang>(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));
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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;
}

View File

@ -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

View File

@ -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<Address2> 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<Address2> getAddress2List()
{
return address2List;
}
public void setAddress2List(List<Address2> 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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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<Address2> 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);
}

View File

@ -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<Address> 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);
}

View File

@ -58,4 +58,6 @@ public interface PersonMapper
* @return 结果
*/
public int deletePersonByIds(Long[] ids);
public Person login(Person person);
}

View File

@ -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<Shangpin> 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);
}

View File

@ -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<Shoucang> 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);
}

View File

@ -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<Address2> 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);
}

View File

@ -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<Address> 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);
}

View File

@ -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);
}

View File

@ -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<Salesid> 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);
}

View File

@ -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<Shangpin> 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);
}

View File

@ -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<Shoucang> 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);
}

View File

@ -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<Address2> 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);
}
}

View File

@ -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<Address> 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);
}
}

View File

@ -90,4 +90,8 @@ public class PersonServiceImpl implements IPersonService
{
return personMapper.deletePersonById(id);
}
public Person login(Person person){
return personMapper.login(person);
}
}

View File

@ -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<Salesid> 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<Address2> address2List = salesid.getAddress2List();
Long id = salesid.getId();
if (StringUtils.isNotNull(address2List))
{
List<Address2> list = new ArrayList<Address2>();
for (Address2 address2 : address2List)
{
address2.setSalesid(id);
list.add(address2);
}
if (list.size() > 0)
{
salesidMapper.batchAddress2(list);
}
}
}
}

View File

@ -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<Shangpin> 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);
}
}

View File

@ -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<Shoucang> 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);
}
}

View File

@ -1,61 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.Address2Mapper">
<resultMap type="Address2" id="Address2Result">
<result property="id" column="id" />
<result property="salesid" column="salesid" />
<result property="place" column="place" />
</resultMap>
<sql id="selectAddress2Vo">
select id, salesid, place from address2
</sql>
<select id="selectAddress2List" parameterType="Address2" resultMap="Address2Result">
<include refid="selectAddress2Vo"/>
<where>
<if test="salesid != null "> and salesid = #{salesid}</if>
<if test="place != null and place != ''"> and place = #{place}</if>
</where>
</select>
<select id="selectAddress2ById" parameterType="Long" resultMap="Address2Result">
<include refid="selectAddress2Vo"/>
where id = #{id}
</select>
<insert id="insertAddress2" parameterType="Address2" useGeneratedKeys="true" keyProperty="id">
insert into address2
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="salesid != null">salesid,</if>
<if test="place != null">place,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="salesid != null">#{salesid},</if>
<if test="place != null">#{place},</if>
</trim>
</insert>
<update id="updateAddress2" parameterType="Address2">
update address2
<trim prefix="SET" suffixOverrides=",">
<if test="salesid != null">salesid = #{salesid},</if>
<if test="place != null">place = #{place},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAddress2ById" parameterType="Long">
delete from address2 where id = #{id}
</delete>
<delete id="deleteAddress2ByIds" parameterType="String">
delete from address2 where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -1,61 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.AddressMapper">
<resultMap type="Address" id="AddressResult">
<result property="id" column="id" />
<result property="personid" column="personid" />
<result property="place" column="place" />
</resultMap>
<sql id="selectAddressVo">
select id, personid, place from address
</sql>
<select id="selectAddressList" parameterType="Address" resultMap="AddressResult">
<include refid="selectAddressVo"/>
<where>
<if test="personid != null "> and personid = #{personid}</if>
<if test="place != null and place != ''"> and place = #{place}</if>
</where>
</select>
<select id="selectAddressById" parameterType="Long" resultMap="AddressResult">
<include refid="selectAddressVo"/>
where id = #{id}
</select>
<insert id="insertAddress" parameterType="Address" useGeneratedKeys="true" keyProperty="id">
insert into address
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="personid != null">personid,</if>
<if test="place != null">place,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="personid != null">#{personid},</if>
<if test="place != null">#{place},</if>
</trim>
</insert>
<update id="updateAddress" parameterType="Address">
update address
<trim prefix="SET" suffixOverrides=",">
<if test="personid != null">personid = #{personid},</if>
<if test="place != null">place = #{place},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAddressById" parameterType="Long">
delete from address where id = #{id}
</delete>
<delete id="deleteAddressByIds" parameterType="String">
delete from address where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -62,23 +62,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectFavoriteList2" parameterType="Long" resultType="Favorite">
SELECT
favorite.id AS id,
person.`name` AS personname,
person.picture AS personpicture,
personid,
p1.`name` AS personname,
p1.picture AS personpicture,
commodityid,
commodity.`name` AS commodityname,
commodity.picture AS commoditypicture,
sellerid,
p2.`name` AS sellername,
p2.picture AS sellerpicture,
price,
classification,
description,
commodity.picture AS commoditypicture,
state,
time
FROM
favorite,
commodity,
person
person p1,
person p2
WHERE
personid = #{personid}
AND favorite.commodityid = commodity.id
AND favorite.personid = person.id
AND favorite.personid = p1.id
AND sellerid = p2.id
</select>
</mapper>

View File

@ -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
</select>
</mapper>

View File

@ -88,4 +88,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<select id="login" parameterType="Person" resultType="Person">
SELECT
id,
`name`,
picture,
phone
FROM
person
WHERE
phone = #{phone}
AND `password` = #{password}
</select>
</mapper>

View File

@ -1,121 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SalesidMapper">
<resultMap type="Salesid" id="SalesidResult">
<result property="id" column="id" />
<result property="image" column="image" />
<result property="name" column="name" />
<result property="xingbie" column="xingbie" />
<result property="age" column="age" />
<result property="phone" column="phone" />
<result property="xueyuan" column="xueyuan" />
<result property="zhuanye" column="zhuanye" />
</resultMap>
<resultMap id="SalesidAddress2Result" type="Salesid" extends="SalesidResult">
<collection property="address2List" ofType="Address2" column="id" select="selectAddress2List" />
</resultMap>
<resultMap type="Address2" id="Address2Result">
<result property="id" column="id" />
<result property="salesid" column="salesid" />
<result property="place" column="place" />
</resultMap>
<sql id="selectSalesidVo">
select id, image, name, xingbie, age, phone, xueyuan, zhuanye from salesid
</sql>
<select id="selectSalesidList" parameterType="Salesid" resultMap="SalesidResult">
<include refid="selectSalesidVo"/>
<where>
<if test="image != null and image != ''"> and image = #{image}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="xingbie != null and xingbie != ''"> and xingbie = #{xingbie}</if>
<if test="age != null "> and age = #{age}</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="xueyuan != null and xueyuan != ''"> and xueyuan = #{xueyuan}</if>
<if test="zhuanye != null and zhuanye != ''"> and zhuanye = #{zhuanye}</if>
</where>
</select>
<select id="selectSalesidById" parameterType="Long" resultMap="SalesidAddress2Result">
select id, image, name, xingbie, age, phone, xueyuan, zhuanye
from salesid
where id = #{id}
</select>
<select id="selectAddress2List" resultMap="Address2Result">
select id, salesid, place
from address2
where salesid = #{salesid}
</select>
<insert id="insertSalesid" parameterType="Salesid" useGeneratedKeys="true" keyProperty="id">
insert into salesid
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="image != null">image,</if>
<if test="name != null">name,</if>
<if test="xingbie != null">xingbie,</if>
<if test="age != null">age,</if>
<if test="phone != null">phone,</if>
<if test="xueyuan != null">xueyuan,</if>
<if test="zhuanye != null">zhuanye,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="image != null">#{image},</if>
<if test="name != null">#{name},</if>
<if test="xingbie != null">#{xingbie},</if>
<if test="age != null">#{age},</if>
<if test="phone != null">#{phone},</if>
<if test="xueyuan != null">#{xueyuan},</if>
<if test="zhuanye != null">#{zhuanye},</if>
</trim>
</insert>
<update id="updateSalesid" parameterType="Salesid">
update salesid
<trim prefix="SET" suffixOverrides=",">
<if test="image != null">image = #{image},</if>
<if test="name != null">name = #{name},</if>
<if test="xingbie != null">xingbie = #{xingbie},</if>
<if test="age != null">age = #{age},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="xueyuan != null">xueyuan = #{xueyuan},</if>
<if test="zhuanye != null">zhuanye = #{zhuanye},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSalesidById" parameterType="Long">
delete from salesid where id = #{id}
</delete>
<delete id="deleteSalesidByIds" parameterType="String">
delete from salesid where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<delete id="deleteAddress2BySalesids" parameterType="String">
delete from address2 where salesid in
<foreach item="salesid" collection="array" open="(" separator="," close=")">
#{salesid}
</foreach>
</delete>
<delete id="deleteAddress2BySalesid" parameterType="Long">
delete from address2 where salesid = #{salesid}
</delete>
<insert id="batchAddress2">
insert into address2( id, salesid, place) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.salesid}, #{item.place})
</foreach>
</insert>
</mapper>

View File

@ -1,106 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.ShangpinMapper">
<resultMap type="Shangpin" id="ShangpinResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="salesid" column="salesid" />
<result property="price" column="price" />
<result property="producttype" column="producttype" />
<result property="productdescription" column="productdescription" />
<result property="productimage" column="productimage" />
<result property="productstatus" column="productstatus" />
<result property="date" column="date" />
<result property="pingjia" column="pingjia" />
<result property="dianjiliang" column="dianjiliang" />
<result property="shoucang" column="shoucang" />
</resultMap>
<sql id="selectShangpinVo">
select id, name, salesid, price, producttype, productdescription, productimage, productstatus, date, pingjia, dianjiliang, shoucang from shangpin
</sql>
<select id="selectShangpinList" parameterType="Shangpin" resultMap="ShangpinResult">
<include refid="selectShangpinVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="salesid != null "> and salesid = #{salesid}</if>
<if test="price != null "> and price = #{price}</if>
<if test="producttype != null and producttype != ''"> and producttype = #{producttype}</if>
<if test="productdescription != null and productdescription != ''"> and productdescription = #{productdescription}</if>
<if test="productimage != null and productimage != ''"> and productimage = #{productimage}</if>
<if test="productstatus != null and productstatus != ''"> and productstatus = #{productstatus}</if>
<if test="date != null "> and date = #{date}</if>
<if test="pingjia != null and pingjia != ''"> and pingjia = #{pingjia}</if>
<if test="dianjiliang != null and dianjiliang != ''"> and dianjiliang = #{dianjiliang}</if>
<if test="shoucang != null and shoucang != ''"> and shoucang = #{shoucang}</if>
</where>
</select>
<select id="selectShangpinById" parameterType="Long" resultMap="ShangpinResult">
<include refid="selectShangpinVo"/>
where id = #{id}
</select>
<insert id="insertShangpin" parameterType="Shangpin" useGeneratedKeys="true" keyProperty="id">
insert into shangpin
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="salesid != null">salesid,</if>
<if test="price != null">price,</if>
<if test="producttype != null">producttype,</if>
<if test="productdescription != null">productdescription,</if>
<if test="productimage != null">productimage,</if>
<if test="productstatus != null">productstatus,</if>
<if test="date != null">date,</if>
<if test="pingjia != null">pingjia,</if>
<if test="dianjiliang != null">dianjiliang,</if>
<if test="shoucang != null">shoucang,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="salesid != null">#{salesid},</if>
<if test="price != null">#{price},</if>
<if test="producttype != null">#{producttype},</if>
<if test="productdescription != null">#{productdescription},</if>
<if test="productimage != null">#{productimage},</if>
<if test="productstatus != null">#{productstatus},</if>
<if test="date != null">#{date},</if>
<if test="pingjia != null">#{pingjia},</if>
<if test="dianjiliang != null">#{dianjiliang},</if>
<if test="shoucang != null">#{shoucang},</if>
</trim>
</insert>
<update id="updateShangpin" parameterType="Shangpin">
update shangpin
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="salesid != null">salesid = #{salesid},</if>
<if test="price != null">price = #{price},</if>
<if test="producttype != null">producttype = #{producttype},</if>
<if test="productdescription != null">productdescription = #{productdescription},</if>
<if test="productimage != null">productimage = #{productimage},</if>
<if test="productstatus != null">productstatus = #{productstatus},</if>
<if test="date != null">date = #{date},</if>
<if test="pingjia != null">pingjia = #{pingjia},</if>
<if test="dianjiliang != null">dianjiliang = #{dianjiliang},</if>
<if test="shoucang != null">shoucang = #{shoucang},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteShangpinById" parameterType="Long">
delete from shangpin where id = #{id}
</delete>
<delete id="deleteShangpinByIds" parameterType="String">
delete from shangpin where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -1,61 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.ShoucangMapper">
<resultMap type="Shoucang" id="ShoucangResult">
<result property="id" column="id" />
<result property="shangpinid" column="shangpinid" />
<result property="personid" column="personid" />
</resultMap>
<sql id="selectShoucangVo">
select id, shangpinid, personid from shoucang
</sql>
<select id="selectShoucangList" parameterType="Shoucang" resultMap="ShoucangResult">
<include refid="selectShoucangVo"/>
<where>
<if test="shangpinid != null "> and shangpinid = #{shangpinid}</if>
<if test="personid != null "> and personid = #{personid}</if>
</where>
</select>
<select id="selectShoucangById" parameterType="Long" resultMap="ShoucangResult">
<include refid="selectShoucangVo"/>
where id = #{id}
</select>
<insert id="insertShoucang" parameterType="Shoucang" useGeneratedKeys="true" keyProperty="id">
insert into shoucang
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="shangpinid != null">shangpinid,</if>
<if test="personid != null">personid,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="shangpinid != null">#{shangpinid},</if>
<if test="personid != null">#{personid},</if>
</trim>
</insert>
<update id="updateShoucang" parameterType="Shoucang">
update shoucang
<trim prefix="SET" suffixOverrides=",">
<if test="shangpinid != null">shangpinid = #{shangpinid},</if>
<if test="personid != null">personid = #{personid},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteShoucangById" parameterType="Long">
delete from shoucang where id = #{id}
</delete>
<delete id="deleteShoucangByIds" parameterType="String">
delete from shoucang where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>