diff --git a/hope-winery/src/main/java/com/ruoyi/winery/controller/WineryFoodSafetyController.java b/hope-winery/src/main/java/com/ruoyi/winery/controller/WineryFoodSafetyController.java new file mode 100644 index 000000000..598d82c56 --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/controller/WineryFoodSafetyController.java @@ -0,0 +1,143 @@ +package com.ruoyi.winery.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; + +import java.util.List; +import java.util.Arrays; + +import com.ruoyi.common.utils.StringUtils; +import lombok.RequiredArgsConstructor; +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.winery.domain.WineryFoodSafety; +import com.ruoyi.winery.service.IWineryFoodSafetyService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 食品安全详情Controller + * + * @author ruoyi + * @date 2020-12-28 + */ +@RequiredArgsConstructor(onConstructor_ = @Autowired) +@RestController +@RequestMapping("/winery/food_safety" ) +public class WineryFoodSafetyController extends BaseController { + + private final IWineryFoodSafetyService iWineryFoodSafetyService; + + /** + * 查询食品安全详情列表 + */ + @PreAuthorize("@ss.hasPermi('winery:food_safety:list')") + @GetMapping("/list") + public TableDataInfo list(WineryFoodSafety wineryFoodSafety) + { + startPage(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(wineryFoodSafety); + if (wineryFoodSafety.getDeptId() != null){ + lqw.eq(WineryFoodSafety::getDeptId ,wineryFoodSafety.getDeptId()); + } + if (StringUtils.isNotBlank(wineryFoodSafety.getProdLicense())){ + lqw.eq(WineryFoodSafety::getProdLicense ,wineryFoodSafety.getProdLicense()); + } + if (StringUtils.isNotBlank(wineryFoodSafety.getStandardId())){ + lqw.eq(WineryFoodSafety::getStandardId ,wineryFoodSafety.getStandardId()); + } + if (StringUtils.isNotBlank(wineryFoodSafety.getMakerName())){ + lqw.like(WineryFoodSafety::getMakerName ,wineryFoodSafety.getMakerName()); + } + if (StringUtils.isNotBlank(wineryFoodSafety.getMakerAddress())){ + lqw.eq(WineryFoodSafety::getMakerAddress ,wineryFoodSafety.getMakerAddress()); + } + if (StringUtils.isNotBlank(wineryFoodSafety.getMakerContact())){ + lqw.eq(WineryFoodSafety::getMakerContact ,wineryFoodSafety.getMakerContact()); + } + if (StringUtils.isNotBlank(wineryFoodSafety.getIngredients())){ + lqw.eq(WineryFoodSafety::getIngredients ,wineryFoodSafety.getIngredients()); + } + if (wineryFoodSafety.getPeriod() != null){ + lqw.eq(WineryFoodSafety::getPeriod ,wineryFoodSafety.getPeriod()); + } + if (StringUtils.isNotBlank(wineryFoodSafety.getWineLevel())){ + lqw.eq(WineryFoodSafety::getWineLevel ,wineryFoodSafety.getWineLevel()); + } + if (StringUtils.isNotBlank(wineryFoodSafety.getStorageMode())){ + lqw.eq(WineryFoodSafety::getStorageMode ,wineryFoodSafety.getStorageMode()); + } + if (StringUtils.isNotBlank(wineryFoodSafety.getSupplier())){ + lqw.eq(WineryFoodSafety::getSupplier ,wineryFoodSafety.getSupplier()); + } + if (wineryFoodSafety.getMakeDate() != null){ + lqw.eq(WineryFoodSafety::getMakeDate ,wineryFoodSafety.getMakeDate()); + } + List list = iWineryFoodSafetyService.list(lqw); + return getDataTable(list); + } + + /** + * 导出食品安全详情列表 + */ + @PreAuthorize("@ss.hasPermi('winery:food_safety:export')" ) + @Log(title = "食品安全详情" , businessType = BusinessType.EXPORT) + @GetMapping("/export" ) + public AjaxResult export(WineryFoodSafety wineryFoodSafety) { + LambdaQueryWrapper lqw = new LambdaQueryWrapper(wineryFoodSafety); + List list = iWineryFoodSafetyService.list(lqw); + ExcelUtil util = new ExcelUtil(WineryFoodSafety. class); + return util.exportExcel(list, "food_safety" ); + } + + /** + * 获取食品安全详情详细信息 + */ + @PreAuthorize("@ss.hasPermi('winery:food_safety:query')" ) + @GetMapping(value = "/{id}" ) + public AjaxResult getInfo(@PathVariable("id" ) Long id) { + return AjaxResult.success(iWineryFoodSafetyService.getById(id)); + } + + /** + * 新增食品安全详情 + */ + @PreAuthorize("@ss.hasPermi('winery:food_safety:add')" ) + @Log(title = "食品安全详情" , businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody WineryFoodSafety wineryFoodSafety) { + return toAjax(iWineryFoodSafetyService.save(wineryFoodSafety) ? 1 : 0); + } + + /** + * 修改食品安全详情 + */ + @PreAuthorize("@ss.hasPermi('winery:food_safety:edit')" ) + @Log(title = "食品安全详情" , businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody WineryFoodSafety wineryFoodSafety) { + return toAjax(iWineryFoodSafetyService.updateById(wineryFoodSafety) ? 1 : 0); + } + + /** + * 删除食品安全详情 + */ + @PreAuthorize("@ss.hasPermi('winery:food_safety:remove')" ) + @Log(title = "食品安全详情" , businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}" ) + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(iWineryFoodSafetyService.removeByIds(Arrays.asList(ids)) ? 1 : 0); + } +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/controller/WineryGoodsController.java b/hope-winery/src/main/java/com/ruoyi/winery/controller/WineryGoodsController.java new file mode 100644 index 000000000..0f4e2e1bb --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/controller/WineryGoodsController.java @@ -0,0 +1,131 @@ +package com.ruoyi.winery.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; + +import java.util.List; +import java.util.Arrays; + +import com.ruoyi.common.utils.StringUtils; +import lombok.RequiredArgsConstructor; +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.winery.domain.WineryGoods; +import com.ruoyi.winery.service.IWineryGoodsService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 商品信息Controller + * + * @author ruoyi + * @date 2020-12-28 + */ +@RequiredArgsConstructor(onConstructor_ = @Autowired) +@RestController +@RequestMapping("/winery/winery_goods" ) +public class WineryGoodsController extends BaseController { + + private final IWineryGoodsService iWineryGoodsService; + + /** + * 查询商品信息列表 + */ + @PreAuthorize("@ss.hasPermi('winery:winery_goods:list')") + @GetMapping("/list") + public TableDataInfo list(WineryGoods wineryGoods) + { + startPage(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(wineryGoods); + if (wineryGoods.getDeptId() != null){ + lqw.eq(WineryGoods::getDeptId ,wineryGoods.getDeptId()); + } + if (StringUtils.isNotBlank(wineryGoods.getGoodsName())){ + lqw.like(WineryGoods::getGoodsName ,wineryGoods.getGoodsName()); + } + if (StringUtils.isNotBlank(wineryGoods.getGoodsAlias())){ + lqw.eq(WineryGoods::getGoodsAlias ,wineryGoods.getGoodsAlias()); + } + if (StringUtils.isNotBlank(wineryGoods.getGoodsType())){ + lqw.eq(WineryGoods::getGoodsType ,wineryGoods.getGoodsType()); + } + if (StringUtils.isNotBlank(wineryGoods.getGoodsSpec())){ + lqw.eq(WineryGoods::getGoodsSpec ,wineryGoods.getGoodsSpec()); + } + if (StringUtils.isNotBlank(wineryGoods.getGoodDesc())){ + lqw.eq(WineryGoods::getGoodDesc ,wineryGoods.getGoodDesc()); + } + if (StringUtils.isNotBlank(wineryGoods.getGoodFaceImg())){ + lqw.eq(WineryGoods::getGoodFaceImg ,wineryGoods.getGoodFaceImg()); + } + if (StringUtils.isNotBlank(wineryGoods.getGoodImg())){ + lqw.eq(WineryGoods::getGoodImg ,wineryGoods.getGoodImg()); + } + List list = iWineryGoodsService.list(lqw); + return getDataTable(list); + } + + /** + * 导出商品信息列表 + */ + @PreAuthorize("@ss.hasPermi('winery:winery_goods:export')" ) + @Log(title = "商品信息" , businessType = BusinessType.EXPORT) + @GetMapping("/export" ) + public AjaxResult export(WineryGoods wineryGoods) { + LambdaQueryWrapper lqw = new LambdaQueryWrapper(wineryGoods); + List list = iWineryGoodsService.list(lqw); + ExcelUtil util = new ExcelUtil(WineryGoods. class); + return util.exportExcel(list, "winery_goods" ); + } + + /** + * 获取商品信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('winery:winery_goods:query')" ) + @GetMapping(value = "/{id}" ) + public AjaxResult getInfo(@PathVariable("id" ) Long id) { + return AjaxResult.success(iWineryGoodsService.getById(id)); + } + + /** + * 新增商品信息 + */ + @PreAuthorize("@ss.hasPermi('winery:winery_goods:add')" ) + @Log(title = "商品信息" , businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody WineryGoods wineryGoods) { + return toAjax(iWineryGoodsService.save(wineryGoods) ? 1 : 0); + } + + /** + * 修改商品信息 + */ + @PreAuthorize("@ss.hasPermi('winery:winery_goods:edit')" ) + @Log(title = "商品信息" , businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody WineryGoods wineryGoods) { + return toAjax(iWineryGoodsService.updateById(wineryGoods) ? 1 : 0); + } + + /** + * 删除商品信息 + */ + @PreAuthorize("@ss.hasPermi('winery:winery_goods:remove')" ) + @Log(title = "商品信息" , businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}" ) + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(iWineryGoodsService.removeByIds(Arrays.asList(ids)) ? 1 : 0); + } +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/controller/WineryGoodsSpecController.java b/hope-winery/src/main/java/com/ruoyi/winery/controller/WineryGoodsSpecController.java new file mode 100644 index 000000000..3c89e6194 --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/controller/WineryGoodsSpecController.java @@ -0,0 +1,125 @@ +package com.ruoyi.winery.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; + +import java.util.List; +import java.util.Arrays; + +import com.ruoyi.common.utils.StringUtils; +import lombok.RequiredArgsConstructor; +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.winery.domain.WineryGoodsSpec; +import com.ruoyi.winery.service.IWineryGoodsSpecService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 商品规格Controller + * + * @author ruoyi + * @date 2020-12-28 + */ +@RequiredArgsConstructor(onConstructor_ = @Autowired) +@RestController +@RequestMapping("/winery/spec" ) +public class WineryGoodsSpecController extends BaseController { + + private final IWineryGoodsSpecService iWineryGoodsSpecService; + + /** + * 查询商品规格列表 + */ + @PreAuthorize("@ss.hasPermi('winery:spec:list')") + @GetMapping("/list") + public TableDataInfo list(WineryGoodsSpec wineryGoodsSpec) + { + startPage(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(wineryGoodsSpec); + if (wineryGoodsSpec.getDeptId() != null){ + lqw.eq(WineryGoodsSpec::getDeptId ,wineryGoodsSpec.getDeptId()); + } + if (StringUtils.isNotBlank(wineryGoodsSpec.getSpecName())){ + lqw.like(WineryGoodsSpec::getSpecName ,wineryGoodsSpec.getSpecName()); + } + if (StringUtils.isNotBlank(wineryGoodsSpec.getSpecDesc())){ + lqw.eq(WineryGoodsSpec::getSpecDesc ,wineryGoodsSpec.getSpecDesc()); + } + if (StringUtils.isNotBlank(wineryGoodsSpec.getSpecImg())){ + lqw.eq(WineryGoodsSpec::getSpecImg ,wineryGoodsSpec.getSpecImg()); + } + if (wineryGoodsSpec.getSpecPrice() != null){ + lqw.eq(WineryGoodsSpec::getSpecPrice ,wineryGoodsSpec.getSpecPrice()); + } + if (wineryGoodsSpec.getDetailSpec() != null){ + lqw.eq(WineryGoodsSpec::getDetailSpec ,wineryGoodsSpec.getDetailSpec()); + } + List list = iWineryGoodsSpecService.list(lqw); + return getDataTable(list); + } + + /** + * 导出商品规格列表 + */ + @PreAuthorize("@ss.hasPermi('winery:spec:export')" ) + @Log(title = "商品规格" , businessType = BusinessType.EXPORT) + @GetMapping("/export" ) + public AjaxResult export(WineryGoodsSpec wineryGoodsSpec) { + LambdaQueryWrapper lqw = new LambdaQueryWrapper(wineryGoodsSpec); + List list = iWineryGoodsSpecService.list(lqw); + ExcelUtil util = new ExcelUtil(WineryGoodsSpec. class); + return util.exportExcel(list, "spec" ); + } + + /** + * 获取商品规格详细信息 + */ + @PreAuthorize("@ss.hasPermi('winery:spec:query')" ) + @GetMapping(value = "/{id}" ) + public AjaxResult getInfo(@PathVariable("id" ) Long id) { + return AjaxResult.success(iWineryGoodsSpecService.getById(id)); + } + + /** + * 新增商品规格 + */ + @PreAuthorize("@ss.hasPermi('winery:spec:add')" ) + @Log(title = "商品规格" , businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody WineryGoodsSpec wineryGoodsSpec) { + return toAjax(iWineryGoodsSpecService.save(wineryGoodsSpec) ? 1 : 0); + } + + /** + * 修改商品规格 + */ + @PreAuthorize("@ss.hasPermi('winery:spec:edit')" ) + @Log(title = "商品规格" , businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody WineryGoodsSpec wineryGoodsSpec) { + return toAjax(iWineryGoodsSpecService.updateById(wineryGoodsSpec) ? 1 : 0); + } + + /** + * 删除商品规格 + */ + @PreAuthorize("@ss.hasPermi('winery:spec:remove')" ) + @Log(title = "商品规格" , businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}" ) + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(iWineryGoodsSpecService.removeByIds(Arrays.asList(ids)) ? 1 : 0); + } +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/controller/WineryOrdersController.java b/hope-winery/src/main/java/com/ruoyi/winery/controller/WineryOrdersController.java new file mode 100644 index 000000000..f0464075c --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/controller/WineryOrdersController.java @@ -0,0 +1,134 @@ +package com.ruoyi.winery.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; + +import java.util.List; +import java.util.Arrays; + +import com.ruoyi.common.utils.StringUtils; +import lombok.RequiredArgsConstructor; +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.winery.domain.WineryOrders; +import com.ruoyi.winery.service.IWineryOrdersService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 客户订单Controller + * + * @author ruoyi + * @date 2020-12-28 + */ +@RequiredArgsConstructor(onConstructor_ = @Autowired) +@RestController +@RequestMapping("/winery/user_orders" ) +public class WineryOrdersController extends BaseController { + + private final IWineryOrdersService iWineryOrdersService; + + /** + * 查询客户订单列表 + */ + @PreAuthorize("@ss.hasPermi('winery:user_orders:list')") + @GetMapping("/list") + public TableDataInfo list(WineryOrders wineryOrders) + { + startPage(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(wineryOrders); + if (wineryOrders.getDeptId() != null){ + lqw.eq(WineryOrders::getDeptId ,wineryOrders.getDeptId()); + } + if (wineryOrders.getGoodsId() != null){ + lqw.eq(WineryOrders::getGoodsId ,wineryOrders.getGoodsId()); + } + if (StringUtils.isNotBlank(wineryOrders.getGoodsName())){ + lqw.like(WineryOrders::getGoodsName ,wineryOrders.getGoodsName()); + } + if (StringUtils.isNotBlank(wineryOrders.getGoodsType())){ + lqw.eq(WineryOrders::getGoodsType ,wineryOrders.getGoodsType()); + } + if (StringUtils.isNotBlank(wineryOrders.getGoodsSpec())){ + lqw.eq(WineryOrders::getGoodsSpec ,wineryOrders.getGoodsSpec()); + } + if (StringUtils.isNotBlank(wineryOrders.getGoodsFaceImg())){ + lqw.eq(WineryOrders::getGoodsFaceImg ,wineryOrders.getGoodsFaceImg()); + } + if (wineryOrders.getGoodsPrice() != null){ + lqw.eq(WineryOrders::getGoodsPrice ,wineryOrders.getGoodsPrice()); + } + if (wineryOrders.getGoodsCount() != null){ + lqw.eq(WineryOrders::getGoodsCount ,wineryOrders.getGoodsCount()); + } + if (wineryOrders.getOrderStatus() != null){ + lqw.eq(WineryOrders::getOrderStatus ,wineryOrders.getOrderStatus()); + } + List list = iWineryOrdersService.list(lqw); + return getDataTable(list); + } + + /** + * 导出客户订单列表 + */ + @PreAuthorize("@ss.hasPermi('winery:user_orders:export')" ) + @Log(title = "客户订单" , businessType = BusinessType.EXPORT) + @GetMapping("/export" ) + public AjaxResult export(WineryOrders wineryOrders) { + LambdaQueryWrapper lqw = new LambdaQueryWrapper(wineryOrders); + List list = iWineryOrdersService.list(lqw); + ExcelUtil util = new ExcelUtil(WineryOrders. class); + return util.exportExcel(list, "user_orders" ); + } + + /** + * 获取客户订单详细信息 + */ + @PreAuthorize("@ss.hasPermi('winery:user_orders:query')" ) + @GetMapping(value = "/{id}" ) + public AjaxResult getInfo(@PathVariable("id" ) Long id) { + return AjaxResult.success(iWineryOrdersService.getById(id)); + } + + /** + * 新增客户订单 + */ + @PreAuthorize("@ss.hasPermi('winery:user_orders:add')" ) + @Log(title = "客户订单" , businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody WineryOrders wineryOrders) { + return toAjax(iWineryOrdersService.save(wineryOrders) ? 1 : 0); + } + + /** + * 修改客户订单 + */ + @PreAuthorize("@ss.hasPermi('winery:user_orders:edit')" ) + @Log(title = "客户订单" , businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody WineryOrders wineryOrders) { + return toAjax(iWineryOrdersService.updateById(wineryOrders) ? 1 : 0); + } + + /** + * 删除客户订单 + */ + @PreAuthorize("@ss.hasPermi('winery:user_orders:remove')" ) + @Log(title = "客户订单" , businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}" ) + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(iWineryOrdersService.removeByIds(Arrays.asList(ids)) ? 1 : 0); + } +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/controller/WineryWineSpecDetailController.java b/hope-winery/src/main/java/com/ruoyi/winery/controller/WineryWineSpecDetailController.java new file mode 100644 index 000000000..005615b30 --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/controller/WineryWineSpecDetailController.java @@ -0,0 +1,146 @@ +package com.ruoyi.winery.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; + +import java.util.List; +import java.util.Arrays; + +import com.ruoyi.common.utils.StringUtils; +import lombok.RequiredArgsConstructor; +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.winery.domain.WineryWineSpecDetail; +import com.ruoyi.winery.service.IWineryWineSpecDetailService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 葡萄酒规格详情Controller + * + * @author ruoyi + * @date 2020-12-28 + */ +@RequiredArgsConstructor(onConstructor_ = @Autowired) +@RestController +@RequestMapping("/winery/wine_detail" ) +public class WineryWineSpecDetailController extends BaseController { + + private final IWineryWineSpecDetailService iWineryWineSpecDetailService; + + /** + * 查询葡萄酒规格详情列表 + */ + @PreAuthorize("@ss.hasPermi('winery:wine_detail:list')") + @GetMapping("/list") + public TableDataInfo list(WineryWineSpecDetail wineryWineSpecDetail) + { + startPage(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(wineryWineSpecDetail); + if (wineryWineSpecDetail.getDeptId() != null){ + lqw.eq(WineryWineSpecDetail::getDeptId ,wineryWineSpecDetail.getDeptId()); + } + if (StringUtils.isNotBlank(wineryWineSpecDetail.getBrand())){ + lqw.eq(WineryWineSpecDetail::getBrand ,wineryWineSpecDetail.getBrand()); + } + if (wineryWineSpecDetail.getCapacity() != null){ + lqw.eq(WineryWineSpecDetail::getCapacity ,wineryWineSpecDetail.getCapacity()); + } + if (StringUtils.isNotBlank(wineryWineSpecDetail.getYear())){ + lqw.eq(WineryWineSpecDetail::getYear ,wineryWineSpecDetail.getYear()); + } + if (StringUtils.isNotBlank(wineryWineSpecDetail.getAlcohol())){ + lqw.eq(WineryWineSpecDetail::getAlcohol ,wineryWineSpecDetail.getAlcohol()); + } + if (StringUtils.isNotBlank(wineryWineSpecDetail.getWineType())){ + lqw.eq(WineryWineSpecDetail::getWineType ,wineryWineSpecDetail.getWineType()); + } + if (StringUtils.isNotBlank(wineryWineSpecDetail.getWineLevel())){ + lqw.eq(WineryWineSpecDetail::getWineLevel ,wineryWineSpecDetail.getWineLevel()); + } + if (StringUtils.isNotBlank(wineryWineSpecDetail.getGrape())){ + lqw.eq(WineryWineSpecDetail::getGrape ,wineryWineSpecDetail.getGrape()); + } + if (StringUtils.isNotBlank(wineryWineSpecDetail.getSugarContent())){ + lqw.eq(WineryWineSpecDetail::getSugarContent ,wineryWineSpecDetail.getSugarContent()); + } + if (StringUtils.isNotBlank(wineryWineSpecDetail.getPackingType())){ + lqw.eq(WineryWineSpecDetail::getPackingType ,wineryWineSpecDetail.getPackingType()); + } + if (StringUtils.isNotBlank(wineryWineSpecDetail.getDecanteDuration())){ + lqw.eq(WineryWineSpecDetail::getDecanteDuration ,wineryWineSpecDetail.getDecanteDuration()); + } + if (wineryWineSpecDetail.getCount() != null){ + lqw.eq(WineryWineSpecDetail::getCount ,wineryWineSpecDetail.getCount()); + } + if (StringUtils.isNotBlank(wineryWineSpecDetail.getAroma())){ + lqw.eq(WineryWineSpecDetail::getAroma ,wineryWineSpecDetail.getAroma()); + } + List list = iWineryWineSpecDetailService.list(lqw); + return getDataTable(list); + } + + /** + * 导出葡萄酒规格详情列表 + */ + @PreAuthorize("@ss.hasPermi('winery:wine_detail:export')" ) + @Log(title = "葡萄酒规格详情" , businessType = BusinessType.EXPORT) + @GetMapping("/export" ) + public AjaxResult export(WineryWineSpecDetail wineryWineSpecDetail) { + LambdaQueryWrapper lqw = new LambdaQueryWrapper(wineryWineSpecDetail); + List list = iWineryWineSpecDetailService.list(lqw); + ExcelUtil util = new ExcelUtil(WineryWineSpecDetail. class); + return util.exportExcel(list, "wine_detail" ); + } + + /** + * 获取葡萄酒规格详情详细信息 + */ + @PreAuthorize("@ss.hasPermi('winery:wine_detail:query')" ) + @GetMapping(value = "/{id}" ) + public AjaxResult getInfo(@PathVariable("id" ) Long id) { + return AjaxResult.success(iWineryWineSpecDetailService.getById(id)); + } + + /** + * 新增葡萄酒规格详情 + */ + @PreAuthorize("@ss.hasPermi('winery:wine_detail:add')" ) + @Log(title = "葡萄酒规格详情" , businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody WineryWineSpecDetail wineryWineSpecDetail) { + return toAjax(iWineryWineSpecDetailService.save(wineryWineSpecDetail) ? 1 : 0); + } + + /** + * 修改葡萄酒规格详情 + */ + @PreAuthorize("@ss.hasPermi('winery:wine_detail:edit')" ) + @Log(title = "葡萄酒规格详情" , businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody WineryWineSpecDetail wineryWineSpecDetail) { + return toAjax(iWineryWineSpecDetailService.updateById(wineryWineSpecDetail) ? 1 : 0); + } + + /** + * 删除葡萄酒规格详情 + */ + @PreAuthorize("@ss.hasPermi('winery:wine_detail:remove')" ) + @Log(title = "葡萄酒规格详情" , businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}" ) + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(iWineryWineSpecDetailService.removeByIds(Arrays.asList(ids)) ? 1 : 0); + } +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/domain/WineryFoodSafety.java b/hope-winery/src/main/java/com/ruoyi/winery/domain/WineryFoodSafety.java new file mode 100644 index 000000000..a66ad8b0f --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/domain/WineryFoodSafety.java @@ -0,0 +1,105 @@ +package com.ruoyi.winery.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.ToString; +import lombok.experimental.Accessors; +import com.ruoyi.common.annotation.Excel; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import java.io.Serializable; +import java.util.Date; +import java.math.BigDecimal; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 食品安全详情对象 winery_food_safety + * + * @author ruoyi + * @date 2020-12-28 + */ +@Data +@ToString +@EqualsAndHashCode +@NoArgsConstructor +@Accessors(chain = true) +@TableName("winery_food_safety") +public class WineryFoodSafety implements Serializable { + +private static final long serialVersionUID=1L; + + + /** 规格ID */ + @TableId(value = "id") + private Long id; + + /** 部门ID */ + @Excel(name = "部门ID") + private Long deptId; + + /** 创建者 */ + private String createBy; + + /** 创建时间 */ + private Date createTime; + + /** 更新者 */ + private String updateBy; + + /** 更新时间 */ + private Date updateTime; + + /** 生产许可证编号 */ + @Excel(name = "生产许可证编号") + private String prodLicense; + + /** 产品标准号 */ + @Excel(name = "产品标准号") + private String standardId; + + /** 厂名 */ + @Excel(name = "厂名") + private String makerName; + + /** 厂址 */ + @Excel(name = "厂址") + private String makerAddress; + + /** 厂家联系方式 */ + @Excel(name = "厂家联系方式") + private String makerContact; + + /** 配料表 */ + @Excel(name = "配料表") + private String ingredients; + + /** 保质期 */ + @Excel(name = "保质期") + private Integer period; + + /** 备注 */ + @Excel(name = "备注") + private String remark; + + /** 葡萄酒等级 */ + @Excel(name = "葡萄酒等级") + private String wineLevel; + + /** 储藏方法 + */ + @Excel(name = "储藏方法") + private String storageMode; + + /** 供应商 + */ + @Excel(name = "供应商") + private String supplier; + + /** 生产日期 */ + @Excel(name = "生产日期" , width = 30, dateFormat = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date makeDate; +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/domain/WineryGoods.java b/hope-winery/src/main/java/com/ruoyi/winery/domain/WineryGoods.java new file mode 100644 index 000000000..8ad92ffa2 --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/domain/WineryGoods.java @@ -0,0 +1,86 @@ +package com.ruoyi.winery.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.ToString; +import lombok.experimental.Accessors; +import com.ruoyi.common.annotation.Excel; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import java.io.Serializable; +import java.util.Date; +import java.math.BigDecimal; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 商品信息对象 winery_goods + * + * @author ruoyi + * @date 2020-12-28 + */ +@Data +@ToString +@EqualsAndHashCode +@NoArgsConstructor +@Accessors(chain = true) +@TableName("winery_goods") +public class WineryGoods implements Serializable { + +private static final long serialVersionUID=1L; + + + /** 商品ID */ + @TableId(value = "id") + private Long id; + + /** 部门ID */ + @Excel(name = "部门ID") + private Long deptId; + + /** 商品名称 */ + @Excel(name = "商品名称") + private String goodsName; + + /** 商品简称 */ + @Excel(name = "商品简称") + private String goodsAlias; + + /** 商品类型 */ + @Excel(name = "商品类型") + private String goodsType; + + /** 关联规格 */ + @Excel(name = "关联规格") + private String goodsSpec; + + /** 商品说明 */ + @Excel(name = "商品说明") + private String goodDesc; + + /** 商品封面 */ + @Excel(name = "商品封面") + private String goodFaceImg; + + /** 商品图片 */ + @Excel(name = "商品图片") + private String goodImg; + + /** 创建者 */ + private String createBy; + + /** 创建时间 */ + private Date createTime; + + /** 更新者 */ + private String updateBy; + + /** 更新时间 */ + private Date updateTime; + + /** 备注 */ + @Excel(name = "备注") + private String remark; +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/domain/WineryGoodsSpec.java b/hope-winery/src/main/java/com/ruoyi/winery/domain/WineryGoodsSpec.java new file mode 100644 index 000000000..ac6970a9d --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/domain/WineryGoodsSpec.java @@ -0,0 +1,78 @@ +package com.ruoyi.winery.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.ToString; +import lombok.experimental.Accessors; +import com.ruoyi.common.annotation.Excel; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import java.io.Serializable; +import java.util.Date; +import java.math.BigDecimal; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 商品规格对象 winery_goods_spec + * + * @author ruoyi + * @date 2020-12-28 + */ +@Data +@ToString +@EqualsAndHashCode +@NoArgsConstructor +@Accessors(chain = true) +@TableName("winery_goods_spec") +public class WineryGoodsSpec implements Serializable { + +private static final long serialVersionUID=1L; + + + /** 规格ID */ + @TableId(value = "id") + private Long id; + + /** 部门ID */ + @Excel(name = "部门ID") + private Long deptId; + + /** 创建者 */ + private String createBy; + + /** 创建时间 */ + private Date createTime; + + /** 更新时间 */ + private Date updateTime; + + /** 更新者 */ + private String updateBy; + + /** 规格名称 */ + @Excel(name = "规格名称") + private String specName; + + /** 规格说明 */ + @Excel(name = "规格说明") + private String specDesc; + + /** 规格图片 */ + @Excel(name = "规格图片") + private String specImg; + + /** 规格单价 */ + @Excel(name = "规格单价") + private Long specPrice; + + /** 规格详细 */ + @Excel(name = "规格详细") + private Long detailSpec; + + /** 备注 */ + @Excel(name = "备注") + private String remark; +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/domain/WineryOrders.java b/hope-winery/src/main/java/com/ruoyi/winery/domain/WineryOrders.java new file mode 100644 index 000000000..ba53ebfc2 --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/domain/WineryOrders.java @@ -0,0 +1,130 @@ +package com.ruoyi.winery.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.ToString; +import lombok.experimental.Accessors; +import com.ruoyi.common.annotation.Excel; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; + +import java.io.Serializable; +import java.util.Date; +import java.math.BigDecimal; + +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 客户订单对象 winery_orders + * + * @author ruoyi + * @date 2020-12-28 + */ +@Data +@ToString +@EqualsAndHashCode +@NoArgsConstructor +@Accessors(chain = true) +@TableName("winery_orders") +public class WineryOrders implements Serializable { + + private static final long serialVersionUID = 1L; + + + /** + * 订单ID + */ + @TableId(value = "id") + private Long id; + + /** + * 部门ID + */ + @Excel(name = "部门ID") + private Long deptId; + + /** + * 商品ID + */ + @Excel(name = "商品ID") + private Long goodsId; + + /** + * 商品简称 + */ + @Excel(name = "商品简称") + private String goodsName; + + /** + * 商品类型 + */ + @Excel(name = "商品类型") + private String goodsType; + + /** + * 商品规格 + */ + @Excel(name = "商品规格") + private String goodsSpec; + + /** + * 商品封面 + */ + @Excel(name = "商品封面") + private String goodsFaceImg; + + /** + * 商品基准单价 + */ + @Excel(name = "商品基准单价") + private Long goodsPrice; + + /** + * 商品数量 + */ + @Excel(name = "商品数量") + private Integer goodsCount; + + /** + * 创建者 + */ + private String createBy; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新者 + */ + private String updateBy; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 备注 + */ + @Excel(name = "备注") + private String remark; + + /** + * 订单状态: + * 0.未支付 + * 1.已取消 + * 2.支付成功,等待发货 + * 3.支付成功,已发货 + * 4.已收货 + * 5.退款申请 + * 6.退款中 + * 7.退款成功 + */ + @Excel(name = "订单状态: 0.未支付 1.已取消 2.支付成功,等待发货 3.支付成功,已发货 4.已收货 5.退款申请 6.退款中 7.退款成功") + private Integer orderStatus; +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/domain/WineryWineSpecDetail.java b/hope-winery/src/main/java/com/ruoyi/winery/domain/WineryWineSpecDetail.java new file mode 100644 index 000000000..3cdb247c6 --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/domain/WineryWineSpecDetail.java @@ -0,0 +1,107 @@ +package com.ruoyi.winery.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.ToString; +import lombok.experimental.Accessors; +import com.ruoyi.common.annotation.Excel; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import java.io.Serializable; +import java.util.Date; +import java.math.BigDecimal; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 葡萄酒规格详情对象 winery_wine_spec_detail + * + * @author ruoyi + * @date 2020-12-28 + */ +@Data +@ToString +@EqualsAndHashCode +@NoArgsConstructor +@Accessors(chain = true) +@TableName("winery_wine_spec_detail") +public class WineryWineSpecDetail implements Serializable { + +private static final long serialVersionUID=1L; + + + /** 规格ID */ + @TableId(value = "id") + private Long id; + + /** 部门ID */ + @Excel(name = "部门ID") + private Long deptId; + + /** 创建者 */ + private String createBy; + + /** 创建时间 */ + private Date createTime; + + /** 更新者 */ + private String updateBy; + + /** 更新时间 */ + private Date updateTime; + + /** 品牌 */ + @Excel(name = "品牌") + private String brand; + + /** 净含量 */ + @Excel(name = "净含量") + private Integer capacity; + + /** 采摘年份 + */ + @Excel(name = "采摘年份") + private String year; + + /** 酒精度 */ + @Excel(name = "酒精度") + private String alcohol; + + /** 备注 */ + @Excel(name = "备注") + private String remark; + + /** 葡萄酒种类 */ + @Excel(name = "葡萄酒种类") + private String wineType; + + /** 葡萄酒等级 */ + @Excel(name = "葡萄酒等级") + private String wineLevel; + + /** 葡萄种类 */ + @Excel(name = "葡萄种类") + private String grape; + + /** 糖分 */ + @Excel(name = "糖分") + private String sugarContent; + + /** 包装方式 */ + @Excel(name = "包装方式") + private String packingType; + + /** 醒酒时间 */ + @Excel(name = "醒酒时间") + private String decanteDuration; + + /** 支数 */ + @Excel(name = "支数") + private Integer count; + + /** 香味 */ + @Excel(name = "香味") + private String aroma; +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/mapper/WineryFoodSafetyMapper.java b/hope-winery/src/main/java/com/ruoyi/winery/mapper/WineryFoodSafetyMapper.java new file mode 100644 index 000000000..4034c01f0 --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/mapper/WineryFoodSafetyMapper.java @@ -0,0 +1,14 @@ +package com.ruoyi.winery.mapper; + +import com.ruoyi.winery.domain.WineryFoodSafety; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * 食品安全详情Mapper接口 + * + * @author ruoyi + * @date 2020-12-28 + */ +public interface WineryFoodSafetyMapper extends BaseMapper { + +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/mapper/WineryGoodsMapper.java b/hope-winery/src/main/java/com/ruoyi/winery/mapper/WineryGoodsMapper.java new file mode 100644 index 000000000..4652be609 --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/mapper/WineryGoodsMapper.java @@ -0,0 +1,14 @@ +package com.ruoyi.winery.mapper; + +import com.ruoyi.winery.domain.WineryGoods; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * 商品信息Mapper接口 + * + * @author ruoyi + * @date 2020-12-28 + */ +public interface WineryGoodsMapper extends BaseMapper { + +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/mapper/WineryGoodsSpecMapper.java b/hope-winery/src/main/java/com/ruoyi/winery/mapper/WineryGoodsSpecMapper.java new file mode 100644 index 000000000..3c8b45a1e --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/mapper/WineryGoodsSpecMapper.java @@ -0,0 +1,14 @@ +package com.ruoyi.winery.mapper; + +import com.ruoyi.winery.domain.WineryGoodsSpec; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * 商品规格Mapper接口 + * + * @author ruoyi + * @date 2020-12-28 + */ +public interface WineryGoodsSpecMapper extends BaseMapper { + +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/mapper/WineryOrdersMapper.java b/hope-winery/src/main/java/com/ruoyi/winery/mapper/WineryOrdersMapper.java new file mode 100644 index 000000000..78b8ac387 --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/mapper/WineryOrdersMapper.java @@ -0,0 +1,14 @@ +package com.ruoyi.winery.mapper; + +import com.ruoyi.winery.domain.WineryOrders; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * 客户订单Mapper接口 + * + * @author ruoyi + * @date 2020-12-28 + */ +public interface WineryOrdersMapper extends BaseMapper { + +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/mapper/WineryWineSpecDetailMapper.java b/hope-winery/src/main/java/com/ruoyi/winery/mapper/WineryWineSpecDetailMapper.java new file mode 100644 index 000000000..c57d1828b --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/mapper/WineryWineSpecDetailMapper.java @@ -0,0 +1,14 @@ +package com.ruoyi.winery.mapper; + +import com.ruoyi.winery.domain.WineryWineSpecDetail; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * 葡萄酒规格详情Mapper接口 + * + * @author ruoyi + * @date 2020-12-28 + */ +public interface WineryWineSpecDetailMapper extends BaseMapper { + +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/service/IWineryFoodSafetyService.java b/hope-winery/src/main/java/com/ruoyi/winery/service/IWineryFoodSafetyService.java new file mode 100644 index 000000000..28bda6b4b --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/service/IWineryFoodSafetyService.java @@ -0,0 +1,14 @@ +package com.ruoyi.winery.service; + +import com.ruoyi.winery.domain.WineryFoodSafety; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * 食品安全详情Service接口 + * + * @author ruoyi + * @date 2020-12-28 + */ +public interface IWineryFoodSafetyService extends IService { + +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/service/IWineryGoodsService.java b/hope-winery/src/main/java/com/ruoyi/winery/service/IWineryGoodsService.java new file mode 100644 index 000000000..3088c71da --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/service/IWineryGoodsService.java @@ -0,0 +1,14 @@ +package com.ruoyi.winery.service; + +import com.ruoyi.winery.domain.WineryGoods; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * 商品信息Service接口 + * + * @author ruoyi + * @date 2020-12-28 + */ +public interface IWineryGoodsService extends IService { + +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/service/IWineryGoodsSpecService.java b/hope-winery/src/main/java/com/ruoyi/winery/service/IWineryGoodsSpecService.java new file mode 100644 index 000000000..4e428c5e7 --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/service/IWineryGoodsSpecService.java @@ -0,0 +1,14 @@ +package com.ruoyi.winery.service; + +import com.ruoyi.winery.domain.WineryGoodsSpec; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * 商品规格Service接口 + * + * @author ruoyi + * @date 2020-12-28 + */ +public interface IWineryGoodsSpecService extends IService { + +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/service/IWineryOrdersService.java b/hope-winery/src/main/java/com/ruoyi/winery/service/IWineryOrdersService.java new file mode 100644 index 000000000..ab6f79c03 --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/service/IWineryOrdersService.java @@ -0,0 +1,14 @@ +package com.ruoyi.winery.service; + +import com.ruoyi.winery.domain.WineryOrders; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * 客户订单Service接口 + * + * @author ruoyi + * @date 2020-12-28 + */ +public interface IWineryOrdersService extends IService { + +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/service/IWineryWineSpecDetailService.java b/hope-winery/src/main/java/com/ruoyi/winery/service/IWineryWineSpecDetailService.java new file mode 100644 index 000000000..ed9b52146 --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/service/IWineryWineSpecDetailService.java @@ -0,0 +1,14 @@ +package com.ruoyi.winery.service; + +import com.ruoyi.winery.domain.WineryWineSpecDetail; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * 葡萄酒规格详情Service接口 + * + * @author ruoyi + * @date 2020-12-28 + */ +public interface IWineryWineSpecDetailService extends IService { + +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/service/impl/WineryFoodSafetyServiceImpl.java b/hope-winery/src/main/java/com/ruoyi/winery/service/impl/WineryFoodSafetyServiceImpl.java new file mode 100644 index 000000000..f333acd05 --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/service/impl/WineryFoodSafetyServiceImpl.java @@ -0,0 +1,18 @@ +package com.ruoyi.winery.service.impl; + +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.winery.mapper.WineryFoodSafetyMapper; +import com.ruoyi.winery.domain.WineryFoodSafety; +import com.ruoyi.winery.service.IWineryFoodSafetyService; + +/** + * 食品安全详情Service业务层处理 + * + * @author ruoyi + * @date 2020-12-28 + */ +@Service +public class WineryFoodSafetyServiceImpl extends ServiceImpl implements IWineryFoodSafetyService { + +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/service/impl/WineryGoodsServiceImpl.java b/hope-winery/src/main/java/com/ruoyi/winery/service/impl/WineryGoodsServiceImpl.java new file mode 100644 index 000000000..233c18a6e --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/service/impl/WineryGoodsServiceImpl.java @@ -0,0 +1,18 @@ +package com.ruoyi.winery.service.impl; + +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.winery.mapper.WineryGoodsMapper; +import com.ruoyi.winery.domain.WineryGoods; +import com.ruoyi.winery.service.IWineryGoodsService; + +/** + * 商品信息Service业务层处理 + * + * @author ruoyi + * @date 2020-12-28 + */ +@Service +public class WineryGoodsServiceImpl extends ServiceImpl implements IWineryGoodsService { + +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/service/impl/WineryGoodsSpecServiceImpl.java b/hope-winery/src/main/java/com/ruoyi/winery/service/impl/WineryGoodsSpecServiceImpl.java new file mode 100644 index 000000000..f10b36db3 --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/service/impl/WineryGoodsSpecServiceImpl.java @@ -0,0 +1,18 @@ +package com.ruoyi.winery.service.impl; + +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.winery.mapper.WineryGoodsSpecMapper; +import com.ruoyi.winery.domain.WineryGoodsSpec; +import com.ruoyi.winery.service.IWineryGoodsSpecService; + +/** + * 商品规格Service业务层处理 + * + * @author ruoyi + * @date 2020-12-28 + */ +@Service +public class WineryGoodsSpecServiceImpl extends ServiceImpl implements IWineryGoodsSpecService { + +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/service/impl/WineryOrdersServiceImpl.java b/hope-winery/src/main/java/com/ruoyi/winery/service/impl/WineryOrdersServiceImpl.java new file mode 100644 index 000000000..d2116599d --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/service/impl/WineryOrdersServiceImpl.java @@ -0,0 +1,18 @@ +package com.ruoyi.winery.service.impl; + +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.winery.mapper.WineryOrdersMapper; +import com.ruoyi.winery.domain.WineryOrders; +import com.ruoyi.winery.service.IWineryOrdersService; + +/** + * 客户订单Service业务层处理 + * + * @author ruoyi + * @date 2020-12-28 + */ +@Service +public class WineryOrdersServiceImpl extends ServiceImpl implements IWineryOrdersService { + +} diff --git a/hope-winery/src/main/java/com/ruoyi/winery/service/impl/WineryWineSpecDetailServiceImpl.java b/hope-winery/src/main/java/com/ruoyi/winery/service/impl/WineryWineSpecDetailServiceImpl.java new file mode 100644 index 000000000..9c62c30af --- /dev/null +++ b/hope-winery/src/main/java/com/ruoyi/winery/service/impl/WineryWineSpecDetailServiceImpl.java @@ -0,0 +1,18 @@ +package com.ruoyi.winery.service.impl; + +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.winery.mapper.WineryWineSpecDetailMapper; +import com.ruoyi.winery.domain.WineryWineSpecDetail; +import com.ruoyi.winery.service.IWineryWineSpecDetailService; + +/** + * 葡萄酒规格详情Service业务层处理 + * + * @author ruoyi + * @date 2020-12-28 + */ +@Service +public class WineryWineSpecDetailServiceImpl extends ServiceImpl implements IWineryWineSpecDetailService { + +} diff --git a/hope-winery/src/main/resources/mapper/winery/WineryFoodSafetyMapper.xml b/hope-winery/src/main/resources/mapper/winery/WineryFoodSafetyMapper.xml new file mode 100644 index 000000000..e900b6366 --- /dev/null +++ b/hope-winery/src/main/resources/mapper/winery/WineryFoodSafetyMapper.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/hope-winery/src/main/resources/mapper/winery/WineryGoodsMapper.xml b/hope-winery/src/main/resources/mapper/winery/WineryGoodsMapper.xml new file mode 100644 index 000000000..83dac7080 --- /dev/null +++ b/hope-winery/src/main/resources/mapper/winery/WineryGoodsMapper.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/hope-winery/src/main/resources/mapper/winery/WineryGoodsSpecMapper.xml b/hope-winery/src/main/resources/mapper/winery/WineryGoodsSpecMapper.xml new file mode 100644 index 000000000..35a158a6b --- /dev/null +++ b/hope-winery/src/main/resources/mapper/winery/WineryGoodsSpecMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/hope-winery/src/main/resources/mapper/winery/WineryOrdersMapper.xml b/hope-winery/src/main/resources/mapper/winery/WineryOrdersMapper.xml new file mode 100644 index 000000000..860272716 --- /dev/null +++ b/hope-winery/src/main/resources/mapper/winery/WineryOrdersMapper.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/hope-winery/src/main/resources/mapper/winery/WineryWineSpecDetailMapper.xml b/hope-winery/src/main/resources/mapper/winery/WineryWineSpecDetailMapper.xml new file mode 100644 index 000000000..f4cd2a40b --- /dev/null +++ b/hope-winery/src/main/resources/mapper/winery/WineryWineSpecDetailMapper.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/CaptchaConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/CaptchaConfig.java index 43e78aebe..d81acbaa7 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/CaptchaConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/CaptchaConfig.java @@ -53,13 +53,13 @@ public class CaptchaConfig // 边框颜色 默认为Color.BLACK properties.setProperty(KAPTCHA_BORDER_COLOR, "105,179,90"); // 验证码文本字符颜色 默认为Color.BLACK - properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_COLOR, "blue"); + properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_COLOR, "red"); // 验证码图片宽度 默认为200 - properties.setProperty(KAPTCHA_IMAGE_WIDTH, "160"); + properties.setProperty(KAPTCHA_IMAGE_WIDTH, "180"); // 验证码图片高度 默认为50 properties.setProperty(KAPTCHA_IMAGE_HEIGHT, "60"); // 验证码文本字符大小 默认为40 - properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_SIZE, "35"); + properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_SIZE, "40"); // KAPTCHA_SESSION_KEY properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCodeMath"); // 验证码文本生成器 diff --git a/ruoyi-ui/src/api/winery/food_safety.js b/ruoyi-ui/src/api/winery/food_safety.js new file mode 100644 index 000000000..4bf835ddf --- /dev/null +++ b/ruoyi-ui/src/api/winery/food_safety.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询食品安全详情列表 +export function listFood_safety(query) { + return request({ + url: '/winery/food_safety/list', + method: 'get', + params: query + }) +} + +// 查询食品安全详情详细 +export function getFood_safety(id) { + return request({ + url: '/winery/food_safety/' + id, + method: 'get' + }) +} + +// 新增食品安全详情 +export function addFood_safety(data) { + return request({ + url: '/winery/food_safety', + method: 'post', + data: data + }) +} + +// 修改食品安全详情 +export function updateFood_safety(data) { + return request({ + url: '/winery/food_safety', + method: 'put', + data: data + }) +} + +// 删除食品安全详情 +export function delFood_safety(id) { + return request({ + url: '/winery/food_safety/' + id, + method: 'delete' + }) +} + +// 导出食品安全详情 +export function exportFood_safety(query) { + return request({ + url: '/winery/food_safety/export', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/ruoyi-ui/src/api/winery/spec.js b/ruoyi-ui/src/api/winery/spec.js new file mode 100644 index 000000000..e1c892e2d --- /dev/null +++ b/ruoyi-ui/src/api/winery/spec.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询商品规格列表 +export function listSpec(query) { + return request({ + url: '/winery/spec/list', + method: 'get', + params: query + }) +} + +// 查询商品规格详细 +export function getSpec(id) { + return request({ + url: '/winery/spec/' + id, + method: 'get' + }) +} + +// 新增商品规格 +export function addSpec(data) { + return request({ + url: '/winery/spec', + method: 'post', + data: data + }) +} + +// 修改商品规格 +export function updateSpec(data) { + return request({ + url: '/winery/spec', + method: 'put', + data: data + }) +} + +// 删除商品规格 +export function delSpec(id) { + return request({ + url: '/winery/spec/' + id, + method: 'delete' + }) +} + +// 导出商品规格 +export function exportSpec(query) { + return request({ + url: '/winery/spec/export', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/ruoyi-ui/src/api/winery/user_orders.js b/ruoyi-ui/src/api/winery/user_orders.js new file mode 100644 index 000000000..a99574900 --- /dev/null +++ b/ruoyi-ui/src/api/winery/user_orders.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询客户订单列表 +export function listUser_orders(query) { + return request({ + url: '/winery/user_orders/list', + method: 'get', + params: query + }) +} + +// 查询客户订单详细 +export function getUser_orders(id) { + return request({ + url: '/winery/user_orders/' + id, + method: 'get' + }) +} + +// 新增客户订单 +export function addUser_orders(data) { + return request({ + url: '/winery/user_orders', + method: 'post', + data: data + }) +} + +// 修改客户订单 +export function updateUser_orders(data) { + return request({ + url: '/winery/user_orders', + method: 'put', + data: data + }) +} + +// 删除客户订单 +export function delUser_orders(id) { + return request({ + url: '/winery/user_orders/' + id, + method: 'delete' + }) +} + +// 导出客户订单 +export function exportUser_orders(query) { + return request({ + url: '/winery/user_orders/export', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/ruoyi-ui/src/api/winery/wine_detail.js b/ruoyi-ui/src/api/winery/wine_detail.js new file mode 100644 index 000000000..4637b414f --- /dev/null +++ b/ruoyi-ui/src/api/winery/wine_detail.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询葡萄酒规格详情列表 +export function listWine_detail(query) { + return request({ + url: '/winery/wine_detail/list', + method: 'get', + params: query + }) +} + +// 查询葡萄酒规格详情详细 +export function getWine_detail(id) { + return request({ + url: '/winery/wine_detail/' + id, + method: 'get' + }) +} + +// 新增葡萄酒规格详情 +export function addWine_detail(data) { + return request({ + url: '/winery/wine_detail', + method: 'post', + data: data + }) +} + +// 修改葡萄酒规格详情 +export function updateWine_detail(data) { + return request({ + url: '/winery/wine_detail', + method: 'put', + data: data + }) +} + +// 删除葡萄酒规格详情 +export function delWine_detail(id) { + return request({ + url: '/winery/wine_detail/' + id, + method: 'delete' + }) +} + +// 导出葡萄酒规格详情 +export function exportWine_detail(query) { + return request({ + url: '/winery/wine_detail/export', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/ruoyi-ui/src/api/winery/winery_goods.js b/ruoyi-ui/src/api/winery/winery_goods.js new file mode 100644 index 000000000..9332243b1 --- /dev/null +++ b/ruoyi-ui/src/api/winery/winery_goods.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询商品信息列表 +export function listWinery_goods(query) { + return request({ + url: '/winery/winery_goods/list', + method: 'get', + params: query + }) +} + +// 查询商品信息详细 +export function getWinery_goods(id) { + return request({ + url: '/winery/winery_goods/' + id, + method: 'get' + }) +} + +// 新增商品信息 +export function addWinery_goods(data) { + return request({ + url: '/winery/winery_goods', + method: 'post', + data: data + }) +} + +// 修改商品信息 +export function updateWinery_goods(data) { + return request({ + url: '/winery/winery_goods', + method: 'put', + data: data + }) +} + +// 删除商品信息 +export function delWinery_goods(id) { + return request({ + url: '/winery/winery_goods/' + id, + method: 'delete' + }) +} + +// 导出商品信息 +export function exportWinery_goods(query) { + return request({ + url: '/winery/winery_goods/export', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue index 880f2041f..7ee3094b8 100644 --- a/ruoyi-ui/src/views/login.vue +++ b/ruoyi-ui/src/views/login.vue @@ -1,7 +1,7 @@