From 742ecbfb9d1b8b464ecff52aa73786d67932f524 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Sat, 5 Apr 2025 20:05:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A6=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../account/controller/AccInfoController.java | 119 +++++++ .../controller/AccTradeController.java | 119 +++++++ .../AccTradeWalletDetailController.java | 119 +++++++ .../controller/AccWalletInfoController.java | 119 +++++++ .../canteen/core/account/domain/AccInfo.java | 280 ++++++++++++++++ .../canteen/core/account/domain/AccTrade.java | 169 ++++++++++ .../account/domain/AccTradeWalletDetail.java | 85 +++++ .../core/account/domain/AccWalletInfo.java | 68 ++++ .../core/account/mapper/AccInfoMapper.java | 60 ++++ .../core/account/mapper/AccTradeMapper.java | 60 ++++ .../mapper/AccTradeWalletDetailMapper.java | 60 ++++ .../account/mapper/AccWalletInfoMapper.java | 60 ++++ .../core/account/service/IAccInfoService.java | 60 ++++ .../account/service/IAccTradeService.java | 60 ++++ .../service/IAccTradeWalletDetailService.java | 60 ++++ .../service/IAccWalletInfoService.java | 60 ++++ .../service/impl/AccInfoServiceImpl.java | 98 ++++++ .../service/impl/AccTradeServiceImpl.java | 98 ++++++ .../impl/AccTradeWalletDetailServiceImpl.java | 98 ++++++ .../impl/AccWalletInfoServiceImpl.java | 98 ++++++ .../mapper/account/AccInfoMapper.xml | 311 ++++++++++++++++++ .../mapper/account/AccTradeMapper.xml | 208 ++++++++++++ .../account/AccTradeWalletDetailMapper.xml | 121 +++++++ .../mapper/account/AccWalletInfoMapper.xml | 107 ++++++ 24 files changed, 2697 insertions(+) create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/controller/AccInfoController.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/controller/AccTradeController.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/controller/AccTradeWalletDetailController.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/controller/AccWalletInfoController.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/domain/AccInfo.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/domain/AccTrade.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/domain/AccTradeWalletDetail.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/domain/AccWalletInfo.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/mapper/AccInfoMapper.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/mapper/AccTradeMapper.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/mapper/AccTradeWalletDetailMapper.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/mapper/AccWalletInfoMapper.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/IAccInfoService.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/IAccTradeService.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/IAccTradeWalletDetailService.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/IAccWalletInfoService.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccInfoServiceImpl.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccTradeServiceImpl.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccTradeWalletDetailServiceImpl.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccWalletInfoServiceImpl.java create mode 100644 bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccInfoMapper.xml create mode 100644 bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccTradeMapper.xml create mode 100644 bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccTradeWalletDetailMapper.xml create mode 100644 bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccWalletInfoMapper.xml diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/controller/AccInfoController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/controller/AccInfoController.java new file mode 100644 index 0000000..73ebe0e --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/controller/AccInfoController.java @@ -0,0 +1,119 @@ +package com.bonus.canteen.core.account.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import com.bonus.common.log.enums.OperaType; +import com.bonus.canteen.core.common.annotation.PreventRepeatSubmit; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +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.bonus.common.log.annotation.SysLog; +import com.bonus.common.security.annotation.RequiresPermissions; +import com.bonus.canteen.core.account.domain.AccInfo; +import com.bonus.canteen.core.account.service.IAccInfoService; +import com.bonus.common.core.web.controller.BaseController; +import com.bonus.common.core.web.domain.AjaxResult; +import com.bonus.common.core.utils.poi.ExcelUtil; +import com.bonus.common.core.web.page.TableDataInfo; + +/** + * 账户资料Controller + * + * @author xsheng + * @date 2025-04-05 + */ +@Api(tags = "账户资料接口") +@RestController +@RequestMapping("/acc_info") +public class AccInfoController extends BaseController { + @Autowired + private IAccInfoService accInfoService; + + /** + * 查询账户资料列表 + */ + @ApiOperation(value = "查询账户资料列表") + //@RequiresPermissions("account:info:list") + @GetMapping("/list") + public TableDataInfo list(AccInfo accInfo) { + startPage(); + List list = accInfoService.selectAccInfoList(accInfo); + return getDataTable(list); + } + + /** + * 导出账户资料列表 + */ + @ApiOperation(value = "导出账户资料列表") + //@PreventRepeatSubmit + //@RequiresPermissions("account:info:export") + @SysLog(title = "账户资料", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出账户资料") + @PostMapping("/export") + public void export(HttpServletResponse response, AccInfo accInfo) { + List list = accInfoService.selectAccInfoList(accInfo); + ExcelUtil util = new ExcelUtil(AccInfo.class); + util.exportExcel(response, list, "账户资料数据"); + } + + /** + * 获取账户资料详细信息 + */ + @ApiOperation(value = "获取账户资料详细信息") + //@RequiresPermissions("account:info:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(accInfoService.selectAccInfoById(id)); + } + + /** + * 新增账户资料 + */ + @ApiOperation(value = "新增账户资料") + //@PreventRepeatSubmit + //@RequiresPermissions("account:info:add") + @SysLog(title = "账户资料", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增账户资料") + @PostMapping + public AjaxResult add(@RequestBody AccInfo accInfo) { + try { + return toAjax(accInfoService.insertAccInfo(accInfo)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 修改账户资料 + */ + @ApiOperation(value = "修改账户资料") + //@PreventRepeatSubmit + //@RequiresPermissions("account:info:edit") + @SysLog(title = "账户资料", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改账户资料") + @PostMapping("/edit") + public AjaxResult edit(@RequestBody AccInfo accInfo) { + try { + return toAjax(accInfoService.updateAccInfo(accInfo)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 删除账户资料 + */ + @ApiOperation(value = "删除账户资料") + //@PreventRepeatSubmit + //@RequiresPermissions("account:info:remove") + @SysLog(title = "账户资料", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除账户资料") + @PostMapping("/del/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(accInfoService.deleteAccInfoByIds(ids)); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/controller/AccTradeController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/controller/AccTradeController.java new file mode 100644 index 0000000..9c50462 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/controller/AccTradeController.java @@ -0,0 +1,119 @@ +package com.bonus.canteen.core.account.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import com.bonus.common.log.enums.OperaType; +import com.bonus.canteen.core.common.annotation.PreventRepeatSubmit; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +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.bonus.common.log.annotation.SysLog; +import com.bonus.common.security.annotation.RequiresPermissions; +import com.bonus.canteen.core.account.domain.AccTrade; +import com.bonus.canteen.core.account.service.IAccTradeService; +import com.bonus.common.core.web.controller.BaseController; +import com.bonus.common.core.web.domain.AjaxResult; +import com.bonus.common.core.utils.poi.ExcelUtil; +import com.bonus.common.core.web.page.TableDataInfo; + +/** + * 账户交易记录Controller + * + * @author xsheng + * @date 2025-04-05 + */ +@Api(tags = "账户交易记录接口") +@RestController +@RequestMapping("/acc_trade") +public class AccTradeController extends BaseController { + @Autowired + private IAccTradeService accTradeService; + + /** + * 查询账户交易记录列表 + */ + @ApiOperation(value = "查询账户交易记录列表") + //@RequiresPermissions("account:trade:list") + @GetMapping("/list") + public TableDataInfo list(AccTrade accTrade) { + startPage(); + List list = accTradeService.selectAccTradeList(accTrade); + return getDataTable(list); + } + + /** + * 导出账户交易记录列表 + */ + @ApiOperation(value = "导出账户交易记录列表") + //@PreventRepeatSubmit + //@RequiresPermissions("account:trade:export") + @SysLog(title = "账户交易记录", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出账户交易记录") + @PostMapping("/export") + public void export(HttpServletResponse response, AccTrade accTrade) { + List list = accTradeService.selectAccTradeList(accTrade); + ExcelUtil util = new ExcelUtil(AccTrade.class); + util.exportExcel(response, list, "账户交易记录数据"); + } + + /** + * 获取账户交易记录详细信息 + */ + @ApiOperation(value = "获取账户交易记录详细信息") + //@RequiresPermissions("account:trade:query") + @GetMapping(value = "/{tradeId}") + public AjaxResult getInfo(@PathVariable("tradeId") Long tradeId) { + return success(accTradeService.selectAccTradeByTradeId(tradeId)); + } + + /** + * 新增账户交易记录 + */ + @ApiOperation(value = "新增账户交易记录") + //@PreventRepeatSubmit + //@RequiresPermissions("account:trade:add") + @SysLog(title = "账户交易记录", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增账户交易记录") + @PostMapping + public AjaxResult add(@RequestBody AccTrade accTrade) { + try { + return toAjax(accTradeService.insertAccTrade(accTrade)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 修改账户交易记录 + */ + @ApiOperation(value = "修改账户交易记录") + //@PreventRepeatSubmit + //@RequiresPermissions("account:trade:edit") + @SysLog(title = "账户交易记录", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改账户交易记录") + @PostMapping("/edit") + public AjaxResult edit(@RequestBody AccTrade accTrade) { + try { + return toAjax(accTradeService.updateAccTrade(accTrade)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 删除账户交易记录 + */ + @ApiOperation(value = "删除账户交易记录") + //@PreventRepeatSubmit + //@RequiresPermissions("account:trade:remove") + @SysLog(title = "账户交易记录", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除账户交易记录") + @PostMapping("/del/{tradeIds}") + public AjaxResult remove(@PathVariable Long[] tradeIds) { + return toAjax(accTradeService.deleteAccTradeByTradeIds(tradeIds)); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/controller/AccTradeWalletDetailController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/controller/AccTradeWalletDetailController.java new file mode 100644 index 0000000..047f737 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/controller/AccTradeWalletDetailController.java @@ -0,0 +1,119 @@ +package com.bonus.canteen.core.account.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import com.bonus.common.log.enums.OperaType; +import com.bonus.canteen.core.common.annotation.PreventRepeatSubmit; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +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.bonus.common.log.annotation.SysLog; +import com.bonus.common.security.annotation.RequiresPermissions; +import com.bonus.canteen.core.account.domain.AccTradeWalletDetail; +import com.bonus.canteen.core.account.service.IAccTradeWalletDetailService; +import com.bonus.common.core.web.controller.BaseController; +import com.bonus.common.core.web.domain.AjaxResult; +import com.bonus.common.core.utils.poi.ExcelUtil; +import com.bonus.common.core.web.page.TableDataInfo; + +/** + * 钱包交易记录详情Controller + * + * @author xsheng + * @date 2025-04-05 + */ +@Api(tags = "钱包交易记录详情接口") +@RestController +@RequestMapping("/acc_trade_wallet_detail") +public class AccTradeWalletDetailController extends BaseController { + @Autowired + private IAccTradeWalletDetailService accTradeWalletDetailService; + + /** + * 查询钱包交易记录详情列表 + */ + @ApiOperation(value = "查询钱包交易记录详情列表") + //@RequiresPermissions("account:detail:list") + @GetMapping("/list") + public TableDataInfo list(AccTradeWalletDetail accTradeWalletDetail) { + startPage(); + List list = accTradeWalletDetailService.selectAccTradeWalletDetailList(accTradeWalletDetail); + return getDataTable(list); + } + + /** + * 导出钱包交易记录详情列表 + */ + @ApiOperation(value = "导出钱包交易记录详情列表") + //@PreventRepeatSubmit + //@RequiresPermissions("account:detail:export") + @SysLog(title = "钱包交易记录详情", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出钱包交易记录详情") + @PostMapping("/export") + public void export(HttpServletResponse response, AccTradeWalletDetail accTradeWalletDetail) { + List list = accTradeWalletDetailService.selectAccTradeWalletDetailList(accTradeWalletDetail); + ExcelUtil util = new ExcelUtil(AccTradeWalletDetail.class); + util.exportExcel(response, list, "钱包交易记录详情数据"); + } + + /** + * 获取钱包交易记录详情详细信息 + */ + @ApiOperation(value = "获取钱包交易记录详情详细信息") + //@RequiresPermissions("account:detail:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(accTradeWalletDetailService.selectAccTradeWalletDetailById(id)); + } + + /** + * 新增钱包交易记录详情 + */ + @ApiOperation(value = "新增钱包交易记录详情") + //@PreventRepeatSubmit + //@RequiresPermissions("account:detail:add") + @SysLog(title = "钱包交易记录详情", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增钱包交易记录详情") + @PostMapping + public AjaxResult add(@RequestBody AccTradeWalletDetail accTradeWalletDetail) { + try { + return toAjax(accTradeWalletDetailService.insertAccTradeWalletDetail(accTradeWalletDetail)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 修改钱包交易记录详情 + */ + @ApiOperation(value = "修改钱包交易记录详情") + //@PreventRepeatSubmit + //@RequiresPermissions("account:detail:edit") + @SysLog(title = "钱包交易记录详情", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改钱包交易记录详情") + @PostMapping("/edit") + public AjaxResult edit(@RequestBody AccTradeWalletDetail accTradeWalletDetail) { + try { + return toAjax(accTradeWalletDetailService.updateAccTradeWalletDetail(accTradeWalletDetail)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 删除钱包交易记录详情 + */ + @ApiOperation(value = "删除钱包交易记录详情") + //@PreventRepeatSubmit + //@RequiresPermissions("account:detail:remove") + @SysLog(title = "钱包交易记录详情", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除钱包交易记录详情") + @PostMapping("/del/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(accTradeWalletDetailService.deleteAccTradeWalletDetailByIds(ids)); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/controller/AccWalletInfoController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/controller/AccWalletInfoController.java new file mode 100644 index 0000000..e6cd849 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/controller/AccWalletInfoController.java @@ -0,0 +1,119 @@ +package com.bonus.canteen.core.account.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import com.bonus.common.log.enums.OperaType; +import com.bonus.canteen.core.common.annotation.PreventRepeatSubmit; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +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.bonus.common.log.annotation.SysLog; +import com.bonus.common.security.annotation.RequiresPermissions; +import com.bonus.canteen.core.account.domain.AccWalletInfo; +import com.bonus.canteen.core.account.service.IAccWalletInfoService; +import com.bonus.common.core.web.controller.BaseController; +import com.bonus.common.core.web.domain.AjaxResult; +import com.bonus.common.core.utils.poi.ExcelUtil; +import com.bonus.common.core.web.page.TableDataInfo; + +/** + * 钱包详情信息Controller + * + * @author xsheng + * @date 2025-04-05 + */ +@Api(tags = "钱包详情信息接口") +@RestController +@RequestMapping("/acc_wallet_info") +public class AccWalletInfoController extends BaseController { + @Autowired + private IAccWalletInfoService accWalletInfoService; + + /** + * 查询钱包详情信息列表 + */ + @ApiOperation(value = "查询钱包详情信息列表") + //@RequiresPermissions("account:info:list") + @GetMapping("/list") + public TableDataInfo list(AccWalletInfo accWalletInfo) { + startPage(); + List list = accWalletInfoService.selectAccWalletInfoList(accWalletInfo); + return getDataTable(list); + } + + /** + * 导出钱包详情信息列表 + */ + @ApiOperation(value = "导出钱包详情信息列表") + //@PreventRepeatSubmit + //@RequiresPermissions("account:info:export") + @SysLog(title = "钱包详情信息", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出钱包详情信息") + @PostMapping("/export") + public void export(HttpServletResponse response, AccWalletInfo accWalletInfo) { + List list = accWalletInfoService.selectAccWalletInfoList(accWalletInfo); + ExcelUtil util = new ExcelUtil(AccWalletInfo.class); + util.exportExcel(response, list, "钱包详情信息数据"); + } + + /** + * 获取钱包详情信息详细信息 + */ + @ApiOperation(value = "获取钱包详情信息详细信息") + //@RequiresPermissions("account:info:query") + @GetMapping(value = "/{userId}") + public AjaxResult getInfo(@PathVariable("userId") Long userId) { + return success(accWalletInfoService.selectAccWalletInfoByUserId(userId)); + } + + /** + * 新增钱包详情信息 + */ + @ApiOperation(value = "新增钱包详情信息") + //@PreventRepeatSubmit + //@RequiresPermissions("account:info:add") + @SysLog(title = "钱包详情信息", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增钱包详情信息") + @PostMapping + public AjaxResult add(@RequestBody AccWalletInfo accWalletInfo) { + try { + return toAjax(accWalletInfoService.insertAccWalletInfo(accWalletInfo)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 修改钱包详情信息 + */ + @ApiOperation(value = "修改钱包详情信息") + //@PreventRepeatSubmit + //@RequiresPermissions("account:info:edit") + @SysLog(title = "钱包详情信息", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改钱包详情信息") + @PostMapping("/edit") + public AjaxResult edit(@RequestBody AccWalletInfo accWalletInfo) { + try { + return toAjax(accWalletInfoService.updateAccWalletInfo(accWalletInfo)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 删除钱包详情信息 + */ + @ApiOperation(value = "删除钱包详情信息") + //@PreventRepeatSubmit + //@RequiresPermissions("account:info:remove") + @SysLog(title = "钱包详情信息", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除钱包详情信息") + @PostMapping("/del/{userIds}") + public AjaxResult remove(@PathVariable Long[] userIds) { + return toAjax(accWalletInfoService.deleteAccWalletInfoByUserIds(userIds)); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/domain/AccInfo.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/domain/AccInfo.java new file mode 100644 index 0000000..75481e3 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/domain/AccInfo.java @@ -0,0 +1,280 @@ +package com.bonus.canteen.core.account.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.bonus.common.core.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.ToString; +import com.bonus.common.core.web.domain.BaseEntity; + +/** + * 账户资料对象 acc_info + * + * @author xsheng + * @date 2025-04-05 + */ + + +@Data +@ToString +public class AccInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 主键自增 */ + private Long id; + + /** 账户id */ + @Excel(name = "账户id") + @ApiModelProperty(value = "账户id") + private Long accId; + + /** 账户名称 */ + @Excel(name = "账户名称") + @ApiModelProperty(value = "账户名称") + private String accName; + + /** 人员id */ + @Excel(name = "人员id") + @ApiModelProperty(value = "人员id") + private Long userId; + + /** 个人钱包余额 单位分 */ + @Excel(name = "个人钱包余额 单位分") + @ApiModelProperty(value = "个人钱包余额 单位分") + private Long walletBal; + + /** 补贴钱包余额 单位分 */ + @Excel(name = "补贴钱包余额 单位分") + @ApiModelProperty(value = "补贴钱包余额 单位分") + private Long subsidyBal; + + /** 红包余额 */ + @Excel(name = "红包余额") + @ApiModelProperty(value = "红包余额") + private Long redEnvelope; + + /** 冻结账户余额(补贴) */ + @Excel(name = "冻结账户余额(补贴)") + @ApiModelProperty(value = "冻结账户余额(补贴)") + private Long subsidyFreezeBal; + + /** 账户余额(个人钱包+补贴钱包) 单位分 */ + @Excel(name = "账户余额(个人钱包+补贴钱包) 单位分") + @ApiModelProperty(value = "账户余额(个人钱包+补贴钱包) 单位分") + private Long accBal; + + /** 钱包2 预留 */ + @Excel(name = "钱包2 预留") + @ApiModelProperty(value = "钱包2 预留") + private Long balance2; + + /** 水控个人钱包余额 单位分 */ + @Excel(name = "水控个人钱包余额 单位分") + @ApiModelProperty(value = "水控个人钱包余额 单位分") + private Long waterWalletBal; + + /** 水控补贴钱包余额 单位分 */ + @Excel(name = "水控补贴钱包余额 单位分") + @ApiModelProperty(value = "水控补贴钱包余额 单位分") + private Long waterSubsidyBal; + + /** 冻结个人钱包余额 */ + @Excel(name = "冻结个人钱包余额") + @ApiModelProperty(value = "冻结个人钱包余额") + private Long freezeWalletBal; + + /** 冻结补贴钱包余额 */ + @Excel(name = "冻结补贴钱包余额") + @ApiModelProperty(value = "冻结补贴钱包余额") + private Long freezeSubsidyBal; + + /** 冻结红包余额 */ + @Excel(name = "冻结红包余额") + @ApiModelProperty(value = "冻结红包余额") + private Long freezeRedEnvelope; + + /** 个人钱包透支金额 单位分 */ + @Excel(name = "个人钱包透支金额 单位分") + @ApiModelProperty(value = "个人钱包透支金额 单位分") + private Long walletOverBal; + + /** 补贴透支金额 单位分 */ + @Excel(name = "补贴透支金额 单位分") + @ApiModelProperty(value = "补贴透支金额 单位分") + private Long subOverBal; + + /** 积分 */ + @Excel(name = "积分") + @ApiModelProperty(value = "积分") + private Long scope; + + /** 有效截止日期 */ + @ApiModelProperty(value = "有效截止日期") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "有效截止日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date endDate; + + /** 红包过期时间 */ + @ApiModelProperty(value = "红包过期时间") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "红包过期时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date redValidityDate; + + /** 账户状态 1正常 2冻结 3销户 */ + @Excel(name = "账户状态 1正常 2冻结 3销户") + @ApiModelProperty(value = "账户状态 1正常 2冻结 3销户") + private Long accStatus; + + /** 支付密码 加密存储 */ + @Excel(name = "支付密码 加密存储") + @ApiModelProperty(value = "支付密码 加密存储") + private String payPwd; + + /** 按日补贴标识 1-已补贴 2-未补贴(针对就餐补贴) */ + @Excel(name = "按日补贴标识 1-已补贴 2-未补贴(针对就餐补贴)") + @ApiModelProperty(value = "按日补贴标识 1-已补贴 2-未补贴(针对就餐补贴)") + private Long subDateFlag; + + /** 按月补贴标识 1-已补贴 2-未补贴(针对就餐补贴) */ + @Excel(name = "按月补贴标识 1-已补贴 2-未补贴(针对就餐补贴)") + @ApiModelProperty(value = "按月补贴标识 1-已补贴 2-未补贴(针对就餐补贴)") + private Long subMonthFlag; + + /** 账户交易次数 每次对余额的增减时都要递增1 */ + @Excel(name = "账户交易次数 每次对余额的增减时都要递增1") + @ApiModelProperty(value = "账户交易次数 每次对余额的增减时都要递增1") + private Long accPayCount; + + /** 最后刷卡时间 */ + @ApiModelProperty(value = "最后刷卡时间") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "最后刷卡时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date lastCreditTime; + + /** 餐次id */ + @Excel(name = "餐次id") + @ApiModelProperty(value = "餐次id") + private Long intervalId; + + /** 当餐使用刷卡次数 */ + @Excel(name = "当餐使用刷卡次数") + @ApiModelProperty(value = "当餐使用刷卡次数") + private Long currCreditCount; + + /** 当餐使用刷脸次数 */ + @Excel(name = "当餐使用刷脸次数") + @ApiModelProperty(value = "当餐使用刷脸次数") + private Long currBrushCount; + + /** 当餐使用预留1次数 */ + @Excel(name = "当餐使用预留1次数") + @ApiModelProperty(value = "当餐使用预留1次数") + private Long currUseReserveCount1; + + /** 当餐使用预留2次数 */ + @Excel(name = "当餐使用预留2次数") + @ApiModelProperty(value = "当餐使用预留2次数") + private Long currUseReserveCount2; + + /** 当日使用次数 */ + @Excel(name = "当日使用次数") + @ApiModelProperty(value = "当日使用次数") + private Long sameDayCount; + + /** 当月使用次数 */ + @Excel(name = "当月使用次数") + @ApiModelProperty(value = "当月使用次数") + private Long sameMonthCount; + + /** 当餐累计金额 */ + @Excel(name = "当餐累计金额") + @ApiModelProperty(value = "当餐累计金额") + private Long currCumuAmount; + + /** 当日累计金额 */ + @Excel(name = "当日累计金额") + @ApiModelProperty(value = "当日累计金额") + private Long dayCumuAmount; + + /** 当月累计金额 */ + @Excel(name = "当月累计金额") + @ApiModelProperty(value = "当月累计金额") + private Long monthSumuAmount; + + /** 个人钱包最低余额限制金额 */ + @Excel(name = "个人钱包最低余额限制金额") + @ApiModelProperty(value = "个人钱包最低余额限制金额") + private Long minWalletBalLimit; + + /** 补贴钱包最低余额限制金额 */ + @Excel(name = "补贴钱包最低余额限制金额") + @ApiModelProperty(value = "补贴钱包最低余额限制金额") + private Long minRedBalLimit; + + /** 红包钱包最低余额限制金额 */ + @Excel(name = "红包钱包最低余额限制金额") + @ApiModelProperty(value = "红包钱包最低余额限制金额") + private Long minSubBalLimit; + + /** 当月累计使用满减次数 */ + @Excel(name = "当月累计使用满减次数") + @ApiModelProperty(value = "当月累计使用满减次数") + private Long monthFullReduceAmount; + + /** 最后使用满减时间 */ + @ApiModelProperty(value = "最后使用满减时间") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "最后使用满减时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date lastFullReduceTime; + + /** 上次导入补贴时间 */ + @ApiModelProperty(value = "上次导入补贴时间") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "上次导入补贴时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date lastSubTime; + + /** 补贴过期清0时间 */ + @ApiModelProperty(value = "补贴过期清0时间") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "补贴过期清0时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date subValidityDate; + + /** 上次导入补贴金额 */ + @Excel(name = "上次导入补贴金额") + @ApiModelProperty(value = "上次导入补贴金额") + private Long lastSubAmount; + + /** 上次导入个人钱包时间 */ + @ApiModelProperty(value = "上次导入个人钱包时间") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "上次导入个人钱包时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date lastWalTime; + + /** 上次导入个人钱包金额 */ + @Excel(name = "上次导入个人钱包金额") + @ApiModelProperty(value = "上次导入个人钱包金额") + private Long lastWalAmount; + + /** 乐观锁 */ + @Excel(name = "乐观锁") + @ApiModelProperty(value = "乐观锁") + private Long revision; + + /** 预留字段1 */ + @Excel(name = "预留字段1") + @ApiModelProperty(value = "预留字段1") + private String reserved1; + + /** 预留字段2 */ + @Excel(name = "预留字段2") + @ApiModelProperty(value = "预留字段2") + private String reserved2; + + /** 预留字段3 */ + @Excel(name = "预留字段3") + @ApiModelProperty(value = "预留字段3") + private String reserved3; + + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/domain/AccTrade.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/domain/AccTrade.java new file mode 100644 index 0000000..722127b --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/domain/AccTrade.java @@ -0,0 +1,169 @@ +package com.bonus.canteen.core.account.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.bonus.common.core.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.ToString; +import com.bonus.common.core.web.domain.BaseEntity; + +/** + * 账户交易记录对象 acc_trade + * + * @author xsheng + * @date 2025-04-05 + */ + + +@Data +@ToString +public class AccTrade extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 交易id */ + private Long tradeId; + + /** 交易时间 */ + @ApiModelProperty(value = "交易时间") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "交易时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date tradeTime; + + /** 人员id */ + @Excel(name = "人员id") + @ApiModelProperty(value = "人员id") + private Long userId; + + /** 所属组织id */ + @Excel(name = "所属组织id") + @ApiModelProperty(value = "所属组织id") + private Long deptId; + + /** 交易类型 */ + @Excel(name = "交易类型") + @ApiModelProperty(value = "交易类型") + private Long tradeType; + + /** 实际交易金额/分 */ + @Excel(name = "实际交易金额/分") + @ApiModelProperty(value = "实际交易金额/分") + private Long actualAmount; + + /** 交易金额/分 */ + @Excel(name = "交易金额/分") + @ApiModelProperty(value = "交易金额/分") + private Long amount; + + /** 钱包可用总余额(不包含冻结金额) */ + @Excel(name = "钱包可用总余额(不包含冻结金额)") + @ApiModelProperty(value = "钱包可用总余额(不包含冻结金额)") + private Long walletBalTotal; + + /** 账户总余额(所有钱包余额+冻结金额) */ + @Excel(name = "账户总余额(所有钱包余额+冻结金额)") + @ApiModelProperty(value = "账户总余额(所有钱包余额+冻结金额)") + private Long accAllBal; + + /** 支付渠道 */ + @Excel(name = "支付渠道") + @ApiModelProperty(value = "支付渠道") + private Long payChannel; + + /** 支付方式 */ + @Excel(name = "支付方式") + @ApiModelProperty(value = "支付方式") + private Long payType; + + /** 支付状态 */ + @Excel(name = "支付状态") + @ApiModelProperty(value = "支付状态") + private Long payState; + + /** 交易状态 */ + @Excel(name = "交易状态") + @ApiModelProperty(value = "交易状态") + private Long tradeState; + + /** 三方支付订单号 */ + @Excel(name = "三方支付订单号") + @ApiModelProperty(value = "三方支付订单号") + private String thirdTradeNo; + + /** 设备sn码 */ + @Excel(name = "设备sn码") + @ApiModelProperty(value = "设备sn码") + private String machineSn; + + /** 批量操作批次号 */ + @Excel(name = "批量操作批次号") + @ApiModelProperty(value = "批量操作批次号") + private String batchNum; + + /** 关联小牛订单号 */ + @Excel(name = "关联小牛订单号") + @ApiModelProperty(value = "关联小牛订单号") + private Long leOrdNo; + + /** 关联原记录交易id */ + @Excel(name = "关联原记录交易id") + @ApiModelProperty(value = "关联原记录交易id") + private Long originTradeId; + + /** 补贴定时规则id */ + @Excel(name = "补贴定时规则id") + @ApiModelProperty(value = "补贴定时规则id") + private Long subTimeRuleId; + + /** 管理费 */ + @Excel(name = "管理费") + @ApiModelProperty(value = "管理费") + private Long manageCost; + + /** 提现来源 1小程序 2web端 */ + @Excel(name = "提现来源 1小程序 2web端") + @ApiModelProperty(value = "提现来源 1小程序 2web端") + private Long withdrawSource; + + /** 充值来源 */ + @Excel(name = "充值来源") + @ApiModelProperty(value = "充值来源") + private Long rechargeSource; + + /** 食堂Id */ + @Excel(name = "食堂Id") + @ApiModelProperty(value = "食堂Id") + private Long canteenId; + + /** 充值设备类型 1-多功能终端 2-现金充值机 */ + @Excel(name = "充值设备类型 1-多功能终端 2-现金充值机") + @ApiModelProperty(value = "充值设备类型 1-多功能终端 2-现金充值机") + private Long machineType; + + /** 失败原因 */ + @Excel(name = "失败原因") + @ApiModelProperty(value = "失败原因") + private String failReason; + + /** 充值来源具体操作(1-单人2-批量3-导入4-赠送) */ + @Excel(name = "充值来源具体操作(1-单人2-批量3-导入4-赠送)") + @ApiModelProperty(value = "充值来源具体操作(1-单人2-批量3-导入4-赠送)") + private Long rechargeOperate; + + /** 人员类别 */ + @Excel(name = "人员类别") + @ApiModelProperty(value = "人员类别") + private Long psnType; + + /** 交易记录操作来源 */ + @Excel(name = "交易记录操作来源") + @ApiModelProperty(value = "交易记录操作来源") + private Long operateSource; + + /** 批量导入操作关联id */ + @Excel(name = "批量导入操作关联id") + @ApiModelProperty(value = "批量导入操作关联id") + private Long batchImportId; + + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/domain/AccTradeWalletDetail.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/domain/AccTradeWalletDetail.java new file mode 100644 index 0000000..141023f --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/domain/AccTradeWalletDetail.java @@ -0,0 +1,85 @@ +package com.bonus.canteen.core.account.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.bonus.common.core.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.ToString; +import com.bonus.common.core.web.domain.BaseEntity; + +/** + * 钱包交易记录详情对象 acc_trade_wallet_detail + * + * @author xsheng + * @date 2025-04-05 + */ + + +@Data +@ToString +public class AccTradeWalletDetail extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 主键id */ + private Long id; + + /** 账户交易记录id */ + @Excel(name = "账户交易记录id") + @ApiModelProperty(value = "账户交易记录id") + private Long tradeId; + + /** 人员id */ + @Excel(name = "人员id") + @ApiModelProperty(value = "人员id") + private Long userId; + + /** 钱包类型id */ + @Excel(name = "钱包类型id") + @ApiModelProperty(value = "钱包类型id") + private Long walletId; + + /** 对应钱包交易金额/分 */ + @Excel(name = "对应钱包交易金额/分") + @ApiModelProperty(value = "对应钱包交易金额/分") + private Long amount; + + /** 钱包余额/分 */ + @Excel(name = "钱包余额/分") + @ApiModelProperty(value = "钱包余额/分") + private Long walletBal; + + /** 交易类型 */ + @Excel(name = "交易类型") + @ApiModelProperty(value = "交易类型") + private Long tradeType; + + /** 对应钱包冻结金额/分 */ + @Excel(name = "对应钱包冻结金额/分") + @ApiModelProperty(value = "对应钱包冻结金额/分") + private Long frozenBalance; + + /** 交易时间(对应acc_trade交易时间) */ + @ApiModelProperty(value = "交易时间(对应acc_trade交易时间)") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "交易时间(对应acc_trade交易时间)", width = 30, dateFormat = "yyyy-MM-dd") + private Date tradeTime; + + /** 使用有效期 */ + @ApiModelProperty(value = "使用有效期") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "使用有效期", width = 30, dateFormat = "yyyy-MM-dd") + private Date validateTime; + + /** 已使用金额(针对存在使用有效期) */ + @Excel(name = "已使用金额(针对存在使用有效期)") + @ApiModelProperty(value = "已使用金额(针对存在使用有效期)") + private Long useAmount; + + /** 是否已执行过期清空 1-是 2-否 */ + @Excel(name = "是否已执行过期清空 1-是 2-否") + @ApiModelProperty(value = "是否已执行过期清空 1-是 2-否") + private Long expiredClear; + + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/domain/AccWalletInfo.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/domain/AccWalletInfo.java new file mode 100644 index 0000000..fe39f92 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/domain/AccWalletInfo.java @@ -0,0 +1,68 @@ +package com.bonus.canteen.core.account.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.bonus.common.core.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.ToString; +import com.bonus.common.core.web.domain.BaseEntity; + +/** + * 钱包详情信息对象 acc_wallet_info + * + * @author xsheng + * @date 2025-04-05 + */ + + +@Data +@ToString +public class AccWalletInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 人员id */ + private Long userId; + + /** 账户id */ + @Excel(name = "账户id") + @ApiModelProperty(value = "账户id") + private Long accId; + + /** 钱包类型id */ + private Long walletId; + + /** 钱包余额/分 */ + @Excel(name = "钱包余额/分") + @ApiModelProperty(value = "钱包余额/分") + private Long walletBal; + + /** 最低余额限制/分 */ + @Excel(name = "最低余额限制/分") + @ApiModelProperty(value = "最低余额限制/分") + private Long limitBalance; + + /** 冻结金额 */ + @Excel(name = "冻结金额") + @ApiModelProperty(value = "冻结金额") + private Long frozenBalance; + + /** 过期时间 */ + @ApiModelProperty(value = "过期时间") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "过期时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date expiredTime; + + /** 最后一次补贴金额/分 */ + @Excel(name = "最后一次补贴金额/分") + @ApiModelProperty(value = "最后一次补贴金额/分") + private Long lastSubsidyAmount; + + /** 最后一次补贴日期 */ + @ApiModelProperty(value = "最后一次补贴日期") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "最后一次补贴日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date lastSubsidyTime; + + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/mapper/AccInfoMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/mapper/AccInfoMapper.java new file mode 100644 index 0000000..0255a9a --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/mapper/AccInfoMapper.java @@ -0,0 +1,60 @@ +package com.bonus.canteen.core.account.mapper; + +import java.util.List; +import com.bonus.canteen.core.account.domain.AccInfo; + +/** + * 账户资料Mapper接口 + * + * @author xsheng + * @date 2025-04-05 + */ +public interface AccInfoMapper { + /** + * 查询账户资料 + * + * @param id 账户资料主键 + * @return 账户资料 + */ + public AccInfo selectAccInfoById(Long id); + + /** + * 查询账户资料列表 + * + * @param accInfo 账户资料 + * @return 账户资料集合 + */ + public List selectAccInfoList(AccInfo accInfo); + + /** + * 新增账户资料 + * + * @param accInfo 账户资料 + * @return 结果 + */ + public int insertAccInfo(AccInfo accInfo); + + /** + * 修改账户资料 + * + * @param accInfo 账户资料 + * @return 结果 + */ + public int updateAccInfo(AccInfo accInfo); + + /** + * 删除账户资料 + * + * @param id 账户资料主键 + * @return 结果 + */ + public int deleteAccInfoById(Long id); + + /** + * 批量删除账户资料 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteAccInfoByIds(Long[] ids); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/mapper/AccTradeMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/mapper/AccTradeMapper.java new file mode 100644 index 0000000..81195e8 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/mapper/AccTradeMapper.java @@ -0,0 +1,60 @@ +package com.bonus.canteen.core.account.mapper; + +import java.util.List; +import com.bonus.canteen.core.account.domain.AccTrade; + +/** + * 账户交易记录Mapper接口 + * + * @author xsheng + * @date 2025-04-05 + */ +public interface AccTradeMapper { + /** + * 查询账户交易记录 + * + * @param tradeId 账户交易记录主键 + * @return 账户交易记录 + */ + public AccTrade selectAccTradeByTradeId(Long tradeId); + + /** + * 查询账户交易记录列表 + * + * @param accTrade 账户交易记录 + * @return 账户交易记录集合 + */ + public List selectAccTradeList(AccTrade accTrade); + + /** + * 新增账户交易记录 + * + * @param accTrade 账户交易记录 + * @return 结果 + */ + public int insertAccTrade(AccTrade accTrade); + + /** + * 修改账户交易记录 + * + * @param accTrade 账户交易记录 + * @return 结果 + */ + public int updateAccTrade(AccTrade accTrade); + + /** + * 删除账户交易记录 + * + * @param tradeId 账户交易记录主键 + * @return 结果 + */ + public int deleteAccTradeByTradeId(Long tradeId); + + /** + * 批量删除账户交易记录 + * + * @param tradeIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteAccTradeByTradeIds(Long[] tradeIds); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/mapper/AccTradeWalletDetailMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/mapper/AccTradeWalletDetailMapper.java new file mode 100644 index 0000000..795e808 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/mapper/AccTradeWalletDetailMapper.java @@ -0,0 +1,60 @@ +package com.bonus.canteen.core.account.mapper; + +import java.util.List; +import com.bonus.canteen.core.account.domain.AccTradeWalletDetail; + +/** + * 钱包交易记录详情Mapper接口 + * + * @author xsheng + * @date 2025-04-05 + */ +public interface AccTradeWalletDetailMapper { + /** + * 查询钱包交易记录详情 + * + * @param id 钱包交易记录详情主键 + * @return 钱包交易记录详情 + */ + public AccTradeWalletDetail selectAccTradeWalletDetailById(Long id); + + /** + * 查询钱包交易记录详情列表 + * + * @param accTradeWalletDetail 钱包交易记录详情 + * @return 钱包交易记录详情集合 + */ + public List selectAccTradeWalletDetailList(AccTradeWalletDetail accTradeWalletDetail); + + /** + * 新增钱包交易记录详情 + * + * @param accTradeWalletDetail 钱包交易记录详情 + * @return 结果 + */ + public int insertAccTradeWalletDetail(AccTradeWalletDetail accTradeWalletDetail); + + /** + * 修改钱包交易记录详情 + * + * @param accTradeWalletDetail 钱包交易记录详情 + * @return 结果 + */ + public int updateAccTradeWalletDetail(AccTradeWalletDetail accTradeWalletDetail); + + /** + * 删除钱包交易记录详情 + * + * @param id 钱包交易记录详情主键 + * @return 结果 + */ + public int deleteAccTradeWalletDetailById(Long id); + + /** + * 批量删除钱包交易记录详情 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteAccTradeWalletDetailByIds(Long[] ids); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/mapper/AccWalletInfoMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/mapper/AccWalletInfoMapper.java new file mode 100644 index 0000000..a5062e5 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/mapper/AccWalletInfoMapper.java @@ -0,0 +1,60 @@ +package com.bonus.canteen.core.account.mapper; + +import java.util.List; +import com.bonus.canteen.core.account.domain.AccWalletInfo; + +/** + * 钱包详情信息Mapper接口 + * + * @author xsheng + * @date 2025-04-05 + */ +public interface AccWalletInfoMapper { + /** + * 查询钱包详情信息 + * + * @param userId 钱包详情信息主键 + * @return 钱包详情信息 + */ + public AccWalletInfo selectAccWalletInfoByUserId(Long userId); + + /** + * 查询钱包详情信息列表 + * + * @param accWalletInfo 钱包详情信息 + * @return 钱包详情信息集合 + */ + public List selectAccWalletInfoList(AccWalletInfo accWalletInfo); + + /** + * 新增钱包详情信息 + * + * @param accWalletInfo 钱包详情信息 + * @return 结果 + */ + public int insertAccWalletInfo(AccWalletInfo accWalletInfo); + + /** + * 修改钱包详情信息 + * + * @param accWalletInfo 钱包详情信息 + * @return 结果 + */ + public int updateAccWalletInfo(AccWalletInfo accWalletInfo); + + /** + * 删除钱包详情信息 + * + * @param userId 钱包详情信息主键 + * @return 结果 + */ + public int deleteAccWalletInfoByUserId(Long userId); + + /** + * 批量删除钱包详情信息 + * + * @param userIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteAccWalletInfoByUserIds(Long[] userIds); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/IAccInfoService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/IAccInfoService.java new file mode 100644 index 0000000..08d72d8 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/IAccInfoService.java @@ -0,0 +1,60 @@ +package com.bonus.canteen.core.account.service; + +import java.util.List; +import com.bonus.canteen.core.account.domain.AccInfo; + +/** + * 账户资料Service接口 + * + * @author xsheng + * @date 2025-04-05 + */ +public interface IAccInfoService { + /** + * 查询账户资料 + * + * @param id 账户资料主键 + * @return 账户资料 + */ + public AccInfo selectAccInfoById(Long id); + + /** + * 查询账户资料列表 + * + * @param accInfo 账户资料 + * @return 账户资料集合 + */ + public List selectAccInfoList(AccInfo accInfo); + + /** + * 新增账户资料 + * + * @param accInfo 账户资料 + * @return 结果 + */ + public int insertAccInfo(AccInfo accInfo); + + /** + * 修改账户资料 + * + * @param accInfo 账户资料 + * @return 结果 + */ + public int updateAccInfo(AccInfo accInfo); + + /** + * 批量删除账户资料 + * + * @param ids 需要删除的账户资料主键集合 + * @return 结果 + */ + public int deleteAccInfoByIds(Long[] ids); + + /** + * 删除账户资料信息 + * + * @param id 账户资料主键 + * @return 结果 + */ + public int deleteAccInfoById(Long id); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/IAccTradeService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/IAccTradeService.java new file mode 100644 index 0000000..c7fd165 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/IAccTradeService.java @@ -0,0 +1,60 @@ +package com.bonus.canteen.core.account.service; + +import java.util.List; +import com.bonus.canteen.core.account.domain.AccTrade; + +/** + * 账户交易记录Service接口 + * + * @author xsheng + * @date 2025-04-05 + */ +public interface IAccTradeService { + /** + * 查询账户交易记录 + * + * @param tradeId 账户交易记录主键 + * @return 账户交易记录 + */ + public AccTrade selectAccTradeByTradeId(Long tradeId); + + /** + * 查询账户交易记录列表 + * + * @param accTrade 账户交易记录 + * @return 账户交易记录集合 + */ + public List selectAccTradeList(AccTrade accTrade); + + /** + * 新增账户交易记录 + * + * @param accTrade 账户交易记录 + * @return 结果 + */ + public int insertAccTrade(AccTrade accTrade); + + /** + * 修改账户交易记录 + * + * @param accTrade 账户交易记录 + * @return 结果 + */ + public int updateAccTrade(AccTrade accTrade); + + /** + * 批量删除账户交易记录 + * + * @param tradeIds 需要删除的账户交易记录主键集合 + * @return 结果 + */ + public int deleteAccTradeByTradeIds(Long[] tradeIds); + + /** + * 删除账户交易记录信息 + * + * @param tradeId 账户交易记录主键 + * @return 结果 + */ + public int deleteAccTradeByTradeId(Long tradeId); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/IAccTradeWalletDetailService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/IAccTradeWalletDetailService.java new file mode 100644 index 0000000..754c8f2 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/IAccTradeWalletDetailService.java @@ -0,0 +1,60 @@ +package com.bonus.canteen.core.account.service; + +import java.util.List; +import com.bonus.canteen.core.account.domain.AccTradeWalletDetail; + +/** + * 钱包交易记录详情Service接口 + * + * @author xsheng + * @date 2025-04-05 + */ +public interface IAccTradeWalletDetailService { + /** + * 查询钱包交易记录详情 + * + * @param id 钱包交易记录详情主键 + * @return 钱包交易记录详情 + */ + public AccTradeWalletDetail selectAccTradeWalletDetailById(Long id); + + /** + * 查询钱包交易记录详情列表 + * + * @param accTradeWalletDetail 钱包交易记录详情 + * @return 钱包交易记录详情集合 + */ + public List selectAccTradeWalletDetailList(AccTradeWalletDetail accTradeWalletDetail); + + /** + * 新增钱包交易记录详情 + * + * @param accTradeWalletDetail 钱包交易记录详情 + * @return 结果 + */ + public int insertAccTradeWalletDetail(AccTradeWalletDetail accTradeWalletDetail); + + /** + * 修改钱包交易记录详情 + * + * @param accTradeWalletDetail 钱包交易记录详情 + * @return 结果 + */ + public int updateAccTradeWalletDetail(AccTradeWalletDetail accTradeWalletDetail); + + /** + * 批量删除钱包交易记录详情 + * + * @param ids 需要删除的钱包交易记录详情主键集合 + * @return 结果 + */ + public int deleteAccTradeWalletDetailByIds(Long[] ids); + + /** + * 删除钱包交易记录详情信息 + * + * @param id 钱包交易记录详情主键 + * @return 结果 + */ + public int deleteAccTradeWalletDetailById(Long id); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/IAccWalletInfoService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/IAccWalletInfoService.java new file mode 100644 index 0000000..1fe78a5 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/IAccWalletInfoService.java @@ -0,0 +1,60 @@ +package com.bonus.canteen.core.account.service; + +import java.util.List; +import com.bonus.canteen.core.account.domain.AccWalletInfo; + +/** + * 钱包详情信息Service接口 + * + * @author xsheng + * @date 2025-04-05 + */ +public interface IAccWalletInfoService { + /** + * 查询钱包详情信息 + * + * @param userId 钱包详情信息主键 + * @return 钱包详情信息 + */ + public AccWalletInfo selectAccWalletInfoByUserId(Long userId); + + /** + * 查询钱包详情信息列表 + * + * @param accWalletInfo 钱包详情信息 + * @return 钱包详情信息集合 + */ + public List selectAccWalletInfoList(AccWalletInfo accWalletInfo); + + /** + * 新增钱包详情信息 + * + * @param accWalletInfo 钱包详情信息 + * @return 结果 + */ + public int insertAccWalletInfo(AccWalletInfo accWalletInfo); + + /** + * 修改钱包详情信息 + * + * @param accWalletInfo 钱包详情信息 + * @return 结果 + */ + public int updateAccWalletInfo(AccWalletInfo accWalletInfo); + + /** + * 批量删除钱包详情信息 + * + * @param userIds 需要删除的钱包详情信息主键集合 + * @return 结果 + */ + public int deleteAccWalletInfoByUserIds(Long[] userIds); + + /** + * 删除钱包详情信息信息 + * + * @param userId 钱包详情信息主键 + * @return 结果 + */ + public int deleteAccWalletInfoByUserId(Long userId); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccInfoServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccInfoServiceImpl.java new file mode 100644 index 0000000..2be372f --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccInfoServiceImpl.java @@ -0,0 +1,98 @@ +package com.bonus.canteen.core.account.service.impl; + +import java.util.List; +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 com.bonus.canteen.core.account.mapper.AccInfoMapper; +import com.bonus.canteen.core.account.domain.AccInfo; +import com.bonus.canteen.core.account.service.IAccInfoService; + +/** + * 账户资料Service业务层处理 + * + * @author xsheng + * @date 2025-04-05 + */ +@Service +public class AccInfoServiceImpl implements IAccInfoService { + @Autowired + private AccInfoMapper accInfoMapper; + + /** + * 查询账户资料 + * + * @param id 账户资料主键 + * @return 账户资料 + */ + @Override + public AccInfo selectAccInfoById(Long id) { + return accInfoMapper.selectAccInfoById(id); + } + + /** + * 查询账户资料列表 + * + * @param accInfo 账户资料 + * @return 账户资料 + */ + @Override + public List selectAccInfoList(AccInfo accInfo) { + return accInfoMapper.selectAccInfoList(accInfo); + } + + /** + * 新增账户资料 + * + * @param accInfo 账户资料 + * @return 结果 + */ + @Override + public int insertAccInfo(AccInfo accInfo) { + accInfo.setCreateTime(DateUtils.getNowDate()); + try { + return accInfoMapper.insertAccInfo(accInfo); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + + /** + * 修改账户资料 + * + * @param accInfo 账户资料 + * @return 结果 + */ + @Override + public int updateAccInfo(AccInfo accInfo) { + accInfo.setUpdateTime(DateUtils.getNowDate()); + try { + return accInfoMapper.updateAccInfo(accInfo); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + + /** + * 批量删除账户资料 + * + * @param ids 需要删除的账户资料主键 + * @return 结果 + */ + @Override + public int deleteAccInfoByIds(Long[] ids) { + return accInfoMapper.deleteAccInfoByIds(ids); + } + + /** + * 删除账户资料信息 + * + * @param id 账户资料主键 + * @return 结果 + */ + @Override + public int deleteAccInfoById(Long id) { + return accInfoMapper.deleteAccInfoById(id); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccTradeServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccTradeServiceImpl.java new file mode 100644 index 0000000..e48cdce --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccTradeServiceImpl.java @@ -0,0 +1,98 @@ +package com.bonus.canteen.core.account.service.impl; + +import java.util.List; +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 com.bonus.canteen.core.account.mapper.AccTradeMapper; +import com.bonus.canteen.core.account.domain.AccTrade; +import com.bonus.canteen.core.account.service.IAccTradeService; + +/** + * 账户交易记录Service业务层处理 + * + * @author xsheng + * @date 2025-04-05 + */ +@Service +public class AccTradeServiceImpl implements IAccTradeService { + @Autowired + private AccTradeMapper accTradeMapper; + + /** + * 查询账户交易记录 + * + * @param tradeId 账户交易记录主键 + * @return 账户交易记录 + */ + @Override + public AccTrade selectAccTradeByTradeId(Long tradeId) { + return accTradeMapper.selectAccTradeByTradeId(tradeId); + } + + /** + * 查询账户交易记录列表 + * + * @param accTrade 账户交易记录 + * @return 账户交易记录 + */ + @Override + public List selectAccTradeList(AccTrade accTrade) { + return accTradeMapper.selectAccTradeList(accTrade); + } + + /** + * 新增账户交易记录 + * + * @param accTrade 账户交易记录 + * @return 结果 + */ + @Override + public int insertAccTrade(AccTrade accTrade) { + accTrade.setCreateTime(DateUtils.getNowDate()); + try { + return accTradeMapper.insertAccTrade(accTrade); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + + /** + * 修改账户交易记录 + * + * @param accTrade 账户交易记录 + * @return 结果 + */ + @Override + public int updateAccTrade(AccTrade accTrade) { + accTrade.setUpdateTime(DateUtils.getNowDate()); + try { + return accTradeMapper.updateAccTrade(accTrade); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + + /** + * 批量删除账户交易记录 + * + * @param tradeIds 需要删除的账户交易记录主键 + * @return 结果 + */ + @Override + public int deleteAccTradeByTradeIds(Long[] tradeIds) { + return accTradeMapper.deleteAccTradeByTradeIds(tradeIds); + } + + /** + * 删除账户交易记录信息 + * + * @param tradeId 账户交易记录主键 + * @return 结果 + */ + @Override + public int deleteAccTradeByTradeId(Long tradeId) { + return accTradeMapper.deleteAccTradeByTradeId(tradeId); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccTradeWalletDetailServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccTradeWalletDetailServiceImpl.java new file mode 100644 index 0000000..790162a --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccTradeWalletDetailServiceImpl.java @@ -0,0 +1,98 @@ +package com.bonus.canteen.core.account.service.impl; + +import java.util.List; +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 com.bonus.canteen.core.account.mapper.AccTradeWalletDetailMapper; +import com.bonus.canteen.core.account.domain.AccTradeWalletDetail; +import com.bonus.canteen.core.account.service.IAccTradeWalletDetailService; + +/** + * 钱包交易记录详情Service业务层处理 + * + * @author xsheng + * @date 2025-04-05 + */ +@Service +public class AccTradeWalletDetailServiceImpl implements IAccTradeWalletDetailService { + @Autowired + private AccTradeWalletDetailMapper accTradeWalletDetailMapper; + + /** + * 查询钱包交易记录详情 + * + * @param id 钱包交易记录详情主键 + * @return 钱包交易记录详情 + */ + @Override + public AccTradeWalletDetail selectAccTradeWalletDetailById(Long id) { + return accTradeWalletDetailMapper.selectAccTradeWalletDetailById(id); + } + + /** + * 查询钱包交易记录详情列表 + * + * @param accTradeWalletDetail 钱包交易记录详情 + * @return 钱包交易记录详情 + */ + @Override + public List selectAccTradeWalletDetailList(AccTradeWalletDetail accTradeWalletDetail) { + return accTradeWalletDetailMapper.selectAccTradeWalletDetailList(accTradeWalletDetail); + } + + /** + * 新增钱包交易记录详情 + * + * @param accTradeWalletDetail 钱包交易记录详情 + * @return 结果 + */ + @Override + public int insertAccTradeWalletDetail(AccTradeWalletDetail accTradeWalletDetail) { + accTradeWalletDetail.setCreateTime(DateUtils.getNowDate()); + try { + return accTradeWalletDetailMapper.insertAccTradeWalletDetail(accTradeWalletDetail); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + + /** + * 修改钱包交易记录详情 + * + * @param accTradeWalletDetail 钱包交易记录详情 + * @return 结果 + */ + @Override + public int updateAccTradeWalletDetail(AccTradeWalletDetail accTradeWalletDetail) { + accTradeWalletDetail.setUpdateTime(DateUtils.getNowDate()); + try { + return accTradeWalletDetailMapper.updateAccTradeWalletDetail(accTradeWalletDetail); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + + /** + * 批量删除钱包交易记录详情 + * + * @param ids 需要删除的钱包交易记录详情主键 + * @return 结果 + */ + @Override + public int deleteAccTradeWalletDetailByIds(Long[] ids) { + return accTradeWalletDetailMapper.deleteAccTradeWalletDetailByIds(ids); + } + + /** + * 删除钱包交易记录详情信息 + * + * @param id 钱包交易记录详情主键 + * @return 结果 + */ + @Override + public int deleteAccTradeWalletDetailById(Long id) { + return accTradeWalletDetailMapper.deleteAccTradeWalletDetailById(id); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccWalletInfoServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccWalletInfoServiceImpl.java new file mode 100644 index 0000000..8cce7ca --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccWalletInfoServiceImpl.java @@ -0,0 +1,98 @@ +package com.bonus.canteen.core.account.service.impl; + +import java.util.List; +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 com.bonus.canteen.core.account.mapper.AccWalletInfoMapper; +import com.bonus.canteen.core.account.domain.AccWalletInfo; +import com.bonus.canteen.core.account.service.IAccWalletInfoService; + +/** + * 钱包详情信息Service业务层处理 + * + * @author xsheng + * @date 2025-04-05 + */ +@Service +public class AccWalletInfoServiceImpl implements IAccWalletInfoService { + @Autowired + private AccWalletInfoMapper accWalletInfoMapper; + + /** + * 查询钱包详情信息 + * + * @param userId 钱包详情信息主键 + * @return 钱包详情信息 + */ + @Override + public AccWalletInfo selectAccWalletInfoByUserId(Long userId) { + return accWalletInfoMapper.selectAccWalletInfoByUserId(userId); + } + + /** + * 查询钱包详情信息列表 + * + * @param accWalletInfo 钱包详情信息 + * @return 钱包详情信息 + */ + @Override + public List selectAccWalletInfoList(AccWalletInfo accWalletInfo) { + return accWalletInfoMapper.selectAccWalletInfoList(accWalletInfo); + } + + /** + * 新增钱包详情信息 + * + * @param accWalletInfo 钱包详情信息 + * @return 结果 + */ + @Override + public int insertAccWalletInfo(AccWalletInfo accWalletInfo) { + accWalletInfo.setCreateTime(DateUtils.getNowDate()); + try { + return accWalletInfoMapper.insertAccWalletInfo(accWalletInfo); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + + /** + * 修改钱包详情信息 + * + * @param accWalletInfo 钱包详情信息 + * @return 结果 + */ + @Override + public int updateAccWalletInfo(AccWalletInfo accWalletInfo) { + accWalletInfo.setUpdateTime(DateUtils.getNowDate()); + try { + return accWalletInfoMapper.updateAccWalletInfo(accWalletInfo); + } catch (Exception e) { + throw new ServiceException("错误信息描述"); + } + } + + /** + * 批量删除钱包详情信息 + * + * @param userIds 需要删除的钱包详情信息主键 + * @return 结果 + */ + @Override + public int deleteAccWalletInfoByUserIds(Long[] userIds) { + return accWalletInfoMapper.deleteAccWalletInfoByUserIds(userIds); + } + + /** + * 删除钱包详情信息信息 + * + * @param userId 钱包详情信息主键 + * @return 结果 + */ + @Override + public int deleteAccWalletInfoByUserId(Long userId) { + return accWalletInfoMapper.deleteAccWalletInfoByUserId(userId); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccInfoMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccInfoMapper.xml new file mode 100644 index 0000000..f19a95a --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccInfoMapper.xml @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, acc_id, acc_name, user_id, wallet_bal, subsidy_bal, red_envelope, subsidy_freeze_bal, acc_bal, balance2, water_wallet_bal, water_subsidy_bal, freeze_wallet_bal, freeze_subsidy_bal, freeze_red_envelope, wallet_over_bal, sub_over_bal, scope, end_date, red_validity_date, acc_status, pay_pwd, sub_date_flag, sub_month_flag, acc_pay_count, last_credit_time, interval_id, curr_credit_count, curr_brush_count, curr_use_reserve_count1, curr_use_reserve_count2, same_day_count, same_month_count, curr_cumu_amount, day_cumu_amount, month_sumu_amount, min_wallet_bal_limit, min_red_bal_limit, min_sub_bal_limit, month_full_reduce_amount, last_full_reduce_time, last_sub_time, sub_validity_date, last_sub_amount, last_wal_time, last_wal_amount, revision, reserved1, reserved2, reserved3, create_by, create_time, update_by, update_time from acc_info + + + + + + + + insert into acc_info + + acc_id, + acc_name, + user_id, + wallet_bal, + subsidy_bal, + red_envelope, + subsidy_freeze_bal, + acc_bal, + balance2, + water_wallet_bal, + water_subsidy_bal, + freeze_wallet_bal, + freeze_subsidy_bal, + freeze_red_envelope, + wallet_over_bal, + sub_over_bal, + scope, + end_date, + red_validity_date, + acc_status, + pay_pwd, + sub_date_flag, + sub_month_flag, + acc_pay_count, + last_credit_time, + interval_id, + curr_credit_count, + curr_brush_count, + curr_use_reserve_count1, + curr_use_reserve_count2, + same_day_count, + same_month_count, + curr_cumu_amount, + day_cumu_amount, + month_sumu_amount, + min_wallet_bal_limit, + min_red_bal_limit, + min_sub_bal_limit, + month_full_reduce_amount, + last_full_reduce_time, + last_sub_time, + sub_validity_date, + last_sub_amount, + last_wal_time, + last_wal_amount, + revision, + reserved1, + reserved2, + reserved3, + create_by, + create_time, + update_by, + update_time, + + + #{accId}, + #{accName}, + #{userId}, + #{walletBal}, + #{subsidyBal}, + #{redEnvelope}, + #{subsidyFreezeBal}, + #{accBal}, + #{balance2}, + #{waterWalletBal}, + #{waterSubsidyBal}, + #{freezeWalletBal}, + #{freezeSubsidyBal}, + #{freezeRedEnvelope}, + #{walletOverBal}, + #{subOverBal}, + #{scope}, + #{endDate}, + #{redValidityDate}, + #{accStatus}, + #{payPwd}, + #{subDateFlag}, + #{subMonthFlag}, + #{accPayCount}, + #{lastCreditTime}, + #{intervalId}, + #{currCreditCount}, + #{currBrushCount}, + #{currUseReserveCount1}, + #{currUseReserveCount2}, + #{sameDayCount}, + #{sameMonthCount}, + #{currCumuAmount}, + #{dayCumuAmount}, + #{monthSumuAmount}, + #{minWalletBalLimit}, + #{minRedBalLimit}, + #{minSubBalLimit}, + #{monthFullReduceAmount}, + #{lastFullReduceTime}, + #{lastSubTime}, + #{subValidityDate}, + #{lastSubAmount}, + #{lastWalTime}, + #{lastWalAmount}, + #{revision}, + #{reserved1}, + #{reserved2}, + #{reserved3}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update acc_info + + acc_id = #{accId}, + acc_name = #{accName}, + user_id = #{userId}, + wallet_bal = #{walletBal}, + subsidy_bal = #{subsidyBal}, + red_envelope = #{redEnvelope}, + subsidy_freeze_bal = #{subsidyFreezeBal}, + acc_bal = #{accBal}, + balance2 = #{balance2}, + water_wallet_bal = #{waterWalletBal}, + water_subsidy_bal = #{waterSubsidyBal}, + freeze_wallet_bal = #{freezeWalletBal}, + freeze_subsidy_bal = #{freezeSubsidyBal}, + freeze_red_envelope = #{freezeRedEnvelope}, + wallet_over_bal = #{walletOverBal}, + sub_over_bal = #{subOverBal}, + scope = #{scope}, + end_date = #{endDate}, + red_validity_date = #{redValidityDate}, + acc_status = #{accStatus}, + pay_pwd = #{payPwd}, + sub_date_flag = #{subDateFlag}, + sub_month_flag = #{subMonthFlag}, + acc_pay_count = #{accPayCount}, + last_credit_time = #{lastCreditTime}, + interval_id = #{intervalId}, + curr_credit_count = #{currCreditCount}, + curr_brush_count = #{currBrushCount}, + curr_use_reserve_count1 = #{currUseReserveCount1}, + curr_use_reserve_count2 = #{currUseReserveCount2}, + same_day_count = #{sameDayCount}, + same_month_count = #{sameMonthCount}, + curr_cumu_amount = #{currCumuAmount}, + day_cumu_amount = #{dayCumuAmount}, + month_sumu_amount = #{monthSumuAmount}, + min_wallet_bal_limit = #{minWalletBalLimit}, + min_red_bal_limit = #{minRedBalLimit}, + min_sub_bal_limit = #{minSubBalLimit}, + month_full_reduce_amount = #{monthFullReduceAmount}, + last_full_reduce_time = #{lastFullReduceTime}, + last_sub_time = #{lastSubTime}, + sub_validity_date = #{subValidityDate}, + last_sub_amount = #{lastSubAmount}, + last_wal_time = #{lastWalTime}, + last_wal_amount = #{lastWalAmount}, + revision = #{revision}, + reserved1 = #{reserved1}, + reserved2 = #{reserved2}, + reserved3 = #{reserved3}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from acc_info where id = #{id} + + + + delete from acc_info where id in + + #{id} + + + \ No newline at end of file diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccTradeMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccTradeMapper.xml new file mode 100644 index 0000000..8c91fa9 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccTradeMapper.xml @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select trade_id, trade_time, user_id, dept_id, trade_type, actual_amount, amount, wallet_bal_total, acc_all_bal, pay_channel, pay_type, pay_state, trade_state, third_trade_no, machine_sn, batch_num, le_ord_no, origin_trade_id, sub_time_rule_id, manage_cost, withdraw_source, recharge_source, canteen_id, machine_type, fail_reason, recharge_operate, psn_type, operate_source, batch_import_id, create_by, create_time, update_by, update_time from acc_trade + + + + + + + + insert into acc_trade + + trade_id, + trade_time, + user_id, + dept_id, + trade_type, + actual_amount, + amount, + wallet_bal_total, + acc_all_bal, + pay_channel, + pay_type, + pay_state, + trade_state, + third_trade_no, + machine_sn, + batch_num, + le_ord_no, + origin_trade_id, + sub_time_rule_id, + manage_cost, + withdraw_source, + recharge_source, + canteen_id, + machine_type, + fail_reason, + recharge_operate, + psn_type, + operate_source, + batch_import_id, + create_by, + create_time, + update_by, + update_time, + + + #{tradeId}, + #{tradeTime}, + #{userId}, + #{deptId}, + #{tradeType}, + #{actualAmount}, + #{amount}, + #{walletBalTotal}, + #{accAllBal}, + #{payChannel}, + #{payType}, + #{payState}, + #{tradeState}, + #{thirdTradeNo}, + #{machineSn}, + #{batchNum}, + #{leOrdNo}, + #{originTradeId}, + #{subTimeRuleId}, + #{manageCost}, + #{withdrawSource}, + #{rechargeSource}, + #{canteenId}, + #{machineType}, + #{failReason}, + #{rechargeOperate}, + #{psnType}, + #{operateSource}, + #{batchImportId}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update acc_trade + + trade_time = #{tradeTime}, + user_id = #{userId}, + dept_id = #{deptId}, + trade_type = #{tradeType}, + actual_amount = #{actualAmount}, + amount = #{amount}, + wallet_bal_total = #{walletBalTotal}, + acc_all_bal = #{accAllBal}, + pay_channel = #{payChannel}, + pay_type = #{payType}, + pay_state = #{payState}, + trade_state = #{tradeState}, + third_trade_no = #{thirdTradeNo}, + machine_sn = #{machineSn}, + batch_num = #{batchNum}, + le_ord_no = #{leOrdNo}, + origin_trade_id = #{originTradeId}, + sub_time_rule_id = #{subTimeRuleId}, + manage_cost = #{manageCost}, + withdraw_source = #{withdrawSource}, + recharge_source = #{rechargeSource}, + canteen_id = #{canteenId}, + machine_type = #{machineType}, + fail_reason = #{failReason}, + recharge_operate = #{rechargeOperate}, + psn_type = #{psnType}, + operate_source = #{operateSource}, + batch_import_id = #{batchImportId}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where trade_id = #{tradeId} + + + + delete from acc_trade where trade_id = #{tradeId} + + + + delete from acc_trade where trade_id in + + #{tradeId} + + + \ No newline at end of file diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccTradeWalletDetailMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccTradeWalletDetailMapper.xml new file mode 100644 index 0000000..b5378ba --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccTradeWalletDetailMapper.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + select id, trade_id, user_id, wallet_id, amount, wallet_bal, trade_type, frozen_balance, trade_time, validate_time, use_amount, expired_clear, create_by, create_time, update_by, update_time from acc_trade_wallet_detail + + + + + + + + insert into acc_trade_wallet_detail + + trade_id, + user_id, + wallet_id, + amount, + wallet_bal, + trade_type, + frozen_balance, + trade_time, + validate_time, + use_amount, + expired_clear, + create_by, + create_time, + update_by, + update_time, + + + #{tradeId}, + #{userId}, + #{walletId}, + #{amount}, + #{walletBal}, + #{tradeType}, + #{frozenBalance}, + #{tradeTime}, + #{validateTime}, + #{useAmount}, + #{expiredClear}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update acc_trade_wallet_detail + + trade_id = #{tradeId}, + user_id = #{userId}, + wallet_id = #{walletId}, + amount = #{amount}, + wallet_bal = #{walletBal}, + trade_type = #{tradeType}, + frozen_balance = #{frozenBalance}, + trade_time = #{tradeTime}, + validate_time = #{validateTime}, + use_amount = #{useAmount}, + expired_clear = #{expiredClear}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from acc_trade_wallet_detail where id = #{id} + + + + delete from acc_trade_wallet_detail where id in + + #{id} + + + \ No newline at end of file diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccWalletInfoMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccWalletInfoMapper.xml new file mode 100644 index 0000000..8367406 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccWalletInfoMapper.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + select user_id, acc_id, wallet_id, wallet_bal, limit_balance, frozen_balance, expired_time, last_subsidy_amount, last_subsidy_time, create_by, create_time, update_by, update_time from acc_wallet_info + + + + + + + + insert into acc_wallet_info + + user_id, + acc_id, + wallet_id, + wallet_bal, + limit_balance, + frozen_balance, + expired_time, + last_subsidy_amount, + last_subsidy_time, + create_by, + create_time, + update_by, + update_time, + + + #{userId}, + #{accId}, + #{walletId}, + #{walletBal}, + #{limitBalance}, + #{frozenBalance}, + #{expiredTime}, + #{lastSubsidyAmount}, + #{lastSubsidyTime}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update acc_wallet_info + + acc_id = #{accId}, + wallet_id = #{walletId}, + wallet_bal = #{walletBal}, + limit_balance = #{limitBalance}, + frozen_balance = #{frozenBalance}, + expired_time = #{expiredTime}, + last_subsidy_amount = #{lastSubsidyAmount}, + last_subsidy_time = #{lastSubsidyTime}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where user_id = #{userId} + + + + delete from acc_wallet_info where user_id = #{userId} + + + + delete from acc_wallet_info where user_id in + + #{userId} + + + \ No newline at end of file