mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-13 03:39:55 +08:00
Merge branch 'dev' into feature-BI
This commit is contained in:
@@ -22,7 +22,7 @@ public class MemberWalletInfo {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会员id
|
||||
@@ -66,4 +66,4 @@ public class MemberWalletInfo {
|
||||
* 删除标识(0-正常;1-删除)
|
||||
*/
|
||||
private String delFlag;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.jsowell.pile.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class BatchImportMemberBalanceResultDTO {
|
||||
private int totalCount;
|
||||
private int successCount;
|
||||
private int failCount;
|
||||
private List<ImportMemberBalanceItemResultDTO> failedList = new ArrayList<>();
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.jsowell.pile.dto;
|
||||
|
||||
import com.jsowell.common.annotation.Excel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class ImportMemberBalanceDTO {
|
||||
// 手机号
|
||||
@Excel(name = "phone")
|
||||
private String phone;
|
||||
|
||||
// 余额
|
||||
@Excel(name = "balance/100")
|
||||
private BigDecimal balance;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.jsowell.pile.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ImportMemberBalanceItemResultDTO {
|
||||
private boolean success;
|
||||
private String phone;
|
||||
private String errorMessage;
|
||||
|
||||
public static ImportMemberBalanceItemResultDTO success(String phone) {
|
||||
ImportMemberBalanceItemResultDTO result = new ImportMemberBalanceItemResultDTO();
|
||||
result.setSuccess(true);
|
||||
result.setPhone(phone);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static ImportMemberBalanceItemResultDTO fail(String phone, String errorMessage) {
|
||||
ImportMemberBalanceItemResultDTO result = new ImportMemberBalanceItemResultDTO();
|
||||
result.setSuccess(false);
|
||||
result.setPhone(phone);
|
||||
result.setErrorMessage(errorMessage);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -93,6 +93,14 @@ public interface MemberBasicInfoMapper {
|
||||
*/
|
||||
MemberBasicInfo selectInfoByMemberId(String memberId);
|
||||
|
||||
/**
|
||||
* 判断会员id是否已存在。
|
||||
*
|
||||
* @param memberId 会员id
|
||||
* @return 1-存在;null-不存在
|
||||
*/
|
||||
Integer existsByMemberId(@Param("memberId") String memberId);
|
||||
|
||||
/**
|
||||
* 更新会员余额
|
||||
* @param memberId 会员id
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
import java.util.List;
|
||||
|
||||
public interface MemberWalletInfoMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(MemberWalletInfo record);
|
||||
|
||||
@@ -17,7 +17,7 @@ public interface MemberWalletInfoMapper {
|
||||
|
||||
int insertSelective(MemberWalletInfo record);
|
||||
|
||||
MemberWalletInfo selectByPrimaryKey(Integer id);
|
||||
MemberWalletInfo selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(MemberWalletInfo record);
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.jsowell.pile.mapper;
|
||||
|
||||
import com.jsowell.pile.domain.PileFirmwareInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
@@ -29,6 +30,14 @@ public interface PileFirmwareInfoMapper {
|
||||
*/
|
||||
public List<PileFirmwareInfo> selectPileFirmwareInfoList(PileFirmwareInfo pileFirmwareInfo);
|
||||
|
||||
/**
|
||||
* 根据固件名称查询充电桩固件信息
|
||||
*
|
||||
* @param name 固件名称
|
||||
* @return 充电桩固件信息
|
||||
*/
|
||||
public PileFirmwareInfo checkNameUnique(@Param("name") String name);
|
||||
|
||||
/**
|
||||
* 新增充电桩固件信息
|
||||
*
|
||||
|
||||
@@ -91,6 +91,14 @@ public interface MemberBasicInfoService {
|
||||
*/
|
||||
MemberBasicInfo selectInfoByMemberId(String memberId);
|
||||
|
||||
/**
|
||||
* 判断指定会员id是否已经存在。
|
||||
*
|
||||
* @param memberId 会员id
|
||||
* @return true-已存在;false-不存在
|
||||
*/
|
||||
boolean existsByMemberId(String memberId);
|
||||
|
||||
String generateWalletCode();
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,13 +6,13 @@ import com.jsowell.pile.vo.base.MemberWalletVO;
|
||||
import java.util.List;
|
||||
|
||||
public interface MemberWalletInfoService {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(MemberWalletInfo record);
|
||||
|
||||
int insertSelective(MemberWalletInfo record);
|
||||
|
||||
MemberWalletInfo selectByPrimaryKey(Integer id);
|
||||
MemberWalletInfo selectByPrimaryKey(Long id);
|
||||
|
||||
MemberWalletInfo selectByMemberId(String memberId, String merchantId);
|
||||
|
||||
|
||||
@@ -30,6 +30,14 @@ public interface PileFirmwareInfoService {
|
||||
*/
|
||||
public List<PileFirmwareInfo> selectPileFirmwareInfoList(PileFirmwareInfo pileFirmwareInfo);
|
||||
|
||||
/**
|
||||
* 校验固件名称是否唯一
|
||||
*
|
||||
* @param pileFirmwareInfo 充电桩固件信息
|
||||
* @return 结果
|
||||
*/
|
||||
public String checkNameUnique(PileFirmwareInfo pileFirmwareInfo);
|
||||
|
||||
/**
|
||||
* 新增充电桩固件信息
|
||||
*
|
||||
|
||||
@@ -180,6 +180,11 @@ public class MemberBasicInfoServiceImpl implements MemberBasicInfoService {
|
||||
return memberBasicInfoMapper.selectInfoByMemberId(memberId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean existsByMemberId(String memberId) {
|
||||
return memberBasicInfoMapper.existsByMemberId(memberId) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成钱包卡号WalletCode
|
||||
* @return
|
||||
@@ -267,8 +272,16 @@ public class MemberBasicInfoServiceImpl implements MemberBasicInfoService {
|
||||
createBy = SecurityUtils.getLoginUser().getUserId() + "";
|
||||
}
|
||||
|
||||
// 查询用户余额
|
||||
MemberWalletInfo walletInfo = memberWalletInfoService.selectByMemberId(memberId, targetMerchantId);
|
||||
log.info("修改用户余额-开始查询钱包, memberId:{}, targetMerchantId:{}, type:{}, subType:{}, updatePrincipalBalance:{}, updateGiftBalance:{}",
|
||||
memberId, targetMerchantId, type, dto.getSubType(), updatePrincipalBalance, updateGiftBalance);
|
||||
MemberWalletInfo walletInfo;
|
||||
try {
|
||||
walletInfo = memberWalletInfoService.selectByMemberId(memberId, targetMerchantId);
|
||||
} catch (Exception e) {
|
||||
log.error("修改用户余额-查询钱包异常, memberId:{}, targetMerchantId:{}, memberIdLength:{}, exceptionType:{}",
|
||||
memberId, targetMerchantId, memberId == null ? null : memberId.length(), e.getClass().getName(), e);
|
||||
throw e;
|
||||
}
|
||||
log.info("修改用户余额-根据会员id:{}, 目标运营商id:{}, 查询结果:{}", memberId, targetMerchantId, JSON.toJSONString(walletInfo));
|
||||
if (walletInfo == null) {
|
||||
log.info("修改用户余额-根据会员id:{}, 目标运营商id:{}, 查询会员信息为空, 新建会员钱包", memberId, targetMerchantId);
|
||||
@@ -282,6 +295,11 @@ public class MemberBasicInfoServiceImpl implements MemberBasicInfoService {
|
||||
.version(0)
|
||||
.build();
|
||||
memberWalletInfoService.insertSelective(walletInfo);
|
||||
log.info("修改用户余额-会员钱包创建完成, memberId:{}, targetMerchantId:{}, walletId:{}, walletCode:{}",
|
||||
memberId, targetMerchantId, walletInfo.getId(), walletInfo.getWalletCode());
|
||||
} else {
|
||||
log.info("修改用户余额-命中会员钱包, memberId:{}, targetMerchantId:{}, walletId:{}, walletCode:{}, version:{}",
|
||||
memberId, targetMerchantId, walletInfo.getId(), walletInfo.getWalletCode(), walletInfo.getVersion());
|
||||
}
|
||||
|
||||
// 钱包编号
|
||||
|
||||
@@ -25,7 +25,7 @@ public class MemberWalletInfoServiceImpl implements MemberWalletInfoService {
|
||||
private PileMerchantInfoService pileMerchantInfoService;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
public int deleteByPrimaryKey(Long id) {
|
||||
return memberWalletInfoMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class MemberWalletInfoServiceImpl implements MemberWalletInfoService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public MemberWalletInfo selectByPrimaryKey(Integer id) {
|
||||
public MemberWalletInfo selectByPrimaryKey(Long id) {
|
||||
return memberWalletInfoMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
|
||||
@@ -662,12 +662,12 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
logger.error("启动失败退款, orderCode:{}, transactionCode:{}, 执行订单结算逻辑发生异常", orderInfo.getOrderCode(),transactionCode, e);
|
||||
}
|
||||
|
||||
// 退保险金额
|
||||
try {
|
||||
refundInsurance(orderInfo);
|
||||
} catch (Exception e) {
|
||||
logger.error("启动失败退款, orderCode:{}, transactionCode:{}, 退保险发生异常", orderInfo.getOrderCode(),transactionCode, e);
|
||||
}
|
||||
// 退保险金额 2025-05-18注释,支付成功未启动订单,保险费退款集成到订单退款中
|
||||
// try {
|
||||
// refundInsurance(orderInfo);
|
||||
// } catch (Exception e) {
|
||||
// logger.error("启动失败退款, orderCode:{}, transactionCode:{}, 退保险发生异常", orderInfo.getOrderCode(),transactionCode, e);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2101,6 +2101,11 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
List<BalanceDeductionAmountVO> resultList = Lists.newArrayList();
|
||||
// 查询会员的余额充值记录 按照充值时间正序
|
||||
List<MemberAdapayRecord> memberAdapayRecords = memberAdapayRecordService.selectAvailableBalance(memberId);
|
||||
// 筛选该list最近一年的数据
|
||||
memberAdapayRecords = memberAdapayRecords.stream()
|
||||
.filter(record -> DateUtils.date2LocalDateTime(record.getCreateTime())
|
||||
.isAfter(LocalDateTime.now().minusYears(1)))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 定义一个临时金额等于消费金额
|
||||
BigDecimal tempAmount = new BigDecimal(amount.toString());
|
||||
|
||||
@@ -3,8 +3,10 @@ package com.jsowell.pile.service.impl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.constant.UserConstants;
|
||||
import com.jsowell.common.core.page.PageResponse;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.common.util.file.AliyunOssUploadUtils;
|
||||
import com.jsowell.pile.domain.PileFirmwareInfo;
|
||||
import com.jsowell.pile.domain.PileReservationInfo;
|
||||
@@ -50,6 +52,22 @@ public class PileFirmwareInfoServiceImpl implements PileFirmwareInfoService {
|
||||
return pileFirmwareInfoMapper.selectPileFirmwareInfoList(pileFirmwareInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验固件名称是否唯一
|
||||
*
|
||||
* @param pileFirmwareInfo 充电桩固件信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public String checkNameUnique(PileFirmwareInfo pileFirmwareInfo) {
|
||||
Long id = StringUtils.isNull(pileFirmwareInfo.getId()) ? -1L : pileFirmwareInfo.getId();
|
||||
PileFirmwareInfo info = pileFirmwareInfoMapper.checkNameUnique(pileFirmwareInfo.getName());
|
||||
if (StringUtils.isNotNull(info) && info.getId().longValue() != id.longValue()) {
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增充电桩固件信息
|
||||
*
|
||||
|
||||
@@ -173,6 +173,14 @@
|
||||
and member_id = #{memberId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<select id="existsByMemberId" resultType="java.lang.Integer">
|
||||
select 1
|
||||
from member_basic_info
|
||||
where del_flag = '0'
|
||||
and member_id = #{memberId,jdbcType=VARCHAR}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<update id="updateMemberBalance">
|
||||
update member_wallet_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<resultMap id="BaseResultMap" type="com.jsowell.pile.domain.MemberWalletInfo">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table member_wallet_info-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="member_id" jdbcType="VARCHAR" property="memberId" />
|
||||
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
|
||||
<result column="wallet_code" jdbcType="VARCHAR" property="walletCode" />
|
||||
@@ -22,17 +22,17 @@
|
||||
id, member_id, merchant_id, wallet_code, principal_balance, gift_balance, version,
|
||||
create_by, create_time, update_by, update_time, del_flag
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from member_wallet_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
<!--@mbg.generated-->
|
||||
delete from member_wallet_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.MemberWalletInfo" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
@@ -157,7 +157,7 @@
|
||||
del_flag = #{delFlag,jdbcType=CHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.jsowell.pile.domain.MemberWalletInfo">
|
||||
<!--@mbg.generated-->
|
||||
@@ -173,7 +173,7 @@
|
||||
update_by = #{updateBy,jdbcType=VARCHAR},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
del_flag = #{delFlag,jdbcType=CHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
@@ -181,63 +181,63 @@
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="member_id = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.memberId,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="merchant_id = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.merchantId,jdbcType=VARCHAR}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.merchantId,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="wallet_code = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.walletCode,jdbcType=VARCHAR}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.walletCode,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="principal_balance = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.principalBalance,jdbcType=DECIMAL}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.principalBalance,jdbcType=DECIMAL}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="gift_balance = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.giftBalance,jdbcType=DECIMAL}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.giftBalance,jdbcType=DECIMAL}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="version = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.version,jdbcType=INTEGER}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.version,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="create_by = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.createBy,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="create_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.createTime,jdbcType=TIMESTAMP}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="update_by = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.updateBy,jdbcType=VARCHAR}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.updateBy,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="update_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.updateTime,jdbcType=TIMESTAMP}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="del_flag = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.delFlag,jdbcType=CHAR}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.delFlag,jdbcType=CHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where id in
|
||||
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
||||
#{item.id,jdbcType=INTEGER}
|
||||
#{item.id,jdbcType=BIGINT}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="updateBatchSelective" parameterType="java.util.List">
|
||||
@@ -247,84 +247,84 @@
|
||||
<trim prefix="member_id = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.memberId != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.memberId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="merchant_id = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.merchantId != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.merchantId,jdbcType=VARCHAR}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.merchantId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="wallet_code = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.walletCode != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.walletCode,jdbcType=VARCHAR}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.walletCode,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="principal_balance = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.principalBalance != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.principalBalance,jdbcType=DECIMAL}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.principalBalance,jdbcType=DECIMAL}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="gift_balance = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.giftBalance != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.giftBalance,jdbcType=DECIMAL}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.giftBalance,jdbcType=DECIMAL}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="version = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.version != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.version,jdbcType=INTEGER}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.version,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="create_by = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.createBy != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.createBy,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="create_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.createTime != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="update_by = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.updateBy != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.updateBy,jdbcType=VARCHAR}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.updateBy,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="update_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.updateTime != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.updateTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="del_flag = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.delFlag != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.delFlag,jdbcType=CHAR}
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.delFlag,jdbcType=CHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where id in
|
||||
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
||||
#{item.id,jdbcType=INTEGER}
|
||||
#{item.id,jdbcType=BIGINT}
|
||||
</foreach>
|
||||
</update>
|
||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||
@@ -363,7 +363,7 @@
|
||||
values
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
#{memberId,jdbcType=VARCHAR},
|
||||
#{merchantId,jdbcType=VARCHAR},
|
||||
@@ -380,7 +380,7 @@
|
||||
on duplicate key update
|
||||
<trim suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id = #{id,jdbcType=INTEGER},
|
||||
id = #{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
member_id = #{memberId,jdbcType=VARCHAR},
|
||||
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
||||
@@ -439,7 +439,7 @@
|
||||
values
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="memberId != null">
|
||||
#{memberId,jdbcType=VARCHAR},
|
||||
@@ -478,7 +478,7 @@
|
||||
on duplicate key update
|
||||
<trim suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id = #{id,jdbcType=INTEGER},
|
||||
id = #{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="memberId != null">
|
||||
member_id = #{memberId,jdbcType=VARCHAR},
|
||||
@@ -521,7 +521,7 @@
|
||||
<include refid="Base_Column_List" />
|
||||
from member_wallet_info
|
||||
where del_flag = '0'
|
||||
and member_id = #{memberId,jdbcType=INTEGER}
|
||||
and member_id = #{memberId,jdbcType=VARCHAR}
|
||||
<if test="merchantId != null">
|
||||
and merchant_id = #{merchantId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
@@ -533,7 +533,7 @@
|
||||
<include refid="Base_Column_List" />
|
||||
from member_wallet_info
|
||||
where del_flag = '0'
|
||||
and member_id = #{memberId,jdbcType=INTEGER}
|
||||
and member_id = #{memberId,jdbcType=VARCHAR}
|
||||
<if test="merchantId != null">
|
||||
and merchant_id = #{merchantId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
@@ -544,7 +544,7 @@
|
||||
<include refid="Base_Column_List" />
|
||||
from member_wallet_info
|
||||
where del_flag = '0'
|
||||
and member_id = #{memberId,jdbcType=INTEGER}
|
||||
and member_id = #{memberId,jdbcType=VARCHAR}
|
||||
and merchant_id is not null
|
||||
</select>
|
||||
|
||||
|
||||
@@ -36,6 +36,12 @@
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="checkNameUnique" resultMap="PileFirmwareInfoResult">
|
||||
<include refid="selectPileFirmwareInfoVo"/>
|
||||
where name = #{name}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertPileFirmwareInfo" parameterType="com.jsowell.pile.domain.PileFirmwareInfo">
|
||||
insert into pile_firmware_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@@ -96,4 +102,4 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user