Unverified Commit b68151cb authored by Menethil's avatar Menethil Committed by GitHub
Browse files

Merge pull request #1 from linlinjava/master

update
parents 126d027a 02679509
...@@ -27,31 +27,6 @@ public class LitemallGoodsSpecificationService { ...@@ -27,31 +27,6 @@ public class LitemallGoodsSpecificationService {
return goodsSpecificationMapper.selectByPrimaryKey(id); return goodsSpecificationMapper.selectByPrimaryKey(id);
} }
public List<LitemallGoodsSpecification> querySelective(Integer goodsId, Integer page, Integer size, String sort, String order) {
LitemallGoodsSpecificationExample example = new LitemallGoodsSpecificationExample();
LitemallGoodsSpecificationExample.Criteria criteria = example.createCriteria();
if(goodsId != null){
criteria.andGoodsIdEqualTo(goodsId);
}
criteria.andDeletedEqualTo(false);
PageHelper.startPage(page, size);
return goodsSpecificationMapper.selectByExample(example);
}
public int countSelective(Integer goodsId, Integer page, Integer size, String sort, String order) {
LitemallGoodsSpecificationExample example = new LitemallGoodsSpecificationExample();
LitemallGoodsSpecificationExample.Criteria criteria = example.createCriteria();
if(goodsId != null){
criteria.andGoodsIdEqualTo(goodsId);
}
criteria.andDeletedEqualTo(false);
return (int)goodsSpecificationMapper.countByExample(example);
}
public void updateById(LitemallGoodsSpecification goodsSpecification) { public void updateById(LitemallGoodsSpecification goodsSpecification) {
goodsSpecificationMapper.updateByPrimaryKeySelective(goodsSpecification); goodsSpecificationMapper.updateByPrimaryKeySelective(goodsSpecification);
} }
...@@ -60,17 +35,14 @@ public class LitemallGoodsSpecificationService { ...@@ -60,17 +35,14 @@ public class LitemallGoodsSpecificationService {
goodsSpecificationMapper.logicalDeleteByPrimaryKey(id); goodsSpecificationMapper.logicalDeleteByPrimaryKey(id);
} }
public void add(LitemallGoodsSpecification goodsSpecification) { public void deleteByGid(Integer gid) {
goodsSpecificationMapper.insertSelective(goodsSpecification); LitemallGoodsSpecificationExample example = new LitemallGoodsSpecificationExample();
example.or().andGoodsIdEqualTo(gid);
goodsSpecificationMapper.logicalDeleteByExample(example);
} }
public Integer[] queryIdsByGid(Integer goodsId) { public void add(LitemallGoodsSpecification goodsSpecification) {
List<LitemallGoodsSpecification> goodsSpecificationList = queryByGid(goodsId); goodsSpecificationMapper.insertSelective(goodsSpecification);
Integer[] ids = new Integer[goodsSpecificationList.size()];
for(int i = 0; i < ids.length; i++){
ids[i] = goodsSpecificationList.get(i).getId();
}
return ids;
} }
private class VO { private class VO {
......
...@@ -38,6 +38,10 @@ public class LitemallIssueService { ...@@ -38,6 +38,10 @@ public class LitemallIssueService {
} }
criteria.andDeletedEqualTo(false); criteria.andDeletedEqualTo(false);
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
example.setOrderByClause(sort + " " + order);
}
PageHelper.startPage(page, size); PageHelper.startPage(page, size);
return issueMapper.selectByExample(example); return issueMapper.selectByExample(example);
} }
......
...@@ -53,6 +53,10 @@ public class LitemallKeywordService { ...@@ -53,6 +53,10 @@ public class LitemallKeywordService {
} }
criteria.andDeletedEqualTo(false); criteria.andDeletedEqualTo(false);
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
example.setOrderByClause(sort + " " + order);
}
PageHelper.startPage(page, limit); PageHelper.startPage(page, limit);
return keywordsMapper.selectByExample(example); return keywordsMapper.selectByExample(example);
} }
......
...@@ -75,7 +75,7 @@ public class LitemallOrderService { ...@@ -75,7 +75,7 @@ public class LitemallOrderService {
public List<LitemallOrder> queryByOrderStatus(Integer userId, List<Short> orderStatus) { public List<LitemallOrder> queryByOrderStatus(Integer userId, List<Short> orderStatus) {
LitemallOrderExample example = new LitemallOrderExample(); LitemallOrderExample example = new LitemallOrderExample();
example.orderBy(LitemallOrder.Column.addTime.desc()); example.setOrderByClause(LitemallOrder.Column.addTime.desc());
LitemallOrderExample.Criteria criteria = example.or(); LitemallOrderExample.Criteria criteria = example.or();
criteria.andUserIdEqualTo(userId); criteria.andUserIdEqualTo(userId);
if(orderStatus != null) { if(orderStatus != null) {
...@@ -112,6 +112,10 @@ public class LitemallOrderService { ...@@ -112,6 +112,10 @@ public class LitemallOrderService {
} }
criteria.andDeletedEqualTo(false); criteria.andDeletedEqualTo(false);
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
example.setOrderByClause(sort + " " + order);
}
PageHelper.startPage(page, size); PageHelper.startPage(page, size);
return orderMapper.selectByExample(example); return orderMapper.selectByExample(example);
} }
...@@ -153,7 +157,7 @@ public class LitemallOrderService { ...@@ -153,7 +157,7 @@ public class LitemallOrderService {
public List<LitemallOrder> queryUnconfirm() { public List<LitemallOrder> queryUnconfirm() {
LitemallOrderExample example = new LitemallOrderExample(); LitemallOrderExample example = new LitemallOrderExample();
example.or().andOrderStatusEqualTo(OrderUtil.STATUS_SHIP).andShipEndTimeIsNotNull().andDeletedEqualTo(false); example.or().andOrderStatusEqualTo(OrderUtil.STATUS_SHIP).andShipTimeIsNotNull().andDeletedEqualTo(false);
return orderMapper.selectByExample(example); return orderMapper.selectByExample(example);
} }
......
...@@ -24,31 +24,6 @@ public class LitemallProductService { ...@@ -24,31 +24,6 @@ public class LitemallProductService {
return productMapper.selectByPrimaryKey(id); return productMapper.selectByPrimaryKey(id);
} }
public List<LitemallProduct> querySelective(Integer goodsId, Integer page, Integer size, String sort, String order) {
LitemallProductExample example = new LitemallProductExample();
LitemallProductExample.Criteria criteria = example.createCriteria();
if(goodsId != null){
criteria.andGoodsIdEqualTo(goodsId);
}
criteria.andDeletedEqualTo(false);
PageHelper.startPage(page, size);
return productMapper.selectByExample(example);
}
public int countSelective(Integer goodsId, Integer page, Integer size, String sort, String order) {
LitemallProductExample example = new LitemallProductExample();
LitemallProductExample.Criteria criteria = example.createCriteria();
if(goodsId != null){
criteria.andGoodsIdEqualTo(goodsId);
}
criteria.andDeletedEqualTo(false);
return (int)productMapper.countByExample(example);
}
public void updateById(LitemallProduct product) { public void updateById(LitemallProduct product) {
productMapper.updateByPrimaryKeySelective(product); productMapper.updateByPrimaryKeySelective(product);
} }
...@@ -67,4 +42,10 @@ public class LitemallProductService { ...@@ -67,4 +42,10 @@ public class LitemallProductService {
return (int)productMapper.countByExample(example); return (int)productMapper.countByExample(example);
} }
public void deleteByGid(Integer gid) {
LitemallProductExample example = new LitemallProductExample();
example.or().andGoodsIdEqualTo(gid);
productMapper.logicalDeleteByExample(example);
}
} }
...@@ -32,9 +32,14 @@ public class LitemallRegionService { ...@@ -32,9 +32,14 @@ public class LitemallRegionService {
if(!StringUtils.isEmpty(name)){ if(!StringUtils.isEmpty(name)){
criteria.andNameLike("%" + name + "%"); criteria.andNameLike("%" + name + "%");
} }
if(code != null){ if(!StringUtils.isEmpty(code)){
criteria.andCodeEqualTo(code); criteria.andCodeEqualTo(code);
} }
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
example.setOrderByClause(sort + " " + order);
}
PageHelper.startPage(page, size); PageHelper.startPage(page, size);
return regionMapper.selectByExample(example); return regionMapper.selectByExample(example);
} }
......
...@@ -57,6 +57,10 @@ public class LitemallSearchHistoryService { ...@@ -57,6 +57,10 @@ public class LitemallSearchHistoryService {
} }
criteria.andDeletedEqualTo(false); criteria.andDeletedEqualTo(false);
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
example.setOrderByClause(sort + " " + order);
}
PageHelper.startPage(page, size); PageHelper.startPage(page, size);
return searchHistoryMapper.selectByExample(example); return searchHistoryMapper.selectByExample(example);
} }
......
...@@ -58,6 +58,10 @@ public class LitemallStorageService { ...@@ -58,6 +58,10 @@ public class LitemallStorageService {
} }
criteria.andDeletedEqualTo(false); criteria.andDeletedEqualTo(false);
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
example.setOrderByClause(sort + " " + order);
}
PageHelper.startPage(page, limit); PageHelper.startPage(page, limit);
return storageMapper.selectByExample(example); return storageMapper.selectByExample(example);
} }
......
...@@ -66,6 +66,10 @@ public class LitemallTopicService { ...@@ -66,6 +66,10 @@ public class LitemallTopicService {
} }
criteria.andDeletedEqualTo(false); criteria.andDeletedEqualTo(false);
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
example.setOrderByClause(sort + " " + order);
}
PageHelper.startPage(page, limit); PageHelper.startPage(page, limit);
return topicMapper.selectByExampleWithBLOBs(example); return topicMapper.selectByExampleWithBLOBs(example);
} }
......
...@@ -44,6 +44,10 @@ public class LitemallUserService { ...@@ -44,6 +44,10 @@ public class LitemallUserService {
} }
criteria.andDeletedEqualTo(false); criteria.andDeletedEqualTo(false);
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
example.setOrderByClause(sort + " " + order);
}
PageHelper.startPage(page, size); PageHelper.startPage(page, size);
return userMapper.selectByExample(example); return userMapper.selectByExample(example);
} }
......
package org.linlinjava.litemall.db.service;
import com.github.pagehelper.PageHelper;
import org.linlinjava.litemall.db.dao.LitemallUserMapper;
import org.linlinjava.litemall.db.dao.StatMapper;
import org.linlinjava.litemall.db.domain.LitemallUser;
import org.linlinjava.litemall.db.domain.LitemallUserExample;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@Service
public class StatService {
@Resource
private StatMapper statMapper;
public List<Map> statUser() {
return statMapper.statUser();
}
public List<Map> statOrder(){
return statMapper.statOrder();
}
public List<Map> statGoods(){
return statMapper.statGoods();
}
}
package org.linlinjava.litemall.db.util;
public class SortUtil {
public static final String goodsSort(String sort, String order){
if(sort == null){
return null;
}
String sortWithOrder = "";
if(sort.equalsIgnoreCase("price")){
sortWithOrder = "retail_price";
}
else if(sort.equalsIgnoreCase("default") || sort.equalsIgnoreCase("category")){
return null;
}
else{
return null;
}
if(order == null) {
return sortWithOrder;
}
if(order.equalsIgnoreCase("asc")){
sortWithOrder += " ASC";
}
else if(order.equalsIgnoreCase("DESC")){
sortWithOrder += " DESC";
}
return sortWithOrder;
}
}
...@@ -7,9 +7,9 @@ spring.datasource.druid.url=jdbc:mysql://localhost:3306/litemall?useUnicode=true ...@@ -7,9 +7,9 @@ spring.datasource.druid.url=jdbc:mysql://localhost:3306/litemall?useUnicode=true
spring.datasource.druid.driver-class-name=com.mysql.jdbc.Driver spring.datasource.druid.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.druid.username=litemall spring.datasource.druid.username=litemall
spring.datasource.druid.password=litemall123456 spring.datasource.druid.password=litemall123456
spring.datasource.druid.initial-size=50 spring.datasource.druid.initial-size=10
spring.datasource.druid.max-active=100 spring.datasource.druid.max-active=50
spring.datasource.druid.min-idle=20 spring.datasource.druid.min-idle=10
spring.datasource.druid.max-wait=60000 spring.datasource.druid.max-wait=60000
spring.datasource.druid.pool-prepared-statements=true spring.datasource.druid.pool-prepared-statements=true
spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20 spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20
......
...@@ -7,9 +7,9 @@ spring.datasource.druid.url=jdbc:mysql://localhost:3306/litemall?useUnicode=true ...@@ -7,9 +7,9 @@ spring.datasource.druid.url=jdbc:mysql://localhost:3306/litemall?useUnicode=true
spring.datasource.druid.driver-class-name=com.mysql.jdbc.Driver spring.datasource.druid.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.druid.username=litemall spring.datasource.druid.username=litemall
spring.datasource.druid.password=litemall123456 spring.datasource.druid.password=litemall123456
spring.datasource.druid.initial-size=50 spring.datasource.druid.initial-size=10
spring.datasource.druid.max-active=100 spring.datasource.druid.max-active=50
spring.datasource.druid.min-idle=20 spring.datasource.druid.min-idle=10
spring.datasource.druid.max-wait=60000 spring.datasource.druid.max-wait=60000
spring.datasource.druid.pool-prepared-statements=true spring.datasource.druid.pool-prepared-statements=true
spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20 spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20
......
...@@ -7,9 +7,9 @@ spring.datasource.druid.url=jdbc:mysql://localhost:3306/litemall?useUnicode=true ...@@ -7,9 +7,9 @@ spring.datasource.druid.url=jdbc:mysql://localhost:3306/litemall?useUnicode=true
spring.datasource.druid.driver-class-name=com.mysql.jdbc.Driver spring.datasource.druid.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.druid.username=litemall spring.datasource.druid.username=litemall
spring.datasource.druid.password=litemall123456 spring.datasource.druid.password=litemall123456
spring.datasource.druid.initial-size=50 spring.datasource.druid.initial-size=10
spring.datasource.druid.max-active=100 spring.datasource.druid.max-active=50
spring.datasource.druid.min-idle=20 spring.datasource.druid.min-idle=10
spring.datasource.druid.max-wait=60000 spring.datasource.druid.max-wait=60000
spring.datasource.druid.pool-prepared-statements=true spring.datasource.druid.pool-prepared-statements=true
spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20 spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
<id column="id" jdbcType="INTEGER" property="id" /> <id column="id" jdbcType="INTEGER" property="id" />
<result column="position" jdbcType="INTEGER" property="position" />
<result column="name" jdbcType="VARCHAR" property="name" /> <result column="name" jdbcType="VARCHAR" property="name" />
<result column="link" jdbcType="VARCHAR" property="link" /> <result column="link" jdbcType="VARCHAR" property="link" />
<result column="url" jdbcType="VARCHAR" property="url" /> <result column="url" jdbcType="VARCHAR" property="url" />
<result column="position" jdbcType="TINYINT" property="position" />
<result column="content" jdbcType="VARCHAR" property="content" /> <result column="content" jdbcType="VARCHAR" property="content" />
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" /> <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" /> <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
id, `position`, `name`, link, url, content, start_time, end_time, enabled, add_time, id, `name`, link, url, `position`, content, start_time, end_time, enabled, add_time,
deleted deleted
</sql> </sql>
<select id="selectByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallAdExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallAdExample" resultMap="BaseResultMap">
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, `position`, `name`, link, url, content, start_time, end_time, enabled, add_time, id, `name`, link, url, `position`, content, start_time, end_time, enabled, add_time,
deleted deleted
</otherwise> </otherwise>
</choose> </choose>
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, `position`, `name`, link, url, content, start_time, end_time, enabled, add_time, id, `name`, link, url, `position`, content, start_time, end_time, enabled, add_time,
deleted deleted
</otherwise> </otherwise>
</choose> </choose>
...@@ -220,12 +220,12 @@ ...@@ -220,12 +220,12 @@
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into litemall_ad (`position`, `name`, link, insert into litemall_ad (`name`, link, url,
url, content, start_time, `position`, content, start_time,
end_time, enabled, add_time, end_time, enabled, add_time,
deleted) deleted)
values (#{position,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{link,jdbcType=VARCHAR}, values (#{name,jdbcType=VARCHAR}, #{link,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR},
#{url,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{position,jdbcType=TINYINT}, #{content,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP},
#{endTime,jdbcType=TIMESTAMP}, #{enabled,jdbcType=BIT}, #{addTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{enabled,jdbcType=BIT}, #{addTime,jdbcType=TIMESTAMP},
#{deleted,jdbcType=BIT}) #{deleted,jdbcType=BIT})
</insert> </insert>
...@@ -239,9 +239,6 @@ ...@@ -239,9 +239,6 @@
</selectKey> </selectKey>
insert into litemall_ad insert into litemall_ad
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="position != null">
`position`,
</if>
<if test="name != null"> <if test="name != null">
`name`, `name`,
</if> </if>
...@@ -251,6 +248,9 @@ ...@@ -251,6 +248,9 @@
<if test="url != null"> <if test="url != null">
url, url,
</if> </if>
<if test="position != null">
`position`,
</if>
<if test="content != null"> <if test="content != null">
content, content,
</if> </if>
...@@ -271,9 +271,6 @@ ...@@ -271,9 +271,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="position != null">
#{position,jdbcType=INTEGER},
</if>
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>
...@@ -283,6 +280,9 @@ ...@@ -283,6 +280,9 @@
<if test="url != null"> <if test="url != null">
#{url,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR},
</if> </if>
<if test="position != null">
#{position,jdbcType=TINYINT},
</if>
<if test="content != null"> <if test="content != null">
#{content,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR},
</if> </if>
...@@ -323,9 +323,6 @@ ...@@ -323,9 +323,6 @@
<if test="record.id != null"> <if test="record.id != null">
id = #{record.id,jdbcType=INTEGER}, id = #{record.id,jdbcType=INTEGER},
</if> </if>
<if test="record.position != null">
`position` = #{record.position,jdbcType=INTEGER},
</if>
<if test="record.name != null"> <if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR}, `name` = #{record.name,jdbcType=VARCHAR},
</if> </if>
...@@ -335,6 +332,9 @@ ...@@ -335,6 +332,9 @@
<if test="record.url != null"> <if test="record.url != null">
url = #{record.url,jdbcType=VARCHAR}, url = #{record.url,jdbcType=VARCHAR},
</if> </if>
<if test="record.position != null">
`position` = #{record.position,jdbcType=TINYINT},
</if>
<if test="record.content != null"> <if test="record.content != null">
content = #{record.content,jdbcType=VARCHAR}, content = #{record.content,jdbcType=VARCHAR},
</if> </if>
...@@ -365,10 +365,10 @@ ...@@ -365,10 +365,10 @@
--> -->
update litemall_ad update litemall_ad
set id = #{record.id,jdbcType=INTEGER}, set id = #{record.id,jdbcType=INTEGER},
`position` = #{record.position,jdbcType=INTEGER},
`name` = #{record.name,jdbcType=VARCHAR}, `name` = #{record.name,jdbcType=VARCHAR},
link = #{record.link,jdbcType=VARCHAR}, link = #{record.link,jdbcType=VARCHAR},
url = #{record.url,jdbcType=VARCHAR}, url = #{record.url,jdbcType=VARCHAR},
`position` = #{record.position,jdbcType=TINYINT},
content = #{record.content,jdbcType=VARCHAR}, content = #{record.content,jdbcType=VARCHAR},
start_time = #{record.startTime,jdbcType=TIMESTAMP}, start_time = #{record.startTime,jdbcType=TIMESTAMP},
end_time = #{record.endTime,jdbcType=TIMESTAMP}, end_time = #{record.endTime,jdbcType=TIMESTAMP},
...@@ -386,9 +386,6 @@ ...@@ -386,9 +386,6 @@
--> -->
update litemall_ad update litemall_ad
<set> <set>
<if test="position != null">
`position` = #{position,jdbcType=INTEGER},
</if>
<if test="name != null"> <if test="name != null">
`name` = #{name,jdbcType=VARCHAR}, `name` = #{name,jdbcType=VARCHAR},
</if> </if>
...@@ -398,6 +395,9 @@ ...@@ -398,6 +395,9 @@
<if test="url != null"> <if test="url != null">
url = #{url,jdbcType=VARCHAR}, url = #{url,jdbcType=VARCHAR},
</if> </if>
<if test="position != null">
`position` = #{position,jdbcType=TINYINT},
</if>
<if test="content != null"> <if test="content != null">
content = #{content,jdbcType=VARCHAR}, content = #{content,jdbcType=VARCHAR},
</if> </if>
...@@ -425,10 +425,10 @@ ...@@ -425,10 +425,10 @@
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
update litemall_ad update litemall_ad
set `position` = #{position,jdbcType=INTEGER}, set `name` = #{name,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
link = #{link,jdbcType=VARCHAR}, link = #{link,jdbcType=VARCHAR},
url = #{url,jdbcType=VARCHAR}, url = #{url,jdbcType=VARCHAR},
`position` = #{position,jdbcType=TINYINT},
content = #{content,jdbcType=VARCHAR}, content = #{content,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=TIMESTAMP}, start_time = #{startTime,jdbcType=TIMESTAMP},
end_time = #{endTime,jdbcType=TIMESTAMP}, end_time = #{endTime,jdbcType=TIMESTAMP},
...@@ -468,7 +468,7 @@ ...@@ -468,7 +468,7 @@
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, `position`, `name`, link, url, content, start_time, end_time, enabled, add_time, id, `name`, link, url, `position`, content, start_time, end_time, enabled, add_time,
deleted deleted
</otherwise> </otherwise>
</choose> </choose>
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
<result column="password" jdbcType="VARCHAR" property="password" /> <result column="password" jdbcType="VARCHAR" property="password" />
<result column="last_login_ip" jdbcType="VARCHAR" property="lastLoginIp" /> <result column="last_login_ip" jdbcType="VARCHAR" property="lastLoginIp" />
<result column="last_login_time" jdbcType="TIMESTAMP" property="lastLoginTime" /> <result column="last_login_time" jdbcType="TIMESTAMP" property="lastLoginTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="avatar" jdbcType="VARCHAR" property="avatar" /> <result column="avatar" jdbcType="VARCHAR" property="avatar" />
<result column="add_time" jdbcType="TIMESTAMP" property="addTime" /> <result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
<result column="deleted" jdbcType="BIT" property="deleted" /> <result column="deleted" jdbcType="BIT" property="deleted" />
...@@ -87,8 +86,7 @@ ...@@ -87,8 +86,7 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
id, username, `password`, last_login_ip, last_login_time, update_time, avatar, add_time, id, username, `password`, last_login_ip, last_login_time, avatar, add_time, deleted
deleted
</sql> </sql>
<select id="selectByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallAdminExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallAdminExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -125,8 +123,8 @@ ...@@ -125,8 +123,8 @@
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, username, `password`, last_login_ip, last_login_time, update_time, avatar, add_time, id, username, `password`, last_login_ip, last_login_time, avatar, add_time, deleted
deleted
</otherwise> </otherwise>
</choose> </choose>
from litemall_admin from litemall_admin
...@@ -185,8 +183,8 @@ ...@@ -185,8 +183,8 @@
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, username, `password`, last_login_ip, last_login_time, update_time, avatar, add_time, id, username, `password`, last_login_ip, last_login_time, avatar, add_time, deleted
deleted
</otherwise> </otherwise>
</choose> </choose>
from litemall_admin from litemall_admin
...@@ -219,11 +217,11 @@ ...@@ -219,11 +217,11 @@
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into litemall_admin (username, `password`, last_login_ip, insert into litemall_admin (username, `password`, last_login_ip,
last_login_time, update_time, avatar, last_login_time, avatar, add_time,
add_time, deleted) deleted)
values (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{lastLoginIp,jdbcType=VARCHAR}, values (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{lastLoginIp,jdbcType=VARCHAR},
#{lastLoginTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{avatar,jdbcType=VARCHAR}, #{lastLoginTime,jdbcType=TIMESTAMP}, #{avatar,jdbcType=VARCHAR}, #{addTime,jdbcType=TIMESTAMP},
#{addTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT}) #{deleted,jdbcType=BIT})
</insert> </insert>
<insert id="insertSelective" parameterType="org.linlinjava.litemall.db.domain.LitemallAdmin"> <insert id="insertSelective" parameterType="org.linlinjava.litemall.db.domain.LitemallAdmin">
<!-- <!--
...@@ -247,9 +245,6 @@ ...@@ -247,9 +245,6 @@
<if test="lastLoginTime != null"> <if test="lastLoginTime != null">
last_login_time, last_login_time,
</if> </if>
<if test="updateTime != null">
update_time,
</if>
<if test="avatar != null"> <if test="avatar != null">
avatar, avatar,
</if> </if>
...@@ -273,9 +268,6 @@ ...@@ -273,9 +268,6 @@
<if test="lastLoginTime != null"> <if test="lastLoginTime != null">
#{lastLoginTime,jdbcType=TIMESTAMP}, #{lastLoginTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="avatar != null"> <if test="avatar != null">
#{avatar,jdbcType=VARCHAR}, #{avatar,jdbcType=VARCHAR},
</if> </if>
...@@ -319,9 +311,6 @@ ...@@ -319,9 +311,6 @@
<if test="record.lastLoginTime != null"> <if test="record.lastLoginTime != null">
last_login_time = #{record.lastLoginTime,jdbcType=TIMESTAMP}, last_login_time = #{record.lastLoginTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.avatar != null"> <if test="record.avatar != null">
avatar = #{record.avatar,jdbcType=VARCHAR}, avatar = #{record.avatar,jdbcType=VARCHAR},
</if> </if>
...@@ -347,7 +336,6 @@ ...@@ -347,7 +336,6 @@
`password` = #{record.password,jdbcType=VARCHAR}, `password` = #{record.password,jdbcType=VARCHAR},
last_login_ip = #{record.lastLoginIp,jdbcType=VARCHAR}, last_login_ip = #{record.lastLoginIp,jdbcType=VARCHAR},
last_login_time = #{record.lastLoginTime,jdbcType=TIMESTAMP}, last_login_time = #{record.lastLoginTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
avatar = #{record.avatar,jdbcType=VARCHAR}, avatar = #{record.avatar,jdbcType=VARCHAR},
add_time = #{record.addTime,jdbcType=TIMESTAMP}, add_time = #{record.addTime,jdbcType=TIMESTAMP},
deleted = #{record.deleted,jdbcType=BIT} deleted = #{record.deleted,jdbcType=BIT}
...@@ -374,9 +362,6 @@ ...@@ -374,9 +362,6 @@
<if test="lastLoginTime != null"> <if test="lastLoginTime != null">
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP}, last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="avatar != null"> <if test="avatar != null">
avatar = #{avatar,jdbcType=VARCHAR}, avatar = #{avatar,jdbcType=VARCHAR},
</if> </if>
...@@ -399,7 +384,6 @@ ...@@ -399,7 +384,6 @@
`password` = #{password,jdbcType=VARCHAR}, `password` = #{password,jdbcType=VARCHAR},
last_login_ip = #{lastLoginIp,jdbcType=VARCHAR}, last_login_ip = #{lastLoginIp,jdbcType=VARCHAR},
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP}, last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
avatar = #{avatar,jdbcType=VARCHAR}, avatar = #{avatar,jdbcType=VARCHAR},
add_time = #{addTime,jdbcType=TIMESTAMP}, add_time = #{addTime,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=BIT} deleted = #{deleted,jdbcType=BIT}
...@@ -436,8 +420,8 @@ ...@@ -436,8 +420,8 @@
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, username, `password`, last_login_ip, last_login_time, update_time, avatar, add_time, id, username, `password`, last_login_ip, last_login_time, avatar, add_time, deleted
deleted
</otherwise> </otherwise>
</choose> </choose>
from litemall_admin from litemall_admin
......
...@@ -8,16 +8,10 @@ ...@@ -8,16 +8,10 @@
--> -->
<id column="id" jdbcType="INTEGER" property="id" /> <id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" /> <result column="name" jdbcType="VARCHAR" property="name" />
<result column="list_pic_url" jdbcType="VARCHAR" property="listPicUrl" /> <result column="desc" jdbcType="VARCHAR" property="desc" />
<result column="simple_desc" jdbcType="VARCHAR" property="simpleDesc" />
<result column="pic_url" jdbcType="VARCHAR" property="picUrl" /> <result column="pic_url" jdbcType="VARCHAR" property="picUrl" />
<result column="sort_order" jdbcType="TINYINT" property="sortOrder" /> <result column="sort_order" jdbcType="TINYINT" property="sortOrder" />
<result column="is_show" jdbcType="BIT" property="isShow" />
<result column="floor_price" jdbcType="DECIMAL" property="floorPrice" /> <result column="floor_price" jdbcType="DECIMAL" property="floorPrice" />
<result column="app_list_pic_url" jdbcType="VARCHAR" property="appListPicUrl" />
<result column="is_new" jdbcType="BIT" property="isNew" />
<result column="new_pic_url" jdbcType="VARCHAR" property="newPicUrl" />
<result column="new_sort_order" jdbcType="TINYINT" property="newSortOrder" />
<result column="add_time" jdbcType="TIMESTAMP" property="addTime" /> <result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
<result column="deleted" jdbcType="BIT" property="deleted" /> <result column="deleted" jdbcType="BIT" property="deleted" />
</resultMap> </resultMap>
...@@ -92,8 +86,7 @@ ...@@ -92,8 +86,7 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
id, `name`, list_pic_url, simple_desc, pic_url, sort_order, is_show, floor_price, id, `name`, `desc`, pic_url, sort_order, floor_price, add_time, deleted
app_list_pic_url, is_new, new_pic_url, new_sort_order, add_time, deleted
</sql> </sql>
<select id="selectByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallBrandExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallBrandExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -130,8 +123,7 @@ ...@@ -130,8 +123,7 @@
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, `name`, list_pic_url, simple_desc, pic_url, sort_order, is_show, floor_price, id, `name`, `desc`, pic_url, sort_order, floor_price, add_time, deleted
app_list_pic_url, is_new, new_pic_url, new_sort_order, add_time, deleted
</otherwise> </otherwise>
</choose> </choose>
from litemall_brand from litemall_brand
...@@ -190,8 +182,7 @@ ...@@ -190,8 +182,7 @@
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, `name`, list_pic_url, simple_desc, pic_url, sort_order, is_show, floor_price, id, `name`, `desc`, pic_url, sort_order, floor_price, add_time, deleted
app_list_pic_url, is_new, new_pic_url, new_sort_order, add_time, deleted
</otherwise> </otherwise>
</choose> </choose>
from litemall_brand from litemall_brand
...@@ -223,15 +214,11 @@ ...@@ -223,15 +214,11 @@
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into litemall_brand (`name`, list_pic_url, simple_desc, insert into litemall_brand (`name`, `desc`, pic_url,
pic_url, sort_order, is_show, sort_order, floor_price, add_time,
floor_price, app_list_pic_url, is_new,
new_pic_url, new_sort_order, add_time,
deleted) deleted)
values (#{name,jdbcType=VARCHAR}, #{listPicUrl,jdbcType=VARCHAR}, #{simpleDesc,jdbcType=VARCHAR}, values (#{name,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR}, #{picUrl,jdbcType=VARCHAR},
#{picUrl,jdbcType=VARCHAR}, #{sortOrder,jdbcType=TINYINT}, #{isShow,jdbcType=BIT}, #{sortOrder,jdbcType=TINYINT}, #{floorPrice,jdbcType=DECIMAL}, #{addTime,jdbcType=TIMESTAMP},
#{floorPrice,jdbcType=DECIMAL}, #{appListPicUrl,jdbcType=VARCHAR}, #{isNew,jdbcType=BIT},
#{newPicUrl,jdbcType=VARCHAR}, #{newSortOrder,jdbcType=TINYINT}, #{addTime,jdbcType=TIMESTAMP},
#{deleted,jdbcType=BIT}) #{deleted,jdbcType=BIT})
</insert> </insert>
<insert id="insertSelective" parameterType="org.linlinjava.litemall.db.domain.LitemallBrand"> <insert id="insertSelective" parameterType="org.linlinjava.litemall.db.domain.LitemallBrand">
...@@ -247,11 +234,8 @@ ...@@ -247,11 +234,8 @@
<if test="name != null"> <if test="name != null">
`name`, `name`,
</if> </if>
<if test="listPicUrl != null"> <if test="desc != null">
list_pic_url, `desc`,
</if>
<if test="simpleDesc != null">
simple_desc,
</if> </if>
<if test="picUrl != null"> <if test="picUrl != null">
pic_url, pic_url,
...@@ -259,24 +243,9 @@ ...@@ -259,24 +243,9 @@
<if test="sortOrder != null"> <if test="sortOrder != null">
sort_order, sort_order,
</if> </if>
<if test="isShow != null">
is_show,
</if>
<if test="floorPrice != null"> <if test="floorPrice != null">
floor_price, floor_price,
</if> </if>
<if test="appListPicUrl != null">
app_list_pic_url,
</if>
<if test="isNew != null">
is_new,
</if>
<if test="newPicUrl != null">
new_pic_url,
</if>
<if test="newSortOrder != null">
new_sort_order,
</if>
<if test="addTime != null"> <if test="addTime != null">
add_time, add_time,
</if> </if>
...@@ -288,11 +257,8 @@ ...@@ -288,11 +257,8 @@
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>
<if test="listPicUrl != null"> <if test="desc != null">
#{listPicUrl,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR},
</if>
<if test="simpleDesc != null">
#{simpleDesc,jdbcType=VARCHAR},
</if> </if>
<if test="picUrl != null"> <if test="picUrl != null">
#{picUrl,jdbcType=VARCHAR}, #{picUrl,jdbcType=VARCHAR},
...@@ -300,24 +266,9 @@ ...@@ -300,24 +266,9 @@
<if test="sortOrder != null"> <if test="sortOrder != null">
#{sortOrder,jdbcType=TINYINT}, #{sortOrder,jdbcType=TINYINT},
</if> </if>
<if test="isShow != null">
#{isShow,jdbcType=BIT},
</if>
<if test="floorPrice != null"> <if test="floorPrice != null">
#{floorPrice,jdbcType=DECIMAL}, #{floorPrice,jdbcType=DECIMAL},
</if> </if>
<if test="appListPicUrl != null">
#{appListPicUrl,jdbcType=VARCHAR},
</if>
<if test="isNew != null">
#{isNew,jdbcType=BIT},
</if>
<if test="newPicUrl != null">
#{newPicUrl,jdbcType=VARCHAR},
</if>
<if test="newSortOrder != null">
#{newSortOrder,jdbcType=TINYINT},
</if>
<if test="addTime != null"> <if test="addTime != null">
#{addTime,jdbcType=TIMESTAMP}, #{addTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -349,11 +300,8 @@ ...@@ -349,11 +300,8 @@
<if test="record.name != null"> <if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR}, `name` = #{record.name,jdbcType=VARCHAR},
</if> </if>
<if test="record.listPicUrl != null"> <if test="record.desc != null">
list_pic_url = #{record.listPicUrl,jdbcType=VARCHAR}, `desc` = #{record.desc,jdbcType=VARCHAR},
</if>
<if test="record.simpleDesc != null">
simple_desc = #{record.simpleDesc,jdbcType=VARCHAR},
</if> </if>
<if test="record.picUrl != null"> <if test="record.picUrl != null">
pic_url = #{record.picUrl,jdbcType=VARCHAR}, pic_url = #{record.picUrl,jdbcType=VARCHAR},
...@@ -361,24 +309,9 @@ ...@@ -361,24 +309,9 @@
<if test="record.sortOrder != null"> <if test="record.sortOrder != null">
sort_order = #{record.sortOrder,jdbcType=TINYINT}, sort_order = #{record.sortOrder,jdbcType=TINYINT},
</if> </if>
<if test="record.isShow != null">
is_show = #{record.isShow,jdbcType=BIT},
</if>
<if test="record.floorPrice != null"> <if test="record.floorPrice != null">
floor_price = #{record.floorPrice,jdbcType=DECIMAL}, floor_price = #{record.floorPrice,jdbcType=DECIMAL},
</if> </if>
<if test="record.appListPicUrl != null">
app_list_pic_url = #{record.appListPicUrl,jdbcType=VARCHAR},
</if>
<if test="record.isNew != null">
is_new = #{record.isNew,jdbcType=BIT},
</if>
<if test="record.newPicUrl != null">
new_pic_url = #{record.newPicUrl,jdbcType=VARCHAR},
</if>
<if test="record.newSortOrder != null">
new_sort_order = #{record.newSortOrder,jdbcType=TINYINT},
</if>
<if test="record.addTime != null"> <if test="record.addTime != null">
add_time = #{record.addTime,jdbcType=TIMESTAMP}, add_time = #{record.addTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -398,16 +331,10 @@ ...@@ -398,16 +331,10 @@
update litemall_brand update litemall_brand
set id = #{record.id,jdbcType=INTEGER}, set id = #{record.id,jdbcType=INTEGER},
`name` = #{record.name,jdbcType=VARCHAR}, `name` = #{record.name,jdbcType=VARCHAR},
list_pic_url = #{record.listPicUrl,jdbcType=VARCHAR}, `desc` = #{record.desc,jdbcType=VARCHAR},
simple_desc = #{record.simpleDesc,jdbcType=VARCHAR},
pic_url = #{record.picUrl,jdbcType=VARCHAR}, pic_url = #{record.picUrl,jdbcType=VARCHAR},
sort_order = #{record.sortOrder,jdbcType=TINYINT}, sort_order = #{record.sortOrder,jdbcType=TINYINT},
is_show = #{record.isShow,jdbcType=BIT},
floor_price = #{record.floorPrice,jdbcType=DECIMAL}, floor_price = #{record.floorPrice,jdbcType=DECIMAL},
app_list_pic_url = #{record.appListPicUrl,jdbcType=VARCHAR},
is_new = #{record.isNew,jdbcType=BIT},
new_pic_url = #{record.newPicUrl,jdbcType=VARCHAR},
new_sort_order = #{record.newSortOrder,jdbcType=TINYINT},
add_time = #{record.addTime,jdbcType=TIMESTAMP}, add_time = #{record.addTime,jdbcType=TIMESTAMP},
deleted = #{record.deleted,jdbcType=BIT} deleted = #{record.deleted,jdbcType=BIT}
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -424,11 +351,8 @@ ...@@ -424,11 +351,8 @@
<if test="name != null"> <if test="name != null">
`name` = #{name,jdbcType=VARCHAR}, `name` = #{name,jdbcType=VARCHAR},
</if> </if>
<if test="listPicUrl != null"> <if test="desc != null">
list_pic_url = #{listPicUrl,jdbcType=VARCHAR}, `desc` = #{desc,jdbcType=VARCHAR},
</if>
<if test="simpleDesc != null">
simple_desc = #{simpleDesc,jdbcType=VARCHAR},
</if> </if>
<if test="picUrl != null"> <if test="picUrl != null">
pic_url = #{picUrl,jdbcType=VARCHAR}, pic_url = #{picUrl,jdbcType=VARCHAR},
...@@ -436,24 +360,9 @@ ...@@ -436,24 +360,9 @@
<if test="sortOrder != null"> <if test="sortOrder != null">
sort_order = #{sortOrder,jdbcType=TINYINT}, sort_order = #{sortOrder,jdbcType=TINYINT},
</if> </if>
<if test="isShow != null">
is_show = #{isShow,jdbcType=BIT},
</if>
<if test="floorPrice != null"> <if test="floorPrice != null">
floor_price = #{floorPrice,jdbcType=DECIMAL}, floor_price = #{floorPrice,jdbcType=DECIMAL},
</if> </if>
<if test="appListPicUrl != null">
app_list_pic_url = #{appListPicUrl,jdbcType=VARCHAR},
</if>
<if test="isNew != null">
is_new = #{isNew,jdbcType=BIT},
</if>
<if test="newPicUrl != null">
new_pic_url = #{newPicUrl,jdbcType=VARCHAR},
</if>
<if test="newSortOrder != null">
new_sort_order = #{newSortOrder,jdbcType=TINYINT},
</if>
<if test="addTime != null"> <if test="addTime != null">
add_time = #{addTime,jdbcType=TIMESTAMP}, add_time = #{addTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -470,16 +379,10 @@ ...@@ -470,16 +379,10 @@
--> -->
update litemall_brand update litemall_brand
set `name` = #{name,jdbcType=VARCHAR}, set `name` = #{name,jdbcType=VARCHAR},
list_pic_url = #{listPicUrl,jdbcType=VARCHAR}, `desc` = #{desc,jdbcType=VARCHAR},
simple_desc = #{simpleDesc,jdbcType=VARCHAR},
pic_url = #{picUrl,jdbcType=VARCHAR}, pic_url = #{picUrl,jdbcType=VARCHAR},
sort_order = #{sortOrder,jdbcType=TINYINT}, sort_order = #{sortOrder,jdbcType=TINYINT},
is_show = #{isShow,jdbcType=BIT},
floor_price = #{floorPrice,jdbcType=DECIMAL}, floor_price = #{floorPrice,jdbcType=DECIMAL},
app_list_pic_url = #{appListPicUrl,jdbcType=VARCHAR},
is_new = #{isNew,jdbcType=BIT},
new_pic_url = #{newPicUrl,jdbcType=VARCHAR},
new_sort_order = #{newSortOrder,jdbcType=TINYINT},
add_time = #{addTime,jdbcType=TIMESTAMP}, add_time = #{addTime,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=BIT} deleted = #{deleted,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
...@@ -515,8 +418,7 @@ ...@@ -515,8 +418,7 @@
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, `name`, list_pic_url, simple_desc, pic_url, sort_order, is_show, floor_price, id, `name`, `desc`, pic_url, sort_order, floor_price, add_time, deleted
app_list_pic_url, is_new, new_pic_url, new_sort_order, add_time, deleted
</otherwise> </otherwise>
</choose> </choose>
from litemall_brand from litemall_brand
......
...@@ -10,12 +10,11 @@ ...@@ -10,12 +10,11 @@
<result column="user_id" jdbcType="INTEGER" property="userId" /> <result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="goods_id" jdbcType="INTEGER" property="goodsId" /> <result column="goods_id" jdbcType="INTEGER" property="goodsId" />
<result column="goods_sn" jdbcType="VARCHAR" property="goodsSn" /> <result column="goods_sn" jdbcType="VARCHAR" property="goodsSn" />
<result column="product_id" jdbcType="INTEGER" property="productId" />
<result column="goods_name" jdbcType="VARCHAR" property="goodsName" /> <result column="goods_name" jdbcType="VARCHAR" property="goodsName" />
<result column="retail_price" jdbcType="DECIMAL" property="retailPrice" /> <result column="product_id" jdbcType="INTEGER" property="productId" />
<result column="price" jdbcType="DECIMAL" property="price" />
<result column="number" jdbcType="SMALLINT" property="number" /> <result column="number" jdbcType="SMALLINT" property="number" />
<result column="goods_specification_values" jdbcType="VARCHAR" property="goodsSpecificationValues" /> <result column="specifications" jdbcType="VARCHAR" property="specifications" typeHandler="org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler" />
<result column="goods_specification_ids" jdbcType="CHAR" property="goodsSpecificationIds" typeHandler="org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler" />
<result column="checked" jdbcType="BIT" property="checked" /> <result column="checked" jdbcType="BIT" property="checked" />
<result column="pic_url" jdbcType="VARCHAR" property="picUrl" /> <result column="pic_url" jdbcType="VARCHAR" property="picUrl" />
<result column="add_time" jdbcType="TIMESTAMP" property="addTime" /> <result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
...@@ -49,21 +48,21 @@ ...@@ -49,21 +48,21 @@
</when> </when>
</choose> </choose>
</foreach> </foreach>
<foreach collection="criteria.goodsSpecificationIdsCriteria" item="criterion"> <foreach collection="criteria.specificationsCriteria" item="criterion">
<choose> <choose>
<when test="criterion.noValue"> <when test="criterion.noValue">
and ${criterion.condition} and ${criterion.condition}
</when> </when>
<when test="criterion.singleValue"> <when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value,typeHandler=org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler} and ${criterion.condition} #{criterion.value,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}
</when> </when>
<when test="criterion.betweenValue"> <when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value,typeHandler=org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler} and #{criterion.secondValue,typeHandler=org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler} and ${criterion.condition} #{criterion.value,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler} and #{criterion.secondValue,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}
</when> </when>
<when test="criterion.listValue"> <when test="criterion.listValue">
and ${criterion.condition} and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem,typeHandler=org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler} #{listItem,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}
</foreach> </foreach>
</when> </when>
</choose> </choose>
...@@ -101,21 +100,21 @@ ...@@ -101,21 +100,21 @@
</when> </when>
</choose> </choose>
</foreach> </foreach>
<foreach collection="criteria.goodsSpecificationIdsCriteria" item="criterion"> <foreach collection="criteria.specificationsCriteria" item="criterion">
<choose> <choose>
<when test="criterion.noValue"> <when test="criterion.noValue">
and ${criterion.condition} and ${criterion.condition}
</when> </when>
<when test="criterion.singleValue"> <when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value,typeHandler=org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler} and ${criterion.condition} #{criterion.value,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}
</when> </when>
<when test="criterion.betweenValue"> <when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value,typeHandler=org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler} and #{criterion.secondValue,typeHandler=org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler} and ${criterion.condition} #{criterion.value,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler} and #{criterion.secondValue,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}
</when> </when>
<when test="criterion.listValue"> <when test="criterion.listValue">
and ${criterion.condition} and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem,typeHandler=org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler} #{listItem,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}
</foreach> </foreach>
</when> </when>
</choose> </choose>
...@@ -130,9 +129,8 @@ ...@@ -130,9 +129,8 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
id, user_id, goods_id, goods_sn, product_id, goods_name, retail_price, `number`, id, user_id, goods_id, goods_sn, goods_name, product_id, price, `number`, specifications,
goods_specification_values, goods_specification_ids, `checked`, pic_url, add_time, `checked`, pic_url, add_time, deleted
deleted
</sql> </sql>
<select id="selectByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallCartExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallCartExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -169,9 +167,8 @@ ...@@ -169,9 +167,8 @@
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, user_id, goods_id, goods_sn, product_id, goods_name, retail_price, `number`, id, user_id, goods_id, goods_sn, goods_name, product_id, price, `number`, specifications,
goods_specification_values, goods_specification_ids, `checked`, pic_url, add_time, `checked`, pic_url, add_time, deleted
deleted
</otherwise> </otherwise>
</choose> </choose>
from litemall_cart from litemall_cart
...@@ -230,9 +227,8 @@ ...@@ -230,9 +227,8 @@
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, user_id, goods_id, goods_sn, product_id, goods_name, retail_price, `number`, id, user_id, goods_id, goods_sn, goods_name, product_id, price, `number`, specifications,
goods_specification_values, goods_specification_ids, `checked`, pic_url, add_time, `checked`, pic_url, add_time, deleted
deleted
</otherwise> </otherwise>
</choose> </choose>
from litemall_cart from litemall_cart
...@@ -265,13 +261,13 @@ ...@@ -265,13 +261,13 @@
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into litemall_cart (user_id, goods_id, goods_sn, insert into litemall_cart (user_id, goods_id, goods_sn,
product_id, goods_name, retail_price, goods_name, product_id, price,
`number`, goods_specification_values, goods_specification_ids, `number`, specifications,
`checked`, pic_url, add_time, `checked`, pic_url, add_time,
deleted) deleted)
values (#{userId,jdbcType=INTEGER}, #{goodsId,jdbcType=INTEGER}, #{goodsSn,jdbcType=VARCHAR}, values (#{userId,jdbcType=INTEGER}, #{goodsId,jdbcType=INTEGER}, #{goodsSn,jdbcType=VARCHAR},
#{productId,jdbcType=INTEGER}, #{goodsName,jdbcType=VARCHAR}, #{retailPrice,jdbcType=DECIMAL}, #{goodsName,jdbcType=VARCHAR}, #{productId,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL},
#{number,jdbcType=SMALLINT}, #{goodsSpecificationValues,jdbcType=VARCHAR}, #{goodsSpecificationIds,jdbcType=CHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler}, #{number,jdbcType=SMALLINT}, #{specifications,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler},
#{checked,jdbcType=BIT}, #{picUrl,jdbcType=VARCHAR}, #{addTime,jdbcType=TIMESTAMP}, #{checked,jdbcType=BIT}, #{picUrl,jdbcType=VARCHAR}, #{addTime,jdbcType=TIMESTAMP},
#{deleted,jdbcType=BIT}) #{deleted,jdbcType=BIT})
</insert> </insert>
...@@ -294,23 +290,20 @@ ...@@ -294,23 +290,20 @@
<if test="goodsSn != null"> <if test="goodsSn != null">
goods_sn, goods_sn,
</if> </if>
<if test="productId != null">
product_id,
</if>
<if test="goodsName != null"> <if test="goodsName != null">
goods_name, goods_name,
</if> </if>
<if test="retailPrice != null"> <if test="productId != null">
retail_price, product_id,
</if>
<if test="price != null">
price,
</if> </if>
<if test="number != null"> <if test="number != null">
`number`, `number`,
</if> </if>
<if test="goodsSpecificationValues != null"> <if test="specifications != null">
goods_specification_values, specifications,
</if>
<if test="goodsSpecificationIds != null">
goods_specification_ids,
</if> </if>
<if test="checked != null"> <if test="checked != null">
`checked`, `checked`,
...@@ -335,23 +328,20 @@ ...@@ -335,23 +328,20 @@
<if test="goodsSn != null"> <if test="goodsSn != null">
#{goodsSn,jdbcType=VARCHAR}, #{goodsSn,jdbcType=VARCHAR},
</if> </if>
<if test="productId != null">
#{productId,jdbcType=INTEGER},
</if>
<if test="goodsName != null"> <if test="goodsName != null">
#{goodsName,jdbcType=VARCHAR}, #{goodsName,jdbcType=VARCHAR},
</if> </if>
<if test="retailPrice != null"> <if test="productId != null">
#{retailPrice,jdbcType=DECIMAL}, #{productId,jdbcType=INTEGER},
</if>
<if test="price != null">
#{price,jdbcType=DECIMAL},
</if> </if>
<if test="number != null"> <if test="number != null">
#{number,jdbcType=SMALLINT}, #{number,jdbcType=SMALLINT},
</if> </if>
<if test="goodsSpecificationValues != null"> <if test="specifications != null">
#{goodsSpecificationValues,jdbcType=VARCHAR}, #{specifications,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler},
</if>
<if test="goodsSpecificationIds != null">
#{goodsSpecificationIds,jdbcType=CHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler},
</if> </if>
<if test="checked != null"> <if test="checked != null">
#{checked,jdbcType=BIT}, #{checked,jdbcType=BIT},
...@@ -396,23 +386,20 @@ ...@@ -396,23 +386,20 @@
<if test="record.goodsSn != null"> <if test="record.goodsSn != null">
goods_sn = #{record.goodsSn,jdbcType=VARCHAR}, goods_sn = #{record.goodsSn,jdbcType=VARCHAR},
</if> </if>
<if test="record.productId != null">
product_id = #{record.productId,jdbcType=INTEGER},
</if>
<if test="record.goodsName != null"> <if test="record.goodsName != null">
goods_name = #{record.goodsName,jdbcType=VARCHAR}, goods_name = #{record.goodsName,jdbcType=VARCHAR},
</if> </if>
<if test="record.retailPrice != null"> <if test="record.productId != null">
retail_price = #{record.retailPrice,jdbcType=DECIMAL}, product_id = #{record.productId,jdbcType=INTEGER},
</if>
<if test="record.price != null">
price = #{record.price,jdbcType=DECIMAL},
</if> </if>
<if test="record.number != null"> <if test="record.number != null">
`number` = #{record.number,jdbcType=SMALLINT}, `number` = #{record.number,jdbcType=SMALLINT},
</if> </if>
<if test="record.goodsSpecificationValues != null"> <if test="record.specifications != null">
goods_specification_values = #{record.goodsSpecificationValues,jdbcType=VARCHAR}, specifications = #{record.specifications,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler},
</if>
<if test="record.goodsSpecificationIds != null">
goods_specification_ids = #{record.goodsSpecificationIds,jdbcType=CHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler},
</if> </if>
<if test="record.checked != null"> <if test="record.checked != null">
`checked` = #{record.checked,jdbcType=BIT}, `checked` = #{record.checked,jdbcType=BIT},
...@@ -441,12 +428,11 @@ ...@@ -441,12 +428,11 @@
user_id = #{record.userId,jdbcType=INTEGER}, user_id = #{record.userId,jdbcType=INTEGER},
goods_id = #{record.goodsId,jdbcType=INTEGER}, goods_id = #{record.goodsId,jdbcType=INTEGER},
goods_sn = #{record.goodsSn,jdbcType=VARCHAR}, goods_sn = #{record.goodsSn,jdbcType=VARCHAR},
product_id = #{record.productId,jdbcType=INTEGER},
goods_name = #{record.goodsName,jdbcType=VARCHAR}, goods_name = #{record.goodsName,jdbcType=VARCHAR},
retail_price = #{record.retailPrice,jdbcType=DECIMAL}, product_id = #{record.productId,jdbcType=INTEGER},
price = #{record.price,jdbcType=DECIMAL},
`number` = #{record.number,jdbcType=SMALLINT}, `number` = #{record.number,jdbcType=SMALLINT},
goods_specification_values = #{record.goodsSpecificationValues,jdbcType=VARCHAR}, specifications = #{record.specifications,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler},
goods_specification_ids = #{record.goodsSpecificationIds,jdbcType=CHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler},
`checked` = #{record.checked,jdbcType=BIT}, `checked` = #{record.checked,jdbcType=BIT},
pic_url = #{record.picUrl,jdbcType=VARCHAR}, pic_url = #{record.picUrl,jdbcType=VARCHAR},
add_time = #{record.addTime,jdbcType=TIMESTAMP}, add_time = #{record.addTime,jdbcType=TIMESTAMP},
...@@ -471,23 +457,20 @@ ...@@ -471,23 +457,20 @@
<if test="goodsSn != null"> <if test="goodsSn != null">
goods_sn = #{goodsSn,jdbcType=VARCHAR}, goods_sn = #{goodsSn,jdbcType=VARCHAR},
</if> </if>
<if test="productId != null">
product_id = #{productId,jdbcType=INTEGER},
</if>
<if test="goodsName != null"> <if test="goodsName != null">
goods_name = #{goodsName,jdbcType=VARCHAR}, goods_name = #{goodsName,jdbcType=VARCHAR},
</if> </if>
<if test="retailPrice != null"> <if test="productId != null">
retail_price = #{retailPrice,jdbcType=DECIMAL}, product_id = #{productId,jdbcType=INTEGER},
</if>
<if test="price != null">
price = #{price,jdbcType=DECIMAL},
</if> </if>
<if test="number != null"> <if test="number != null">
`number` = #{number,jdbcType=SMALLINT}, `number` = #{number,jdbcType=SMALLINT},
</if> </if>
<if test="goodsSpecificationValues != null"> <if test="specifications != null">
goods_specification_values = #{goodsSpecificationValues,jdbcType=VARCHAR}, specifications = #{specifications,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler},
</if>
<if test="goodsSpecificationIds != null">
goods_specification_ids = #{goodsSpecificationIds,jdbcType=CHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler},
</if> </if>
<if test="checked != null"> <if test="checked != null">
`checked` = #{checked,jdbcType=BIT}, `checked` = #{checked,jdbcType=BIT},
...@@ -513,12 +496,11 @@ ...@@ -513,12 +496,11 @@
set user_id = #{userId,jdbcType=INTEGER}, set user_id = #{userId,jdbcType=INTEGER},
goods_id = #{goodsId,jdbcType=INTEGER}, goods_id = #{goodsId,jdbcType=INTEGER},
goods_sn = #{goodsSn,jdbcType=VARCHAR}, goods_sn = #{goodsSn,jdbcType=VARCHAR},
product_id = #{productId,jdbcType=INTEGER},
goods_name = #{goodsName,jdbcType=VARCHAR}, goods_name = #{goodsName,jdbcType=VARCHAR},
retail_price = #{retailPrice,jdbcType=DECIMAL}, product_id = #{productId,jdbcType=INTEGER},
price = #{price,jdbcType=DECIMAL},
`number` = #{number,jdbcType=SMALLINT}, `number` = #{number,jdbcType=SMALLINT},
goods_specification_values = #{goodsSpecificationValues,jdbcType=VARCHAR}, specifications = #{specifications,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler},
goods_specification_ids = #{goodsSpecificationIds,jdbcType=CHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler},
`checked` = #{checked,jdbcType=BIT}, `checked` = #{checked,jdbcType=BIT},
pic_url = #{picUrl,jdbcType=VARCHAR}, pic_url = #{picUrl,jdbcType=VARCHAR},
add_time = #{addTime,jdbcType=TIMESTAMP}, add_time = #{addTime,jdbcType=TIMESTAMP},
...@@ -556,9 +538,8 @@ ...@@ -556,9 +538,8 @@
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, user_id, goods_id, goods_sn, product_id, goods_name, retail_price, `number`, id, user_id, goods_id, goods_sn, goods_name, product_id, price, `number`, specifications,
goods_specification_values, goods_specification_ids, `checked`, pic_url, add_time, `checked`, pic_url, add_time, deleted
deleted
</otherwise> </otherwise>
</choose> </choose>
from litemall_cart from litemall_cart
......
...@@ -9,18 +9,12 @@ ...@@ -9,18 +9,12 @@
<id column="id" jdbcType="INTEGER" property="id" /> <id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" /> <result column="name" jdbcType="VARCHAR" property="name" />
<result column="keywords" jdbcType="VARCHAR" property="keywords" /> <result column="keywords" jdbcType="VARCHAR" property="keywords" />
<result column="front_desc" jdbcType="VARCHAR" property="frontDesc" /> <result column="desc" jdbcType="VARCHAR" property="desc" />
<result column="parent_id" jdbcType="INTEGER" property="parentId" /> <result column="pid" jdbcType="INTEGER" property="pid" />
<result column="sort_order" jdbcType="TINYINT" property="sortOrder" />
<result column="show_index" jdbcType="TINYINT" property="showIndex" />
<result column="is_show" jdbcType="BIT" property="isShow" />
<result column="banner_url" jdbcType="VARCHAR" property="bannerUrl" />
<result column="icon_url" jdbcType="VARCHAR" property="iconUrl" /> <result column="icon_url" jdbcType="VARCHAR" property="iconUrl" />
<result column="img_url" jdbcType="VARCHAR" property="imgUrl" /> <result column="pic_url" jdbcType="VARCHAR" property="picUrl" />
<result column="wap_banner_url" jdbcType="VARCHAR" property="wapBannerUrl" />
<result column="level" jdbcType="VARCHAR" property="level" /> <result column="level" jdbcType="VARCHAR" property="level" />
<result column="type" jdbcType="INTEGER" property="type" /> <result column="sort_order" jdbcType="TINYINT" property="sortOrder" />
<result column="front_name" jdbcType="VARCHAR" property="frontName" />
<result column="add_time" jdbcType="TIMESTAMP" property="addTime" /> <result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
<result column="deleted" jdbcType="BIT" property="deleted" /> <result column="deleted" jdbcType="BIT" property="deleted" />
</resultMap> </resultMap>
...@@ -95,8 +89,8 @@ ...@@ -95,8 +89,8 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
id, `name`, keywords, front_desc, parent_id, sort_order, show_index, is_show, banner_url, id, `name`, keywords, `desc`, pid, icon_url, pic_url, `level`, sort_order, add_time,
icon_url, img_url, wap_banner_url, `level`, `type`, front_name, add_time, deleted deleted
</sql> </sql>
<select id="selectByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallCategoryExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallCategoryExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -133,9 +127,8 @@ ...@@ -133,9 +127,8 @@
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, `name`, keywords, front_desc, parent_id, sort_order, show_index, is_show, banner_url, id, `name`, keywords, `desc`, pid, icon_url, pic_url, `level`, sort_order, add_time,
icon_url, img_url, wap_banner_url, `level`, `type`, front_name, add_time, deleted deleted
</otherwise> </otherwise>
</choose> </choose>
from litemall_category from litemall_category
...@@ -194,9 +187,8 @@ ...@@ -194,9 +187,8 @@
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, `name`, keywords, front_desc, parent_id, sort_order, show_index, is_show, banner_url, id, `name`, keywords, `desc`, pid, icon_url, pic_url, `level`, sort_order, add_time,
icon_url, img_url, wap_banner_url, `level`, `type`, front_name, add_time, deleted deleted
</otherwise> </otherwise>
</choose> </choose>
from litemall_category from litemall_category
...@@ -228,17 +220,13 @@ ...@@ -228,17 +220,13 @@
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into litemall_category (`name`, keywords, front_desc, insert into litemall_category (`name`, keywords, `desc`,
parent_id, sort_order, show_index, pid, icon_url, pic_url,
is_show, banner_url, icon_url, `level`, sort_order, add_time,
img_url, wap_banner_url, `level`,
`type`, front_name, add_time,
deleted) deleted)
values (#{name,jdbcType=VARCHAR}, #{keywords,jdbcType=VARCHAR}, #{frontDesc,jdbcType=VARCHAR}, values (#{name,jdbcType=VARCHAR}, #{keywords,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR},
#{parentId,jdbcType=INTEGER}, #{sortOrder,jdbcType=TINYINT}, #{showIndex,jdbcType=TINYINT}, #{pid,jdbcType=INTEGER}, #{iconUrl,jdbcType=VARCHAR}, #{picUrl,jdbcType=VARCHAR},
#{isShow,jdbcType=BIT}, #{bannerUrl,jdbcType=VARCHAR}, #{iconUrl,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR}, #{sortOrder,jdbcType=TINYINT}, #{addTime,jdbcType=TIMESTAMP},
#{imgUrl,jdbcType=VARCHAR}, #{wapBannerUrl,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER}, #{frontName,jdbcType=VARCHAR}, #{addTime,jdbcType=TIMESTAMP},
#{deleted,jdbcType=BIT}) #{deleted,jdbcType=BIT})
</insert> </insert>
<insert id="insertSelective" parameterType="org.linlinjava.litemall.db.domain.LitemallCategory"> <insert id="insertSelective" parameterType="org.linlinjava.litemall.db.domain.LitemallCategory">
...@@ -257,41 +245,23 @@ ...@@ -257,41 +245,23 @@
<if test="keywords != null"> <if test="keywords != null">
keywords, keywords,
</if> </if>
<if test="frontDesc != null"> <if test="desc != null">
front_desc, `desc`,
</if>
<if test="parentId != null">
parent_id,
</if>
<if test="sortOrder != null">
sort_order,
</if>
<if test="showIndex != null">
show_index,
</if>
<if test="isShow != null">
is_show,
</if> </if>
<if test="bannerUrl != null"> <if test="pid != null">
banner_url, pid,
</if> </if>
<if test="iconUrl != null"> <if test="iconUrl != null">
icon_url, icon_url,
</if> </if>
<if test="imgUrl != null"> <if test="picUrl != null">
img_url, pic_url,
</if>
<if test="wapBannerUrl != null">
wap_banner_url,
</if> </if>
<if test="level != null"> <if test="level != null">
`level`, `level`,
</if> </if>
<if test="type != null"> <if test="sortOrder != null">
`type`, sort_order,
</if>
<if test="frontName != null">
front_name,
</if> </if>
<if test="addTime != null"> <if test="addTime != null">
add_time, add_time,
...@@ -307,41 +277,23 @@ ...@@ -307,41 +277,23 @@
<if test="keywords != null"> <if test="keywords != null">
#{keywords,jdbcType=VARCHAR}, #{keywords,jdbcType=VARCHAR},
</if> </if>
<if test="frontDesc != null"> <if test="desc != null">
#{frontDesc,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR},
</if> </if>
<if test="parentId != null"> <if test="pid != null">
#{parentId,jdbcType=INTEGER}, #{pid,jdbcType=INTEGER},
</if>
<if test="sortOrder != null">
#{sortOrder,jdbcType=TINYINT},
</if>
<if test="showIndex != null">
#{showIndex,jdbcType=TINYINT},
</if>
<if test="isShow != null">
#{isShow,jdbcType=BIT},
</if>
<if test="bannerUrl != null">
#{bannerUrl,jdbcType=VARCHAR},
</if> </if>
<if test="iconUrl != null"> <if test="iconUrl != null">
#{iconUrl,jdbcType=VARCHAR}, #{iconUrl,jdbcType=VARCHAR},
</if> </if>
<if test="imgUrl != null"> <if test="picUrl != null">
#{imgUrl,jdbcType=VARCHAR}, #{picUrl,jdbcType=VARCHAR},
</if>
<if test="wapBannerUrl != null">
#{wapBannerUrl,jdbcType=VARCHAR},
</if> </if>
<if test="level != null"> <if test="level != null">
#{level,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR},
</if> </if>
<if test="type != null"> <if test="sortOrder != null">
#{type,jdbcType=INTEGER}, #{sortOrder,jdbcType=TINYINT},
</if>
<if test="frontName != null">
#{frontName,jdbcType=VARCHAR},
</if> </if>
<if test="addTime != null"> <if test="addTime != null">
#{addTime,jdbcType=TIMESTAMP}, #{addTime,jdbcType=TIMESTAMP},
...@@ -377,41 +329,23 @@ ...@@ -377,41 +329,23 @@
<if test="record.keywords != null"> <if test="record.keywords != null">
keywords = #{record.keywords,jdbcType=VARCHAR}, keywords = #{record.keywords,jdbcType=VARCHAR},
</if> </if>
<if test="record.frontDesc != null"> <if test="record.desc != null">
front_desc = #{record.frontDesc,jdbcType=VARCHAR}, `desc` = #{record.desc,jdbcType=VARCHAR},
</if>
<if test="record.parentId != null">
parent_id = #{record.parentId,jdbcType=INTEGER},
</if> </if>
<if test="record.sortOrder != null"> <if test="record.pid != null">
sort_order = #{record.sortOrder,jdbcType=TINYINT}, pid = #{record.pid,jdbcType=INTEGER},
</if>
<if test="record.showIndex != null">
show_index = #{record.showIndex,jdbcType=TINYINT},
</if>
<if test="record.isShow != null">
is_show = #{record.isShow,jdbcType=BIT},
</if>
<if test="record.bannerUrl != null">
banner_url = #{record.bannerUrl,jdbcType=VARCHAR},
</if> </if>
<if test="record.iconUrl != null"> <if test="record.iconUrl != null">
icon_url = #{record.iconUrl,jdbcType=VARCHAR}, icon_url = #{record.iconUrl,jdbcType=VARCHAR},
</if> </if>
<if test="record.imgUrl != null"> <if test="record.picUrl != null">
img_url = #{record.imgUrl,jdbcType=VARCHAR}, pic_url = #{record.picUrl,jdbcType=VARCHAR},
</if>
<if test="record.wapBannerUrl != null">
wap_banner_url = #{record.wapBannerUrl,jdbcType=VARCHAR},
</if> </if>
<if test="record.level != null"> <if test="record.level != null">
`level` = #{record.level,jdbcType=VARCHAR}, `level` = #{record.level,jdbcType=VARCHAR},
</if> </if>
<if test="record.type != null"> <if test="record.sortOrder != null">
`type` = #{record.type,jdbcType=INTEGER}, sort_order = #{record.sortOrder,jdbcType=TINYINT},
</if>
<if test="record.frontName != null">
front_name = #{record.frontName,jdbcType=VARCHAR},
</if> </if>
<if test="record.addTime != null"> <if test="record.addTime != null">
add_time = #{record.addTime,jdbcType=TIMESTAMP}, add_time = #{record.addTime,jdbcType=TIMESTAMP},
...@@ -433,18 +367,12 @@ ...@@ -433,18 +367,12 @@
set id = #{record.id,jdbcType=INTEGER}, set id = #{record.id,jdbcType=INTEGER},
`name` = #{record.name,jdbcType=VARCHAR}, `name` = #{record.name,jdbcType=VARCHAR},
keywords = #{record.keywords,jdbcType=VARCHAR}, keywords = #{record.keywords,jdbcType=VARCHAR},
front_desc = #{record.frontDesc,jdbcType=VARCHAR}, `desc` = #{record.desc,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=INTEGER}, pid = #{record.pid,jdbcType=INTEGER},
sort_order = #{record.sortOrder,jdbcType=TINYINT},
show_index = #{record.showIndex,jdbcType=TINYINT},
is_show = #{record.isShow,jdbcType=BIT},
banner_url = #{record.bannerUrl,jdbcType=VARCHAR},
icon_url = #{record.iconUrl,jdbcType=VARCHAR}, icon_url = #{record.iconUrl,jdbcType=VARCHAR},
img_url = #{record.imgUrl,jdbcType=VARCHAR}, pic_url = #{record.picUrl,jdbcType=VARCHAR},
wap_banner_url = #{record.wapBannerUrl,jdbcType=VARCHAR},
`level` = #{record.level,jdbcType=VARCHAR}, `level` = #{record.level,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=INTEGER}, sort_order = #{record.sortOrder,jdbcType=TINYINT},
front_name = #{record.frontName,jdbcType=VARCHAR},
add_time = #{record.addTime,jdbcType=TIMESTAMP}, add_time = #{record.addTime,jdbcType=TIMESTAMP},
deleted = #{record.deleted,jdbcType=BIT} deleted = #{record.deleted,jdbcType=BIT}
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -464,41 +392,23 @@ ...@@ -464,41 +392,23 @@
<if test="keywords != null"> <if test="keywords != null">
keywords = #{keywords,jdbcType=VARCHAR}, keywords = #{keywords,jdbcType=VARCHAR},
</if> </if>
<if test="frontDesc != null"> <if test="desc != null">
front_desc = #{frontDesc,jdbcType=VARCHAR}, `desc` = #{desc,jdbcType=VARCHAR},
</if> </if>
<if test="parentId != null"> <if test="pid != null">
parent_id = #{parentId,jdbcType=INTEGER}, pid = #{pid,jdbcType=INTEGER},
</if>
<if test="sortOrder != null">
sort_order = #{sortOrder,jdbcType=TINYINT},
</if>
<if test="showIndex != null">
show_index = #{showIndex,jdbcType=TINYINT},
</if>
<if test="isShow != null">
is_show = #{isShow,jdbcType=BIT},
</if>
<if test="bannerUrl != null">
banner_url = #{bannerUrl,jdbcType=VARCHAR},
</if> </if>
<if test="iconUrl != null"> <if test="iconUrl != null">
icon_url = #{iconUrl,jdbcType=VARCHAR}, icon_url = #{iconUrl,jdbcType=VARCHAR},
</if> </if>
<if test="imgUrl != null"> <if test="picUrl != null">
img_url = #{imgUrl,jdbcType=VARCHAR}, pic_url = #{picUrl,jdbcType=VARCHAR},
</if>
<if test="wapBannerUrl != null">
wap_banner_url = #{wapBannerUrl,jdbcType=VARCHAR},
</if> </if>
<if test="level != null"> <if test="level != null">
`level` = #{level,jdbcType=VARCHAR}, `level` = #{level,jdbcType=VARCHAR},
</if> </if>
<if test="type != null"> <if test="sortOrder != null">
`type` = #{type,jdbcType=INTEGER}, sort_order = #{sortOrder,jdbcType=TINYINT},
</if>
<if test="frontName != null">
front_name = #{frontName,jdbcType=VARCHAR},
</if> </if>
<if test="addTime != null"> <if test="addTime != null">
add_time = #{addTime,jdbcType=TIMESTAMP}, add_time = #{addTime,jdbcType=TIMESTAMP},
...@@ -517,18 +427,12 @@ ...@@ -517,18 +427,12 @@
update litemall_category update litemall_category
set `name` = #{name,jdbcType=VARCHAR}, set `name` = #{name,jdbcType=VARCHAR},
keywords = #{keywords,jdbcType=VARCHAR}, keywords = #{keywords,jdbcType=VARCHAR},
front_desc = #{frontDesc,jdbcType=VARCHAR}, `desc` = #{desc,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER}, pid = #{pid,jdbcType=INTEGER},
sort_order = #{sortOrder,jdbcType=TINYINT},
show_index = #{showIndex,jdbcType=TINYINT},
is_show = #{isShow,jdbcType=BIT},
banner_url = #{bannerUrl,jdbcType=VARCHAR},
icon_url = #{iconUrl,jdbcType=VARCHAR}, icon_url = #{iconUrl,jdbcType=VARCHAR},
img_url = #{imgUrl,jdbcType=VARCHAR}, pic_url = #{picUrl,jdbcType=VARCHAR},
wap_banner_url = #{wapBannerUrl,jdbcType=VARCHAR},
`level` = #{level,jdbcType=VARCHAR}, `level` = #{level,jdbcType=VARCHAR},
`type` = #{type,jdbcType=INTEGER}, sort_order = #{sortOrder,jdbcType=TINYINT},
front_name = #{frontName,jdbcType=VARCHAR},
add_time = #{addTime,jdbcType=TIMESTAMP}, add_time = #{addTime,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=BIT} deleted = #{deleted,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
...@@ -564,9 +468,8 @@ ...@@ -564,9 +468,8 @@
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, `name`, keywords, front_desc, parent_id, sort_order, show_index, is_show, banner_url, id, `name`, keywords, `desc`, pid, icon_url, pic_url, `level`, sort_order, add_time,
icon_url, img_url, wap_banner_url, `level`, `type`, front_name, add_time, deleted deleted
</otherwise> </otherwise>
</choose> </choose>
from litemall_category from litemall_category
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment