区域配置、提交意向金、银行接口

This commit is contained in:
wangxiaopeng
2024-03-28 16:38:27 +08:00
parent 1530840b45
commit 0ae1df7bbd
41 changed files with 2116 additions and 35 deletions

View File

@@ -0,0 +1,40 @@
package com.cool.store.dao;
import com.cool.store.entity.BankdocDO;
import com.cool.store.entity.BanktypeDO;
import com.cool.store.mapper.BankdocMapper;
import com.cool.store.mapper.BanktypeMapper;
import com.cool.store.request.BranchBankPageRequest;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.List;
/**
* @author wxp
* @FileName: BankDAO
* @Description:
* @date 2024-03-19 10:49
*/
@Slf4j
@Repository
public class BankDAO {
@Resource
private BanktypeMapper banktypeMapper;
@Resource
private BankdocMapper bankdocMapper;
public List<BanktypeDO> listBank() {
List<BanktypeDO> bankList = banktypeMapper.listBank();
return bankList;
}
public Page<BankdocDO> listBranchBank(BranchBankPageRequest request){
PageHelper.startPage(request.getPageNum(), request.getPageSize());
return bankdocMapper.listBranchBank(request);
}
}

View File

@@ -0,0 +1,41 @@
package com.cool.store.dao;
import com.cool.store.entity.LinePayDO;
import com.cool.store.mapper.LinePayMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.Objects;
/**
* @author wxp
* @FileName: LinePayDAO
* @Description:提交意向金
* @date 2024-03-27 14:33
*/
@Slf4j
@Repository
public class LinePayDAO {
@Resource
private LinePayMapper linePayMapper;
public LinePayDO getLinePayByLineId(Long lineId) {
LinePayDO linePayDO = linePayMapper.getLinePayByLineId(lineId);
return linePayDO;
}
public Long addLinePay(LinePayDO linePayDO){
linePayMapper.insertSelective(linePayDO);
return linePayDO.getId();
}
public Integer updateLinePay(LinePayDO linePayDO){
if(Objects.isNull(linePayDO)){
return 0;
}
return linePayMapper.updateByPrimaryKeySelective(linePayDO);
}
}

View File

@@ -0,0 +1,44 @@
package com.cool.store.dao;
import com.cool.store.entity.RegionAreaConfigDO;
import com.cool.store.mapper.RegionAreaConfigMapper;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
/**
* @author wxp
* @ClassName RegionAreaConfigDao
* @Description 用一句话描述什么
*/
@Repository
public class RegionAreaConfigDao {
@Resource
private RegionAreaConfigMapper regionAreaConfigMapper;
public void deleteRegionAreaConfigByRegionId(Long regionId) {
if (regionId == null) {
return;
}
regionAreaConfigMapper.deleteRegionAreaConfigByRegionId(regionId);
}
public void batchInsertOrUpdateRegionAreaConfig(List<RegionAreaConfigDO> regionAreaConfigList) {
if (CollectionUtils.isEmpty(regionAreaConfigList)) {
return;
}
regionAreaConfigMapper.batchInsertOrUpdateRegionAreaConfig(regionAreaConfigList);
}
public List<RegionAreaConfigDO> listAreaByRegionId(Long regionId){
if (regionId == null) {
return Collections.emptyList();
}
return regionAreaConfigMapper.listAreaByRegionId(regionId);
}
}

View File

@@ -0,0 +1,32 @@
package com.cool.store.dao;
import com.cool.store.entity.RegionQrcodeConfigDO;
import com.cool.store.mapper.RegionQrcodeConfigMapper;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.Objects;
/**
* @author wxp
* @ClassName RegionDao
* @Description 用一句话描述什么
*/
@Repository
public class RegionQrcodeConfigDao {
@Resource
private RegionQrcodeConfigMapper regionQrcodeConfigMapper;
public String getPayPicByRegionId(Long regionId) {
if ( Objects.isNull(regionId)) {
return "";
}
RegionQrcodeConfigDO regionQrcodeConfigDO = regionQrcodeConfigMapper.getByRegionId(regionId);
if(regionQrcodeConfigDO != null){
return regionQrcodeConfigDO.getPayPic();
}
return "";
}
}

