Browse Source

会员积分倍率 update

release_toaliyun_real
Burce 6 years ago
parent
commit
d913a793a2
2 changed files with 8 additions and 3 deletions
  1. +2
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxLevelConfigServiceImpl.java
  2. +6
    -3
      mallinkService/src/main/resources/mapper/WxLevelConfigMapper.xml

+ 2
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxLevelConfigServiceImpl.java View File

@@ -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<WxLevelConfig> records) {
final IdWorker idWorker = IdWorker.get();


+ 6
- 3
mallinkService/src/main/resources/mapper/WxLevelConfigMapper.xml View File

@@ -11,10 +11,11 @@
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="discount_enable" jdbcType="SMALLINT" property="discountEnable"/>
<result column="capability" jdbcType="VARCHAR" property="capability"/>
<result column="scale" jdbcType="INTEGER" property="scale"/>
</resultMap>

<sql id="allColumns">
`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`
</sql>

<sql id="dynamicWhereConditions">
@@ -71,7 +72,7 @@

<insert id="insertBatch" parameterType="java.util.List">
insert into wx_level_config (id, tenant_id, points, level, description, create_date, update_date,
discount_enable, capability) values
discount_enable, capability,scale) values
<foreach collection="list" item="item" index="index" separator=",">
(#{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})
</foreach>
</insert>

@@ -96,6 +98,7 @@
<if test=" null != item.updateDate ">`update_date` = #{item.updateDate},</if>
<if test=" null != item.discountEnable ">`discount_enable` = #{item.discountEnable},</if>
<if test=" null != item.capability ">`capability` = #{item.capability},</if>
<if test=" null != item.scale ">`scale` = #{item.scale},</if>
</set>
where id = ${item.id}
</foreach>


Loading…
Cancel
Save