Commit 274afbeb by dengtt

V1.6.0——对账单-运营--对账单明细--价格列表.

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@25775 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent c45ca815
package com.glsx.ordercenter.constants;
/**
* 费用类型枚举
*
* @author dengtt
* @date 2020年1月7日14:07:06
*/
public enum FeeTypeEnum {
INSTALLATION_TYPE(1, "安装价"),
DEMOLITION_TYPE(2, "拆除价"),
MAINTENANCE_TYPE(3, "检修价");
private Integer code;
private String name;
FeeTypeEnum(Integer code, String name) {
this.code = code;
this.name = name;
}
public static String getNameByCode(Integer code) {
for (FeeTypeEnum e : values()) {
if (code.equals(e.getCode())) {
return e.getName();
}
}
return null;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
......@@ -100,4 +100,16 @@ public class ReconciliationController {
return ResultObject.of(ResultCodeEnum.SUCCESS);
}
/**
* 获取对账单的价格列表
*/
@AuthCheck
@GetMapping("/priceList")
public ResultObject priceList(@RequestBody @Validated({GroupOperation.class}) ReconciliationQuery query) {
log.info("【对账单——查询对账单的价格列表】请求参数:{}", JSON.toJSONString(query, true));
ReconciliationPriceListVO vo = reconciliationService.queryPriceList(query);
log.info("【对账单——查询对账单的价格列表】响应数据:{}", JSON.toJSONString(vo, true));
return ResultObject.of(ResultCodeEnum.SUCCESS, vo);
}
}
package com.glsx.ordercenter.dto;
import java.math.BigDecimal;
import java.util.List;
public class ReconciliationPriceListItem {
private String serviceCode;
private String serviceName;
private List<ServiceItemPrice> priceList;
public String getServiceCode() {
return serviceCode;
}
public void setServiceCode(String serviceCode) {
this.serviceCode = serviceCode;
}
public String getServiceName() {
return serviceName;
}
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
public List<ServiceItemPrice> getPriceList() {
return priceList;
}
public void setPriceList(List<ServiceItemPrice> priceList) {
this.priceList = priceList;
}
public static class ServiceItemPrice {
private Integer feeType;
private String feeTypeName;
private BigDecimal serviceFee;
public Integer getFeeType() {
return feeType;
}
public void setFeeType(Integer feeType) {
this.feeType = feeType;
}
public String getFeeTypeName() {
return feeTypeName;
}
public void setFeeTypeName(String feeTypeName) {
this.feeTypeName = feeTypeName;
}
public BigDecimal getServiceFee() {
return serviceFee;
}
public void setServiceFee(BigDecimal serviceFee) {
this.serviceFee = serviceFee;
}
}
}
package com.glsx.ordercenter.dto;
import java.util.List;
/**
* 对账单生成时,采用的价格表.展示实体.
*/
public class ReconciliationPriceListVO {
private String reconciliationSn; //对账单号
private Integer userId; // 用户id
private Integer userType; // 用户类型
private List<ReconciliationPriceListItem> itemList; // 具体数据
public String getReconciliationSn() {
return reconciliationSn;
}
public void setReconciliationSn(String reconciliationSn) {
this.reconciliationSn = reconciliationSn;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public Integer getUserType() {
return userType;
}
public void setUserType(Integer userType) {
this.userType = userType;
}
public List<ReconciliationPriceListItem> getItemList() {
return itemList;
}
public void setItemList(List<ReconciliationPriceListItem> itemList) {
this.itemList = itemList;
}
}
package com.glsx.ordercenter.mapper;
import com.glsx.ordercenter.pojo.SysUserServiceFeeHistory;
import java.util.List;
public interface SysUserServiceFeeHistoryMapper {
int deleteByPrimaryKey(Integer id);
int insert(SysUserServiceFeeHistory record);
int insertSelective(SysUserServiceFeeHistory record);
SysUserServiceFeeHistory selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(SysUserServiceFeeHistory record);
int updateByPrimaryKey(SysUserServiceFeeHistory record);
/**
* 根据“对账单号”获取对应的历史价格记录列表
*/
List<SysUserServiceFeeHistory> selectByReconciliationSn(String reconciliationSn);
}
\ No newline at end of file
package com.glsx.ordercenter.mapper;
import com.glsx.ordercenter.pojo.SysUserServiceFee;
public interface SysUserServiceFeeMapper {
int deleteByPrimaryKey(Integer id);
int insert(SysUserServiceFee record);
int insertSelective(SysUserServiceFee record);
SysUserServiceFee selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(SysUserServiceFee record);
int updateByPrimaryKey(SysUserServiceFee record);
}
\ No newline at end of file
package com.glsx.ordercenter.pojo;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* sys_user_service_fee
* @author
*/
public class SysUserServiceFee implements Serializable {
/**
* 自增id
*/
private Integer id;
/**
* 用户id
*/
private Integer userId;
/**
* 服务编码
*/
private String serviceCode;
/**
* 服务报价
*/
private BigDecimal serviceFee;
/**
* 费用类型(1.安装费、2.拆除费、3.检修费)
*/
private Integer feeType;
/**
* 用户类型(服务商、技工)
*/
private Integer userType;
/**
* 创建时间
*/
private Date createTime;
/**
* 创建人
*/
private Integer createBy;
/**
* 备注
*/
private String remark;
private static final long serialVersionUID = 1L;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getServiceCode() {
return serviceCode;
}
public void setServiceCode(String serviceCode) {
this.serviceCode = serviceCode;
}
public BigDecimal getServiceFee() {
return serviceFee;
}
public void setServiceFee(BigDecimal serviceFee) {
this.serviceFee = serviceFee;
}
public Integer getFeeType() {
return feeType;
}
public void setFeeType(Integer feeType) {
this.feeType = feeType;
}
public Integer getUserType() {
return userType;
}
public void setUserType(Integer userType) {
this.userType = userType;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Integer getCreateBy() {
return createBy;
}
public void setCreateBy(Integer createBy) {
this.createBy = createBy;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
\ No newline at end of file
package com.glsx.ordercenter.pojo;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* sys_user_service_fee_history
* @author
*/
public class SysUserServiceFeeHistory implements Serializable {
/**
* 自增id
*/
private Integer id;
/**
* 用户id
*/
private Integer userId;
/**
* 服务编码
*/
private String serviceCode;
/**
* 服务报价
*/
private BigDecimal serviceFee;
/**
* 费用类型(1.安装费、2.拆除费、3.检修费)
*/
private Integer feeType;
/**
* 用户类型(服务商、技工)
*/
private Integer userType;
/**
* 对账单号(以便查询对账时服务定价)
*/
private String reconciliationSn;
/**
* 创建时间
*/
private Date createTime;
/**
* 创建人
*/
private Integer createBy;
/**
* 备注
*/
private String remark;
private static final long serialVersionUID = 1L;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getServiceCode() {
return serviceCode;
}
public void setServiceCode(String serviceCode) {
this.serviceCode = serviceCode;
}
public BigDecimal getServiceFee() {
return serviceFee;
}
public void setServiceFee(BigDecimal serviceFee) {
this.serviceFee = serviceFee;
}
public Integer getFeeType() {
return feeType;
}
public void setFeeType(Integer feeType) {
this.feeType = feeType;
}
public Integer getUserType() {
return userType;
}
public void setUserType(Integer userType) {
this.userType = userType;
}
public String getReconciliationSn() {
return reconciliationSn;
}
public void setReconciliationSn(String reconciliationSn) {
this.reconciliationSn = reconciliationSn;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Integer getCreateBy() {
return createBy;
}
public void setCreateBy(Integer createBy) {
this.createBy = createBy;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
\ No newline at end of file
......@@ -24,4 +24,9 @@ public interface ReconciliationBaseService {
String getUserPhone(Integer userId);
/**
* 根据服务项的code列表,获取对应的服务项map集合(key:code,value:name)
*/
Map<String, String> getServiceItemNamesByCodes(List<String> codes);
}
package com.glsx.ordercenter.service;
import com.glsx.ordercenter.dto.ReconciliationOperation;
import com.glsx.ordercenter.dto.*;
import java.util.List;
import com.glsx.ordercenter.dto.OrderForReconciliationDto;
import com.glsx.ordercenter.dto.QueryOrderReq;
import com.glsx.ordercenter.dto.ReconciliationQuery;
import com.glsx.ordercenter.dto.ReconciliationSnQuery;
import com.glsx.ordercenter.dto.ReconciliationVO;
/**
* 对账服务类
*
......@@ -31,4 +25,9 @@ public interface ReconciliationService {
void payment(ReconciliationOperation operation);
/**
* 获取生成对账单的对应的价格信息
*/
ReconciliationPriceListVO queryPriceList(ReconciliationQuery query);
}
......@@ -113,4 +113,15 @@ public class ReconciliationBaseServiceImpl implements ReconciliationBaseService
SysUser user = userMapper.selectByPrimaryKey(userId);
return StringUtils.defaultString(user == null ? "" : user.getPhoneNumber());
}
/**
* 根据服务项的code列表,获取对应的服务项的map集合——key:code;value:name.
*/
@Override
public Map<String, String> getServiceItemNamesByCodes(List<String> codes) {
Map<String, String> map = Maps.newHashMap();
if (CollectionUtils.isNotEmpty(codes))
map.putAll(serviceItemMapper.selectListByCodes(codes).stream().collect(Collectors.toMap(SysServiceItem::getServiceCode, SysServiceItem::getServiceName, (key1, key2) -> key2)));
return map;
}
}
......@@ -2,22 +2,30 @@ package com.glsx.ordercenter.service.impl;
import com.github.pagehelper.PageHelper;
import com.glsx.common.utils.DateUtil;
import com.glsx.common.utils.StringUtils;
import com.glsx.ordercenter.constants.FeeTypeEnum;
import com.glsx.ordercenter.constants.ReconciliationStatusEnum;
import com.glsx.ordercenter.dto.*;
import com.glsx.ordercenter.exception.BusinessException;
import com.glsx.ordercenter.mapper.SysOrderMapper;
import com.glsx.ordercenter.mapper.SysReconciliationMapper;
import com.glsx.ordercenter.mapper.SysReconciliationMonthlyMapper;
import com.glsx.ordercenter.mapper.SysUserServiceFeeHistoryMapper;
import com.glsx.ordercenter.pojo.SysReconciliation;
import com.glsx.ordercenter.pojo.SysReconciliationMonthly;
import com.glsx.ordercenter.pojo.SysUserServiceFeeHistory;
import com.glsx.ordercenter.service.ReconciliationBaseService;
import com.glsx.ordercenter.service.ReconciliationService;
import com.google.common.collect.Lists;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 对账单服务实现类
......@@ -41,6 +49,9 @@ public class ReconciliationServiceImpl implements ReconciliationService {
@Resource
private SysOrderMapper sysOrderMapper;
@Resource
private SysUserServiceFeeHistoryMapper userServiceFeeHistoryMapper;
/**
* 根据对账单号获取相应对账信息
*/
......@@ -127,6 +138,52 @@ public class ReconciliationServiceImpl implements ReconciliationService {
}
/**
* 获取生成对账单时的价格列表
*/
@Override
public ReconciliationPriceListVO queryPriceList(ReconciliationQuery query) {
ReconciliationPriceListVO vo = new ReconciliationPriceListVO();
vo.setReconciliationSn(query.getReconciliationSn());
// 准备数据
List<String> codes = Lists.newArrayList();
List<SysUserServiceFeeHistory> historyList = userServiceFeeHistoryMapper.selectByReconciliationSn(query.getReconciliationSn());
if (CollectionUtils.isNotEmpty(historyList))
codes.addAll(historyList.stream().map(SysUserServiceFeeHistory::getServiceCode).collect(Collectors.toList()));
Map<String, String> namesMap = reconciliationBaseService.getServiceItemNamesByCodes(codes);
// 补全数据
complementReconciliationPriceListVO(vo, historyList, namesMap);
return vo;
}
/**
* 补全对账单的价格列表信息
*/
private void complementReconciliationPriceListVO(ReconciliationPriceListVO vo, List<SysUserServiceFeeHistory> historyList, Map<String, String> namesMap) {
if (CollectionUtils.isNotEmpty(historyList)) {
vo.setUserId(historyList.get(0).getUserId());
vo.setUserType(historyList.get(0).getUserType());
}
List<ReconciliationPriceListItem> itemList = Lists.newArrayList();
Map<String, List<SysUserServiceFeeHistory>> collect = historyList.stream().sorted(Comparator.comparing(SysUserServiceFeeHistory::getServiceCode)).collect(Collectors.groupingBy(SysUserServiceFeeHistory::getServiceCode));
collect.forEach((k, v) -> {
ReconciliationPriceListItem item = new ReconciliationPriceListItem();
item.setServiceCode(k);
item.setServiceName(StringUtils.defaultString(namesMap.get(k)));
List<ReconciliationPriceListItem.ServiceItemPrice> itemPrices = Lists.newArrayList();
v.forEach(p -> {
ReconciliationPriceListItem.ServiceItemPrice itemPrice = new ReconciliationPriceListItem.ServiceItemPrice();
itemPrice.setFeeType(p.getFeeType());
itemPrice.setFeeTypeName(FeeTypeEnum.getNameByCode(p.getFeeType()));
itemPrice.setServiceFee(p.getServiceFee());
itemPrices.add(itemPrice);
});
item.setPriceList(itemPrices);
itemList.add(item);
});
vo.setItemList(itemList);
}
/**
* 补全对账单信息
*/
private void complementReconciliationVO(ReconciliationVO vo, SysReconciliation rawData) {
......
<?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.glsx.ordercenter.mapper.SysUserServiceFeeHistoryMapper">
<resultMap id="BaseResultMap" type="com.glsx.ordercenter.pojo.SysUserServiceFeeHistory">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="service_code" jdbcType="VARCHAR" property="serviceCode" />
<result column="service_fee" jdbcType="DECIMAL" property="serviceFee" />
<result column="fee_type" jdbcType="INTEGER" property="feeType" />
<result column="user_type" jdbcType="INTEGER" property="userType" />
<result column="reconciliation_sn" jdbcType="VARCHAR" property="reconciliationSn" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="create_by" jdbcType="INTEGER" property="createBy" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Base_Column_List">
id, user_id, service_code, service_fee, fee_type, user_type, reconciliation_sn, create_time,
create_by, remark
</sql>
<select id="selectByReconciliationSn" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from
sys_user_service_fee_history
where
reconciliation_sn = #{reconciliationSn}
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_user_service_fee_history
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from sys_user_service_fee_history
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.glsx.ordercenter.pojo.SysUserServiceFeeHistory" useGeneratedKeys="true">
insert into sys_user_service_fee_history (user_id, service_code, service_fee,
fee_type, user_type, reconciliation_sn,
create_time, create_by, remark
)
values (#{userId,jdbcType=INTEGER}, #{serviceCode,jdbcType=VARCHAR}, #{serviceFee,jdbcType=DECIMAL},
#{feeType,jdbcType=INTEGER}, #{userType,jdbcType=INTEGER}, #{reconciliationSn,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.glsx.ordercenter.pojo.SysUserServiceFeeHistory" useGeneratedKeys="true">
insert into sys_user_service_fee_history
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="serviceCode != null">
service_code,
</if>
<if test="serviceFee != null">
service_fee,
</if>
<if test="feeType != null">
fee_type,
</if>
<if test="userType != null">
user_type,
</if>
<if test="reconciliationSn != null">
reconciliation_sn,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="serviceCode != null">
#{serviceCode,jdbcType=VARCHAR},
</if>
<if test="serviceFee != null">
#{serviceFee,jdbcType=DECIMAL},
</if>
<if test="feeType != null">
#{feeType,jdbcType=INTEGER},
</if>
<if test="userType != null">
#{userType,jdbcType=INTEGER},
</if>
<if test="reconciliationSn != null">
#{reconciliationSn,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createBy != null">
#{createBy,jdbcType=INTEGER},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.glsx.ordercenter.pojo.SysUserServiceFeeHistory">
update sys_user_service_fee_history
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="serviceCode != null">
service_code = #{serviceCode,jdbcType=VARCHAR},
</if>
<if test="serviceFee != null">
service_fee = #{serviceFee,jdbcType=DECIMAL},
</if>
<if test="feeType != null">
fee_type = #{feeType,jdbcType=INTEGER},
</if>
<if test="userType != null">
user_type = #{userType,jdbcType=INTEGER},
</if>
<if test="reconciliationSn != null">
reconciliation_sn = #{reconciliationSn,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=INTEGER},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.glsx.ordercenter.pojo.SysUserServiceFeeHistory">
update sys_user_service_fee_history
set user_id = #{userId,jdbcType=INTEGER},
service_code = #{serviceCode,jdbcType=VARCHAR},
service_fee = #{serviceFee,jdbcType=DECIMAL},
fee_type = #{feeType,jdbcType=INTEGER},
user_type = #{userType,jdbcType=INTEGER},
reconciliation_sn = #{reconciliationSn,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_by = #{createBy,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?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.glsx.ordercenter.mapper.SysUserServiceFeeMapper">
<resultMap id="BaseResultMap" type="com.glsx.ordercenter.pojo.SysUserServiceFee">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="service_code" jdbcType="VARCHAR" property="serviceCode" />
<result column="service_fee" jdbcType="DECIMAL" property="serviceFee" />
<result column="fee_type" jdbcType="INTEGER" property="feeType" />
<result column="user_type" jdbcType="INTEGER" property="userType" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="create_by" jdbcType="INTEGER" property="createBy" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Base_Column_List">
id, user_id, service_code, service_fee, fee_type, user_type, create_time, create_by,
remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_user_service_fee
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from sys_user_service_fee
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.glsx.ordercenter.pojo.SysUserServiceFee" useGeneratedKeys="true">
insert into sys_user_service_fee (user_id, service_code, service_fee,
fee_type, user_type, create_time,
create_by, remark)
values (#{userId,jdbcType=INTEGER}, #{serviceCode,jdbcType=VARCHAR}, #{serviceFee,jdbcType=DECIMAL},
#{feeType,jdbcType=INTEGER}, #{userType,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{createBy,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.glsx.ordercenter.pojo.SysUserServiceFee" useGeneratedKeys="true">
insert into sys_user_service_fee
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="serviceCode != null">
service_code,
</if>
<if test="serviceFee != null">
service_fee,
</if>
<if test="feeType != null">
fee_type,
</if>
<if test="userType != null">
user_type,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="serviceCode != null">
#{serviceCode,jdbcType=VARCHAR},
</if>
<if test="serviceFee != null">
#{serviceFee,jdbcType=DECIMAL},
</if>
<if test="feeType != null">
#{feeType,jdbcType=INTEGER},
</if>
<if test="userType != null">
#{userType,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createBy != null">
#{createBy,jdbcType=INTEGER},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.glsx.ordercenter.pojo.SysUserServiceFee">
update sys_user_service_fee
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="serviceCode != null">
service_code = #{serviceCode,jdbcType=VARCHAR},
</if>
<if test="serviceFee != null">
service_fee = #{serviceFee,jdbcType=DECIMAL},
</if>
<if test="feeType != null">
fee_type = #{feeType,jdbcType=INTEGER},
</if>
<if test="userType != null">
user_type = #{userType,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=INTEGER},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.glsx.ordercenter.pojo.SysUserServiceFee">
update sys_user_service_fee
set user_id = #{userId,jdbcType=INTEGER},
service_code = #{serviceCode,jdbcType=VARCHAR},
service_fee = #{serviceFee,jdbcType=DECIMAL},
fee_type = #{feeType,jdbcType=INTEGER},
user_type = #{userType,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_by = #{createBy,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!