View File

@@ -0,0 +1,26 @@
package com.cool.store.mapper;
import com.cool.store.dto.interview.LineInterviewPageDTO;
import com.cool.store.entity.BankdocDO;
import com.cool.store.request.BranchBankPageRequest;
import com.cool.store.request.LineInterviewPageRequest;
import com.github.pagehelper.Page;
import java.util.List;
/**
* @author wxp
* @date 2024-03-27 09:25
*/
public interface BankdocMapper {
/**
*
* 默认插入方法,只会给有值的字段赋值
* 会对传进来的字段做判空处理如果字段为空则使用数据库默认字段或者null
* dateTime:2024-03-27 09:25
*/
int insertSelective(BankdocDO record);
Page<BankdocDO> listBranchBank(BranchBankPageRequest request);
}

View File

@@ -0,0 +1,43 @@
package com.cool.store.mapper;
import com.cool.store.entity.BanktypeDO;
import java.util.List;
/**
* @author wxp
* @date 2024-03-27 09:25
*/
public interface BanktypeMapper {
/**
*
* 默认插入方法,只会给有值的字段赋值
* 会对传进来的字段做判空处理如果字段为空则使用数据库默认字段或者null
* dateTime:2024-03-27 09:25
*/
int insertSelective(BanktypeDO record);
/**
*
* 默认查询方法,通过主键获取所有字段的值
* dateTime:2024-03-27 09:25
*/
BanktypeDO selectByPrimaryKey(String pkBanktype);
/**
*
* 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的
* dateTime:2024-03-27 09:25
*/
int updateByPrimaryKeySelective(BanktypeDO record);
/**
*
* 默认更新方法,根据主键物理删除
* dateTime:2024-03-27 09:25
*/
int deleteByPrimaryKey(String pkBanktype);
List<BanktypeDO> listBank();
}

View File

@@ -0,0 +1,42 @@
package com.cool.store.mapper;
import com.cool.store.entity.LinePayDO;
import org.apache.ibatis.annotations.Param;
/**
* @author wxp
* @date 2024-03-27 09:25
*/
public interface LinePayMapper {
/**
*
* 默认插入方法,只会给有值的字段赋值
* 会对传进来的字段做判空处理如果字段为空则使用数据库默认字段或者null
* dateTime:2024-03-27 09:25
*/
int insertSelective(LinePayDO record);
/**
*
* 默认查询方法,通过主键获取所有字段的值
* dateTime:2024-03-27 09:25
*/
LinePayDO selectByPrimaryKey(Long id);
/**
*
* 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的
* dateTime:2024-03-27 09:25
*/
int updateByPrimaryKeySelective(LinePayDO record);
/**
*
* 默认更新方法,根据主键物理删除
* dateTime:2024-03-27 09:25
*/
int deleteByPrimaryKey(Long id);
LinePayDO getLinePayByLineId(@Param("lineId") Long lineId);
}

View File

@@ -0,0 +1,48 @@
package com.cool.store.mapper;
import com.cool.store.entity.RegionAreaConfigDO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author wxp
* @date 2024-03-27 09:25
*/
public interface RegionAreaConfigMapper {
/**
*
* 默认插入方法,只会给有值的字段赋值
* 会对传进来的字段做判空处理如果字段为空则使用数据库默认字段或者null
* dateTime:2024-03-27 09:25
*/
int insertSelective(RegionAreaConfigDO record);
/**
*
* 默认查询方法,通过主键获取所有字段的值
* dateTime:2024-03-27 09:25
*/
RegionAreaConfigDO selectByPrimaryKey(Long id);
/**
*
* 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的
* dateTime:2024-03-27 09:25
*/
int updateByPrimaryKeySelective(RegionAreaConfigDO record);
/**
*
* 默认更新方法,根据主键物理删除
* dateTime:2024-03-27 09:25
*/
int deleteByPrimaryKey(Long id);
void deleteRegionAreaConfigByRegionId(@Param("regionId") Long regionId);
void batchInsertOrUpdateRegionAreaConfig(@Param("regionAreaConfigList") List<RegionAreaConfigDO> regionAreaConfigList);
List<RegionAreaConfigDO> listAreaByRegionId(@Param("regionId") Long regionId);
}

