From 6e751aa7a4513df01365f4390e9ff9bc98eba63a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 14 Aug 2020 15:37:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=A2=E6=88=B7=E5=AE=9A?= =?UTF-8?q?=E5=88=B6=E5=8A=9F=E8=83=BD=E4=B8=8A=E4=B8=8B=E6=9E=B6=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/CustomerFunctionDetailDTO.java | 5 + .../epmet/dto/FunctionShoppingHistoryDTO.java | 86 +++++++++++++++ .../FunctionShoppingHistoryController.java | 94 ++++++++++++++++ .../epmet/dao/FunctionShoppingHistoryDao.java | 33 ++++++ .../entity/CustomerFunctionDetailEntity.java | 5 + .../entity/FunctionShoppingHistoryEntity.java | 61 ++++++++++ .../excel/CustomerFunctionDetailExcel.java | 3 + .../excel/FunctionShoppingHistoryExcel.java | 65 +++++++++++ .../redis/FunctionShoppingHistoryRedis.java | 47 ++++++++ .../FunctionShoppingHistoryService.java | 95 ++++++++++++++++ .../FunctionShoppingHistoryServiceImpl.java | 104 ++++++++++++++++++ .../mapper/FunctionShoppingHistoryDao.xml | 20 ++++ 12 files changed, 618 insertions(+) create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/FunctionShoppingHistoryDTO.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionShoppingHistoryController.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/FunctionShoppingHistoryDao.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/FunctionShoppingHistoryEntity.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/excel/FunctionShoppingHistoryExcel.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/redis/FunctionShoppingHistoryRedis.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionShoppingHistoryService.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionShoppingHistoryServiceImpl.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionShoppingHistoryDao.xml diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerFunctionDetailDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerFunctionDetailDTO.java index 40136207f0..8f2d7d09b7 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerFunctionDetailDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerFunctionDetailDTO.java @@ -73,6 +73,11 @@ public class CustomerFunctionDetailDTO implements Serializable { */ private String targetLink; + /** + * 上架状态:0:下架、1:上架 + */ + private Integer shoppingStatus; + /** * 自定义排序 */ diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/FunctionShoppingHistoryDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/FunctionShoppingHistoryDTO.java new file mode 100644 index 0000000000..9b1eea8a51 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/FunctionShoppingHistoryDTO.java @@ -0,0 +1,86 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 客户定制功能上下架历史 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-14 + */ +@Data +public class FunctionShoppingHistoryDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 功能Id + */ + private String functionId; + + /** + * 上下架状态 上架状态:0:下架、1:上架 + */ + private Integer shoppingStatus; + + /** + * 理由 + */ + private String reason; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionShoppingHistoryController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionShoppingHistoryController.java new file mode 100644 index 0000000000..51e1c62815 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionShoppingHistoryController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.FunctionShoppingHistoryDTO; +import com.epmet.excel.FunctionShoppingHistoryExcel; +import com.epmet.service.FunctionShoppingHistoryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 客户定制功能上下架历史 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-14 + */ +@RestController +@RequestMapping("functionshoppinghistory") +public class FunctionShoppingHistoryController { + + @Autowired + private FunctionShoppingHistoryService functionShoppingHistoryService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = functionShoppingHistoryService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + FunctionShoppingHistoryDTO data = functionShoppingHistoryService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody FunctionShoppingHistoryDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + functionShoppingHistoryService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody FunctionShoppingHistoryDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + functionShoppingHistoryService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + functionShoppingHistoryService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = functionShoppingHistoryService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, FunctionShoppingHistoryExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/FunctionShoppingHistoryDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/FunctionShoppingHistoryDao.java new file mode 100644 index 0000000000..674482045f --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/FunctionShoppingHistoryDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.FunctionShoppingHistoryEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 客户定制功能上下架历史 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-14 + */ +@Mapper +public interface FunctionShoppingHistoryDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerFunctionDetailEntity.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerFunctionDetailEntity.java index aab31d79a7..53931cb040 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerFunctionDetailEntity.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerFunctionDetailEntity.java @@ -73,6 +73,11 @@ public class CustomerFunctionDetailEntity extends BaseEpmetEntity { */ private String targetLink; + /** + * 上架状态:0:下架、1:上架 + */ + private Integer shoppingStatus; + /** * 自定义排序 */ diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/FunctionShoppingHistoryEntity.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/FunctionShoppingHistoryEntity.java new file mode 100644 index 0000000000..6d8f479bac --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/FunctionShoppingHistoryEntity.java @@ -0,0 +1,61 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 客户定制功能上下架历史 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-14 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("function_shopping_history") +public class FunctionShoppingHistoryEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 功能Id + */ + private String functionId; + + /** + * 上下架状态 上架状态:0:下架、1:上架 + */ + private Integer shoppingStatus; + + /** + * 理由 + */ + private String reason; + +} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/excel/CustomerFunctionDetailExcel.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/excel/CustomerFunctionDetailExcel.java index 06afddcd89..13c88668e8 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/excel/CustomerFunctionDetailExcel.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/excel/CustomerFunctionDetailExcel.java @@ -55,6 +55,9 @@ public class CustomerFunctionDetailExcel { @Excel(name = "外链地址") private String targetLink; + @Excel(name = "自定义排序") + private Integer shoppingStatus; + @Excel(name = "自定义排序") private Integer displayOrder; diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/excel/FunctionShoppingHistoryExcel.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/excel/FunctionShoppingHistoryExcel.java new file mode 100644 index 0000000000..a99dfed1f6 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/excel/FunctionShoppingHistoryExcel.java @@ -0,0 +1,65 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 客户定制功能上下架历史 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-14 + */ +@Data +public class FunctionShoppingHistoryExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户Id") + private String customerId; + + @Excel(name = "功能Id") + private String functionId; + + @Excel(name = "上下架状态 上架状态:0:下架、1:上架") + private Integer shoppingStatus; + + @Excel(name = "理由") + private String reason; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/redis/FunctionShoppingHistoryRedis.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/redis/FunctionShoppingHistoryRedis.java new file mode 100644 index 0000000000..ebe8a91096 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/redis/FunctionShoppingHistoryRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 客户定制功能上下架历史 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-14 + */ +@Component +public class FunctionShoppingHistoryRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionShoppingHistoryService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionShoppingHistoryService.java new file mode 100644 index 0000000000..33f6d6ead6 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionShoppingHistoryService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.FunctionShoppingHistoryDTO; +import com.epmet.entity.FunctionShoppingHistoryEntity; + +import java.util.List; +import java.util.Map; + +/** + * 客户定制功能上下架历史 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-14 + */ +public interface FunctionShoppingHistoryService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-08-14 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-08-14 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FunctionShoppingHistoryDTO + * @author generator + * @date 2020-08-14 + */ + FunctionShoppingHistoryDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-08-14 + */ + void save(FunctionShoppingHistoryDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-08-14 + */ + void update(FunctionShoppingHistoryDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-08-14 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionShoppingHistoryServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionShoppingHistoryServiceImpl.java new file mode 100644 index 0000000000..acd0aed260 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionShoppingHistoryServiceImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.FunctionShoppingHistoryDao; +import com.epmet.dto.FunctionShoppingHistoryDTO; +import com.epmet.entity.FunctionShoppingHistoryEntity; +import com.epmet.redis.FunctionShoppingHistoryRedis; +import com.epmet.service.FunctionShoppingHistoryService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 客户定制功能上下架历史 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-14 + */ +@Service +public class FunctionShoppingHistoryServiceImpl extends BaseServiceImpl implements FunctionShoppingHistoryService { + + @Autowired + private FunctionShoppingHistoryRedis functionShoppingHistoryRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FunctionShoppingHistoryDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FunctionShoppingHistoryDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public FunctionShoppingHistoryDTO get(String id) { + FunctionShoppingHistoryEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FunctionShoppingHistoryDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FunctionShoppingHistoryDTO dto) { + FunctionShoppingHistoryEntity entity = ConvertUtils.sourceToTarget(dto, FunctionShoppingHistoryEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FunctionShoppingHistoryDTO dto) { + FunctionShoppingHistoryEntity entity = ConvertUtils.sourceToTarget(dto, FunctionShoppingHistoryEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionShoppingHistoryDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionShoppingHistoryDao.xml new file mode 100644 index 0000000000..a591988091 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionShoppingHistoryDao.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file