| @@ -1,6 +1,6 @@ | |||||
| package com.iformall.service.impl; | package com.iformall.service.impl; | ||||
| import com.iformall.domain.dto.neuver.SaveServiceVideoRecordDTO; | |||||
| import com.iformall.domain.dto.sm.SaveServiceVideoRecordDTO; | |||||
| import com.iformall.service.AiVideoService; | import com.iformall.service.AiVideoService; | ||||
| import com.iformall.service.sm.ServiceVideoRecordService; | import com.iformall.service.sm.ServiceVideoRecordService; | ||||
| import com.iformall.sm.*; | import com.iformall.sm.*; | ||||
| @@ -149,8 +149,8 @@ public class ShiroConfig { | |||||
| //配置退出 过滤器,其中的具体的退出代码Shiro已经替我们实现了 | //配置退出 过滤器,其中的具体的退出代码Shiro已经替我们实现了 | ||||
| filterChainDefinitionMap.put("/logout", "authc"); | filterChainDefinitionMap.put("/logout", "authc"); | ||||
| filterChainDefinitionMap.put("/**", "corsFilter,token,authc"); | |||||
| // filterChainDefinitionMap.put("/**", "anon"); | |||||
| // filterChainDefinitionMap.put("/**", "corsFilter,token,authc"); | |||||
| filterChainDefinitionMap.put("/**", "anon"); | |||||
| shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap); | shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap); | ||||
| @@ -0,0 +1,26 @@ | |||||
| package com.iformall.controller.sm; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.dto.sm.SaveApiMenuDTO; | |||||
| import com.iformall.domain.po.sm.ApiDetail; | |||||
| import com.iformall.service.sm.ApiDetailService; | |||||
| import io.swagger.annotations.Api; | |||||
| import io.swagger.annotations.ApiOperation; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.web.bind.annotation.*; | |||||
| @RestController | |||||
| @RequestMapping("/apiDetail") | |||||
| @Api(tags = "api菜单详情接口") | |||||
| public class ApiDetailController { | |||||
| @Autowired | |||||
| private ApiDetailService apiDetailService; | |||||
| @ApiOperation("查询单个api菜单详情") | |||||
| @GetMapping("/get") | |||||
| public ResultData getApiDetail(Long id) { | |||||
| ApiDetail apiDetail = apiDetailService.getApiDetail(id); | |||||
| return new ResultData(apiDetail); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,40 @@ | |||||
| package com.iformall.controller.sm; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.dto.sm.SaveApiGuideDTO; | |||||
| import com.iformall.domain.dto.sm.UpdateApiGuideDTO; | |||||
| import com.iformall.domain.po.sm.ApiGuide; | |||||
| import com.iformall.service.sm.ApiGuideService; | |||||
| import io.swagger.annotations.Api; | |||||
| import io.swagger.annotations.ApiOperation; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.web.bind.annotation.*; | |||||
| @RestController | |||||
| @RequestMapping("/apiGuide") | |||||
| @Api(tags = "api指南接口") | |||||
| public class ApiGuideController { | |||||
| @Autowired | |||||
| private ApiGuideService apiGuideService; | |||||
| @ApiOperation("分页查询api菜单") | |||||
| @GetMapping("/page") | |||||
| public ResultData pageApiGuide(ApiGuide apiGuide, Integer pageNum, Integer pageSize) { | |||||
| return new ResultData(apiGuideService.pageApiGuide(apiGuide, pageNum, pageSize)); | |||||
| } | |||||
| @ApiOperation("新增api菜单") | |||||
| @PostMapping("/save") | |||||
| public ResultData saveApiGuide(@RequestBody SaveApiGuideDTO dto) { | |||||
| apiGuideService.saveApiGuide(dto); | |||||
| return new ResultData(); | |||||
| } | |||||
| @ApiOperation("修改api菜单") | |||||
| @PostMapping("/update") | |||||
| public ResultData updateApiGuide(@RequestBody UpdateApiGuideDTO dto) { | |||||
| apiGuideService.updateApiGuide(dto); | |||||
| return new ResultData(); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,40 @@ | |||||
| package com.iformall.controller.sm; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.dto.sm.SaveApiMenuDTO; | |||||
| import com.iformall.domain.dto.sm.UpdateApiMenuDTO; | |||||
| import com.iformall.domain.po.sm.ApiMenu; | |||||
| import com.iformall.service.sm.ApiMenuService; | |||||
| import io.swagger.annotations.Api; | |||||
| import io.swagger.annotations.ApiOperation; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.web.bind.annotation.*; | |||||
| @RestController | |||||
| @RequestMapping("/apiMenu") | |||||
| @Api(tags = "api菜单接口") | |||||
| public class ApiMenuController { | |||||
| @Autowired | |||||
| private ApiMenuService apiMenuService; | |||||
| @ApiOperation("分页查询api菜单") | |||||
| @GetMapping("/page") | |||||
| public ResultData pageApiMenu(ApiMenu ApiMenu, Integer pageNum, Integer pageSize) { | |||||
| return new ResultData(apiMenuService.pageApiMenu(ApiMenu, pageNum, pageSize)); | |||||
| } | |||||
| @ApiOperation("新增api菜单") | |||||
| @PostMapping("/save") | |||||
| public ResultData saveApiMenu(@RequestBody SaveApiMenuDTO dto) { | |||||
| apiMenuService.saveApiMenu(dto); | |||||
| return new ResultData(); | |||||
| } | |||||
| @ApiOperation("修改api菜单") | |||||
| @PostMapping("/update") | |||||
| public ResultData updateApiMenu(@RequestBody UpdateApiMenuDTO dto) { | |||||
| apiMenuService.updateApiMenu(dto); | |||||
| return new ResultData(); | |||||
| } | |||||
| } | |||||
| @@ -2,9 +2,9 @@ package com.iformall.controller.sm; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.dto.neuver.SaveServiceInfoDTO; | |||||
| import com.iformall.domain.dto.neuver.UpdateServiceInfoDTO; | |||||
| import com.iformall.domain.dto.neuver.UpdateServiceInfoStatusDTO; | |||||
| import com.iformall.domain.dto.sm.SaveServiceInfoDTO; | |||||
| import com.iformall.domain.dto.sm.UpdateServiceInfoDTO; | |||||
| import com.iformall.domain.dto.sm.UpdateServiceInfoStatusDTO; | |||||
| import com.iformall.domain.po.sm.ServiceInfo; | import com.iformall.domain.po.sm.ServiceInfo; | ||||
| import com.iformall.service.sm.ServiceInfoService; | import com.iformall.service.sm.ServiceInfoService; | ||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| @@ -1,7 +1,7 @@ | |||||
| package com.iformall.controller.sm; | package com.iformall.controller.sm; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.dto.neuver.UpdateThirdPartyApiStatusDTO; | |||||
| import com.iformall.domain.dto.sm.UpdateThirdPartyApiStatusDTO; | |||||
| import com.iformall.domain.po.WxThirdPartyApi; | import com.iformall.domain.po.WxThirdPartyApi; | ||||
| import com.iformall.service.WxThirdPartyApiService; | import com.iformall.service.WxThirdPartyApiService; | ||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| @@ -87,7 +87,10 @@ public class HomeController extends BaseController { | |||||
| //生成图片验证码 | //生成图片验证码 | ||||
| BufferedImage image = producer.createImage(text); | BufferedImage image = producer.createImage(text); | ||||
| //保存到shiro session | //保存到shiro session | ||||
| ShiroUtils.setSessionAttribute(Constants.KAPTCHA_SESSION_KEY, text); | |||||
| // ShiroUtils.setSessionAttribute(Constants.KAPTCHA_SESSION_KEY, text); | |||||
| String key = Constant.captchaPrev + ":" + getIpAddr(); | |||||
| RedisCacheUtils.cache(redisTemplate, key, text, 60); | |||||
| logger.info("验证码接口-生成的验证码:{}", text); | |||||
| ServletOutputStream out = response.getOutputStream(); | ServletOutputStream out = response.getOutputStream(); | ||||
| ImageIO.write(image, "jpg", out); | ImageIO.write(image, "jpg", out); | ||||
| @@ -99,15 +102,26 @@ public class HomeController extends BaseController { | |||||
| public ResultData login(@RequestBody MallUserInfo user, HttpServletResponse response) { | public ResultData login(@RequestBody MallUserInfo user, HttpServletResponse response) { | ||||
| String ipaddress = getIpAddr(); | String ipaddress = getIpAddr(); | ||||
| logger.debug("[" + ipaddress + "] HomeController::doLogin"); | logger.debug("[" + ipaddress + "] HomeController::doLogin"); | ||||
| try { | |||||
| String kaptcha = ShiroUtils.getKaptcha(Constants.KAPTCHA_SESSION_KEY); | |||||
| if(!user.getCaptcha().equalsIgnoreCase(kaptcha)){ | |||||
| return new ResultData(ErrorCode.KAPCHA_NOT_EQUAL); | |||||
| } | |||||
| } catch (MallinkException e) { | |||||
| logger.error("验证码" + e.getMessage()); | |||||
| return new ResultData(ErrorCode.KAPCHA_NOT_VALID.getCode(), e.getMessage()); | |||||
| // try { | |||||
| // String kaptcha = ShiroUtils.getKaptcha(Constants.KAPTCHA_SESSION_KEY); | |||||
| // logger.info("登录接口-验证码:{}", user.getCaptcha()); | |||||
| // logger.info("登录接口-生成的验证码:{}", kaptcha); | |||||
| // if(!user.getCaptcha().equalsIgnoreCase(kaptcha)){ | |||||
| // return new ResultData(ErrorCode.KAPCHA_NOT_EQUAL); | |||||
| // } | |||||
| // } catch (MallinkException e) { | |||||
| // logger.error("验证码" + e.getMessage()); | |||||
| // return new ResultData(ErrorCode.KAPCHA_NOT_VALID.getCode(), e.getMessage()); | |||||
| // } | |||||
| String key = Constant.captchaPrev + ":" + getIpAddr(); | |||||
| String code = RedisCacheUtils.getCacheString(redisTemplate, key); | |||||
| if (StringUtils.isBlank(code)) { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "验证码已过期"); | |||||
| } | } | ||||
| if (!code.equals(user.getCaptcha())) { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "验证码不正确"); | |||||
| } | |||||
| if (StringUtils.isBlank(user.getUsername()) || StringUtils.isBlank(user.getPassword())) { | if (StringUtils.isBlank(user.getUsername()) || StringUtils.isBlank(user.getPassword())) { | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | ||||
| @@ -1,8 +1,7 @@ | |||||
| package com.iformall.controller; | package com.iformall.controller; | ||||
| import com.iformall.annotation.AuthIgnore; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.dto.neuver.GetLanguageDTO; | |||||
| import com.iformall.domain.dto.sm.GetLanguageDTO; | |||||
| import com.iformall.service.sm.VoiceLanguageService; | import com.iformall.service.sm.VoiceLanguageService; | ||||
| import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| @@ -8,8 +8,9 @@ public interface CommonConstants { | |||||
| Integer STATUS_ABNORMAL = 1; | Integer STATUS_ABNORMAL = 1; | ||||
| /** | /** | ||||
| * 删除状态(0:未删除,1:已删除) | |||||
| * 是否:0:否,1:是 | |||||
| * 是否删除状态(0:未删除,1:已删除) | |||||
| */ | */ | ||||
| Integer DEL_FLAG_DELETED = 1; | |||||
| Integer DEL_FLAG_NORMAL = 0; | |||||
| Integer FLAG_TRUE = 1; | |||||
| Integer FLAG_FALSE = 0; | |||||
| } | } | ||||
| @@ -1,4 +1,4 @@ | |||||
| package com.iformall.domain.dto.neuver; | |||||
| package com.iformall.domain.dto.sm; | |||||
| import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
| import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
| @@ -0,0 +1,36 @@ | |||||
| package com.iformall.domain.dto.sm; | |||||
| import com.iformall.common.CommonConstants; | |||||
| import com.iformall.common.IdWorker; | |||||
| import com.iformall.domain.po.sm.ApiGuide; | |||||
| import io.swagger.annotations.ApiModel; | |||||
| import io.swagger.annotations.ApiModelProperty; | |||||
| import lombok.Data; | |||||
| import java.util.Date; | |||||
| @ApiModel(value = "新增API指南") | |||||
| @Data | |||||
| public class SaveApiGuideDTO { | |||||
| @ApiModelProperty("api名称") | |||||
| private String name; | |||||
| @ApiModelProperty("指南内容") | |||||
| private String content; | |||||
| @ApiModelProperty("状态(0:正常,1:锁定)") | |||||
| private Integer status; | |||||
| public static ApiGuide mapping(SaveApiGuideDTO dto) { | |||||
| ApiGuide apiGuide = new ApiGuide(); | |||||
| apiGuide.setId(IdWorker.get().nextId()); | |||||
| apiGuide.setCreateTime(new Date()); | |||||
| apiGuide.setUpdateTime(new Date()); | |||||
| if (CommonConstants.STATUS_NORMAL.equals(dto.getStatus())) { | |||||
| apiGuide.setReleaseTime(new Date()); | |||||
| } | |||||
| apiGuide.setName(dto.getName()); | |||||
| apiGuide.setContent(dto.getContent()); | |||||
| apiGuide.setStatus(dto.getStatus()); | |||||
| apiGuide.setDeleteFlag(CommonConstants.FLAG_FALSE); | |||||
| return apiGuide; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,33 @@ | |||||
| package com.iformall.domain.dto.sm; | |||||
| import com.iformall.common.CommonConstants; | |||||
| import com.iformall.common.IdWorker; | |||||
| import com.iformall.domain.po.sm.ApiMenu; | |||||
| import io.swagger.annotations.ApiModel; | |||||
| import io.swagger.annotations.ApiModelProperty; | |||||
| import lombok.Data; | |||||
| import java.util.Date; | |||||
| @ApiModel(value = "新增API菜单") | |||||
| @Data | |||||
| public class SaveApiMenuDTO { | |||||
| @ApiModelProperty("菜单名称") | |||||
| private String name; | |||||
| @ApiModelProperty("父菜单id") | |||||
| private Long parentId; | |||||
| @ApiModelProperty("状态(0:正常,1:锁定)") | |||||
| private Integer status; | |||||
| public static ApiMenu mapping(SaveApiMenuDTO dto) { | |||||
| ApiMenu apiMenu = new ApiMenu(); | |||||
| apiMenu.setId(IdWorker.get().nextId()); | |||||
| apiMenu.setCreateTime(new Date()); | |||||
| apiMenu.setUpdateTime(new Date()); | |||||
| apiMenu.setName(dto.getName()); | |||||
| apiMenu.setParentId(dto.getParentId()); | |||||
| apiMenu.setStatus(dto.getStatus()); | |||||
| apiMenu.setDeleteFlag(CommonConstants.FLAG_FALSE); | |||||
| return apiMenu; | |||||
| } | |||||
| } | |||||
| @@ -1,4 +1,4 @@ | |||||
| package com.iformall.domain.dto.neuver; | |||||
| package com.iformall.domain.dto.sm; | |||||
| import com.iformall.common.CommonConstants; | import com.iformall.common.CommonConstants; | ||||
| import com.iformall.common.IdWorker; | import com.iformall.common.IdWorker; | ||||
| @@ -1,4 +1,4 @@ | |||||
| package com.iformall.domain.dto.neuver; | |||||
| package com.iformall.domain.dto.sm; | |||||
| import com.iformall.common.IdWorker; | import com.iformall.common.IdWorker; | ||||
| import com.iformall.domain.po.sm.ServiceVideoRecord; | import com.iformall.domain.po.sm.ServiceVideoRecord; | ||||
| @@ -1,4 +1,4 @@ | |||||
| package com.iformall.domain.dto.neuver; | |||||
| package com.iformall.domain.dto.sm; | |||||
| import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
| import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
| @@ -0,0 +1,35 @@ | |||||
| package com.iformall.domain.dto.sm; | |||||
| import com.iformall.common.CommonConstants; | |||||
| import com.iformall.common.IdWorker; | |||||
| import com.iformall.domain.po.sm.ApiGuide; | |||||
| import io.swagger.annotations.ApiModel; | |||||
| import io.swagger.annotations.ApiModelProperty; | |||||
| import lombok.Data; | |||||
| import java.util.Date; | |||||
| @ApiModel(value = "修改API指南") | |||||
| @Data | |||||
| public class UpdateApiGuideDTO { | |||||
| @ApiModelProperty("id") | |||||
| private Long id; | |||||
| @ApiModelProperty("api名称") | |||||
| private String name; | |||||
| @ApiModelProperty("指南内容") | |||||
| private String content; | |||||
| @ApiModelProperty("状态(0:正常,1:锁定)") | |||||
| private Integer status; | |||||
| public static ApiGuide mapping(UpdateApiGuideDTO dto) { | |||||
| ApiGuide apiGuide = new ApiGuide(); | |||||
| apiGuide.setUpdateTime(new Date()); | |||||
| if (CommonConstants.STATUS_NORMAL.equals(dto.getStatus())) { | |||||
| apiGuide.setReleaseTime(new Date()); | |||||
| } | |||||
| apiGuide.setName(dto.getName()); | |||||
| apiGuide.setContent(dto.getContent()); | |||||
| apiGuide.setStatus(dto.getStatus()); | |||||
| return apiGuide; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,33 @@ | |||||
| package com.iformall.domain.dto.sm; | |||||
| import com.iformall.common.CommonConstants; | |||||
| import com.iformall.common.IdWorker; | |||||
| import com.iformall.domain.po.sm.ApiMenu; | |||||
| import io.swagger.annotations.ApiModel; | |||||
| import io.swagger.annotations.ApiModelProperty; | |||||
| import lombok.Data; | |||||
| import java.util.Date; | |||||
| @ApiModel(value = "修改API菜单") | |||||
| @Data | |||||
| public class UpdateApiMenuDTO { | |||||
| @ApiModelProperty("id") | |||||
| private Long id; | |||||
| @ApiModelProperty("菜单名称") | |||||
| private String name; | |||||
| @ApiModelProperty("父菜单id") | |||||
| private Long parentId; | |||||
| @ApiModelProperty("状态(0:正常,1:锁定)") | |||||
| private Integer status; | |||||
| public static ApiMenu mapping(UpdateApiMenuDTO dto) { | |||||
| ApiMenu apiMenu = new ApiMenu(); | |||||
| apiMenu.setId(dto.getId()); | |||||
| apiMenu.setUpdateTime(new Date()); | |||||
| apiMenu.setName(dto.getName()); | |||||
| apiMenu.setParentId(dto.getParentId()); | |||||
| apiMenu.setStatus(dto.getStatus()); | |||||
| return apiMenu; | |||||
| } | |||||
| } | |||||
| @@ -1,6 +1,5 @@ | |||||
| package com.iformall.domain.dto.neuver; | |||||
| package com.iformall.domain.dto.sm; | |||||
| import com.iformall.common.CommonConstants; | |||||
| import com.iformall.domain.po.sm.ServiceInfo; | import com.iformall.domain.po.sm.ServiceInfo; | ||||
| import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
| import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
| @@ -1,4 +1,4 @@ | |||||
| package com.iformall.domain.dto.neuver; | |||||
| package com.iformall.domain.dto.sm; | |||||
| import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
| import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
| @@ -1,8 +1,7 @@ | |||||
| package com.iformall.domain.dto.neuver; | |||||
| package com.iformall.domain.dto.sm; | |||||
| import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
| import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
| import lombok.Builder; | |||||
| import lombok.Data; | import lombok.Data; | ||||
| @ApiModel(value = "更新开放接口秘钥状态") | @ApiModel(value = "更新开放接口秘钥状态") | ||||
| @@ -0,0 +1,101 @@ | |||||
| package com.iformall.domain.po.sm; | |||||
| import com.baomidou.mybatisplus.annotation.IdType; | |||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableId; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import java.io.Serializable; | |||||
| import java.util.Date; | |||||
| import lombok.Data; | |||||
| /** | |||||
| * | |||||
| * @TableName api_detail | |||||
| */ | |||||
| @TableName(value ="api_detail") | |||||
| @Data | |||||
| public class ApiDetail implements Serializable { | |||||
| /** | |||||
| * 详情id | |||||
| */ | |||||
| @TableId | |||||
| private Long id; | |||||
| /** | |||||
| * 创建时间 | |||||
| */ | |||||
| private Date createTime; | |||||
| /** | |||||
| * 修改时间 | |||||
| */ | |||||
| private Date updateTime; | |||||
| /** | |||||
| * 菜单id | |||||
| */ | |||||
| private Long menuId; | |||||
| /** | |||||
| * 菜单名称 | |||||
| */ | |||||
| private String menuName; | |||||
| /** | |||||
| * 是否付费(0:否,1:是) | |||||
| */ | |||||
| private Byte chargeFlag; | |||||
| /** | |||||
| * 是否需用户授权(0:否,1:是) | |||||
| */ | |||||
| private Byte authFlag; | |||||
| /** | |||||
| * 描述 | |||||
| */ | |||||
| private String description; | |||||
| /** | |||||
| * 平台地址 | |||||
| */ | |||||
| private String platformUrl; | |||||
| /** | |||||
| * 系统参数 | |||||
| */ | |||||
| private String publicParam; | |||||
| /** | |||||
| * 请求参数 | |||||
| */ | |||||
| private String requestParam; | |||||
| /** | |||||
| * 响应参数 | |||||
| */ | |||||
| private String responseParam; | |||||
| /** | |||||
| * 请求示例 | |||||
| */ | |||||
| private String requestSample; | |||||
| /** | |||||
| * 响应示例 | |||||
| */ | |||||
| private String responseSample; | |||||
| /** | |||||
| * 异常示例 | |||||
| */ | |||||
| private String exceptionSample; | |||||
| /** | |||||
| * 状态(0:正常,1:锁定) | |||||
| */ | |||||
| private Byte status; | |||||
| @TableField(exist = false) | |||||
| private static final long serialVersionUID = 1L; | |||||
| } | |||||
| @@ -0,0 +1,61 @@ | |||||
| package com.iformall.domain.po.sm; | |||||
| import com.baomidou.mybatisplus.annotation.IdType; | |||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableId; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import java.io.Serializable; | |||||
| import java.util.Date; | |||||
| import lombok.Data; | |||||
| /** | |||||
| * | |||||
| * @TableName api_guide | |||||
| */ | |||||
| @TableName(value ="api_guide") | |||||
| @Data | |||||
| public class ApiGuide implements Serializable { | |||||
| /** | |||||
| * 主键id | |||||
| */ | |||||
| @TableId | |||||
| private Long id; | |||||
| /** | |||||
| * 创建时间 | |||||
| */ | |||||
| private Date createTime; | |||||
| /** | |||||
| * 修改时间 | |||||
| */ | |||||
| private Date updateTime; | |||||
| /** | |||||
| * 发布时间 | |||||
| */ | |||||
| private Date releaseTime; | |||||
| /** | |||||
| * 指南名称 | |||||
| */ | |||||
| private String name; | |||||
| /** | |||||
| * 指南内容 | |||||
| */ | |||||
| private String content; | |||||
| /** | |||||
| * 状态(0:正常,1:锁定) | |||||
| */ | |||||
| private Integer status; | |||||
| /** | |||||
| * 删除(0:未删除,1:删除) | |||||
| */ | |||||
| private Integer deleteFlag; | |||||
| @TableField(exist = false) | |||||
| private static final long serialVersionUID = 1L; | |||||
| } | |||||
| @@ -0,0 +1,61 @@ | |||||
| package com.iformall.domain.po.sm; | |||||
| import com.baomidou.mybatisplus.annotation.IdType; | |||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableId; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import java.io.Serializable; | |||||
| import java.util.Date; | |||||
| import lombok.Data; | |||||
| /** | |||||
| * | |||||
| * @TableName api_menu | |||||
| */ | |||||
| @TableName(value ="api_menu") | |||||
| @Data | |||||
| public class ApiMenu implements Serializable { | |||||
| /** | |||||
| * 菜单id | |||||
| */ | |||||
| @TableId | |||||
| private Long id; | |||||
| /** | |||||
| * 创建时间 | |||||
| */ | |||||
| private Date createTime; | |||||
| /** | |||||
| * 修改时间 | |||||
| */ | |||||
| private Date updateTime; | |||||
| /** | |||||
| * 菜单名称 | |||||
| */ | |||||
| private String name; | |||||
| /** | |||||
| * 父菜单id | |||||
| */ | |||||
| private Long parentId; | |||||
| /** | |||||
| * 状态(0:正常,1:锁定) | |||||
| */ | |||||
| private Integer status; | |||||
| /** | |||||
| * 是否叶子节点(0:否,1:是) | |||||
| */ | |||||
| private Integer leafFlag; | |||||
| /** | |||||
| * 是否删除(0:未删除,1:删除) | |||||
| */ | |||||
| private Integer deleteFlag; | |||||
| @TableField(exist = false) | |||||
| private static final long serialVersionUID = 1L; | |||||
| } | |||||
| @@ -0,0 +1,15 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.iformall.domain.po.sm.ApiDetail; | |||||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
| /** | |||||
| * @Entity com.iformall.domain.po.sm.ApiDetail | |||||
| */ | |||||
| public interface ApiDetailMapper extends BaseMapper<ApiDetail> { | |||||
| } | |||||
| @@ -0,0 +1,18 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.iformall.domain.po.sm.ApiGuide; | |||||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
| import java.util.List; | |||||
| /** | |||||
| * @Entity com.iformall.domain.po.sm.ApiGuide | |||||
| */ | |||||
| public interface ApiGuideMapper extends BaseMapper<ApiGuide> { | |||||
| List<ApiGuide> listApiGuide(ApiGuide apiGuide); | |||||
| } | |||||
| @@ -0,0 +1,18 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.iformall.domain.po.sm.ApiMenu; | |||||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
| import java.util.List; | |||||
| /** | |||||
| * @Entity com.iformall.domain.po.sm.ApiMenu | |||||
| */ | |||||
| public interface ApiMenuMapper extends BaseMapper<ApiMenu> { | |||||
| List<ApiMenu> listApiMenu(ApiMenu apiMenu); | |||||
| } | |||||
| @@ -1,8 +1,8 @@ | |||||
| package com.iformall.service; | package com.iformall.service; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.domain.dto.neuver.SaveThirdPartyApiDTO; | |||||
| import com.iformall.domain.dto.neuver.UpdateThirdPartyApiStatusDTO; | |||||
| import com.iformall.domain.dto.sm.SaveThirdPartyApiDTO; | |||||
| import com.iformall.domain.dto.sm.UpdateThirdPartyApiStatusDTO; | |||||
| import com.iformall.domain.po.WxThirdPartyApi; | import com.iformall.domain.po.WxThirdPartyApi; | ||||
| import java.util.List; | import java.util.List; | ||||
| @@ -8,8 +8,8 @@ import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.common.CommonConstants; | import com.iformall.common.CommonConstants; | ||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| import com.iformall.common.IdWorker; | import com.iformall.common.IdWorker; | ||||
| import com.iformall.domain.dto.neuver.SaveThirdPartyApiDTO; | |||||
| import com.iformall.domain.dto.neuver.UpdateThirdPartyApiStatusDTO; | |||||
| import com.iformall.domain.dto.sm.SaveThirdPartyApiDTO; | |||||
| import com.iformall.domain.dto.sm.UpdateThirdPartyApiStatusDTO; | |||||
| import com.iformall.domain.po.WxThirdPartyApi; | import com.iformall.domain.po.WxThirdPartyApi; | ||||
| import com.iformall.domain.po.sm.ServiceInfo; | import com.iformall.domain.po.sm.ServiceInfo; | ||||
| import com.iformall.exception.BizException; | import com.iformall.exception.BizException; | ||||
| @@ -0,0 +1,12 @@ | |||||
| package com.iformall.service.sm; | |||||
| import com.iformall.domain.po.sm.ApiDetail; | |||||
| import com.baomidou.mybatisplus.extension.service.IService; | |||||
| /** | |||||
| * | |||||
| */ | |||||
| public interface ApiDetailService extends IService<ApiDetail> { | |||||
| ApiDetail getApiDetail(Long id); | |||||
| } | |||||
| @@ -0,0 +1,19 @@ | |||||
| package com.iformall.service.sm; | |||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.domain.dto.sm.SaveApiGuideDTO; | |||||
| import com.iformall.domain.dto.sm.UpdateApiGuideDTO; | |||||
| import com.iformall.domain.po.sm.ApiGuide; | |||||
| import com.baomidou.mybatisplus.extension.service.IService; | |||||
| /** | |||||
| * | |||||
| */ | |||||
| public interface ApiGuideService extends IService<ApiGuide> { | |||||
| PageInfo<ApiGuide> pageApiGuide(ApiGuide apiGuide, Integer pageNum, Integer pageSize); | |||||
| void saveApiGuide(SaveApiGuideDTO dto); | |||||
| void updateApiGuide(UpdateApiGuideDTO dto); | |||||
| } | |||||
| @@ -0,0 +1,19 @@ | |||||
| package com.iformall.service.sm; | |||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.domain.dto.sm.SaveApiMenuDTO; | |||||
| import com.iformall.domain.dto.sm.UpdateApiMenuDTO; | |||||
| import com.iformall.domain.po.sm.ApiMenu; | |||||
| import com.baomidou.mybatisplus.extension.service.IService; | |||||
| /** | |||||
| * | |||||
| */ | |||||
| public interface ApiMenuService extends IService<ApiMenu> { | |||||
| PageInfo<ApiMenu> pageApiMenu(ApiMenu apiMenu, Integer pageNum, Integer pageSize); | |||||
| void saveApiMenu(SaveApiMenuDTO dto); | |||||
| void updateApiMenu(UpdateApiMenuDTO dto); | |||||
| } | |||||
| @@ -1,9 +1,9 @@ | |||||
| package com.iformall.service.sm; | package com.iformall.service.sm; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.domain.dto.neuver.SaveServiceInfoDTO; | |||||
| import com.iformall.domain.dto.neuver.UpdateServiceInfoDTO; | |||||
| import com.iformall.domain.dto.neuver.UpdateServiceInfoStatusDTO; | |||||
| import com.iformall.domain.dto.sm.SaveServiceInfoDTO; | |||||
| import com.iformall.domain.dto.sm.UpdateServiceInfoDTO; | |||||
| import com.iformall.domain.dto.sm.UpdateServiceInfoStatusDTO; | |||||
| import com.iformall.domain.po.sm.ServiceInfo; | import com.iformall.domain.po.sm.ServiceInfo; | ||||
| import com.iformall.domain.vo.neuver.PageServiceInfoVO; | import com.iformall.domain.vo.neuver.PageServiceInfoVO; | ||||
| @@ -1,6 +1,6 @@ | |||||
| package com.iformall.service.sm; | package com.iformall.service.sm; | ||||
| import com.iformall.domain.dto.neuver.SaveServiceVideoRecordDTO; | |||||
| import com.iformall.domain.dto.sm.SaveServiceVideoRecordDTO; | |||||
| /** | /** | ||||
| * @author xmzhao71 | * @author xmzhao71 | ||||
| @@ -0,0 +1,26 @@ | |||||
| package com.iformall.service.sm.impl; | |||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||
| import com.iformall.domain.po.sm.ApiDetail; | |||||
| import com.iformall.service.sm.ApiDetailService; | |||||
| import com.iformall.mapper.ApiDetailMapper; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | |||||
| /** | |||||
| * | |||||
| */ | |||||
| @Service | |||||
| public class ApiDetailServiceImpl extends ServiceImpl<ApiDetailMapper, ApiDetail> implements ApiDetailService{ | |||||
| @Autowired | |||||
| private ApiDetailMapper apiDetailMapper; | |||||
| @Override | |||||
| public ApiDetail getApiDetail(Long id) { | |||||
| return null; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,43 @@ | |||||
| package com.iformall.service.sm.impl; | |||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||
| import com.github.pagehelper.PageHelper; | |||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.domain.dto.sm.SaveApiGuideDTO; | |||||
| import com.iformall.domain.dto.sm.UpdateApiGuideDTO; | |||||
| import com.iformall.domain.po.sm.ApiGuide; | |||||
| import com.iformall.service.sm.ApiGuideService; | |||||
| import com.iformall.mapper.ApiGuideMapper; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | |||||
| /** | |||||
| * | |||||
| */ | |||||
| @Service | |||||
| public class ApiGuideServiceImpl extends ServiceImpl<ApiGuideMapper, ApiGuide> implements ApiGuideService{ | |||||
| @Autowired | |||||
| private ApiGuideMapper apiGuideMapper; | |||||
| @Override | |||||
| public PageInfo<ApiGuide> pageApiGuide(ApiGuide apiGuide, Integer pageNum, Integer pageSize) { | |||||
| return PageHelper.startPage(pageNum, pageSize).doSelectPageInfo(() -> apiGuideMapper.listApiGuide(apiGuide)); | |||||
| } | |||||
| @Override | |||||
| public void saveApiGuide(SaveApiGuideDTO dto) { | |||||
| ApiGuide apiGuide = SaveApiGuideDTO.mapping(dto); | |||||
| apiGuideMapper.insert(apiGuide); | |||||
| } | |||||
| @Override | |||||
| public void updateApiGuide(UpdateApiGuideDTO dto) { | |||||
| ApiGuide apiGuide = UpdateApiGuideDTO.mapping(dto); | |||||
| apiGuideMapper.updateById(apiGuide); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,43 @@ | |||||
| package com.iformall.service.sm.impl; | |||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||
| import com.github.pagehelper.PageHelper; | |||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.domain.dto.sm.SaveApiMenuDTO; | |||||
| import com.iformall.domain.dto.sm.UpdateApiMenuDTO; | |||||
| import com.iformall.domain.po.sm.ApiMenu; | |||||
| import com.iformall.service.sm.ApiMenuService; | |||||
| import com.iformall.mapper.ApiMenuMapper; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | |||||
| /** | |||||
| * | |||||
| */ | |||||
| @Service | |||||
| public class ApiMenuServiceImpl extends ServiceImpl<ApiMenuMapper, ApiMenu> implements ApiMenuService{ | |||||
| @Autowired | |||||
| private ApiMenuMapper apiMenuMapper; | |||||
| @Override | |||||
| public PageInfo<ApiMenu> pageApiMenu(ApiMenu apiMenu, Integer pageNum, Integer pageSize) { | |||||
| return PageHelper.startPage(pageNum, pageSize).doSelectPageInfo(() -> apiMenuMapper.listApiMenu(apiMenu)); | |||||
| } | |||||
| @Override | |||||
| public void saveApiMenu(SaveApiMenuDTO dto) { | |||||
| ApiMenu apiMenu = SaveApiMenuDTO.mapping(dto); | |||||
| apiMenuMapper.insert(apiMenu); | |||||
| } | |||||
| @Override | |||||
| public void updateApiMenu(UpdateApiMenuDTO dto) { | |||||
| ApiMenu apiMenu = UpdateApiMenuDTO.mapping(dto); | |||||
| apiMenuMapper.updateById(apiMenu); | |||||
| } | |||||
| } | |||||
| @@ -6,7 +6,7 @@ import com.github.pagehelper.PageHelper; | |||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.common.CommonConstants; | import com.iformall.common.CommonConstants; | ||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| import com.iformall.domain.dto.neuver.*; | |||||
| import com.iformall.domain.dto.sm.*; | |||||
| import com.iformall.domain.po.WxThirdPartyApi; | import com.iformall.domain.po.WxThirdPartyApi; | ||||
| import com.iformall.domain.po.sm.ServiceInfo; | import com.iformall.domain.po.sm.ServiceInfo; | ||||
| import com.iformall.exception.BizException; | import com.iformall.exception.BizException; | ||||
| @@ -18,8 +18,6 @@ import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
| import org.springframework.transaction.annotation.Transactional; | import org.springframework.transaction.annotation.Transactional; | ||||
| import java.util.Optional; | |||||
| @Service | @Service | ||||
| public class ServiceInfoServiceImpl implements ServiceInfoService { | public class ServiceInfoServiceImpl implements ServiceInfoService { | ||||
| @@ -35,7 +33,7 @@ public class ServiceInfoServiceImpl implements ServiceInfoService { | |||||
| public void saveServiceInfo(SaveServiceInfoDTO dto) { | public void saveServiceInfo(SaveServiceInfoDTO dto) { | ||||
| // 校验 | // 校验 | ||||
| ServiceInfo serviceInfo = serviceInfoMapper.selectOne(new LambdaQueryWrapper<ServiceInfo>() | ServiceInfo serviceInfo = serviceInfoMapper.selectOne(new LambdaQueryWrapper<ServiceInfo>() | ||||
| .eq(ServiceInfo::getDelFlag, CommonConstants.DEL_FLAG_NORMAL) | |||||
| .eq(ServiceInfo::getDelFlag, CommonConstants.FLAG_FALSE) | |||||
| .eq(ServiceInfo::getCode, dto.getCode())); | .eq(ServiceInfo::getCode, dto.getCode())); | ||||
| if (serviceInfo != null) { | if (serviceInfo != null) { | ||||
| throw new BizException(ErrorCode.CODE_ALREADY_EXISTS); | throw new BizException(ErrorCode.CODE_ALREADY_EXISTS); | ||||
| @@ -1,7 +1,6 @@ | |||||
| package com.iformall.service.sm.impl; | package com.iformall.service.sm.impl; | ||||
| import com.iformall.domain.dto.neuver.SaveServiceVideoRecordDTO; | |||||
| import com.iformall.domain.po.sm.ServiceVideoRecord; | |||||
| import com.iformall.domain.dto.sm.SaveServiceVideoRecordDTO; | |||||
| import com.iformall.mapper.ServiceVideoRecordMapper; | import com.iformall.mapper.ServiceVideoRecordMapper; | ||||
| import com.iformall.service.sm.ServiceVideoRecordService; | import com.iformall.service.sm.ServiceVideoRecordService; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| @@ -0,0 +1,34 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <!DOCTYPE mapper | |||||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||||
| <mapper namespace="com.iformall.mapper.ApiDetailMapper"> | |||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.sm.ApiDetail"> | |||||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||||
| <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> | |||||
| <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> | |||||
| <result property="menuId" column="menu_id" jdbcType="BIGINT"/> | |||||
| <result property="menuName" column="menu_name" jdbcType="VARCHAR"/> | |||||
| <result property="chargeFlag" column="charge_flag" jdbcType="TINYINT"/> | |||||
| <result property="authFlag" column="auth_flag" jdbcType="TINYINT"/> | |||||
| <result property="description" column="description" jdbcType="VARCHAR"/> | |||||
| <result property="platformUrl" column="platform_url" jdbcType="VARCHAR"/> | |||||
| <result property="publicParam" column="public_param" jdbcType="VARCHAR"/> | |||||
| <result property="requestParam" column="request_param" jdbcType="VARCHAR"/> | |||||
| <result property="responseParam" column="response_param" jdbcType="VARCHAR"/> | |||||
| <result property="requestSample" column="request_sample" jdbcType="VARCHAR"/> | |||||
| <result property="responseSample" column="response_sample" jdbcType="VARCHAR"/> | |||||
| <result property="exceptionSample" column="exception_sample" jdbcType="VARCHAR"/> | |||||
| <result property="status" column="status" jdbcType="TINYINT"/> | |||||
| </resultMap> | |||||
| <sql id="Base_Column_List"> | |||||
| id,create_time,update_time, | |||||
| menu_id,menu_name,charge_flag, | |||||
| auth_flag,description,platform_url, | |||||
| public_param,request_param,response_param, | |||||
| request_sample,response_sample,exception_sample, | |||||
| status | |||||
| </sql> | |||||
| </mapper> | |||||
| @@ -0,0 +1,43 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <!DOCTYPE mapper | |||||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||||
| <mapper namespace="com.iformall.mapper.ApiGuideMapper"> | |||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.sm.ApiGuide"> | |||||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||||
| <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> | |||||
| <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> | |||||
| <result property="releaseTime" column="release_time" jdbcType="TIMESTAMP"/> | |||||
| <result property="name" column="name" jdbcType="VARCHAR"/> | |||||
| <result property="content" column="content" jdbcType="VARCHAR"/> | |||||
| <result property="status" column="status" jdbcType="TINYINT"/> | |||||
| <result property="deleteFlag" column="delete_flag" jdbcType="TINYINT"/> | |||||
| </resultMap> | |||||
| <sql id="Base_Column_List"> | |||||
| id,create_time,update_time, | |||||
| release_time,name,content, | |||||
| status,delete_flag | |||||
| </sql> | |||||
| <sql id="dynamicWhereConditions"> | |||||
| WHERE 1 = 1 | |||||
| <if test=" null != id "> | |||||
| and `id` = #{id} | |||||
| </if> | |||||
| <if test=" null != name and '' != name "> | |||||
| and `name` = #{name} | |||||
| </if> | |||||
| <if test=" null != status "> | |||||
| and `status = #{status} | |||||
| </if> | |||||
| </sql> | |||||
| <select id="listApiGuide" resultType="com.iformall.domain.po.sm.ApiGuide"> | |||||
| SELECT | |||||
| <include refid="Base_Column_List"/> | |||||
| FROM api_guide | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| </mapper> | |||||
| @@ -0,0 +1,46 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <!DOCTYPE mapper | |||||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||||
| <mapper namespace="com.iformall.mapper.ApiMenuMapper"> | |||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.sm.ApiMenu"> | |||||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||||
| <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> | |||||
| <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> | |||||
| <result property="name" column="name" jdbcType="VARCHAR"/> | |||||
| <result property="parentId" column="parent_id" jdbcType="BIGINT"/> | |||||
| <result property="status" column="status" jdbcType="TINYINT"/> | |||||
| <result property="leafFlag" column="leaf_flag" jdbcType="TINYINT"/> | |||||
| <result property="deleteFlag" column="delete_flag" jdbcType="TINYINT"/> | |||||
| </resultMap> | |||||
| <sql id="Base_Column_List"> | |||||
| id,create_time,update_time, | |||||
| name,parent_id,status, | |||||
| leaf_flag,delete_flag | |||||
| </sql> | |||||
| <sql id="dynamicWhereConditions"> | |||||
| WHERE 1 = 1 | |||||
| <if test=" null != id "> | |||||
| and `id` = #{id} | |||||
| </if> | |||||
| <if test=" null != parentId and '' != parentId "> | |||||
| and `parent_id` = #{parentId} | |||||
| </if> | |||||
| <if test=" null != name and '' != name "> | |||||
| and `name` = #{name} | |||||
| </if> | |||||
| <if test=" null != status "> | |||||
| and `status = #{status} | |||||
| </if> | |||||
| </sql> | |||||
| <select id="listApiMenu" resultType="com.iformall.domain.po.sm.ApiMenu"> | |||||
| SELECT | |||||
| <include refid="Base_Column_List"/> | |||||
| FROM api_menu | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| </mapper> | |||||