From d913a793a291f75dd7ba4fde9ed6707daee416b2 Mon Sep 17 00:00:00 2001 From: Burce Date: Tue, 13 Aug 2019 15:45:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E5=91=98=E7=A7=AF=E5=88=86=E5=80=8D?= =?UTF-8?q?=E7=8E=87=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/service/impl/WxLevelConfigServiceImpl.java | 2 ++ .../src/main/resources/mapper/WxLevelConfigMapper.xml | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxLevelConfigServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxLevelConfigServiceImpl.java index 3f4e1208b..90baa0c1e 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxLevelConfigServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxLevelConfigServiceImpl.java @@ -17,6 +17,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.iformall.common.IdWorker; +import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.Date; @@ -133,6 +134,7 @@ public class WxLevelConfigServiceImpl implements WxLevelConfigService { } } + @Transactional(rollbackFor = {Exception.class}) @Override public void batchSave(String tenantId, List records) { final IdWorker idWorker = IdWorker.get(); diff --git a/mallinkService/src/main/resources/mapper/WxLevelConfigMapper.xml b/mallinkService/src/main/resources/mapper/WxLevelConfigMapper.xml index 8a8de4d02..76b90d563 100644 --- a/mallinkService/src/main/resources/mapper/WxLevelConfigMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxLevelConfigMapper.xml @@ -11,10 +11,11 @@ + - `id`, `tenant_id`, `points`, `level`, `description`, `create_date`, `update_date`, `discount_enable`, `capability` + `id`, `tenant_id`, `points`, `level`, `description`, `create_date`, `update_date`, `discount_enable`, `capability`,`scale` @@ -71,7 +72,7 @@ insert into wx_level_config (id, tenant_id, points, level, description, create_date, update_date, - discount_enable, capability) values + discount_enable, capability,scale) values (#{item.id,jdbcType=BIGINT}, #{item.tenantId,jdbcType=VARCHAR}, @@ -81,7 +82,8 @@ #{item.createDate,jdbcType=TIMESTAMP}, #{item.updateDate,jdbcType=TIMESTAMP}, #{item.discountEnable,jdbcType=SMALLINT}, - #{item.capability,jdbcType=VARCHAR}) + #{item.capability,jdbcType=VARCHAR}, + #{item.scale,jdbcType=INTEGER}) @@ -96,6 +98,7 @@ `update_date` = #{item.updateDate}, `discount_enable` = #{item.discountEnable}, `capability` = #{item.capability}, + `scale` = #{item.scale}, where id = ${item.id}