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