银行支票结算业务-出售
parent
00d6c4adb6
commit
dd8eb5e781
@ -0,0 +1,69 @@
|
||||
package com.sztzjy.bank.controller.stu;
|
||||
|
||||
import com.sztzjy.bank.annotation.AnonymousAccess;
|
||||
import com.sztzjy.bank.entity.BankAcceptanceBillBusiness;
|
||||
import com.sztzjy.bank.entity.BillTransactionSalf;
|
||||
import com.sztzjy.bank.service.BillTransactionSalfServie;
|
||||
import com.sztzjy.bank.util.ResultEntity;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @author 17803
|
||||
* @date 2025-02-24 13:35
|
||||
*/
|
||||
@Api(tags = "银行支票结算业务")
|
||||
@RequestMapping("api/billTransaction")
|
||||
@RestController
|
||||
@Validated
|
||||
public class BillTransactionSalfController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private BillTransactionSalfServie billTransactionSalfServie;
|
||||
|
||||
|
||||
|
||||
@AnonymousAccess
|
||||
@ApiOperation("银行支票结算业务-出售")
|
||||
@PostMapping("salf")
|
||||
public ResultEntity salf(@Valid @RequestBody BillTransactionSalf billTransactionSalf) {
|
||||
|
||||
return billTransactionSalfServie.salf(billTransactionSalf);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@AnonymousAccess
|
||||
@ApiOperation("银行支票结算业务-出售回显/兑付(业务顺序号查询)")
|
||||
@GetMapping("getSalfBaseInfo")
|
||||
public ResultEntity<BillTransactionSalf> getSalfBaseInfo(@ApiParam("用户ID") String userId, Integer number,
|
||||
@ApiParam("业务顺序号(用到时候传参)") @RequestParam(required = false) String businessSequence) {
|
||||
|
||||
return billTransactionSalfServie.getSalfBaseInfo(userId, number, businessSequence);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@AnonymousAccess
|
||||
@ApiOperation("银行支票结算业务-兑付")
|
||||
@PostMapping("redemption")
|
||||
public ResultEntity redemption(@Valid @RequestBody BillTransactionSalf billTransactionSalf) {
|
||||
|
||||
return billTransactionSalfServie.salf(billTransactionSalf);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,30 @@
|
||||
package com.sztzjy.bank.mapper;
|
||||
|
||||
import com.sztzjy.bank.entity.BillTransactionSalf;
|
||||
import com.sztzjy.bank.entity.BillTransactionSalfExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface BillTransactionSalfMapper {
|
||||
long countByExample(BillTransactionSalfExample example);
|
||||
|
||||
int deleteByExample(BillTransactionSalfExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(BillTransactionSalf record);
|
||||
|
||||
int insertSelective(BillTransactionSalf record);
|
||||
|
||||
List<BillTransactionSalf> selectByExample(BillTransactionSalfExample example);
|
||||
|
||||
BillTransactionSalf selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") BillTransactionSalf record, @Param("example") BillTransactionSalfExample example);
|
||||
|
||||
int updateByExample(@Param("record") BillTransactionSalf record, @Param("example") BillTransactionSalfExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(BillTransactionSalf record);
|
||||
|
||||
int updateByPrimaryKey(BillTransactionSalf record);
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.sztzjy.bank.service;
|
||||
|
||||
import com.sztzjy.bank.entity.BillTransactionSalf;
|
||||
import com.sztzjy.bank.util.ResultEntity;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @author 17803
|
||||
* @date 2025-02-24 13:36
|
||||
*/
|
||||
public interface BillTransactionSalfServie {
|
||||
|
||||
//银行支票结算业务-出售
|
||||
ResultEntity salf(@Valid BillTransactionSalf billTransactionSalf);
|
||||
|
||||
//银行支票结算业务-出售回显
|
||||
ResultEntity<BillTransactionSalf> getSalfBaseInfo(String userId, Integer number, String businessSequence);
|
||||
}
|
@ -0,0 +1,230 @@
|
||||
package com.sztzjy.bank.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.sztzjy.bank.entity.*;
|
||||
import com.sztzjy.bank.entity.dto.BillTransactionSalfDTO;
|
||||
import com.sztzjy.bank.entity.dto.FinancialBillsDTO;
|
||||
import com.sztzjy.bank.mapper.BillTransactionSalfMapper;
|
||||
import com.sztzjy.bank.mapper.CaseAnswerInfoMapper;
|
||||
import com.sztzjy.bank.mapper.CaseInfoMapper;
|
||||
import com.sztzjy.bank.service.BillTransactionSalfServie;
|
||||
import com.sztzjy.bank.util.RedisUtil;
|
||||
import com.sztzjy.bank.util.ResultEntity;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 17803
|
||||
* @date 2025-02-24 13:36
|
||||
*/
|
||||
@Service
|
||||
public class BillTransactionSalfServieImpl implements BillTransactionSalfServie {
|
||||
|
||||
|
||||
@Autowired
|
||||
private BillTransactionSalfMapper billTransactionSalfMapper;
|
||||
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
|
||||
@Autowired
|
||||
private CaseInfoMapper caseInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private CaseAnswerInfoMapper caseAnswerInfoMapper;
|
||||
|
||||
|
||||
//银行支票结算业务-出售
|
||||
@Override
|
||||
public ResultEntity salf(BillTransactionSalf billTransactionSalf) {
|
||||
|
||||
//判断是报错还是提交
|
||||
BillTransactionSalfExample example = new BillTransactionSalfExample();
|
||||
example.createCriteria().andUserIdEqualTo(billTransactionSalf.getUserId()).andNumberEqualTo(billTransactionSalf.getNumber());
|
||||
List<BillTransactionSalf> informationList = billTransactionSalfMapper.selectByExample(example);
|
||||
|
||||
if (CollectionUtils.isEmpty(informationList)) {
|
||||
//首次提交
|
||||
billTransactionSalf.setId(IdUtil.simpleUUID());
|
||||
|
||||
if (billTransactionSalf.getSubState() == 1) {
|
||||
billTransactionSalf = submitBySalf(billTransactionSalf);
|
||||
|
||||
}
|
||||
//数据保存
|
||||
billTransactionSalfMapper.insertSelective(billTransactionSalf);
|
||||
|
||||
return new ResultEntity<>(HttpStatus.OK);
|
||||
|
||||
} else {
|
||||
BillTransactionSalf information = informationList.get(0);
|
||||
|
||||
//校验时候已经提交
|
||||
if (information.getSubState() == 1) {
|
||||
return new ResultEntity<>(HttpStatus.OK, "提交成功", 2);
|
||||
}
|
||||
|
||||
if (billTransactionSalf.getSubState() == 1) {
|
||||
billTransactionSalf = submitBySalf(billTransactionSalf);
|
||||
}
|
||||
|
||||
|
||||
String id = information.getId();
|
||||
|
||||
BeanUtils.copyProperties(billTransactionSalf, information);
|
||||
//当值ID为空被覆盖
|
||||
information.setId(id);
|
||||
billTransactionSalfMapper.updateByPrimaryKeySelective(information);
|
||||
|
||||
return new ResultEntity<>(HttpStatus.OK, "提交成功", 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//银行支票结算业务-出售回显
|
||||
@Override
|
||||
public ResultEntity<BillTransactionSalf> getSalfBaseInfo(String userId, Integer number, String businessSequence) {
|
||||
|
||||
//判断是报错还是提交
|
||||
BillTransactionSalfExample example = new BillTransactionSalfExample();
|
||||
BillTransactionSalfExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andUserIdEqualTo(userId).andNumberEqualTo(number);
|
||||
if (businessSequence != null) {
|
||||
criteria.andBusinessSequenceEqualTo(businessSequence);
|
||||
}
|
||||
List<BillTransactionSalf> informationList = billTransactionSalfMapper.selectByExample(example);
|
||||
|
||||
if (CollectionUtils.isEmpty(informationList)) {
|
||||
return new ResultEntity<>(HttpStatus.OK);
|
||||
}else {
|
||||
return new ResultEntity<>(HttpStatus.OK,"查询成功",informationList.get(0));
|
||||
}
|
||||
}
|
||||
|
||||
//银行支票结算业务-出售-提交算分
|
||||
private BillTransactionSalf submitBySalf(BillTransactionSalf billTransactionSalf) {
|
||||
|
||||
|
||||
String answer = redisUtil.get("bank" + "-银行支票结算业务" + "-出售");
|
||||
if (answer == null) {
|
||||
CaseInfoExample caseInfoExample = new CaseInfoExample();
|
||||
caseInfoExample.createCriteria().andLargeModuleEqualTo("银行支票结算业务")
|
||||
.andModuleEqualTo("出售")
|
||||
.andNumberEqualTo(billTransactionSalf.getNumber());
|
||||
List<CaseInfo> caseInfoList = caseInfoMapper.selectByExampleWithBLOBs(caseInfoExample);
|
||||
if (!CollectionUtils.isEmpty(caseInfoList)) {
|
||||
CaseInfo caseInfo = caseInfoList.get(0);
|
||||
CaseAnswerInfoExample caseAnswerInfoExample = new CaseAnswerInfoExample();
|
||||
caseAnswerInfoExample.createCriteria().andCaseIdEqualTo(caseInfo.getCaseId());
|
||||
List<CaseAnswerInfo> answerInfoList = caseAnswerInfoMapper.selectByExampleWithBLOBs(caseAnswerInfoExample);
|
||||
if (!CollectionUtils.isEmpty(answerInfoList)) {
|
||||
String info = answerInfoList.get(0).getAnswer();
|
||||
redisUtil.set("bank" + "-银行支票结算业务" + "-出售", info, 3600);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 解析 JSON 字符串
|
||||
BillTransactionSalfDTO answerDTO = JSON.parseObject(answer, BillTransactionSalfDTO.class);
|
||||
|
||||
|
||||
Integer info = billTransactionSalf.getErrorNumber();
|
||||
if (info == null) {
|
||||
info = 0;
|
||||
}
|
||||
|
||||
|
||||
int errorNumber = info;
|
||||
|
||||
//交易类型
|
||||
if (!answerDTO.getTransactionType().equals(billTransactionSalf.getTransactionType())) {
|
||||
errorNumber++;
|
||||
}
|
||||
|
||||
//出票人账号
|
||||
if (!answerDTO.getDrawerAccount().equals(billTransactionSalf.getDrawerAccount())) {
|
||||
errorNumber++;
|
||||
}
|
||||
|
||||
//出票人名称
|
||||
if (!answerDTO.getDrawerName().equals(billTransactionSalf.getDrawerName())) {
|
||||
errorNumber++;
|
||||
}
|
||||
|
||||
|
||||
//出票行名称
|
||||
if (!answerDTO.getDrawerBankName().equals(billTransactionSalf.getDrawerBankName())) {
|
||||
errorNumber++;
|
||||
}
|
||||
|
||||
|
||||
//票据号码
|
||||
if (!answerDTO.getBillNumber().equals(billTransactionSalf.getBillNumber())) {
|
||||
errorNumber++;
|
||||
}
|
||||
|
||||
|
||||
//票据类型
|
||||
if (!answerDTO.getBillType().equals(billTransactionSalf.getBillType())) {
|
||||
errorNumber++;
|
||||
}
|
||||
|
||||
|
||||
//申请人证件类型
|
||||
if (!answerDTO.getApplicantIdType().equals(billTransactionSalf.getApplicantIdType())) {
|
||||
errorNumber++;
|
||||
}
|
||||
|
||||
|
||||
//票据号码
|
||||
if (!answerDTO.getBillNumber().equals(billTransactionSalf.getBillNumber())) {
|
||||
errorNumber++;
|
||||
}
|
||||
|
||||
|
||||
//证件号码
|
||||
if (answerDTO.getIdNumber().compareTo(billTransactionSalf.getIdNumber()) != 0) {
|
||||
errorNumber++;
|
||||
}
|
||||
|
||||
|
||||
//出售日期
|
||||
if (answerDTO.getIssueDate().compareTo(billTransactionSalf.getIssueDate()) != 0) {
|
||||
errorNumber++;
|
||||
}
|
||||
|
||||
//到期日期
|
||||
if (answerDTO.getDueDate().compareTo(billTransactionSalf.getDueDate()) != 0) {
|
||||
errorNumber++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//币种
|
||||
if (!answerDTO.getCurrency().equals(billTransactionSalf.getCurrency())) {
|
||||
errorNumber++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//错误次数
|
||||
billTransactionSalf.setErrorNumber(errorNumber);
|
||||
|
||||
return billTransactionSalf;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,466 @@
|
||||
<?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.sztzjy.bank.mapper.BillTransactionSalfMapper">
|
||||
<resultMap id="BaseResultMap" type="com.sztzjy.bank.entity.BillTransactionSalf">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="transaction_type" jdbcType="VARCHAR" property="transactionType" />
|
||||
<result column="drawer_account" jdbcType="VARCHAR" property="drawerAccount" />
|
||||
<result column="drawer_name" jdbcType="VARCHAR" property="drawerName" />
|
||||
<result column="drawer_bank_name" jdbcType="VARCHAR" property="drawerBankName" />
|
||||
<result column="bill_number" jdbcType="VARCHAR" property="billNumber" />
|
||||
<result column="bill_type" jdbcType="VARCHAR" property="billType" />
|
||||
<result column="applicant_id_type" jdbcType="VARCHAR" property="applicantIdType" />
|
||||
<result column="id_number" jdbcType="VARCHAR" property="idNumber" />
|
||||
<result column="issue_date" jdbcType="TIMESTAMP" property="issueDate" />
|
||||
<result column="due_date" jdbcType="TIMESTAMP" property="dueDate" />
|
||||
<result column="currency" jdbcType="VARCHAR" property="currency" />
|
||||
<result column="remittance_fee" jdbcType="DOUBLE" property="remittanceFee" />
|
||||
<result column="service_fee" jdbcType="DOUBLE" property="serviceFee" />
|
||||
<result column="business_sequence" jdbcType="VARCHAR" property="businessSequence" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="sub_state" jdbcType="INTEGER" property="subState" />
|
||||
<result column="error_number" jdbcType="INTEGER" property="errorNumber" />
|
||||
<result column="number" jdbcType="INTEGER" property="number" />
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, transaction_type, drawer_account, drawer_name, drawer_bank_name, bill_number,
|
||||
bill_type, applicant_id_type, id_number, issue_date, due_date, currency, remittance_fee,
|
||||
service_fee, business_sequence, create_time, update_time, sub_state, error_number,
|
||||
number, user_id
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.sztzjy.bank.entity.BillTransactionSalfExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from bill_transaction_salf
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from bill_transaction_salf
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from bill_transaction_salf
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.sztzjy.bank.entity.BillTransactionSalfExample">
|
||||
delete from bill_transaction_salf
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sztzjy.bank.entity.BillTransactionSalf">
|
||||
insert into bill_transaction_salf (id, transaction_type, drawer_account,
|
||||
drawer_name, drawer_bank_name, bill_number,
|
||||
bill_type, applicant_id_type, id_number,
|
||||
issue_date, due_date, currency,
|
||||
remittance_fee, service_fee, business_sequence,
|
||||
create_time, update_time, sub_state,
|
||||
error_number, number, user_id
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{transactionType,jdbcType=VARCHAR}, #{drawerAccount,jdbcType=VARCHAR},
|
||||
#{drawerName,jdbcType=VARCHAR}, #{drawerBankName,jdbcType=VARCHAR}, #{billNumber,jdbcType=VARCHAR},
|
||||
#{billType,jdbcType=VARCHAR}, #{applicantIdType,jdbcType=VARCHAR}, #{idNumber,jdbcType=VARCHAR},
|
||||
#{issueDate,jdbcType=TIMESTAMP}, #{dueDate,jdbcType=TIMESTAMP}, #{currency,jdbcType=VARCHAR},
|
||||
#{remittanceFee,jdbcType=DOUBLE}, #{serviceFee,jdbcType=DOUBLE}, #{businessSequence,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{subState,jdbcType=INTEGER},
|
||||
#{errorNumber,jdbcType=INTEGER}, #{number,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sztzjy.bank.entity.BillTransactionSalf">
|
||||
insert into bill_transaction_salf
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="transactionType != null">
|
||||
transaction_type,
|
||||
</if>
|
||||
<if test="drawerAccount != null">
|
||||
drawer_account,
|
||||
</if>
|
||||
<if test="drawerName != null">
|
||||
drawer_name,
|
||||
</if>
|
||||
<if test="drawerBankName != null">
|
||||
drawer_bank_name,
|
||||
</if>
|
||||
<if test="billNumber != null">
|
||||
bill_number,
|
||||
</if>
|
||||
<if test="billType != null">
|
||||
bill_type,
|
||||
</if>
|
||||
<if test="applicantIdType != null">
|
||||
applicant_id_type,
|
||||
</if>
|
||||
<if test="idNumber != null">
|
||||
id_number,
|
||||
</if>
|
||||
<if test="issueDate != null">
|
||||
issue_date,
|
||||
</if>
|
||||
<if test="dueDate != null">
|
||||
due_date,
|
||||
</if>
|
||||
<if test="currency != null">
|
||||
currency,
|
||||
</if>
|
||||
<if test="remittanceFee != null">
|
||||
remittance_fee,
|
||||
</if>
|
||||
<if test="serviceFee != null">
|
||||
service_fee,
|
||||
</if>
|
||||
<if test="businessSequence != null">
|
||||
business_sequence,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="subState != null">
|
||||
sub_state,
|
||||
</if>
|
||||
<if test="errorNumber != null">
|
||||
error_number,
|
||||
</if>
|
||||
<if test="number != null">
|
||||
number,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="transactionType != null">
|
||||
#{transactionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="drawerAccount != null">
|
||||
#{drawerAccount,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="drawerName != null">
|
||||
#{drawerName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="drawerBankName != null">
|
||||
#{drawerBankName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="billNumber != null">
|
||||
#{billNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="billType != null">
|
||||
#{billType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="applicantIdType != null">
|
||||
#{applicantIdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="idNumber != null">
|
||||
#{idNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="issueDate != null">
|
||||
#{issueDate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="dueDate != null">
|
||||
#{dueDate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="currency != null">
|
||||
#{currency,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remittanceFee != null">
|
||||
#{remittanceFee,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="serviceFee != null">
|
||||
#{serviceFee,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="businessSequence != null">
|
||||
#{businessSequence,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="subState != null">
|
||||
#{subState,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="errorNumber != null">
|
||||
#{errorNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="number != null">
|
||||
#{number,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.sztzjy.bank.entity.BillTransactionSalfExample" resultType="java.lang.Long">
|
||||
select count(*) from bill_transaction_salf
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update bill_transaction_salf
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.transactionType != null">
|
||||
transaction_type = #{record.transactionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.drawerAccount != null">
|
||||
drawer_account = #{record.drawerAccount,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.drawerName != null">
|
||||
drawer_name = #{record.drawerName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.drawerBankName != null">
|
||||
drawer_bank_name = #{record.drawerBankName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.billNumber != null">
|
||||
bill_number = #{record.billNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.billType != null">
|
||||
bill_type = #{record.billType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.applicantIdType != null">
|
||||
applicant_id_type = #{record.applicantIdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.idNumber != null">
|
||||
id_number = #{record.idNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.issueDate != null">
|
||||
issue_date = #{record.issueDate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.dueDate != null">
|
||||
due_date = #{record.dueDate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.currency != null">
|
||||
currency = #{record.currency,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.remittanceFee != null">
|
||||
remittance_fee = #{record.remittanceFee,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="record.serviceFee != null">
|
||||
service_fee = #{record.serviceFee,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="record.businessSequence != null">
|
||||
business_sequence = #{record.businessSequence,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.subState != null">
|
||||
sub_state = #{record.subState,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.errorNumber != null">
|
||||
error_number = #{record.errorNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.number != null">
|
||||
number = #{record.number,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update bill_transaction_salf
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
transaction_type = #{record.transactionType,jdbcType=VARCHAR},
|
||||
drawer_account = #{record.drawerAccount,jdbcType=VARCHAR},
|
||||
drawer_name = #{record.drawerName,jdbcType=VARCHAR},
|
||||
drawer_bank_name = #{record.drawerBankName,jdbcType=VARCHAR},
|
||||
bill_number = #{record.billNumber,jdbcType=VARCHAR},
|
||||
bill_type = #{record.billType,jdbcType=VARCHAR},
|
||||
applicant_id_type = #{record.applicantIdType,jdbcType=VARCHAR},
|
||||
id_number = #{record.idNumber,jdbcType=VARCHAR},
|
||||
issue_date = #{record.issueDate,jdbcType=TIMESTAMP},
|
||||
due_date = #{record.dueDate,jdbcType=TIMESTAMP},
|
||||
currency = #{record.currency,jdbcType=VARCHAR},
|
||||
remittance_fee = #{record.remittanceFee,jdbcType=DOUBLE},
|
||||
service_fee = #{record.serviceFee,jdbcType=DOUBLE},
|
||||
business_sequence = #{record.businessSequence,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
sub_state = #{record.subState,jdbcType=INTEGER},
|
||||
error_number = #{record.errorNumber,jdbcType=INTEGER},
|
||||
number = #{record.number,jdbcType=INTEGER},
|
||||
user_id = #{record.userId,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.bank.entity.BillTransactionSalf">
|
||||
update bill_transaction_salf
|
||||
<set>
|
||||
<if test="transactionType != null">
|
||||
transaction_type = #{transactionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="drawerAccount != null">
|
||||
drawer_account = #{drawerAccount,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="drawerName != null">
|
||||
drawer_name = #{drawerName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="drawerBankName != null">
|
||||
drawer_bank_name = #{drawerBankName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="billNumber != null">
|
||||
bill_number = #{billNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="billType != null">
|
||||
bill_type = #{billType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="applicantIdType != null">
|
||||
applicant_id_type = #{applicantIdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="idNumber != null">
|
||||
id_number = #{idNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="issueDate != null">
|
||||
issue_date = #{issueDate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="dueDate != null">
|
||||
due_date = #{dueDate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="currency != null">
|
||||
currency = #{currency,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remittanceFee != null">
|
||||
remittance_fee = #{remittanceFee,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="serviceFee != null">
|
||||
service_fee = #{serviceFee,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="businessSequence != null">
|
||||
business_sequence = #{businessSequence,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="subState != null">
|
||||
sub_state = #{subState,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="errorNumber != null">
|
||||
error_number = #{errorNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="number != null">
|
||||
number = #{number,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.sztzjy.bank.entity.BillTransactionSalf">
|
||||
update bill_transaction_salf
|
||||
set transaction_type = #{transactionType,jdbcType=VARCHAR},
|
||||
drawer_account = #{drawerAccount,jdbcType=VARCHAR},
|
||||
drawer_name = #{drawerName,jdbcType=VARCHAR},
|
||||
drawer_bank_name = #{drawerBankName,jdbcType=VARCHAR},
|
||||
bill_number = #{billNumber,jdbcType=VARCHAR},
|
||||
bill_type = #{billType,jdbcType=VARCHAR},
|
||||
applicant_id_type = #{applicantIdType,jdbcType=VARCHAR},
|
||||
id_number = #{idNumber,jdbcType=VARCHAR},
|
||||
issue_date = #{issueDate,jdbcType=TIMESTAMP},
|
||||
due_date = #{dueDate,jdbcType=TIMESTAMP},
|
||||
currency = #{currency,jdbcType=VARCHAR},
|
||||
remittance_fee = #{remittanceFee,jdbcType=DOUBLE},
|
||||
service_fee = #{serviceFee,jdbcType=DOUBLE},
|
||||
business_sequence = #{businessSequence,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
sub_state = #{subState,jdbcType=INTEGER},
|
||||
error_number = #{errorNumber,jdbcType=INTEGER},
|
||||
number = #{number,jdbcType=INTEGER},
|
||||
user_id = #{userId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in New Issue