Commit 49afafc7 by guojuxing

添加delete_flag

parent 34457bdf
......@@ -12,13 +12,6 @@ import java.util.List;
* @date 2020/9/11 11:36 AM

*/
public interface TabCashWithdrawalMapper {
/**
* 根据主键删除
*
* @param cashWithdrawalId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer cashWithdrawalId);
/**
* 插入一条记录
......
......@@ -11,13 +11,7 @@ import java.util.List;
* @date 2020/9/11 11:35 AM

*/
public interface TabInvoiceAccountMapper {
/**
* 根据主键删除
*
* @param invoiceAccountId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer invoiceAccountId);
/**
* 插入一条记录
......
......@@ -13,13 +13,7 @@ import java.util.List;
* @date 2020/9/11 11:35 AM

*/
public interface TabInvoiceManageMapper {
/**
* 根据主键删除
*
* @param invoiceManageId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer invoiceManageId);
/**
* 插入一条记录
......
......@@ -12,13 +12,6 @@ import java.util.List;
* @date 2020/9/11 11:36 AM

*/
public interface TabPayAccountMapper {
/**
* 根据主键删除
*
* @param payAccountId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer payAccountId);
/**
* 插入一条记录
......
......@@ -14,13 +14,7 @@ import java.util.List;
* @date 2020/9/11 11:33 AM

*/
public interface TabTransferAccountsApprovalMapper {
/**
* 根据主键删除
*
* @param transferApprovalId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer transferApprovalId);
/**
* 插入一条记录
......
......@@ -60,6 +60,8 @@ public class TabInvoiceAccount {
*/
private Date updateTime;
private Integer deleteFlag;
public Integer getInvoiceAccountId() {
return invoiceAccountId;
}
......@@ -139,4 +141,13 @@ public class TabInvoiceAccount {
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getDeleteFlag() {
return deleteFlag;
}
public TabInvoiceAccount setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
}
\ No newline at end of file
......@@ -55,6 +55,8 @@ public class TabPayAccount {
*/
private Date updateTime;
private Integer deleteFlag;
public Integer getPayAccountId() {
return payAccountId;
}
......@@ -126,4 +128,13 @@ public class TabPayAccount {
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getDeleteFlag() {
return deleteFlag;
}
public TabPayAccount setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
}
\ No newline at end of file
......@@ -5,6 +5,7 @@ import com.gic.finance.dao.mapper.TabInvoiceAccountMapper;
import com.gic.finance.dto.InvoiceAccountDTO;
import com.gic.finance.entity.TabInvoiceAccount;
import com.gic.finance.service.InvoiceAccountService;
import com.gic.finance.util.DeleteFlagConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -23,7 +24,9 @@ public class InvoiceAccountServiceImpl implements InvoiceAccountService{
private TabInvoiceAccountMapper tabInvoiceAccountMapper;
@Override
public void save(InvoiceAccountDTO dto) {
tabInvoiceAccountMapper.insert(EntityUtil.changeEntityNew(TabInvoiceAccount.class, dto));
TabInvoiceAccount record = EntityUtil.changeEntityNew(TabInvoiceAccount.class, dto);
record.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
tabInvoiceAccountMapper.insert(record);
}
@Override
......
......@@ -3,6 +3,7 @@ package com.gic.finance.service.impl;
import java.util.Date;
import java.util.List;
import com.gic.finance.util.DeleteFlagConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -25,7 +26,9 @@ public class PayAccountServiceImpl implements PayAccountService {
@Override
public int save(PayAccountDTO dto) {
return tabPayAccountMapper.insert(EntityUtil.changeEntityNew(TabPayAccount.class, dto));
TabPayAccount record = EntityUtil.changeEntityNew(TabPayAccount.class, dto);
record.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
return tabPayAccountMapper.insert(record);
}
@Override
......
package com.gic.finance.util;
/**
* 数据删除标志常量
* @ClassName: DeleteFlagConstants

* @Description: 

* @author guojuxing

* @date 2020/10/13 4:12 PM

*/
public class DeleteFlagConstants {
/**
* 数据正常状态
*/
public static final int NORMAL_STATUS = 0;
/**
* 数据删除状态
*/
public static final int DELETE_STATUS = 1;
}
......@@ -44,10 +44,7 @@
from tab_cash_withdrawal
where cash_withdrawal_id = #{cashWithdrawalId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_cash_withdrawal
where cash_withdrawal_id = #{cashWithdrawalId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.finance.entity.TabCashWithdrawal">
insert into tab_cash_withdrawal (cash_withdrawal_id, cash_withdrawal_serial_number,
apply_type, cash_withdrawal_amount, cash_withdrawal_status,
......
......@@ -12,10 +12,11 @@
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
</resultMap>
<sql id="Base_Column_List">
invoice_account_id, account_name, tax_number, address, bank, account_phone, bank_account,
status, create_time, update_time
status, create_time, update_time, delete_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -23,19 +24,16 @@
from tab_invoice_account
where invoice_account_id = #{invoiceAccountId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_invoice_account
where invoice_account_id = #{invoiceAccountId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.finance.entity.TabInvoiceAccount">
insert into tab_invoice_account (invoice_account_id, account_name, tax_number,
address, bank, account_phone,
bank_account, status, create_time,
update_time)
update_time, delete_flag)
values (#{invoiceAccountId,jdbcType=INTEGER}, #{accountName,jdbcType=VARCHAR}, #{taxNumber,jdbcType=VARCHAR},
#{address,jdbcType=VARCHAR}, #{bank,jdbcType=VARCHAR}, #{accountPhone,jdbcType=VARCHAR},
#{bankAccount,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
#{updateTime,jdbcType=TIMESTAMP}, #{deleteFlag,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.finance.entity.TabInvoiceAccount">
insert into tab_invoice_account
......@@ -70,6 +68,9 @@
<if test="updateTime != null">
update_time,
</if>
<if test="deleteFlag != null">
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="invoiceAccountId != null">
......@@ -102,6 +103,9 @@
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.finance.entity.TabInvoiceAccount">
......@@ -134,6 +138,9 @@
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
</set>
where invoice_account_id = #{invoiceAccountId,jdbcType=INTEGER}
</update>
......@@ -147,7 +154,8 @@
bank_account = #{bankAccount,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
update_time = #{updateTime,jdbcType=TIMESTAMP},
delete_flag = #{deleteFlag,jdbcType=INTEGER}
where invoice_account_id = #{invoiceAccountId,jdbcType=INTEGER}
</update>
......@@ -156,6 +164,7 @@
<include refid="Base_Column_List" />
from tab_invoice_account
where status = 1
and delete_flag = 0
</select>
<update id="closeStatus">
......@@ -169,6 +178,8 @@
from tab_invoice_account
where status != 0
and delete_flag = 0
order by status
</select>
</mapper>
\ No newline at end of file
......@@ -51,10 +51,7 @@
from tab_invoice_manage
where invoice_manage_id = #{invoiceManageId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_invoice_manage
where invoice_manage_id = #{invoiceManageId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.finance.entity.TabInvoiceManage">
insert into tab_invoice_manage (invoice_manage_id, invoice_apply_serial,
platform_type, invoice_type, billing_amount,
......
......@@ -11,10 +11,11 @@
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
</resultMap>
<sql id="Base_Column_List">
pay_account_id, account_name, bank, branch_name, bank_account, status, sort, create_time,
update_time
update_time, delete_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -22,18 +23,15 @@
from tab_pay_account
where pay_account_id = #{payAccountId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_pay_account
where pay_account_id = #{payAccountId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.finance.entity.TabPayAccount">
insert into tab_pay_account (pay_account_id, account_name, bank,
branch_name, bank_account, status,
sort, create_time, update_time
sort, create_time, update_time, delete_flag
)
values (#{payAccountId,jdbcType=INTEGER}, #{accountName,jdbcType=VARCHAR}, #{bank,jdbcType=VARCHAR},
#{branchName,jdbcType=VARCHAR}, #{bankAccount,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{sort,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
#{sort,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleteFlag,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.finance.entity.TabPayAccount">
......@@ -66,6 +64,9 @@
<if test="updateTime != null">
update_time,
</if>
<if test="deleteFlag != null">
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="payAccountId != null">
......@@ -95,6 +96,9 @@
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.finance.entity.TabPayAccount">
......@@ -124,6 +128,9 @@
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
</set>
where pay_account_id = #{payAccountId,jdbcType=INTEGER}
</update>
......@@ -136,7 +143,8 @@
status = #{status,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
update_time = #{updateTime,jdbcType=TIMESTAMP},
delete_flag = #{deleteFlag,jdbcType=INTEGER}
where pay_account_id = #{payAccountId,jdbcType=INTEGER}
</update>
......@@ -145,6 +153,7 @@
<include refid="Base_Column_List" />
from tab_pay_account
where status != 0
and delete_flag = 0
order by sort
</select>
......@@ -153,6 +162,7 @@
ifnull(max(sort), 0)
from tab_pay_account
where status != 0
and delete_flag = 0
</select>
<select id="getMinSort" resultType="int">
......@@ -160,6 +170,7 @@
ifnull(min(sort),0)
from tab_pay_account
where status != 0
and delete_flag = 0
</select>
......@@ -168,6 +179,7 @@
<include refid="Base_Column_List" />
from tab_pay_account
where status != 0
and delete_flag = 0
and sort &lt; #{sort}
</select>
......@@ -176,6 +188,7 @@
<include refid="Base_Column_List" />
from tab_pay_account
where status != 0
and delete_flag = 0
and sort > #{sort}
</select>
</mapper>
\ No newline at end of file
......@@ -38,10 +38,7 @@
from tab_transfer_accounts_approval
where transfer_approval_id = #{transferApprovalId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_transfer_accounts_approval
where transfer_approval_id = #{transferApprovalId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.finance.entity.TabTransferAccountsApproval">
insert into tab_transfer_accounts_approval (transfer_approval_id, order_number,
platform_type, initiator_type, initiator_name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment