修复主键重名问题

This commit is contained in:
zhh 2018-04-17 14:14:38 +08:00
parent d74b7c2b57
commit 390132d9e8
67 changed files with 580 additions and 694 deletions

View File

@ -13,6 +13,8 @@ import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List;
/** /**
* 品牌功能Controller * 品牌功能Controller
*/ */
@ -54,7 +56,7 @@ public class PmsBrandController {
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
@ResponseBody @ResponseBody
public Object updateBrand(@PathVariable("id") Long id, @Validated @RequestBody PmsBrandParam pmsBrandParam, BindingResult result) { public Object updateBrand(@PathVariable("id") Long id, @Validated @RequestBody PmsBrandParam pmsBrandParam, BindingResult result) {
if(result.hasErrors()){ if (result.hasErrors()) {
return new CommonResult().validateFailed(result.getFieldError().getDefaultMessage()); return new CommonResult().validateFailed(result.getFieldError().getDefaultMessage());
} }
CommonResult commonResult; CommonResult commonResult;
@ -75,20 +77,21 @@ public class PmsBrandController {
public Object deleteBrand(@PathVariable("id") Long id) { public Object deleteBrand(@PathVariable("id") Long id) {
int count = brandService.deleteBrand(id); int count = brandService.deleteBrand(id);
if (count == 1) { if (count == 1) {
LOGGER.debug("deleteBrand success :id={}", id); LOGGER.debug("deleteBrand success:id={}", id);
return new CommonResult().success(null); return new CommonResult().success(null);
} else { } else {
LOGGER.debug("deleteBrand failed :id={}", id); LOGGER.debug("deleteBrand failed:id={}", id);
return new CommonResult().failed(); return new CommonResult().failed();
} }
} }
@ApiOperation(value = "分页获取品牌列表") @ApiOperation(value = "根据品牌名称分页获取品牌列表")
@RequestMapping(value = "/list", method = RequestMethod.GET) @RequestMapping(value = "/list", method = RequestMethod.GET)
@ResponseBody @ResponseBody
public Object listBrand(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, public Object listBrand(@RequestParam(value = "keyword", required = false) String keyword,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(value = "pageSize", defaultValue = "3") Integer pageSize) { @RequestParam(value = "pageSize", defaultValue = "3") Integer pageSize) {
return new CommonResult().pageSuccess(brandService.listBrand(pageNum, pageSize)); return new CommonResult().pageSuccess(brandService.listBrand(keyword, pageNum, pageSize));
} }
@ApiOperation(value = "根据编号查询品牌信息") @ApiOperation(value = "根据编号查询品牌信息")
@ -97,4 +100,32 @@ public class PmsBrandController {
public Object getBrand(@PathVariable("id") Long id) { public Object getBrand(@PathVariable("id") Long id) {
return new CommonResult().success(brandService.getBrand(id)); return new CommonResult().success(brandService.getBrand(id));
} }
@ApiOperation(value = "批量删除品牌")
@RequestMapping(value = "/delete/batch", method = RequestMethod.POST)
@ResponseBody
public Object deleteBrandBatch(@RequestParam("ids") List<Long> ids) {
int count = brandService.deleteBrand(ids);
if (count > 0) {
LOGGER.debug("deleteBrandBatch success:ids={}", ids);
return new CommonResult().success(count);
} else {
LOGGER.debug("deleteBrandBatch failed:ids={}", ids);
return new CommonResult().failed();
}
}
@ApiOperation(value = "批量更新显示状态")
@RequestMapping(value = "/update/showStatus", method = RequestMethod.POST)
@ResponseBody
public Object updateShowStatus(@RequestParam("ids") List<Long> ids, @RequestParam("showStatus") Integer showStatus) {
int count = brandService.updateShowStatus(ids, showStatus);
if (count > 0) {
LOGGER.debug("updateShowStatus success:ids={}", ids);
return new CommonResult().success(count);
} else {
LOGGER.debug("updateShowStatus failed:ids={}", ids);
return new CommonResult().failed();
}
}
} }

View File

@ -17,7 +17,11 @@ public interface PmsBrandService {
int deleteBrand(Long id); int deleteBrand(Long id);
List<PmsBrand> listBrand(int pageNum, int pageSize); int deleteBrand(List<Long> ids);
List<PmsBrand> listBrand(String keyword,int pageNum, int pageSize);
PmsBrand getBrand(Long id); PmsBrand getBrand(Long id);
int updateShowStatus(List<Long> ids, Integer showStatus);
} }

View File

@ -9,6 +9,7 @@ import com.macro.mall.service.PmsBrandService;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import java.util.List; import java.util.List;
@ -29,6 +30,10 @@ public class PmsBrandServiceImpl implements PmsBrandService{
public int createBrand(PmsBrandParam pmsBrandParam) { public int createBrand(PmsBrandParam pmsBrandParam) {
PmsBrand pmsBrand = new PmsBrand(); PmsBrand pmsBrand = new PmsBrand();
BeanUtils.copyProperties(pmsBrandParam,pmsBrand); BeanUtils.copyProperties(pmsBrandParam,pmsBrand);
//如果创建时首字母为空取名称的第一个为首字母
if(StringUtils.isEmpty(pmsBrand.getFirstLetter())){
pmsBrand.setFirstLetter(pmsBrand.getName().substring(0,1));
}
return brandMapper.insertSelective(pmsBrand); return brandMapper.insertSelective(pmsBrand);
} }
@ -37,6 +42,10 @@ public class PmsBrandServiceImpl implements PmsBrandService{
PmsBrand pmsBrand = new PmsBrand(); PmsBrand pmsBrand = new PmsBrand();
BeanUtils.copyProperties(pmsBrandParam,pmsBrand); BeanUtils.copyProperties(pmsBrandParam,pmsBrand);
pmsBrand.setId(id); pmsBrand.setId(id);
//如果创建时首字母为空取名称的第一个为首字母
if(StringUtils.isEmpty(pmsBrand.getFirstLetter())){
pmsBrand.setFirstLetter(pmsBrand.getName().substring(0,1));
}
return brandMapper.updateByPrimaryKeySelective(pmsBrand); return brandMapper.updateByPrimaryKeySelective(pmsBrand);
} }
@ -46,13 +55,33 @@ public class PmsBrandServiceImpl implements PmsBrandService{
} }
@Override @Override
public List<PmsBrand> listBrand(int pageNum, int pageSize) { public int deleteBrand(List<Long> ids) {
PmsBrandExample pmsBrandExample = new PmsBrandExample();
pmsBrandExample.createCriteria().andIdIn(ids);
return brandMapper.deleteByExample(pmsBrandExample);
}
@Override
public List<PmsBrand> listBrand(String keyword,int pageNum, int pageSize) {
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
return brandMapper.selectByExample(new PmsBrandExample()); PmsBrandExample pmsBrandExample = new PmsBrandExample();
if(!StringUtils.isEmpty(keyword)){
pmsBrandExample.createCriteria().andNameLike("%"+keyword+"%");
}
return brandMapper.selectByExample(pmsBrandExample);
} }
@Override @Override
public PmsBrand getBrand(Long id) { public PmsBrand getBrand(Long id) {
return brandMapper.selectByPrimaryKey(id); return brandMapper.selectByPrimaryKey(id);
} }
@Override
public int updateShowStatus(List<Long> ids, Integer showStatus) {
PmsBrand pmsBrand = new PmsBrand();
pmsBrand.setShowStatus(showStatus);
PmsBrandExample pmsBrandExample = new PmsBrandExample();
pmsBrandExample.createCriteria().andIdIn(ids);
return brandMapper.updateByExampleSelective(pmsBrand,pmsBrandExample);
}
} }

View File

