diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/controller/SupermarketInfoController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/controller/SupermarketInfoController.java new file mode 100644 index 0000000..0cea1ae --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/controller/SupermarketInfoController.java @@ -0,0 +1,85 @@ +package com.bonus.canteen.core.supermarket.controller; + +import com.bonus.canteen.core.supermarket.domain.SupermarketInfo; +import com.bonus.canteen.core.supermarket.service.SupermarketInfoService; +import com.bonus.common.core.utils.poi.ExcelUtil; +import com.bonus.common.core.web.controller.BaseController; +import com.bonus.common.core.web.domain.AjaxResult; +import com.bonus.common.core.web.page.TableDataInfo; +import com.bonus.common.log.annotation.SysLog; +import com.bonus.common.log.enums.OperaType; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 超市Controller + * + * @author xsheng + * @date 2025-04-05 + */ +@Api(tags = "超市接口") +@RestController +@RequestMapping("/supermarket_info") +public class SupermarketInfoController extends BaseController { + @Autowired + private SupermarketInfoService supermarketInfoService; + + /** + * 查询超市列表 + */ + @ApiOperation(value = "查询超市列表") + @GetMapping("/list") + public TableDataInfo list(SupermarketInfo SupermarketInfo) { + startPage(); + List list = supermarketInfoService.selectSupermarketInfoList(SupermarketInfo); + return getDataTable(list); + } + + /** + * 新增超市 + */ + @ApiOperation(value = "新增超市") + //@PreventRepeatSubmit + //@RequiresPermissions("Supermarket:info:add") + @SysLog(title = "超市", businessType = OperaType.INSERT, logType = 1,module = "商超管理->新增超市") + @PostMapping("/add") + public AjaxResult add(@RequestBody SupermarketInfo SupermarketInfo) { + try { + return toAjax(supermarketInfoService.insertSupermarketInfo(SupermarketInfo)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 修改超市 + */ + @ApiOperation(value = "修改超市") + //@PreventRepeatSubmit + //@RequiresPermissions("Supermarket:info:edit") + @SysLog(title = "超市", businessType = OperaType.UPDATE, logType = 1,module = "商超管理->修改超市") + @PostMapping("/edit") + public AjaxResult edit(@RequestBody SupermarketInfo SupermarketInfo) { + try { + return toAjax(supermarketInfoService.updateSupermarketInfo(SupermarketInfo)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 删除超市 + */ + @ApiOperation(value = "删除超市") + @SysLog(title = "超市", businessType = OperaType.DELETE, logType = 1,module = "商超管理->删除超市") + @PostMapping("/del") + public AjaxResult remove(@RequestBody SupermarketInfo supermarketInfo) { + return toAjax(supermarketInfoService.deleteSupermarketInfoBySupermarketId(supermarketInfo)); + } + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/controller/SupermarketProductController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/controller/SupermarketProductController.java new file mode 100644 index 0000000..2b4fd4c --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/controller/SupermarketProductController.java @@ -0,0 +1,98 @@ +package com.bonus.canteen.core.supermarket.controller; + +import com.bonus.canteen.core.alloc.domain.AllocArea; +import com.bonus.canteen.core.supermarket.domain.SupermarketProduct; +import com.bonus.canteen.core.supermarket.service.SupermarketProductService; +import com.bonus.common.core.web.controller.BaseController; +import com.bonus.common.core.web.domain.AjaxResult; +import com.bonus.common.core.web.page.TableDataInfo; +import com.bonus.common.log.annotation.SysLog; +import com.bonus.common.log.enums.OperaType; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 商品Controller + * + * @author xsheng + * @date 2025-04-05 + */ +@Api(tags = "商品接口") +@RestController +@RequestMapping("/supermarket_product") +public class SupermarketProductController extends BaseController { + @Autowired + private SupermarketProductService supermarketProductService; + + /** + * 查询商品列表 + */ + @ApiOperation(value = "查询商品列表") + @GetMapping("/list") + public TableDataInfo list(SupermarketProduct SupermarketProduct) { + startPage(); + List list = supermarketProductService.selectSupermarketProductList(SupermarketProduct); + return getDataTable(list); + } + + /** + * 新增商品 + */ + @ApiOperation(value = "新增商品") + @SysLog(title = "商品", businessType = OperaType.INSERT, logType = 1,module = "商超管理->新增商品") + @PostMapping("/add") + public AjaxResult add(@RequestBody SupermarketProduct SupermarketProduct) { + try { + return toAjax(supermarketProductService.insertSupermarketProduct(SupermarketProduct)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 修改商品 + */ + @ApiOperation(value = "修改商品") + @SysLog(title = "商品", businessType = OperaType.UPDATE, logType = 1,module = "商超管理->修改商品") + @PostMapping("/edit") + public AjaxResult edit(@RequestBody SupermarketProduct SupermarketProduct) { + try { + return toAjax(supermarketProductService.updateSupermarketProduct(SupermarketProduct)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + /** + * 修改商品状态 + */ + @ApiOperation(value = "修改商品状态") + @SysLog(title = "商品", businessType = OperaType.UPDATE, logType = 1,module = "商超管理->修改商品状态") + @PostMapping("/editState") + public AjaxResult editState(@RequestBody SupermarketProduct SupermarketProduct) { + try { + return toAjax(supermarketProductService.updateSupermarketProductState(SupermarketProduct)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 删除商品 + */ + @ApiOperation(value = "批量删除商品") + @SysLog(title = "商品", businessType = OperaType.DELETE, logType = 1,module = "商超管理->删除商品") + @PostMapping("/dels") + public AjaxResult removes(@RequestBody SupermarketProduct supermarketProducts) { + return toAjax(supermarketProductService.deleteSupermarketProductByProductIds(supermarketProducts)); + } + @ApiOperation(value = "删除商品") + @SysLog(title = "商品", businessType = OperaType.DELETE, logType = 1,module = "商超管理->删除商品") + @PostMapping("/del") + public AjaxResult remove(@RequestBody SupermarketProduct supermarketProduct) { + return toAjax(supermarketProductService.deleteSupermarketProductByProductId(supermarketProduct)); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/controller/SupermarketUnitController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/controller/SupermarketUnitController.java new file mode 100644 index 0000000..445a6d3 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/controller/SupermarketUnitController.java @@ -0,0 +1,79 @@ +package com.bonus.canteen.core.supermarket.controller; + +import com.bonus.canteen.core.supermarket.domain.SupermarketUnit; +import com.bonus.canteen.core.supermarket.service.SupermarketUnitService; +import com.bonus.common.core.web.controller.BaseController; +import com.bonus.common.core.web.domain.AjaxResult; +import com.bonus.common.core.web.page.TableDataInfo; +import com.bonus.common.log.annotation.SysLog; +import com.bonus.common.log.enums.OperaType; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 单位Controller + * + * @author xsheng + * @date 2025-04-05 + */ +@Api(tags = "单位接口") +@RestController +@RequestMapping("/supermarket_unit") +public class SupermarketUnitController extends BaseController { + @Autowired + private SupermarketUnitService supermarketUnitService; + + /** + * 查询单位列表 + */ + @ApiOperation(value = "查询单位列表") + @GetMapping("/list") + public TableDataInfo list(SupermarketUnit SupermarketUnit) { + startPage(); + List list = supermarketUnitService.selectSupermarketUnitList(SupermarketUnit); + return getDataTable(list); + } + + /** + * 新增单位 + */ + @ApiOperation(value = "新增单位") + @SysLog(title = "单位", businessType = OperaType.INSERT, logType = 1,module = "商超管理->新增单位") + @PostMapping("/add") + public AjaxResult add(@RequestBody SupermarketUnit SupermarketUnit) { + try { + return toAjax(supermarketUnitService.insertSupermarketUnit(SupermarketUnit)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 修改单位 + */ + @ApiOperation(value = "修改单位") + @SysLog(title = "单位", businessType = OperaType.UPDATE, logType = 1,module = "商超管理->修改单位") + @PostMapping("/edit") + public AjaxResult edit(@RequestBody SupermarketUnit SupermarketUnit) { + try { + return toAjax(supermarketUnitService.updateSupermarketUnit(SupermarketUnit)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 删除单位 + */ + @ApiOperation(value = "删除单位") + @SysLog(title = "单位", businessType = OperaType.DELETE, logType = 1,module = "商超管理->删除单位") + @PostMapping("/del") + public AjaxResult remove(@PathVariable Long SupermarketIds) { + return toAjax(supermarketUnitService.deleteSupermarketUnitBySupermarketId(SupermarketIds)); + } + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/domain/SupermarketInfo.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/domain/SupermarketInfo.java new file mode 100644 index 0000000..d1a8dc9 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/domain/SupermarketInfo.java @@ -0,0 +1,82 @@ +package com.bonus.canteen.core.supermarket.domain; + +import com.bonus.common.core.annotation.Excel; +import com.bonus.common.core.web.domain.BaseEntity; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.ToString; + +import java.util.Date; + +/** + * 超市对象 orderInfo + * + * @author xsheng + * @date 2025-04-05 + */ + + +@Data +@ToString +public class SupermarketInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 超市id */ + private String supermarketId ; + /** 超市名称 */ + private String supermarketName ; + /** 管理员 */ + private String userId ; + private String userName ; + /** 用户类别 */ + private String userType ; + /** 联系电话 */ + private String mobile ; + /** 仓库id */ + private String warehouseId ; + private String warehouseName ; + /** 超市地址 */ + private String address ; + /** 图片url */ + private String imgUrl ; + /** 是否立即打印 */ + private String ifPrintNow ; + /** 线上销售模式(1现货2预定) */ + private String appSaleMode ; + /** 最少配送时间(分) */ + private String minDeliveryTime ; + /** 选择时间间隔(分) */ + private String selectTimeInterval; + /** 配送费(元) */ + private String deliveryCost ; + /** 自动核销天数(天) */ + private String autoVerifyDay ; + /** 配送方式(1自取2配送) */ + private String deliveryWay ; + /** 退单限制时间(分) */ + private String refundLimitTime ; + /** 是否关联出入库(1是2否) */ + private String ifRelateDrp ; + /** 范围id */ + private String effId ; + private String effName ; + /** 流水号前缀 */ + private String mealCode ; + /** 区域id */ + private String areaId ; + private String areaName ; + /** 是否删除 */ + private String delFlag ; + /** 乐观锁 */ + private String revision ; + /** 创建人 */ + private String createBy ; + /** 更新人 */ + private String updateBy ; + /** 是否启用收款码(1是2否) */ + private String ifEnablePayCode ; + /** 超市收款码链接 */ + private String payCodeUrl ; + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/domain/SupermarketProduct.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/domain/SupermarketProduct.java new file mode 100644 index 0000000..3fdc81b --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/domain/SupermarketProduct.java @@ -0,0 +1,71 @@ +package com.bonus.canteen.core.supermarket.domain; + +import com.bonus.common.core.web.domain.BaseEntity; +import lombok.Data; +import lombok.ToString; + +/** + * 单位对象 orderInfo + * + * @author xsheng + * @date 2025-04-05 + */ + + +@Data +@ToString +public class SupermarketProduct extends BaseEntity { + private static final long serialVersionUID = 1L; + /** 商品id */ + private String productId ; + /** 超市id */ + private String supermarketId ; + /** 超市名称 */ + private String supermarketName ; + /** 商品名称 */ + private String productName ; + /** 条码 */ + private String barCode ; + /** 零售价 */ + private String salePrice ; + /** 计重类型 1 称重 2 按份 */ + private String salesMode ; + /** 所属区域 */ + private String areaId ; + /** 所属区域名称 */ + private String areaName ; + /** 商品单位 */ + private String unitId ; + /** 商品单位名称 */ + private String unitName ; + /** 类型(1原料2商品) */ + private String materialId ; + /** 商品类型名称 */ + private String materialName ; + /** 商品进价 */ + private String prefPrice ; + /** 保质期时间类别 1 年 2月 3日 */ + private String qualityType ; + /** 保质期时间 */ + private String qualityNum ; + /** 供应资格证书 */ + private String supplyCertificate; + /** 商品介绍 */ + private String productRemark ; + /** 上架状态(1-上架,2-下架) */ + private String putawayState ; + /** 是否线上销售(1是2否) */ + private String ifOnline ; + private String personLimit ; + private String oneDayLimit ; + /** 图片 */ + private String imgUrl ; + private String inventoryNum ; + private String revision ; + private String createBy ; + private String updateBy ; + private String productCode ; + private String productType ; + + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/domain/SupermarketUnit.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/domain/SupermarketUnit.java new file mode 100644 index 0000000..31a4be2 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/domain/SupermarketUnit.java @@ -0,0 +1,41 @@ +package com.bonus.canteen.core.supermarket.domain; + +import com.bonus.common.core.web.domain.BaseEntity; +import lombok.Data; +import lombok.ToString; + +/** + * 单位对象 orderInfo + * + * @author xsheng + * @date 2025-04-05 + */ + + +@Data +@ToString +public class SupermarketUnit extends BaseEntity { + private static final long serialVersionUID = 1L; + /** 主键id */ + private String id ; + /** 区域id */ + private String areaId ; + private String areaName ; + /** 计量单位id */ + private String unitId ; + /** 计量单位名称 */ + private String unitName ; + /** 换算比率(换算成g) */ + private String rate ; + /** 单位类型(1-按份,2-称重) */ + private String weighType ; + /** 删除标识(1删除,2正常) */ + private String delFlag ; + /** */ + private String revision ; + /** 创建人 */ + private String createBy ; + /** 更新人 */ + private String updateBy ; + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/mapper/SupermarketInfoMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/mapper/SupermarketInfoMapper.java new file mode 100644 index 0000000..0b4ebe8 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/mapper/SupermarketInfoMapper.java @@ -0,0 +1,55 @@ +package com.bonus.canteen.core.supermarket.mapper; + + +import com.bonus.canteen.core.supermarket.domain.SupermarketInfo; + +import java.util.List; + +/** + * 超市Mapper接口 + * + * @author xsheng + * @date 2025-04-05 + */ +public interface SupermarketInfoMapper { + + /** + * 查询超市列表 + * + * @param orderInfo 超市 + * @return 超市集合 + */ + public List selectSupermarketInfoList(SupermarketInfo orderInfo); + + /** + * 新增超市 + * + * @param orderInfo 超市 + * @return 结果 + */ + public int insertSupermarketInfo(SupermarketInfo orderInfo); + + /** + * 修改超市 + * + * @param orderInfo 超市 + * @return 结果 + */ + public int updateSupermarketInfo(SupermarketInfo orderInfo); + + /** + * 删除超市 + * + * @param supermarketInfo 超市主键 + * @return 结果 + */ + public int deleteSupermarketInfoBySupermarketId(SupermarketInfo supermarketInfo); + + /** + * 批量删除超市 + * + * @param orderIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSupermarketInfoBySupermarketIds(Long[] orderIds); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/mapper/SupermarketProductMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/mapper/SupermarketProductMapper.java new file mode 100644 index 0000000..a67846b --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/mapper/SupermarketProductMapper.java @@ -0,0 +1,56 @@ +package com.bonus.canteen.core.supermarket.mapper; + + +import com.bonus.canteen.core.supermarket.domain.SupermarketProduct; + +import java.util.List; + +/** + * 商品Mapper接口 + * + * @author xsheng + * @date 2025-04-05 + */ +public interface SupermarketProductMapper { + + /** + * 查询商品列表 + * + * @param productInfo 商品 + * @return 商品集合 + */ + public List selectSupermarketProductList(SupermarketProduct productInfo); + + /** + * 新增商品 + * + * @param productInfo 商品 + * @return 结果 + */ + public int insertSupermarketProduct(SupermarketProduct productInfo); + + /** + * 修改商品 + * + * @param productInfo 商品 + * @return 结果 + */ + public int updateSupermarketProduct(SupermarketProduct productInfo); + + public int updateSupermarketProductState(SupermarketProduct productInfo); + /** + * 删除商品 + * + * @param productId 商品主键 + * @return 结果 + */ + public int deleteSupermarketProductBySupermarketId(Long productId); + + /** + * 批量删除商品 + * + * @param productIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSupermarketProductBySupermarketIds(String[] productIds); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/mapper/SupermarketUnitMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/mapper/SupermarketUnitMapper.java new file mode 100644 index 0000000..0b8fce8 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/mapper/SupermarketUnitMapper.java @@ -0,0 +1,55 @@ +package com.bonus.canteen.core.supermarket.mapper; + + +import com.bonus.canteen.core.supermarket.domain.SupermarketUnit; + +import java.util.List; + +/** + * 单位Mapper接口 + * + * @author xsheng + * @date 2025-04-05 + */ +public interface SupermarketUnitMapper { + + /** + * 查询单位列表 + * + * @param orderInfo 单位 + * @return 单位集合 + */ + public List selectSupermarketUnitList(SupermarketUnit orderInfo); + + /** + * 新增单位 + * + * @param orderInfo 单位 + * @return 结果 + */ + public int insertSupermarketUnit(SupermarketUnit orderInfo); + + /** + * 修改单位 + * + * @param orderInfo 单位 + * @return 结果 + */ + public int updateSupermarketUnit(SupermarketUnit orderInfo); + + /** + * 删除单位 + * + * @param orderId 单位主键 + * @return 结果 + */ + public int deleteSupermarketUnitBySupermarketId(Long orderId); + + /** + * 批量删除单位 + * + * @param orderIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSupermarketUnitBySupermarketIds(Long[] orderIds); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/SupermarketInfoService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/SupermarketInfoService.java new file mode 100644 index 0000000..6f1bf2d --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/SupermarketInfoService.java @@ -0,0 +1,54 @@ +package com.bonus.canteen.core.supermarket.service; + +import com.bonus.canteen.core.supermarket.domain.SupermarketInfo; + +import java.util.List; + +/** + * 超市Service接口 + * + * @author xsheng + * @date 2025-04-05 + */ +public interface SupermarketInfoService { + + /** + * 查询超市列表 + * + * @param orderInfo 超市 + * @return 超市集合 + */ + public List selectSupermarketInfoList(SupermarketInfo orderInfo); + + /** + * 新增超市 + * + * @param orderInfo 超市 + * @return 结果 + */ + public int insertSupermarketInfo(SupermarketInfo orderInfo); + + /** + * 修改超市 + * + * @param orderInfo 超市 + * @return 结果 + */ + public int updateSupermarketInfo(SupermarketInfo orderInfo); + + /** + * 批量删除超市 + * + * @param orderIds 需要删除的超市主键集合 + * @return 结果 + */ + public int deleteSupermarketInfoBySupermarketIds(Long[] orderIds); + + /** + * 删除超市信息 + * + * @param orderId 超市主键 + * @return 结果 + */ + public int deleteSupermarketInfoBySupermarketId(SupermarketInfo supermarketInfo); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/SupermarketProductService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/SupermarketProductService.java new file mode 100644 index 0000000..525b10e --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/SupermarketProductService.java @@ -0,0 +1,56 @@ +package com.bonus.canteen.core.supermarket.service; + +import com.bonus.canteen.core.supermarket.domain.SupermarketProduct; + +import java.util.List; + +/** + * 商品Service接口 + * + * @author xsheng + * @date 2025-04-05 + */ +public interface SupermarketProductService { + + /** + * 查询商品列表 + * + * @param productInfo 商品 + * @return 商品集合 + */ + public List selectSupermarketProductList(SupermarketProduct productInfo); + + /** + * 新增商品 + * + * @param productInfo 商品 + * @return 结果 + */ + public int insertSupermarketProduct(SupermarketProduct productInfo); + + /** + * 修改商品 + * + * @param productInfo 商品 + * @return 结果 + */ + public int updateSupermarketProduct(SupermarketProduct productInfo); + + public int updateSupermarketProductState(SupermarketProduct productInfo); + + /** + * 批量删除商品 + * + * @param productIds 需要删除的商品主键集合 + * @return 结果 + */ + public int deleteSupermarketProductByProductIds(SupermarketProduct productIds); + + /** + * 删除商品信息 + * + * @param productId 商品主键 + * @return 结果 + */ + public int deleteSupermarketProductByProductId(SupermarketProduct productId); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/SupermarketUnitService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/SupermarketUnitService.java new file mode 100644 index 0000000..46d7954 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/SupermarketUnitService.java @@ -0,0 +1,54 @@ +package com.bonus.canteen.core.supermarket.service; + +import com.bonus.canteen.core.supermarket.domain.SupermarketUnit; + +import java.util.List; + +/** + * 单位Service接口 + * + * @author xsheng + * @date 2025-04-05 + */ +public interface SupermarketUnitService { + + /** + * 查询单位列表 + * + * @param orderInfo 单位 + * @return 单位集合 + */ + public List selectSupermarketUnitList(SupermarketUnit orderInfo); + + /** + * 新增单位 + * + * @param orderInfo 单位 + * @return 结果 + */ + public int insertSupermarketUnit(SupermarketUnit orderInfo); + + /** + * 修改单位 + * + * @param orderInfo 单位 + * @return 结果 + */ + public int updateSupermarketUnit(SupermarketUnit orderInfo); + + /** + * 批量删除单位 + * + * @param orderIds 需要删除的单位主键集合 + * @return 结果 + */ + public int deleteSupermarketUnitBySupermarketIds(Long[] orderIds); + + /** + * 删除单位信息 + * + * @param orderId 单位主键 + * @return 结果 + */ + public int deleteSupermarketUnitBySupermarketId(Long orderId); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/impl/SupermarketInfoServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/impl/SupermarketInfoServiceImpl.java new file mode 100644 index 0000000..726acd5 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/impl/SupermarketInfoServiceImpl.java @@ -0,0 +1,89 @@ +package com.bonus.canteen.core.supermarket.service.impl; + +import com.bonus.canteen.core.supermarket.domain.SupermarketInfo; +import com.bonus.canteen.core.supermarket.mapper.SupermarketInfoMapper; +import com.bonus.canteen.core.supermarket.service.SupermarketInfoService; +import com.bonus.common.core.exception.ServiceException; +import com.bonus.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 超市Service业务层处理 + * + * @author xsheng + * @date 2025-04-05 + */ +@Service +public class SupermarketInfoServiceImpl implements SupermarketInfoService { + @Autowired + private SupermarketInfoMapper supermarketInfoMapper; + + /** + * 查询超市列表 + * + * @param SupermarketInfo 超市 + * @return 超市 + */ + @Override + public List selectSupermarketInfoList(SupermarketInfo SupermarketInfo) { + return supermarketInfoMapper.selectSupermarketInfoList(SupermarketInfo); + } + + /** + * 新增超市 + * + * @param SupermarketInfo 超市 + * @return 结果 + */ + @Override + public int insertSupermarketInfo(SupermarketInfo supermarketInfo) { + supermarketInfo.setCreateTime(DateUtils.getNowDate()); + supermarketInfo.setUpdateTime(DateUtils.getNowDate()); + try { + return supermarketInfoMapper.insertSupermarketInfo(supermarketInfo); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + + /** + * 修改超市 + * + * @param SupermarketInfo 超市 + * @return 结果 + */ + @Override + public int updateSupermarketInfo(SupermarketInfo SupermarketInfo) { + SupermarketInfo.setUpdateTime(DateUtils.getNowDate()); + try { + return supermarketInfoMapper.updateSupermarketInfo(SupermarketInfo); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + + /** + * 批量删除超市 + * + * @param SupermarketIds 需要删除的超市主键 + * @return 结果 + */ + @Override + public int deleteSupermarketInfoBySupermarketIds(Long[] SupermarketIds) { + return supermarketInfoMapper.deleteSupermarketInfoBySupermarketIds(SupermarketIds); + } + + /** + * 删除超市信息 + * + * @param supermarketInfo 超市主键 + * @return 结果 + */ + @Override + public int deleteSupermarketInfoBySupermarketId(SupermarketInfo supermarketInfo) { + return supermarketInfoMapper.deleteSupermarketInfoBySupermarketId(supermarketInfo); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/impl/SupermarketProductServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/impl/SupermarketProductServiceImpl.java new file mode 100644 index 0000000..ddf1cbe --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/impl/SupermarketProductServiceImpl.java @@ -0,0 +1,99 @@ +package com.bonus.canteen.core.supermarket.service.impl; + +import com.bonus.canteen.core.supermarket.domain.SupermarketProduct; +import com.bonus.canteen.core.supermarket.mapper.SupermarketProductMapper; +import com.bonus.canteen.core.supermarket.service.SupermarketProductService; +import com.bonus.common.core.exception.ServiceException; +import com.bonus.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 商品Service业务层处理 + * + * @author xsheng + * @date 2025-04-05 + */ +@Service +public class SupermarketProductServiceImpl implements SupermarketProductService { + @Autowired + private SupermarketProductMapper supermarketProductMapper; + + /** + * 查询商品列表 + * + * @param SupermarketProduct 商品 + * @return 商品 + */ + @Override + public List selectSupermarketProductList(SupermarketProduct SupermarketProduct) { + return supermarketProductMapper.selectSupermarketProductList(SupermarketProduct); + } + + /** + * 新增商品 + * + * @param SupermarketProduct 商品 + * @return 结果 + */ + @Override + public int insertSupermarketProduct(SupermarketProduct SupermarketProduct) { + SupermarketProduct.setCreateTime(DateUtils.getNowDate()); + try { + return supermarketProductMapper.insertSupermarketProduct(SupermarketProduct); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + + /** + * 修改商品 + * + * @param SupermarketProduct 商品 + * @return 结果 + */ + @Override + public int updateSupermarketProduct(SupermarketProduct SupermarketProduct) { + SupermarketProduct.setUpdateTime(DateUtils.getNowDate()); + try { + return supermarketProductMapper.updateSupermarketProduct(SupermarketProduct); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + + @Override + public int updateSupermarketProductState(SupermarketProduct SupermarketProduct) { + SupermarketProduct.setUpdateTime(DateUtils.getNowDate()); + try { + return supermarketProductMapper.updateSupermarketProductState(SupermarketProduct); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + /** + * 批量删除商品 + * + * @param productIds 需要删除的商品主键 + * @return 结果 + */ + @Override + public int deleteSupermarketProductByProductIds(SupermarketProduct productIds) { + String[] productIdsl=productIds.getProductId().split(","); + return supermarketProductMapper.deleteSupermarketProductBySupermarketIds(productIdsl); + } + + /** + * 删除商品信息 + * + * @param productId 商品主键 + * @return 结果 + */ + @Override + public int deleteSupermarketProductByProductId(SupermarketProduct productId) { + Long productIdl=Long.parseLong(productId.getProductId()); + return supermarketProductMapper.deleteSupermarketProductBySupermarketId(productIdl); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/impl/SupermarketUnitServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/impl/SupermarketUnitServiceImpl.java new file mode 100644 index 0000000..0ed3b61 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/impl/SupermarketUnitServiceImpl.java @@ -0,0 +1,88 @@ +package com.bonus.canteen.core.supermarket.service.impl; + +import com.bonus.canteen.core.supermarket.domain.SupermarketUnit; +import com.bonus.canteen.core.supermarket.mapper.SupermarketUnitMapper; +import com.bonus.canteen.core.supermarket.service.SupermarketUnitService; +import com.bonus.common.core.exception.ServiceException; +import com.bonus.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 单位Service业务层处理 + * + * @author xsheng + * @date 2025-04-05 + */ +@Service +public class SupermarketUnitServiceImpl implements SupermarketUnitService { + @Autowired + private SupermarketUnitMapper supermarketUnitMapper; + + /** + * 查询单位列表 + * + * @param SupermarketUnit 单位 + * @return 单位 + */ + @Override + public List selectSupermarketUnitList(SupermarketUnit SupermarketUnit) { + return supermarketUnitMapper.selectSupermarketUnitList(SupermarketUnit); + } + + /** + * 新增单位 + * + * @param SupermarketUnit 单位 + * @return 结果 + */ + @Override + public int insertSupermarketUnit(SupermarketUnit SupermarketUnit) { + SupermarketUnit.setCreateTime(DateUtils.getNowDate()); + try { + return supermarketUnitMapper.insertSupermarketUnit(SupermarketUnit); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + + /** + * 修改单位 + * + * @param SupermarketUnit 单位 + * @return 结果 + */ + @Override + public int updateSupermarketUnit(SupermarketUnit SupermarketUnit) { + SupermarketUnit.setUpdateTime(DateUtils.getNowDate()); + try { + return supermarketUnitMapper.updateSupermarketUnit(SupermarketUnit); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + + /** + * 批量删除单位 + * + * @param SupermarketIds 需要删除的单位主键 + * @return 结果 + */ + @Override + public int deleteSupermarketUnitBySupermarketIds(Long[] SupermarketIds) { + return supermarketUnitMapper.deleteSupermarketUnitBySupermarketIds(SupermarketIds); + } + + /** + * 删除单位信息 + * + * @param SupermarketId 单位主键 + * @return 结果 + */ + @Override + public int deleteSupermarketUnitBySupermarketId(Long SupermarketId) { + return supermarketUnitMapper.deleteSupermarketUnitBySupermarketId(SupermarketId); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/warehouse/controller/WareHouseInfoController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/warehouse/controller/WareHouseInfoController.java new file mode 100644 index 0000000..2cc48a4 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/warehouse/controller/WareHouseInfoController.java @@ -0,0 +1,85 @@ +package com.bonus.canteen.core.warehouse.controller; + +import com.bonus.canteen.core.warehouse.domain.WareHouseInfo; +import com.bonus.canteen.core.warehouse.service.WareHouseInfoService; +import com.bonus.common.core.web.controller.BaseController; +import com.bonus.common.core.web.domain.AjaxResult; +import com.bonus.common.core.web.page.TableDataInfo; +import com.bonus.common.log.annotation.SysLog; +import com.bonus.common.log.enums.OperaType; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 仓库Controller + * + * @author xsheng + * @date 2025-04-05 + */ +@Api(tags = "仓库接口") +@RestController +@RequestMapping("/warehouse_info") +public class WareHouseInfoController extends BaseController { + @Autowired + private WareHouseInfoService wareHouseInfoService; + + /** + * 查询仓库列表 + */ + @ApiOperation(value = "查询仓库列表") + @GetMapping("/list") + public TableDataInfo list(WareHouseInfo WareHouseInfo) { + startPage(); + List list = wareHouseInfoService.selectWareHouseInfoList(WareHouseInfo); + return getDataTable(list); + } + + /** + * 新增仓库 + */ + @ApiOperation(value = "新增仓库") + //@PreventRepeatSubmit + //@RequiresPermissions("WareHouse:info:add") + @SysLog(title = "仓库", businessType = OperaType.INSERT, logType = 1,module = "商超管理->新增仓库") + @PostMapping("/add") + public AjaxResult add(@RequestBody WareHouseInfo WareHouseInfo) { + try { + return toAjax(wareHouseInfoService.insertWareHouseInfo(WareHouseInfo)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 修改仓库 + */ + @ApiOperation(value = "修改仓库") + //@PreventRepeatSubmit + //@RequiresPermissions("WareHouse:info:edit") + @SysLog(title = "仓库", businessType = OperaType.UPDATE, logType = 1,module = "商超管理->修改仓库") + @PostMapping("/edit") + public AjaxResult edit(@RequestBody WareHouseInfo WareHouseInfo) { + try { + return toAjax(wareHouseInfoService.updateWareHouseInfo(WareHouseInfo)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 删除仓库 + */ + @ApiOperation(value = "删除仓库") + //@PreventRepeatSubmit + //@RequiresPermissions("WareHouse:info:remove") + @SysLog(title = "仓库", businessType = OperaType.DELETE, logType = 1,module = "商超管理->删除仓库") + @PostMapping("/del") + public AjaxResult remove(@PathVariable Long WareHouseId) { + return toAjax(wareHouseInfoService.deleteWareHouseInfoByWareHouseId(WareHouseId)); + } + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/warehouse/domain/WareHouseInfo.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/warehouse/domain/WareHouseInfo.java new file mode 100644 index 0000000..c9e538f --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/warehouse/domain/WareHouseInfo.java @@ -0,0 +1,42 @@ +package com.bonus.canteen.core.warehouse.domain; + +import com.bonus.common.core.web.domain.BaseEntity; +import lombok.Data; +import lombok.ToString; + +/** + * 超市对象 orderInfo + * + * @author xsheng + * @date 2025-04-05 + */ + + +@Data +@ToString +public class WareHouseInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + private String warehouseId ; + private String warehouseNum ; + private String warehouseName ; + private String userId ; + private String regionProvince ; + private String regionCity ; + private String regionDistrict ; + private String address ; + private String warehouseType ; + private String status ; + private String delFlag ; + private String typeId ; + private String areaId ; + private String revision ; + private String createBy ; + private String updateBy ; + private String ifUseWarehouseArea ; + private String ifUseWarehouseLocation; + private String parentId ; + private String canteenId ; + private String fetchUserId ; + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/warehouse/mapper/WareHouseInfoMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/warehouse/mapper/WareHouseInfoMapper.java new file mode 100644 index 0000000..e8a1cad --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/warehouse/mapper/WareHouseInfoMapper.java @@ -0,0 +1,55 @@ +package com.bonus.canteen.core.warehouse.mapper; + + +import com.bonus.canteen.core.warehouse.domain.WareHouseInfo; + +import java.util.List; + +/** + * 仓库Mapper接口 + * + * @author xsheng + * @date 2025-04-05 + */ +public interface WareHouseInfoMapper { + + /** + * 查询仓库列表 + * + * @param wareHouseInfo 仓库 + * @return 仓库集合 + */ + public List selectWareHouseInfoList(WareHouseInfo wareHouseInfo); + + /** + * 新增仓库 + * + * @param wareHouseInfo 仓库 + * @return 结果 + */ + public int insertWareHouseInfo(WareHouseInfo wareHouseInfo); + + /** + * 修改仓库 + * + * @param wareHouseInfo 仓库 + * @return 结果 + */ + public int updateWareHouseInfo(WareHouseInfo wareHouseInfo); + + /** + * 删除仓库 + * + * @param wareHouseId 仓库主键 + * @return 结果 + */ + public int deleteWareHouseInfoByWareHouseId(Long wareHouseId); + + /** + * 批量删除仓库 + * + * @param wareHouseIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteWareHouseInfoByWareHouseIds(Long[] wareHouseIds); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/warehouse/service/WareHouseInfoService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/warehouse/service/WareHouseInfoService.java new file mode 100644 index 0000000..d730f37 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/warehouse/service/WareHouseInfoService.java @@ -0,0 +1,54 @@ +package com.bonus.canteen.core.warehouse.service; + +import com.bonus.canteen.core.warehouse.domain.WareHouseInfo; + +import java.util.List; + +/** + * 仓库Service接口 + * + * @author xsheng + * @date 2025-04-05 + */ +public interface WareHouseInfoService { + + /** + * 查询仓库列表 + * + * @param wareHouseInfo 仓库 + * @return 仓库集合 + */ + public List selectWareHouseInfoList(WareHouseInfo wareHouseInfo); + + /** + * 新增仓库 + * + * @param wareHouseInfo 仓库 + * @return 结果 + */ + public int insertWareHouseInfo(WareHouseInfo wareHouseInfo); + + /** + * 修改仓库 + * + * @param wareHouseInfo 仓库 + * @return 结果 + */ + public int updateWareHouseInfo(WareHouseInfo wareHouseInfo); + + /** + * 批量删除仓库 + * + * @param wareHouseIds 需要删除的仓库主键集合 + * @return 结果 + */ + public int deleteWareHouseInfoByWareHouseIds(Long[] wareHouseIds); + + /** + * 删除仓库信息 + * + * @param wareHouseId 仓库主键 + * @return 结果 + */ + public int deleteWareHouseInfoByWareHouseId(Long wareHouseId); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/warehouse/service/impl/WareHouseInfoServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/warehouse/service/impl/WareHouseInfoServiceImpl.java new file mode 100644 index 0000000..6af1baa --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/warehouse/service/impl/WareHouseInfoServiceImpl.java @@ -0,0 +1,88 @@ +package com.bonus.canteen.core.warehouse.service.impl; + +import com.bonus.canteen.core.warehouse.domain.WareHouseInfo; +import com.bonus.canteen.core.warehouse.mapper.WareHouseInfoMapper; +import com.bonus.canteen.core.warehouse.service.WareHouseInfoService; +import com.bonus.common.core.exception.ServiceException; +import com.bonus.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 仓库Service业务层处理 + * + * @author xsheng + * @date 2025-04-05 + */ +@Service +public class WareHouseInfoServiceImpl implements WareHouseInfoService { + @Autowired + private WareHouseInfoMapper wareHouseInfoMapper; + + /** + * 查询仓库列表 + * + * @param WareHouseInfo 仓库 + * @return 仓库 + */ + @Override + public List selectWareHouseInfoList(WareHouseInfo WareHouseInfo) { + return wareHouseInfoMapper.selectWareHouseInfoList(WareHouseInfo); + } + + /** + * 新增仓库 + * + * @param WareHouseInfo 仓库 + * @return 结果 + */ + @Override + public int insertWareHouseInfo(WareHouseInfo WareHouseInfo) { + WareHouseInfo.setCreateTime(DateUtils.getNowDate()); + try { + return wareHouseInfoMapper.insertWareHouseInfo(WareHouseInfo); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + + /** + * 修改仓库 + * + * @param WareHouseInfo 仓库 + * @return 结果 + */ + @Override + public int updateWareHouseInfo(WareHouseInfo WareHouseInfo) { + WareHouseInfo.setUpdateTime(DateUtils.getNowDate()); + try { + return wareHouseInfoMapper.updateWareHouseInfo(WareHouseInfo); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + + /** + * 批量删除仓库 + * + * @param WareHouseIds 需要删除的仓库主键 + * @return 结果 + */ + @Override + public int deleteWareHouseInfoByWareHouseIds(Long[] WareHouseIds) { + return wareHouseInfoMapper.deleteWareHouseInfoByWareHouseIds(WareHouseIds); + } + + /** + * 删除仓库信息 + * + * @param WareHouseId 仓库主键 + * @return 结果 + */ + @Override + public int deleteWareHouseInfoByWareHouseId(Long WareHouseId) { + return wareHouseInfoMapper.deleteWareHouseInfoByWareHouseId(WareHouseId); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketInfoMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketInfoMapper.xml new file mode 100644 index 0000000..d163504 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketInfoMapper.xml @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select supermarket_id,supermarket_name,user_id,mobile,warehouse_id,address,img_url,if_print_now,app_sale_mode,min_delivery_time,select_time_interval,delivery_cost,auto_verify_day,delivery_way,refund_limit_time,if_relate_drp,eff_id,meal_code,area_id,del_flag,revision,create_by,create_time,update_by,update_time,if_enable_pay_code,pay_code_url from supermarket_info + + + + + + insert into supermarket_info + + supermarket_name, + user_id, + mobile, + warehouse_id, + address, + img_url, + if_print_now, + app_sale_mode, + min_delivery_time, + select_time_interval, + delivery_cost, + auto_verify_day, + delivery_way, + refund_limit_time, + if_relate_drp, + eff_id, + meal_code, + area_id, + del_flag, + revision, + create_by, + create_time, + update_by, + update_time, + if_enable_pay_code, + pay_code_url, + + + #{supermarketName }, + #{userId }, + #{mobile }, + #{warehouseId }, + #{address }, + #{imgUrl }, + #{ifPrintNow }, + #{appSaleMode }, + #{minDeliveryTime }, + #{selectTimeInterval}, + #{deliveryCost }, + #{autoVerifyDay }, + #{deliveryWay }, + #{refundLimitTime }, + #{ifRelateDrp }, + #{effId }, + #{mealCode }, + #{areaId }, + #{delFlag }, + #{revision }, + #{createBy }, + #{createTime }, + #{updateBy }, + #{updateTime }, + #{ifEnablePayCode }, + #{payCodeUrl }, + + + + + update supermarket_info + + supermarket_name =#{supermarketName }, + user_id =#{userId }, + mobile =#{mobile }, + warehouse_id =#{warehouseId }, + address =#{address }, + img_url =#{imgUrl }, + if_print_now =#{ifPrintNow }, + app_sale_mode =#{appSaleMode }, + min_delivery_time =#{minDeliveryTime }, + select_time_interval=#{selectTimeInterval}, + delivery_cost =#{deliveryCost }, + auto_verify_day =#{autoVerifyDay }, + delivery_way =#{deliveryWay }, + refund_limit_time =#{refundLimitTime }, + if_relate_drp =#{ifRelateDrp }, + eff_id =#{effId }, + meal_code =#{mealCode }, + area_id =#{areaId }, + del_flag =#{delFlag }, + revision =#{revision }, + create_by =#{createBy }, + create_time =#{createTime }, + update_by =#{updateBy }, + update_time =#{updateTime }, + if_enable_pay_code =#{ifEnablePayCode }, + pay_code_url =#{payCodeUrl }, + + where supermarket_id = #{supermarketId} + + + + delete from supermarket_info where supermarket_id = #{supermarketId} + + + + delete from supermarket_info where supermarket_id in + + #{supermarketId} + + + \ No newline at end of file diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketProductMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketProductMapper.xml new file mode 100644 index 0000000..29d47f0 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketProductMapper.xml @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id,supermarket_id,product_name,bar_code,sale_price,sales_mode,area_id,unit_id,material_id,pref_price,quality_type,quality_num,supply_certificate,product_remark,putaway_state,if_online,person_limit,one_day_limit,img_url,inventory_num,revision,create_by,create_time,update_by,update_time from supermarket_product + + + + + + insert into supermarket_product + + supermarket_id , + product_name , + bar_code , + sale_price , + sales_mode , + area_id , + unit_id , + product_type , + pref_price , + quality_type , + quality_num , + supply_certificate, + product_remark , + putaway_state , + if_online , + person_limit , + one_day_limit , + img_url , + inventory_num , + revision , + create_by , + create_time , + update_by , + update_time , + product_code , + + + #{supermarketId }, + #{productName }, + #{barCode }, + #{salePrice }, + #{salesMode }, + #{areaId }, + #{unitId }, + #{productType }, + #{prefPrice }, + #{qualityType }, + #{qualityNum }, + #{supplyCertificate}, + #{productRemark }, + #{putawayState }, + #{ifOnline }, + #{personLimit }, + #{oneDayLimit }, + #{imgUrl }, + #{inventoryNum }, + #{revision }, + #{createBy }, + #{createTime }, + #{updateBy }, + #{updateTime }, + #{productCode }, + + + + + update supermarket_product + + supermarket_id =#{supermarketId }, + product_name =#{productName }, + bar_code =#{barCode }, + sale_price =#{salePrice }, + sales_mode =#{salesMode }, + area_id =#{areaId }, + unit_id =#{unitId }, + product_type =#{productType }, + pref_price =#{prefPrice }, + quality_type =#{qualityType }, + quality_num =#{qualityNum }, + supply_certificate=#{supplyCertificate}, + product_remark =#{productRemark }, + putaway_state =#{putawayState }, + if_online =#{ifOnline }, + person_limit =#{personLimit }, + one_day_limit =#{oneDayLimit }, + img_url =#{imgUrl }, + inventory_num =#{inventoryNum }, + revision =#{revision }, + create_by =#{createBy }, + create_time =#{createTime }, + update_by =#{updateBy }, + update_time =#{updateTime }, + product_code =#{productCode }, + + where product_id = #{productId} + + + update supermarket_product + + state =#{state}, + + where product_id = #{productId} + + + delete from supermarket_product where product_id = #{productId} + + + + delete from supermarket_product where product_id in + + #{productId} + + + \ No newline at end of file diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketUnitMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketUnitMapper.xml new file mode 100644 index 0000000..8d1e950 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketUnitMapper.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + select area_id,unit_id,unit_name,rate,weigh_type,del_flag,revision,create_by,create_time,update_by,update_time from supermarket_unit + + + + + + insert into supermarket_unit + + area_id , + unit_name , + rate , + weigh_type , + del_flag , + revision , + create_by , + create_time, + update_by , + update_time, + + + #{areaId }, + #{unitName }, + #{rate }, + #{weighType }, + #{delFlag }, + #{revision }, + #{createBy }, + #{createTime}, + #{updateBy }, + #{updateTime}, + + + + + update supermarket_unit + + area_id =#{areaId }, + unit_name =#{unitName }, + rate =#{rate }, + weigh_type =#{weighType }, + del_flag =#{delFlag }, + revision =#{revision }, + create_by =#{createBy }, + create_time =#{createTime}, + update_by =#{updateBy }, + updateTime =#{updateTime}, + + where unit_id = #{unitId} + + + + delete from supermarket_unit where unit_id = #{unitId} + + + + delete from supermarket_unit where unit_id in + + #{id} + + + \ No newline at end of file diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/warehouse/WareHouseInfoMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/warehouse/WareHouseInfoMapper.xml new file mode 100644 index 0000000..5896171 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/warehouse/WareHouseInfoMapper.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select warehouse_id,warehouse_num,warehouse_name,user_id,region_province,region_city,region_district,address,warehouse_type,status,del_flag,type_id,area_id,revision,create_by,create_time,update_by,update_time,if_use_warehouse_area,if_use_warehouse_location,parent_id,canteen_id,fetch_user_id from warehouse_info + + + + + + insert into warehouse_info + + warehouse_num , + warehouse_name , + user_id , + user_type , + region_province , + region_city , + region_district , + address , + warehouse_type , + status , + del_flag , + type_id , + area_id , + revision , + create_by , + create_time , + update_by , + update_time , + if_use_warehouse_area , + if_use_warehouse_location, + parent_id , + canteen_id , + fetch_user_id , + + + #{warehouseNum }, + #{warehouseName }, + #{userId }, + #{userType }, + #{regionProvince }, + #{regionCity }, + #{regionDistrict }, + #{address }, + #{warehouseType }, + #{status }, + #{delFlag }, + #{typeId }, + #{areaId }, + #{revision }, + #{createBy }, + #{createTime }, + #{updateBy }, + #{updateTime }, + #{ifUseWarehouseArea }, + #{ifUseWarehouseLocation}, + #{parentId }, + #{canteenId }, + #{fetchUserId }, + + + + + update warehouse_info + + warehouse_num =#{warehouseNum }, + warehouse_name =#{warehouseName }, + user_id =#{userId }, + user_type =#{userType }, + region_province =#{regionProvince }, + region_city =#{regionCity }, + region_district =#{regionDistrict }, + address =#{address }, + warehouse_type =#{warehouseType }, + status =#{status }, + del_flag =#{delFlag }, + type_id =#{typeId }, + area_id =#{areaId }, + revision =#{revision }, + create_by =#{updateBy }, + create_time =#{updateTime }, + update_by =#{ifUseWarehouseArea }, + update_time =#{ifUseWarehouseLocation }, + if_use_warehouse_area =#{parentId }, + if_use_warehouse_location=#{canteenId }, + parent_id =#{fetchUserId }, + + where warehouse_id = #{warehouseId} + + + + delete from warehouse_info where warehouse_id = #{warehouseId} + + + + delete from warehouse_info where warehouse_id in + + #{warehouseId} + + + \ No newline at end of file