修复主键重名问题

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.web.bind.annotation.*;
import java.util.List;
/**
* 品牌功能Controller
*/
@ -54,7 +56,7 @@ public class PmsBrandController {
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
@ResponseBody
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());
}
CommonResult commonResult;
@ -75,20 +77,21 @@ public class PmsBrandController {
public Object deleteBrand(@PathVariable("id") Long id) {
int count = brandService.deleteBrand(id);
if (count == 1) {
LOGGER.debug("deleteBrand success :id={}", id);
LOGGER.debug("deleteBrand success:id={}", id);
return new CommonResult().success(null);
} else {
LOGGER.debug("deleteBrand failed :id={}", id);
LOGGER.debug("deleteBrand failed:id={}", id);
return new CommonResult().failed();
}
}
@ApiOperation(value = "分页获取品牌列表")
@ApiOperation(value = "根据品牌名称分页获取品牌列表")
@RequestMapping(value = "/list", method = RequestMethod.GET)
@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) {
return new CommonResult().pageSuccess(brandService.listBrand(pageNum, pageSize));
return new CommonResult().pageSuccess(brandService.listBrand(keyword, pageNum, pageSize));
}
@ApiOperation(value = "根据编号查询品牌信息")
@ -97,4 +100,32 @@ public class PmsBrandController {
public Object getBrand(@PathVariable("id") Long 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);
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);
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.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import java.util.List;
@ -29,6 +30,10 @@ public class PmsBrandServiceImpl implements PmsBrandService{
public int createBrand(PmsBrandParam pmsBrandParam) {
PmsBrand pmsBrand = new PmsBrand();
BeanUtils.copyProperties(pmsBrandParam,pmsBrand);
//如果创建时首字母为空取名称的第一个为首字母
if(StringUtils.isEmpty(pmsBrand.getFirstLetter())){
pmsBrand.setFirstLetter(pmsBrand.getName().substring(0,1));
}
return brandMapper.insertSelective(pmsBrand);
}
@ -37,6 +42,10 @@ public class PmsBrandServiceImpl implements PmsBrandService{
PmsBrand pmsBrand = new PmsBrand();
BeanUtils.copyProperties(pmsBrandParam,pmsBrand);
pmsBrand.setId(id);
//如果创建时首字母为空取名称的第一个为首字母
if(StringUtils.isEmpty(pmsBrand.getFirstLetter())){
pmsBrand.setFirstLetter(pmsBrand.getName().substring(0,1));
}
return brandMapper.updateByPrimaryKeySelective(pmsBrand);
}
@ -46,13 +55,33 @@ public class PmsBrandServiceImpl implements PmsBrandService{
}
@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);
return brandMapper.selectByExample(new PmsBrandExample());
PmsBrandExample pmsBrandExample = new PmsBrandExample();
if(!StringUtils.isEmpty(keyword)){
pmsBrandExample.createCriteria().andNameLike("%"+keyword+"%");
}
return brandMapper.selectByExample(pmsBrandExample);
}
@Override
public PmsBrand getBrand(Long 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>
</delete>
<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()
</selectKey>
insert into cms_help_category (id, name, icon,
help_count, show_status, sort
)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR},
#{helpCount,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}
)
insert into cms_help_category (name, icon, help_count,
show_status, sort)
values (#{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{helpCount,jdbcType=INTEGER},
#{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
</insert>
<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()
</selectKey>
insert into cms_help_category
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null">
name,
</if>
@ -135,7 +132,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>

View File

@ -126,23 +126,22 @@
</if>
</delete>
<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()
</selectKey>
insert into cms_help (id, category_id, icon,
title, show_status, create_time,
read_count, content)
values (#{id,jdbcType=BIGINT}, #{categoryId,jdbcType=BIGINT}, #{icon,jdbcType=VARCHAR},
#{title,jdbcType=VARCHAR}, #{showStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{readCount,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR})
insert into cms_help (category_id, icon, title,
show_status, create_time, read_count,
content)
values (#{categoryId,jdbcType=BIGINT}, #{icon,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
#{showStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{readCount,jdbcType=INTEGER},
#{content,jdbcType=LONGVARCHAR})
</insert>
<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()
</selectKey>
insert into cms_help
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="categoryId != null">
category_id,
</if>
@ -166,7 +165,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="categoryId != null">
#{categoryId,jdbcType=BIGINT},
</if>

View File

@ -94,23 +94,22 @@
</if>
</delete>
<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()
</selectKey>
insert into cms_member_report (id, report_type, report_member_name,
create_time, report_object, report_status,
handle_status, note)
values (#{id,jdbcType=BIGINT}, #{reportType,jdbcType=INTEGER}, #{reportMemberName,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{reportObject,jdbcType=VARCHAR}, #{reportStatus,jdbcType=INTEGER},
#{handleStatus,jdbcType=INTEGER}, #{note,jdbcType=VARCHAR})
insert into cms_member_report (report_type, report_member_name, create_time,
report_object, report_status, handle_status,
note)
values (#{reportType,jdbcType=INTEGER}, #{reportMemberName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{reportObject,jdbcType=VARCHAR}, #{reportStatus,jdbcType=INTEGER}, #{handleStatus,jdbcType=INTEGER},
#{note,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into cms_member_report
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="reportType != null">
report_type,
</if>
@ -134,7 +133,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="reportType != null">
#{reportType,jdbcType=INTEGER},
</if>

View File

@ -124,23 +124,20 @@
</if>
</delete>
<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()
</selectKey>
insert into cms_prefrence_area (id, name, sub_title,
sort, show_status, pic
)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{subTitle,jdbcType=VARCHAR},
#{sort,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER}, #{pic,jdbcType=VARBINARY}
)
insert into cms_prefrence_area (name, sub_title, sort,
show_status, pic)
values (#{name,jdbcType=VARCHAR}, #{subTitle,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
#{showStatus,jdbcType=INTEGER}, #{pic,jdbcType=VARBINARY})
</insert>
<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()
</selectKey>
insert into cms_prefrence_area
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null">
name,
</if>
@ -158,7 +155,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>

View File

@ -98,21 +98,18 @@
</if>
</delete>
<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()
</selectKey>
insert into cms_prefrence_area_product_relation (id, prefrence_area_id, product_id
)
values (#{id,jdbcType=BIGINT}, #{prefrenceAreaId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}
)
insert into cms_prefrence_area_product_relation (prefrence_area_id, product_id)
values (#{prefrenceAreaId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT})
</insert>
<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()
</selectKey>
insert into cms_prefrence_area_product_relation
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="prefrenceAreaId != null">
prefrence_area_id,
</if>
@ -121,7 +118,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="prefrenceAreaId != null">
#{prefrenceAreaId,jdbcType=BIGINT},
</if>

View File

@ -101,23 +101,20 @@
</if>
</delete>
<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()
</selectKey>
insert into cms_subject_category (id, name, icon,
subject_count, show_status, sort
)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR},
#{subjectCount,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}
)
insert into cms_subject_category (name, icon, subject_count,
show_status, sort)
values (#{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{subjectCount,jdbcType=INTEGER},
#{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
</insert>
<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()
</selectKey>
insert into cms_subject_category
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null">
name,
</if>
@ -135,7 +132,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>

View File

@ -102,23 +102,22 @@
</if>
</delete>
<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()
</selectKey>
insert into cms_subject_comment (id, subject_id, member_nick_name,
member_icon, content, create_time,
show_status)
values (#{id,jdbcType=BIGINT}, #{subjectId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR},
#{memberIcon,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{showStatus,jdbcType=INTEGER})
insert into cms_subject_comment (subject_id, member_nick_name, member_icon,
content, create_time, show_status
)
values (#{subjectId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, #{memberIcon,jdbcType=VARCHAR},
#{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{showStatus,jdbcType=INTEGER}
)
</insert>
<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()
</selectKey>
insert into cms_subject_comment
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="subjectId != null">
subject_id,
</if>
@ -139,7 +138,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="subjectId != null">
#{subjectId,jdbcType=BIGINT},
</if>

View File

@ -134,29 +134,26 @@
</if>
</delete>
<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()
</selectKey>
insert into cms_subject (id, category_id, title,
pic, product_count, recommend_status,
create_time, collect_count, read_count,
comment_count, album_pics, description,
show_status, forward_count, content
)
values (#{id,jdbcType=BIGINT}, #{categoryId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR},
#{pic,jdbcType=VARCHAR}, #{productCount,jdbcType=INTEGER}, #{recommendStatus,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{collectCount,jdbcType=INTEGER}, #{readCount,jdbcType=INTEGER},
#{commentCount,jdbcType=INTEGER}, #{albumPics,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{showStatus,jdbcType=INTEGER}, #{forwardCount,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR}
)
insert into cms_subject (category_id, title, pic,
product_count, recommend_status, create_time,
collect_count, read_count, comment_count,
album_pics, description, show_status,
forward_count, content)
values (#{categoryId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR},
#{productCount,jdbcType=INTEGER}, #{recommendStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{collectCount,jdbcType=INTEGER}, #{readCount,jdbcType=INTEGER}, #{commentCount,jdbcType=INTEGER},
#{albumPics,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{showStatus,jdbcType=INTEGER},
#{forwardCount,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR})
</insert>
<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()
</selectKey>
insert into cms_subject
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="categoryId != null">
category_id,
</if>
@ -201,7 +198,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="categoryId != null">
#{categoryId,jdbcType=BIGINT},
</if>

View File

@ -98,21 +98,18 @@
</if>
</delete>
<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()
</selectKey>
insert into cms_subject_product_relation (id, subject_id, product_id
)
values (#{id,jdbcType=BIGINT}, #{subjectId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}
)
insert into cms_subject_product_relation (subject_id, product_id)
values (#{subjectId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT})
</insert>
<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()
</selectKey>
insert into cms_subject_product_relation
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="subjectId != null">
subject_id,
</if>
@ -121,7 +118,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="subjectId != null">
#{subjectId,jdbcType=BIGINT},
</if>

View File

@ -101,23 +101,20 @@
</if>
</delete>
<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()
</selectKey>
insert into cms_topic_category (id, name, icon,
subject_count, show_status, sort
)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR},
#{subjectCount,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}
)
insert into cms_topic_category (name, icon, subject_count,
show_status, sort)
values (#{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{subjectCount,jdbcType=INTEGER},
#{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
</insert>
<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()
</selectKey>
insert into cms_topic_category
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null">
name,
</if>
@ -135,7 +132,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>

View File

@ -102,23 +102,22 @@
</if>
</delete>
<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()
</selectKey>
insert into cms_topic_comment (id, member_nick_name, topic_id,
member_icon, content, create_time,
show_status)
values (#{id,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, #{topicId,jdbcType=BIGINT},
#{memberIcon,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{showStatus,jdbcType=INTEGER})
insert into cms_topic_comment (member_nick_name, topic_id, member_icon,
content, create_time, show_status
)
values (#{memberNickName,jdbcType=VARCHAR}, #{topicId,jdbcType=BIGINT}, #{memberIcon,jdbcType=VARCHAR},
#{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{showStatus,jdbcType=INTEGER}
)
</insert>
<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()
</selectKey>
insert into cms_topic_comment
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberNickName != null">
member_nick_name,
</if>
@ -139,7 +138,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberNickName != null">
#{memberNickName,jdbcType=VARCHAR},
</if>

View File

@ -131,27 +131,24 @@
</if>
</delete>
<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()
</selectKey>
insert into cms_topic (id, category_id, name,
create_time, start_time, end_time,
attend_count, attention_count, read_count,
award_name, attend_type, content
)
values (#{id,jdbcType=BIGINT}, #{categoryId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
#{attendCount,jdbcType=INTEGER}, #{attentionCount,jdbcType=INTEGER}, #{readCount,jdbcType=INTEGER},
#{awardName,jdbcType=VARCHAR}, #{attendType,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR}
)
insert into cms_topic (category_id, name, create_time,
start_time, end_time, attend_count,
attention_count, read_count, award_name,
attend_type, content)
values (#{categoryId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{attendCount,jdbcType=INTEGER},
#{attentionCount,jdbcType=INTEGER}, #{readCount,jdbcType=INTEGER}, #{awardName,jdbcType=VARCHAR},
#{attendType,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR})
</insert>
<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()
</selectKey>
insert into cms_topic
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="categoryId != null">
category_id,
</if>
@ -187,7 +184,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="categoryId != null">
#{categoryId,jdbcType=BIGINT},
</if>

View File

@ -104,25 +104,22 @@
</if>
</delete>
<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()
</selectKey>
insert into oms_company_address (id, address_name, send_status,
receive_status, name, phone,
province, city, region
)
values (#{id,jdbcType=BIGINT}, #{addressName,jdbcType=VARCHAR}, #{sendStatus,jdbcType=INTEGER},
#{receiveStatus,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
#{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{region,jdbcType=VARCHAR}
)
insert into oms_company_address (address_name, send_status, receive_status,
name, phone, province,
city, region)
values (#{addressName,jdbcType=VARCHAR}, #{sendStatus,jdbcType=INTEGER}, #{receiveStatus,jdbcType=INTEGER},
#{name,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR},
#{city,jdbcType=VARCHAR}, #{region,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into oms_company_address
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="addressName != null">
address_name,
</if>
@ -149,7 +146,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="addressName != null">
#{addressName,jdbcType=VARCHAR},
</if>

View File

@ -110,27 +110,26 @@
</if>
</delete>
<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()
</selectKey>
insert into oms_order_item (id, order_id, order_sn,
product_id, proudct_pic, product_name,
product_brand, product_sn, product_amount,
product_count, product_real_amount, sp1,
sp2, sp3)
values (#{id,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT}, #{orderSn,jdbcType=VARCHAR},
#{productId,jdbcType=BIGINT}, #{proudctPic,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR},
#{productBrand,jdbcType=VARCHAR}, #{productSn,jdbcType=VARCHAR}, #{productAmount,jdbcType=DECIMAL},
#{productCount,jdbcType=INTEGER}, #{productRealAmount,jdbcType=DECIMAL}, #{sp1,jdbcType=VARCHAR},
#{sp2,jdbcType=VARCHAR}, #{sp3,jdbcType=VARCHAR})
insert into oms_order_item (order_id, order_sn, product_id,
proudct_pic, product_name, product_brand,
product_sn, product_amount, product_count,
product_real_amount, sp1, sp2,
sp3)
values (#{orderId,jdbcType=BIGINT}, #{orderSn,jdbcType=VARCHAR}, #{productId,jdbcType=BIGINT},
#{proudctPic,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR}, #{productBrand,jdbcType=VARCHAR},
#{productSn,jdbcType=VARCHAR}, #{productAmount,jdbcType=DECIMAL}, #{productCount,jdbcType=INTEGER},
#{productRealAmount,jdbcType=DECIMAL}, #{sp1,jdbcType=VARCHAR}, #{sp2,jdbcType=VARCHAR},
#{sp3,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into oms_order_item
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="orderId != null">
order_id,
</if>
@ -172,7 +171,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="orderId != null">
#{orderId,jdbcType=BIGINT},
</if>

View File

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

View File

@ -101,23 +101,20 @@
</if>
</delete>
<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()
</selectKey>
insert into oms_order_operate_history (id, order_id, operate_man,
create_time, order_status, note
)
values (#{id,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT}, #{operateMan,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{orderStatus,jdbcType=INTEGER}, #{note,jdbcType=VARCHAR}
)
insert into oms_order_operate_history (order_id, operate_man, create_time,
order_status, note)
values (#{orderId,jdbcType=BIGINT}, #{operateMan,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{orderStatus,jdbcType=INTEGER}, #{note,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into oms_order_operate_history
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="orderId != null">
order_id,
</if>
@ -135,7 +132,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="orderId != null">
#{orderId,jdbcType=BIGINT},
</if>

View File

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

View File

@ -99,21 +99,20 @@
</if>
</delete>
<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()
</selectKey>
insert into oms_order_return_reason (id, name, sort,
status)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
#{status,jdbcType=INTEGER})
insert into oms_order_return_reason (name, sort, status
)
values (#{name,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}
)
</insert>
<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()
</selectKey>
insert into oms_order_return_reason
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null">
name,
</if>
@ -125,7 +124,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>

View File

@ -102,23 +102,22 @@
</if>
</delete>
<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()
</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
)
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}
)
</insert>
<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()
</selectKey>
insert into oms_order_setting
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="flashOrderOvertime != null">
flash_order_overtime,
</if>
@ -136,7 +135,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="flashOrderOvertime != null">
#{flashOrderOvertime,jdbcType=INTEGER},
</if>

View File

@ -101,23 +101,20 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_album (id, name, cover_pic,
pic_count, sort, description
)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{coverPic,jdbcType=VARCHAR},
#{picCount,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR}
)
insert into pms_album (name, cover_pic, pic_count,
sort, description)
values (#{name,jdbcType=VARCHAR}, #{coverPic,jdbcType=VARCHAR}, #{picCount,jdbcType=INTEGER},
#{sort,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into pms_album
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null">
name,
</if>
@ -135,7 +132,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>

View File

@ -98,21 +98,18 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_album_pic (id, album_id, pic
)
values (#{id,jdbcType=BIGINT}, #{albumId,jdbcType=BIGINT}, #{pic,jdbcType=VARCHAR}
)
insert into pms_album_pic (album_id, pic)
values (#{albumId,jdbcType=BIGINT}, #{pic,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into pms_album_pic
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="albumId != null">
album_id,
</if>
@ -121,7 +118,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="albumId != null">
#{albumId,jdbcType=BIGINT},
</if>

View File

@ -130,25 +130,24 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_brand (id, name, first_letter,
sort, factory_status, show_status,
product_count, product_comment_count, logo,
big_pic, brand_story)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{firstLetter,jdbcType=VARCHAR},
#{sort,jdbcType=INTEGER}, #{factoryStatus,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER},
#{productCount,jdbcType=INTEGER}, #{productCommentCount,jdbcType=INTEGER}, #{logo,jdbcType=VARCHAR},
#{bigPic,jdbcType=VARCHAR}, #{brandStory,jdbcType=LONGVARCHAR})
insert into pms_brand (name, first_letter, sort,
factory_status, show_status, product_count,
product_comment_count, logo, big_pic,
brand_story)
values (#{name,jdbcType=VARCHAR}, #{firstLetter,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
#{factoryStatus,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER}, #{productCount,jdbcType=INTEGER},
#{productCommentCount,jdbcType=INTEGER}, #{logo,jdbcType=VARCHAR}, #{bigPic,jdbcType=VARCHAR},
#{brandStory,jdbcType=LONGVARCHAR})
</insert>
<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()
</selectKey>
insert into pms_brand
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null">
name,
</if>
@ -181,7 +180,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>

View File

@ -134,29 +134,26 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_comment (id, product_id, member_nick_name,
product_name, star, member_ip,
create_time, show_status, product_attribute,
collect_couont, read_count, pics,
member_icon, replay_count, content
)
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR},
#{productName,jdbcType=VARCHAR}, #{star,jdbcType=INTEGER}, #{memberIp,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{showStatus,jdbcType=INTEGER}, #{productAttribute,jdbcType=VARCHAR},
#{collectCouont,jdbcType=INTEGER}, #{readCount,jdbcType=INTEGER}, #{pics,jdbcType=VARCHAR},
#{memberIcon,jdbcType=VARCHAR}, #{replayCount,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR}
)
insert into pms_comment (product_id, member_nick_name, product_name,
star, member_ip, create_time,
show_status, product_attribute, collect_couont,
read_count, pics, member_icon,
replay_count, content)
values (#{productId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR},
#{star,jdbcType=INTEGER}, #{memberIp,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{showStatus,jdbcType=INTEGER}, #{productAttribute,jdbcType=VARCHAR}, #{collectCouont,jdbcType=INTEGER},
#{readCount,jdbcType=INTEGER}, #{pics,jdbcType=VARCHAR}, #{memberIcon,jdbcType=VARCHAR},
#{replayCount,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR})
</insert>
<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()
</selectKey>
insert into pms_comment
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null">
product_id,
</if>
@ -201,7 +198,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null">
#{productId,jdbcType=BIGINT},
</if>

View File

@ -102,23 +102,22 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_comment_replay (id, comment_id, member_nick_name,
member_icon, content, create_time,
type)
values (#{id,jdbcType=BIGINT}, #{commentId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR},
#{memberIcon,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{type,jdbcType=INTEGER})
insert into pms_comment_replay (comment_id, member_nick_name, member_icon,
content, create_time, type
)
values (#{commentId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, #{memberIcon,jdbcType=VARCHAR},
#{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{type,jdbcType=INTEGER}
)
</insert>
<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()
</selectKey>
insert into pms_comment_replay
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="commentId != null">
comment_id,
</if>
@ -139,7 +138,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="commentId != null">
#{commentId,jdbcType=BIGINT},
</if>

View File

@ -103,23 +103,22 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_feight_template (id, name, charge_type,
first_weight, first_fee, continue_weight,
continme_fee, dest)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{chargeType,jdbcType=INTEGER},
#{firstWeight,jdbcType=DECIMAL}, #{firstFee,jdbcType=DECIMAL}, #{continueWeight,jdbcType=DECIMAL},
#{continmeFee,jdbcType=DECIMAL}, #{dest,jdbcType=VARCHAR})
insert into pms_feight_template (name, charge_type, first_weight,
first_fee, continue_weight, continme_fee,
dest)
values (#{name,jdbcType=VARCHAR}, #{chargeType,jdbcType=INTEGER}, #{firstWeight,jdbcType=DECIMAL},
#{firstFee,jdbcType=DECIMAL}, #{continueWeight,jdbcType=DECIMAL}, #{continmeFee,jdbcType=DECIMAL},
#{dest,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into pms_feight_template
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null">
name,
</if>
@ -143,7 +142,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>

View File

@ -99,21 +99,20 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_member_price (id, product_id, member_level_id,
member_price)
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{memberLevelId,jdbcType=BIGINT},
#{memberPrice,jdbcType=DECIMAL})
insert into pms_member_price (product_id, member_level_id, member_price
)
values (#{productId,jdbcType=BIGINT}, #{memberLevelId,jdbcType=BIGINT}, #{memberPrice,jdbcType=DECIMAL}
)
</insert>
<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()
</selectKey>
insert into pms_member_price
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null">
product_id,
</if>
@ -125,7 +124,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null">
#{productId,jdbcType=BIGINT},
</if>

View File

@ -99,21 +99,20 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_product_attribute_category (id, name, attribute_count,
param_count)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{attributeCount,jdbcType=INTEGER},
#{paramCount,jdbcType=INTEGER})
insert into pms_product_attribute_category (name, attribute_count, param_count
)
values (#{name,jdbcType=VARCHAR}, #{attributeCount,jdbcType=INTEGER}, #{paramCount,jdbcType=INTEGER}
)
</insert>
<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()
</selectKey>
insert into pms_product_attribute_category
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null">
name,
</if>
@ -125,7 +124,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>

View File

@ -108,27 +108,26 @@
</if>
</delete>
<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()
</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,
sort, filter_type, search_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},
#{sort,jdbcType=INTEGER}, #{filterType,jdbcType=INTEGER}, #{searchType,jdbcType=INTEGER},
#{relatedStatus,jdbcType=INTEGER}, #{handAddStatus,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}
)
</insert>
<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()
</selectKey>
insert into pms_product_attribute
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productAttributeCategoryId != null">
product_attribute_category_id,
</if>
@ -164,7 +163,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productAttributeCategoryId != null">
#{productAttributeCategoryId,jdbcType=BIGINT},
</if>

View File

@ -99,21 +99,20 @@
</if>
</delete>
<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()
</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)
values (#{id,jdbcType=BIGINT}, #{pmsProductId,jdbcType=BIGINT}, #{pmsProductAttributeId,jdbcType=BIGINT},
values (#{pmsProductId,jdbcType=BIGINT}, #{pmsProductAttributeId,jdbcType=BIGINT},
#{value,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into pms_product_attribute_value
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="pmsProductId != null">
pms_product_id,
</if>
@ -125,7 +124,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="pmsProductId != null">
#{pmsProductId,jdbcType=BIGINT},
</if>

View File

@ -98,21 +98,20 @@
</if>
</delete>
<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()
</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 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()
</selectKey>
insert into pms_product_category_attribute_relation
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productCategoryId != null">
product_category_id,
</if>
@ -121,7 +120,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productCategoryId != null">
#{productCategoryId,jdbcType=BIGINT},
</if>

View File

@ -131,27 +131,24 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_product_category (id, parent_id, name,
level, product_count, product_unit,
nav_status, show_status, sort,
icon, keywords, description
)
values (#{id,jdbcType=BIGINT}, #{parentId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{level,jdbcType=INTEGER}, #{productCount,jdbcType=INTEGER}, #{productUnit,jdbcType=VARCHAR},
#{navStatus,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
#{icon,jdbcType=VARCHAR}, #{keywords,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR}
)
insert into pms_product_category (parent_id, name, level,
product_count, product_unit, nav_status,
show_status, sort, icon,
keywords, description)
values (#{parentId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER},
#{productCount,jdbcType=INTEGER}, #{productUnit,jdbcType=VARCHAR}, #{navStatus,jdbcType=INTEGER},
#{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{icon,jdbcType=VARCHAR},
#{keywords,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR})
</insert>
<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()
</selectKey>
insert into pms_product_category
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="parentId != null">
parent_id,
</if>
@ -187,7 +184,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="parentId != null">
#{parentId,jdbcType=BIGINT},
</if>

View File

@ -99,21 +99,20 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_product_full_reduction (id, product_id, full_price,
reduce_price)
values (#{id,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT}, #{fullPrice,jdbcType=DECIMAL},
#{reducePrice,jdbcType=DECIMAL})
insert into pms_product_full_reduction (product_id, full_price, reduce_price
)
values (#{productId,jdbcType=BIGINT}, #{fullPrice,jdbcType=DECIMAL}, #{reducePrice,jdbcType=DECIMAL}
)
</insert>
<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()
</selectKey>
insert into pms_product_full_reduction
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null">
product_id,
</if>
@ -125,7 +124,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=INTEGER},
<if test="productId != null">
#{productId,jdbcType=BIGINT},
</if>

View File

@ -100,21 +100,20 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_product_ladder (id, product_id, count,
discount, price)
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{count,jdbcType=INTEGER},
#{discount,jdbcType=DECIMAL}, #{price,jdbcType=DECIMAL})
insert into pms_product_ladder (product_id, count, discount,
price)
values (#{productId,jdbcType=BIGINT}, #{count,jdbcType=INTEGER}, #{discount,jdbcType=DECIMAL},
#{price,jdbcType=DECIMAL})
</insert>
<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()
</selectKey>
insert into pms_product_ladder
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null">
product_id,
</if>
@ -129,7 +128,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null">
#{productId,jdbcType=BIGINT},
</if>

View File

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

View File

@ -108,27 +108,24 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_product_operate_log (id, product_id, price_old,
price_new, sale_price_old, sale_price_new,
gift_point_old, gift_point_new, use_point_limit_old,
use_point_limit_new, operate_man, create_time
)
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{priceOld,jdbcType=DECIMAL},
#{priceNew,jdbcType=DECIMAL}, #{salePriceOld,jdbcType=DECIMAL}, #{salePriceNew,jdbcType=DECIMAL},
#{giftPointOld,jdbcType=INTEGER}, #{giftPointNew,jdbcType=INTEGER}, #{usePointLimitOld,jdbcType=INTEGER},
#{usePointLimitNew,jdbcType=INTEGER}, #{operateMan,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
)
insert into pms_product_operate_log (product_id, price_old, price_new,
sale_price_old, sale_price_new, gift_point_old,
gift_point_new, use_point_limit_old, use_point_limit_new,
operate_man, create_time)
values (#{productId,jdbcType=BIGINT}, #{priceOld,jdbcType=DECIMAL}, #{priceNew,jdbcType=DECIMAL},
#{salePriceOld,jdbcType=DECIMAL}, #{salePriceNew,jdbcType=DECIMAL}, #{giftPointOld,jdbcType=INTEGER},
#{giftPointNew,jdbcType=INTEGER}, #{usePointLimitOld,jdbcType=INTEGER}, #{usePointLimitNew,jdbcType=INTEGER},
#{operateMan,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
</insert>
<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()
</selectKey>
insert into pms_product_operate_log
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null">
product_id,
</if>
@ -164,7 +161,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null">
#{productId,jdbcType=BIGINT},
</if>

View File

@ -101,23 +101,20 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_product_vertify_record (id, product_id, create_time,
vertify_man, status, detail
)
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{vertifyMan,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{detail,jdbcType=VARCHAR}
)
insert into pms_product_vertify_record (product_id, create_time, vertify_man,
status, detail)
values (#{productId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{vertifyMan,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{detail,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into pms_product_vertify_record
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null">
product_id,
</if>
@ -135,7 +132,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null">
#{productId,jdbcType=BIGINT},
</if>

View File

@ -106,25 +106,24 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_sku_stock (id, product_id, sku_code,
price, stock, low_stock,
sp1, sp2, sp3, pic,
sale)
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{skuCode,jdbcType=VARCHAR},
#{price,jdbcType=DECIMAL}, #{stock,jdbcType=INTEGER}, #{lowStock,jdbcType=INTEGER},
#{sp1,jdbcType=VARCHAR}, #{sp2,jdbcType=VARCHAR}, #{sp3,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR},
#{sale,jdbcType=INTEGER})
insert into pms_sku_stock (product_id, sku_code, price,
stock, low_stock, sp1,
sp2, sp3, pic, sale
)
values (#{productId,jdbcType=BIGINT}, #{skuCode,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL},
#{stock,jdbcType=INTEGER}, #{lowStock,jdbcType=INTEGER}, #{sp1,jdbcType=VARCHAR},
#{sp2,jdbcType=VARCHAR}, #{sp3,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, #{sale,jdbcType=INTEGER}
)
</insert>
<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()
</selectKey>
insert into pms_sku_stock
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null">
product_id,
</if>
@ -157,7 +156,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null">
#{productId,jdbcType=BIGINT},
</if>

View File

@ -106,25 +106,24 @@
</if>
</delete>
<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()
</selectKey>
insert into sms_coupon_history (id, coupon_id, member_id,
coupon_code, member_nickname, get_type,
create_time, use_status, use_time,
order_id)
values (#{id,jdbcType=BIGINT}, #{couponId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT},
#{couponCode,jdbcType=VARCHAR}, #{memberNickname,jdbcType=VARCHAR}, #{getType,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{useStatus,jdbcType=INTEGER}, #{useTime,jdbcType=TIMESTAMP},
#{orderId,jdbcType=CHAR})
insert into sms_coupon_history (coupon_id, member_id, coupon_code,
member_nickname, get_type, create_time,
use_status, use_time, order_id
)
values (#{couponId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{couponCode,jdbcType=VARCHAR},
#{memberNickname,jdbcType=VARCHAR}, #{getType,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{useStatus,jdbcType=INTEGER}, #{useTime,jdbcType=TIMESTAMP}, #{orderId,jdbcType=CHAR}
)
</insert>
<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()
</selectKey>
insert into sms_coupon_history
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="couponId != null">
coupon_id,
</if>
@ -154,7 +153,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="couponId != null">
#{couponId,jdbcType=BIGINT},
</if>

View File

@ -113,29 +113,28 @@
</if>
</delete>
<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()
</selectKey>
insert into sms_coupon (id, type, name,
platform, count, amount,
per_limit, min_point, start_time,
end_time, use_type, note,
publish_count, use_count, enable_time,
code, member_level)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
#{platform,jdbcType=VARCHAR}, #{count,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL},
#{perLimit,jdbcType=INTEGER}, #{minPoint,jdbcType=DECIMAL}, #{startTime,jdbcType=TIMESTAMP},
#{endTime,jdbcType=TIMESTAMP}, #{useType,jdbcType=INTEGER}, #{note,jdbcType=VARCHAR},
#{publishCount,jdbcType=INTEGER}, #{useCount,jdbcType=INTEGER}, #{enableTime,jdbcType=TIMESTAMP},
#{code,jdbcType=VARCHAR}, #{memberLevel,jdbcType=INTEGER})
insert into sms_coupon (type, name, platform,
count, amount, per_limit,
min_point, start_time, end_time,
use_type, note, publish_count,
use_count, enable_time, code,
member_level)
values (#{type,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{platform,jdbcType=VARCHAR},
#{count,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, #{perLimit,jdbcType=INTEGER},
#{minPoint,jdbcType=DECIMAL}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
#{useType,jdbcType=INTEGER}, #{note,jdbcType=VARCHAR}, #{publishCount,jdbcType=INTEGER},
#{useCount,jdbcType=INTEGER}, #{enableTime,jdbcType=TIMESTAMP}, #{code,jdbcType=VARCHAR},
#{memberLevel,jdbcType=INTEGER})
</insert>
<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()
</selectKey>
insert into sms_coupon
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="type != null">
type,
</if>
@ -186,7 +185,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>

View File

@ -98,21 +98,18 @@
</if>
</delete>
<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()
</selectKey>
insert into sms_coupon_product_category_relation (id, coupon_id, product_category_id
)
values (#{id,jdbcType=BIGINT}, #{couponId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT}
)
insert into sms_coupon_product_category_relation (coupon_id, product_category_id)
values (#{couponId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT})
</insert>
<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()
</selectKey>
insert into sms_coupon_product_category_relation
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="couponId != null">
coupon_id,
</if>
@ -121,7 +118,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="couponId != null">
#{couponId,jdbcType=BIGINT},
</if>

View File

@ -98,21 +98,18 @@
</if>
</delete>
<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()
</selectKey>
insert into sms_coupon_product_relation (id, coupon_id, product_id
)
values (#{id,jdbcType=BIGINT}, #{couponId,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT}
)
insert into sms_coupon_product_relation (coupon_id, product_id)
values (#{couponId,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT})
</insert>
<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()
</selectKey>
insert into sms_coupon_product_relation
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="couponId != null">
coupon_id,
</if>
@ -121,7 +118,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="couponId != null">
#{couponId,jdbcType=INTEGER},
</if>

View File

@ -102,23 +102,22 @@
</if>
</delete>
<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()
</selectKey>
insert into sms_flash_promotion_log (id, member_id, product_id,
member_phone, product_name, subscribe_time,
send_time)
values (#{id,jdbcType=INTEGER}, #{memberId,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT},
#{memberPhone,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR}, #{subscribeTime,jdbcType=TIMESTAMP},
#{sendTime,jdbcType=TIMESTAMP})
insert into sms_flash_promotion_log (member_id, product_id, member_phone,
product_name, subscribe_time, send_time
)
values (#{memberId,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT}, #{memberPhone,jdbcType=VARCHAR},
#{productName,jdbcType=VARCHAR}, #{subscribeTime,jdbcType=TIMESTAMP}, #{sendTime,jdbcType=TIMESTAMP}
)
</insert>
<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()
</selectKey>
insert into sms_flash_promotion_log
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberId != null">
member_id,
</if>
@ -139,7 +138,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=INTEGER},
<if test="memberId != null">
#{memberId,jdbcType=INTEGER},
</if>

View File

@ -101,23 +101,20 @@
</if>
</delete>
<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()
</selectKey>
insert into sms_flash_promotion (id, title, start_time,
end_time, status, time_name
)
values (#{id,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP},
#{endTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, #{timeName,jdbcType=VARCHAR}
)
insert into sms_flash_promotion (title, start_time, end_time,
status, time_name)
values (#{title,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
#{status,jdbcType=INTEGER}, #{timeName,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into sms_flash_promotion
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="title != null">
title,
</if>
@ -135,7 +132,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=INTEGER},
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>

View File

@ -107,25 +107,24 @@
</if>
</delete>
<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()
</selectKey>
insert into sms_home_advertise (id, name, type,
pic, start_time, end_time,
status, click_count, order_count,
url, note)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER},
#{pic,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
#{status,jdbcType=INTEGER}, #{clickCount,jdbcType=INTEGER}, #{orderCount,jdbcType=INTEGER},
#{url,jdbcType=VARCHAR}, #{note,jdbcType=VARCHAR})
insert into sms_home_advertise (name, type, pic,
start_time, end_time, status,
click_count, order_count, url,
note)
values (#{name,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{pic,jdbcType=VARCHAR},
#{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER},
#{clickCount,jdbcType=INTEGER}, #{orderCount,jdbcType=INTEGER}, #{url,jdbcType=VARCHAR},
#{note,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into sms_home_advertise
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null">
name,
</if>
@ -158,7 +157,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>

View File

@ -100,21 +100,20 @@
</if>
</delete>
<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()
</selectKey>
insert into sms_home_brand (id, brand_id, brand_name,
recommend_status, sort)
values (#{id,jdbcType=BIGINT}, #{brandId,jdbcType=BIGINT}, #{brandName,jdbcType=VARCHAR},
#{recommendStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
insert into sms_home_brand (brand_id, brand_name, recommend_status,
sort)
values (#{brandId,jdbcType=BIGINT}, #{brandName,jdbcType=VARCHAR}, #{recommendStatus,jdbcType=INTEGER},
#{sort,jdbcType=INTEGER})
</insert>
<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()
</selectKey>
insert into sms_home_brand
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="brandId != null">
brand_id,
</if>
@ -129,7 +128,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="brandId != null">
#{brandId,jdbcType=BIGINT},
</if>

View File

@ -100,21 +100,20 @@
</if>
</delete>
<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()
</selectKey>
insert into sms_home_new_product (id, product_id, product_name,
recommend_status, sort)
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{productName,jdbcType=VARCHAR},
#{recommendStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
insert into sms_home_new_product (product_id, product_name, recommend_status,
sort)
values (#{productId,jdbcType=BIGINT}, #{productName,jdbcType=VARCHAR}, #{recommendStatus,jdbcType=INTEGER},
#{sort,jdbcType=INTEGER})
</insert>
<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()
</selectKey>
insert into sms_home_new_product
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null">
product_id,
</if>
@ -129,7 +128,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null">
#{productId,jdbcType=BIGINT},
</if>

View File

@ -100,21 +100,20 @@
</if>
</delete>
<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()
</selectKey>
insert into sms_home_recommend_product (id, product_id, product_name,
recommend_status, sort)
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{productName,jdbcType=VARCHAR},
#{recommendStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
insert into sms_home_recommend_product (product_id, product_name, recommend_status,
sort)
values (#{productId,jdbcType=BIGINT}, #{productName,jdbcType=VARCHAR}, #{recommendStatus,jdbcType=INTEGER},
#{sort,jdbcType=INTEGER})
</insert>
<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()
</selectKey>
insert into sms_home_recommend_product
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null">
product_id,
</if>
@ -129,7 +128,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null">
#{productId,jdbcType=BIGINT},
</if>

View File

@ -100,21 +100,20 @@
</if>
</delete>
<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()
</selectKey>
insert into sms_home_recommend_subject (id, subject_id, subject_name,
recommend_status, sort)
values (#{id,jdbcType=BIGINT}, #{subjectId,jdbcType=BIGINT}, #{subjectName,jdbcType=VARCHAR},
#{recommendStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
insert into sms_home_recommend_subject (subject_id, subject_name, recommend_status,
sort)
values (#{subjectId,jdbcType=BIGINT}, #{subjectName,jdbcType=VARCHAR}, #{recommendStatus,jdbcType=INTEGER},
#{sort,jdbcType=INTEGER})
</insert>
<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()
</selectKey>
insert into sms_home_recommend_subject
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="subjectId != null">
subject_id,
</if>
@ -129,7 +128,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="subjectId != null">
#{subjectId,jdbcType=BIGINT},
</if>

View File

@ -101,23 +101,20 @@
</if>
</delete>
<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()
</selectKey>
insert into ums_admin_login_log (id, admin_id, create_time,
ip, address, user_agent
)
values (#{id,jdbcType=BIGINT}, #{adminId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{ip,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{userAgent,jdbcType=VARCHAR}
)
insert into ums_admin_login_log (admin_id, create_time, ip,
address, user_agent)
values (#{adminId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{ip,jdbcType=VARCHAR},
#{address,jdbcType=VARCHAR}, #{userAgent,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into ums_admin_login_log
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="adminId != null">
admin_id,
</if>
@ -135,7 +132,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="adminId != null">
#{adminId,jdbcType=BIGINT},
</if>

View File

@ -100,21 +100,20 @@
</if>
</delete>
<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()
</selectKey>
insert into ums_admin (id, username, password,
icon, email)
values (#{id,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
#{icon,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR})
insert into ums_admin (username, password, icon,
email)
values (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR},
#{email,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into ums_admin
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="username != null">
username,
</if>
@ -129,7 +128,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>

View File

@ -104,23 +104,22 @@
</if>
</delete>
<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()
</selectKey>
insert into ums_growth_change_history (id, member_id, create_time,
change_type, change_count, operate_man,
operate_note, source_type)
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{changeType,jdbcType=INTEGER}, #{changeCount,jdbcType=INTEGER}, #{operateMan,jdbcType=VARCHAR},
#{operateNote,jdbcType=VARCHAR}, #{sourceType,jdbcType=INTEGER})
insert into ums_growth_change_history (member_id, create_time, change_type,
change_count, operate_man, operate_note,
source_type)
values (#{memberId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{changeType,jdbcType=INTEGER},
#{changeCount,jdbcType=INTEGER}, #{operateMan,jdbcType=VARCHAR}, #{operateNote,jdbcType=VARCHAR},
#{sourceType,jdbcType=INTEGER})
</insert>
<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()
</selectKey>
insert into ums_growth_change_history
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberId != null">
member_id,
</if>
@ -144,7 +143,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberId != null">
#{memberId,jdbcType=BIGINT},
</if>

View File

@ -104,23 +104,22 @@
</if>
</delete>
<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()
</selectKey>
insert into ums_integration_change_history (id, member_id, create_time,
change_type, change_count, operate_man,
operate_note, source_type)
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{changeType,jdbcType=INTEGER}, #{changeCount,jdbcType=INTEGER}, #{operateMan,jdbcType=VARCHAR},
#{operateNote,jdbcType=VARCHAR}, #{sourceType,jdbcType=INTEGER})
insert into ums_integration_change_history (member_id, create_time, change_type,
change_count, operate_man, operate_note,
source_type)
values (#{memberId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{changeType,jdbcType=INTEGER},
#{changeCount,jdbcType=INTEGER}, #{operateMan,jdbcType=VARCHAR}, #{operateNote,jdbcType=VARCHAR},
#{sourceType,jdbcType=INTEGER})
</insert>
<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()
</selectKey>
insert into ums_integration_change_history
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberId != null">
member_id,
</if>
@ -144,7 +143,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberId != null">
#{memberId,jdbcType=BIGINT},
</if>

View File

@ -100,21 +100,20 @@
</if>
</delete>
<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()
</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)
values (#{id,jdbcType=BIGINT}, #{deductionPerAmount,jdbcType=INTEGER}, #{maxPercentPerOrder,jdbcType=INTEGER},
values (#{deductionPerAmount,jdbcType=INTEGER}, #{maxPercentPerOrder,jdbcType=INTEGER},
#{useUnit,jdbcType=INTEGER}, #{couponStatus,jdbcType=INTEGER})
</insert>
<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()
</selectKey>
insert into ums_intergration_consume_setting
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="deductionPerAmount != null">
deduction_per_amount,
</if>
@ -129,7 +128,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="deductionPerAmount != null">
#{deductionPerAmount,jdbcType=INTEGER},
</if>

View File

@ -110,29 +110,26 @@
</if>
</delete>
<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()
</selectKey>
insert into ums_member_level (id, name, growth_point,
default_status, free_freight_point, comment_growth_point,
priviledge_free_freight, priviledge_sign_in,
priviledge_comment, priviledge_promotion,
insert into ums_member_level (name, growth_point, default_status,
free_freight_point, comment_growth_point, priviledge_free_freight,
priviledge_sign_in, priviledge_comment, priviledge_promotion,
priviledge_member_price, priviledge_birthday,
note)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{growthPoint,jdbcType=INTEGER},
#{defaultStatus,jdbcType=INTEGER}, #{freeFreightPoint,jdbcType=DECIMAL}, #{commentGrowthPoint,jdbcType=INTEGER},
#{priviledgeFreeFreight,jdbcType=INTEGER}, #{priviledgeSignIn,jdbcType=INTEGER},
#{priviledgeComment,jdbcType=INTEGER}, #{priviledgePromotion,jdbcType=INTEGER},
values (#{name,jdbcType=VARCHAR}, #{growthPoint,jdbcType=INTEGER}, #{defaultStatus,jdbcType=INTEGER},
#{freeFreightPoint,jdbcType=DECIMAL}, #{commentGrowthPoint,jdbcType=INTEGER}, #{priviledgeFreeFreight,jdbcType=INTEGER},
#{priviledgeSignIn,jdbcType=INTEGER}, #{priviledgeComment,jdbcType=INTEGER}, #{priviledgePromotion,jdbcType=INTEGER},
#{priviledgeMemberPrice,jdbcType=INTEGER}, #{priviledgeBirthday,jdbcType=INTEGER},
#{note,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into ums_member_level
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null">
name,
</if>
@ -171,7 +168,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>

View File

@ -102,23 +102,22 @@
</if>
</delete>
<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()
</selectKey>
insert into ums_member_login_log (id, member_id, create_time,
ip, city, login_type,
province)
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{ip,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{loginType,jdbcType=INTEGER},
#{province,jdbcType=VARCHAR})
insert into ums_member_login_log (member_id, create_time, ip,
city, login_type, province
)
values (#{memberId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{ip,jdbcType=VARCHAR},
#{city,jdbcType=VARCHAR}, #{loginType,jdbcType=INTEGER}, #{province,jdbcType=VARCHAR}
)
</insert>
<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()
</selectKey>
insert into ums_member_login_log
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberId != null">
member_id,
</if>
@ -139,7 +138,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberId != null">
#{memberId,jdbcType=BIGINT},
</if>

View File

@ -116,31 +116,28 @@
</if>
</delete>
<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()
</selectKey>
insert into ums_member (id, member_level_id, username,
password, nickname, phone,
status, create_time, icon,
gender, birthday, city,
job, personalized_signature, source_type,
integration, growth, luckey_count,
history_integration)
values (#{id,jdbcType=BIGINT}, #{memberLevelId,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{icon,jdbcType=VARCHAR},
#{gender,jdbcType=INTEGER}, #{birthday,jdbcType=DATE}, #{city,jdbcType=VARCHAR},
#{job,jdbcType=VARCHAR}, #{personalizedSignature,jdbcType=VARCHAR}, #{sourceType,jdbcType=INTEGER},
#{integration,jdbcType=INTEGER}, #{growth,jdbcType=INTEGER}, #{luckeyCount,jdbcType=INTEGER},
#{historyIntegration,jdbcType=INTEGER})
insert into ums_member (member_level_id, username, password,
nickname, phone, status,
create_time, icon, gender,
birthday, city, job, personalized_signature,
source_type, integration, growth,
luckey_count, history_integration)
values (#{memberLevelId,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
#{nickname,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{icon,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER},
#{birthday,jdbcType=DATE}, #{city,jdbcType=VARCHAR}, #{job,jdbcType=VARCHAR}, #{personalizedSignature,jdbcType=VARCHAR},
#{sourceType,jdbcType=INTEGER}, #{integration,jdbcType=INTEGER}, #{growth,jdbcType=INTEGER},
#{luckeyCount,jdbcType=INTEGER}, #{historyIntegration,jdbcType=INTEGER})
</insert>
<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()
</selectKey>
insert into ums_member
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberLevelId != null">
member_level_id,
</if>
@ -197,7 +194,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberLevelId != null">
#{memberLevelId,jdbcType=BIGINT},
</if>

View File

@ -98,21 +98,18 @@
</if>
</delete>
<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()
</selectKey>
insert into ums_member_member_tag_relation (id, member_id, tag_id
)
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{tagId,jdbcType=BIGINT}
)
insert into ums_member_member_tag_relation (member_id, tag_id)
values (#{memberId,jdbcType=BIGINT}, #{tagId,jdbcType=BIGINT})
</insert>
<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()
</selectKey>
insert into ums_member_member_tag_relation
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberId != null">
member_id,
</if>
@ -121,7 +118,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberId != null">
#{memberId,jdbcType=BIGINT},
</if>

View File

@ -98,21 +98,18 @@
</if>
</delete>
<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()
</selectKey>
insert into ums_member_product_category_relation (id, member_id, product_category_id
)
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT}
)
insert into ums_member_product_category_relation (member_id, product_category_id)
values (#{memberId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT})
</insert>
<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()
</selectKey>
insert into ums_member_product_category_relation
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberId != null">
member_id,
</if>
@ -121,7 +118,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberId != null">
#{memberId,jdbcType=BIGINT},
</if>

View File

@ -102,23 +102,22 @@
</if>
</delete>
<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()
</selectKey>
insert into ums_member_receive_address (id, member_id, name,
phone_number, address, post_code,
default_status)
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{phoneNumber,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{postCode,jdbcType=VARCHAR},
#{defaultStatus,jdbcType=INTEGER})
insert into ums_member_receive_address (member_id, name, phone_number,
address, post_code, default_status
)
values (#{memberId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{phoneNumber,jdbcType=VARCHAR},
#{address,jdbcType=VARCHAR}, #{postCode,jdbcType=VARCHAR}, #{defaultStatus,jdbcType=INTEGER}
)
</insert>
<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()
</selectKey>
insert into ums_member_receive_address
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberId != null">
member_id,
</if>
@ -139,7 +138,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberId != null">
#{memberId,jdbcType=BIGINT},
</if>

View File

@ -103,23 +103,22 @@
</if>
</delete>
<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()
</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,
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},
#{type,jdbcType=INTEGER})
</insert>
<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()
</selectKey>
insert into ums_member_rule_setting
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="continueSignDay != null">
continue_sign_day,
</if>
@ -140,7 +139,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="continueSignDay != null">
#{continueSignDay,jdbcType=INTEGER},
</if>

View File

@ -113,29 +113,28 @@
</if>
</delete>
<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()
</selectKey>
insert into ums_member_statistics_info (id, member_id, consume_amount,
order_count, coupon_count, comment_count,
return_order_count, login_count, attend_count,
fans_count, collect_product_count, collect_subject_count,
insert into ums_member_statistics_info (member_id, consume_amount, order_count,
coupon_count, comment_count, return_order_count,
login_count, attend_count, fans_count,
collect_product_count, collect_subject_count,
collect_topic_count, collect_comment_count,
invite_friend_count, recent_order_time)
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{consumeAmount,jdbcType=DECIMAL},
#{orderCount,jdbcType=INTEGER}, #{couponCount,jdbcType=INTEGER}, #{commentCount,jdbcType=INTEGER},
#{returnOrderCount,jdbcType=INTEGER}, #{loginCount,jdbcType=INTEGER}, #{attendCount,jdbcType=INTEGER},
#{fansCount,jdbcType=INTEGER}, #{collectProductCount,jdbcType=INTEGER}, #{collectSubjectCount,jdbcType=INTEGER},
values (#{memberId,jdbcType=BIGINT}, #{consumeAmount,jdbcType=DECIMAL}, #{orderCount,jdbcType=INTEGER},
#{couponCount,jdbcType=INTEGER}, #{commentCount,jdbcType=INTEGER}, #{returnOrderCount,jdbcType=INTEGER},
#{loginCount,jdbcType=INTEGER}, #{attendCount,jdbcType=INTEGER}, #{fansCount,jdbcType=INTEGER},
#{collectProductCount,jdbcType=INTEGER}, #{collectSubjectCount,jdbcType=INTEGER},
#{collectTopicCount,jdbcType=INTEGER}, #{collectCommentCount,jdbcType=INTEGER},
#{inviteFriendCount,jdbcType=INTEGER}, #{recentOrderTime,jdbcType=TIMESTAMP})
</insert>
<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()
</selectKey>
insert into ums_member_statistics_info
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="memberId != null">
member_id,
</if>
@ -183,7 +182,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="memberId != null">
#{memberId,jdbcType=BIGINT},
</if>

View File

@ -99,21 +99,20 @@
</if>
</delete>
<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()
</selectKey>
insert into ums_member_tag (id, name, finish_order_count,
finish_order_amount)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{finishOrderCount,jdbcType=INTEGER},
#{finishOrderAmount,jdbcType=DECIMAL})
insert into ums_member_tag (name, finish_order_count, finish_order_amount
)
values (#{name,jdbcType=VARCHAR}, #{finishOrderCount,jdbcType=INTEGER}, #{finishOrderAmount,jdbcType=DECIMAL}
)
</insert>
<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()
</selectKey>
insert into ums_member_tag
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null">
name,
</if>
@ -125,7 +124,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>

View File

@ -100,21 +100,20 @@
</if>
</delete>
<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()
</selectKey>
insert into ums_member_task (id, name, growth,
intergration, type)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{growth,jdbcType=INTEGER},
#{intergration,jdbcType=INTEGER}, #{type,jdbcType=INTEGER})
insert into ums_member_task (name, growth, intergration,
type)
values (#{name,jdbcType=VARCHAR}, #{growth,jdbcType=INTEGER}, #{intergration,jdbcType=INTEGER},
#{type,jdbcType=INTEGER})
</insert>
<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()
</selectKey>
insert into ums_member_task
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null">
name,
</if>
@ -129,7 +128,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>

View File

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