@ -101,23 +101,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.CmsHelpCategory"> <insert id="insert" parameterType="com.macro.mall.model.CmsHelpCategory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_help_category (id, name, icon, insert into cms_help_category (name, icon, help_count,
help_count, show_status, sort show_status, sort)
) values (#{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{helpCount,jdbcType=INTEGER},
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
#{helpCount,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.CmsHelpCategory"> <insert id="insertSelective" parameterType="com.macro.mall.model.CmsHelpCategory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_help_category insert into cms_help_category
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
@ -135,7 +132,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>

View File

@ -126,23 +126,22 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.CmsHelp"> <insert id="insert" parameterType="com.macro.mall.model.CmsHelp">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_help (id, category_id, icon, insert into cms_help (category_id, icon, title,
title, show_status, create_time, show_status, create_time, read_count,
read_count, content) content)
values (#{id,jdbcType=BIGINT}, #{categoryId,jdbcType=BIGINT}, #{icon,jdbcType=VARCHAR}, values (#{categoryId,jdbcType=BIGINT}, #{icon,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
#{title,jdbcType=VARCHAR}, #{showStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{showStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{readCount,jdbcType=INTEGER},
#{readCount,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR}) #{content,jdbcType=LONGVARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.CmsHelp"> <insert id="insertSelective" parameterType="com.macro.mall.model.CmsHelp">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_help insert into cms_help
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="categoryId != null"> <if test="categoryId != null">
category_id, category_id,
</if> </if>
@ -166,7 +165,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="categoryId != null"> <if test="categoryId != null">
#{categoryId,jdbcType=BIGINT}, #{categoryId,jdbcType=BIGINT},
</if> </if>

View File

@ -94,23 +94,22 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.CmsMemberReport"> <insert id="insert" parameterType="com.macro.mall.model.CmsMemberReport">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_member_report (id, report_type, report_member_name, insert into cms_member_report (report_type, report_member_name, create_time,
create_time, report_object, report_status, report_object, report_status, handle_status,
handle_status, note) note)
values (#{id,jdbcType=BIGINT}, #{reportType,jdbcType=INTEGER}, #{reportMemberName,jdbcType=VARCHAR}, values (#{reportType,jdbcType=INTEGER}, #{reportMemberName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{createTime,jdbcType=TIMESTAMP}, #{reportObject,jdbcType=VARCHAR}, #{reportStatus,jdbcType=INTEGER}, #{reportObject,jdbcType=VARCHAR}, #{reportStatus,jdbcType=INTEGER}, #{handleStatus,jdbcType=INTEGER},
#{handleStatus,jdbcType=INTEGER}, #{note,jdbcType=VARCHAR}) #{note,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.CmsMemberReport"> <insert id="insertSelective" parameterType="com.macro.mall.model.CmsMemberReport">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_member_report insert into cms_member_report
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="reportType != null"> <if test="reportType != null">
report_type, report_type,
</if> </if>
@ -134,7 +133,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="reportType != null"> <if test="reportType != null">
#{reportType,jdbcType=INTEGER}, #{reportType,jdbcType=INTEGER},
</if> </if>

View File

@ -124,23 +124,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.CmsPrefrenceArea"> <insert id="insert" parameterType="com.macro.mall.model.CmsPrefrenceArea">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_prefrence_area (id, name, sub_title, insert into cms_prefrence_area (name, sub_title, sort,
sort, show_status, pic show_status, pic)
) values (#{name,jdbcType=VARCHAR}, #{subTitle,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{subTitle,jdbcType=VARCHAR}, #{showStatus,jdbcType=INTEGER}, #{pic,jdbcType=VARBINARY})
#{sort,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER}, #{pic,jdbcType=VARBINARY}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.CmsPrefrenceArea"> <insert id="insertSelective" parameterType="com.macro.mall.model.CmsPrefrenceArea">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_prefrence_area insert into cms_prefrence_area
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
@ -158,7 +155,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>

View File

@ -98,21 +98,18 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.CmsPrefrenceAreaProductRelation"> <insert id="insert" parameterType="com.macro.mall.model.CmsPrefrenceAreaProductRelation">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_prefrence_area_product_relation (id, prefrence_area_id, product_id insert into cms_prefrence_area_product_relation (prefrence_area_id, product_id)
) values (#{prefrenceAreaId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT})
values (#{id,jdbcType=BIGINT}, #{prefrenceAreaId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.CmsPrefrenceAreaProductRelation"> <insert id="insertSelective" parameterType="com.macro.mall.model.CmsPrefrenceAreaProductRelation">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_prefrence_area_product_relation insert into cms_prefrence_area_product_relation
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="prefrenceAreaId != null"> <if test="prefrenceAreaId != null">
prefrence_area_id, prefrence_area_id,
</if> </if>
@ -121,7 +118,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="prefrenceAreaId != null"> <if test="prefrenceAreaId != null">
#{prefrenceAreaId,jdbcType=BIGINT}, #{prefrenceAreaId,jdbcType=BIGINT},
</if> </if>

View File

@ -101,23 +101,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.CmsSubjectCategory"> <insert id="insert" parameterType="com.macro.mall.model.CmsSubjectCategory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_subject_category (id, name, icon, insert into cms_subject_category (name, icon, subject_count,
subject_count, show_status, sort show_status, sort)
) values (#{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{subjectCount,jdbcType=INTEGER},
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
#{subjectCount,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.CmsSubjectCategory"> <insert id="insertSelective" parameterType="com.macro.mall.model.CmsSubjectCategory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_subject_category insert into cms_subject_category
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
@ -135,7 +132,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>

View File

@ -102,23 +102,22 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.CmsSubjectComment"> <insert id="insert" parameterType="com.macro.mall.model.CmsSubjectComment">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_subject_comment (id, subject_id, member_nick_name, insert into cms_subject_comment (subject_id, member_nick_name, member_icon,
member_icon, content, create_time, content, create_time, show_status
show_status) )
values (#{id,jdbcType=BIGINT}, #{subjectId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, values (#{subjectId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, #{memberIcon,jdbcType=VARCHAR},
#{memberIcon,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{showStatus,jdbcType=INTEGER}
#{showStatus,jdbcType=INTEGER}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.CmsSubjectComment"> <insert id="insertSelective" parameterType="com.macro.mall.model.CmsSubjectComment">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_subject_comment insert into cms_subject_comment
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="subjectId != null"> <if test="subjectId != null">
subject_id, subject_id,
</if> </if>
@ -139,7 +138,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="subjectId != null"> <if test="subjectId != null">
#{subjectId,jdbcType=BIGINT}, #{subjectId,jdbcType=BIGINT},
</if> </if>

View File

@ -134,29 +134,26 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.CmsSubject"> <insert id="insert" parameterType="com.macro.mall.model.CmsSubject">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_subject (id, category_id, title, insert into cms_subject (category_id, title, pic,
pic, product_count, recommend_status, product_count, recommend_status, create_time,
create_time, collect_count, read_count, collect_count, read_count, comment_count,
comment_count, album_pics, description, album_pics, description, show_status,
show_status, forward_count, content forward_count, content)
) values (#{categoryId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR},
values (#{id,jdbcType=BIGINT}, #{categoryId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, #{productCount,jdbcType=INTEGER}, #{recommendStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{pic,jdbcType=VARCHAR}, #{productCount,jdbcType=INTEGER}, #{recommendStatus,jdbcType=INTEGER}, #{collectCount,jdbcType=INTEGER}, #{readCount,jdbcType=INTEGER}, #{commentCount,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{collectCount,jdbcType=INTEGER}, #{readCount,jdbcType=INTEGER}, #{albumPics,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{showStatus,jdbcType=INTEGER},
#{commentCount,jdbcType=INTEGER}, #{albumPics,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{forwardCount,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR})
#{showStatus,jdbcType=INTEGER}, #{forwardCount,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.CmsSubject"> <insert id="insertSelective" parameterType="com.macro.mall.model.CmsSubject">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_subject insert into cms_subject
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="categoryId != null"> <if test="categoryId != null">
category_id, category_id,
</if> </if>
@ -201,7 +198,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="categoryId != null"> <if test="categoryId != null">
#{categoryId,jdbcType=BIGINT}, #{categoryId,jdbcType=BIGINT},
</if> </if>

View File

@ -98,21 +98,18 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.CmsSubjectProductRelation"> <insert id="insert" parameterType="com.macro.mall.model.CmsSubjectProductRelation">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_subject_product_relation (id, subject_id, product_id insert into cms_subject_product_relation (subject_id, product_id)
) values (#{subjectId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT})
values (#{id,jdbcType=BIGINT}, #{subjectId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.CmsSubjectProductRelation"> <insert id="insertSelective" parameterType="com.macro.mall.model.CmsSubjectProductRelation">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_subject_product_relation insert into cms_subject_product_relation
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="subjectId != null"> <if test="subjectId != null">
subject_id, subject_id,
</if> </if>
@ -121,7 +118,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="subjectId != null"> <if test="subjectId != null">
#{subjectId,jdbcType=BIGINT}, #{subjectId,jdbcType=BIGINT},
</if> </if>

View File

@ -101,23 +101,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.CmsTopicCategory"> <insert id="insert" parameterType="com.macro.mall.model.CmsTopicCategory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_topic_category (id, name, icon, insert into cms_topic_category (name, icon, subject_count,
subject_count, show_status, sort show_status, sort)
) values (#{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{subjectCount,jdbcType=INTEGER},
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
#{subjectCount,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.CmsTopicCategory"> <insert id="insertSelective" parameterType="com.macro.mall.model.CmsTopicCategory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_topic_category insert into cms_topic_category
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
@ -135,7 +132,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>

View File

@ -102,23 +102,22 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.CmsTopicComment"> <insert id="insert" parameterType="com.macro.mall.model.CmsTopicComment">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_topic_comment (id, member_nick_name, topic_id, insert into cms_topic_comment (member_nick_name, topic_id, member_icon,
member_icon, content, create_time, content, create_time, show_status
show_status) )
values (#{id,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, #{topicId,jdbcType=BIGINT}, values (#{memberNickName,jdbcType=VARCHAR}, #{topicId,jdbcType=BIGINT}, #{memberIcon,jdbcType=VARCHAR},
#{memberIcon,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{showStatus,jdbcType=INTEGER}
#{showStatus,jdbcType=INTEGER}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.CmsTopicComment"> <insert id="insertSelective" parameterType="com.macro.mall.model.CmsTopicComment">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_topic_comment insert into cms_topic_comment
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberNickName != null"> <if test="memberNickName != null">
member_nick_name, member_nick_name,
</if> </if>
@ -139,7 +138,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberNickName != null"> <if test="memberNickName != null">
#{memberNickName,jdbcType=VARCHAR}, #{memberNickName,jdbcType=VARCHAR},
</if> </if>

View File

@ -131,27 +131,24 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.CmsTopic"> <insert id="insert" parameterType="com.macro.mall.model.CmsTopic">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_topic (id, category_id, name, insert into cms_topic (category_id, name, create_time,
create_time, start_time, end_time, start_time, end_time, attend_count,
attend_count, attention_count, read_count, attention_count, read_count, award_name,
award_name, attend_type, content attend_type, content)
) values (#{categoryId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
values (#{id,jdbcType=BIGINT}, #{categoryId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{attendCount,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{attentionCount,jdbcType=INTEGER}, #{readCount,jdbcType=INTEGER}, #{awardName,jdbcType=VARCHAR},
#{attendCount,jdbcType=INTEGER}, #{attentionCount,jdbcType=INTEGER}, #{readCount,jdbcType=INTEGER}, #{attendType,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR})
#{awardName,jdbcType=VARCHAR}, #{attendType,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.CmsTopic"> <insert id="insertSelective" parameterType="com.macro.mall.model.CmsTopic">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into cms_topic insert into cms_topic
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="categoryId != null"> <if test="categoryId != null">
category_id, category_id,
</if> </if>
@ -187,7 +184,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="categoryId != null"> <if test="categoryId != null">
#{categoryId,jdbcType=BIGINT}, #{categoryId,jdbcType=BIGINT},
</if> </if>

View File

@ -104,25 +104,22 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.OmsCompanyAddress"> <insert id="insert" parameterType="com.macro.mall.model.OmsCompanyAddress">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into oms_company_address (id, address_name, send_status, insert into oms_company_address (address_name, send_status, receive_status,
receive_status, name, phone, name, phone, province,
province, city, region city, region)
) values (#{addressName,jdbcType=VARCHAR}, #{sendStatus,jdbcType=INTEGER}, #{receiveStatus,jdbcType=INTEGER},
values (#{id,jdbcType=BIGINT}, #{addressName,jdbcType=VARCHAR}, #{sendStatus,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR},
#{receiveStatus,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{region,jdbcType=VARCHAR})
#{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{region,jdbcType=VARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.OmsCompanyAddress"> <insert id="insertSelective" parameterType="com.macro.mall.model.OmsCompanyAddress">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into oms_company_address insert into oms_company_address
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="addressName != null"> <if test="addressName != null">
address_name, address_name,
</if> </if>
@ -149,7 +146,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="addressName != null"> <if test="addressName != null">
#{addressName,jdbcType=VARCHAR}, #{addressName,jdbcType=VARCHAR},
</if> </if>

View File

@ -110,27 +110,26 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.OmsOrderItem"> <insert id="insert" parameterType="com.macro.mall.model.OmsOrderItem">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into oms_order_item (id, order_id, order_sn, insert into oms_order_item (order_id, order_sn, product_id,
product_id, proudct_pic, product_name, proudct_pic, product_name, product_brand,
product_brand, product_sn, product_amount, product_sn, product_amount, product_count,
product_count, product_real_amount, sp1, product_real_amount, sp1, sp2,
sp2, sp3) sp3)
values (#{id,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT}, #{orderSn,jdbcType=VARCHAR}, values (#{orderId,jdbcType=BIGINT}, #{orderSn,jdbcType=VARCHAR}, #{productId,jdbcType=BIGINT},
#{productId,jdbcType=BIGINT}, #{proudctPic,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR}, #{proudctPic,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR}, #{productBrand,jdbcType=VARCHAR},
#{productBrand,jdbcType=VARCHAR}, #{productSn,jdbcType=VARCHAR}, #{productAmount,jdbcType=DECIMAL}, #{productSn,jdbcType=VARCHAR}, #{productAmount,jdbcType=DECIMAL}, #{productCount,jdbcType=INTEGER},
#{productCount,jdbcType=INTEGER}, #{productRealAmount,jdbcType=DECIMAL}, #{sp1,jdbcType=VARCHAR}, #{productRealAmount,jdbcType=DECIMAL}, #{sp1,jdbcType=VARCHAR}, #{sp2,jdbcType=VARCHAR},
#{sp2,jdbcType=VARCHAR}, #{sp3,jdbcType=VARCHAR}) #{sp3,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.OmsOrderItem"> <insert id="insertSelective" parameterType="com.macro.mall.model.OmsOrderItem">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into oms_order_item insert into oms_order_item
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="orderId != null"> <if test="orderId != null">
order_id, order_id,
</if> </if>
@ -172,7 +171,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="orderId != null"> <if test="orderId != null">
#{orderId,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT},
</if> </if>

View File

@ -136,43 +136,40 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.OmsOrder"> <insert id="insert" parameterType="com.macro.mall.model.OmsOrder">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into oms_order (id, member_id, coupon_id, insert into oms_order (member_id, coupon_id, order_sn,
order_sn, create_time, member_username, create_time, member_username, total_amount,
total_amount, freight_amount, promotion_amount, freight_amount, promotion_amount, integration_amount,
integration_amount, coupon_amount, discount_amount, coupon_amount, discount_amount, pay_type,
pay_type, source_type, status, source_type, status, order_type,
order_type, delivery_company, delivery_sn, delivery_company, delivery_sn, auto_confirm_day,
auto_confirm_day, integration, growth, integration, growth, promotion_info,
promotion_info, bill_type, bill_header, bill_type, bill_header, bill_content,
bill_content, bill_receiver_phone, bill_receiver_email, bill_receiver_phone, bill_receiver_email, receiver_name,
receiver_name, receiver_phone, receiver_post_code, receiver_phone, receiver_post_code, receiver_province,
receiver_province, receiver_city, receiver_region, receiver_city, receiver_region, receiver_detail_address,
receiver_detail_address, note, confirm_status note, confirm_status)
) values (#{memberId,jdbcType=BIGINT}, #{couponId,jdbcType=BIGINT}, #{orderSn,jdbcType=VARCHAR},
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{couponId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{memberUsername,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL},
#{orderSn,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{memberUsername,jdbcType=VARCHAR}, #{freightAmount,jdbcType=DECIMAL}, #{promotionAmount,jdbcType=DECIMAL}, #{integrationAmount,jdbcType=DECIMAL},
#{totalAmount,jdbcType=DECIMAL}, #{freightAmount,jdbcType=DECIMAL}, #{promotionAmount,jdbcType=DECIMAL}, #{couponAmount,jdbcType=DECIMAL}, #{discountAmount,jdbcType=DECIMAL}, #{payType,jdbcType=INTEGER},
#{integrationAmount,jdbcType=DECIMAL}, #{couponAmount,jdbcType=DECIMAL}, #{discountAmount,jdbcType=DECIMAL}, #{sourceType,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{orderType,jdbcType=INTEGER},
#{payType,jdbcType=INTEGER}, #{sourceType,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{deliveryCompany,jdbcType=VARCHAR}, #{deliverySn,jdbcType=VARCHAR}, #{autoConfirmDay,jdbcType=INTEGER},
#{orderType,jdbcType=INTEGER}, #{deliveryCompany,jdbcType=VARCHAR}, #{deliverySn,jdbcType=VARCHAR}, #{integration,jdbcType=INTEGER}, #{growth,jdbcType=INTEGER}, #{promotionInfo,jdbcType=VARCHAR},
#{autoConfirmDay,jdbcType=INTEGER}, #{integration,jdbcType=INTEGER}, #{growth,jdbcType=INTEGER}, #{billType,jdbcType=INTEGER}, #{billHeader,jdbcType=VARCHAR}, #{billContent,jdbcType=VARCHAR},
#{promotionInfo,jdbcType=VARCHAR}, #{billType,jdbcType=INTEGER}, #{billHeader,jdbcType=VARCHAR}, #{billReceiverPhone,jdbcType=VARCHAR}, #{billReceiverEmail,jdbcType=VARCHAR}, #{receiverName,jdbcType=VARCHAR},
#{billContent,jdbcType=VARCHAR}, #{billReceiverPhone,jdbcType=VARCHAR}, #{billReceiverEmail,jdbcType=VARCHAR}, #{receiverPhone,jdbcType=VARCHAR}, #{receiverPostCode,jdbcType=VARCHAR}, #{receiverProvince,jdbcType=VARCHAR},
#{receiverName,jdbcType=VARCHAR}, #{receiverPhone,jdbcType=VARCHAR}, #{receiverPostCode,jdbcType=VARCHAR}, #{receiverCity,jdbcType=VARCHAR}, #{receiverRegion,jdbcType=VARCHAR}, #{receiverDetailAddress,jdbcType=VARCHAR},
#{receiverProvince,jdbcType=VARCHAR}, #{receiverCity,jdbcType=VARCHAR}, #{receiverRegion,jdbcType=VARCHAR}, #{note,jdbcType=VARCHAR}, #{confirmStatus,jdbcType=INTEGER})
#{receiverDetailAddress,jdbcType=VARCHAR}, #{note,jdbcType=VARCHAR}, #{confirmStatus,jdbcType=INTEGER}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.OmsOrder"> <insert id="insertSelective" parameterType="com.macro.mall.model.OmsOrder">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into oms_order insert into oms_order
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberId != null"> <if test="memberId != null">
member_id, member_id,
</if> </if>
@ -280,7 +277,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberId != null"> <if test="memberId != null">
#{memberId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT},
</if> </if>

View File

@ -101,23 +101,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.OmsOrderOperateHistory"> <insert id="insert" parameterType="com.macro.mall.model.OmsOrderOperateHistory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into oms_order_operate_history (id, order_id, operate_man, insert into oms_order_operate_history (order_id, operate_man, create_time,
create_time, order_status, note order_status, note)
) values (#{orderId,jdbcType=BIGINT}, #{operateMan,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
values (#{id,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT}, #{operateMan,jdbcType=VARCHAR}, #{orderStatus,jdbcType=INTEGER}, #{note,jdbcType=VARCHAR})
#{createTime,jdbcType=TIMESTAMP}, #{orderStatus,jdbcType=INTEGER}, #{note,jdbcType=VARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.OmsOrderOperateHistory"> <insert id="insertSelective" parameterType="com.macro.mall.model.OmsOrderOperateHistory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into oms_order_operate_history insert into oms_order_operate_history
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="orderId != null"> <if test="orderId != null">
order_id, order_id,
</if> </if>
@ -135,7 +132,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="orderId != null"> <if test="orderId != null">
#{orderId,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT},
</if> </if>

View File

@ -126,37 +126,34 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.OmsOrderReturnApply"> <insert id="insert" parameterType="com.macro.mall.model.OmsOrderReturnApply">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into oms_order_return_apply (id, order_id, company_address_id, insert into oms_order_return_apply (order_id, company_address_id, order_sn,
order_sn, create_time, member_username, create_time, member_username, return_amount,
return_amount, return_name, return_phone, return_name, return_phone, status,
status, handle_time, product_pic, handle_time, product_pic, product_name,
product_name, brand_name, product_attr, brand_name, product_attr, product_count,
product_count, reason, description, reason, description, proof_pics,
proof_pics, return_post_amount, return_post_status, return_post_amount, return_post_status, confirm_return_amount,
confirm_return_amount, handle_note, handle_man, handle_note, handle_man, receive_man,
receive_man, receive_time, receive_note receive_time, receive_note)
) values (#{orderId,jdbcType=BIGINT}, #{companyAddressId,jdbcType=BIGINT}, #{orderSn,jdbcType=VARCHAR},
values (#{id,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT}, #{companyAddressId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{memberUsername,jdbcType=VARCHAR}, #{returnAmount,jdbcType=DECIMAL},
#{orderSn,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{memberUsername,jdbcType=VARCHAR}, #{returnName,jdbcType=VARCHAR}, #{returnPhone,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{returnAmount,jdbcType=DECIMAL}, #{returnName,jdbcType=VARCHAR}, #{returnPhone,jdbcType=VARCHAR}, #{handleTime,jdbcType=TIMESTAMP}, #{productPic,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{handleTime,jdbcType=TIMESTAMP}, #{productPic,jdbcType=VARCHAR}, #{brandName,jdbcType=VARCHAR}, #{productAttr,jdbcType=VARCHAR}, #{productCount,jdbcType=INTEGER},
#{productName,jdbcType=VARCHAR}, #{brandName,jdbcType=VARCHAR}, #{productAttr,jdbcType=VARCHAR}, #{reason,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{proofPics,jdbcType=VARCHAR},
#{productCount,jdbcType=INTEGER}, #{reason,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{returnPostAmount,jdbcType=DECIMAL}, #{returnPostStatus,jdbcType=INTEGER}, #{confirmReturnAmount,jdbcType=DECIMAL},
#{proofPics,jdbcType=VARCHAR}, #{returnPostAmount,jdbcType=DECIMAL}, #{returnPostStatus,jdbcType=INTEGER}, #{handleNote,jdbcType=VARCHAR}, #{handleMan,jdbcType=VARCHAR}, #{receiveMan,jdbcType=VARCHAR},
#{confirmReturnAmount,jdbcType=DECIMAL}, #{handleNote,jdbcType=VARCHAR}, #{handleMan,jdbcType=VARCHAR}, #{receiveTime,jdbcType=TIMESTAMP}, #{receiveNote,jdbcType=VARCHAR})
#{receiveMan,jdbcType=VARCHAR}, #{receiveTime,jdbcType=TIMESTAMP}, #{receiveNote,jdbcType=VARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.OmsOrderReturnApply"> <insert id="insertSelective" parameterType="com.macro.mall.model.OmsOrderReturnApply">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into oms_order_return_apply insert into oms_order_return_apply
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="orderId != null"> <if test="orderId != null">
order_id, order_id,
</if> </if>
@ -237,7 +234,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="orderId != null"> <if test="orderId != null">
#{orderId,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT},
</if> </if>

View File

@ -99,21 +99,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.OmsOrderReturnReason"> <insert id="insert" parameterType="com.macro.mall.model.OmsOrderReturnReason">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into oms_order_return_reason (id, name, sort, insert into oms_order_return_reason (name, sort, status
status) )
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, values (#{name,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}
#{status,jdbcType=INTEGER}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.OmsOrderReturnReason"> <insert id="insertSelective" parameterType="com.macro.mall.model.OmsOrderReturnReason">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into oms_order_return_reason insert into oms_order_return_reason
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
@ -125,7 +124,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>

View File

@ -102,23 +102,22 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.OmsOrderSetting"> <insert id="insert" parameterType="com.macro.mall.model.OmsOrderSetting">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into oms_order_setting (id, flash_order_overtime, normal_order_overtime, insert into oms_order_setting (flash_order_overtime, normal_order_overtime,
confirm_overtime, finish_overtime, comment_overtime confirm_overtime, finish_overtime, comment_overtime
) )
values (#{id,jdbcType=BIGINT}, #{flashOrderOvertime,jdbcType=INTEGER}, #{normalOrderOvertime,jdbcType=INTEGER}, values (#{flashOrderOvertime,jdbcType=INTEGER}, #{normalOrderOvertime,jdbcType=INTEGER},
#{confirmOvertime,jdbcType=INTEGER}, #{finishOvertime,jdbcType=INTEGER}, #{commentOvertime,jdbcType=INTEGER} #{confirmOvertime,jdbcType=INTEGER}, #{finishOvertime,jdbcType=INTEGER}, #{commentOvertime,jdbcType=INTEGER}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.OmsOrderSetting"> <insert id="insertSelective" parameterType="com.macro.mall.model.OmsOrderSetting">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into oms_order_setting insert into oms_order_setting
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="flashOrderOvertime != null"> <if test="flashOrderOvertime != null">
flash_order_overtime, flash_order_overtime,
</if> </if>
@ -136,7 +135,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="flashOrderOvertime != null"> <if test="flashOrderOvertime != null">
#{flashOrderOvertime,jdbcType=INTEGER}, #{flashOrderOvertime,jdbcType=INTEGER},
</if> </if>

View File

@ -101,23 +101,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsAlbum"> <insert id="insert" parameterType="com.macro.mall.model.PmsAlbum">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_album (id, name, cover_pic, insert into pms_album (name, cover_pic, pic_count,
pic_count, sort, description sort, description)
) values (#{name,jdbcType=VARCHAR}, #{coverPic,jdbcType=VARCHAR}, #{picCount,jdbcType=INTEGER},
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{coverPic,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR})
#{picCount,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsAlbum"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsAlbum">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_album insert into pms_album
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
@ -135,7 +132,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>