View File

@@ -0,0 +1,43 @@
package com.cool.store.mapper;
import com.cool.store.entity.RegionQrcodeConfigDO;
import org.apache.ibatis.annotations.Param;
/**
* @author wxp
* @date 2024-03-27 09:25
*/
public interface RegionQrcodeConfigMapper {
/**
*
* 默认插入方法,只会给有值的字段赋值
* 会对传进来的字段做判空处理如果字段为空则使用数据库默认字段或者null
* dateTime:2024-03-27 09:25
*/
int insertSelective(RegionQrcodeConfigDO record);
/**
*
* 默认查询方法,通过主键获取所有字段的值
* dateTime:2024-03-27 09:25
*/
RegionQrcodeConfigDO selectByPrimaryKey(Long id);
/**
*
* 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的
* dateTime:2024-03-27 09:25
*/
int updateByPrimaryKeySelective(RegionQrcodeConfigDO record);
/**
*
* 默认更新方法,根据主键物理删除
* dateTime:2024-03-27 09:25
*/
int deleteByPrimaryKey(Long id);
RegionQrcodeConfigDO getByRegionId( @Param("regionId") Long regionId);
}

View File

@@ -0,0 +1,88 @@
<?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.cool.store.mapper.BankdocMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.BankdocDO">
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="combinenum" jdbcType="VARCHAR" property="combinenum" />
<result column="enablestate" jdbcType="DECIMAL" property="enablestate" />
<result column="iscustbank" jdbcType="CHAR" property="iscustbank" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="pk_banktype" jdbcType="VARCHAR" property="pkBanktype" />
</resultMap>
<insert id="insertSelective" parameterType="com.cool.store.entity.BankdocDO">
insert into xfsg_bankdoc
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="code != null">
code,
</if>
<if test="combinenum != null">
combinenum,
</if>
<if test="enablestate != null">
enablestate,
</if>
<if test="iscustbank != null">
iscustbank,
</if>
<if test="name != null">
name,
</if>
<if test="pkBanktype != null">
pk_banktype,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="combinenum != null">
#{combinenum,jdbcType=VARCHAR},
</if>
<if test="enablestate != null">
#{enablestate,jdbcType=DECIMAL},
</if>
<if test="iscustbank != null">
#{iscustbank,jdbcType=CHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="pkBanktype != null">
#{pkBanktype,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<sql id="dynamicQuery">
<trim prefix="WHERE" prefixOverrides="AND | OR">
<if test="null != code">
and t.code = #{code,jdbcType=VARCHAR}
</if>
<if test="null != combinenum">
and t.combinenum = #{combinenum,jdbcType=VARCHAR}
</if>
<if test="null != enablestate">
and t.enablestate = #{enablestate,jdbcType=DECIMAL}
</if>
<if test="null != iscustbank">
and t.iscustbank = #{iscustbank,jdbcType=CHAR}
</if>
<if test="null != name">
and t.name = #{name,jdbcType=VARCHAR}
</if>
<if test="null != pkBanktype">
and t.pk_banktype = #{pkBanktype,jdbcType=VARCHAR}
</if>
</trim>
</sql>
<select id="listBranchBank" resultMap="BaseResultMap">
SELECT doc.* FROM xfsg_banktype type left join xfsg_bankdoc doc on doc.enablestate = 2 and doc.iscustbank = 'N'
and doc.pk_banktype = type.pk_banktype and type.code = #{bankCode}
<if test="keyword != null and keyword != ''">
and (doc.code like concat('%',#{keyword},'%') or doc.name like concat('%',#{keyword},'%'))
</if>
where doc.code is not null and doc.name is not null
order by doc.name
</select>
</mapper>

View File

@@ -0,0 +1,92 @@
<?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.cool.store.mapper.BanktypeMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.BanktypeDO">
<id column="pk_banktype" jdbcType="CHAR" property="pkBanktype" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="combinecode" jdbcType="VARCHAR" property="combinecode" />
<result column="name" jdbcType="VARCHAR" property="name" />
</resultMap>
<sql id="Base_Column_List">
pk_banktype, code, combinecode, name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from xfsg_banktype
where pk_banktype = #{pkBanktype,jdbcType=CHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from xfsg_banktype
where pk_banktype = #{pkBanktype,jdbcType=CHAR}
</delete>
<insert id="insertSelective" parameterType="com.cool.store.entity.BanktypeDO">
insert into xfsg_banktype
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="pkBanktype != null">
pk_banktype,
</if>
<if test="code != null">
code,
</if>
<if test="combinecode != null">
combinecode,
</if>
<if test="name != null">
name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="pkBanktype != null">
#{pkBanktype,jdbcType=CHAR},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="combinecode != null">
#{combinecode,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.BanktypeDO">
update xfsg_banktype
<set>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="combinecode != null">
combinecode = #{combinecode,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
</set>
where pk_banktype = #{pkBanktype,jdbcType=CHAR}
</update>
<sql id="dynamicQuery">
<trim prefix="WHERE" prefixOverrides="AND | OR">
<if test="null != pkBanktype">
and t.pk_banktype = #{pkBanktype,jdbcType=CHAR}
</if>
<if test="null != code">
and t.code = #{code,jdbcType=VARCHAR}
</if>
<if test="null != combinecode">
and t.combinecode = #{combinecode,jdbcType=VARCHAR}
</if>
<if test="null != name">
and t.name = #{name,jdbcType=VARCHAR}
</if>
</trim>
</sql>
<select id="listBank" resultMap="BaseResultMap">
select * from xfsg_banktype
where 1=1 and code is not null and name is not null
order by name
</select>
</mapper>

View File

@@ -0,0 +1,283 @@
<?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.cool.store.mapper.LinePayMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.LinePayDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
<result column="line_id" jdbcType="BIGINT" property="lineId" />
<result column="pay_status" jdbcType="TINYINT" property="payStatus" />
<result column="pay_type" jdbcType="TINYINT" property="payType" />
<result column="pay_user_name" jdbcType="VARCHAR" property="payUserName" />
<result column="pay_account" jdbcType="VARCHAR" property="payAccount" />
<result column="bank_code" jdbcType="VARCHAR" property="bankCode" />
<result column="bank_name" jdbcType="VARCHAR" property="bankName" />
<result column="branch_bank_code" jdbcType="VARCHAR" property="branchBankCode" />
<result column="branch_bank_name" jdbcType="VARCHAR" property="branchBankName" />
<result column="pay_time" jdbcType="TIMESTAMP" property="payTime" />
<result column="pay_pic" jdbcType="VARCHAR" property="payPic" />
<result column="promise_pic" jdbcType="VARCHAR" property="promisePic" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
<result column="deleted" jdbcType="BIT" property="deleted" />
</resultMap>
<sql id="Base_Column_List">
id, partner_id, line_id, pay_status, pay_type, pay_user_name, pay_account, bank_code,
bank_name, branch_bank_code, branch_bank_name, pay_time, pay_pic, promise_pic, create_time,
update_time, create_user_id, update_user_id, deleted
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from xfsg_line_pay
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from xfsg_line_pay
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insertSelective" parameterType="com.cool.store.entity.LinePayDO">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into xfsg_line_pay
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="partnerId != null">
partner_id,
</if>
<if test="lineId != null">
line_id,
</if>
<if test="payStatus != null">
pay_status,
</if>
<if test="payType != null">
pay_type,
</if>
<if test="payUserName != null">
pay_user_name,
</if>
<if test="payAccount != null">
pay_account,
</if>
<if test="bankCode != null">
bank_code,
</if>
<if test="bankName != null">
bank_name,
</if>
<if test="branchBankCode != null">
branch_bank_code,
</if>
<if test="branchBankName != null">
branch_bank_name,
</if>
<if test="payTime != null">
pay_time,
</if>
<if test="payPic != null">
pay_pic,
</if>
<if test="promisePic != null">
promise_pic,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="createUserId != null">
create_user_id,
</if>
<if test="updateUserId != null">
update_user_id,
</if>
<if test="deleted != null">
deleted,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="partnerId != null">
#{partnerId,jdbcType=VARCHAR},
</if>
<if test="lineId != null">
#{lineId,jdbcType=BIGINT},
</if>
<if test="payStatus != null">
#{payStatus,jdbcType=TINYINT},
</if>
<if test="payType != null">
#{payType,jdbcType=TINYINT},
</if>
<if test="payUserName != null">
#{payUserName,jdbcType=VARCHAR},
</if>
<if test="payAccount != null">
#{payAccount,jdbcType=VARCHAR},
</if>
<if test="bankCode != null">
#{bankCode,jdbcType=VARCHAR},
</if>
<if test="bankName != null">
#{bankName,jdbcType=VARCHAR},
</if>
<if test="branchBankCode != null">
#{branchBankCode,jdbcType=VARCHAR},
</if>
<if test="branchBankName != null">
#{branchBankName,jdbcType=VARCHAR},
</if>
<if test="payTime != null">
#{payTime,jdbcType=TIMESTAMP},
</if>
<if test="payPic != null">
#{payPic,jdbcType=VARCHAR},
</if>
<if test="promisePic != null">
#{promisePic,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createUserId != null">
#{createUserId,jdbcType=VARCHAR},
</if>
<if test="updateUserId != null">
#{updateUserId,jdbcType=VARCHAR},
</if>
<if test="deleted != null">
#{deleted,jdbcType=BIT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.LinePayDO">
update xfsg_line_pay
<set>
<if test="partnerId != null">
partner_id = #{partnerId,jdbcType=VARCHAR},
</if>
<if test="lineId != null">
line_id = #{lineId,jdbcType=BIGINT},
</if>
<if test="payStatus != null">
pay_status = #{payStatus,jdbcType=TINYINT},
</if>
<if test="payType != null">
pay_type = #{payType,jdbcType=TINYINT},
</if>
<if test="payUserName != null">
pay_user_name = #{payUserName,jdbcType=VARCHAR},
</if>
<if test="payAccount != null">
pay_account = #{payAccount,jdbcType=VARCHAR},
</if>
<if test="bankCode != null">
bank_code = #{bankCode,jdbcType=VARCHAR},
</if>
<if test="bankName != null">
bank_name = #{bankName,jdbcType=VARCHAR},
</if>
<if test="branchBankCode != null">
branch_bank_code = #{branchBankCode,jdbcType=VARCHAR},
</if>
<if test="branchBankName != null">
branch_bank_name = #{branchBankName,jdbcType=VARCHAR},
</if>
<if test="payTime != null">
pay_time = #{payTime,jdbcType=TIMESTAMP},
</if>
<if test="payPic != null">
pay_pic = #{payPic,jdbcType=VARCHAR},
</if>
<if test="promisePic != null">
promise_pic = #{promisePic,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="createUserId != null">
create_user_id = #{createUserId,jdbcType=VARCHAR},
</if>
<if test="updateUserId != null">
update_user_id = #{updateUserId,jdbcType=VARCHAR},
</if>
<if test="deleted != null">
deleted = #{deleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<sql id="dynamicQuery">
<trim prefix="WHERE" prefixOverrides="AND | OR">
<if test="null != id">
and t.id = #{id,jdbcType=BIGINT}
</if>
<if test="null != partnerId">
and t.partner_id = #{partnerId,jdbcType=VARCHAR}
</if>
<if test="null != lineId">
and t.line_id = #{lineId,jdbcType=BIGINT}
</if>
<if test="null != payStatus">
and t.pay_status = #{payStatus,jdbcType=TINYINT}
</if>
<if test="null != payType">
and t.pay_type = #{payType,jdbcType=TINYINT}
</if>
<if test="null != payUserName">
and t.pay_user_name = #{payUserName,jdbcType=VARCHAR}
</if>
<if test="null != payAccount">
and t.pay_account = #{payAccount,jdbcType=VARCHAR}
</if>
<if test="null != bankCode">
and t.bank_code = #{bankCode,jdbcType=VARCHAR}
</if>
<if test="null != bankName">
and t.bank_name = #{bankName,jdbcType=VARCHAR}
</if>
<if test="null != branchBankCode">
and t.branch_bank_code = #{branchBankCode,jdbcType=VARCHAR}
</if>
<if test="null != branchBankName">
and t.branch_bank_name = #{branchBankName,jdbcType=VARCHAR}
</if>
<if test="null != payTime">
and t.pay_time = #{payTime,jdbcType=TIMESTAMP}
</if>
<if test="null != payPic">
and t.pay_pic = #{payPic,jdbcType=VARCHAR}
</if>
<if test="null != promisePic">
and t.promise_pic = #{promisePic,jdbcType=VARCHAR}
</if>
<if test="null != createTime">
and t.create_time = #{createTime,jdbcType=TIMESTAMP}
</if>
<if test="null != updateTime">
and t.update_time = #{updateTime,jdbcType=TIMESTAMP}
</if>
<if test="null != createUserId">
and t.create_user_id = #{createUserId,jdbcType=VARCHAR}
</if>
<if test="null != updateUserId">
and t.update_user_id = #{updateUserId,jdbcType=VARCHAR}
</if>
<if test="null != deleted">
and t.deleted = #{deleted,jdbcType=BIT}
</if>
</trim>
</sql>
<select id="getLinePayByLineId" resultMap="BaseResultMap">
select * from xfsg_line_pay where line_id = #{lineId} and deleted = '0'
</select>
</mapper>

View File

@@ -0,0 +1,173 @@
<?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.cool.store.mapper.RegionAreaConfigMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.RegionAreaConfigDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="region_id" jdbcType="BIGINT" property="regionId" />
<result column="want_shop_area_id" jdbcType="BIGINT" property="wantShopAreaId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
<result column="deleted" jdbcType="BIT" property="deleted" />
</resultMap>
<sql id="Base_Column_List">
id, region_id, want_shop_area_id, create_time, update_time, create_user_id, update_user_id,
deleted
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from xfsg_region_area_config
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from xfsg_region_area_config
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insertSelective" parameterType="com.cool.store.entity.RegionAreaConfigDO">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into xfsg_region_area_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="regionId != null">
region_id,
</if>
<if test="wantShopAreaId != null">
want_shop_area_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="createUserId != null">
create_user_id,
</if>
<if test="updateUserId != null">
update_user_id,
</if>
<if test="deleted != null">
deleted,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="regionId != null">
#{regionId,jdbcType=BIGINT},
</if>
<if test="wantShopAreaId != null">
#{wantShopAreaId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createUserId != null">
#{createUserId,jdbcType=VARCHAR},
</if>
<if test="updateUserId != null">
#{updateUserId,jdbcType=VARCHAR},
</if>
<if test="deleted != null">
#{deleted,jdbcType=BIT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.RegionAreaConfigDO">
update xfsg_region_area_config
<set>
<if test="regionId != null">
region_id = #{regionId,jdbcType=BIGINT},
</if>
<if test="wantShopAreaId != null">
want_shop_area_id = #{wantShopAreaId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createUserId != null">
create_user_id = #{createUserId,jdbcType=VARCHAR},
</if>
<if test="updateUserId != null">
update_user_id = #{updateUserId,jdbcType=VARCHAR},
</if>
<if test="deleted != null">
deleted = #{deleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<sql id="dynamicQuery">
<trim prefix="WHERE" prefixOverrides="AND | OR">
<if test="null != id">
and t.id = #{id,jdbcType=BIGINT}
</if>
<if test="null != regionId">
and t.region_id = #{regionId,jdbcType=BIGINT}
</if>
<if test="null != wantShopAreaId">
and t.want_shop_area_id = #{wantShopAreaId,jdbcType=BIGINT}
</if>
<if test="null != createTime">
and t.create_time = #{createTime,jdbcType=TIMESTAMP}
</if>
<if test="null != updateTime">
and t.update_time = #{updateTime,jdbcType=TIMESTAMP}
</if>
<if test="null != createUserId">
and t.create_user_id = #{createUserId,jdbcType=VARCHAR}
</if>
<if test="null != updateUserId">
and t.update_user_id = #{updateUserId,jdbcType=VARCHAR}
</if>
<if test="null != deleted">
and t.deleted = #{deleted,jdbcType=BIT}
</if>
</trim>
</sql>
<delete id="deleteRegionAreaConfigByRegionId">
delete from xfsg_region_area_config
where region_id = #{regionId}
</delete>
<insert id="batchInsertOrUpdateRegionAreaConfig">
insert into xfsg_region_area_config
(
region_id,
want_shop_area_id,
create_time,
create_user_id,
update_time,
update_user_id
)
values
<foreach collection="regionAreaConfigList" item="entity" separator=",">
(
#{entity.regionId},
#{entity.wantShopAreaId},
now(),
#{entity.createUserId},
now(),
#{entity.updateUserId}
)
</foreach>
ON DUPLICATE KEY UPDATE
update_time = now()
</insert>
<select id="listAreaByRegionId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from xfsg_region_area_config
where region_id = #{regionId}
</select>
</mapper>

View File

@@ -0,0 +1,156 @@
<?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.cool.store.mapper.RegionQrcodeConfigMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.RegionQrcodeConfigDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="region_id" jdbcType="BIGINT" property="regionId" />
<result column="region_name" jdbcType="VARCHAR" property="regionName" />
<result column="pay_pic" jdbcType="VARCHAR" property="payPic" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
<result column="deleted" jdbcType="BIT" property="deleted" />
</resultMap>
<sql id="Base_Column_List">
id, region_id, region_name, pay_pic, create_time, update_time, create_user_id, update_user_id,
deleted
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from xfsg_region_qrcode_config
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from xfsg_region_qrcode_config
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insertSelective" parameterType="com.cool.store.entity.RegionQrcodeConfigDO">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into xfsg_region_qrcode_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="regionId != null">
region_id,
</if>
<if test="regionName != null">
region_name,
</if>
<if test="payPic != null">
pay_pic,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="createUserId != null">
create_user_id,
</if>
<if test="updateUserId != null">
update_user_id,
</if>
<if test="deleted != null">
deleted,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="regionId != null">
#{regionId,jdbcType=BIGINT},
</if>
<if test="regionName != null">
#{regionName,jdbcType=VARCHAR},
</if>
<if test="payPic != null">
#{payPic,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createUserId != null">
#{createUserId,jdbcType=VARCHAR},
</if>
<if test="updateUserId != null">
#{updateUserId,jdbcType=VARCHAR},
</if>
<if test="deleted != null">
#{deleted,jdbcType=BIT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.RegionQrcodeConfigDO">
update xfsg_region_qrcode_config
<set>
<if test="regionId != null">
region_id = #{regionId,jdbcType=BIGINT},
</if>
<if test="regionName != null">
region_name = #{regionName,jdbcType=VARCHAR},
</if>
<if test="payPic != null">
pay_pic = #{payPic,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="createUserId != null">
create_user_id = #{createUserId,jdbcType=VARCHAR},
</if>
<if test="updateUserId != null">
update_user_id = #{updateUserId,jdbcType=VARCHAR},
</if>
<if test="deleted != null">
deleted = #{deleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<sql id="dynamicQuery">
<trim prefix="WHERE" prefixOverrides="AND | OR">
<if test="null != id">
and t.id = #{id,jdbcType=BIGINT}
</if>
<if test="null != regionId">
and t.region_id = #{regionId,jdbcType=BIGINT}
</if>
<if test="null != regionName">
and t.region_name = #{regionName,jdbcType=VARCHAR}
</if>
<if test="null != payPic">
and t.pay_pic = #{payPic,jdbcType=VARCHAR}
</if>
<if test="null != createTime">
and t.create_time = #{createTime,jdbcType=TIMESTAMP}
</if>
<if test="null != updateTime">
and t.update_time = #{updateTime,jdbcType=TIMESTAMP}
</if>
<if test="null != createUserId">
and t.create_user_id = #{createUserId,jdbcType=VARCHAR}
</if>
<if test="null != updateUserId">
and t.update_user_id = #{updateUserId,jdbcType=VARCHAR}
</if>
<if test="null != deleted">
and t.deleted = #{deleted,jdbcType=BIT}
</if>
</trim>
</sql>
<select id="getByRegionId" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from xfsg_region_qrcode_config
where region_id = #{regionId}
</select>
</mapper>