This commit is contained in:
sxu 2025-04-05 20:05:13 +08:00
parent 073986b459
commit 742ecbfb9d
24 changed files with 2697 additions and 0 deletions

View File

@ -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<AccInfo> 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<AccInfo> list = accInfoService.selectAccInfoList(accInfo);
ExcelUtil<AccInfo> util = new ExcelUtil<AccInfo>(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));
}
}

View File

@ -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<AccTrade> 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<AccTrade> list = accTradeService.selectAccTradeList(accTrade);
ExcelUtil<AccTrade> util = new ExcelUtil<AccTrade>(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));
}
}

View File

@ -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<AccTradeWalletDetail> 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<AccTradeWalletDetail> list = accTradeWalletDetailService.selectAccTradeWalletDetailList(accTradeWalletDetail);
ExcelUtil<AccTradeWalletDetail> util = new ExcelUtil<AccTradeWalletDetail>(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));
}
}

View File

@ -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<AccWalletInfo> 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<AccWalletInfo> list = accWalletInfoService.selectAccWalletInfoList(accWalletInfo);
ExcelUtil<AccWalletInfo> util = new ExcelUtil<AccWalletInfo>(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));
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,311 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.canteen.core.account.mapper.AccInfoMapper">
<resultMap type="com.bonus.canteen.core.account.domain.AccInfo" id="AccInfoResult">
<result property="id" column="id" />
<result property="accId" column="acc_id" />
<result property="accName" column="acc_name" />
<result property="userId" column="user_id" />
<result property="walletBal" column="wallet_bal" />
<result property="subsidyBal" column="subsidy_bal" />
<result property="redEnvelope" column="red_envelope" />
<result property="subsidyFreezeBal" column="subsidy_freeze_bal" />
<result property="accBal" column="acc_bal" />
<result property="balance2" column="balance2" />
<result property="waterWalletBal" column="water_wallet_bal" />
<result property="waterSubsidyBal" column="water_subsidy_bal" />
<result property="freezeWalletBal" column="freeze_wallet_bal" />
<result property="freezeSubsidyBal" column="freeze_subsidy_bal" />
<result property="freezeRedEnvelope" column="freeze_red_envelope" />
<result property="walletOverBal" column="wallet_over_bal" />
<result property="subOverBal" column="sub_over_bal" />
<result property="scope" column="scope" />
<result property="endDate" column="end_date" />
<result property="redValidityDate" column="red_validity_date" />
<result property="accStatus" column="acc_status" />
<result property="payPwd" column="pay_pwd" />
<result property="subDateFlag" column="sub_date_flag" />
<result property="subMonthFlag" column="sub_month_flag" />
<result property="accPayCount" column="acc_pay_count" />
<result property="lastCreditTime" column="last_credit_time" />
<result property="intervalId" column="interval_id" />
<result property="currCreditCount" column="curr_credit_count" />
<result property="currBrushCount" column="curr_brush_count" />
<result property="currUseReserveCount1" column="curr_use_reserve_count1" />
<result property="currUseReserveCount2" column="curr_use_reserve_count2" />
<result property="sameDayCount" column="same_day_count" />
<result property="sameMonthCount" column="same_month_count" />
<result property="currCumuAmount" column="curr_cumu_amount" />
<result property="dayCumuAmount" column="day_cumu_amount" />
<result property="monthSumuAmount" column="month_sumu_amount" />
<result property="minWalletBalLimit" column="min_wallet_bal_limit" />
<result property="minRedBalLimit" column="min_red_bal_limit" />
<result property="minSubBalLimit" column="min_sub_bal_limit" />
<result property="monthFullReduceAmount" column="month_full_reduce_amount" />
<result property="lastFullReduceTime" column="last_full_reduce_time" />
<result property="lastSubTime" column="last_sub_time" />
<result property="subValidityDate" column="sub_validity_date" />
<result property="lastSubAmount" column="last_sub_amount" />
<result property="lastWalTime" column="last_wal_time" />
<result property="lastWalAmount" column="last_wal_amount" />
<result property="revision" column="revision" />
<result property="reserved1" column="reserved1" />
<result property="reserved2" column="reserved2" />
<result property="reserved3" column="reserved3" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectAccInfoVo">
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
</sql>
<select id="selectAccInfoList" parameterType="com.bonus.canteen.core.account.domain.AccInfo" resultMap="AccInfoResult">
<include refid="selectAccInfoVo"/>
<where>
<if test="accId != null "> and acc_id = #{accId}</if>
<if test="accName != null and accName != ''"> and acc_name like concat('%', #{accName}, '%')</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="walletBal != null "> and wallet_bal = #{walletBal}</if>
<if test="subsidyBal != null "> and subsidy_bal = #{subsidyBal}</if>
<if test="redEnvelope != null "> and red_envelope = #{redEnvelope}</if>
<if test="subsidyFreezeBal != null "> and subsidy_freeze_bal = #{subsidyFreezeBal}</if>
<if test="accBal != null "> and acc_bal = #{accBal}</if>
<if test="balance2 != null "> and balance2 = #{balance2}</if>
<if test="waterWalletBal != null "> and water_wallet_bal = #{waterWalletBal}</if>
<if test="waterSubsidyBal != null "> and water_subsidy_bal = #{waterSubsidyBal}</if>
<if test="freezeWalletBal != null "> and freeze_wallet_bal = #{freezeWalletBal}</if>
<if test="freezeSubsidyBal != null "> and freeze_subsidy_bal = #{freezeSubsidyBal}</if>
<if test="freezeRedEnvelope != null "> and freeze_red_envelope = #{freezeRedEnvelope}</if>
<if test="walletOverBal != null "> and wallet_over_bal = #{walletOverBal}</if>
<if test="subOverBal != null "> and sub_over_bal = #{subOverBal}</if>
<if test="scope != null "> and scope = #{scope}</if>
<if test="endDate != null "> and end_date = #{endDate}</if>
<if test="redValidityDate != null "> and red_validity_date = #{redValidityDate}</if>
<if test="accStatus != null "> and acc_status = #{accStatus}</if>
<if test="payPwd != null and payPwd != ''"> and pay_pwd = #{payPwd}</if>
<if test="subDateFlag != null "> and sub_date_flag = #{subDateFlag}</if>
<if test="subMonthFlag != null "> and sub_month_flag = #{subMonthFlag}</if>
<if test="accPayCount != null "> and acc_pay_count = #{accPayCount}</if>
<if test="lastCreditTime != null "> and last_credit_time = #{lastCreditTime}</if>
<if test="intervalId != null "> and interval_id = #{intervalId}</if>
<if test="currCreditCount != null "> and curr_credit_count = #{currCreditCount}</if>
<if test="currBrushCount != null "> and curr_brush_count = #{currBrushCount}</if>
<if test="currUseReserveCount1 != null "> and curr_use_reserve_count1 = #{currUseReserveCount1}</if>
<if test="currUseReserveCount2 != null "> and curr_use_reserve_count2 = #{currUseReserveCount2}</if>
<if test="sameDayCount != null "> and same_day_count = #{sameDayCount}</if>
<if test="sameMonthCount != null "> and same_month_count = #{sameMonthCount}</if>
<if test="currCumuAmount != null "> and curr_cumu_amount = #{currCumuAmount}</if>
<if test="dayCumuAmount != null "> and day_cumu_amount = #{dayCumuAmount}</if>
<if test="monthSumuAmount != null "> and month_sumu_amount = #{monthSumuAmount}</if>
<if test="minWalletBalLimit != null "> and min_wallet_bal_limit = #{minWalletBalLimit}</if>
<if test="minRedBalLimit != null "> and min_red_bal_limit = #{minRedBalLimit}</if>
<if test="minSubBalLimit != null "> and min_sub_bal_limit = #{minSubBalLimit}</if>
<if test="monthFullReduceAmount != null "> and month_full_reduce_amount = #{monthFullReduceAmount}</if>
<if test="lastFullReduceTime != null "> and last_full_reduce_time = #{lastFullReduceTime}</if>
<if test="lastSubTime != null "> and last_sub_time = #{lastSubTime}</if>
<if test="subValidityDate != null "> and sub_validity_date = #{subValidityDate}</if>
<if test="lastSubAmount != null "> and last_sub_amount = #{lastSubAmount}</if>
<if test="lastWalTime != null "> and last_wal_time = #{lastWalTime}</if>
<if test="lastWalAmount != null "> and last_wal_amount = #{lastWalAmount}</if>
<if test="revision != null "> and revision = #{revision}</if>
<if test="reserved1 != null and reserved1 != ''"> and reserved1 = #{reserved1}</if>
<if test="reserved2 != null and reserved2 != ''"> and reserved2 = #{reserved2}</if>
<if test="reserved3 != null and reserved3 != ''"> and reserved3 = #{reserved3}</if>
</where>
</select>
<select id="selectAccInfoById" parameterType="Long" resultMap="AccInfoResult">
<include refid="selectAccInfoVo"/>
where id = #{id}
</select>
<insert id="insertAccInfo" parameterType="com.bonus.canteen.core.account.domain.AccInfo" useGeneratedKeys="true" keyProperty="id">
insert into acc_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="accId != null">acc_id,</if>
<if test="accName != null and accName != ''">acc_name,</if>
<if test="userId != null">user_id,</if>
<if test="walletBal != null">wallet_bal,</if>
<if test="subsidyBal != null">subsidy_bal,</if>
<if test="redEnvelope != null">red_envelope,</if>
<if test="subsidyFreezeBal != null">subsidy_freeze_bal,</if>
<if test="accBal != null">acc_bal,</if>
<if test="balance2 != null">balance2,</if>
<if test="waterWalletBal != null">water_wallet_bal,</if>
<if test="waterSubsidyBal != null">water_subsidy_bal,</if>
<if test="freezeWalletBal != null">freeze_wallet_bal,</if>
<if test="freezeSubsidyBal != null">freeze_subsidy_bal,</if>
<if test="freezeRedEnvelope != null">freeze_red_envelope,</if>
<if test="walletOverBal != null">wallet_over_bal,</if>
<if test="subOverBal != null">sub_over_bal,</if>
<if test="scope != null">scope,</if>
<if test="endDate != null">end_date,</if>
<if test="redValidityDate != null">red_validity_date,</if>
<if test="accStatus != null">acc_status,</if>
<if test="payPwd != null and payPwd != ''">pay_pwd,</if>
<if test="subDateFlag != null">sub_date_flag,</if>
<if test="subMonthFlag != null">sub_month_flag,</if>
<if test="accPayCount != null">acc_pay_count,</if>
<if test="lastCreditTime != null">last_credit_time,</if>
<if test="intervalId != null">interval_id,</if>
<if test="currCreditCount != null">curr_credit_count,</if>
<if test="currBrushCount != null">curr_brush_count,</if>
<if test="currUseReserveCount1 != null">curr_use_reserve_count1,</if>
<if test="currUseReserveCount2 != null">curr_use_reserve_count2,</if>
<if test="sameDayCount != null">same_day_count,</if>
<if test="sameMonthCount != null">same_month_count,</if>
<if test="currCumuAmount != null">curr_cumu_amount,</if>
<if test="dayCumuAmount != null">day_cumu_amount,</if>
<if test="monthSumuAmount != null">month_sumu_amount,</if>
<if test="minWalletBalLimit != null">min_wallet_bal_limit,</if>
<if test="minRedBalLimit != null">min_red_bal_limit,</if>
<if test="minSubBalLimit != null">min_sub_bal_limit,</if>
<if test="monthFullReduceAmount != null">month_full_reduce_amount,</if>
<if test="lastFullReduceTime != null">last_full_reduce_time,</if>
<if test="lastSubTime != null">last_sub_time,</if>
<if test="subValidityDate != null">sub_validity_date,</if>
<if test="lastSubAmount != null">last_sub_amount,</if>
<if test="lastWalTime != null">last_wal_time,</if>
<if test="lastWalAmount != null">last_wal_amount,</if>
<if test="revision != null">revision,</if>
<if test="reserved1 != null">reserved1,</if>
<if test="reserved2 != null">reserved2,</if>
<if test="reserved3 != null">reserved3,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="accId != null">#{accId},</if>
<if test="accName != null and accName != ''">#{accName},</if>
<if test="userId != null">#{userId},</if>
<if test="walletBal != null">#{walletBal},</if>
<if test="subsidyBal != null">#{subsidyBal},</if>
<if test="redEnvelope != null">#{redEnvelope},</if>
<if test="subsidyFreezeBal != null">#{subsidyFreezeBal},</if>
<if test="accBal != null">#{accBal},</if>
<if test="balance2 != null">#{balance2},</if>
<if test="waterWalletBal != null">#{waterWalletBal},</if>
<if test="waterSubsidyBal != null">#{waterSubsidyBal},</if>
<if test="freezeWalletBal != null">#{freezeWalletBal},</if>
<if test="freezeSubsidyBal != null">#{freezeSubsidyBal},</if>
<if test="freezeRedEnvelope != null">#{freezeRedEnvelope},</if>
<if test="walletOverBal != null">#{walletOverBal},</if>
<if test="subOverBal != null">#{subOverBal},</if>
<if test="scope != null">#{scope},</if>
<if test="endDate != null">#{endDate},</if>
<if test="redValidityDate != null">#{redValidityDate},</if>
<if test="accStatus != null">#{accStatus},</if>
<if test="payPwd != null and payPwd != ''">#{payPwd},</if>
<if test="subDateFlag != null">#{subDateFlag},</if>
<if test="subMonthFlag != null">#{subMonthFlag},</if>
<if test="accPayCount != null">#{accPayCount},</if>
<if test="lastCreditTime != null">#{lastCreditTime},</if>
<if test="intervalId != null">#{intervalId},</if>
<if test="currCreditCount != null">#{currCreditCount},</if>
<if test="currBrushCount != null">#{currBrushCount},</if>
<if test="currUseReserveCount1 != null">#{currUseReserveCount1},</if>
<if test="currUseReserveCount2 != null">#{currUseReserveCount2},</if>
<if test="sameDayCount != null">#{sameDayCount},</if>
<if test="sameMonthCount != null">#{sameMonthCount},</if>
<if test="currCumuAmount != null">#{currCumuAmount},</if>
<if test="dayCumuAmount != null">#{dayCumuAmount},</if>
<if test="monthSumuAmount != null">#{monthSumuAmount},</if>
<if test="minWalletBalLimit != null">#{minWalletBalLimit},</if>
<if test="minRedBalLimit != null">#{minRedBalLimit},</if>
<if test="minSubBalLimit != null">#{minSubBalLimit},</if>
<if test="monthFullReduceAmount != null">#{monthFullReduceAmount},</if>
<if test="lastFullReduceTime != null">#{lastFullReduceTime},</if>
<if test="lastSubTime != null">#{lastSubTime},</if>
<if test="subValidityDate != null">#{subValidityDate},</if>
<if test="lastSubAmount != null">#{lastSubAmount},</if>
<if test="lastWalTime != null">#{lastWalTime},</if>
<if test="lastWalAmount != null">#{lastWalAmount},</if>
<if test="revision != null">#{revision},</if>
<if test="reserved1 != null">#{reserved1},</if>
<if test="reserved2 != null">#{reserved2},</if>
<if test="reserved3 != null">#{reserved3},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateAccInfo" parameterType="com.bonus.canteen.core.account.domain.AccInfo">
update acc_info
<trim prefix="SET" suffixOverrides=",">
<if test="accId != null">acc_id = #{accId},</if>
<if test="accName != null and accName != ''">acc_name = #{accName},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="walletBal != null">wallet_bal = #{walletBal},</if>
<if test="subsidyBal != null">subsidy_bal = #{subsidyBal},</if>
<if test="redEnvelope != null">red_envelope = #{redEnvelope},</if>
<if test="subsidyFreezeBal != null">subsidy_freeze_bal = #{subsidyFreezeBal},</if>
<if test="accBal != null">acc_bal = #{accBal},</if>
<if test="balance2 != null">balance2 = #{balance2},</if>
<if test="waterWalletBal != null">water_wallet_bal = #{waterWalletBal},</if>
<if test="waterSubsidyBal != null">water_subsidy_bal = #{waterSubsidyBal},</if>
<if test="freezeWalletBal != null">freeze_wallet_bal = #{freezeWalletBal},</if>
<if test="freezeSubsidyBal != null">freeze_subsidy_bal = #{freezeSubsidyBal},</if>
<if test="freezeRedEnvelope != null">freeze_red_envelope = #{freezeRedEnvelope},</if>
<if test="walletOverBal != null">wallet_over_bal = #{walletOverBal},</if>
<if test="subOverBal != null">sub_over_bal = #{subOverBal},</if>
<if test="scope != null">scope = #{scope},</if>
<if test="endDate != null">end_date = #{endDate},</if>
<if test="redValidityDate != null">red_validity_date = #{redValidityDate},</if>
<if test="accStatus != null">acc_status = #{accStatus},</if>
<if test="payPwd != null and payPwd != ''">pay_pwd = #{payPwd},</if>
<if test="subDateFlag != null">sub_date_flag = #{subDateFlag},</if>
<if test="subMonthFlag != null">sub_month_flag = #{subMonthFlag},</if>
<if test="accPayCount != null">acc_pay_count = #{accPayCount},</if>
<if test="lastCreditTime != null">last_credit_time = #{lastCreditTime},</if>
<if test="intervalId != null">interval_id = #{intervalId},</if>
<if test="currCreditCount != null">curr_credit_count = #{currCreditCount},</if>
<if test="currBrushCount != null">curr_brush_count = #{currBrushCount},</if>
<if test="currUseReserveCount1 != null">curr_use_reserve_count1 = #{currUseReserveCount1},</if>
<if test="currUseReserveCount2 != null">curr_use_reserve_count2 = #{currUseReserveCount2},</if>
<if test="sameDayCount != null">same_day_count = #{sameDayCount},</if>
<if test="sameMonthCount != null">same_month_count = #{sameMonthCount},</if>
<if test="currCumuAmount != null">curr_cumu_amount = #{currCumuAmount},</if>
<if test="dayCumuAmount != null">day_cumu_amount = #{dayCumuAmount},</if>
<if test="monthSumuAmount != null">month_sumu_amount = #{monthSumuAmount},</if>
<if test="minWalletBalLimit != null">min_wallet_bal_limit = #{minWalletBalLimit},</if>
<if test="minRedBalLimit != null">min_red_bal_limit = #{minRedBalLimit},</if>
<if test="minSubBalLimit != null">min_sub_bal_limit = #{minSubBalLimit},</if>
<if test="monthFullReduceAmount != null">month_full_reduce_amount = #{monthFullReduceAmount},</if>
<if test="lastFullReduceTime != null">last_full_reduce_time = #{lastFullReduceTime},</if>
<if test="lastSubTime != null">last_sub_time = #{lastSubTime},</if>
<if test="subValidityDate != null">sub_validity_date = #{subValidityDate},</if>
<if test="lastSubAmount != null">last_sub_amount = #{lastSubAmount},</if>
<if test="lastWalTime != null">last_wal_time = #{lastWalTime},</if>
<if test="lastWalAmount != null">last_wal_amount = #{lastWalAmount},</if>
<if test="revision != null">revision = #{revision},</if>
<if test="reserved1 != null">reserved1 = #{reserved1},</if>
<if test="reserved2 != null">reserved2 = #{reserved2},</if>
<if test="reserved3 != null">reserved3 = #{reserved3},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAccInfoById" parameterType="Long">
delete from acc_info where id = #{id}
</delete>
<delete id="deleteAccInfoByIds" parameterType="String">
delete from acc_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,208 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.canteen.core.account.mapper.AccTradeMapper">
<resultMap type="com.bonus.canteen.core.account.domain.AccTrade" id="AccTradeResult">
<result property="tradeId" column="trade_id" />
<result property="tradeTime" column="trade_time" />
<result property="userId" column="user_id" />
<result property="deptId" column="dept_id" />
<result property="tradeType" column="trade_type" />
<result property="actualAmount" column="actual_amount" />
<result property="amount" column="amount" />
<result property="walletBalTotal" column="wallet_bal_total" />
<result property="accAllBal" column="acc_all_bal" />
<result property="payChannel" column="pay_channel" />
<result property="payType" column="pay_type" />
<result property="payState" column="pay_state" />
<result property="tradeState" column="trade_state" />
<result property="thirdTradeNo" column="third_trade_no" />
<result property="machineSn" column="machine_sn" />
<result property="batchNum" column="batch_num" />
<result property="leOrdNo" column="le_ord_no" />
<result property="originTradeId" column="origin_trade_id" />
<result property="subTimeRuleId" column="sub_time_rule_id" />
<result property="manageCost" column="manage_cost" />
<result property="withdrawSource" column="withdraw_source" />
<result property="rechargeSource" column="recharge_source" />
<result property="canteenId" column="canteen_id" />
<result property="machineType" column="machine_type" />
<result property="failReason" column="fail_reason" />
<result property="rechargeOperate" column="recharge_operate" />
<result property="psnType" column="psn_type" />
<result property="operateSource" column="operate_source" />
<result property="batchImportId" column="batch_import_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectAccTradeVo">
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
</sql>
<select id="selectAccTradeList" parameterType="com.bonus.canteen.core.account.domain.AccTrade" resultMap="AccTradeResult">
<include refid="selectAccTradeVo"/>
<where>
<if test="tradeTime != null "> and trade_time = #{tradeTime}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="tradeType != null "> and trade_type = #{tradeType}</if>
<if test="actualAmount != null "> and actual_amount = #{actualAmount}</if>
<if test="amount != null "> and amount = #{amount}</if>
<if test="walletBalTotal != null "> and wallet_bal_total = #{walletBalTotal}</if>
<if test="accAllBal != null "> and acc_all_bal = #{accAllBal}</if>
<if test="payChannel != null "> and pay_channel = #{payChannel}</if>
<if test="payType != null "> and pay_type = #{payType}</if>
<if test="payState != null "> and pay_state = #{payState}</if>
<if test="tradeState != null "> and trade_state = #{tradeState}</if>
<if test="thirdTradeNo != null and thirdTradeNo != ''"> and third_trade_no = #{thirdTradeNo}</if>
<if test="machineSn != null and machineSn != ''"> and machine_sn = #{machineSn}</if>
<if test="batchNum != null and batchNum != ''"> and batch_num = #{batchNum}</if>
<if test="leOrdNo != null "> and le_ord_no = #{leOrdNo}</if>
<if test="originTradeId != null "> and origin_trade_id = #{originTradeId}</if>
<if test="subTimeRuleId != null "> and sub_time_rule_id = #{subTimeRuleId}</if>
<if test="manageCost != null "> and manage_cost = #{manageCost}</if>
<if test="withdrawSource != null "> and withdraw_source = #{withdrawSource}</if>
<if test="rechargeSource != null "> and recharge_source = #{rechargeSource}</if>
<if test="canteenId != null "> and canteen_id = #{canteenId}</if>
<if test="machineType != null "> and machine_type = #{machineType}</if>
<if test="failReason != null and failReason != ''"> and fail_reason = #{failReason}</if>
<if test="rechargeOperate != null "> and recharge_operate = #{rechargeOperate}</if>
<if test="psnType != null "> and psn_type = #{psnType}</if>
<if test="operateSource != null "> and operate_source = #{operateSource}</if>
<if test="batchImportId != null "> and batch_import_id = #{batchImportId}</if>
</where>
</select>
<select id="selectAccTradeByTradeId" parameterType="Long" resultMap="AccTradeResult">
<include refid="selectAccTradeVo"/>
where trade_id = #{tradeId}
</select>
<insert id="insertAccTrade" parameterType="com.bonus.canteen.core.account.domain.AccTrade">
insert into acc_trade
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tradeId != null">trade_id,</if>
<if test="tradeTime != null">trade_time,</if>
<if test="userId != null">user_id,</if>
<if test="deptId != null">dept_id,</if>
<if test="tradeType != null">trade_type,</if>
<if test="actualAmount != null">actual_amount,</if>
<if test="amount != null">amount,</if>
<if test="walletBalTotal != null">wallet_bal_total,</if>
<if test="accAllBal != null">acc_all_bal,</if>
<if test="payChannel != null">pay_channel,</if>
<if test="payType != null">pay_type,</if>
<if test="payState != null">pay_state,</if>
<if test="tradeState != null">trade_state,</if>
<if test="thirdTradeNo != null">third_trade_no,</if>
<if test="machineSn != null">machine_sn,</if>
<if test="batchNum != null">batch_num,</if>
<if test="leOrdNo != null">le_ord_no,</if>
<if test="originTradeId != null">origin_trade_id,</if>
<if test="subTimeRuleId != null">sub_time_rule_id,</if>
<if test="manageCost != null">manage_cost,</if>
<if test="withdrawSource != null">withdraw_source,</if>
<if test="rechargeSource != null">recharge_source,</if>
<if test="canteenId != null">canteen_id,</if>
<if test="machineType != null">machine_type,</if>
<if test="failReason != null">fail_reason,</if>
<if test="rechargeOperate != null">recharge_operate,</if>
<if test="psnType != null">psn_type,</if>
<if test="operateSource != null">operate_source,</if>
<if test="batchImportId != null">batch_import_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tradeId != null">#{tradeId},</if>
<if test="tradeTime != null">#{tradeTime},</if>
<if test="userId != null">#{userId},</if>
<if test="deptId != null">#{deptId},</if>
<if test="tradeType != null">#{tradeType},</if>
<if test="actualAmount != null">#{actualAmount},</if>
<if test="amount != null">#{amount},</if>
<if test="walletBalTotal != null">#{walletBalTotal},</if>
<if test="accAllBal != null">#{accAllBal},</if>
<if test="payChannel != null">#{payChannel},</if>
<if test="payType != null">#{payType},</if>
<if test="payState != null">#{payState},</if>
<if test="tradeState != null">#{tradeState},</if>
<if test="thirdTradeNo != null">#{thirdTradeNo},</if>
<if test="machineSn != null">#{machineSn},</if>
<if test="batchNum != null">#{batchNum},</if>
<if test="leOrdNo != null">#{leOrdNo},</if>
<if test="originTradeId != null">#{originTradeId},</if>
<if test="subTimeRuleId != null">#{subTimeRuleId},</if>
<if test="manageCost != null">#{manageCost},</if>
<if test="withdrawSource != null">#{withdrawSource},</if>
<if test="rechargeSource != null">#{rechargeSource},</if>
<if test="canteenId != null">#{canteenId},</if>
<if test="machineType != null">#{machineType},</if>
<if test="failReason != null">#{failReason},</if>
<if test="rechargeOperate != null">#{rechargeOperate},</if>
<if test="psnType != null">#{psnType},</if>
<if test="operateSource != null">#{operateSource},</if>
<if test="batchImportId != null">#{batchImportId},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateAccTrade" parameterType="com.bonus.canteen.core.account.domain.AccTrade">
update acc_trade
<trim prefix="SET" suffixOverrides=",">
<if test="tradeTime != null">trade_time = #{tradeTime},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="tradeType != null">trade_type = #{tradeType},</if>
<if test="actualAmount != null">actual_amount = #{actualAmount},</if>
<if test="amount != null">amount = #{amount},</if>
<if test="walletBalTotal != null">wallet_bal_total = #{walletBalTotal},</if>
<if test="accAllBal != null">acc_all_bal = #{accAllBal},</if>
<if test="payChannel != null">pay_channel = #{payChannel},</if>
<if test="payType != null">pay_type = #{payType},</if>
<if test="payState != null">pay_state = #{payState},</if>
<if test="tradeState != null">trade_state = #{tradeState},</if>
<if test="thirdTradeNo != null">third_trade_no = #{thirdTradeNo},</if>
<if test="machineSn != null">machine_sn = #{machineSn},</if>
<if test="batchNum != null">batch_num = #{batchNum},</if>
<if test="leOrdNo != null">le_ord_no = #{leOrdNo},</if>
<if test="originTradeId != null">origin_trade_id = #{originTradeId},</if>
<if test="subTimeRuleId != null">sub_time_rule_id = #{subTimeRuleId},</if>
<if test="manageCost != null">manage_cost = #{manageCost},</if>
<if test="withdrawSource != null">withdraw_source = #{withdrawSource},</if>
<if test="rechargeSource != null">recharge_source = #{rechargeSource},</if>
<if test="canteenId != null">canteen_id = #{canteenId},</if>
<if test="machineType != null">machine_type = #{machineType},</if>
<if test="failReason != null">fail_reason = #{failReason},</if>
<if test="rechargeOperate != null">recharge_operate = #{rechargeOperate},</if>
<if test="psnType != null">psn_type = #{psnType},</if>
<if test="operateSource != null">operate_source = #{operateSource},</if>
<if test="batchImportId != null">batch_import_id = #{batchImportId},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where trade_id = #{tradeId}
</update>
<delete id="deleteAccTradeByTradeId" parameterType="Long">
delete from acc_trade where trade_id = #{tradeId}
</delete>
<delete id="deleteAccTradeByTradeIds" parameterType="String">
delete from acc_trade where trade_id in
<foreach item="tradeId" collection="array" open="(" separator="," close=")">
#{tradeId}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,121 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.canteen.core.account.mapper.AccTradeWalletDetailMapper">
<resultMap type="com.bonus.canteen.core.account.domain.AccTradeWalletDetail" id="AccTradeWalletDetailResult">
<result property="id" column="id" />
<result property="tradeId" column="trade_id" />
<result property="userId" column="user_id" />
<result property="walletId" column="wallet_id" />
<result property="amount" column="amount" />
<result property="walletBal" column="wallet_bal" />
<result property="tradeType" column="trade_type" />
<result property="frozenBalance" column="frozen_balance" />
<result property="tradeTime" column="trade_time" />
<result property="validateTime" column="validate_time" />
<result property="useAmount" column="use_amount" />
<result property="expiredClear" column="expired_clear" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectAccTradeWalletDetailVo">
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
</sql>
<select id="selectAccTradeWalletDetailList" parameterType="com.bonus.canteen.core.account.domain.AccTradeWalletDetail" resultMap="AccTradeWalletDetailResult">
<include refid="selectAccTradeWalletDetailVo"/>
<where>
<if test="tradeId != null "> and trade_id = #{tradeId}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="walletId != null "> and wallet_id = #{walletId}</if>
<if test="amount != null "> and amount = #{amount}</if>
<if test="walletBal != null "> and wallet_bal = #{walletBal}</if>
<if test="tradeType != null "> and trade_type = #{tradeType}</if>
<if test="frozenBalance != null "> and frozen_balance = #{frozenBalance}</if>
<if test="tradeTime != null "> and trade_time = #{tradeTime}</if>
<if test="validateTime != null "> and validate_time = #{validateTime}</if>
<if test="useAmount != null "> and use_amount = #{useAmount}</if>
<if test="expiredClear != null "> and expired_clear = #{expiredClear}</if>
</where>
</select>
<select id="selectAccTradeWalletDetailById" parameterType="Long" resultMap="AccTradeWalletDetailResult">
<include refid="selectAccTradeWalletDetailVo"/>
where id = #{id}
</select>
<insert id="insertAccTradeWalletDetail" parameterType="com.bonus.canteen.core.account.domain.AccTradeWalletDetail" useGeneratedKeys="true" keyProperty="id">
insert into acc_trade_wallet_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tradeId != null">trade_id,</if>
<if test="userId != null">user_id,</if>
<if test="walletId != null">wallet_id,</if>
<if test="amount != null">amount,</if>
<if test="walletBal != null">wallet_bal,</if>
<if test="tradeType != null">trade_type,</if>
<if test="frozenBalance != null">frozen_balance,</if>
<if test="tradeTime != null">trade_time,</if>
<if test="validateTime != null">validate_time,</if>
<if test="useAmount != null">use_amount,</if>
<if test="expiredClear != null">expired_clear,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tradeId != null">#{tradeId},</if>
<if test="userId != null">#{userId},</if>
<if test="walletId != null">#{walletId},</if>
<if test="amount != null">#{amount},</if>
<if test="walletBal != null">#{walletBal},</if>
<if test="tradeType != null">#{tradeType},</if>
<if test="frozenBalance != null">#{frozenBalance},</if>
<if test="tradeTime != null">#{tradeTime},</if>
<if test="validateTime != null">#{validateTime},</if>
<if test="useAmount != null">#{useAmount},</if>
<if test="expiredClear != null">#{expiredClear},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateAccTradeWalletDetail" parameterType="com.bonus.canteen.core.account.domain.AccTradeWalletDetail">
update acc_trade_wallet_detail
<trim prefix="SET" suffixOverrides=",">
<if test="tradeId != null">trade_id = #{tradeId},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="walletId != null">wallet_id = #{walletId},</if>
<if test="amount != null">amount = #{amount},</if>
<if test="walletBal != null">wallet_bal = #{walletBal},</if>
<if test="tradeType != null">trade_type = #{tradeType},</if>
<if test="frozenBalance != null">frozen_balance = #{frozenBalance},</if>
<if test="tradeTime != null">trade_time = #{tradeTime},</if>
<if test="validateTime != null">validate_time = #{validateTime},</if>
<if test="useAmount != null">use_amount = #{useAmount},</if>
<if test="expiredClear != null">expired_clear = #{expiredClear},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAccTradeWalletDetailById" parameterType="Long">
delete from acc_trade_wallet_detail where id = #{id}
</delete>
<delete id="deleteAccTradeWalletDetailByIds" parameterType="String">
delete from acc_trade_wallet_detail where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.canteen.core.account.mapper.AccWalletInfoMapper">
<resultMap type="com.bonus.canteen.core.account.domain.AccWalletInfo" id="AccWalletInfoResult">
<result property="userId" column="user_id" />
<result property="accId" column="acc_id" />
<result property="walletId" column="wallet_id" />
<result property="walletBal" column="wallet_bal" />
<result property="limitBalance" column="limit_balance" />
<result property="frozenBalance" column="frozen_balance" />
<result property="expiredTime" column="expired_time" />
<result property="lastSubsidyAmount" column="last_subsidy_amount" />
<result property="lastSubsidyTime" column="last_subsidy_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectAccWalletInfoVo">
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
</sql>
<select id="selectAccWalletInfoList" parameterType="com.bonus.canteen.core.account.domain.AccWalletInfo" resultMap="AccWalletInfoResult">
<include refid="selectAccWalletInfoVo"/>
<where>
<if test="accId != null "> and acc_id = #{accId}</if>
<if test="walletBal != null "> and wallet_bal = #{walletBal}</if>
<if test="limitBalance != null "> and limit_balance = #{limitBalance}</if>
<if test="frozenBalance != null "> and frozen_balance = #{frozenBalance}</if>
<if test="expiredTime != null "> and expired_time = #{expiredTime}</if>
<if test="lastSubsidyAmount != null "> and last_subsidy_amount = #{lastSubsidyAmount}</if>
<if test="lastSubsidyTime != null "> and last_subsidy_time = #{lastSubsidyTime}</if>
</where>
</select>
<select id="selectAccWalletInfoByUserId" parameterType="Long" resultMap="AccWalletInfoResult">
<include refid="selectAccWalletInfoVo"/>
where user_id = #{userId}
</select>
<insert id="insertAccWalletInfo" parameterType="com.bonus.canteen.core.account.domain.AccWalletInfo">
insert into acc_wallet_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
<if test="accId != null">acc_id,</if>
<if test="walletId != null">wallet_id,</if>
<if test="walletBal != null">wallet_bal,</if>
<if test="limitBalance != null">limit_balance,</if>
<if test="frozenBalance != null">frozen_balance,</if>
<if test="expiredTime != null">expired_time,</if>
<if test="lastSubsidyAmount != null">last_subsidy_amount,</if>
<if test="lastSubsidyTime != null">last_subsidy_time,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
<if test="accId != null">#{accId},</if>
<if test="walletId != null">#{walletId},</if>
<if test="walletBal != null">#{walletBal},</if>
<if test="limitBalance != null">#{limitBalance},</if>
<if test="frozenBalance != null">#{frozenBalance},</if>
<if test="expiredTime != null">#{expiredTime},</if>
<if test="lastSubsidyAmount != null">#{lastSubsidyAmount},</if>
<if test="lastSubsidyTime != null">#{lastSubsidyTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateAccWalletInfo" parameterType="com.bonus.canteen.core.account.domain.AccWalletInfo">
update acc_wallet_info
<trim prefix="SET" suffixOverrides=",">
<if test="accId != null">acc_id = #{accId},</if>
<if test="walletId != null">wallet_id = #{walletId},</if>
<if test="walletBal != null">wallet_bal = #{walletBal},</if>
<if test="limitBalance != null">limit_balance = #{limitBalance},</if>
<if test="frozenBalance != null">frozen_balance = #{frozenBalance},</if>
<if test="expiredTime != null">expired_time = #{expiredTime},</if>
<if test="lastSubsidyAmount != null">last_subsidy_amount = #{lastSubsidyAmount},</if>
<if test="lastSubsidyTime != null">last_subsidy_time = #{lastSubsidyTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where user_id = #{userId}
</update>
<delete id="deleteAccWalletInfoByUserId" parameterType="Long">
delete from acc_wallet_info where user_id = #{userId}
</delete>
<delete id="deleteAccWalletInfoByUserIds" parameterType="String">
delete from acc_wallet_info where user_id in
<foreach item="userId" collection="array" open="(" separator="," close=")">
#{userId}
</foreach>
</delete>
</mapper>