View File

@ -98,21 +98,18 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsAlbumPic"> <insert id="insert" parameterType="com.macro.mall.model.PmsAlbumPic">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_album_pic (id, album_id, pic insert into pms_album_pic (album_id, pic)
) values (#{albumId,jdbcType=BIGINT}, #{pic,jdbcType=VARCHAR})
values (#{id,jdbcType=BIGINT}, #{albumId,jdbcType=BIGINT}, #{pic,jdbcType=VARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsAlbumPic"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsAlbumPic">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_album_pic insert into pms_album_pic
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="albumId != null"> <if test="albumId != null">
album_id, album_id,
</if> </if>
@ -121,7 +118,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="albumId != null"> <if test="albumId != null">
#{albumId,jdbcType=BIGINT}, #{albumId,jdbcType=BIGINT},
</if> </if>

View File

@ -130,25 +130,24 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsBrand"> <insert id="insert" parameterType="com.macro.mall.model.PmsBrand">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_brand (id, name, first_letter, insert into pms_brand (name, first_letter, sort,
sort, factory_status, show_status, factory_status, show_status, product_count,
product_count, product_comment_count, logo, product_comment_count, logo, big_pic,
big_pic, brand_story) brand_story)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{firstLetter,jdbcType=VARCHAR}, values (#{name,jdbcType=VARCHAR}, #{firstLetter,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
#{sort,jdbcType=INTEGER}, #{factoryStatus,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER}, #{factoryStatus,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER}, #{productCount,jdbcType=INTEGER},
#{productCount,jdbcType=INTEGER}, #{productCommentCount,jdbcType=INTEGER}, #{logo,jdbcType=VARCHAR}, #{productCommentCount,jdbcType=INTEGER}, #{logo,jdbcType=VARCHAR}, #{bigPic,jdbcType=VARCHAR},
#{bigPic,jdbcType=VARCHAR}, #{brandStory,jdbcType=LONGVARCHAR}) #{brandStory,jdbcType=LONGVARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsBrand"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsBrand">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_brand insert into pms_brand
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
@ -181,7 +180,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>

View File

@ -134,29 +134,26 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsComment"> <insert id="insert" parameterType="com.macro.mall.model.PmsComment">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_comment (id, product_id, member_nick_name, insert into pms_comment (product_id, member_nick_name, product_name,
product_name, star, member_ip, star, member_ip, create_time,
create_time, show_status, product_attribute, show_status, product_attribute, collect_couont,
collect_couont, read_count, pics, read_count, pics, member_icon,
member_icon, replay_count, content replay_count, content)
) values (#{productId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR},
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, #{star,jdbcType=INTEGER}, #{memberIp,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{productName,jdbcType=VARCHAR}, #{star,jdbcType=INTEGER}, #{memberIp,jdbcType=VARCHAR}, #{showStatus,jdbcType=INTEGER}, #{productAttribute,jdbcType=VARCHAR}, #{collectCouont,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{showStatus,jdbcType=INTEGER}, #{productAttribute,jdbcType=VARCHAR}, #{readCount,jdbcType=INTEGER}, #{pics,jdbcType=VARCHAR}, #{memberIcon,jdbcType=VARCHAR},
#{collectCouont,jdbcType=INTEGER}, #{readCount,jdbcType=INTEGER}, #{pics,jdbcType=VARCHAR}, #{replayCount,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR})
#{memberIcon,jdbcType=VARCHAR}, #{replayCount,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsComment"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsComment">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_comment insert into pms_comment
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null"> <if test="productId != null">
product_id, product_id,
</if> </if>
@ -201,7 +198,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null"> <if test="productId != null">
#{productId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT},
</if> </if>

View File

@ -102,23 +102,22 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsCommentReplay"> <insert id="insert" parameterType="com.macro.mall.model.PmsCommentReplay">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_comment_replay (id, comment_id, member_nick_name, insert into pms_comment_replay (comment_id, member_nick_name, member_icon,
member_icon, content, create_time, content, create_time, type
type) )
values (#{id,jdbcType=BIGINT}, #{commentId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, values (#{commentId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, #{memberIcon,jdbcType=VARCHAR},
#{memberIcon,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{type,jdbcType=INTEGER}
#{type,jdbcType=INTEGER}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsCommentReplay"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsCommentReplay">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_comment_replay insert into pms_comment_replay
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="commentId != null"> <if test="commentId != null">
comment_id, comment_id,
</if> </if>
@ -139,7 +138,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="commentId != null"> <if test="commentId != null">
#{commentId,jdbcType=BIGINT}, #{commentId,jdbcType=BIGINT},
</if> </if>

View File

@ -103,23 +103,22 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsFeightTemplate"> <insert id="insert" parameterType="com.macro.mall.model.PmsFeightTemplate">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_feight_template (id, name, charge_type, insert into pms_feight_template (name, charge_type, first_weight,
first_weight, first_fee, continue_weight, first_fee, continue_weight, continme_fee,
continme_fee, dest) dest)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{chargeType,jdbcType=INTEGER}, values (#{name,jdbcType=VARCHAR}, #{chargeType,jdbcType=INTEGER}, #{firstWeight,jdbcType=DECIMAL},
#{firstWeight,jdbcType=DECIMAL}, #{firstFee,jdbcType=DECIMAL}, #{continueWeight,jdbcType=DECIMAL}, #{firstFee,jdbcType=DECIMAL}, #{continueWeight,jdbcType=DECIMAL}, #{continmeFee,jdbcType=DECIMAL},
#{continmeFee,jdbcType=DECIMAL}, #{dest,jdbcType=VARCHAR}) #{dest,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsFeightTemplate"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsFeightTemplate">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_feight_template insert into pms_feight_template
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
@ -143,7 +142,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>

View File

@ -99,21 +99,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsMemberPrice"> <insert id="insert" parameterType="com.macro.mall.model.PmsMemberPrice">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_member_price (id, product_id, member_level_id, insert into pms_member_price (product_id, member_level_id, member_price
member_price) )
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{memberLevelId,jdbcType=BIGINT}, values (#{productId,jdbcType=BIGINT}, #{memberLevelId,jdbcType=BIGINT}, #{memberPrice,jdbcType=DECIMAL}
#{memberPrice,jdbcType=DECIMAL}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsMemberPrice"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsMemberPrice">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_member_price insert into pms_member_price
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null"> <if test="productId != null">
product_id, product_id,
</if> </if>
@ -125,7 +124,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null"> <if test="productId != null">
#{productId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT},
</if> </if>

View File

@ -99,21 +99,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProductAttributeCategory"> <insert id="insert" parameterType="com.macro.mall.model.PmsProductAttributeCategory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_attribute_category (id, name, attribute_count, insert into pms_product_attribute_category (name, attribute_count, param_count
param_count) )
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{attributeCount,jdbcType=INTEGER}, values (#{name,jdbcType=VARCHAR}, #{attributeCount,jdbcType=INTEGER}, #{paramCount,jdbcType=INTEGER}
#{paramCount,jdbcType=INTEGER}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductAttributeCategory"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductAttributeCategory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_attribute_category insert into pms_product_attribute_category
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
@ -125,7 +124,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>

View File

@ -108,27 +108,26 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProductAttribute"> <insert id="insert" parameterType="com.macro.mall.model.PmsProductAttribute">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_attribute (id, product_attribute_category_id, name, insert into pms_product_attribute (product_attribute_category_id, name,
select_type, input_type, input_list, select_type, input_type, input_list,
sort, filter_type, search_type, sort, filter_type, search_type,
related_status, hand_add_status, type related_status, hand_add_status, type
) )
values (#{id,jdbcType=BIGINT}, #{productAttributeCategoryId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, values (#{productAttributeCategoryId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{selectType,jdbcType=INTEGER}, #{inputType,jdbcType=INTEGER}, #{inputList,jdbcType=VARCHAR}, #{selectType,jdbcType=INTEGER}, #{inputType,jdbcType=INTEGER}, #{inputList,jdbcType=VARCHAR},
#{sort,jdbcType=INTEGER}, #{filterType,jdbcType=INTEGER}, #{searchType,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{filterType,jdbcType=INTEGER}, #{searchType,jdbcType=INTEGER},
#{relatedStatus,jdbcType=INTEGER}, #{handAddStatus,jdbcType=INTEGER}, #{type,jdbcType=INTEGER} #{relatedStatus,jdbcType=INTEGER}, #{handAddStatus,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductAttribute"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductAttribute">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_attribute insert into pms_product_attribute
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productAttributeCategoryId != null"> <if test="productAttributeCategoryId != null">
product_attribute_category_id, product_attribute_category_id,
</if> </if>
@ -164,7 +163,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productAttributeCategoryId != null"> <if test="productAttributeCategoryId != null">
#{productAttributeCategoryId,jdbcType=BIGINT}, #{productAttributeCategoryId,jdbcType=BIGINT},
</if> </if>

View File

@ -99,21 +99,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProductAttributeValue"> <insert id="insert" parameterType="com.macro.mall.model.PmsProductAttributeValue">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_attribute_value (id, pms_product_id, pms_product_attribute_id, insert into pms_product_attribute_value (pms_product_id, pms_product_attribute_id,
value) value)
values (#{id,jdbcType=BIGINT}, #{pmsProductId,jdbcType=BIGINT}, #{pmsProductAttributeId,jdbcType=BIGINT}, values (#{pmsProductId,jdbcType=BIGINT}, #{pmsProductAttributeId,jdbcType=BIGINT},
#{value,jdbcType=VARCHAR}) #{value,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductAttributeValue"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductAttributeValue">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_attribute_value insert into pms_product_attribute_value
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="pmsProductId != null"> <if test="pmsProductId != null">
pms_product_id, pms_product_id,
</if> </if>
@ -125,7 +124,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="pmsProductId != null"> <if test="pmsProductId != null">
#{pmsProductId,jdbcType=BIGINT}, #{pmsProductId,jdbcType=BIGINT},
</if> </if>

View File

@ -98,21 +98,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProductCategoryAttributeRelation"> <insert id="insert" parameterType="com.macro.mall.model.PmsProductCategoryAttributeRelation">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_category_attribute_relation (id, product_category_id, product_attribute_id insert into pms_product_category_attribute_relation (product_category_id, product_attribute_id
) )
values (#{id,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT}, #{productAttributeId,jdbcType=BIGINT} values (#{productCategoryId,jdbcType=BIGINT}, #{productAttributeId,jdbcType=BIGINT}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductCategoryAttributeRelation"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductCategoryAttributeRelation">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_category_attribute_relation insert into pms_product_category_attribute_relation
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productCategoryId != null"> <if test="productCategoryId != null">
product_category_id, product_category_id,
</if> </if>
@ -121,7 +120,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productCategoryId != null"> <if test="productCategoryId != null">
#{productCategoryId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT},
</if> </if>

View File

@ -131,27 +131,24 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProductCategory"> <insert id="insert" parameterType="com.macro.mall.model.PmsProductCategory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_category (id, parent_id, name, insert into pms_product_category (parent_id, name, level,
level, product_count, product_unit, product_count, product_unit, nav_status,
nav_status, show_status, sort, show_status, sort, icon,
icon, keywords, description keywords, description)
) values (#{parentId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER},
values (#{id,jdbcType=BIGINT}, #{parentId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{productCount,jdbcType=INTEGER}, #{productUnit,jdbcType=VARCHAR}, #{navStatus,jdbcType=INTEGER},
#{level,jdbcType=INTEGER}, #{productCount,jdbcType=INTEGER}, #{productUnit,jdbcType=VARCHAR}, #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{icon,jdbcType=VARCHAR},
#{navStatus,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{keywords,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR})
#{icon,jdbcType=VARCHAR}, #{keywords,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductCategory"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductCategory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_category insert into pms_product_category
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="parentId != null"> <if test="parentId != null">
parent_id, parent_id,
</if> </if>
@ -187,7 +184,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="parentId != null"> <if test="parentId != null">
#{parentId,jdbcType=BIGINT}, #{parentId,jdbcType=BIGINT},
</if> </if>

View File

@ -99,21 +99,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProductFullReduction"> <insert id="insert" parameterType="com.macro.mall.model.PmsProductFullReduction">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_full_reduction (id, product_id, full_price, insert into pms_product_full_reduction (product_id, full_price, reduce_price
reduce_price) )
values (#{id,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT}, #{fullPrice,jdbcType=DECIMAL}, values (#{productId,jdbcType=BIGINT}, #{fullPrice,jdbcType=DECIMAL}, #{reducePrice,jdbcType=DECIMAL}
#{reducePrice,jdbcType=DECIMAL}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductFullReduction"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductFullReduction">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_full_reduction insert into pms_product_full_reduction
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null"> <if test="productId != null">
product_id, product_id,
</if> </if>
@ -125,7 +124,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=INTEGER},
<if test="productId != null"> <if test="productId != null">
#{productId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT},
</if> </if>

View File

@ -100,21 +100,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProductLadder"> <insert id="insert" parameterType="com.macro.mall.model.PmsProductLadder">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_ladder (id, product_id, count, insert into pms_product_ladder (product_id, count, discount,
discount, price) price)
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{count,jdbcType=INTEGER}, values (#{productId,jdbcType=BIGINT}, #{count,jdbcType=INTEGER}, #{discount,jdbcType=DECIMAL},
#{discount,jdbcType=DECIMAL}, #{price,jdbcType=DECIMAL}) #{price,jdbcType=DECIMAL})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductLadder"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductLadder">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_ladder insert into pms_product_ladder
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null"> <if test="productId != null">
product_id, product_id,
</if> </if>
@ -129,7 +128,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null"> <if test="productId != null">
#{productId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT},
</if> </if>

View File

@ -167,49 +167,48 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProduct"> <insert id="insert" parameterType="com.macro.mall.model.PmsProduct">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product (id, brand_id, product_category_id, insert into pms_product (brand_id, product_category_id, feight_template_id,
feight_template_id, product_attribute_category_id, product_attribute_category_id, flash_promotion_id,
flash_promotion_id, name, pic, name, pic, product_sn,
product_sn, delete_status, publish_status, delete_status, publish_status, new_status,
new_status, recommand_status, verify_status, recommand_status, verify_status, sort,
sort, sale, price, sale, price, promotion_price,
promotion_price, gift_point, use_point_limit, gift_point, use_point_limit, sub_title,
sub_title, original_price, stock, original_price, stock, low_stock,
low_stock, unit, weight, unit, weight, preview_status,
preview_status, service_ids, keywords, service_ids, keywords, note,
note, album_pics, detail_title, album_pics, detail_title, flash_promotion_price,
flash_promotion_price, flash_promotion_count, flash_promotion_count, flash_promotion_sort,
flash_promotion_sort, promotion_start_time, promotion_start_time, promotion_end_time,
promotion_end_time, promotion_per_limit, promotion_per_limit, promotion_type, description,
promotion_type, description, detail_desc, detail_desc, detail_html, detail_mobile_html
detail_html, detail_mobile_html) )
values (#{id,jdbcType=BIGINT}, #{brandId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT}, values (#{brandId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT}, #{feightTemplateId,jdbcType=BIGINT},
#{feightTemplateId,jdbcType=BIGINT}, #{productAttributeCategoryId,jdbcType=BIGINT}, #{productAttributeCategoryId,jdbcType=BIGINT}, #{flashPromotionId,jdbcType=INTEGER},
#{flashPromotionId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, #{productSn,jdbcType=VARCHAR},
#{productSn,jdbcType=VARCHAR}, #{deleteStatus,jdbcType=INTEGER}, #{publishStatus,jdbcType=INTEGER}, #{deleteStatus,jdbcType=INTEGER}, #{publishStatus,jdbcType=INTEGER}, #{newStatus,jdbcType=INTEGER},
#{newStatus,jdbcType=INTEGER}, #{recommandStatus,jdbcType=INTEGER}, #{verifyStatus,jdbcType=INTEGER}, #{recommandStatus,jdbcType=INTEGER}, #{verifyStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
#{sort,jdbcType=INTEGER}, #{sale,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, #{sale,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, #{promotionPrice,jdbcType=DECIMAL},
#{promotionPrice,jdbcType=DECIMAL}, #{giftPoint,jdbcType=INTEGER}, #{usePointLimit,jdbcType=INTEGER}, #{giftPoint,jdbcType=INTEGER}, #{usePointLimit,jdbcType=INTEGER}, #{subTitle,jdbcType=VARCHAR},
#{subTitle,jdbcType=VARCHAR}, #{originalPrice,jdbcType=DECIMAL}, #{stock,jdbcType=INTEGER}, #{originalPrice,jdbcType=DECIMAL}, #{stock,jdbcType=INTEGER}, #{lowStock,jdbcType=INTEGER},
#{lowStock,jdbcType=INTEGER}, #{unit,jdbcType=VARCHAR}, #{weight,jdbcType=DECIMAL}, #{unit,jdbcType=VARCHAR}, #{weight,jdbcType=DECIMAL}, #{previewStatus,jdbcType=INTEGER},
#{previewStatus,jdbcType=INTEGER}, #{serviceIds,jdbcType=VARCHAR}, #{keywords,jdbcType=VARCHAR}, #{serviceIds,jdbcType=VARCHAR}, #{keywords,jdbcType=VARCHAR}, #{note,jdbcType=VARCHAR},
#{note,jdbcType=VARCHAR}, #{albumPics,jdbcType=VARCHAR}, #{detailTitle,jdbcType=VARCHAR}, #{albumPics,jdbcType=VARCHAR}, #{detailTitle,jdbcType=VARCHAR}, #{flashPromotionPrice,jdbcType=DECIMAL},
#{flashPromotionPrice,jdbcType=DECIMAL}, #{flashPromotionCount,jdbcType=INTEGER}, #{flashPromotionCount,jdbcType=INTEGER}, #{flashPromotionSort,jdbcType=INTEGER},
#{flashPromotionSort,jdbcType=INTEGER}, #{promotionStartTime,jdbcType=TIMESTAMP}, #{promotionStartTime,jdbcType=TIMESTAMP}, #{promotionEndTime,jdbcType=TIMESTAMP},
#{promotionEndTime,jdbcType=TIMESTAMP}, #{promotionPerLimit,jdbcType=INTEGER}, #{promotionPerLimit,jdbcType=INTEGER}, #{promotionType,jdbcType=INTEGER}, #{description,jdbcType=LONGVARCHAR},
#{promotionType,jdbcType=INTEGER}, #{description,jdbcType=LONGVARCHAR}, #{detailDesc,jdbcType=LONGVARCHAR}, #{detailDesc,jdbcType=LONGVARCHAR}, #{detailHtml,jdbcType=LONGVARCHAR}, #{detailMobileHtml,jdbcType=LONGVARCHAR}
#{detailHtml,jdbcType=LONGVARCHAR}, #{detailMobileHtml,jdbcType=LONGVARCHAR}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProduct"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProduct">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product insert into pms_product
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="brandId != null"> <if test="brandId != null">
brand_id, brand_id,
</if> </if>
@ -338,7 +337,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="brandId != null"> <if test="brandId != null">
#{brandId,jdbcType=BIGINT}, #{brandId,jdbcType=BIGINT},
</if> </if>

View File

@ -108,27 +108,24 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProductOperateLog"> <insert id="insert" parameterType="com.macro.mall.model.PmsProductOperateLog">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_operate_log (id, product_id, price_old, insert into pms_product_operate_log (product_id, price_old, price_new,
price_new, sale_price_old, sale_price_new, sale_price_old, sale_price_new, gift_point_old,
gift_point_old, gift_point_new, use_point_limit_old, gift_point_new, use_point_limit_old, use_point_limit_new,
use_point_limit_new, operate_man, create_time operate_man, create_time)
) values (#{productId,jdbcType=BIGINT}, #{priceOld,jdbcType=DECIMAL}, #{priceNew,jdbcType=DECIMAL},
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{priceOld,jdbcType=DECIMAL}, #{salePriceOld,jdbcType=DECIMAL}, #{salePriceNew,jdbcType=DECIMAL}, #{giftPointOld,jdbcType=INTEGER},
#{priceNew,jdbcType=DECIMAL}, #{salePriceOld,jdbcType=DECIMAL}, #{salePriceNew,jdbcType=DECIMAL}, #{giftPointNew,jdbcType=INTEGER}, #{usePointLimitOld,jdbcType=INTEGER}, #{usePointLimitNew,jdbcType=INTEGER},
#{giftPointOld,jdbcType=INTEGER}, #{giftPointNew,jdbcType=INTEGER}, #{usePointLimitOld,jdbcType=INTEGER}, #{operateMan,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
#{usePointLimitNew,jdbcType=INTEGER}, #{operateMan,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductOperateLog"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductOperateLog">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_operate_log insert into pms_product_operate_log
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null"> <if test="productId != null">
product_id, product_id,
</if> </if>
@ -164,7 +161,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null"> <if test="productId != null">
#{productId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT},
</if> </if>

View File

@ -101,23 +101,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProductVertifyRecord"> <insert id="insert" parameterType="com.macro.mall.model.PmsProductVertifyRecord">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_vertify_record (id, product_id, create_time, insert into pms_product_vertify_record (product_id, create_time, vertify_man,
vertify_man, status, detail status, detail)
) values (#{productId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{vertifyMan,jdbcType=VARCHAR},
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, #{detail,jdbcType=VARCHAR})
#{vertifyMan,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{detail,jdbcType=VARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductVertifyRecord"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductVertifyRecord">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_vertify_record insert into pms_product_vertify_record
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null"> <if test="productId != null">
product_id, product_id,
</if> </if>
@ -135,7 +132,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null"> <if test="productId != null">
#{productId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT},
</if> </if>

View File

@ -106,25 +106,24 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsSkuStock"> <insert id="insert" parameterType="com.macro.mall.model.PmsSkuStock">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_sku_stock (id, product_id, sku_code, insert into pms_sku_stock (product_id, sku_code, price,
price, stock, low_stock, stock, low_stock, sp1,
sp1, sp2, sp3, pic, sp2, sp3, pic, sale
sale) )
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{skuCode,jdbcType=VARCHAR}, values (#{productId,jdbcType=BIGINT}, #{skuCode,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL},
#{price,jdbcType=DECIMAL}, #{stock,jdbcType=INTEGER}, #{lowStock,jdbcType=INTEGER}, #{stock,jdbcType=INTEGER}, #{lowStock,jdbcType=INTEGER}, #{sp1,jdbcType=VARCHAR},
#{sp1,jdbcType=VARCHAR}, #{sp2,jdbcType=VARCHAR}, #{sp3,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, #{sp2,jdbcType=VARCHAR}, #{sp3,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, #{sale,jdbcType=INTEGER}
#{sale,jdbcType=INTEGER}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsSkuStock"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsSkuStock">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_sku_stock insert into pms_sku_stock
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null"> <if test="productId != null">
product_id, product_id,
</if> </if>
@ -157,7 +156,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null"> <if test="productId != null">
#{productId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT},
</if> </if>

View File

@ -106,25 +106,24 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.SmsCouponHistory"> <insert id="insert" parameterType="com.macro.mall.model.SmsCouponHistory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_coupon_history (id, coupon_id, member_id, insert into sms_coupon_history (coupon_id, member_id, coupon_code,
coupon_code, member_nickname, get_type, member_nickname, get_type, create_time,
create_time, use_status, use_time, use_status, use_time, order_id
order_id) )
values (#{id,jdbcType=BIGINT}, #{couponId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, values (#{couponId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{couponCode,jdbcType=VARCHAR},
#{couponCode,jdbcType=VARCHAR}, #{memberNickname,jdbcType=VARCHAR}, #{getType,jdbcType=INTEGER}, #{memberNickname,jdbcType=VARCHAR}, #{getType,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{createTime,jdbcType=TIMESTAMP}, #{useStatus,jdbcType=INTEGER}, #{useTime,jdbcType=TIMESTAMP}, #{useStatus,jdbcType=INTEGER}, #{useTime,jdbcType=TIMESTAMP}, #{orderId,jdbcType=CHAR}
#{orderId,jdbcType=CHAR}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsCouponHistory"> <insert id="insertSelective" parameterType="com.macro.mall.model.SmsCouponHistory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_coupon_history insert into sms_coupon_history
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="couponId != null"> <if test="couponId != null">
coupon_id, coupon_id,
</if> </if>
@ -154,7 +153,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="couponId != null"> <if test="couponId != null">
#{couponId,jdbcType=BIGINT}, #{couponId,jdbcType=BIGINT},
</if> </if>

View File

@ -113,29 +113,28 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.SmsCoupon"> <insert id="insert" parameterType="com.macro.mall.model.SmsCoupon">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_coupon (id, type, name, insert into sms_coupon (type, name, platform,
platform, count, amount, count, amount, per_limit,
per_limit, min_point, start_time, min_point, start_time, end_time,
end_time, use_type, note, use_type, note, publish_count,
publish_count, use_count, enable_time, use_count, enable_time, code,
code, member_level) member_level)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, values (#{type,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{platform,jdbcType=VARCHAR},
#{platform,jdbcType=VARCHAR}, #{count,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, #{count,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, #{perLimit,jdbcType=INTEGER},
#{perLimit,jdbcType=INTEGER}, #{minPoint,jdbcType=DECIMAL}, #{startTime,jdbcType=TIMESTAMP}, #{minPoint,jdbcType=DECIMAL}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
#{endTime,jdbcType=TIMESTAMP}, #{useType,jdbcType=INTEGER}, #{note,jdbcType=VARCHAR}, #{useType,jdbcType=INTEGER}, #{note,jdbcType=VARCHAR}, #{publishCount,jdbcType=INTEGER},
#{publishCount,jdbcType=INTEGER}, #{useCount,jdbcType=INTEGER}, #{enableTime,jdbcType=TIMESTAMP}, #{useCount,jdbcType=INTEGER}, #{enableTime,jdbcType=TIMESTAMP}, #{code,jdbcType=VARCHAR},
#{code,jdbcType=VARCHAR}, #{memberLevel,jdbcType=INTEGER}) #{memberLevel,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsCoupon"> <insert id="insertSelective" parameterType="com.macro.mall.model.SmsCoupon">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_coupon insert into sms_coupon
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="type != null"> <if test="type != null">
type, type,
</if> </if>
@ -186,7 +185,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="type != null"> <if test="type != null">
#{type,jdbcType=INTEGER}, #{type,jdbcType=INTEGER},
</if> </if>

View File

@ -98,21 +98,18 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.SmsCouponProductCategoryRelation"> <insert id="insert" parameterType="com.macro.mall.model.SmsCouponProductCategoryRelation">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_coupon_product_category_relation (id, coupon_id, product_category_id insert into sms_coupon_product_category_relation (coupon_id, product_category_id)
) values (#{couponId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT})
values (#{id,jdbcType=BIGINT}, #{couponId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsCouponProductCategoryRelation"> <insert id="insertSelective" parameterType="com.macro.mall.model.SmsCouponProductCategoryRelation">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_coupon_product_category_relation insert into sms_coupon_product_category_relation
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="couponId != null"> <if test="couponId != null">
coupon_id, coupon_id,
</if> </if>
@ -121,7 +118,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="couponId != null"> <if test="couponId != null">
#{couponId,jdbcType=BIGINT}, #{couponId,jdbcType=BIGINT},
</if> </if>

View File

@ -98,21 +98,18 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.SmsCouponProductRelation"> <insert id="insert" parameterType="com.macro.mall.model.SmsCouponProductRelation">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_coupon_product_relation (id, coupon_id, product_id insert into sms_coupon_product_relation (coupon_id, product_id)
) values (#{couponId,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT})
values (#{id,jdbcType=BIGINT}, #{couponId,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsCouponProductRelation"> <insert id="insertSelective" parameterType="com.macro.mall.model.SmsCouponProductRelation">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_coupon_product_relation insert into sms_coupon_product_relation
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="couponId != null"> <if test="couponId != null">
coupon_id, coupon_id,
</if> </if>
@ -121,7 +118,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="couponId != null"> <if test="couponId != null">
#{couponId,jdbcType=INTEGER}, #{couponId,jdbcType=INTEGER},
</if> </if>

View File

@ -102,23 +102,22 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.SmsFlashPromotionLog"> <insert id="insert" parameterType="com.macro.mall.model.SmsFlashPromotionLog">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_flash_promotion_log (id, member_id, product_id, insert into sms_flash_promotion_log (member_id, product_id, member_phone,
member_phone, product_name, subscribe_time, product_name, subscribe_time, send_time
send_time) )
values (#{id,jdbcType=INTEGER}, #{memberId,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT}, values (#{memberId,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT}, #{memberPhone,jdbcType=VARCHAR},
#{memberPhone,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR}, #{subscribeTime,jdbcType=TIMESTAMP}, #{productName,jdbcType=VARCHAR}, #{subscribeTime,jdbcType=TIMESTAMP}, #{sendTime,jdbcType=TIMESTAMP}
#{sendTime,jdbcType=TIMESTAMP}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsFlashPromotionLog"> <insert id="insertSelective" parameterType="com.macro.mall.model.SmsFlashPromotionLog">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_flash_promotion_log insert into sms_flash_promotion_log
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberId != null"> <if test="memberId != null">
member_id, member_id,
</if> </if>
@ -139,7 +138,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=INTEGER},
<if test="memberId != null"> <if test="memberId != null">
#{memberId,jdbcType=INTEGER}, #{memberId,jdbcType=INTEGER},
</if> </if>

View File

@ -101,23 +101,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.SmsFlashPromotion"> <insert id="insert" parameterType="com.macro.mall.model.SmsFlashPromotion">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_flash_promotion (id, title, start_time, insert into sms_flash_promotion (title, start_time, end_time,
end_time, status, time_name status, time_name)
) values (#{title,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
values (#{id,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, #{timeName,jdbcType=VARCHAR})
#{endTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, #{timeName,jdbcType=VARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsFlashPromotion"> <insert id="insertSelective" parameterType="com.macro.mall.model.SmsFlashPromotion">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_flash_promotion insert into sms_flash_promotion
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="title != null"> <if test="title != null">
title, title,
</if> </if>
@ -135,7 +132,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=INTEGER},
<if test="title != null"> <if test="title != null">
#{title,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
</if> </if>

View File

@ -107,25 +107,24 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.SmsHomeAdvertise"> <insert id="insert" parameterType="com.macro.mall.model.SmsHomeAdvertise">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_home_advertise (id, name, type, insert into sms_home_advertise (name, type, pic,
pic, start_time, end_time, start_time, end_time, status,
status, click_count, order_count, click_count, order_count, url,
url, note) note)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, values (#{name,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{pic,jdbcType=VARCHAR},
#{pic,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{clickCount,jdbcType=INTEGER}, #{orderCount,jdbcType=INTEGER}, #{clickCount,jdbcType=INTEGER}, #{orderCount,jdbcType=INTEGER}, #{url,jdbcType=VARCHAR},
#{url,jdbcType=VARCHAR}, #{note,jdbcType=VARCHAR}) #{note,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsHomeAdvertise"> <insert id="insertSelective" parameterType="com.macro.mall.model.SmsHomeAdvertise">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_home_advertise insert into sms_home_advertise
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
@ -158,7 +157,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>

View File

@ -100,21 +100,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.SmsHomeBrand"> <insert id="insert" parameterType="com.macro.mall.model.SmsHomeBrand">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_home_brand (id, brand_id, brand_name, insert into sms_home_brand (brand_id, brand_name, recommend_status,
recommend_status, sort) sort)
values (#{id,jdbcType=BIGINT}, #{brandId,jdbcType=BIGINT}, #{brandName,jdbcType=VARCHAR}, values (#{brandId,jdbcType=BIGINT}, #{brandName,jdbcType=VARCHAR}, #{recommendStatus,jdbcType=INTEGER},
#{recommendStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}) #{sort,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsHomeBrand"> <insert id="insertSelective" parameterType="com.macro.mall.model.SmsHomeBrand">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_home_brand insert into sms_home_brand
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="brandId != null"> <if test="brandId != null">
brand_id, brand_id,
</if> </if>
@ -129,7 +128,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="brandId != null"> <if test="brandId != null">
#{brandId,jdbcType=BIGINT}, #{brandId,jdbcType=BIGINT},
</if> </if>

View File

@ -100,21 +100,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.SmsHomeNewProduct"> <insert id="insert" parameterType="com.macro.mall.model.SmsHomeNewProduct">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_home_new_product (id, product_id, product_name, insert into sms_home_new_product (product_id, product_name, recommend_status,
recommend_status, sort) sort)
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{productName,jdbcType=VARCHAR}, values (#{productId,jdbcType=BIGINT}, #{productName,jdbcType=VARCHAR}, #{recommendStatus,jdbcType=INTEGER},
#{recommendStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}) #{sort,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsHomeNewProduct"> <insert id="insertSelective" parameterType="com.macro.mall.model.SmsHomeNewProduct">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_home_new_product insert into sms_home_new_product
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null"> <if test="productId != null">
product_id, product_id,
</if> </if>
@ -129,7 +128,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null"> <if test="productId != null">
#{productId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT},
</if> </if>

View File

@ -100,21 +100,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.SmsHomeRecommendProduct"> <insert id="insert" parameterType="com.macro.mall.model.SmsHomeRecommendProduct">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_home_recommend_product (id, product_id, product_name, insert into sms_home_recommend_product (product_id, product_name, recommend_status,
recommend_status, sort) sort)
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{productName,jdbcType=VARCHAR}, values (#{productId,jdbcType=BIGINT}, #{productName,jdbcType=VARCHAR}, #{recommendStatus,jdbcType=INTEGER},
#{recommendStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}) #{sort,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsHomeRecommendProduct"> <insert id="insertSelective" parameterType="com.macro.mall.model.SmsHomeRecommendProduct">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_home_recommend_product insert into sms_home_recommend_product
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null"> <if test="productId != null">
product_id, product_id,
</if> </if>
@ -129,7 +128,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null"> <if test="productId != null">
#{productId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT},
</if> </if>

View File

@ -100,21 +100,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.SmsHomeRecommendSubject"> <insert id="insert" parameterType="com.macro.mall.model.SmsHomeRecommendSubject">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_home_recommend_subject (id, subject_id, subject_name, insert into sms_home_recommend_subject (subject_id, subject_name, recommend_status,
recommend_status, sort) sort)
values (#{id,jdbcType=BIGINT}, #{subjectId,jdbcType=BIGINT}, #{subjectName,jdbcType=VARCHAR}, values (#{subjectId,jdbcType=BIGINT}, #{subjectName,jdbcType=VARCHAR}, #{recommendStatus,jdbcType=INTEGER},
#{recommendStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}) #{sort,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsHomeRecommendSubject"> <insert id="insertSelective" parameterType="com.macro.mall.model.SmsHomeRecommendSubject">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sms_home_recommend_subject insert into sms_home_recommend_subject
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="subjectId != null"> <if test="subjectId != null">
subject_id, subject_id,
</if> </if>
@ -129,7 +128,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="subjectId != null"> <if test="subjectId != null">
#{subjectId,jdbcType=BIGINT}, #{subjectId,jdbcType=BIGINT},
</if> </if>

View File

@ -101,23 +101,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.UmsAdminLoginLog"> <insert id="insert" parameterType="com.macro.mall.model.UmsAdminLoginLog">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_admin_login_log (id, admin_id, create_time, insert into ums_admin_login_log (admin_id, create_time, ip,
ip, address, user_agent address, user_agent)
) values (#{adminId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{ip,jdbcType=VARCHAR},
values (#{id,jdbcType=BIGINT}, #{adminId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{address,jdbcType=VARCHAR}, #{userAgent,jdbcType=VARCHAR})
#{ip,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{userAgent,jdbcType=VARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsAdminLoginLog"> <insert id="insertSelective" parameterType="com.macro.mall.model.UmsAdminLoginLog">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_admin_login_log insert into ums_admin_login_log
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="adminId != null"> <if test="adminId != null">
admin_id, admin_id,
</if> </if>
@ -135,7 +132,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="adminId != null"> <if test="adminId != null">
#{adminId,jdbcType=BIGINT}, #{adminId,jdbcType=BIGINT},
</if> </if>

View File

@ -100,21 +100,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.UmsAdmin"> <insert id="insert" parameterType="com.macro.mall.model.UmsAdmin">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_admin (id, username, password, insert into ums_admin (username, password, icon,
icon, email) email)
values (#{id,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, values (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR},
#{icon,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}) #{email,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsAdmin"> <insert id="insertSelective" parameterType="com.macro.mall.model.UmsAdmin">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_admin insert into ums_admin
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="username != null"> <if test="username != null">
username, username,
</if> </if>
@ -129,7 +128,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="username != null"> <if test="username != null">
#{username,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
</if> </if>

View File

@ -104,23 +104,22 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.UmsGrowthChangeHistory"> <insert id="insert" parameterType="com.macro.mall.model.UmsGrowthChangeHistory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_growth_change_history (id, member_id, create_time, insert into ums_growth_change_history (member_id, create_time, change_type,
change_type, change_count, operate_man, change_count, operate_man, operate_note,
operate_note, source_type) source_type)
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, values (#{memberId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{changeType,jdbcType=INTEGER},
#{changeType,jdbcType=INTEGER}, #{changeCount,jdbcType=INTEGER}, #{operateMan,jdbcType=VARCHAR}, #{changeCount,jdbcType=INTEGER}, #{operateMan,jdbcType=VARCHAR}, #{operateNote,jdbcType=VARCHAR},
#{operateNote,jdbcType=VARCHAR}, #{sourceType,jdbcType=INTEGER}) #{sourceType,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsGrowthChangeHistory"> <insert id="insertSelective" parameterType="com.macro.mall.model.UmsGrowthChangeHistory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_growth_change_history insert into ums_growth_change_history
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberId != null"> <if test="memberId != null">
member_id, member_id,
</if> </if>
@ -144,7 +143,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberId != null"> <if test="memberId != null">
#{memberId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT},
</if> </if>

View File

@ -104,23 +104,22 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.UmsIntegrationChangeHistory"> <insert id="insert" parameterType="com.macro.mall.model.UmsIntegrationChangeHistory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_integration_change_history (id, member_id, create_time, insert into ums_integration_change_history (member_id, create_time, change_type,
change_type, change_count, operate_man, change_count, operate_man, operate_note,
operate_note, source_type) source_type)
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, values (#{memberId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{changeType,jdbcType=INTEGER},
#{changeType,jdbcType=INTEGER}, #{changeCount,jdbcType=INTEGER}, #{operateMan,jdbcType=VARCHAR}, #{changeCount,jdbcType=INTEGER}, #{operateMan,jdbcType=VARCHAR}, #{operateNote,jdbcType=VARCHAR},
#{operateNote,jdbcType=VARCHAR}, #{sourceType,jdbcType=INTEGER}) #{sourceType,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsIntegrationChangeHistory"> <insert id="insertSelective" parameterType="com.macro.mall.model.UmsIntegrationChangeHistory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_integration_change_history insert into ums_integration_change_history
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberId != null"> <if test="memberId != null">
member_id, member_id,
</if> </if>
@ -144,7 +143,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberId != null"> <if test="memberId != null">
#{memberId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT},
</if> </if>

View File

@ -100,21 +100,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.UmsIntergrationConsumeSetting"> <insert id="insert" parameterType="com.macro.mall.model.UmsIntergrationConsumeSetting">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_intergration_consume_setting (id, deduction_per_amount, max_percent_per_order, insert into ums_intergration_consume_setting (deduction_per_amount, max_percent_per_order,
use_unit, coupon_status) use_unit, coupon_status)
values (#{id,jdbcType=BIGINT}, #{deductionPerAmount,jdbcType=INTEGER}, #{maxPercentPerOrder,jdbcType=INTEGER}, values (#{deductionPerAmount,jdbcType=INTEGER}, #{maxPercentPerOrder,jdbcType=INTEGER},
#{useUnit,jdbcType=INTEGER}, #{couponStatus,jdbcType=INTEGER}) #{useUnit,jdbcType=INTEGER}, #{couponStatus,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsIntergrationConsumeSetting"> <insert id="insertSelective" parameterType="com.macro.mall.model.UmsIntergrationConsumeSetting">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_intergration_consume_setting insert into ums_intergration_consume_setting
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="deductionPerAmount != null"> <if test="deductionPerAmount != null">
deduction_per_amount, deduction_per_amount,
</if> </if>
@ -129,7 +128,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="deductionPerAmount != null"> <if test="deductionPerAmount != null">
#{deductionPerAmount,jdbcType=INTEGER}, #{deductionPerAmount,jdbcType=INTEGER},
</if> </if>

View File

@ -110,29 +110,26 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.UmsMemberLevel"> <insert id="insert" parameterType="com.macro.mall.model.UmsMemberLevel">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member_level (id, name, growth_point, insert into ums_member_level (name, growth_point, default_status,
default_status, free_freight_point, comment_growth_point, free_freight_point, comment_growth_point, priviledge_free_freight,
priviledge_free_freight, priviledge_sign_in, priviledge_sign_in, priviledge_comment, priviledge_promotion,
priviledge_comment, priviledge_promotion,
priviledge_member_price, priviledge_birthday, priviledge_member_price, priviledge_birthday,
note) note)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{growthPoint,jdbcType=INTEGER}, values (#{name,jdbcType=VARCHAR}, #{growthPoint,jdbcType=INTEGER}, #{defaultStatus,jdbcType=INTEGER},
#{defaultStatus,jdbcType=INTEGER}, #{freeFreightPoint,jdbcType=DECIMAL}, #{commentGrowthPoint,jdbcType=INTEGER}, #{freeFreightPoint,jdbcType=DECIMAL}, #{commentGrowthPoint,jdbcType=INTEGER}, #{priviledgeFreeFreight,jdbcType=INTEGER},
#{priviledgeFreeFreight,jdbcType=INTEGER}, #{priviledgeSignIn,jdbcType=INTEGER}, #{priviledgeSignIn,jdbcType=INTEGER}, #{priviledgeComment,jdbcType=INTEGER}, #{priviledgePromotion,jdbcType=INTEGER},
#{priviledgeComment,jdbcType=INTEGER}, #{priviledgePromotion,jdbcType=INTEGER},
#{priviledgeMemberPrice,jdbcType=INTEGER}, #{priviledgeBirthday,jdbcType=INTEGER}, #{priviledgeMemberPrice,jdbcType=INTEGER}, #{priviledgeBirthday,jdbcType=INTEGER},
#{note,jdbcType=VARCHAR}) #{note,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsMemberLevel"> <insert id="insertSelective" parameterType="com.macro.mall.model.UmsMemberLevel">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member_level insert into ums_member_level
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
@ -171,7 +168,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>

View File

@ -102,23 +102,22 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.UmsMemberLoginLog"> <insert id="insert" parameterType="com.macro.mall.model.UmsMemberLoginLog">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member_login_log (id, member_id, create_time, insert into ums_member_login_log (member_id, create_time, ip,
ip, city, login_type, city, login_type, province
province) )
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, values (#{memberId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{ip,jdbcType=VARCHAR},
#{ip,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{loginType,jdbcType=INTEGER}, #{city,jdbcType=VARCHAR}, #{loginType,jdbcType=INTEGER}, #{province,jdbcType=VARCHAR}
#{province,jdbcType=VARCHAR}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsMemberLoginLog"> <insert id="insertSelective" parameterType="com.macro.mall.model.UmsMemberLoginLog">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member_login_log insert into ums_member_login_log
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberId != null"> <if test="memberId != null">
member_id, member_id,
</if> </if>
@ -139,7 +138,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberId != null"> <if test="memberId != null">
#{memberId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT},
</if> </if>

View File

@ -116,31 +116,28 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.UmsMember"> <insert id="insert" parameterType="com.macro.mall.model.UmsMember">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member (id, member_level_id, username, insert into ums_member (member_level_id, username, password,
password, nickname, phone, nickname, phone, status,
status, create_time, icon, create_time, icon, gender,
gender, birthday, city, birthday, city, job, personalized_signature,
job, personalized_signature, source_type, source_type, integration, growth,
integration, growth, luckey_count, luckey_count, history_integration)
history_integration) values (#{memberLevelId,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
values (#{id,jdbcType=BIGINT}, #{memberLevelId,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{password,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{icon,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{icon,jdbcType=VARCHAR}, #{birthday,jdbcType=DATE}, #{city,jdbcType=VARCHAR}, #{job,jdbcType=VARCHAR}, #{personalizedSignature,jdbcType=VARCHAR},
#{gender,jdbcType=INTEGER}, #{birthday,jdbcType=DATE}, #{city,jdbcType=VARCHAR}, #{sourceType,jdbcType=INTEGER}, #{integration,jdbcType=INTEGER}, #{growth,jdbcType=INTEGER},
#{job,jdbcType=VARCHAR}, #{personalizedSignature,jdbcType=VARCHAR}, #{sourceType,jdbcType=INTEGER}, #{luckeyCount,jdbcType=INTEGER}, #{historyIntegration,jdbcType=INTEGER})
#{integration,jdbcType=INTEGER}, #{growth,jdbcType=INTEGER}, #{luckeyCount,jdbcType=INTEGER},
#{historyIntegration,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsMember"> <insert id="insertSelective" parameterType="com.macro.mall.model.UmsMember">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member insert into ums_member
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberLevelId != null"> <if test="memberLevelId != null">
member_level_id, member_level_id,
</if> </if>
@ -197,7 +194,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberLevelId != null"> <if test="memberLevelId != null">
#{memberLevelId,jdbcType=BIGINT}, #{memberLevelId,jdbcType=BIGINT},
</if> </if>

View File

@ -98,21 +98,18 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.UmsMemberMemberTagRelation"> <insert id="insert" parameterType="com.macro.mall.model.UmsMemberMemberTagRelation">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member_member_tag_relation (id, member_id, tag_id insert into ums_member_member_tag_relation (member_id, tag_id)
) values (#{memberId,jdbcType=BIGINT}, #{tagId,jdbcType=BIGINT})
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{tagId,jdbcType=BIGINT}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsMemberMemberTagRelation"> <insert id="insertSelective" parameterType="com.macro.mall.model.UmsMemberMemberTagRelation">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member_member_tag_relation insert into ums_member_member_tag_relation
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberId != null"> <if test="memberId != null">
member_id, member_id,
</if> </if>
@ -121,7 +118,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberId != null"> <if test="memberId != null">
#{memberId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT},
</if> </if>

View File

@ -98,21 +98,18 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.UmsMemberProductCategoryRelation"> <insert id="insert" parameterType="com.macro.mall.model.UmsMemberProductCategoryRelation">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member_product_category_relation (id, member_id, product_category_id insert into ums_member_product_category_relation (member_id, product_category_id)
) values (#{memberId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT})
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsMemberProductCategoryRelation"> <insert id="insertSelective" parameterType="com.macro.mall.model.UmsMemberProductCategoryRelation">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member_product_category_relation insert into ums_member_product_category_relation
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberId != null"> <if test="memberId != null">
member_id, member_id,
</if> </if>
@ -121,7 +118,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberId != null"> <if test="memberId != null">
#{memberId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT},
</if> </if>

View File

@ -102,23 +102,22 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.UmsMemberReceiveAddress"> <insert id="insert" parameterType="com.macro.mall.model.UmsMemberReceiveAddress">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member_receive_address (id, member_id, name, insert into ums_member_receive_address (member_id, name, phone_number,
phone_number, address, post_code, address, post_code, default_status
default_status) )
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, values (#{memberId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{phoneNumber,jdbcType=VARCHAR},
#{phoneNumber,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{postCode,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{postCode,jdbcType=VARCHAR}, #{defaultStatus,jdbcType=INTEGER}
#{defaultStatus,jdbcType=INTEGER}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsMemberReceiveAddress"> <insert id="insertSelective" parameterType="com.macro.mall.model.UmsMemberReceiveAddress">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member_receive_address insert into ums_member_receive_address
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberId != null"> <if test="memberId != null">
member_id, member_id,
</if> </if>
@ -139,7 +138,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberId != null"> <if test="memberId != null">
#{memberId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT},
</if> </if>

View File

@ -103,23 +103,22 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.UmsMemberRuleSetting"> <insert id="insert" parameterType="com.macro.mall.model.UmsMemberRuleSetting">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member_rule_setting (id, continue_sign_day, continue_sign_point, insert into ums_member_rule_setting (continue_sign_day, continue_sign_point,
consume_per_point, low_order_amount, max_point_per_order, consume_per_point, low_order_amount, max_point_per_order,
type) type)
values (#{id,jdbcType=BIGINT}, #{continueSignDay,jdbcType=INTEGER}, #{continueSignPoint,jdbcType=INTEGER}, values (#{continueSignDay,jdbcType=INTEGER}, #{continueSignPoint,jdbcType=INTEGER},
#{consumePerPoint,jdbcType=DECIMAL}, #{lowOrderAmount,jdbcType=DECIMAL}, #{maxPointPerOrder,jdbcType=INTEGER}, #{consumePerPoint,jdbcType=DECIMAL}, #{lowOrderAmount,jdbcType=DECIMAL}, #{maxPointPerOrder,jdbcType=INTEGER},
#{type,jdbcType=INTEGER}) #{type,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsMemberRuleSetting"> <insert id="insertSelective" parameterType="com.macro.mall.model.UmsMemberRuleSetting">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member_rule_setting insert into ums_member_rule_setting
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="continueSignDay != null"> <if test="continueSignDay != null">
continue_sign_day, continue_sign_day,
</if> </if>
@ -140,7 +139,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="continueSignDay != null"> <if test="continueSignDay != null">
#{continueSignDay,jdbcType=INTEGER}, #{continueSignDay,jdbcType=INTEGER},
</if> </if>

View File

@ -113,29 +113,28 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.UmsMemberStatisticsInfo"> <insert id="insert" parameterType="com.macro.mall.model.UmsMemberStatisticsInfo">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member_statistics_info (id, member_id, consume_amount, insert into ums_member_statistics_info (member_id, consume_amount, order_count,
order_count, coupon_count, comment_count, coupon_count, comment_count, return_order_count,
return_order_count, login_count, attend_count, login_count, attend_count, fans_count,
fans_count, collect_product_count, collect_subject_count, collect_product_count, collect_subject_count,
collect_topic_count, collect_comment_count, collect_topic_count, collect_comment_count,
invite_friend_count, recent_order_time) invite_friend_count, recent_order_time)
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{consumeAmount,jdbcType=DECIMAL}, values (#{memberId,jdbcType=BIGINT}, #{consumeAmount,jdbcType=DECIMAL}, #{orderCount,jdbcType=INTEGER},
#{orderCount,jdbcType=INTEGER}, #{couponCount,jdbcType=INTEGER}, #{commentCount,jdbcType=INTEGER}, #{couponCount,jdbcType=INTEGER}, #{commentCount,jdbcType=INTEGER}, #{returnOrderCount,jdbcType=INTEGER},
#{returnOrderCount,jdbcType=INTEGER}, #{loginCount,jdbcType=INTEGER}, #{attendCount,jdbcType=INTEGER}, #{loginCount,jdbcType=INTEGER}, #{attendCount,jdbcType=INTEGER}, #{fansCount,jdbcType=INTEGER},
#{fansCount,jdbcType=INTEGER}, #{collectProductCount,jdbcType=INTEGER}, #{collectSubjectCount,jdbcType=INTEGER}, #{collectProductCount,jdbcType=INTEGER}, #{collectSubjectCount,jdbcType=INTEGER},
#{collectTopicCount,jdbcType=INTEGER}, #{collectCommentCount,jdbcType=INTEGER}, #{collectTopicCount,jdbcType=INTEGER}, #{collectCommentCount,jdbcType=INTEGER},
#{inviteFriendCount,jdbcType=INTEGER}, #{recentOrderTime,jdbcType=TIMESTAMP}) #{inviteFriendCount,jdbcType=INTEGER}, #{recentOrderTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsMemberStatisticsInfo"> <insert id="insertSelective" parameterType="com.macro.mall.model.UmsMemberStatisticsInfo">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member_statistics_info insert into ums_member_statistics_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberId != null"> <if test="memberId != null">
member_id, member_id,
</if> </if>
@ -183,7 +182,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberId != null"> <if test="memberId != null">
#{memberId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT},
</if> </if>

View File

@ -99,21 +99,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.UmsMemberTag"> <insert id="insert" parameterType="com.macro.mall.model.UmsMemberTag">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member_tag (id, name, finish_order_count, insert into ums_member_tag (name, finish_order_count, finish_order_amount
finish_order_amount) )
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{finishOrderCount,jdbcType=INTEGER}, values (#{name,jdbcType=VARCHAR}, #{finishOrderCount,jdbcType=INTEGER}, #{finishOrderAmount,jdbcType=DECIMAL}
#{finishOrderAmount,jdbcType=DECIMAL}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsMemberTag"> <insert id="insertSelective" parameterType="com.macro.mall.model.UmsMemberTag">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member_tag insert into ums_member_tag
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
@ -125,7 +124,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>

View File

@ -100,21 +100,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.UmsMemberTask"> <insert id="insert" parameterType="com.macro.mall.model.UmsMemberTask">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member_task (id, name, growth, insert into ums_member_task (name, growth, intergration,
intergration, type) type)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{growth,jdbcType=INTEGER}, values (#{name,jdbcType=VARCHAR}, #{growth,jdbcType=INTEGER}, #{intergration,jdbcType=INTEGER},
#{intergration,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}) #{type,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsMemberTask"> <insert id="insertSelective" parameterType="com.macro.mall.model.UmsMemberTask">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into ums_member_task insert into ums_member_task
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
@ -129,7 +128,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>

View File

@ -34,7 +34,7 @@
targetProject="mall-mbg\src\main\java"/> targetProject="mall-mbg\src\main\java"/>
<table tableName="%"> <table tableName="%">
<generatedKey column="id" sqlStatement="MySql"/> <generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table> </table>
</context> </context>
</generatorConfiguration> </generatorConfiguration>