From 3482f06a324c46eb304e7eb9d78a8a89228f28a8 Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Thu, 8 Apr 2021 17:04:52 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E5=85=A8=E5=B1=80=E9=85=8D=E7=BD=AE=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/deploy/DeployController.java | 111 +++++++ .../orderdeatil/OrderDeatilController.java | 2 +- .../TemplatePersonController.java | 8 +- .../orderdeatil/OrderDeatilAppController.java | 4 +- .../TemplatePersonAppController.java | 6 +- .../cn/com/tenlion/dao/deploy/IDeployDao.java | 120 +++++++ .../cn/com/tenlion/enums/DeployStatus.java | 25 ++ .../com/tenlion/pojo/bos/deploy/DeployBO.java | 87 +++++ .../com/tenlion/pojo/bos/order/OrderBO.java | 9 + .../tenlion/pojo/dtos/deploy/DeployDTO.java | 99 ++++++ .../com/tenlion/pojo/dtos/order/OrderDTO.java | 38 +++ .../com/tenlion/pojo/pos/deploy/DeployPO.java | 87 +++++ .../com/tenlion/pojo/pos/order/OrderPO.java | 18 ++ .../com/tenlion/pojo/vos/deploy/DeployVO.java | 43 +++ .../com/tenlion/pojo/vos/order/OrderVO.java | 20 ++ .../pojo/vos/orderdeatil/OrderDeatilVO.java | 18 ++ .../category/impl/CategoryServiceImpl.java | 26 +- .../service/deploy/IDeployService.java | 188 +++++++++++ .../deploy/impl/DeployServiceImpl.java | 171 ++++++++++ .../orderdeatil/IOrderDeatilService.java | 8 +- .../impl/OrderDeatilServiceImpl.java | 47 ++- .../ITemplatePersonService.java | 8 +- .../impl/TemplatePersonServiceImpl.java | 14 +- .../mybatis/mapper/deploy/deploy-mapper.xml | 301 ++++++++++++++++++ .../mybatis/mapper/order/order-mapper.xml | 46 ++- .../templateperson/templatePerson-mapper.xml | 8 +- .../static/route/category/list-category.html | 4 +- .../static/route/category/save-category.html | 6 +- .../resources/static/route/deploy/list.html | 291 +++++++++++++++++ .../resources/static/route/deploy/save.html | 126 ++++++++ .../resources/static/route/deploy/update.html | 146 +++++++++ .../static/route/industry/list-industry.html | 2 +- .../static/route/shopgoods/save.html | 2 +- .../static/route/shopgoods/update.html | 2 +- 34 files changed, 2026 insertions(+), 65 deletions(-) create mode 100644 src/main/java/cn/com/tenlion/controller/api/deploy/DeployController.java create mode 100644 src/main/java/cn/com/tenlion/dao/deploy/IDeployDao.java create mode 100644 src/main/java/cn/com/tenlion/enums/DeployStatus.java create mode 100644 src/main/java/cn/com/tenlion/pojo/bos/deploy/DeployBO.java create mode 100644 src/main/java/cn/com/tenlion/pojo/dtos/deploy/DeployDTO.java create mode 100644 src/main/java/cn/com/tenlion/pojo/pos/deploy/DeployPO.java create mode 100644 src/main/java/cn/com/tenlion/pojo/vos/deploy/DeployVO.java create mode 100644 src/main/java/cn/com/tenlion/service/deploy/IDeployService.java create mode 100644 src/main/java/cn/com/tenlion/service/deploy/impl/DeployServiceImpl.java create mode 100644 src/main/resources/mybatis/mapper/deploy/deploy-mapper.xml create mode 100644 src/main/resources/static/route/deploy/list.html create mode 100644 src/main/resources/static/route/deploy/save.html create mode 100644 src/main/resources/static/route/deploy/update.html diff --git a/src/main/java/cn/com/tenlion/controller/api/deploy/DeployController.java b/src/main/java/cn/com/tenlion/controller/api/deploy/DeployController.java new file mode 100644 index 0000000..a6cf02e --- /dev/null +++ b/src/main/java/cn/com/tenlion/controller/api/deploy/DeployController.java @@ -0,0 +1,111 @@ +package cn.com.tenlion.controller.api.deploy; + +import ink.wgink.annotation.CheckRequestBodyAnnotation; +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResult; +import ink.wgink.pojo.result.SuccessResultData; +import ink.wgink.pojo.result.SuccessResultList; +import cn.com.tenlion.pojo.dtos.deploy.DeployDTO; +import cn.com.tenlion.pojo.vos.deploy.DeployVO; +import cn.com.tenlion.service.deploy.IDeployService; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * @ClassName: DeployController + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-07 10:53:40 + * @Version: 3.0 + **/ +@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "接口") +@RestController +@RequestMapping(ISystemConstant.API_PREFIX + "/deploy") +public class DeployController extends DefaultBaseController { + + @Autowired + private IDeployService deployService; + + @ApiOperation(value = "新增", notes = "新增接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("save") + @CheckRequestBodyAnnotation + public SuccessResult save(@RequestBody DeployVO deployVO) { + deployService.save(deployVO); + return new SuccessResult(); + } + + @ApiOperation(value = "删除", notes = "删除接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @DeleteMapping("remove/{ids}") + public SuccessResult remove(@PathVariable("ids") String ids) { + deployService.remove(Arrays.asList(ids.split("\\_"))); + return new SuccessResult(); + } + + @ApiOperation(value = "修改", notes = "修改接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "deployId", value = "ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PutMapping("update/{deployId}") + @CheckRequestBodyAnnotation + public SuccessResult update(@PathVariable("deployId") String deployId, @RequestBody DeployVO deployVO) { + deployService.update(deployId, deployVO); + return new SuccessResult(); + } + + @ApiOperation(value = "详情", notes = "详情接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "deployId", value = "ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get/{deployId}") + public DeployDTO get(@PathVariable("deployId") String deployId) { + return deployService.get(deployId); + } + + @ApiOperation(value = "列表", notes = "列表接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list") + public List list() { + Map params = requestParams(); + return deployService.list(params); + } + + @ApiOperation(value = "分页列表", notes = "分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpage") + public SuccessResultList> listPage(ListPage page) { + Map params = requestParams(); + page.setParams(params); + return deployService.listPage(page); + } + + @ApiOperation(value = "统计", notes = "统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("count") + SuccessResultData count() { + Map params = requestParams(); + return new SuccessResultData<>(deployService.count(params)); + } + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/controller/api/orderdeatil/OrderDeatilController.java b/src/main/java/cn/com/tenlion/controller/api/orderdeatil/OrderDeatilController.java index 56482f2..278b02b 100644 --- a/src/main/java/cn/com/tenlion/controller/api/orderdeatil/OrderDeatilController.java +++ b/src/main/java/cn/com/tenlion/controller/api/orderdeatil/OrderDeatilController.java @@ -38,7 +38,7 @@ public class OrderDeatilController extends DefaultBaseController { @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PostMapping("save") @CheckRequestBodyAnnotation - public SuccessResult save(@RequestBody OrderDeatilVO orderDeatilVO) { + public SuccessResult save(@RequestBody List orderDeatilVO) { orderDeatilService.save(orderDeatilVO); return new SuccessResult(); } diff --git a/src/main/java/cn/com/tenlion/controller/api/templateperson/TemplatePersonController.java b/src/main/java/cn/com/tenlion/controller/api/templateperson/TemplatePersonController.java index 6e9c812..3d38e69 100644 --- a/src/main/java/cn/com/tenlion/controller/api/templateperson/TemplatePersonController.java +++ b/src/main/java/cn/com/tenlion/controller/api/templateperson/TemplatePersonController.java @@ -56,13 +56,13 @@ public class TemplatePersonController extends DefaultBaseController { @ApiOperation(value = "修改", notes = "修改接口") @ApiImplicitParams({ - @ApiImplicitParam(name = "templatePersonId", value = "ID", paramType = "path") + @ApiImplicitParam(name = "cardPersonId", value = "ID", paramType = "path") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @PutMapping("update/{templatePersonId}") + @PutMapping("update/{cardPersonId}") @CheckRequestBodyAnnotation - public SuccessResult update(@PathVariable("templatePersonId") String templatePersonId, @RequestBody TemplatePersonVO templatePersonVO) { - templatePersonService.update(templatePersonId, templatePersonVO); + public SuccessResult update(@PathVariable("cardPersonId") String cardPersonId, @RequestBody TemplatePersonVO templatePersonVO) { + templatePersonService.update(cardPersonId, templatePersonVO); return new SuccessResult(); } diff --git a/src/main/java/cn/com/tenlion/controller/app/apis/orderdeatil/OrderDeatilAppController.java b/src/main/java/cn/com/tenlion/controller/app/apis/orderdeatil/OrderDeatilAppController.java index a4ab5c7..7595e83 100644 --- a/src/main/java/cn/com/tenlion/controller/app/apis/orderdeatil/OrderDeatilAppController.java +++ b/src/main/java/cn/com/tenlion/controller/app/apis/orderdeatil/OrderDeatilAppController.java @@ -26,7 +26,7 @@ import java.util.Map; * @Date: 2021-03-23 15:40:34 * @Version: 3.0 **/ -@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "接口") +@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "订单详情接口") @RestController @RequestMapping(ISystemConstant.APP_PREFIX + "/orderdeatil") public class OrderDeatilAppController extends DefaultBaseController { @@ -41,7 +41,7 @@ public class OrderDeatilAppController extends DefaultBaseController { @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PostMapping("save") @CheckRequestBodyAnnotation - public SuccessResult save(@RequestHeader("token") String token, @RequestBody OrderDeatilVO orderDeatilVO) { + public SuccessResult save(@RequestHeader("token") String token, @RequestBody List orderDeatilVO) { orderDeatilService.save(token, orderDeatilVO); return new SuccessResult(); } diff --git a/src/main/java/cn/com/tenlion/controller/app/apis/templateperson/TemplatePersonAppController.java b/src/main/java/cn/com/tenlion/controller/app/apis/templateperson/TemplatePersonAppController.java index 77ea29b..2a1609d 100644 --- a/src/main/java/cn/com/tenlion/controller/app/apis/templateperson/TemplatePersonAppController.java +++ b/src/main/java/cn/com/tenlion/controller/app/apis/templateperson/TemplatePersonAppController.java @@ -64,10 +64,10 @@ public class TemplatePersonAppController extends DefaultBaseController { @ApiImplicitParam(name = "templatePersonId", value = "ID", paramType = "path") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @PutMapping("updatetemplateperson/{templatePersonId}") + @PutMapping("updatetemplateperson/{cardPersonId}") @CheckRequestBodyAnnotation - public SuccessResult updateTemplatePerson(@RequestHeader("token") String token, @PathVariable("templatePersonId") String templatePersonId, @RequestBody TemplatePersonVO templatePersonVO) { - templatePersonService.update(token, templatePersonId, templatePersonVO); + public SuccessResult updateTemplatePerson(@RequestHeader("token") String token, @PathVariable("cardPersonId") String cardPersonId, @RequestBody TemplatePersonVO templatePersonVO) { + templatePersonService.update(token, cardPersonId, templatePersonVO); return new SuccessResult(); } diff --git a/src/main/java/cn/com/tenlion/dao/deploy/IDeployDao.java b/src/main/java/cn/com/tenlion/dao/deploy/IDeployDao.java new file mode 100644 index 0000000..36bc42e --- /dev/null +++ b/src/main/java/cn/com/tenlion/dao/deploy/IDeployDao.java @@ -0,0 +1,120 @@ +package cn.com.tenlion.dao.deploy; + +import ink.wgink.exceptions.RemoveException; +import ink.wgink.exceptions.SaveException; +import ink.wgink.exceptions.SearchException; +import ink.wgink.exceptions.UpdateException; +import cn.com.tenlion.pojo.bos.deploy.DeployBO; +import cn.com.tenlion.pojo.pos.deploy.DeployPO; +import cn.com.tenlion.pojo.dtos.deploy.DeployDTO; +import org.springframework.stereotype.Repository; + +import java.util.List; +import java.util.Map; + +/** + * @ClassName: IDeployDao + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-07 10:53:40 + * @Version: 3.0 + **/ +@Repository +public interface IDeployDao { + + /** + * 新增 + * + * @param params + * @throws SaveException + */ + void save(Map params) throws SaveException; + + /** + * 删除 + * + * @param params + * @throws RemoveException + */ + void remove(Map params) throws RemoveException; + + /** + * 删除(物理) + * + * @param params + * @throws RemoveException + */ + void delete(Map params) throws RemoveException; + + /** + * 修改 + * + * @param params + * @throws UpdateException + */ + void update(Map params) throws UpdateException; + + /** + * 详情 + * + * @param params + * @return + * @throws SearchException + */ + DeployDTO get(Map params) throws SearchException; + + /** + * 详情 + * + * @param params + * @return + * @throws SearchException + */ + DeployBO getBO(Map params) throws SearchException; + + /** + * 详情 + * + * @param params + * @return + * @throws SearchException + */ + DeployPO getPO(Map params) throws SearchException; + + /** + * 列表 + * + * @param params + * @return + * @throws SearchException + */ + List list(Map params) throws SearchException; + + /** + * 列表 + * + * @param params + * @return + * @throws SearchException + */ + List listBO(Map params) throws SearchException; + + /** + * 列表 + * + * @param params + * @return + * @throws SearchException + */ + List listPO(Map params) throws SearchException; + + /** + * 统计 + * + * @param params + * @return + * @throws SearchException + */ + Integer count(Map params) throws SearchException; + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/enums/DeployStatus.java b/src/main/java/cn/com/tenlion/enums/DeployStatus.java new file mode 100644 index 0000000..a9f4438 --- /dev/null +++ b/src/main/java/cn/com/tenlion/enums/DeployStatus.java @@ -0,0 +1,25 @@ +package cn.com.tenlion.enums; + +/** + * @ClassName: DeployStatus + * @Description: + * @Author: renpc + * @Date: 2021-04-08 10:11:34 + * @Version: 3.0 + **/ +public enum DeployStatus { + // 商品类目-后台 + BACKSTAGE(0), + // 商品类目-小程序 + MINI(1); + + private Integer value; + + private DeployStatus(Integer value) { + this.value = value; + } + + public Integer getValue() { + return this.value == null ? -1 : this.value; + } +} diff --git a/src/main/java/cn/com/tenlion/pojo/bos/deploy/DeployBO.java b/src/main/java/cn/com/tenlion/pojo/bos/deploy/DeployBO.java new file mode 100644 index 0000000..17a9515 --- /dev/null +++ b/src/main/java/cn/com/tenlion/pojo/bos/deploy/DeployBO.java @@ -0,0 +1,87 @@ +package cn.com.tenlion.pojo.bos.deploy; + +/** + * + * @ClassName: DeployBO + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-07 10:53:40 + * @Version: 3.0 + **/ +public class DeployBO { + + private String deployId; + private Integer type; + private Integer isOpen; + private String creator; + private String gmtCreate; + private String modifier; + private String gmtModified; + private Integer isDelete; + + public String getDeployId() { + return deployId == null ? "" : deployId.trim(); + } + + public void setDeployId(String deployId) { + this.deployId = deployId; + } + + public Integer getType() { + return type == null ? 0 : type; + } + + public void setType(Integer type) { + this.type = type; + } + + public Integer getIsOpen() { + return isOpen == null ? 0 : isOpen; + } + + public void setIsOpen(Integer isOpen) { + this.isOpen = isOpen; + } + + public String getCreator() { + return creator == null ? "" : creator.trim(); + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public String getGmtCreate() { + return gmtCreate == null ? "" : gmtCreate.trim(); + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getModifier() { + return modifier == null ? "" : modifier.trim(); + } + + public void setModifier(String modifier) { + this.modifier = modifier; + } + + public String getGmtModified() { + return gmtModified == null ? "" : gmtModified.trim(); + } + + public void setGmtModified(String gmtModified) { + this.gmtModified = gmtModified; + } + + public Integer getIsDelete() { + return isDelete == null ? 0 : isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + +} diff --git a/src/main/java/cn/com/tenlion/pojo/bos/order/OrderBO.java b/src/main/java/cn/com/tenlion/pojo/bos/order/OrderBO.java index d85a612..53fc15b 100644 --- a/src/main/java/cn/com/tenlion/pojo/bos/order/OrderBO.java +++ b/src/main/java/cn/com/tenlion/pojo/bos/order/OrderBO.java @@ -13,6 +13,7 @@ public class OrderBO { private String orderId; private String orderNo; private String shopId; + private String words; private Integer orderStatus; private Integer isCancel; private Double amountMoney; @@ -46,6 +47,14 @@ public class OrderBO { this.shopId = shopId; } + public String getWords() { + return words == null ? "" : words; + } + + public void setWords(String words) { + this.words = words; + } + public Integer getOrderStatus() { return orderStatus == null ? 0 : orderStatus; } diff --git a/src/main/java/cn/com/tenlion/pojo/dtos/deploy/DeployDTO.java b/src/main/java/cn/com/tenlion/pojo/dtos/deploy/DeployDTO.java new file mode 100644 index 0000000..ba2425d --- /dev/null +++ b/src/main/java/cn/com/tenlion/pojo/dtos/deploy/DeployDTO.java @@ -0,0 +1,99 @@ +package cn.com.tenlion.pojo.dtos.deploy; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * + * @ClassName: DeployDTO + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-07 10:53:40 + * @Version: 3.0 + **/ +@ApiModel +public class DeployDTO { + + @ApiModelProperty(name = "deployId", value = "") + private String deployId; + @ApiModelProperty(name = "type", value = "配置类型") + private Integer type; + @ApiModelProperty(name = "isOpen", value = "是否打开。0:否1:是") + private Integer isOpen; + @ApiModelProperty(name = "creator", value = "") + private String creator; + @ApiModelProperty(name = "gmtCreate", value = "") + private String gmtCreate; + @ApiModelProperty(name = "modifier", value = "") + private String modifier; + @ApiModelProperty(name = "gmtModified", value = "") + private String gmtModified; + @ApiModelProperty(name = "isDelete", value = "") + private Integer isDelete; + + public String getDeployId() { + return deployId == null ? "" : deployId.trim(); + } + + public void setDeployId(String deployId) { + this.deployId = deployId; + } + + public Integer getType() { + return type == null ? 0 : type; + } + + public void setType(Integer type) { + this.type = type; + } + + public Integer getIsOpen() { + return isOpen == null ? 0 : isOpen; + } + + public void setIsOpen(Integer isOpen) { + this.isOpen = isOpen; + } + + public String getCreator() { + return creator == null ? "" : creator.trim(); + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public String getGmtCreate() { + return gmtCreate == null ? "" : gmtCreate.trim(); + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getModifier() { + return modifier == null ? "" : modifier.trim(); + } + + public void setModifier(String modifier) { + this.modifier = modifier; + } + + public String getGmtModified() { + return gmtModified == null ? "" : gmtModified.trim(); + } + + public void setGmtModified(String gmtModified) { + this.gmtModified = gmtModified; + } + + public Integer getIsDelete() { + return isDelete == null ? 0 : isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + +} diff --git a/src/main/java/cn/com/tenlion/pojo/dtos/order/OrderDTO.java b/src/main/java/cn/com/tenlion/pojo/dtos/order/OrderDTO.java index 507d962..31dfaa4 100644 --- a/src/main/java/cn/com/tenlion/pojo/dtos/order/OrderDTO.java +++ b/src/main/java/cn/com/tenlion/pojo/dtos/order/OrderDTO.java @@ -20,6 +20,10 @@ public class OrderDTO { private String orderNo; @ApiModelProperty(name = "shopId", value = "店铺ID") private String shopId; + @ApiModelProperty(name = "words", value = "留言") + private String words; + @ApiModelProperty(name = "goodsId", value = "商品ID") + private String goodsId; @ApiModelProperty(name = "orderStatus", value = "订单状态0:待付款,1:交易中,2:已退款,3: 已完成") private Integer orderStatus; @ApiModelProperty(name = "isCancel", value = "是否取消0:未取消,1:已取消") @@ -36,6 +40,10 @@ public class OrderDTO { private String modifier; @ApiModelProperty(name = "isDelete", value = "是否删除0:否,1:是") private Integer isDelete; + @ApiModelProperty(name = "shopName", value = "店铺名称") + private String shopName; + @ApiModelProperty(name = "shopLogo", value = "店铺图标") + private String shopLogo; public String getOrderId() { return orderId == null ? "" : orderId.trim(); @@ -61,6 +69,22 @@ public class OrderDTO { this.shopId = shopId; } + public String getWords() { + return words == null ? "" : words; + } + + public void setWords(String words) { + this.words = words; + } + + public String getGoodsId() { + return goodsId == null ? "" : goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + public Integer getOrderStatus() { return orderStatus == null ? 0 : orderStatus; } @@ -125,5 +149,19 @@ public class OrderDTO { this.isDelete = isDelete; } + public String getShopName() { + return shopName == null ? "" : shopName; + } + public void setShopName(String shopName) { + this.shopName = shopName; + } + + public String getShopLogo() { + return shopLogo == null ? "" : shopLogo; + } + + public void setShopLogo(String shopLogo) { + this.shopLogo = shopLogo; + } } diff --git a/src/main/java/cn/com/tenlion/pojo/pos/deploy/DeployPO.java b/src/main/java/cn/com/tenlion/pojo/pos/deploy/DeployPO.java new file mode 100644 index 0000000..28e8b93 --- /dev/null +++ b/src/main/java/cn/com/tenlion/pojo/pos/deploy/DeployPO.java @@ -0,0 +1,87 @@ +package cn.com.tenlion.pojo.pos.deploy; + +/** + * + * @ClassName: DeployPO + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-07 10:53:40 + * @Version: 3.0 + **/ +public class DeployPO { + + private String deployId; + private Integer type; + private Integer isOpen; + private String creator; + private String gmtCreate; + private String modifier; + private String gmtModified; + private Integer isDelete; + + public String getDeployId() { + return deployId == null ? "" : deployId.trim(); + } + + public void setDeployId(String deployId) { + this.deployId = deployId; + } + + public Integer getType() { + return type == null ? 0 : type; + } + + public void setType(Integer type) { + this.type = type; + } + + public Integer getIsOpen() { + return isOpen == null ? 0 : isOpen; + } + + public void setIsOpen(Integer isOpen) { + this.isOpen = isOpen; + } + + public String getCreator() { + return creator == null ? "" : creator.trim(); + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public String getGmtCreate() { + return gmtCreate == null ? "" : gmtCreate.trim(); + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getModifier() { + return modifier == null ? "" : modifier.trim(); + } + + public void setModifier(String modifier) { + this.modifier = modifier; + } + + public String getGmtModified() { + return gmtModified == null ? "" : gmtModified.trim(); + } + + public void setGmtModified(String gmtModified) { + this.gmtModified = gmtModified; + } + + public Integer getIsDelete() { + return isDelete == null ? 0 : isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + +} diff --git a/src/main/java/cn/com/tenlion/pojo/pos/order/OrderPO.java b/src/main/java/cn/com/tenlion/pojo/pos/order/OrderPO.java index 2b98cae..f2de008 100644 --- a/src/main/java/cn/com/tenlion/pojo/pos/order/OrderPO.java +++ b/src/main/java/cn/com/tenlion/pojo/pos/order/OrderPO.java @@ -13,6 +13,8 @@ public class OrderPO { private String orderId; private String orderNo; private String shopId; + private String words; + private String goodsId; private Integer orderStatus; private Integer isCancel; private Double amountMoney; @@ -46,6 +48,22 @@ public class OrderPO { this.shopId = shopId; } + public String getWords() { + return words == null ? "" : words; + } + + public void setWords(String words) { + this.words = words; + } + + public String getGoodsId() { + return goodsId == null ? "" : goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + public Integer getOrderStatus() { return orderStatus == null ? 0 : orderStatus; } diff --git a/src/main/java/cn/com/tenlion/pojo/vos/deploy/DeployVO.java b/src/main/java/cn/com/tenlion/pojo/vos/deploy/DeployVO.java new file mode 100644 index 0000000..d125070 --- /dev/null +++ b/src/main/java/cn/com/tenlion/pojo/vos/deploy/DeployVO.java @@ -0,0 +1,43 @@ +package cn.com.tenlion.pojo.vos.deploy; + +import ink.wgink.annotation.CheckEmptyAnnotation; +import ink.wgink.annotation.CheckNumberAnnotation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * + * @ClassName: DeployVO + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-07 10:53:40 + * @Version: 3.0 + **/ +@ApiModel +public class DeployVO { + + @ApiModelProperty(name = "type", value = "配置类型") + @CheckNumberAnnotation(name = "配置类型") + private Integer type; + @ApiModelProperty(name = "isOpen", value = "是否打开。0:否1:是") + @CheckNumberAnnotation(name = "是否打开。0:否1:是") + private Integer isOpen; + + public Integer getType() { + return type == null ? 0 : type; + } + + public void setType(Integer type) { + this.type = type; + } + + public Integer getIsOpen() { + return isOpen == null ? 0 : isOpen; + } + + public void setIsOpen(Integer isOpen) { + this.isOpen = isOpen; + } + + +} diff --git a/src/main/java/cn/com/tenlion/pojo/vos/order/OrderVO.java b/src/main/java/cn/com/tenlion/pojo/vos/order/OrderVO.java index e4fadad..3dff8ec 100644 --- a/src/main/java/cn/com/tenlion/pojo/vos/order/OrderVO.java +++ b/src/main/java/cn/com/tenlion/pojo/vos/order/OrderVO.java @@ -22,6 +22,10 @@ public class OrderVO { private String orderNo; @ApiModelProperty(name = "shopId", value = "店铺ID") private String shopId; + @ApiModelProperty(name = "words", value = "留言") + private String words; + @ApiModelProperty(name = "goodsId", value = "商品ID") + private String goodsId; @ApiModelProperty(name = "orderStatus", value = "订单状态0:待付款,1:交易中,2:已退款,3: 已完成") @CheckNumberAnnotation(name = "订单状态0:待付款,1:交易中,2:已退款,3: 已完成") private Integer orderStatus; @@ -69,6 +73,22 @@ public class OrderVO { this.shopId = shopId; } + public String getWords() { + return words == null ? "" : words; + } + + public void setWords(String words) { + this.words = words; + } + + public String getGoodsId() { + return goodsId == null ? "" : goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + public Integer getOrderStatus() { return orderStatus == null ? 0 : orderStatus; } diff --git a/src/main/java/cn/com/tenlion/pojo/vos/orderdeatil/OrderDeatilVO.java b/src/main/java/cn/com/tenlion/pojo/vos/orderdeatil/OrderDeatilVO.java index 42e165b..9225843 100644 --- a/src/main/java/cn/com/tenlion/pojo/vos/orderdeatil/OrderDeatilVO.java +++ b/src/main/java/cn/com/tenlion/pojo/vos/orderdeatil/OrderDeatilVO.java @@ -18,6 +18,8 @@ public class OrderDeatilVO { @ApiModelProperty(name = "orderId", value = "订单ID") private String orderId; + @ApiModelProperty(name = "shopId", value = "店铺ID") + private String shopId; @ApiModelProperty(name = "goodsName", value = "商品名称") private String goodsName; @ApiModelProperty(name = "goodsLogo", value = "商品logo") @@ -33,6 +35,8 @@ public class OrderDeatilVO { @ApiModelProperty(name = "totalPrice", value = "总价") @CheckNumberAnnotation(name = "总价") private Double totalPrice; + @ApiModelProperty(name = "words", value = "留言") + private String words; public String getOrderId() { return orderId == null ? "" : orderId.trim(); @@ -42,6 +46,14 @@ public class OrderDeatilVO { this.orderId = orderId; } + public String getShopId() { + return shopId == null ? "" : shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId; + } + public String getGoodsName() { return goodsName == null ? "" : goodsName.trim(); } @@ -90,5 +102,11 @@ public class OrderDeatilVO { this.totalPrice = totalPrice; } + public String getWords() { + return words == null ? "" : words; + } + public void setWords(String words) { + this.words = words; + } } diff --git a/src/main/java/cn/com/tenlion/service/category/impl/CategoryServiceImpl.java b/src/main/java/cn/com/tenlion/service/category/impl/CategoryServiceImpl.java index 4c0de88..7eeff77 100644 --- a/src/main/java/cn/com/tenlion/service/category/impl/CategoryServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/category/impl/CategoryServiceImpl.java @@ -1,7 +1,9 @@ package cn.com.tenlion.service.category.impl; import cn.com.tenlion.accesstokenmanager.AccessTokenManager; +import cn.com.tenlion.dao.deploy.IDeployDao; import cn.com.tenlion.pojo.dtos.carduser.CardUserDTO; +import cn.com.tenlion.pojo.dtos.deploy.DeployDTO; import cn.com.tenlion.pojo.dtos.industry.IndustryDTO; import cn.com.tenlion.pojo.dtos.industry.IndustryZTreeDTO; import cn.com.tenlion.service.AbstractService; @@ -9,6 +11,7 @@ import cn.com.tenlion.service.industry.IIndustryService; import com.alibaba.excel.util.StringUtils; import ink.wgink.app.AppTokenManager; import ink.wgink.exceptions.RemoveException; +import ink.wgink.exceptions.SaveException; import ink.wgink.exceptions.SearchException; import cn.com.tenlion.pojo.dtos.category.CategoryDTO; import cn.com.tenlion.pojo.vos.category.CategoryVO; @@ -44,6 +47,8 @@ public class CategoryServiceImpl extends AbstractService implements ICategorySer private ICategoryDao categoryDao; @Autowired private IIndustryService industryService; + @Autowired + private IDeployDao deployDao; @Override public SuccessResult saveCategory(CategoryVO categoryVO) throws Exception { @@ -114,9 +119,24 @@ public class CategoryServiceImpl extends AbstractService implements ICategorySer setSaveInfo(params); } - // 判断来源,如果为后台,则默认通过审核,并且审核员为管理员 - if("backstage".equals(categoryVO.getFrom())) { - params.put("auditStatus", 1); + // 用于查询配置的Map + Map newParams = new HashMap<>(1); + // 判断token是否为空,为空则是后台录入,不为空则是小程序录入 + newParams.put("type", null == token ? 0 : 1); + // 通过type去获取相关的配置 + List deployDTOS = deployDao.list(newParams); + // 判断配置数据是否存在,不存在,则返回保存错误信息,提示进行配置 + if(null != deployDTOS && deployDTOS.size() > 0) { + // 如果配置程序为开,则需要审核 + if(1 == deployDTOS.get(0).getIsOpen()) { + params.put("auditStatus", 0); + } + // 如果配置程序为关,则不需要审核 + if(0 == deployDTOS.get(0).getIsOpen()) { + params.put("auditStatus", 1); + } + }else { + throw new SaveException("未查询到配置相关信息"); } // 由于项目初期只有一个系统管理员,则审核ID默认为管理员ID diff --git a/src/main/java/cn/com/tenlion/service/deploy/IDeployService.java b/src/main/java/cn/com/tenlion/service/deploy/IDeployService.java new file mode 100644 index 0000000..fe0889f --- /dev/null +++ b/src/main/java/cn/com/tenlion/service/deploy/IDeployService.java @@ -0,0 +1,188 @@ +package cn.com.tenlion.service.deploy; + +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.SuccessResultList; +import cn.com.tenlion.pojo.dtos.deploy.DeployDTO; +import cn.com.tenlion.pojo.vos.deploy.DeployVO; +import cn.com.tenlion.pojo.bos.deploy.DeployBO; +import cn.com.tenlion.pojo.pos.deploy.DeployPO; + +import java.util.List; +import java.util.Map; + +/** + * @ClassName: IDeployService + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-07 10:53:40 + * @Version: 3.0 + **/ +public interface IDeployService { + + /** + * 新增 + * + * @param deployVO + * @return + */ + void save(DeployVO deployVO); + + /** + * 新增 + * + * @param token + * @param deployVO + * @return + */ + void save(String token, DeployVO deployVO); + + /** + * 新增 + * + * @param deployVO + * @return deployId + */ + String saveReturnId(DeployVO deployVO); + + /** + * 新增 + * + * @param token + * @param deployVO + * @return deployId + */ + String saveReturnId(String token, DeployVO deployVO); + + /** + * 删除 + * + * @param ids id列表 + * @return + */ + void remove(List ids); + + + /** + * 删除 + * + * @param token + * @param ids id列表 + * @return + */ + void remove(String token, List ids); + + /** + * 删除(物理删除) + * + * @param ids id列表 + */ + void delete(List ids); + + /** + * 修改 + * + * @param deployId + * @param deployVO + * @return + */ + void update(String deployId, DeployVO deployVO); + + /** + * 修改 + * + * @param token + * @param deployId + * @param deployVO + * @return + */ + void update(String token, String deployId, DeployVO deployVO); + + /** + * 详情 + * + * @param params 参数Map + * @return + */ + DeployDTO get(Map params); + + /** + * 详情 + * + * @param deployId + * @return + */ + DeployDTO get(String deployId); + + /** + * 详情 + * + * @param params 参数Map + * @return + */ + DeployBO getBO(Map params); + + /** + * 详情 + * + * @param deployId + * @return + */ + DeployBO getBO(String deployId); + + /** + * 详情 + * + * @param params 参数Map + * @return + */ + DeployPO getPO(Map params); + + /** + * 详情 + * + * @param deployId + * @return + */ + DeployPO getPO(String deployId); + + /** + * 列表 + * + * @param params + * @return + */ + List list(Map params); + + /** + * 列表 + * + * @param params + * @return + */ + List listBO(Map params); + + /** + * 列表 + * + * @param params + * @return + */ + List listPO(Map params); + + /** + * 分页列表 + * + * @param page + * @return + */ + SuccessResultList> listPage(ListPage page); + + /** + * 统计 + * + * @param params + * @return + */ + Integer count(Map params); + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/service/deploy/impl/DeployServiceImpl.java b/src/main/java/cn/com/tenlion/service/deploy/impl/DeployServiceImpl.java new file mode 100644 index 0000000..62fc6a9 --- /dev/null +++ b/src/main/java/cn/com/tenlion/service/deploy/impl/DeployServiceImpl.java @@ -0,0 +1,171 @@ +package cn.com.tenlion.service.deploy.impl; + +import ink.wgink.common.base.DefaultBaseService; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.SuccessResult; +import ink.wgink.pojo.result.SuccessResultList; +import ink.wgink.util.map.HashMapUtil; +import ink.wgink.util.UUIDUtil; +import cn.com.tenlion.dao.deploy.IDeployDao; +import cn.com.tenlion.pojo.dtos.deploy.DeployDTO; +import cn.com.tenlion.pojo.vos.deploy.DeployVO; +import cn.com.tenlion.pojo.bos.deploy.DeployBO; +import cn.com.tenlion.pojo.pos.deploy.DeployPO; +import cn.com.tenlion.service.deploy.IDeployService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.*; + +/** + * @ClassName: DeployServiceImpl + * @Description: + * @Author: CodeFactory + * @Date: 2021-04-07 10:53:40 + * @Version: 3.0 + **/ +@Service +public class DeployServiceImpl extends DefaultBaseService implements IDeployService { + + @Autowired + private IDeployDao deployDao; + + @Override + public void save(DeployVO deployVO) { + saveReturnId(deployVO); + } + + @Override + public void save(String token, DeployVO deployVO) { + saveReturnId(token, deployVO); + } + + @Override + public String saveReturnId(DeployVO deployVO) { + return saveReturnId(null, deployVO); + } + + @Override + public String saveReturnId(String token, DeployVO deployVO) { + String deployId = UUIDUtil.getUUID(); + Map params = HashMapUtil.beanToMap(deployVO); + params.put("deployId", deployId); + if (StringUtils.isBlank(token)) { + setSaveInfo(params); + } else { + setAppSaveInfo(token, params); + } + deployDao.save(params); + return deployId; + } + + @Override + public void remove(List ids) { + remove(null, ids); + } + + @Override + public void remove(String token, List ids) { + Map params = getHashMap(2); + params.put("deployIds", ids); + if (StringUtils.isBlank(token)) { + setUpdateInfo(params); + } else { + setAppUpdateInfo(token, params); + } + deployDao.remove(params); + } + + @Override + public void delete(List ids) { + Map params = getHashMap(2); + params.put("deployIds", ids); + deployDao.delete(params); + } + + @Override + public void update(String deployId, DeployVO deployVO) { + update(null, deployId, deployVO); + } + + @Override + public void update(String token, String deployId, DeployVO deployVO) { + Map params = HashMapUtil.beanToMap(deployVO); + params.put("deployId", deployId); + if (StringUtils.isBlank(token)) { + setUpdateInfo(params); + } else { + setAppUpdateInfo(token, params); + } + deployDao.update(params); + } + + @Override + public DeployDTO get(Map params) { + return deployDao.get(params); + } + + @Override + public DeployDTO get(String deployId) { + Map params = super.getHashMap(2); + params.put("deployId", deployId); + return get(params); + } + + @Override + public DeployBO getBO(Map params) { + return deployDao.getBO(params); + } + + @Override + public DeployBO getBO(String deployId) { + Map params = super.getHashMap(2); + params.put("deployId", deployId); + return getBO(params); + } + + @Override + public DeployPO getPO(Map params) { + return deployDao.getPO(params); + } + + @Override + public DeployPO getPO(String deployId) { + Map params = super.getHashMap(2); + params.put("deployId", deployId); + return getPO(params); + } + + @Override + public List list(Map params) { + return deployDao.list(params); + } + + @Override + public List listBO(Map params) { + return deployDao.listBO(params); + } + + @Override + public List listPO(Map params) { + return deployDao.listPO(params); + } + + @Override + public SuccessResultList> listPage(ListPage page) { + PageHelper.startPage(page.getPage(), page.getRows()); + List deployDTOs = list(page.getParams()); + PageInfo pageInfo = new PageInfo<>(deployDTOs); + return new SuccessResultList<>(deployDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); + } + + @Override + public Integer count(Map params) { + Integer count = deployDao.count(params); + return count == null ? 0 : count; + } + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/service/orderdeatil/IOrderDeatilService.java b/src/main/java/cn/com/tenlion/service/orderdeatil/IOrderDeatilService.java index b7a5839..ab0c25e 100644 --- a/src/main/java/cn/com/tenlion/service/orderdeatil/IOrderDeatilService.java +++ b/src/main/java/cn/com/tenlion/service/orderdeatil/IOrderDeatilService.java @@ -25,7 +25,7 @@ public interface IOrderDeatilService { * @param orderDeatilVO * @return */ - void save(OrderDeatilVO orderDeatilVO); + void save(List orderDeatilVO); /** * 新增 @@ -34,7 +34,7 @@ public interface IOrderDeatilService { * @param orderDeatilVO * @return */ - void save(String token, OrderDeatilVO orderDeatilVO); + void save(String token, List orderDeatilVO); /** * 新增 @@ -42,7 +42,7 @@ public interface IOrderDeatilService { * @param orderDeatilVO * @return orderDeatilId */ - String saveReturnId(OrderDeatilVO orderDeatilVO); + String saveReturnId(List orderDeatilVO); /** * 新增 @@ -51,7 +51,7 @@ public interface IOrderDeatilService { * @param orderDeatilVO * @return orderDeatilId */ - String saveReturnId(String token, OrderDeatilVO orderDeatilVO); + String saveReturnId(String token, List orderDeatilVO); /** * 删除 diff --git a/src/main/java/cn/com/tenlion/service/orderdeatil/impl/OrderDeatilServiceImpl.java b/src/main/java/cn/com/tenlion/service/orderdeatil/impl/OrderDeatilServiceImpl.java index 6ef7da0..3090379 100644 --- a/src/main/java/cn/com/tenlion/service/orderdeatil/impl/OrderDeatilServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/orderdeatil/impl/OrderDeatilServiceImpl.java @@ -4,9 +4,12 @@ import cn.com.tenlion.dao.orderdeatil.IOrderDeatilDao; import cn.com.tenlion.pojo.bos.orderdeatil.OrderDeatilBO; import cn.com.tenlion.pojo.dtos.orderdeatil.OrderDeatilDTO; import cn.com.tenlion.pojo.pos.orderdeatil.OrderDeatilPO; +import cn.com.tenlion.pojo.vos.order.OrderVO; import cn.com.tenlion.pojo.vos.orderdeatil.OrderDeatilVO; +import cn.com.tenlion.service.order.IOrderService; import cn.com.tenlion.service.orderdeatil.IOrderDeatilService; import ink.wgink.common.base.DefaultBaseService; +import ink.wgink.exceptions.SaveException; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.util.map.HashMapUtil; @@ -31,34 +34,52 @@ public class OrderDeatilServiceImpl extends DefaultBaseService implements IOrder @Autowired private IOrderDeatilDao orderDeatilDao; + @Autowired + private IOrderService orderService; @Override - public void save(OrderDeatilVO orderDeatilVO) { + public void save(List orderDeatilVO) { saveReturnId(orderDeatilVO); } @Override - public void save(String token, OrderDeatilVO orderDeatilVO) { + public void save(String token, List orderDeatilVO) { saveReturnId(token, orderDeatilVO); } @Override - public String saveReturnId(OrderDeatilVO orderDeatilVO) { + public String saveReturnId(List orderDeatilVO) { return saveReturnId(null, orderDeatilVO); } @Override - public String saveReturnId(String token, OrderDeatilVO orderDeatilVO) { - String orderDeatilId = UUIDUtil.getUUID(); - Map params = HashMapUtil.beanToMap(orderDeatilVO); - params.put("orderDeatilId", orderDeatilId); - if (StringUtils.isBlank(token)) { - setSaveInfo(params); - } else { - setAppSaveInfo(token, params); + public String saveReturnId(String token, List orderDeatilVO) { + String orderId = UUIDUtil.getUUID(); + Map params = new HashMap<>(); + if(null != orderDeatilVO && orderDeatilVO.size() > 0) { + double amountMoney = 0; + for(OrderDeatilVO vo: orderDeatilVO) { + amountMoney += vo.getTotalPrice(); + params = HashMapUtil.beanToMap(vo); + String orderDeatilId = UUIDUtil.getUUID(); + params.put("orderDeatilId", orderDeatilId); + params.put("orderId", orderId); + if (StringUtils.isBlank(token)) { + setSaveInfo(params); + } else { + setAppSaveInfo(token, params); + } + orderDeatilDao.save(params); + } + OrderVO orderVO = new OrderVO(); + orderVO.setOrderId(orderId); + orderVO.setShopId(orderDeatilVO.get(0).getShopId()); + orderVO.setAmountMoney(amountMoney); + orderVO.setWords(orderDeatilVO.get(0).getWords()); + orderService.save(token, orderVO); + return orderId; } - orderDeatilDao.save(params); - return orderDeatilId; + throw new SaveException("下单失败"); } @Override diff --git a/src/main/java/cn/com/tenlion/service/templateperson/ITemplatePersonService.java b/src/main/java/cn/com/tenlion/service/templateperson/ITemplatePersonService.java index e2073f5..04cb6a3 100644 --- a/src/main/java/cn/com/tenlion/service/templateperson/ITemplatePersonService.java +++ b/src/main/java/cn/com/tenlion/service/templateperson/ITemplatePersonService.java @@ -81,21 +81,21 @@ public interface ITemplatePersonService { /** * 修改 * - * @param templatePersonId + * @param cardPersonId * @param templatePersonVO * @return */ - void update(String templatePersonId, TemplatePersonVO templatePersonVO); + void update(String cardPersonId, TemplatePersonVO templatePersonVO); /** * 修改 * * @param token - * @param templatePersonId + * @param cardPersonId * @param templatePersonVO * @return */ - void update(String token, String templatePersonId, TemplatePersonVO templatePersonVO); + void update(String token, String cardPersonId, TemplatePersonVO templatePersonVO); /** * 详情 diff --git a/src/main/java/cn/com/tenlion/service/templateperson/impl/TemplatePersonServiceImpl.java b/src/main/java/cn/com/tenlion/service/templateperson/impl/TemplatePersonServiceImpl.java index 7b9d72d..ae9ec3f 100644 --- a/src/main/java/cn/com/tenlion/service/templateperson/impl/TemplatePersonServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/templateperson/impl/TemplatePersonServiceImpl.java @@ -96,14 +96,20 @@ public class TemplatePersonServiceImpl extends DefaultBaseService implements ITe } @Override - public void update(String templatePersonId, TemplatePersonVO templatePersonVO) { - update(null, templatePersonId, templatePersonVO); + public void update(String cardPersonId, TemplatePersonVO templatePersonVO) { + update(null, cardPersonId, templatePersonVO); } @Override - public void update(String token, String templatePersonId, TemplatePersonVO templatePersonVO) { + public void update(String token, String cardPersonId, TemplatePersonVO templatePersonVO) { + String content = templatePersonVO.getContent(); + try { + JSONArray.parseArray(content); + }catch(Exception e) { + throw new SearchException("内容数据格式错位,应为JSONArray格式"); + } Map params = HashMapUtil.beanToMap(templatePersonVO); - params.put("templatePersonId", templatePersonId); + params.put("cardPersonId", cardPersonId); if (StringUtils.isBlank(token)) { setUpdateInfo(params); } else { diff --git a/src/main/resources/mybatis/mapper/deploy/deploy-mapper.xml b/src/main/resources/mybatis/mapper/deploy/deploy-mapper.xml new file mode 100644 index 0000000..8d216e1 --- /dev/null +++ b/src/main/resources/mybatis/mapper/deploy/deploy-mapper.xml @@ -0,0 +1,301 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT IGNORE INTO svc_deploy( + deploy_id, + type, + is_open, + creator, + gmt_create, + modifier, + gmt_modified, + is_delete + ) SELECT + #{deployId}, + #{type}, + #{isOpen}, + #{creator}, + #{gmtCreate}, + #{modifier}, + #{gmtModified}, + #{isDelete} + FROM + DUAL + WHERE + NOT EXISTS ( + SELECT + * + FROM + svc_deploy + WHERE + type = #{type} + AND is_delete = 0 + ) + + + + + UPDATE + svc_deploy + SET + gmt_modified = #{gmtModified}, + modifier = #{modifier}, + is_delete = 1 + WHERE + deploy_id IN + + #{deployIds[${index}]} + + + + + + DELETE FROM + svc_deploy + WHERE + deploy_id IN + + #{deployIds[${index}]} + + + + + + UPDATE + svc_deploy + SET + + type = #{type}, + + + is_open = #{isOpen}, + + gmt_modified = #{gmtModified}, + modifier = #{modifier}, + deploy_id = deploy_id + WHERE + deploy_id = #{deployId} + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/order/order-mapper.xml b/src/main/resources/mybatis/mapper/order/order-mapper.xml index cfe8fa0..cdff0ee 100644 --- a/src/main/resources/mybatis/mapper/order/order-mapper.xml +++ b/src/main/resources/mybatis/mapper/order/order-mapper.xml @@ -6,6 +6,7 @@ + @@ -14,12 +15,15 @@ + + + @@ -34,6 +38,7 @@ + @@ -50,6 +55,7 @@ order_id, order_no, shop_id, + words, order_status, is_cancel, amount_money, @@ -62,6 +68,7 @@ #{orderId}, #{orderNo}, #{shopId}, + #{words}, #{orderStatus}, #{isCancel}, #{amountMoney}, @@ -113,6 +120,9 @@ shop_id = #{shopId}, + + words = #{words}, + order_status = #{orderStatus}, @@ -147,6 +157,7 @@ t1.order_id, t1.order_no, t1.shop_id, + t1.words, t1.order_status, t1.is_cancel, t1.amount_money, @@ -172,6 +183,7 @@ t1.order_id, t1.order_no, t1.shop_id, + t1.words, t1.order_status, t1.is_cancel, t1.amount_money, @@ -196,6 +208,7 @@ t1.order_id, t1.order_no, t1.shop_id, + t1.words, t1.order_status, t1.is_cancel, t1.amount_money, @@ -217,25 +230,26 @@ -
- -
+
+ +
diff --git a/src/main/resources/static/route/deploy/list.html b/src/main/resources/static/route/deploy/list.html new file mode 100644 index 0000000..b8005fd --- /dev/null +++ b/src/main/resources/static/route/deploy/list.html @@ -0,0 +1,291 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/deploy/save.html b/src/main/resources/static/route/deploy/save.html new file mode 100644 index 0000000..9d900d2 --- /dev/null +++ b/src/main/resources/static/route/deploy/save.html @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/deploy/update.html b/src/main/resources/static/route/deploy/update.html new file mode 100644 index 0000000..d4c6ebe --- /dev/null +++ b/src/main/resources/static/route/deploy/update.html @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/industry/list-industry.html b/src/main/resources/static/route/industry/list-industry.html index af49fa9..5b46d8a 100644 --- a/src/main/resources/static/route/industry/list-industry.html +++ b/src/main/resources/static/route/industry/list-industry.html @@ -11,7 +11,7 @@ -
+
diff --git a/src/main/resources/static/route/shopgoods/save.html b/src/main/resources/static/route/shopgoods/save.html index 293e83d..2eb8e19 100644 --- a/src/main/resources/static/route/shopgoods/save.html +++ b/src/main/resources/static/route/shopgoods/save.html @@ -28,7 +28,7 @@
-
+
diff --git a/src/main/resources/static/route/shopgoods/update.html b/src/main/resources/static/route/shopgoods/update.html index b150671..648dbaa 100644 --- a/src/main/resources/static/route/shopgoods/update.html +++ b/src/main/resources/static/route/shopgoods/update.html @@ -28,7 +28,7 @@
-
+