From 2786b410bda03fe821db2d5e435f331392db5393 Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Sat, 13 Jun 2020 00:09:05 +0800 Subject: [PATCH 001/121] =?UTF-8?q?feat[litemall-admin]:=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0vue-element-admin=E5=88=B04.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litemall-admin/package.json | 8 +-- .../src/components/Notice/index.vue | 2 +- .../src/components/ScrollPane/index.vue | 4 +- litemall-admin/src/permission.js | 2 +- litemall-admin/src/router/index.js | 28 +++++--- litemall-admin/src/store/getters.js | 7 +- .../src/store/modules/permission.js | 26 +++---- litemall-admin/src/store/modules/user.js | 71 +++++++------------ litemall-admin/src/styles/element-ui.scss | 2 +- .../src/styles/element-variables.scss | 6 +- litemall-admin/src/styles/sidebar.scss | 19 +++++ litemall-admin/src/vendor/Export2Excel.js | 18 ++++- litemall-admin/src/views/goods/comment.vue | 20 +++--- .../src/views/layout/components/Navbar.vue | 4 +- .../views/layout/components/Sidebar/Item.vue | 14 +++- .../views/layout/components/Sidebar/Link.vue | 33 +++++---- .../views/layout/components/Sidebar/index.vue | 4 +- .../components/{ => TagsView}/ScrollPane.vue | 18 ++--- .../{TagsView.vue => TagsView/index.vue} | 18 ++--- .../src/views/layout/components/index.js | 4 +- litemall-admin/vue.config.js | 20 +++--- 21 files changed, 182 insertions(+), 146 deletions(-) rename litemall-admin/src/views/layout/components/{ => TagsView}/ScrollPane.vue (90%) rename litemall-admin/src/views/layout/components/{TagsView.vue => TagsView/index.vue} (94%) diff --git a/litemall-admin/package.json b/litemall-admin/package.json index ba0a1f84..870fa83f 100644 --- a/litemall-admin/package.json +++ b/litemall-admin/package.json @@ -1,7 +1,7 @@ { "name": "litemall-admin", "version": "1.0.0", - "description": "litemall-admin basing on vue-element-admin 4.2.1", + "description": "litemall-admin basing on vue-element-admin 4.3.0", "author": "linlinjava ", "license": "MIT", "scripts": { @@ -50,13 +50,14 @@ "clipboard": "2.0.4", "connect": "3.6.6", "echarts": "4.2.1", - "element-ui": "2.12.0", + "element-ui": "2.13.2", "file-saver": "1.3.8", "js-cookie": "2.2.0", "normalize.css": "7.0.0", "nprogress": "0.2.0", "path-to-regexp": "2.4.0", "screenfull": "4.2.0", + "script-loader": "0.7.2", "vue": "2.6.10", "vue-count-to": "1.0.13", "vue-router": "3.0.2", @@ -83,11 +84,10 @@ "html-webpack-plugin": "3.2.0", "husky": "1.3.1", "lint-staged": "8.1.5", - "node-sass": "^4.9.0", + "sass": "^1.26.2", "runjs": "^4.3.2", "sass-loader": "^7.1.0", "script-ext-html-webpack-plugin": "2.1.3", - "script-loader": "0.7.2", "serve-static": "^1.13.2", "svg-sprite-loader": "4.1.3", "svgo": "1.2.0", diff --git a/litemall-admin/src/components/Notice/index.vue b/litemall-admin/src/components/Notice/index.vue index 1b7499be..c131013c 100644 --- a/litemall-admin/src/components/Notice/index.vue +++ b/litemall-admin/src/components/Notice/index.vue @@ -42,7 +42,7 @@ export default { diff --git a/litemall-admin/src/views/layout/components/Sidebar/Link.vue b/litemall-admin/src/views/layout/components/Sidebar/Link.vue index 5d366f24..b66755da 100644 --- a/litemall-admin/src/views/layout/components/Sidebar/Link.vue +++ b/litemall-admin/src/views/layout/components/Sidebar/Link.vue @@ -1,14 +1,11 @@ - -- Gitee From 7ff311b60485367d7926d66bbd23995cbd697162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BB=91=E7=A8=BD=E5=88=98?= <1073236926@qq.com> Date: Sat, 27 Jun 2020 15:17:51 +0800 Subject: [PATCH 011/121] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=94=AE=E5=90=8E?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=98=BE=E7=A4=BA=EF=BC=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=A0=B9=E6=8D=AEid=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litemall-admin/src/views/mall/aftersale.vue | 5 ++- litemall-admin/src/views/mall/order.vue | 35 ++++++++++++++------- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/litemall-admin/src/views/mall/aftersale.vue b/litemall-admin/src/views/mall/aftersale.vue index e711508b..f4266c91 100644 --- a/litemall-admin/src/views/mall/aftersale.vue +++ b/litemall-admin/src/views/mall/aftersale.vue @@ -67,7 +67,10 @@ {{ aftersaleDetail.amount }} - {{ aftersaleDetail.status }} + 已申请,待审核 + 审核通过,待退款 + 退款成功 + 审核不通过,已拒绝 {{ aftersaleDetail.userId }} diff --git a/litemall-admin/src/views/mall/order.vue b/litemall-admin/src/views/mall/order.vue index 51f412ad..9ad57210 100644 --- a/litemall-admin/src/views/mall/order.vue +++ b/litemall-admin/src/views/mall/order.vue @@ -4,6 +4,7 @@
+ @@ -190,7 +191,8 @@ export default { timeArray: [], orderStatusArray: [], sort: 'add_time', - order: 'desc' + order: 'desc', + orderId:undefined }, pickerOptions: { shortcuts: [{ @@ -256,16 +258,27 @@ export default { this.listQuery.start = null this.listQuery.end = null } - - listOrder(this.listQuery).then(response => { - this.list = response.data.data.list - this.total = response.data.data.total - this.listLoading = false - }).catch(() => { - this.list = [] - this.total = 0 - this.listLoading = false - }) + if(this.listQuery.orderId){ + detailOrder(this.listQuery.orderId).then(response => { + this.list = []; + this.list.push(response.data.data.order) + this.listLoading = false + }).catch(() => { + this.list = [] + this.total = 0 + this.listLoading = false + }) + }else{ + listOrder(this.listQuery).then(response => { + this.list = response.data.data.list + this.total = response.data.data.total + this.listLoading = false + }).catch(() => { + this.list = [] + this.total = 0 + this.listLoading = false + }) + } }, getChannel() { listChannel().then(response => { -- Gitee From 9d2c07a11f260ce8f109c5cf273c32084ff52f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BB=91=E7=A8=BD=E5=88=98?= <1073236926@qq.com> Date: Sat, 27 Jun 2020 15:23:15 +0800 Subject: [PATCH 012/121] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=94=AE=E5=90=8E?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E7=8A=B6=E6=80=81=E6=98=BE=E7=A4=BA=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=A2=E5=8D=95=E6=A0=B9=E6=8D=AEid?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litemall-admin/src/views/mall/order.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/litemall-admin/src/views/mall/order.vue b/litemall-admin/src/views/mall/order.vue index 9ad57210..b6974d7a 100644 --- a/litemall-admin/src/views/mall/order.vue +++ b/litemall-admin/src/views/mall/order.vue @@ -261,8 +261,11 @@ export default { if(this.listQuery.orderId){ detailOrder(this.listQuery.orderId).then(response => { this.list = []; - this.list.push(response.data.data.order) - this.listLoading = false + if(response.data.data.order){ + this.list.push(response.data.data.order); + this.total = 1; + this.listLoading = false + } }).catch(() => { this.list = [] this.total = 0 -- Gitee From 04c716de0578cb123201376ed6243e65a02c77e0 Mon Sep 17 00:00:00 2001 From: Batur <9591690+Batur24@users.noreply.github.com> Date: Mon, 29 Jun 2020 15:39:55 +0800 Subject: [PATCH 013/121] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E9=A1=B5=E9=9D=A2=E5=AF=BC=E8=88=AA=E6=A0=8F?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=20(#409)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litemall-vue/src/views/user/module-address/index.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/litemall-vue/src/views/user/module-address/index.vue b/litemall-vue/src/views/user/module-address/index.vue index 33635c68..19e454cf 100755 --- a/litemall-vue/src/views/user/module-address/index.vue +++ b/litemall-vue/src/views/user/module-address/index.vue @@ -1,6 +1,5 @@ -- Gitee From 27e6d275d1aa136b4a161554bc1faf6379826c4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BB=91=E7=A8=BD=E5=88=98?= <1073236926@qq.com> Date: Thu, 2 Jul 2020 21:08:49 +0800 Subject: [PATCH 014/121] =?UTF-8?q?=E9=99=90=E5=88=B6=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E8=87=AA=E5=B7=B1=E5=BC=80=E5=9B=A2=E5=9B=A2=E8=B4=AD=E9=83=A8?= =?UTF-8?q?=E5=88=86=E5=8A=A0=E5=85=A5=E5=88=A4=E7=A9=BA=EF=BC=8C=E5=90=A6?= =?UTF-8?q?=E5=88=99=E7=94=A8=E6=88=B7=E6=97=A0=E6=B3=95=E6=83=A8=E5=9B=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../linlinjava/litemall/wx/service/WxOrderService.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/service/WxOrderService.java b/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/service/WxOrderService.java index 739a0d04..d83b51b8 100644 --- a/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/service/WxOrderService.java +++ b/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/service/WxOrderService.java @@ -290,8 +290,13 @@ public class WxOrderService { } // (2)不允许参加自己开团的团购 LitemallGroupon groupon = grouponService.queryById(userId, grouponLinkId); - if(groupon.getCreatorUserId().equals(userId)){ - return ResponseUtil.fail(GROUPON_JOIN, "团购活动已经参加!"); + // if(groupon.getCreatorUserId().equals(userId)){ + // return ResponseUtil.fail(GROUPON_JOIN, "团购活动已经参加!"); + // } + if(groupon!=null) { + if(groupon.getCreatorUserId().equals(userId)){ + return ResponseUtil.fail(GROUPON_JOIN, "团购活动已经参加!"); + } } } } -- Gitee From 25518ade9fa2b4d312fe25d1fa5c7f05cdb2b504 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Jul 2020 10:43:00 +0800 Subject: [PATCH 015/121] build(deps): bump mysql-connector-java in /litemall-db (#411) Bumps [mysql-connector-java](https://github.com/mysql/mysql-connector-j) from 5.1.46 to 8.0.16. - [Release notes](https://github.com/mysql/mysql-connector-j/releases) - [Changelog](https://github.com/mysql/mysql-connector-j/blob/release/8.0/CHANGES) - [Commits](https://github.com/mysql/mysql-connector-j/compare/5.1.46...8.0.16) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- litemall-db/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litemall-db/pom.xml b/litemall-db/pom.xml index eaf34e76..2b6326a8 100644 --- a/litemall-db/pom.xml +++ b/litemall-db/pom.xml @@ -57,7 +57,7 @@ mysql mysql-connector-java - 5.1.46 + 8.0.16 com.itfsw -- Gitee From fa189cdcf4c66c5ad60b6432804533dc9d5a307a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Jul 2020 10:43:20 +0800 Subject: [PATCH 016/121] build(deps): bump mysql-connector-java from 5.1.46 to 8.0.16 (#410) Bumps [mysql-connector-java](https://github.com/mysql/mysql-connector-j) from 5.1.46 to 8.0.16. - [Release notes](https://github.com/mysql/mysql-connector-j/releases) - [Changelog](https://github.com/mysql/mysql-connector-j/blob/release/8.0/CHANGES) - [Commits](https://github.com/mysql/mysql-connector-j/compare/5.1.46...8.0.16) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6f01efc4..c1ca1d4e 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ mysql mysql-connector-java - 5.1.46 + 8.0.16 -- Gitee From 8dd7c4bb2c18c7669ad6e0c298eab9eacbb47c04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BB=91=E7=A8=BD=E5=88=98?= <1073236926@qq.com> Date: Sun, 5 Jul 2020 11:25:23 +0800 Subject: [PATCH 017/121] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E7=AE=A1=E7=90=86,=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7id?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E7=94=A8=E6=88=B7=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/web/AdminUserController.java | 17 +++ litemall-admin/src/api/user.js | 17 ++- litemall-admin/src/views/user/user.vue | 103 +++++++++++++++--- 3 files changed, 123 insertions(+), 14 deletions(-) diff --git a/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminUserController.java b/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminUserController.java index 2052d616..ac544adb 100644 --- a/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminUserController.java +++ b/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminUserController.java @@ -12,12 +12,16 @@ import org.linlinjava.litemall.db.service.LitemallUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.List; +import javax.validation.constraints.NotNull; + @RestController @RequestMapping("/admin/user") @Validated @@ -38,4 +42,17 @@ public class AdminUserController { List userList = userService.querySelective(username, mobile, page, limit, sort, order); return ResponseUtil.okList(userList); } + @RequiresPermissions("admin:user:list") + @RequiresPermissionsDesc(menu = {"用户管理", "会员管理"}, button = "查询") + @GetMapping("/detail") + public Object userDetail(@NotNull Integer id) { + LitemallUser user=userService.findById(id); + return ResponseUtil.ok(user); + } + @RequiresPermissions("admin:user:list") + @RequiresPermissionsDesc(menu = {"用户管理", "会员管理"}, button = "查询") + @PostMapping("/update") + public Object userUpdate(@RequestBody LitemallUser user) { + return ResponseUtil.ok(userService.updateById(user)); + } } diff --git a/litemall-admin/src/api/user.js b/litemall-admin/src/api/user.js index a7b8b42e..33dc2f51 100644 --- a/litemall-admin/src/api/user.js +++ b/litemall-admin/src/api/user.js @@ -8,6 +8,22 @@ export function fetchList(query) { }) } +export function userDetail(id) { + return request({ + url: '/user/detail', + method: 'get', + params: {id} + }) +} + +export function updateUser(data) { + return request({ + url: '/user/update', + method: 'post', + data + }) +} + export function listAddress(query) { return request({ url: '/address/list', @@ -47,4 +63,3 @@ export function listHistory(query) { params: query }) } - diff --git a/litemall-admin/src/views/user/user.vue b/litemall-admin/src/views/user/user.vue index e8164ba7..713b1eb3 100644 --- a/litemall-admin/src/views/user/user.vue +++ b/litemall-admin/src/views/user/user.vue @@ -4,6 +4,7 @@
+ 查找 导出 @@ -36,16 +37,49 @@ {{ statusDic[scope.row.status] }} - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/litemall-admin/src/views/products/edit.vue b/litemall-admin/src/views/products/edit.vue new file mode 100644 index 00000000..e3b4822b --- /dev/null +++ b/litemall-admin/src/views/products/edit.vue @@ -0,0 +1,252 @@ + + + + + diff --git a/litemall-admin/src/views/products/list.vue b/litemall-admin/src/views/products/list.vue new file mode 100644 index 00000000..371a20fa --- /dev/null +++ b/litemall-admin/src/views/products/list.vue @@ -0,0 +1,184 @@ + + + + + diff --git a/litemall-admin/src/views/sys/notice.vue b/litemall-admin/src/views/sys/notice.vue index 0c80f242..0d48ccf2 100644 --- a/litemall-admin/src/views/sys/notice.vue +++ b/litemall-admin/src/views/sys/notice.vue @@ -29,6 +29,12 @@ + + + + diff --git a/litemall-db/src/main/java/org/linlinjava/litemall/db/dao/LitemallProductsMapper.java b/litemall-db/src/main/java/org/linlinjava/litemall/db/dao/LitemallProductsMapper.java new file mode 100644 index 00000000..163246d9 --- /dev/null +++ b/litemall-db/src/main/java/org/linlinjava/litemall/db/dao/LitemallProductsMapper.java @@ -0,0 +1,184 @@ +package org.linlinjava.litemall.db.dao; + +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.linlinjava.litemall.db.domain.LitemallProducts; +import org.linlinjava.litemall.db.domain.LitemallProductsExample; + +public interface LitemallProductsMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + long countByExample(LitemallProductsExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + int deleteByExample(LitemallProductsExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + int deleteByPrimaryKey(Integer id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + int insert(LitemallProducts record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + int insertSelective(LitemallProducts record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + LitemallProducts selectOneByExample(LitemallProductsExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + LitemallProducts selectOneByExampleSelective(@Param("example") LitemallProductsExample example, @Param("selective") LitemallProducts.Column ... selective); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + LitemallProducts selectOneByExampleWithBLOBs(LitemallProductsExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + List selectByExampleSelective(@Param("example") LitemallProductsExample example, @Param("selective") LitemallProducts.Column ... selective); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + List selectByExampleWithBLOBs(LitemallProductsExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + List selectByExample(LitemallProductsExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + LitemallProducts selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") LitemallProducts.Column ... selective); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + LitemallProducts selectByPrimaryKey(Integer id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + LitemallProducts selectByPrimaryKeyWithLogicalDelete(@Param("id") Integer id, @Param("andLogicalDeleted") boolean andLogicalDeleted); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + int updateByExampleSelective(@Param("record") LitemallProducts record, @Param("example") LitemallProductsExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + int updateByExampleWithBLOBs(@Param("record") LitemallProducts record, @Param("example") LitemallProductsExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + int updateByExample(@Param("record") LitemallProducts record, @Param("example") LitemallProductsExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + int updateByPrimaryKeySelective(LitemallProducts record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + int updateByPrimaryKeyWithBLOBs(LitemallProducts record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + int updateByPrimaryKey(LitemallProducts record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + int logicalDeleteByExample(@Param("example") LitemallProductsExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + int logicalDeleteByPrimaryKey(Integer id); +} \ No newline at end of file diff --git a/litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallProducts.java b/litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallProducts.java new file mode 100644 index 00000000..605d5d49 --- /dev/null +++ b/litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallProducts.java @@ -0,0 +1,727 @@ +package org.linlinjava.litemall.db.domain; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.Arrays; + +public class LitemallProducts { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_products + * + * @mbg.generated + */ + public static final Boolean IS_DELETED = Deleted.IS_DELETED.value(); + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_products + * + * @mbg.generated + */ + public static final Boolean NOT_DELETED = Deleted.NOT_DELETED.value(); + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_products.id + * + * @mbg.generated + */ + private Integer id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_products.name + * + * @mbg.generated + */ + private String name; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_products.category + * + * @mbg.generated + */ + private String category; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_products.pic_url + * + * @mbg.generated + */ + private String picUrl; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_products.gallery + * + * @mbg.generated + */ + private String[] gallery; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_products.brief + * + * @mbg.generated + */ + private String brief; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_products.is_on_sale + * + * @mbg.generated + */ + private Boolean isOnSale; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_products.add_time + * + * @mbg.generated + */ + private LocalDateTime addTime; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_products.update_time + * + * @mbg.generated + */ + private LocalDateTime updateTime; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_products.deleted + * + * @mbg.generated + */ + private Boolean deleted; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_products.detail + * + * @mbg.generated + */ + private String detail; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_products.id + * + * @return the value of litemall_products.id + * + * @mbg.generated + */ + public Integer getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_products.id + * + * @param id the value for litemall_products.id + * + * @mbg.generated + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_products.name + * + * @return the value of litemall_products.name + * + * @mbg.generated + */ + public String getName() { + return name; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_products.name + * + * @param name the value for litemall_products.name + * + * @mbg.generated + */ + public void setName(String name) { + this.name = name; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_products.category + * + * @return the value of litemall_products.category + * + * @mbg.generated + */ + public String getCategory() { + return category; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_products.category + * + * @param category the value for litemall_products.category + * + * @mbg.generated + */ + public void setCategory(String category) { + this.category = category; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_products.pic_url + * + * @return the value of litemall_products.pic_url + * + * @mbg.generated + */ + public String getPicUrl() { + return picUrl; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_products.pic_url + * + * @param picUrl the value for litemall_products.pic_url + * + * @mbg.generated + */ + public void setPicUrl(String picUrl) { + this.picUrl = picUrl; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_products.gallery + * + * @return the value of litemall_products.gallery + * + * @mbg.generated + */ + public String[] getGallery() { + return gallery; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_products.gallery + * + * @param gallery the value for litemall_products.gallery + * + * @mbg.generated + */ + public void setGallery(String[] gallery) { + this.gallery = gallery; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_products.brief + * + * @return the value of litemall_products.brief + * + * @mbg.generated + */ + public String getBrief() { + return brief; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_products.brief + * + * @param brief the value for litemall_products.brief + * + * @mbg.generated + */ + public void setBrief(String brief) { + this.brief = brief; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_products.is_on_sale + * + * @return the value of litemall_products.is_on_sale + * + * @mbg.generated + */ + public Boolean getIsOnSale() { + return isOnSale; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_products.is_on_sale + * + * @param isOnSale the value for litemall_products.is_on_sale + * + * @mbg.generated + */ + public void setIsOnSale(Boolean isOnSale) { + this.isOnSale = isOnSale; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_products.add_time + * + * @return the value of litemall_products.add_time + * + * @mbg.generated + */ + public LocalDateTime getAddTime() { + return addTime; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_products.add_time + * + * @param addTime the value for litemall_products.add_time + * + * @mbg.generated + */ + public void setAddTime(LocalDateTime addTime) { + this.addTime = addTime; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_products.update_time + * + * @return the value of litemall_products.update_time + * + * @mbg.generated + */ + public LocalDateTime getUpdateTime() { + return updateTime; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_products.update_time + * + * @param updateTime the value for litemall_products.update_time + * + * @mbg.generated + */ + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public void andLogicalDeleted(boolean deleted) { + setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value()); + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_products.deleted + * + * @return the value of litemall_products.deleted + * + * @mbg.generated + */ + public Boolean getDeleted() { + return deleted; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_products.deleted + * + * @param deleted the value for litemall_products.deleted + * + * @mbg.generated + */ + public void setDeleted(Boolean deleted) { + this.deleted = deleted; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_products.detail + * + * @return the value of litemall_products.detail + * + * @mbg.generated + */ + public String getDetail() { + return detail; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_products.detail + * + * @param detail the value for litemall_products.detail + * + * @mbg.generated + */ + public void setDetail(String detail) { + this.detail = detail; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", IS_DELETED=").append(IS_DELETED); + sb.append(", NOT_DELETED=").append(NOT_DELETED); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", category=").append(category); + sb.append(", picUrl=").append(picUrl); + sb.append(", gallery=").append(gallery); + sb.append(", brief=").append(brief); + sb.append(", isOnSale=").append(isOnSale); + sb.append(", addTime=").append(addTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", deleted=").append(deleted); + sb.append(", detail=").append(detail); + sb.append("]"); + return sb.toString(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + LitemallProducts other = (LitemallProducts) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getCategory() == null ? other.getCategory() == null : this.getCategory().equals(other.getCategory())) + && (this.getPicUrl() == null ? other.getPicUrl() == null : this.getPicUrl().equals(other.getPicUrl())) + && (Arrays.equals(this.getGallery(), other.getGallery())) + && (this.getBrief() == null ? other.getBrief() == null : this.getBrief().equals(other.getBrief())) + && (this.getIsOnSale() == null ? other.getIsOnSale() == null : this.getIsOnSale().equals(other.getIsOnSale())) + && (this.getAddTime() == null ? other.getAddTime() == null : this.getAddTime().equals(other.getAddTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted())) + && (this.getDetail() == null ? other.getDetail() == null : this.getDetail().equals(other.getDetail())); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getCategory() == null) ? 0 : getCategory().hashCode()); + result = prime * result + ((getPicUrl() == null) ? 0 : getPicUrl().hashCode()); + result = prime * result + (Arrays.hashCode(getGallery())); + result = prime * result + ((getBrief() == null) ? 0 : getBrief().hashCode()); + result = prime * result + ((getIsOnSale() == null) ? 0 : getIsOnSale().hashCode()); + result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode()); + result = prime * result + ((getDetail() == null) ? 0 : getDetail().hashCode()); + return result; + } + + /** + * This enum was generated by MyBatis Generator. + * This enum corresponds to the database table litemall_products + * + * @mbg.generated + */ + public enum Deleted { + NOT_DELETED(new Boolean("0"), "未删除"), + IS_DELETED(new Boolean("1"), "已删除"); + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_products + * + * @mbg.generated + */ + private final Boolean value; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_products + * + * @mbg.generated + */ + private final String name; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + Deleted(Boolean value, String name) { + this.value = value; + this.name = name; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Boolean getValue() { + return this.value; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Boolean value() { + return this.value; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public String getName() { + return this.name; + } + } + + /** + * This enum was generated by MyBatis Generator. + * This enum corresponds to the database table litemall_products + * + * @mbg.generated + */ + public enum Column { + id("id", "id", "INTEGER", false), + name("name", "name", "VARCHAR", true), + category("category", "category", "VARCHAR", false), + picUrl("pic_url", "picUrl", "VARCHAR", false), + gallery("gallery", "gallery", "VARCHAR", false), + brief("brief", "brief", "VARCHAR", false), + isOnSale("is_on_sale", "isOnSale", "BIT", false), + addTime("add_time", "addTime", "TIMESTAMP", false), + updateTime("update_time", "updateTime", "TIMESTAMP", false), + deleted("deleted", "deleted", "BIT", false), + detail("detail", "detail", "LONGVARCHAR", false); + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_products + * + * @mbg.generated + */ + private static final String BEGINNING_DELIMITER = "`"; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_products + * + * @mbg.generated + */ + private static final String ENDING_DELIMITER = "`"; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_products + * + * @mbg.generated + */ + private final String column; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_products + * + * @mbg.generated + */ + private final boolean isColumnNameDelimited; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_products + * + * @mbg.generated + */ + private final String javaProperty; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_products + * + * @mbg.generated + */ + private final String jdbcType; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public String value() { + return this.column; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public String getValue() { + return this.column; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public String getJavaProperty() { + return this.javaProperty; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public String getJdbcType() { + return this.jdbcType; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) { + this.column = column; + this.javaProperty = javaProperty; + this.jdbcType = jdbcType; + this.isColumnNameDelimited = isColumnNameDelimited; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public String desc() { + return this.getEscapedColumnName() + " DESC"; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public String asc() { + return this.getEscapedColumnName() + " ASC"; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public static Column[] excludes(Column ... excludes) { + ArrayList columns = new ArrayList<>(Arrays.asList(Column.values())); + if (excludes != null && excludes.length > 0) { + columns.removeAll(new ArrayList<>(Arrays.asList(excludes))); + } + return columns.toArray(new Column[]{}); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public String getEscapedColumnName() { + if (this.isColumnNameDelimited) { + return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString(); + } else { + return this.column; + } + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public String getAliasedEscapedColumnName() { + return this.getEscapedColumnName(); + } + } +} \ No newline at end of file diff --git a/litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallProductsExample.java b/litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallProductsExample.java new file mode 100644 index 00000000..6e21d944 --- /dev/null +++ b/litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallProductsExample.java @@ -0,0 +1,1788 @@ +package org.linlinjava.litemall.db.domain; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class LitemallProductsExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_products + * + * @mbg.generated + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_products + * + * @mbg.generated + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_products + * + * @mbg.generated + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public LitemallProductsExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public LitemallProductsExample orderBy(String orderByClause) { + this.setOrderByClause(orderByClause); + return this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public LitemallProductsExample orderBy(String ... orderByClauses) { + StringBuffer sb = new StringBuffer(); + for (int i = 0; i < orderByClauses.length; i++) { + sb.append(orderByClauses[i]); + if (i < orderByClauses.length - 1) { + sb.append(" , "); + } + } + this.setOrderByClause(sb.toString()); + return this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(this); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public static Criteria newAndCreateCriteria() { + LitemallProductsExample example = new LitemallProductsExample(); + return example.createCriteria(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public LitemallProductsExample when(boolean condition, IExampleWhen then) { + if (condition) { + then.example(this); + } + return this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public LitemallProductsExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) { + if (condition) { + then.example(this); + } else { + otherwise.example(this); + } + return this; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table litemall_products + * + * @mbg.generated + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andIdEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("id = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andIdNotEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("id <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andIdGreaterThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("id > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andIdGreaterThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("id >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andIdLessThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("id < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andIdLessThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("id <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andNameEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("`name` = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andNameNotEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("`name` <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andNameGreaterThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("`name` > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andNameGreaterThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("`name` >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andNameLessThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("`name` < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andNameLessThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("`name` <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCategoryIsNull() { + addCriterion("category is null"); + return (Criteria) this; + } + + public Criteria andCategoryIsNotNull() { + addCriterion("category is not null"); + return (Criteria) this; + } + + public Criteria andCategoryEqualTo(String value) { + addCriterion("category =", value, "category"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andCategoryEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("category = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andCategoryNotEqualTo(String value) { + addCriterion("category <>", value, "category"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andCategoryNotEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("category <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andCategoryGreaterThan(String value) { + addCriterion("category >", value, "category"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andCategoryGreaterThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("category > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andCategoryGreaterThanOrEqualTo(String value) { + addCriterion("category >=", value, "category"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andCategoryGreaterThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("category >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andCategoryLessThan(String value) { + addCriterion("category <", value, "category"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andCategoryLessThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("category < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andCategoryLessThanOrEqualTo(String value) { + addCriterion("category <=", value, "category"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andCategoryLessThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("category <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andCategoryLike(String value) { + addCriterion("category like", value, "category"); + return (Criteria) this; + } + + public Criteria andCategoryNotLike(String value) { + addCriterion("category not like", value, "category"); + return (Criteria) this; + } + + public Criteria andCategoryIn(List values) { + addCriterion("category in", values, "category"); + return (Criteria) this; + } + + public Criteria andCategoryNotIn(List values) { + addCriterion("category not in", values, "category"); + return (Criteria) this; + } + + public Criteria andCategoryBetween(String value1, String value2) { + addCriterion("category between", value1, value2, "category"); + return (Criteria) this; + } + + public Criteria andCategoryNotBetween(String value1, String value2) { + addCriterion("category not between", value1, value2, "category"); + return (Criteria) this; + } + + public Criteria andPicUrlIsNull() { + addCriterion("pic_url is null"); + return (Criteria) this; + } + + public Criteria andPicUrlIsNotNull() { + addCriterion("pic_url is not null"); + return (Criteria) this; + } + + public Criteria andPicUrlEqualTo(String value) { + addCriterion("pic_url =", value, "picUrl"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andPicUrlEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("pic_url = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andPicUrlNotEqualTo(String value) { + addCriterion("pic_url <>", value, "picUrl"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andPicUrlNotEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("pic_url <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andPicUrlGreaterThan(String value) { + addCriterion("pic_url >", value, "picUrl"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andPicUrlGreaterThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("pic_url > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andPicUrlGreaterThanOrEqualTo(String value) { + addCriterion("pic_url >=", value, "picUrl"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andPicUrlGreaterThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("pic_url >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andPicUrlLessThan(String value) { + addCriterion("pic_url <", value, "picUrl"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andPicUrlLessThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("pic_url < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andPicUrlLessThanOrEqualTo(String value) { + addCriterion("pic_url <=", value, "picUrl"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andPicUrlLessThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("pic_url <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andPicUrlLike(String value) { + addCriterion("pic_url like", value, "picUrl"); + return (Criteria) this; + } + + public Criteria andPicUrlNotLike(String value) { + addCriterion("pic_url not like", value, "picUrl"); + return (Criteria) this; + } + + public Criteria andPicUrlIn(List values) { + addCriterion("pic_url in", values, "picUrl"); + return (Criteria) this; + } + + public Criteria andPicUrlNotIn(List values) { + addCriterion("pic_url not in", values, "picUrl"); + return (Criteria) this; + } + + public Criteria andPicUrlBetween(String value1, String value2) { + addCriterion("pic_url between", value1, value2, "picUrl"); + return (Criteria) this; + } + + public Criteria andPicUrlNotBetween(String value1, String value2) { + addCriterion("pic_url not between", value1, value2, "picUrl"); + return (Criteria) this; + } + + public Criteria andGalleryIsNull() { + addCriterion("gallery is null"); + return (Criteria) this; + } + + public Criteria andGalleryIsNotNull() { + addCriterion("gallery is not null"); + return (Criteria) this; + } + + public Criteria andGalleryEqualTo(String value) { + addCriterion("gallery =", value, "gallery"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andGalleryEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("gallery = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andGalleryNotEqualTo(String value) { + addCriterion("gallery <>", value, "gallery"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andGalleryNotEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("gallery <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andGalleryGreaterThan(String value) { + addCriterion("gallery >", value, "gallery"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andGalleryGreaterThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("gallery > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andGalleryGreaterThanOrEqualTo(String value) { + addCriterion("gallery >=", value, "gallery"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andGalleryGreaterThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("gallery >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andGalleryLessThan(String value) { + addCriterion("gallery <", value, "gallery"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andGalleryLessThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("gallery < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andGalleryLessThanOrEqualTo(String value) { + addCriterion("gallery <=", value, "gallery"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andGalleryLessThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("gallery <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andGalleryLike(String value) { + addCriterion("gallery like", value, "gallery"); + return (Criteria) this; + } + + public Criteria andGalleryNotLike(String value) { + addCriterion("gallery not like", value, "gallery"); + return (Criteria) this; + } + + public Criteria andGalleryIn(List values) { + addCriterion("gallery in", values, "gallery"); + return (Criteria) this; + } + + public Criteria andGalleryNotIn(List values) { + addCriterion("gallery not in", values, "gallery"); + return (Criteria) this; + } + + public Criteria andGalleryBetween(String value1, String value2) { + addCriterion("gallery between", value1, value2, "gallery"); + return (Criteria) this; + } + + public Criteria andGalleryNotBetween(String value1, String value2) { + addCriterion("gallery not between", value1, value2, "gallery"); + return (Criteria) this; + } + + public Criteria andBriefIsNull() { + addCriterion("brief is null"); + return (Criteria) this; + } + + public Criteria andBriefIsNotNull() { + addCriterion("brief is not null"); + return (Criteria) this; + } + + public Criteria andBriefEqualTo(String value) { + addCriterion("brief =", value, "brief"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andBriefEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("brief = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andBriefNotEqualTo(String value) { + addCriterion("brief <>", value, "brief"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andBriefNotEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("brief <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andBriefGreaterThan(String value) { + addCriterion("brief >", value, "brief"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andBriefGreaterThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("brief > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andBriefGreaterThanOrEqualTo(String value) { + addCriterion("brief >=", value, "brief"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andBriefGreaterThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("brief >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andBriefLessThan(String value) { + addCriterion("brief <", value, "brief"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andBriefLessThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("brief < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andBriefLessThanOrEqualTo(String value) { + addCriterion("brief <=", value, "brief"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andBriefLessThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("brief <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andBriefLike(String value) { + addCriterion("brief like", value, "brief"); + return (Criteria) this; + } + + public Criteria andBriefNotLike(String value) { + addCriterion("brief not like", value, "brief"); + return (Criteria) this; + } + + public Criteria andBriefIn(List values) { + addCriterion("brief in", values, "brief"); + return (Criteria) this; + } + + public Criteria andBriefNotIn(List values) { + addCriterion("brief not in", values, "brief"); + return (Criteria) this; + } + + public Criteria andBriefBetween(String value1, String value2) { + addCriterion("brief between", value1, value2, "brief"); + return (Criteria) this; + } + + public Criteria andBriefNotBetween(String value1, String value2) { + addCriterion("brief not between", value1, value2, "brief"); + return (Criteria) this; + } + + public Criteria andIsOnSaleIsNull() { + addCriterion("is_on_sale is null"); + return (Criteria) this; + } + + public Criteria andIsOnSaleIsNotNull() { + addCriterion("is_on_sale is not null"); + return (Criteria) this; + } + + public Criteria andIsOnSaleEqualTo(Boolean value) { + addCriterion("is_on_sale =", value, "isOnSale"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andIsOnSaleEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("is_on_sale = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andIsOnSaleNotEqualTo(Boolean value) { + addCriterion("is_on_sale <>", value, "isOnSale"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andIsOnSaleNotEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("is_on_sale <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andIsOnSaleGreaterThan(Boolean value) { + addCriterion("is_on_sale >", value, "isOnSale"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andIsOnSaleGreaterThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("is_on_sale > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andIsOnSaleGreaterThanOrEqualTo(Boolean value) { + addCriterion("is_on_sale >=", value, "isOnSale"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andIsOnSaleGreaterThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("is_on_sale >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andIsOnSaleLessThan(Boolean value) { + addCriterion("is_on_sale <", value, "isOnSale"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andIsOnSaleLessThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("is_on_sale < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andIsOnSaleLessThanOrEqualTo(Boolean value) { + addCriterion("is_on_sale <=", value, "isOnSale"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andIsOnSaleLessThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("is_on_sale <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andIsOnSaleIn(List values) { + addCriterion("is_on_sale in", values, "isOnSale"); + return (Criteria) this; + } + + public Criteria andIsOnSaleNotIn(List values) { + addCriterion("is_on_sale not in", values, "isOnSale"); + return (Criteria) this; + } + + public Criteria andIsOnSaleBetween(Boolean value1, Boolean value2) { + addCriterion("is_on_sale between", value1, value2, "isOnSale"); + return (Criteria) this; + } + + public Criteria andIsOnSaleNotBetween(Boolean value1, Boolean value2) { + addCriterion("is_on_sale not between", value1, value2, "isOnSale"); + return (Criteria) this; + } + + public Criteria andAddTimeIsNull() { + addCriterion("add_time is null"); + return (Criteria) this; + } + + public Criteria andAddTimeIsNotNull() { + addCriterion("add_time is not null"); + return (Criteria) this; + } + + public Criteria andAddTimeEqualTo(LocalDateTime value) { + addCriterion("add_time =", value, "addTime"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andAddTimeEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("add_time = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andAddTimeNotEqualTo(LocalDateTime value) { + addCriterion("add_time <>", value, "addTime"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andAddTimeNotEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("add_time <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andAddTimeGreaterThan(LocalDateTime value) { + addCriterion("add_time >", value, "addTime"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andAddTimeGreaterThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("add_time > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andAddTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("add_time >=", value, "addTime"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andAddTimeGreaterThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("add_time >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andAddTimeLessThan(LocalDateTime value) { + addCriterion("add_time <", value, "addTime"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andAddTimeLessThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("add_time < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andAddTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("add_time <=", value, "addTime"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andAddTimeLessThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("add_time <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andAddTimeIn(List values) { + addCriterion("add_time in", values, "addTime"); + return (Criteria) this; + } + + public Criteria andAddTimeNotIn(List values) { + addCriterion("add_time not in", values, "addTime"); + return (Criteria) this; + } + + public Criteria andAddTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("add_time between", value1, value2, "addTime"); + return (Criteria) this; + } + + public Criteria andAddTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("add_time not between", value1, value2, "addTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andUpdateTimeEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("update_time = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andUpdateTimeNotEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("update_time <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andUpdateTimeGreaterThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("update_time > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andUpdateTimeGreaterThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("update_time >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andUpdateTimeLessThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("update_time < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andUpdateTimeLessThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("update_time <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andDeletedIsNull() { + addCriterion("deleted is null"); + return (Criteria) this; + } + + public Criteria andDeletedIsNotNull() { + addCriterion("deleted is not null"); + return (Criteria) this; + } + + public Criteria andDeletedEqualTo(Boolean value) { + addCriterion("deleted =", value, "deleted"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andDeletedEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("deleted = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andDeletedNotEqualTo(Boolean value) { + addCriterion("deleted <>", value, "deleted"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andDeletedNotEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("deleted <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andDeletedGreaterThan(Boolean value) { + addCriterion("deleted >", value, "deleted"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andDeletedGreaterThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("deleted > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andDeletedGreaterThanOrEqualTo(Boolean value) { + addCriterion("deleted >=", value, "deleted"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andDeletedGreaterThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("deleted >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andDeletedLessThan(Boolean value) { + addCriterion("deleted <", value, "deleted"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andDeletedLessThanColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("deleted < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andDeletedLessThanOrEqualTo(Boolean value) { + addCriterion("deleted <=", value, "deleted"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andDeletedLessThanOrEqualToColumn(LitemallProducts.Column column) { + addCriterion(new StringBuilder("deleted <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andDeletedIn(List values) { + addCriterion("deleted in", values, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedNotIn(List values) { + addCriterion("deleted not in", values, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedBetween(Boolean value1, Boolean value2) { + addCriterion("deleted between", value1, value2, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedNotBetween(Boolean value1, Boolean value2) { + addCriterion("deleted not between", value1, value2, "deleted"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table litemall_products + * + * @mbg.generated do_not_delete_during_merge + */ + public static class Criteria extends GeneratedCriteria { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_products + * + * @mbg.generated + */ + private LitemallProductsExample example; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + protected Criteria(LitemallProductsExample example) { + super(); + this.example = example; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public LitemallProductsExample example() { + return this.example; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + @Deprecated + public Criteria andIf(boolean ifAdd, ICriteriaAdd add) { + if (ifAdd) { + add.add(this); + } + return this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria when(boolean condition, ICriteriaWhen then) { + if (condition) { + then.criteria(this); + } + return this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria when(boolean condition, ICriteriaWhen then, ICriteriaWhen otherwise) { + if (condition) { + then.criteria(this); + } else { + otherwise.criteria(this); + } + return this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + public Criteria andLogicalDeleted(boolean deleted) { + return deleted ? andDeletedEqualTo(LitemallProducts.Deleted.IS_DELETED.value()) : andDeletedNotEqualTo(LitemallProducts.Deleted.IS_DELETED.value()); + } + + @Deprecated + public interface ICriteriaAdd { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + Criteria add(Criteria add); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table litemall_products + * + * @mbg.generated + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } + + public interface ICriteriaWhen { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + void criteria(Criteria criteria); + } + + public interface IExampleWhen { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_products + * + * @mbg.generated + */ + void example(org.linlinjava.litemall.db.domain.LitemallProductsExample example); + } +} \ No newline at end of file diff --git a/litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallProductsService.java b/litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallProductsService.java new file mode 100644 index 00000000..0cba8352 --- /dev/null +++ b/litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallProductsService.java @@ -0,0 +1,67 @@ +package org.linlinjava.litemall.db.service; + +import com.github.pagehelper.PageHelper; +import org.linlinjava.litemall.db.dao.LitemallProductsMapper; +import org.linlinjava.litemall.db.domain.LitemallProducts; +import org.linlinjava.litemall.db.domain.LitemallProductsExample; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; + +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.util.List; + +@Service +public class LitemallProductsService { + @Resource + private LitemallProductsMapper productsMapper; + + + public List querySelective(String title, String content, Integer page, Integer limit, String sort, String order) { + LitemallProductsExample example = new LitemallProductsExample(); + LitemallProductsExample.Criteria criteria = example.createCriteria(); +// +// if (!StringUtils.isEmpty(title)) { +// criteria.add("%" + title + "%"); +// } +// if (!StringUtils.isEmpty(content)) { +// criteria.andContentLike("%" + content + "%"); +// } + criteria.andDeletedEqualTo(false); + + if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) { + example.setOrderByClause(sort + " " + order); + } + + PageHelper.startPage(page, limit); + return productsMapper.selectByExample(example); + } + + public int updateById(LitemallProducts products) { + products.setUpdateTime(LocalDateTime.now()); + return productsMapper.updateByPrimaryKeySelective(products); + } + + public void deleteById(Integer id) { + productsMapper.logicalDeleteByPrimaryKey(id); + } + + public void add(LitemallProducts products) { + products.setAddTime(LocalDateTime.now()); + products.setUpdateTime(LocalDateTime.now()); + productsMapper.insertSelective(products); + } + + public LitemallProducts findById(Integer id) { + return productsMapper.selectByPrimaryKey(id); + } + + public void deleteByIds(List ids) { + LitemallProductsExample example = new LitemallProductsExample(); + example.or().andIdIn(ids).andDeletedEqualTo(false); + LitemallProducts products = new LitemallProducts(); + products.setUpdateTime(LocalDateTime.now()); + products.setDeleted(true); + productsMapper.updateByExampleSelective(products, example); + } +} diff --git a/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallProductsMapper.xml b/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallProductsMapper.xml new file mode 100644 index 00000000..4aabac85 --- /dev/null +++ b/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallProductsMapper.xml @@ -0,0 +1,589 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, `name`, category, pic_url, gallery, brief, is_on_sale, add_time, update_time, + deleted + + + + detail + + + + + + + + + + delete from litemall_products + where id = #{id,jdbcType=INTEGER} + + + + delete from litemall_products + + + + + + + + SELECT LAST_INSERT_ID() + + insert into litemall_products (`name`, category, pic_url, + gallery, brief, is_on_sale, + add_time, update_time, deleted, + detail) + values (#{name,jdbcType=VARCHAR}, #{category,jdbcType=VARCHAR}, #{picUrl,jdbcType=VARCHAR}, + #{gallery,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, + #{brief,jdbcType=VARCHAR}, #{isOnSale,jdbcType=BIT}, + #{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT}, + #{detail,jdbcType=LONGVARCHAR}) + + + + + SELECT LAST_INSERT_ID() + + insert into litemall_products + + + `name`, + + + category, + + + pic_url, + + + gallery, + + + brief, + + + is_on_sale, + + + add_time, + + + update_time, + + + deleted, + + + detail, + + + + + #{name,jdbcType=VARCHAR}, + + + #{category,jdbcType=VARCHAR}, + + + #{picUrl,jdbcType=VARCHAR}, + + + #{gallery,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, + + + #{brief,jdbcType=VARCHAR}, + + + #{isOnSale,jdbcType=BIT}, + + + #{addTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{deleted,jdbcType=BIT}, + + + #{detail,jdbcType=LONGVARCHAR}, + + + + + + + update litemall_products + + + id = #{record.id,jdbcType=INTEGER}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + category = #{record.category,jdbcType=VARCHAR}, + + + pic_url = #{record.picUrl,jdbcType=VARCHAR}, + + + gallery = #{record.gallery,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, + + + brief = #{record.brief,jdbcType=VARCHAR}, + + + is_on_sale = #{record.isOnSale,jdbcType=BIT}, + + + add_time = #{record.addTime,jdbcType=TIMESTAMP}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + deleted = #{record.deleted,jdbcType=BIT}, + + + detail = #{record.detail,jdbcType=LONGVARCHAR}, + + + + + + + + + update litemall_products + set id = #{record.id,jdbcType=INTEGER}, + `name` = #{record.name,jdbcType=VARCHAR}, + category = #{record.category,jdbcType=VARCHAR}, + pic_url = #{record.picUrl,jdbcType=VARCHAR}, + gallery = #{record.gallery,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, + brief = #{record.brief,jdbcType=VARCHAR}, + is_on_sale = #{record.isOnSale,jdbcType=BIT}, + add_time = #{record.addTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + deleted = #{record.deleted,jdbcType=BIT}, + detail = #{record.detail,jdbcType=LONGVARCHAR} + + + + + + + update litemall_products + set id = #{record.id,jdbcType=INTEGER}, + `name` = #{record.name,jdbcType=VARCHAR}, + category = #{record.category,jdbcType=VARCHAR}, + pic_url = #{record.picUrl,jdbcType=VARCHAR}, + gallery = #{record.gallery,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, + brief = #{record.brief,jdbcType=VARCHAR}, + is_on_sale = #{record.isOnSale,jdbcType=BIT}, + add_time = #{record.addTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + deleted = #{record.deleted,jdbcType=BIT} + + + + + + + update litemall_products + + + `name` = #{name,jdbcType=VARCHAR}, + + + category = #{category,jdbcType=VARCHAR}, + + + pic_url = #{picUrl,jdbcType=VARCHAR}, + + + gallery = #{gallery,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, + + + brief = #{brief,jdbcType=VARCHAR}, + + + is_on_sale = #{isOnSale,jdbcType=BIT}, + + + add_time = #{addTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + deleted = #{deleted,jdbcType=BIT}, + + + detail = #{detail,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + + update litemall_products + set `name` = #{name,jdbcType=VARCHAR}, + category = #{category,jdbcType=VARCHAR}, + pic_url = #{picUrl,jdbcType=VARCHAR}, + gallery = #{gallery,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, + brief = #{brief,jdbcType=VARCHAR}, + is_on_sale = #{isOnSale,jdbcType=BIT}, + add_time = #{addTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + deleted = #{deleted,jdbcType=BIT}, + detail = #{detail,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + update litemall_products + set `name` = #{name,jdbcType=VARCHAR}, + category = #{category,jdbcType=VARCHAR}, + pic_url = #{picUrl,jdbcType=VARCHAR}, + gallery = #{gallery,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, + brief = #{brief,jdbcType=VARCHAR}, + is_on_sale = #{isOnSale,jdbcType=BIT}, + add_time = #{addTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + deleted = #{deleted,jdbcType=BIT} + where id = #{id,jdbcType=INTEGER} + + + + + + + update litemall_products set deleted = 1 + + + + + + + update litemall_products set deleted = 1 + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file -- Gitee