增删改查 控制层 

/*** 新增对账差错all*/
@PreAuthorize("@ss.hasPermi('pay:rpAccountCheckMistake:add')")
@Log(title = "对账差错 ", businessType = BusinessType.INSERT)
@PostMapping("/addCheckMistake")
public AjaxResult addCheckMistake(@RequestBody RpAccountCheckMistake rpAccountCheckMistake)
{return toAjax(rpAccountCheckMistakeService.insertRpAccountCheckMistake(rpAccountCheckMistake));
}
/*** 删除对账差错 */@PreAuthorize("@ss.hasPermi('pay:rpAccountCheckMistake:remove')")@Log(title = "对账差错 ", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")public AjaxResult remove(@PathVariable String[] ids){return toAjax(rpAccountCheckMistakeService.deleteRpAccountCheckMistakeByIds(ids));}
/*** 修改对账差错 */
@PreAuthorize("@ss.hasPermi('pay:rpAccountCheckMistake:edit')")
@Log(title = "对账差错 ", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody RpAccountCheckMistake rpAccountCheckMistake)
{return toAjax(rpAccountCheckMistakeService.updateRpAccountCheckMistake(rpAccountCheckMistake));
}
@PreAuthorize("@ss.hasPermi('pay:rpAccountCheckMistake:list')")
@GetMapping("/listCheckMistake")
public TableDataInfo listCheckMistake(RpAccountCheckMistake rpAccountCheckMistake)
{startPage();List<RpAccountCheckMistake> list = rpAccountCheckMistakeService.listCheckMistake(rpAccountCheckMistake);return getDataTable(list);
}

 增删改查 service

/*** 新增对账差错 all*/public int insertRpAccountCheckMistake(RpAccountCheckMistake rpAccountCheckMistake);
/*** 批量删除对账差错 * * @param ids 需要删除的对账差错 ID* @return 结果*/public int deleteRpAccountCheckMistakeByIds(String[] ids);/*** 删除对账差错 信息* * @param id 对账差错 ID* @return 结果*/public int deleteRpAccountCheckMistakeById(String id);
/*** 修改对账差错 * * @param rpAccountCheckMistake 对账差错 * @return 结果*/public int updateRpAccountCheckMistake(RpAccountCheckMistake rpAccountCheckMistake);
/*** 生成对账差错 列表查询all*/List<RpAccountCheckMistake> listCheckMistake(RpAccountCheckMistake rpAccountCheckMistake);

增删改查 serviceimpl

/*** 新增对账差错 all*/@Overridepublic int insertRpAccountCheckMistake(RpAccountCheckMistake rpAccountCheckMistake){rpAccountCheckMistake.setCreateTime(DateUtils.getNowDate());return rpAccountCheckMistakeMapper.insertRpAccountCheckMistake(rpAccountCheckMistake);}
/*** 批量删除对账差错 * * @param ids 需要删除的对账差错 ID* @return 结果*/@Overridepublic int deleteRpAccountCheckMistakeByIds(String[] ids){return rpAccountCheckMistakeMapper.deleteRpAccountCheckMistakeByIds(ids);}/*** 删除对账差错 信息* * @param id 对账差错 ID* @return 结果*/@Overridepublic int deleteRpAccountCheckMistakeById(String id){return rpAccountCheckMistakeMapper.deleteRpAccountCheckMistakeById(id);}
/*** 修改对账差错 * * @param rpAccountCheckMistake 对账差错 * @return 结果*/@Overridepublic int updateRpAccountCheckMistake(RpAccountCheckMistake rpAccountCheckMistake){return rpAccountCheckMistakeMapper.updateRpAccountCheckMistake(rpAccountCheckMistake);}@Overridepublic List<RpAccountCheckMistake> listCheckMistake(RpAccountCheckMistake rpAccountCheckMistake) {List<RpAccountCheckMistake> list =  rpAccountCheckMistakeMapper.listCheckMistake(rpAccountCheckMistake);UUID id=UUID.randomUUID();String[] secret=id.toString().split("-");String secret16= secret[0]+secret[1]+secret[2];// 做判断 防重复RpAccountCheckMistake rpAccountCheckMistake1 = new RpAccountCheckMistake();rpAccountCheckMistake1.setId(secret16);rpAccountCheckMistake1.setAccountCheckBatchNo(buildNoService.buildReconciliationNo());rpAccountCheckMistake1.setBillDate(list.get(0).getRemitConfirmTime());rpAccountCheckMistake1.setOrderAmount(list.get(0).getRemitAmount());rpAccountCheckMistake1.setFee(list.get(0).getSettFee());rpAccountCheckMistake1.setTradeStatus(list.get(0).getSettStatus());rpAccountCheckMistake1.setBankAmount(list.get(0).getRemitAmount());rpAccountCheckMistake1.setBankFee(list.get(0).getSettFee());rpAccountCheckMistake1.setMerchantNo(list.get(0).getSubMchId());rpAccountCheckMistake1.setBankOrderNo(list.get(0).getBanktrxno());rpAccountCheckMistakeMapper.insertRpAccountCheckMistake(rpAccountCheckMistake1);return list;}

 增删改查 mapper

/*** 新增对账差错 all*/public int insertRpAccountCheckMistake(RpAccountCheckMistake rpAccountCheckMistake);
/*** 删除对账差错 * * @param id 对账差错 ID* @return 结果*/public int deleteRpAccountCheckMistakeById(String id);/*** 批量删除对账差错 * * @param ids 需要删除的数据ID* @return 结果*/public int deleteRpAccountCheckMistakeByIds(String[] ids);
/*** 修改对账差错 * * @param rpAccountCheckMistake 对账差错 * @return 结果*/public int updateRpAccountCheckMistake(RpAccountCheckMistake rpAccountCheckMistake);
/*** 生成对账差错 列表查询all*/List<RpAccountCheckMistake> listCheckMistake(RpAccountCheckMistake rpAccountCheckMistake);

  增删改查 mapperimpl sql

<?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.fangen.pay.mapper.RpAccountCheckMistakeMapper"><resultMap type="RpAccountCheckMistake" id="RpAccountCheckMistakeResult"><result property="id"    column="id"    /><result property="version"    column="version"    /><result property="creater"    column="creater"    /><result property="status"    column="status"    /><result property="createTime"    column="create_time"    /><result property="remark"    column="remark"    /><result property="accountCheckBatchNo"    column="account_check_batch_no"    /><result property="billDate"    column="bill_date"    /><result property="bankType"    column="bank_type"    /><result property="orderTime"    column="order_time"    /><result property="merchantName"    column="merchant_name"    /><result property="merchantNo"    column="merchant_no"    /><result property="orderNo"    column="order_no"    /><result property="tradeTime"    column="trade_time"    /><result property="trxNo"    column="trx_no"    /><result property="orderAmount"    column="order_amount"    /><result property="refundAmount"    column="refund_amount"    /><result property="tradeStatus"    column="trade_status"    /><result property="fee"    column="fee"    /><result property="bankTradeTime"    column="bank_trade_time"    /><result property="bankOrderNo"    column="bank_order_no"    /><result property="bankTrxNo"    column="bank_trx_no"    /><result property="bankTradeStatus"    column="bank_trade_status"    /><result property="bankAmount"    column="bank_amount"    /><result property="bankRefundAmount"    column="bank_refund_amount"    /><result property="bankFee"    column="bank_fee"    /><result property="errType"    column="err_type"    /><result property="handleStatus"    column="handle_status"    /><result property="handleValue"    column="handle_value"    /><result property="handleRemark"    column="handle_remark"    /><result property="operatorName"    column="operator_name"    /><result property="operatorAccountNo"    column="operator_account_no"    /><result property="remitConfirmTime"    column="remit_confirm_time"    /><result property="remitAmount"    column="remit_amount"    /><result property="settFee"    column="sett_fee"    /><result property="settStatus"    column="sett_status"    /><result property="payWayName"    column="pay_way_name"    /><result property="subMchId"    column="sub_mch_id"    /><result property="banktrxno"    column="banktrxno"    /></resultMap><!--all--><sql id="selectRpAccountCheckMistakeVo">select id, status, create_time, remark, account_check_batch_no, bill_date, bank_type, order_time, merchant_name, merchant_no, order_no, trade_time, trx_no, order_amount, refund_amount, trade_status, fee, bank_trade_time, bank_order_no, bank_trx_no, bank_trade_status, bank_amount, bank_refund_amount, bank_fee, err_type, handle_status, handle_value, handle_remark, operator_name, operator_account_no from rp_account_check_mistake</sql><!--all--><select id="selectRpAccountCheckMistakeList" parameterType="RpAccountCheckMistake" resultMap="RpAccountCheckMistakeResult"><include refid="selectRpAccountCheckMistakeVo"/><where><if test="creater != null  and creater != ''"> and creater = #{creater}</if><if test="status != null  and status != ''"> and status = #{status}</if><if test="accountCheckBatchNo != null  and accountCheckBatchNo != ''"> and account_check_batch_no = #{accountCheckBatchNo}</if><if test="billDate != null "> and bill_date = #{billDate}</if><if test="bankType != null  and bankType != ''"> and bank_type = #{bankType}</if><if test="orderTime != null "> and order_time = #{orderTime}</if><if test="merchantName != null  and merchantName != ''"> and merchant_name like concat('%', #{merchantName}, '%')</if><if test="merchantNo != null  and merchantNo != ''"> and merchant_no = #{merchantNo}</if><if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if><if test="tradeTime != null "> and trade_time = #{tradeTime}</if><if test="trxNo != null  and trxNo != ''"> and trx_no = #{trxNo}</if><if test="orderAmount != null "> and order_amount = #{orderAmount}</if><if test="refundAmount != null "> and refund_amount = #{refundAmount}</if><if test="tradeStatus != null  and tradeStatus != ''"> and trade_status = #{tradeStatus}</if><if test="fee != null "> and fee = #{fee}</if><if test="bankTradeTime != null "> and bank_trade_time = #{bankTradeTime}</if><if test="bankOrderNo != null  and bankOrderNo != ''"> and bank_order_no = #{bankOrderNo}</if><if test="bankTrxNo != null  and bankTrxNo != ''"> and bank_trx_no = #{bankTrxNo}</if><if test="bankTradeStatus != null  and bankTradeStatus != ''"> and bank_trade_status = #{bankTradeStatus}</if><if test="bankAmount != null "> and bank_amount = #{bankAmount}</if><if test="bankRefundAmount != null "> and bank_refund_amount = #{bankRefundAmount}</if><if test="bankFee != null "> and bank_fee = #{bankFee}</if><if test="errType != null  and errType != ''"> and err_type = #{errType}</if><if test="handleStatus != null  and handleStatus != ''"> and handle_status = #{handleStatus}</if><if test="handleValue != null  and handleValue != ''"> and handle_value = #{handleValue}</if><if test="handleRemark != null  and handleRemark != ''"> and handle_remark = #{handleRemark}</if><if test="operatorName != null  and operatorName != ''"> and operator_name like concat('%', #{operatorName}, '%')</if><if test="operatorAccountNo != null  and operatorAccountNo != ''"> and operator_account_no = #{operatorAccountNo}</if></where></select><select id="selectRpAccountCheckMistakeById" parameterType="String" resultMap="RpAccountCheckMistakeResult"><include refid="selectRpAccountCheckMistakeVo"/>where id = #{id}</select><!--all--><insert id="insertRpAccountCheckMistake" parameterType="RpAccountCheckMistake">insert into rp_account_check_mistake<trim prefix="(" suffix=")" suffixOverrides=","><if test="id != null">id,</if><if test="createTime != null">create_time,</if><if test="status != null">status,</if><if test="accountCheckBatchNo != null and accountCheckBatchNo != ''">account_check_batch_no,</if><if test="billDate != null">bill_date,</if><if test="bankType != null and bankType != ''">bank_type,</if><if test="orderTime != null">order_time,</if><if test="merchantName != null">merchant_name,</if><if test="merchantNo != null">merchant_no,</if><if test="orderNo != null">order_no,</if><if test="tradeTime != null">trade_time,</if><if test="trxNo != null">trx_no,</if><if test="orderAmount != null">order_amount,</if><if test="refundAmount != null">refund_amount,</if><if test="tradeStatus != null">trade_status,</if><if test="fee != null">fee,</if><if test="bankTradeTime != null">bank_trade_time,</if><if test="bankOrderNo != null">bank_order_no,</if><if test="bankTrxNo != null">bank_trx_no,</if><if test="bankTradeStatus != null">bank_trade_status,</if><if test="bankAmount != null">bank_amount,</if><if test="bankRefundAmount != null">bank_refund_amount,</if><if test="bankFee != null">bank_fee,</if><if test="errType != null and errType != ''">err_type,</if><if test="handleStatus != null and handleStatus != ''">handle_status,</if><if test="handleValue != null">handle_value,</if><if test="handleRemark != null">handle_remark,</if><if test="operatorName != null">operator_name,</if><if test="operatorAccountNo != null">operator_account_no,</if></trim><trim prefix="values (" suffix=")" suffixOverrides=","><if test="id != null">#{id},</if><if test="createTime != null">#{createTime},</if><if test="status != null">#{status},</if><if test="accountCheckBatchNo != null and accountCheckBatchNo != ''">#{accountCheckBatchNo},</if><if test="billDate != null">#{billDate},</if><if test="bankType != null and bankType != ''">#{bankType},</if><if test="orderTime != null">#{orderTime},</if><if test="merchantName != null">#{merchantName},</if><if test="merchantNo != null">#{merchantNo},</if><if test="orderNo != null">#{orderNo},</if><if test="tradeTime != null">#{tradeTime},</if><if test="trxNo != null">#{trxNo},</if><if test="orderAmount != null">#{orderAmount},</if><if test="refundAmount != null">#{refundAmount},</if><if test="tradeStatus != null">#{tradeStatus},</if><if test="fee != null">#{fee},</if><if test="bankTradeTime != null">#{bankTradeTime},</if><if test="bankOrderNo != null">#{bankOrderNo},</if><if test="bankTrxNo != null">#{bankTrxNo},</if><if test="bankTradeStatus != null">#{bankTradeStatus},</if><if test="bankAmount != null">#{bankAmount},</if><if test="bankRefundAmount != null">#{bankRefundAmount},</if><if test="bankFee != null">#{bankFee},</if><if test="errType != null and errType != ''">#{errType},</if><if test="handleStatus != null and handleStatus != ''">#{handleStatus},</if><if test="handleValue != null">#{handleValue},</if><if test="handleRemark != null">#{handleRemark},</if><if test="operatorName != null">#{operatorName},</if><if test="operatorAccountNo != null">#{operatorAccountNo},</if></trim></insert><update id="updateRpAccountCheckMistake" parameterType="RpAccountCheckMistake">update rp_account_check_mistake<trim prefix="SET" suffixOverrides=","><if test="version != null">version = #{version},</if><if test="createTime != null">create_time = #{createTime},</if><if test="editor != null">editor = #{editor},</if><if test="creater != null">creater = #{creater},</if><if test="editTime != null">edit_time = #{editTime},</if><if test="status != null">status = #{status},</if><if test="remark != null">remark = #{remark},</if><if test="accountCheckBatchNo != null and accountCheckBatchNo != ''">account_check_batch_no = #{accountCheckBatchNo},</if><if test="billDate != null">bill_date = #{billDate},</if><if test="bankType != null and bankType != ''">bank_type = #{bankType},</if><if test="orderTime != null">order_time = #{orderTime},</if><if test="merchantName != null">merchant_name = #{merchantName},</if><if test="merchantNo != null">merchant_no = #{merchantNo},</if><if test="orderNo != null">order_no = #{orderNo},</if><if test="tradeTime != null">trade_time = #{tradeTime},</if><if test="trxNo != null">trx_no = #{trxNo},</if><if test="orderAmount != null">order_amount = #{orderAmount},</if><if test="refundAmount != null">refund_amount = #{refundAmount},</if><if test="tradeStatus != null">trade_status = #{tradeStatus},</if><if test="fee != null">fee = #{fee},</if><if test="bankTradeTime != null">bank_trade_time = #{bankTradeTime},</if><if test="bankOrderNo != null">bank_order_no = #{bankOrderNo},</if><if test="bankTrxNo != null">bank_trx_no = #{bankTrxNo},</if><if test="bankTradeStatus != null">bank_trade_status = #{bankTradeStatus},</if><if test="bankAmount != null">bank_amount = #{bankAmount},</if><if test="bankRefundAmount != null">bank_refund_amount = #{bankRefundAmount},</if><if test="bankFee != null">bank_fee = #{bankFee},</if><if test="errType != null and errType != ''">err_type = #{errType},</if><if test="handleStatus != null and handleStatus != ''">handle_status = #{handleStatus},</if><if test="handleValue != null">handle_value = #{handleValue},</if><if test="handleRemark != null">handle_remark = #{handleRemark},</if><if test="operatorName != null">operator_name = #{operatorName},</if><if test="operatorAccountNo != null">operator_account_no = #{operatorAccountNo},</if></trim>where id = #{id}</update><delete id="deleteRpAccountCheckMistakeById" parameterType="String">delete from rp_account_check_mistake where id = #{id}</delete><delete id="deleteRpAccountCheckMistakeByIds" parameterType="String">delete from rp_account_check_mistake where id in <foreach item="id" collection="array" open="(" separator="," close=")">#{id}</foreach></delete><!--生成对账差错 列表查询all  --><sql id="listCheckMistake1">select rsr.remit_confirm_time,rsr.remit_amount,rsr.sett_fee,rsr.sett_status,rpw.pay_way_name,rmsr.sub_mch_id,rah.banktrxno ,racm.bank_trade_status,racm.err_type,racm.handle_status,racm.handle_value,racm.handle_remark,racm.account_check_batch_nofrom rp_sett_record rsr  left join rp_user_pay_config rupc on   rsr.user_no = rupc.user_noleft join rp_pay_way rpw on rpw.pay_product_code  = rupc.product_codeleft join rp_micro_submit_record rmsr on rmsr.account_number = rsr.bank_account_noleft join rp_account_history rah on rmsr.account_number = rah.accountnoleft join rp_account_check_mistake racm on racm.bank_trx_no = rah.banktrxno</sql><!-- 条件--><select id="listCheckMistake" parameterType="RpAccountCheckMistake" resultMap="RpAccountCheckMistakeResult"><include refid="listCheckMistake1"/><where><if test="billDate != null "> and bill_date = #{billDate}</if></where></select>
</mapper>

案例 curd 实体 service serviceimpl mapper mapperimpl相关推荐

  1. ServiceImpl或者Service引入mapper报红解决办法

    ServiceImpl或者Service引入mapper报红解决办法 在IntelliJ IDEA编码时,使用ServiceImpl或者Service引入mapper报红, 提示: Could not ...

  2. 一键生成controller、service、mapper、model、po

    生成工具类类 package com.xxx.codegen;import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ba ...

  3. php lmpl,tjx-cold: 用于根据配置模板,快速生成controller,service,serviceimpl 代码

    用于根据配置模板,快速生成controller,service,serviceimpl 代码(交流群 623169994 ) 为什么要开发这款插件 市面上有很多基于数据库生成代码的工具,但是我自己的工 ...

  4. java代码生成器,生成controller、service、mapper、entity 层,只需要六步

    通过数据库表名创建 controller.service.mapper.entity 层. CodeGenerator 类 package test;import com.baomidou.mybat ...

  5. 以新增用户为例子解释前后端整体连接方式详解(Service、Mapper、Controller、Entity)

    目录 ​编辑 前端 1.点击新增用户按钮执行 handleAdd() 方法 2.添加用户表单校验:(这里明显是简介版本,还有很大的优化空间) 3.点击表单里的确 定按钮通过 submitForm() ...

  6. SpringBoot整合WebSocket时调用service和mapper的方法

    场景 SpringBoot+Vue整合WebSocket实现前后端消息推送: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/114 ...

  7. 图解 IDEA 中 springboot 项目 MyBatis Generator 逆向生成实体类及 mapper 配置文件

    前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家.点击跳转到教程. 一.准备工作: 1. 新建一个 配置文件:generatorConfig.xml . <?xm ...

  8. mysql 自动生成mapper_自动生成实体类、Mapper、Mapper.xml文件

    自动生成实体类.Mapper.Mapper.xml文件 搭建Spring Boot + Mysql + MyBatis 项目 核心 配置pom.xml 创建表 配置文件 生成文件 结果 项目结构 搭建 ...

  9. mybatis根据表逆向自动化生成代码(自动生成实体类、mapper文件、mapper.xml文件)

    若采用mybatis框架,数据库新建表,手动编写的话,需要编写大量的实体类.mapper文件.mapper.xml文件,都是一些重复且有规律的工作. 我们可以引用插件,然后做配置,自动生成这些文件,提 ...

最新文章

  1. 一个“退学生”到CTO的逆袭之路
  2. 以杨辉三角形的三种实现体会python的编程特性
  3. 从零开始发布前端代码到服务器上_无服务器计算:让每行代码都能住上“经济适用房”...
  4. Storm的acker确认机制
  5. 显示ip地址及包含采集功能的全套函数源代码
  6. 数据结构排序法之堆排序he归并排序
  7. 获取当前窗口是否可见 document.visibilityState
  8. (三)构建dubbo分布式平台-maven模块规划
  9. Linux—Ubuntu14.0.5配置JAVA环境
  10. 上市之前再被爆出安全问题 卫龙辣条被爆吃出“锁精环”
  11. 【广告技术】下个月会有多少用户看到洗发水广告?最先进的张量分解模型给你最好的答案
  12. box2dweb基础
  13. Linux管理员常用网络资源(收集帖)
  14. 邮件合并保存为一个个单独的文档_巧用WPS“邮件合并”功能,让工作更加高效...
  15. 初夏小谈:浅谈字节序,TCP,UDP协议
  16. 为什么很多人吐槽谭浩强的C语言程序设计?
  17. MacM1 安装python库文件
  18. 图像检索:OPQ索引与HNSW索引
  19. android+4.2+浏览器,一款小巧的安卓浏览器 Via浏览器 v4.2.8
  20. VIVADO使用——打开已有文件

热门文章

  1. email搭配smtplib编辑发送邮件 看了之后邮件随便发
  2. rpm命令无法使用问题解决(rpmdb: unable to join the environment)
  3. DXF文件格式——ENTITIES 段
  4. 互联网日报 | 2月6日 星期六 | 快手上市首日市值超万亿港元;瑞幸咖啡在美申请破产保护;虾米音乐正式宣布关停...
  5. 龙猫数据:服务AI产业,筑基智慧生态
  6. 文件服务器工作站有什么用,工作站是什么-工作站有什么作用?与服务器的区别是什么? 爱问知识人...
  7. 腾讯2015校园招聘
  8. 暑期实践阶段性总结 2022-8-5
  9. ArcGIS应用分析--学校选址
  10. 公司到底是怎么看我们的