代码模块调整,同一appcode处理方式
This commit is contained in:
parent
ba14fe4856
commit
bccdfab4ba
7
pom.xml
7
pom.xml
@ -168,12 +168,6 @@
|
||||
<version>${sf.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.smarterFramework</groupId>
|
||||
<artifactId>sf-order</artifactId>
|
||||
<version>${sf.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.smarterFramework</groupId>
|
||||
<artifactId>sf-payment</artifactId>
|
||||
@ -232,7 +226,6 @@
|
||||
<module>sf-oauth</module>
|
||||
<module>sf-payment</module>
|
||||
<module>sf-service</module>
|
||||
<module>sf-order</module>
|
||||
<module>sf-vertx</module>
|
||||
<module>sf-vertx-api</module>
|
||||
</modules>
|
||||
|
@ -66,11 +66,6 @@
|
||||
<artifactId>sf-oauth</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.smarterFramework</groupId>
|
||||
<artifactId>sf-order</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.smarterFramework</groupId>
|
||||
<artifactId>sf-payment</artifactId>
|
||||
|
@ -5,7 +5,7 @@ package com.sf.common.exception;
|
||||
*
|
||||
* @author ztzh
|
||||
*/
|
||||
public final class ServiceException extends RuntimeException
|
||||
public class ServiceException extends RuntimeException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -1,27 +0,0 @@
|
||||
package com.sf.common.utils;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* 功能描述: 应用工具类
|
||||
*
|
||||
* @author a_kun
|
||||
* @date 2024/4/22 15:48
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class AppUtils {
|
||||
|
||||
public static String getAppCodeFromRequestHeader(){
|
||||
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
HttpServletRequest request = servletRequestAttributes.getRequest();
|
||||
return request.getHeader("appCode");
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
package com.sf.common.utils.http;
|
||||
|
||||
import com.sf.common.utils.StringUtils;
|
||||
import org.springframework.web.context.request.RequestAttributes;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
@ -9,17 +8,9 @@ import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public class RequestUtils {
|
||||
|
||||
public static String getHeader(String code){
|
||||
HttpServletRequest request = null;
|
||||
try {
|
||||
RequestAttributes requestAttributes1 = RequestContextHolder.getRequestAttributes();
|
||||
request = ((ServletRequestAttributes) requestAttributes1).getRequest();
|
||||
} catch (Exception e) {
|
||||
throw new SecurityException("获取header中获取appCode信息");
|
||||
}
|
||||
if(StringUtils.isBlank(request.getHeader(code))){
|
||||
throw new SecurityException("参数异常appCode为空");
|
||||
}
|
||||
return request.getHeader(code);
|
||||
public static String getHeader(String key) {
|
||||
RequestAttributes requestAttributes1 = RequestContextHolder.getRequestAttributes();
|
||||
HttpServletRequest request = ((ServletRequestAttributes) requestAttributes1).getRequest();
|
||||
return request.getHeader(key);
|
||||
}
|
||||
}
|
||||
|
@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>smarterFramework</artifactId>
|
||||
<groupId>com.smarterFramework</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>sf-order</artifactId>
|
||||
|
||||
<description>
|
||||
订单模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.smarterFramework</groupId>
|
||||
<artifactId>sf-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.smarterFramework</groupId>
|
||||
<artifactId>sf-framework</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -26,10 +26,6 @@
|
||||
<groupId>com.smarterFramework</groupId>
|
||||
<artifactId>sf-framework</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.smarterFramework</groupId>
|
||||
<artifactId>sf-order</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.smarterFramework</groupId>
|
||||
<artifactId>sf-service</artifactId>
|
||||
|
@ -8,13 +8,12 @@ import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.auth0.jwt.JWT;
|
||||
import com.auth0.jwt.interfaces.DecodedJWT;
|
||||
import com.sf.common.enums.RequestHeaderEnums;
|
||||
import com.sf.common.utils.DateUtils;
|
||||
import com.sf.common.utils.SecurityUtils;
|
||||
import com.sf.common.utils.SnowflakeIdWorker;
|
||||
import com.sf.common.utils.http.RequestUtils;
|
||||
import com.sf.order.domain.OrderInfo;
|
||||
import com.sf.order.service.IOrderInfoService;
|
||||
import com.sf.service.index.utils.AppUtils;
|
||||
import com.sf.service.order.domain.OrderInfo;
|
||||
import com.sf.service.order.service.IOrderInfoService;
|
||||
import com.sf.payment.config.HuaweiPaymentConfig;
|
||||
import com.sf.payment.constant.GoodsConstants;
|
||||
import com.sf.payment.domain.*;
|
||||
@ -218,7 +217,7 @@ public class HuaweiPaymentServiceImpl implements IHuaweiPaymentService {
|
||||
private void createOrder(PurchaseOrderPayload appPurchaseOrderPayload, GoodsMessages goods) {
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
OrderInfo orderInfo = new OrderInfo();
|
||||
orderInfo.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
orderInfo.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
orderInfo.setOrderNo(snowflakeIdWorker.nextId());
|
||||
orderInfo.setOrderStatus(4L);
|
||||
orderInfo.setPayType(1L);
|
||||
|
@ -1,15 +1,10 @@
|
||||
package com.sf.system.deployment.controller;
|
||||
package com.sf.service.deployment.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletRequestAttributeEvent;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.sf.common.enums.RequestHeaderEnums;
|
||||
import com.sf.common.utils.StringUtils;
|
||||
import com.sf.common.utils.http.RequestUtils;
|
||||
import com.sf.system.deployment.domain.DeploymentApplyEnvironment;
|
||||
import com.sf.service.deployment.domain.DeploymentApplyEnvironment;
|
||||
import com.sf.service.index.utils.AppUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -24,23 +19,19 @@ import com.sf.common.annotation.Log;
|
||||
import com.sf.common.core.controller.BaseController;
|
||||
import com.sf.common.core.domain.AjaxResult;
|
||||
import com.sf.common.enums.BusinessType;
|
||||
import com.sf.deployment.service.IDeploymentApplyEnvironmentService;
|
||||
import com.sf.service.deployment.service.IDeploymentApplyEnvironmentService;
|
||||
import com.sf.common.utils.poi.ExcelUtil;
|
||||
import com.sf.common.core.page.TableDataInfo;
|
||||
import org.springframework.web.context.request.RequestAttributes;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
/**
|
||||
* 环境维护Controller
|
||||
*
|
||||
*
|
||||
* @author ztzh
|
||||
* @date 2024-04-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/deployment/environment")
|
||||
public class DeploymentApplyEnvironmentController extends BaseController
|
||||
{
|
||||
public class DeploymentApplyEnvironmentController extends BaseController {
|
||||
@Autowired
|
||||
private IDeploymentApplyEnvironmentService deploymentApplyEnvironmentService;
|
||||
|
||||
@ -49,9 +40,8 @@ public class DeploymentApplyEnvironmentController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('deployment:environment:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DeploymentApplyEnvironment deploymentApplyEnvironment)
|
||||
{
|
||||
deploymentApplyEnvironment.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
public TableDataInfo list(DeploymentApplyEnvironment deploymentApplyEnvironment) {
|
||||
deploymentApplyEnvironment.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
startPage();
|
||||
List<DeploymentApplyEnvironment> list = deploymentApplyEnvironmentService.selectDeploymentApplyEnvironmentList(deploymentApplyEnvironment);
|
||||
return getDataTable(list);
|
||||
@ -63,8 +53,7 @@ public class DeploymentApplyEnvironmentController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('deployment:environment:export')")
|
||||
@Log(title = "环境维护", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DeploymentApplyEnvironment deploymentApplyEnvironment)
|
||||
{
|
||||
public void export(HttpServletResponse response, DeploymentApplyEnvironment deploymentApplyEnvironment) {
|
||||
List<DeploymentApplyEnvironment> list = deploymentApplyEnvironmentService.selectDeploymentApplyEnvironmentList(deploymentApplyEnvironment);
|
||||
ExcelUtil<DeploymentApplyEnvironment> util = new ExcelUtil<DeploymentApplyEnvironment>(DeploymentApplyEnvironment.class);
|
||||
util.exportExcel(response, list, "环境维护数据");
|
||||
@ -75,8 +64,7 @@ public class DeploymentApplyEnvironmentController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('deployment:environment:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(deploymentApplyEnvironmentService.selectDeploymentApplyEnvironmentById(id));
|
||||
}
|
||||
|
||||
@ -86,9 +74,8 @@ public class DeploymentApplyEnvironmentController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('deployment:environment:add')")
|
||||
@Log(title = "环境维护", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DeploymentApplyEnvironment deploymentApplyEnvironment)
|
||||
{
|
||||
deploymentApplyEnvironment.setAppCode( RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
public AjaxResult add(@RequestBody DeploymentApplyEnvironment deploymentApplyEnvironment) {
|
||||
deploymentApplyEnvironment.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
return toAjax(deploymentApplyEnvironmentService.insertDeploymentApplyEnvironment(deploymentApplyEnvironment));
|
||||
}
|
||||
|
||||
@ -98,8 +85,7 @@ public class DeploymentApplyEnvironmentController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('deployment:environment:edit')")
|
||||
@Log(title = "环境维护", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DeploymentApplyEnvironment deploymentApplyEnvironment)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody DeploymentApplyEnvironment deploymentApplyEnvironment) {
|
||||
return toAjax(deploymentApplyEnvironmentService.updateDeploymentApplyEnvironment(deploymentApplyEnvironment));
|
||||
}
|
||||
|
||||
@ -108,9 +94,8 @@ public class DeploymentApplyEnvironmentController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('deployment:environment:remove')")
|
||||
@Log(title = "环境维护", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(deploymentApplyEnvironmentService.deleteDeploymentApplyEnvironmentByIds(ids));
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.sf.system.deployment.controller;
|
||||
package com.sf.service.deployment.controller;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
@ -6,12 +6,16 @@ import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.sf.common.core.redis.RedisCache;
|
||||
import com.sf.common.enums.RequestHeaderEnums;
|
||||
import com.sf.common.utils.http.RequestUtils;
|
||||
import com.sf.common.utils.openssl.AES256Util;
|
||||
import com.sf.common.utils.uuid.UUID;
|
||||
import com.sf.system.deployment.domain.rqs.ModuleListByCoreRequest;
|
||||
import com.sf.service.deployment.domain.DeploymentModuleList;
|
||||
import com.sf.service.deployment.domain.rqs.ModuleListByCoreRequest;
|
||||
import com.sf.service.deployment.service.IDeploymentModuleListService;
|
||||
import com.sf.service.index.utils.AppUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
@ -27,8 +31,6 @@ import com.sf.common.annotation.Log;
|
||||
import com.sf.common.core.controller.BaseController;
|
||||
import com.sf.common.core.domain.AjaxResult;
|
||||
import com.sf.common.enums.BusinessType;
|
||||
import com.sf.system.deployment.domain.DeploymentModuleList;
|
||||
import com.sf.system.deployment.service.IDeploymentModuleListService;
|
||||
import com.sf.common.utils.poi.ExcelUtil;
|
||||
import com.sf.common.core.page.TableDataInfo;
|
||||
|
||||
@ -52,7 +54,7 @@ public class DeploymentModuleListController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('deployment:module:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DeploymentModuleList deploymentModuleList) {
|
||||
deploymentModuleList.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
deploymentModuleList.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
startPage();
|
||||
List<DeploymentModuleList> list = deploymentModuleListService.selectDeploymentModuleListList(deploymentModuleList);
|
||||
return getDataTable(list);
|
||||
@ -64,7 +66,7 @@ public class DeploymentModuleListController extends BaseController {
|
||||
@GetMapping("/qurey/list")
|
||||
public AjaxResult queryByCore(ModuleListByCoreRequest request) {
|
||||
DeploymentModuleList deploymentModuleList = new DeploymentModuleList();
|
||||
deploymentModuleList.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
deploymentModuleList.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
deploymentModuleList.setSysType(request.getSysType());
|
||||
List<DeploymentModuleList> list = deploymentModuleListService.selectDeploymentModuleListList(deploymentModuleList);
|
||||
return success(list);
|
||||
@ -76,14 +78,12 @@ public class DeploymentModuleListController extends BaseController {
|
||||
@GetMapping("/qurey/file")
|
||||
public AjaxResult queryByCore(ModuleListByCoreRequest request, HttpServletResponse response) {
|
||||
DeploymentModuleList deploymentModuleList = new DeploymentModuleList();
|
||||
deploymentModuleList.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
deploymentModuleList.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
String authorization = RequestUtils.getHeader(RequestHeaderEnums.AUTHORIZATION.getCode());
|
||||
deploymentModuleList.setSysType(request.getSysType());
|
||||
deploymentModuleList.setModuleType(request.getModuleType());
|
||||
List<DeploymentModuleList> list = deploymentModuleListService.selectDeploymentModuleListList(deploymentModuleList);
|
||||
if (list.isEmpty() && null == list.get(0)) {
|
||||
throw new SecurityException("无可用模块包");
|
||||
}
|
||||
Assert.notEmpty(list,"无可用模块包");
|
||||
try {
|
||||
String password = UUID.randomUUID().toString().trim().replaceAll("-", "");
|
||||
//加密
|
||||
@ -104,7 +104,7 @@ public class DeploymentModuleListController extends BaseController {
|
||||
String authorization = RequestUtils.getHeader(RequestHeaderEnums.AUTHORIZATION.getCode());
|
||||
String cacheObject = redisCache.getCacheObject(authorization + request.getModuleType());
|
||||
return success(UUID.randomUUID().toString().trim().replaceAll("-", "") + cacheObject + UUID.randomUUID().toString().trim().replaceAll("-", ""))
|
||||
;
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@ -136,7 +136,7 @@ public class DeploymentModuleListController extends BaseController {
|
||||
@Log(title = "H5模块包", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DeploymentModuleList deploymentModuleList) {
|
||||
deploymentModuleList.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
deploymentModuleList.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
return toAjax(deploymentModuleListService.insertDeploymentModuleList(deploymentModuleList));
|
||||
}
|
||||
|
@ -1,17 +1,14 @@
|
||||
package com.sf.system.deployment.controller;
|
||||
package com.sf.service.deployment.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.sf.common.enums.RequestHeaderEnums;
|
||||
import com.sf.common.utils.DateUtils;
|
||||
import com.sf.common.utils.StringUtils;
|
||||
import com.sf.common.utils.http.RequestUtils;
|
||||
import com.sf.system.deployment.domain.DeploymentServicePublish;
|
||||
import com.sf.system.deployment.service.IDeploymentServicePublishService;
|
||||
import com.sf.service.deployment.domain.DeploymentServicePublish;
|
||||
import com.sf.service.deployment.service.IDeploymentServicePublishService;
|
||||
import com.sf.service.index.utils.AppUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.unit.DataUnit;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
@ -29,14 +26,13 @@ import com.sf.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 发布列表Controller
|
||||
*
|
||||
*
|
||||
* @author ztzh
|
||||
* @date 2024-04-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/deployment/publish")
|
||||
public class DeploymentServicePublishController extends BaseController
|
||||
{
|
||||
public class DeploymentServicePublishController extends BaseController {
|
||||
@Autowired
|
||||
private IDeploymentServicePublishService deploymentServicePublishService;
|
||||
|
||||
@ -45,9 +41,8 @@ public class DeploymentServicePublishController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('deployment:publish:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DeploymentServicePublish deploymentServicePublish)
|
||||
{
|
||||
deploymentServicePublish.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
public TableDataInfo list(DeploymentServicePublish deploymentServicePublish) {
|
||||
deploymentServicePublish.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
startPage();
|
||||
List<DeploymentServicePublish> list = deploymentServicePublishService.selectDeploymentServicePublishList(deploymentServicePublish);
|
||||
return getDataTable(list);
|
||||
@ -59,8 +54,7 @@ public class DeploymentServicePublishController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('deployment:publish:export')")
|
||||
@Log(title = "发布列表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DeploymentServicePublish deploymentServicePublish)
|
||||
{
|
||||
public void export(HttpServletResponse response, DeploymentServicePublish deploymentServicePublish) {
|
||||
List<DeploymentServicePublish> list = deploymentServicePublishService.selectDeploymentServicePublishList(deploymentServicePublish);
|
||||
ExcelUtil<DeploymentServicePublish> util = new ExcelUtil<DeploymentServicePublish>(DeploymentServicePublish.class);
|
||||
util.exportExcel(response, list, "发布列表数据");
|
||||
@ -71,8 +65,7 @@ public class DeploymentServicePublishController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('deployment:publish:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(deploymentServicePublishService.selectDeploymentServicePublishById(id));
|
||||
}
|
||||
|
||||
@ -82,9 +75,8 @@ public class DeploymentServicePublishController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('deployment:publish:add')")
|
||||
@Log(title = "发布列表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DeploymentServicePublish deploymentServicePublish)
|
||||
{
|
||||
deploymentServicePublish.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
public AjaxResult add(@RequestBody DeploymentServicePublish deploymentServicePublish) {
|
||||
deploymentServicePublish.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
return toAjax(deploymentServicePublishService.insertDeploymentServicePublish(deploymentServicePublish));
|
||||
}
|
||||
|
||||
@ -94,8 +86,7 @@ public class DeploymentServicePublishController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('deployment:publish:edit')")
|
||||
@Log(title = "发布列表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DeploymentServicePublish deploymentServicePublish)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody DeploymentServicePublish deploymentServicePublish) {
|
||||
return toAjax(deploymentServicePublishService.updateDeploymentServicePublish(deploymentServicePublish));
|
||||
}
|
||||
|
||||
@ -104,9 +95,8 @@ public class DeploymentServicePublishController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('deployment:publish:remove')")
|
||||
@Log(title = "发布列表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(deploymentServicePublishService.deleteDeploymentServicePublishByIds(ids));
|
||||
}
|
||||
|
||||
@ -127,8 +117,7 @@ public class DeploymentServicePublishController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('deployment:publish:sold:out')")
|
||||
@GetMapping(value = "/sold/out/{id}")
|
||||
public AjaxResult soldOut(@PathVariable("id") Long id)
|
||||
{
|
||||
public AjaxResult soldOut(@PathVariable("id") Long id) {
|
||||
DeploymentServicePublish deploymentServicePublish = deploymentServicePublishService.selectDeploymentServicePublishById(id);
|
||||
// deploymentServicePublish.setUpdateBy(getUsername());
|
||||
deploymentServicePublish.setUpdateTime(DateUtils.getNowDate());
|
@ -1,12 +1,11 @@
|
||||
package com.sf.system.deployment.controller;
|
||||
package com.sf.service.deployment.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.sf.common.enums.RequestHeaderEnums;
|
||||
import com.sf.common.utils.http.RequestUtils;
|
||||
import com.sf.system.deployment.domain.DeploymentWhitelistInfo;
|
||||
import com.sf.system.deployment.service.IDeploymentWhitelistInfoService;
|
||||
import com.sf.service.deployment.domain.DeploymentWhitelistInfo;
|
||||
import com.sf.service.deployment.service.IDeploymentWhitelistInfoService;
|
||||
import com.sf.service.index.utils.AppUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -26,14 +25,13 @@ import com.sf.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 白名单列表Controller
|
||||
*
|
||||
*
|
||||
* @author ztzh
|
||||
* @date 2024-05-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/deployment/whitelist")
|
||||
public class DeploymentWhitelistInfoController extends BaseController
|
||||
{
|
||||
public class DeploymentWhitelistInfoController extends BaseController {
|
||||
@Autowired
|
||||
private IDeploymentWhitelistInfoService deploymentWhitelistInfoService;
|
||||
|
||||
@ -42,9 +40,8 @@ public class DeploymentWhitelistInfoController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('deployment:whitelist:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DeploymentWhitelistInfo deploymentWhitelistInfo)
|
||||
{
|
||||
deploymentWhitelistInfo.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
public TableDataInfo list(DeploymentWhitelistInfo deploymentWhitelistInfo) {
|
||||
deploymentWhitelistInfo.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
startPage();
|
||||
List<DeploymentWhitelistInfo> list = deploymentWhitelistInfoService.selectDeploymentWhitelistInfoList(deploymentWhitelistInfo);
|
||||
return getDataTable(list);
|
||||
@ -56,9 +53,8 @@ public class DeploymentWhitelistInfoController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('deployment:whitelist:export')")
|
||||
@Log(title = "白名单列表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DeploymentWhitelistInfo deploymentWhitelistInfo)
|
||||
{
|
||||
deploymentWhitelistInfo.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
public void export(HttpServletResponse response, DeploymentWhitelistInfo deploymentWhitelistInfo) {
|
||||
deploymentWhitelistInfo.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
List<DeploymentWhitelistInfo> list = deploymentWhitelistInfoService.selectDeploymentWhitelistInfoList(deploymentWhitelistInfo);
|
||||
ExcelUtil<DeploymentWhitelistInfo> util = new ExcelUtil<DeploymentWhitelistInfo>(DeploymentWhitelistInfo.class);
|
||||
util.exportExcel(response, list, "白名单列表数据");
|
||||
@ -69,8 +65,7 @@ public class DeploymentWhitelistInfoController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('deployment:whitelist:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(deploymentWhitelistInfoService.selectDeploymentWhitelistInfoById(id));
|
||||
}
|
||||
|
||||
@ -80,9 +75,8 @@ public class DeploymentWhitelistInfoController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('deployment:whitelist:add')")
|
||||
@Log(title = "白名单列表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DeploymentWhitelistInfo deploymentWhitelistInfo)
|
||||
{
|
||||
deploymentWhitelistInfo.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
public AjaxResult add(@RequestBody DeploymentWhitelistInfo deploymentWhitelistInfo) {
|
||||
deploymentWhitelistInfo.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
return toAjax(deploymentWhitelistInfoService.insertDeploymentWhitelistInfo(deploymentWhitelistInfo));
|
||||
}
|
||||
|
||||
@ -92,8 +86,7 @@ public class DeploymentWhitelistInfoController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('deployment:whitelist:edit')")
|
||||
@Log(title = "白名单列表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DeploymentWhitelistInfo deploymentWhitelistInfo)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody DeploymentWhitelistInfo deploymentWhitelistInfo) {
|
||||
return toAjax(deploymentWhitelistInfoService.updateDeploymentWhitelistInfo(deploymentWhitelistInfo));
|
||||
}
|
||||
|
||||
@ -102,11 +95,11 @@ public class DeploymentWhitelistInfoController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('deployment:whitelist:remove')")
|
||||
@Log(title = "白名单列表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(deploymentWhitelistInfoService.deleteDeploymentWhitelistInfoByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 发布功能
|
||||
*/
|
||||
@ -115,13 +108,13 @@ public class DeploymentWhitelistInfoController extends BaseController
|
||||
public AjaxResult publish(@PathVariable("id") Long id) throws Exception {
|
||||
return success(deploymentWhitelistInfoService.publish(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 下架功能
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('deployment:whitelist:sold:out')")
|
||||
@GetMapping(value = "/sold/out/{id}")
|
||||
public AjaxResult soldOut(@PathVariable("id") Long id)
|
||||
{
|
||||
public AjaxResult soldOut(@PathVariable("id") Long id) {
|
||||
return success(deploymentWhitelistInfoService.soldOut(id));
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.sf.system.deployment.controller;
|
||||
package com.sf.service.deployment.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
@ -6,8 +6,8 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.sf.common.exception.ServiceException;
|
||||
import com.sf.system.deployment.domain.DeploymentWhitelistList;
|
||||
import com.sf.system.deployment.service.IDeploymentWhitelistListService;
|
||||
import com.sf.service.deployment.domain.DeploymentWhitelistList;
|
||||
import com.sf.service.deployment.service.IDeploymentWhitelistListService;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
@ -1,16 +1,14 @@
|
||||
package com.sf.system.deployment.controller;
|
||||
package com.sf.service.deployment.controller;
|
||||
|
||||
import com.sf.common.annotation.Log;
|
||||
import com.sf.common.core.controller.BaseController;
|
||||
import com.sf.common.core.domain.AjaxResult;
|
||||
import com.sf.common.core.page.TableDataInfo;
|
||||
import com.sf.common.enums.BusinessType;
|
||||
import com.sf.common.enums.RequestHeaderEnums;
|
||||
import com.sf.common.utils.StringUtils;
|
||||
import com.sf.common.utils.http.RequestUtils;
|
||||
import com.sf.common.utils.poi.ExcelUtil;
|
||||
import com.sf.system.deployment.domain.SysApkInfo;
|
||||
import com.sf.system.deployment.service.ISysApkInfoService;
|
||||
import com.sf.service.deployment.domain.SysApkInfo;
|
||||
import com.sf.service.deployment.service.ISysApkInfoService;
|
||||
import com.sf.service.index.utils.AppUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -20,14 +18,13 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* 安装包管理(新)Controller
|
||||
*
|
||||
*
|
||||
* @author ztzh
|
||||
* @date 2024-04-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/deploy/INFO")
|
||||
public class SysApkInfoController extends BaseController
|
||||
{
|
||||
public class SysApkInfoController extends BaseController {
|
||||
@Autowired
|
||||
private ISysApkInfoService sysApkInfoService;
|
||||
|
||||
@ -36,9 +33,8 @@ public class SysApkInfoController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('deploy:INFO:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysApkInfo sysApkInfo)
|
||||
{
|
||||
sysApkInfo.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
public TableDataInfo list(SysApkInfo sysApkInfo) {
|
||||
sysApkInfo.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
startPage();
|
||||
List<SysApkInfo> list = sysApkInfoService.selectSysApkInfoList(sysApkInfo);
|
||||
return getDataTable(list);
|
||||
@ -50,8 +46,7 @@ public class SysApkInfoController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('deploy:INFO:export')")
|
||||
@Log(title = "安装包管理(新)", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysApkInfo sysApkInfo)
|
||||
{
|
||||
public void export(HttpServletResponse response, SysApkInfo sysApkInfo) {
|
||||
List<SysApkInfo> list = sysApkInfoService.selectSysApkInfoList(sysApkInfo);
|
||||
ExcelUtil<SysApkInfo> util = new ExcelUtil<SysApkInfo>(SysApkInfo.class);
|
||||
util.exportExcel(response, list, "安装包管理(新)数据");
|
||||
@ -62,8 +57,7 @@ public class SysApkInfoController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('deploy:INFO:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(sysApkInfoService.selectSysApkInfoById(id));
|
||||
}
|
||||
|
||||
@ -73,9 +67,8 @@ public class SysApkInfoController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('deploy:INFO:add')")
|
||||
@Log(title = "安装包管理(新)", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SysApkInfo sysApkInfo)
|
||||
{
|
||||
sysApkInfo.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
public AjaxResult add(@RequestBody SysApkInfo sysApkInfo) {
|
||||
sysApkInfo.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
sysApkInfo.setCreated(getUsername());
|
||||
sysApkInfo.setModified(getUsername());
|
||||
return toAjax(sysApkInfoService.insertSysApkInfo(sysApkInfo));
|
||||
@ -87,8 +80,7 @@ public class SysApkInfoController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('deploy:INFO:edit')")
|
||||
@Log(title = "安装包管理(新)", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SysApkInfo sysApkInfo)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody SysApkInfo sysApkInfo) {
|
||||
sysApkInfo.setModified(getUsername());
|
||||
return toAjax(sysApkInfoService.updateSysApkInfo(sysApkInfo));
|
||||
}
|
||||
@ -98,9 +90,8 @@ public class SysApkInfoController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('deploy:INFO:remove')")
|
||||
@Log(title = "安装包管理(新)", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(sysApkInfoService.deleteSysApkInfoByIds(ids));
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.sf.system.deployment.domain;
|
||||
package com.sf.service.deployment.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
@ -1,4 +1,4 @@
|
||||
package com.sf.system.deployment.domain;
|
||||
package com.sf.service.deployment.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
@ -1,4 +1,4 @@
|
||||
package com.sf.system.deployment.domain;
|
||||
package com.sf.service.deployment.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
@ -1,9 +1,8 @@
|
||||
package com.sf.system.deployment.domain;
|
||||
package com.sf.service.deployment.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
@ -1,4 +1,4 @@
|
||||
package com.sf.system.deployment.domain;
|
||||
package com.sf.service.deployment.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
@ -1,4 +1,4 @@
|
||||
package com.sf.system.deployment.domain;
|
||||
package com.sf.service.deployment.domain;
|
||||
|
||||
import com.sf.common.annotation.Excel;
|
||||
import com.sf.common.core.domain.BaseEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.sf.system.deployment.domain.rqs;
|
||||
package com.sf.service.deployment.domain.rqs;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.sf.system.deployment.domain.rqs;
|
||||
package com.sf.service.deployment.domain.rqs;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.sf.deployment.mapper;
|
||||
package com.sf.service.deployment.mapper;
|
||||
|
||||
import com.sf.system.deployment.domain.DeploymentApplyEnvironment;
|
||||
import com.sf.service.deployment.domain.DeploymentApplyEnvironment;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,7 +1,8 @@
|
||||
package com.sf.system.deployment.mapper;
|
||||
package com.sf.service.deployment.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.sf.system.deployment.domain.DeploymentModuleList;
|
||||
|
||||
import com.sf.service.deployment.domain.DeploymentModuleList;
|
||||
|
||||
/**
|
||||
* H5模块包Mapper接口
|
@ -1,6 +1,6 @@
|
||||
package com.sf.system.deployment.mapper;
|
||||
package com.sf.service.deployment.mapper;
|
||||
|
||||
import com.sf.system.deployment.domain.DeploymentServicePublish;
|
||||
import com.sf.service.deployment.domain.DeploymentServicePublish;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.sf.system.deployment.mapper;
|
||||
package com.sf.service.deployment.mapper;
|
||||
|
||||
import com.sf.system.deployment.domain.DeploymentWhitelistInfo;
|
||||
import com.sf.system.deployment.domain.DeploymentWhitelistList;
|
||||
import com.sf.service.deployment.domain.DeploymentWhitelistInfo;
|
||||
import com.sf.service.deployment.domain.DeploymentWhitelistList;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.sf.system.deployment.mapper;
|
||||
package com.sf.service.deployment.mapper;
|
||||
|
||||
import com.sf.system.deployment.domain.DeploymentWhitelistList;
|
||||
import com.sf.service.deployment.domain.DeploymentWhitelistList;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.sf.system.deployment.mapper;
|
||||
package com.sf.service.deployment.mapper;
|
||||
|
||||
|
||||
import com.sf.system.deployment.domain.SysApkInfo;
|
||||
import com.sf.service.deployment.domain.SysApkInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.sf.deployment.service;
|
||||
package com.sf.service.deployment.service;
|
||||
|
||||
import com.sf.system.deployment.domain.DeploymentApplyEnvironment;
|
||||
import com.sf.service.deployment.domain.DeploymentApplyEnvironment;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,7 +1,8 @@
|
||||
package com.sf.system.deployment.service;
|
||||
package com.sf.service.deployment.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.sf.system.deployment.domain.DeploymentModuleList;
|
||||
|
||||
import com.sf.service.deployment.domain.DeploymentModuleList;
|
||||
|
||||
/**
|
||||
* H5模块包Service接口
|
@ -1,8 +1,7 @@
|
||||
package com.sf.system.deployment.service;
|
||||
package com.sf.service.deployment.service;
|
||||
|
||||
import com.sf.system.deployment.domain.DeploymentServicePublish;
|
||||
import com.sf.service.deployment.domain.DeploymentServicePublish;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
@ -1,6 +1,6 @@
|
||||
package com.sf.system.deployment.service;
|
||||
package com.sf.service.deployment.service;
|
||||
|
||||
import com.sf.system.deployment.domain.DeploymentWhitelistInfo;
|
||||
import com.sf.service.deployment.domain.DeploymentWhitelistInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.sf.system.deployment.service;
|
||||
package com.sf.service.deployment.service;
|
||||
|
||||
import com.sf.system.deployment.domain.DeploymentWhitelistList;
|
||||
import com.sf.service.deployment.domain.DeploymentWhitelistList;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
@ -1,7 +1,7 @@
|
||||
package com.sf.system.deployment.service;
|
||||
package com.sf.service.deployment.service;
|
||||
|
||||
|
||||
import com.sf.system.deployment.domain.SysApkInfo;
|
||||
import com.sf.service.deployment.domain.SysApkInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,12 +1,12 @@
|
||||
package com.sf.deployment.service.impl;
|
||||
package com.sf.service.deployment.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.sf.common.utils.DateUtils;
|
||||
import com.sf.system.deployment.domain.DeploymentApplyEnvironment;
|
||||
import com.sf.service.deployment.domain.DeploymentApplyEnvironment;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.sf.deployment.mapper.DeploymentApplyEnvironmentMapper;
|
||||
import com.sf.deployment.service.IDeploymentApplyEnvironmentService;
|
||||
import com.sf.service.deployment.mapper.DeploymentApplyEnvironmentMapper;
|
||||
import com.sf.service.deployment.service.IDeploymentApplyEnvironmentService;
|
||||
|
||||
/**
|
||||
* 环境维护Service业务层处理
|
@ -1,12 +1,12 @@
|
||||
package com.sf.system.deployment.service.impl;
|
||||
package com.sf.service.deployment.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.sf.common.utils.DateUtils;
|
||||
import com.sf.service.deployment.domain.DeploymentModuleList;
|
||||
import com.sf.service.deployment.mapper.DeploymentModuleListMapper;
|
||||
import com.sf.service.deployment.service.IDeploymentModuleListService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.sf.system.deployment.mapper.DeploymentModuleListMapper;
|
||||
import com.sf.system.deployment.domain.DeploymentModuleList;
|
||||
import com.sf.system.deployment.service.IDeploymentModuleListService;
|
||||
|
||||
/**
|
||||
* H5模块包Service业务层处理
|
||||
@ -15,7 +15,7 @@ import com.sf.system.deployment.service.IDeploymentModuleListService;
|
||||
* @date 2024-04-22
|
||||
*/
|
||||
@Service
|
||||
public class DeploymentModuleListServiceImpl implements IDeploymentModuleListService
|
||||
public class DeploymentModuleListServiceImpl implements IDeploymentModuleListService
|
||||
{
|
||||
@Autowired
|
||||
private DeploymentModuleListMapper deploymentModuleListMapper;
|
@ -1,6 +1,5 @@
|
||||
package com.sf.system.deployment.service.impl;
|
||||
package com.sf.service.deployment.service.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import com.sf.common.constant.HttpStatus;
|
||||
@ -9,14 +8,13 @@ import com.sf.common.utils.DateUtils;
|
||||
import com.sf.common.utils.file.QRCodeUtils;
|
||||
import com.sf.file.domain.SysOss;
|
||||
import com.sf.file.service.ISysOssService;
|
||||
import com.sf.system.deployment.domain.DeploymentServicePublish;
|
||||
import com.sf.system.deployment.domain.SysApkInfo;
|
||||
import com.sf.system.deployment.mapper.DeploymentServicePublishMapper;
|
||||
import com.sf.system.deployment.service.IDeploymentServicePublishService;
|
||||
import com.sf.system.deployment.service.ISysApkInfoService;
|
||||
import com.sf.service.deployment.domain.DeploymentServicePublish;
|
||||
import com.sf.service.deployment.domain.SysApkInfo;
|
||||
import com.sf.service.deployment.mapper.DeploymentServicePublishMapper;
|
||||
import com.sf.service.deployment.service.IDeploymentServicePublishService;
|
||||
import com.sf.service.deployment.service.ISysApkInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.sf.system.deployment.service.impl;
|
||||
package com.sf.service.deployment.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.sf.common.utils.DateUtils;
|
||||
import com.sf.system.deployment.domain.DeploymentWhitelistInfo;
|
||||
import com.sf.system.deployment.domain.DeploymentWhitelistList;
|
||||
import com.sf.system.deployment.mapper.DeploymentWhitelistInfoMapper;
|
||||
import com.sf.system.deployment.mapper.DeploymentWhitelistListMapper;
|
||||
import com.sf.system.deployment.service.IDeploymentWhitelistInfoService;
|
||||
import com.sf.service.deployment.domain.DeploymentWhitelistInfo;
|
||||
import com.sf.service.deployment.domain.DeploymentWhitelistList;
|
||||
import com.sf.service.deployment.mapper.DeploymentWhitelistInfoMapper;
|
||||
import com.sf.service.deployment.mapper.DeploymentWhitelistListMapper;
|
||||
import com.sf.service.deployment.service.IDeploymentWhitelistInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -1,70 +1,66 @@
|
||||
package com.sf.system.deployment.service.impl;
|
||||
package com.sf.service.deployment.service.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.sf.common.enums.RequestHeaderEnums;
|
||||
import com.sf.common.utils.DateUtils;
|
||||
import com.sf.common.utils.StringUtils;
|
||||
import com.sf.common.utils.http.RequestUtils;
|
||||
import com.sf.system.deployment.domain.DeploymentWhitelistList;
|
||||
import com.sf.system.deployment.mapper.DeploymentWhitelistListMapper;
|
||||
import com.sf.system.deployment.service.IDeploymentWhitelistListService;
|
||||
import com.sf.service.deployment.domain.DeploymentWhitelistList;
|
||||
import com.sf.service.deployment.mapper.DeploymentWhitelistListMapper;
|
||||
import com.sf.service.deployment.service.IDeploymentWhitelistListService;
|
||||
import com.sf.service.index.utils.AppUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 白名单成员列Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author ztzh
|
||||
* @date 2024-05-06
|
||||
*/
|
||||
@Service
|
||||
public class DeploymentWhitelistListServiceImpl implements IDeploymentWhitelistListService
|
||||
{
|
||||
public class DeploymentWhitelistListServiceImpl implements IDeploymentWhitelistListService {
|
||||
@Autowired
|
||||
private DeploymentWhitelistListMapper deploymentWhitelistListMapper;
|
||||
|
||||
/**
|
||||
* 查询白名单成员列
|
||||
*
|
||||
*
|
||||
* @param id 白名单成员列主键
|
||||
* @return 白名单成员列
|
||||
*/
|
||||
@Override
|
||||
public DeploymentWhitelistList selectDeploymentWhitelistListById(Long id)
|
||||
{
|
||||
public DeploymentWhitelistList selectDeploymentWhitelistListById(Long id) {
|
||||
return deploymentWhitelistListMapper.selectDeploymentWhitelistListById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询白名单成员列列表
|
||||
*
|
||||
*
|
||||
* @param deploymentWhitelistList 白名单成员列
|
||||
* @return 白名单成员列
|
||||
*/
|
||||
@Override
|
||||
public List<DeploymentWhitelistList> selectDeploymentWhitelistListList(DeploymentWhitelistList deploymentWhitelistList)
|
||||
{
|
||||
public List<DeploymentWhitelistList> selectDeploymentWhitelistListList(DeploymentWhitelistList deploymentWhitelistList) {
|
||||
return deploymentWhitelistListMapper.selectDeploymentWhitelistListList(deploymentWhitelistList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增白名单成员列
|
||||
*
|
||||
* @param member 白名单成员列
|
||||
* @param member 白名单成员列
|
||||
* @param username
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDeploymentWhitelistList(DeploymentWhitelistList member, String username)
|
||||
{
|
||||
if(null == member.getWhitelistId()){
|
||||
throw new SecurityException("参数异常WhitelistId为空");
|
||||
}
|
||||
member.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
public int insertDeploymentWhitelistList(DeploymentWhitelistList member, String username) {
|
||||
Assert.notNull(member.getWhitelistId(), "WhitelistId不能为空");
|
||||
member.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
member.setCreated(username);
|
||||
member.setCreateTime(DateUtils.getNowDate());
|
||||
member.setModified(username);
|
||||
@ -75,38 +71,35 @@ public class DeploymentWhitelistListServiceImpl implements IDeploymentWhitelistL
|
||||
|
||||
/**
|
||||
* 修改白名单成员列
|
||||
*
|
||||
*
|
||||
* @param deploymentWhitelistList 白名单成员列
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDeploymentWhitelistList(DeploymentWhitelistList deploymentWhitelistList)
|
||||
{
|
||||
public int updateDeploymentWhitelistList(DeploymentWhitelistList deploymentWhitelistList) {
|
||||
deploymentWhitelistList.setUpdateTime(DateUtils.getNowDate());
|
||||
return deploymentWhitelistListMapper.updateDeploymentWhitelistList(deploymentWhitelistList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除白名单成员列
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的白名单成员列主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDeploymentWhitelistListByIds(Long[] ids)
|
||||
{
|
||||
public int deleteDeploymentWhitelistListByIds(Long[] ids) {
|
||||
return deploymentWhitelistListMapper.deleteDeploymentWhitelistListByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除白名单成员列信息
|
||||
*
|
||||
*
|
||||
* @param id 白名单成员列主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDeploymentWhitelistListById(Long id)
|
||||
{
|
||||
public int deleteDeploymentWhitelistListById(Long id) {
|
||||
return deploymentWhitelistListMapper.deleteDeploymentWhitelistListById(id);
|
||||
}
|
||||
|
||||
@ -119,7 +112,7 @@ public class DeploymentWhitelistListServiceImpl implements IDeploymentWhitelistL
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
content.replaceAll("/n","");
|
||||
content.replaceAll("/n", "");
|
||||
String[] split = StringUtils.split(content, ",");
|
||||
for (String user : split) {
|
||||
DeploymentWhitelistList menber = new DeploymentWhitelistList();
|
@ -1,9 +1,9 @@
|
||||
package com.sf.system.deployment.service.impl;
|
||||
package com.sf.service.deployment.service.impl;
|
||||
|
||||
import com.sf.common.utils.DateUtils;
|
||||
import com.sf.system.deployment.domain.SysApkInfo;
|
||||
import com.sf.system.deployment.mapper.SysApkInfoMapper;
|
||||
import com.sf.system.deployment.service.ISysApkInfoService;
|
||||
import com.sf.service.deployment.domain.SysApkInfo;
|
||||
import com.sf.service.deployment.mapper.SysApkInfoMapper;
|
||||
import com.sf.service.deployment.service.ISysApkInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -0,0 +1,60 @@
|
||||
package com.sf.service.exception;
|
||||
|
||||
import com.sf.common.exception.ServiceException;
|
||||
|
||||
/**
|
||||
* 功能描述: 未找到appCode
|
||||
*
|
||||
* @author a_kun
|
||||
* @date 2024/5/14 9:16
|
||||
*/
|
||||
public class AppCodeNotFoundException extends ServiceException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 错误码
|
||||
*/
|
||||
private Integer code;
|
||||
|
||||
/**
|
||||
* 错误提示
|
||||
*/
|
||||
private String message;
|
||||
|
||||
|
||||
/**
|
||||
* 空构造方法,避免反序列化问题
|
||||
*/
|
||||
public AppCodeNotFoundException() {}
|
||||
|
||||
public AppCodeNotFoundException(String message)
|
||||
{
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public AppCodeNotFoundException(String message, Integer code)
|
||||
{
|
||||
this.message = message;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage()
|
||||
{
|
||||
return message;
|
||||
}
|
||||
|
||||
public Integer getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public ServiceException setMessage(String message)
|
||||
{
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -5,7 +5,7 @@ import com.sf.common.annotation.Log;
|
||||
import com.sf.common.core.controller.BaseController;
|
||||
import com.sf.common.core.domain.AjaxResult;
|
||||
import com.sf.common.enums.BusinessType;
|
||||
import com.sf.common.utils.AppUtils;
|
||||
import com.sf.service.index.utils.AppUtils;
|
||||
import com.sf.service.gateway.domain.GatewayConfig;
|
||||
import com.sf.service.gateway.enums.GatewayDataStatus;
|
||||
import com.sf.service.gateway.service.IGatewayConfigService;
|
||||
|
@ -5,7 +5,7 @@ import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.sf.common.utils.AppUtils;
|
||||
import com.sf.service.index.utils.AppUtils;
|
||||
import com.sf.file.domain.SysOss;
|
||||
import com.sf.file.service.ISysOssService;
|
||||
import com.sf.service.gateway.domain.GatewayInterfaceInfo;
|
||||
|
@ -6,7 +6,7 @@ import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.sf.common.utils.AppUtils;
|
||||
import com.sf.service.index.utils.AppUtils;
|
||||
import com.sf.service.gateway.domain.GatewayRoute;
|
||||
import com.sf.service.gateway.domain.dto.InsertOrUpdateGatewayRouteDTO;
|
||||
import com.sf.service.gateway.domain.dto.QueryGatewayRouteDTO;
|
||||
|
@ -5,7 +5,7 @@ import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.sf.common.utils.AppUtils;
|
||||
import com.sf.service.index.utils.AppUtils;
|
||||
import com.sf.service.gateway.domain.*;
|
||||
import com.sf.service.gateway.domain.dto.QueryGatewayServerDTO;
|
||||
import com.sf.service.gateway.domain.dto.UpdateDataStatusDTO;
|
||||
|
@ -6,11 +6,10 @@ import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.sf.common.utils.AppUtils;
|
||||
import com.sf.service.index.utils.AppUtils;
|
||||
import com.sf.service.gateway.domain.GatewayStrategy;
|
||||
import com.sf.service.gateway.domain.dto.QueryGatewayStrategyDTO;
|
||||
import com.sf.service.gateway.domain.dto.UpdateDataStatusDTO;
|
||||
import com.sf.service.gateway.domain.vo.GatewayInterfaceInfoListVO;
|
||||
import com.sf.service.gateway.domain.vo.GatewayStrategyListVO;
|
||||
import com.sf.service.gateway.enums.GatewayDataStatus;
|
||||
import com.sf.service.gateway.service.IGatewayStrategyService;
|
||||
|
@ -6,7 +6,7 @@ import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.sf.common.constant.HttpStatus;
|
||||
import com.sf.common.exception.ServiceException;
|
||||
import com.sf.common.utils.AppUtils;
|
||||
import com.sf.service.index.utils.AppUtils;
|
||||
import com.sf.common.utils.DateUtils;
|
||||
import com.sf.common.utils.SecurityUtils;
|
||||
import com.sf.service.gateway.domain.*;
|
||||
|
@ -17,6 +17,7 @@ import com.sf.service.gateway.mapper.GatewayInterfaceInfoMapper;
|
||||
import com.sf.service.gateway.mapper.GatewayInterfaceLinkStrategyMapper;
|
||||
import com.sf.service.gateway.service.IGatewayInterfaceInfoService;
|
||||
import com.sf.service.gateway.service.IGatewayStrategyService;
|
||||
import com.sf.service.index.utils.AppUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.dao.DuplicateKeyException;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -5,7 +5,7 @@ import java.util.*;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.sf.common.utils.AppUtils;
|
||||
import com.sf.service.index.utils.AppUtils;
|
||||
import com.sf.common.utils.DateUtils;
|
||||
import com.sf.common.utils.SecurityUtils;
|
||||
import com.sf.common.utils.URLUtils;
|
||||
|
@ -3,10 +3,9 @@ package com.sf.service.goods.controller;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.sf.common.enums.RequestHeaderEnums;
|
||||
import com.sf.common.utils.http.RequestUtils;
|
||||
import com.sf.service.goods.domain.GoodsMessages;
|
||||
import com.sf.service.goods.service.IGoodsMessagesService;
|
||||
import com.sf.service.index.utils.AppUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -32,8 +31,7 @@ import com.sf.common.core.page.TableDataInfo;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/service/goods")
|
||||
public class GoodsMessagesController extends BaseController
|
||||
{
|
||||
public class GoodsMessagesController extends BaseController {
|
||||
@Autowired
|
||||
private IGoodsMessagesService goodsMessagesService;
|
||||
|
||||
@ -41,9 +39,8 @@ public class GoodsMessagesController extends BaseController
|
||||
* 查询商品信息列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(GoodsMessages goodsMessages)
|
||||
{
|
||||
goodsMessages.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
public TableDataInfo list(GoodsMessages goodsMessages) {
|
||||
goodsMessages.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
startPage();
|
||||
List<GoodsMessages> list = goodsMessagesService.selectGoodsMessagesList(goodsMessages);
|
||||
return getDataTable(list);
|
||||
@ -55,8 +52,7 @@ public class GoodsMessagesController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('service:goods:export')")
|
||||
@Log(title = "商品信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, GoodsMessages goodsMessages)
|
||||
{
|
||||
public void export(HttpServletResponse response, GoodsMessages goodsMessages) {
|
||||
List<GoodsMessages> list = goodsMessagesService.selectGoodsMessagesList(goodsMessages);
|
||||
ExcelUtil<GoodsMessages> util = new ExcelUtil<GoodsMessages>(GoodsMessages.class);
|
||||
util.exportExcel(response, list, "商品信息数据");
|
||||
@ -67,8 +63,7 @@ public class GoodsMessagesController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('service:goods:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(goodsMessagesService.selectGoodsMessagesById(id));
|
||||
}
|
||||
|
||||
@ -78,9 +73,8 @@ public class GoodsMessagesController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('service:goods:add')")
|
||||
@Log(title = "商品信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody GoodsMessages goodsMessages)
|
||||
{
|
||||
goodsMessages.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
public AjaxResult add(@RequestBody GoodsMessages goodsMessages) {
|
||||
goodsMessages.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
return toAjax(goodsMessagesService.insertGoodsMessages(goodsMessages));
|
||||
}
|
||||
|
||||
@ -90,8 +84,7 @@ public class GoodsMessagesController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('service:goods:edit')")
|
||||
@Log(title = "商品信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody GoodsMessages goodsMessages)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody GoodsMessages goodsMessages) {
|
||||
return toAjax(goodsMessagesService.updateGoodsMessages(goodsMessages));
|
||||
}
|
||||
|
||||
@ -101,8 +94,7 @@ public class GoodsMessagesController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('service:goods:remove')")
|
||||
@Log(title = "商品信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(goodsMessagesService.deleteGoodsMessagesByIds(ids));
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
package com.sf.index.controller;
|
||||
package com.sf.service.index.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.sf.service.index.service.IApplyListInfoService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -16,8 +18,7 @@ import com.sf.common.annotation.Log;
|
||||
import com.sf.common.core.controller.BaseController;
|
||||
import com.sf.common.core.domain.AjaxResult;
|
||||
import com.sf.common.enums.BusinessType;
|
||||
import com.sf.index.domain.ApplyListInfo;
|
||||
import com.sf.index.service.IApplyListInfoService;
|
||||
import com.sf.service.index.domain.ApplyListInfo;
|
||||
import com.sf.common.utils.poi.ExcelUtil;
|
||||
import com.sf.common.core.page.TableDataInfo;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.sf.index.domain;
|
||||
package com.sf.service.index.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
@ -1,7 +1,7 @@
|
||||
package com.sf.index.mapper;
|
||||
package com.sf.service.index.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.sf.index.domain.ApplyListInfo;
|
||||
import com.sf.service.index.domain.ApplyListInfo;
|
||||
|
||||
/**
|
||||
* 应用列Mapper接口
|
@ -1,7 +1,7 @@
|
||||
package com.sf.index.service;
|
||||
package com.sf.service.index.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.sf.index.domain.ApplyListInfo;
|
||||
import com.sf.service.index.domain.ApplyListInfo;
|
||||
|
||||
/**
|
||||
* 应用列Service接口
|
@ -1,13 +1,13 @@
|
||||
package com.sf.index.service.impl;
|
||||
package com.sf.service.index.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.sf.common.utils.DateUtils;
|
||||
import com.sf.common.utils.uuid.IdUtils;
|
||||
import com.sf.service.index.service.IApplyListInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.sf.index.mapper.ApplyListInfoMapper;
|
||||
import com.sf.index.domain.ApplyListInfo;
|
||||
import com.sf.index.service.IApplyListInfoService;
|
||||
import com.sf.service.index.mapper.ApplyListInfoMapper;
|
||||
import com.sf.service.index.domain.ApplyListInfo;
|
||||
|
||||
/**
|
||||
* 应用列Service业务层处理
|
||||
@ -16,7 +16,7 @@ import com.sf.index.service.IApplyListInfoService;
|
||||
* @date 2024-04-11
|
||||
*/
|
||||
@Service
|
||||
public class ApplyListInfoServiceImpl implements IApplyListInfoService
|
||||
public class ApplyListInfoServiceImpl implements IApplyListInfoService
|
||||
{
|
||||
@Autowired
|
||||
private ApplyListInfoMapper applyListInfoMapper;
|
@ -0,0 +1,40 @@
|
||||
package com.sf.service.index.utils;
|
||||
|
||||
import com.sf.common.utils.http.RequestUtils;
|
||||
import com.sf.service.exception.AppCodeNotFoundException;
|
||||
import io.netty.handler.codec.HeadersUtils;
|
||||
import lombok.experimental.UtilityClass;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.tomcat.util.http.HeaderUtil;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* 功能描述: 应用工具类
|
||||
*
|
||||
* @author a_kun
|
||||
* @date 2024/4/22 15:48
|
||||
*/
|
||||
@Slf4j
|
||||
@UtilityClass
|
||||
public class AppUtils {
|
||||
|
||||
private static final String APP_CODE = "appCode";
|
||||
|
||||
private static final int APP_CODE_NOT_FOUND_ERROR_CODE = 4030;
|
||||
|
||||
public static String getAppCodeFromRequestHeader() {
|
||||
String appCode = RequestUtils.getHeader(APP_CODE);
|
||||
if (StringUtils.hasText(appCode)) {
|
||||
return appCode;
|
||||
}
|
||||
throw new AppCodeNotFoundException("AppCode Not found", APP_CODE_NOT_FOUND_ERROR_CODE);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,18 +1,17 @@
|
||||
package com.sf.order.controller;
|
||||
package com.sf.service.order.controller;
|
||||
|
||||
import com.sf.common.annotation.Log;
|
||||
import com.sf.common.core.controller.BaseController;
|
||||
import com.sf.common.core.domain.AjaxResult;
|
||||
import com.sf.common.core.page.TableDataInfo;
|
||||
import com.sf.common.enums.BusinessType;
|
||||
import com.sf.common.enums.RequestHeaderEnums;
|
||||
import com.sf.common.utils.http.RequestUtils;
|
||||
import com.sf.common.utils.poi.ExcelUtil;
|
||||
import com.sf.order.domain.OrderInfo;
|
||||
import com.sf.order.domain.dto.OrderCreateDto;
|
||||
import com.sf.order.domain.req.OrderListReqVo;
|
||||
import com.sf.order.domain.res.OrderListResVo;
|
||||
import com.sf.order.service.IOrderInfoService;
|
||||
import com.sf.service.index.utils.AppUtils;
|
||||
import com.sf.service.order.domain.OrderInfo;
|
||||
import com.sf.service.order.domain.dto.OrderCreateDto;
|
||||
import com.sf.service.order.domain.req.OrderListReqVo;
|
||||
import com.sf.service.order.domain.res.OrderListResVo;
|
||||
import com.sf.service.order.service.IOrderInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -37,7 +36,7 @@ public class OrderInfoController extends BaseController {
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(OrderListReqVo vo) {
|
||||
vo.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
vo.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
startPage();
|
||||
List<OrderListResVo> list = orderInfoService.queryList(vo);
|
||||
return getDataTable(list);
|
||||
@ -48,7 +47,7 @@ public class OrderInfoController extends BaseController {
|
||||
*/
|
||||
@GetMapping("/myOrderList")
|
||||
public TableDataInfo myOrderList(OrderListReqVo vo) {
|
||||
vo.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
vo.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
vo.setUserId(getUserId());
|
||||
// startPage();
|
||||
List<OrderListResVo> list = orderInfoService.queryList(vo);
|
||||
@ -82,7 +81,7 @@ public class OrderInfoController extends BaseController {
|
||||
@Log(title = "创建订单基础信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping(value = "/createOrder")
|
||||
public AjaxResult createOrder(@RequestBody OrderCreateDto orderCreateDto) {
|
||||
orderCreateDto.setAppCode(RequestUtils.getHeader(RequestHeaderEnums.APP_CODE.getCode()));
|
||||
orderCreateDto.setAppCode(AppUtils.getAppCodeFromRequestHeader());
|
||||
return AjaxResult.success(orderInfoService.createOrder(orderCreateDto));
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.sf.order.domain;
|
||||
package com.sf.service.order.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.sf.common.annotation.Excel;
|
@ -1,4 +1,4 @@
|
||||
package com.sf.order.domain.dto;
|
||||
package com.sf.service.order.domain.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.sf.order.domain.req;
|
||||
package com.sf.service.order.domain.req;
|
||||
|
||||
import com.sf.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
@ -1,4 +1,4 @@
|
||||
package com.sf.order.domain.res;
|
||||
package com.sf.service.order.domain.res;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.sf.common.annotation.Excel;
|
@ -1,8 +1,8 @@
|
||||
package com.sf.order.mapper;
|
||||
package com.sf.service.order.mapper;
|
||||
|
||||
import com.sf.order.domain.OrderInfo;
|
||||
import com.sf.order.domain.req.OrderListReqVo;
|
||||
import com.sf.order.domain.res.OrderListResVo;
|
||||
import com.sf.service.order.domain.OrderInfo;
|
||||
import com.sf.service.order.domain.req.OrderListReqVo;
|
||||
import com.sf.service.order.domain.res.OrderListResVo;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.sf.order.service;
|
||||
package com.sf.service.order.service;
|
||||
|
||||
|
||||
import com.sf.order.domain.OrderInfo;
|
||||
import com.sf.order.domain.dto.OrderCreateDto;
|
||||
import com.sf.order.domain.req.OrderListReqVo;
|
||||
import com.sf.order.domain.res.OrderListResVo;
|
||||
import com.sf.service.order.domain.OrderInfo;
|
||||
import com.sf.service.order.domain.dto.OrderCreateDto;
|
||||
import com.sf.service.order.domain.req.OrderListReqVo;
|
||||
import com.sf.service.order.domain.res.OrderListResVo;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,14 +1,14 @@
|
||||
package com.sf.order.service.impl;
|
||||
package com.sf.service.order.service.impl;
|
||||
|
||||
import com.sf.common.exception.ServiceException;
|
||||
import com.sf.common.utils.DateUtils;
|
||||
import com.sf.common.utils.SnowflakeIdWorker;
|
||||
import com.sf.order.domain.OrderInfo;
|
||||
import com.sf.order.domain.dto.OrderCreateDto;
|
||||
import com.sf.order.domain.req.OrderListReqVo;
|
||||
import com.sf.order.domain.res.OrderListResVo;
|
||||
import com.sf.order.mapper.OrderInfoMapper;
|
||||
import com.sf.order.service.IOrderInfoService;
|
||||
import com.sf.service.order.domain.OrderInfo;
|
||||
import com.sf.service.order.domain.dto.OrderCreateDto;
|
||||
import com.sf.service.order.domain.req.OrderListReqVo;
|
||||
import com.sf.service.order.domain.res.OrderListResVo;
|
||||
import com.sf.service.order.mapper.OrderInfoMapper;
|
||||
import com.sf.service.order.service.IOrderInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.sf.deployment.mapper.DeploymentApplyEnvironmentMapper">
|
||||
<mapper namespace="com.sf.service.deployment.mapper.DeploymentApplyEnvironmentMapper">
|
||||
|
||||
<resultMap type="DeploymentApplyEnvironment" id="DeploymentApplyEnvironmentResult">
|
||||
<result property="id" column="id" />
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.sf.system.deployment.mapper.DeploymentModuleListMapper">
|
||||
<mapper namespace="com.sf.service.deployment.mapper.DeploymentModuleListMapper">
|
||||
|
||||
<resultMap type="DeploymentModuleList" id="DeploymentModuleListResult">
|
||||
<result property="id" column="id"/>
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.sf.system.deployment.mapper.DeploymentServicePublishMapper">
|
||||
<mapper namespace="com.sf.service.deployment.mapper.DeploymentServicePublishMapper">
|
||||
|
||||
<resultMap type="DeploymentServicePublish" id="DeploymentServicePublishResult">
|
||||
<result property="id" column="id" />
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.sf.system.deployment.mapper.DeploymentWhitelistInfoMapper">
|
||||
<mapper namespace="com.sf.service.deployment.mapper.DeploymentWhitelistInfoMapper">
|
||||
|
||||
<resultMap type="DeploymentWhitelistInfo" id="DeploymentWhitelistInfoResult">
|
||||
<result property="id" column="id" />
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.sf.system.deployment.mapper.DeploymentWhitelistListMapper">
|
||||
<mapper namespace="com.sf.service.deployment.mapper.DeploymentWhitelistListMapper">
|
||||
|
||||
<resultMap type="DeploymentWhitelistList" id="DeploymentWhitelistListResult">
|
||||
<result property="id" column="id" />
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.sf.system.deployment.mapper.SysApkInfoMapper">
|
||||
<mapper namespace="com.sf.service.deployment.mapper.SysApkInfoMapper">
|
||||
|
||||
<resultMap type="SysApkInfo" id="SysApkInfoResult">
|
||||
<result property="id" column="id" />
|
@ -1,92 +1,92 @@
|
||||
<?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.sf.index.mapper.ApplyListInfoMapper">
|
||||
|
||||
<resultMap type="ApplyListInfo" id="ApplyListInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="appCode" column="app_code" />
|
||||
<result property="appName" column="app_name" />
|
||||
<result property="appDesc" column="app_desc" />
|
||||
<result property="picture" column="picture" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="isDelete" column="is_delete" />
|
||||
<result property="created" column="created" />
|
||||
<result property="modified" column="modified" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectApplyListInfoVo">
|
||||
select id, app_code, app_name, app_desc, picture, order_num, is_delete, created, modified, create_time, update_time from APPLY_LIST_INFO
|
||||
</sql>
|
||||
|
||||
<select id="selectApplyListInfoList" parameterType="ApplyListInfo" resultMap="ApplyListInfoResult">
|
||||
<include refid="selectApplyListInfoVo"/>
|
||||
<where>
|
||||
<if test="appName != null and appName != ''"> and app_name like concat('%', #{appName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectApplyListInfoById" parameterType="Long" resultMap="ApplyListInfoResult">
|
||||
<include refid="selectApplyListInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertApplyListInfo" parameterType="ApplyListInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into APPLY_LIST_INFO
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="appCode != null and appCode != ''">app_code,</if>
|
||||
<if test="appName != null and appName != ''">app_name,</if>
|
||||
<if test="appDesc != null and appDesc != ''">app_desc,</if>
|
||||
<if test="picture != null">picture,</if>
|
||||
<if test="orderNum != null">order_num,</if>
|
||||
<if test="isDelete != null">is_delete,</if>
|
||||
<if test="created != null">created,</if>
|
||||
<if test="modified != null">modified,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="appCode != null and appCode != ''">#{appCode},</if>
|
||||
<if test="appName != null and appName != ''">#{appName},</if>
|
||||
<if test="appDesc != null and appDesc != ''">#{appDesc},</if>
|
||||
<if test="picture != null">#{picture},</if>
|
||||
<if test="orderNum != null">#{orderNum},</if>
|
||||
<if test="isDelete != null">#{isDelete},</if>
|
||||
<if test="created != null">#{created},</if>
|
||||
<if test="modified != null">#{modified},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateApplyListInfo" parameterType="ApplyListInfo">
|
||||
update APPLY_LIST_INFO
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="appCode != null and appCode != ''">app_code = #{appCode},</if>
|
||||
<if test="appName != null and appName != ''">app_name = #{appName},</if>
|
||||
<if test="appDesc != null and appDesc != ''">app_desc = #{appDesc},</if>
|
||||
<if test="picture != null">picture = #{picture},</if>
|
||||
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
<if test="created != null">created = #{created},</if>
|
||||
<if test="modified != null">modified = #{modified},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteApplyListInfoById" parameterType="Long">
|
||||
delete from APPLY_LIST_INFO where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteApplyListInfoByIds" parameterType="String">
|
||||
delete from APPLY_LIST_INFO where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<?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.sf.service.index.mapper.ApplyListInfoMapper">
|
||||
|
||||
<resultMap type="ApplyListInfo" id="ApplyListInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="appCode" column="app_code" />
|
||||
<result property="appName" column="app_name" />
|
||||
<result property="appDesc" column="app_desc" />
|
||||
<result property="picture" column="picture" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="isDelete" column="is_delete" />
|
||||
<result property="created" column="created" />
|
||||
<result property="modified" column="modified" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectApplyListInfoVo">
|
||||
select id, app_code, app_name, app_desc, picture, order_num, is_delete, created, modified, create_time, update_time from APPLY_LIST_INFO
|
||||
</sql>
|
||||
|
||||
<select id="selectApplyListInfoList" parameterType="ApplyListInfo" resultMap="ApplyListInfoResult">
|
||||
<include refid="selectApplyListInfoVo"/>
|
||||
<where>
|
||||
<if test="appName != null and appName != ''"> and app_name like concat('%', #{appName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectApplyListInfoById" parameterType="Long" resultMap="ApplyListInfoResult">
|
||||
<include refid="selectApplyListInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertApplyListInfo" parameterType="ApplyListInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into APPLY_LIST_INFO
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="appCode != null and appCode != ''">app_code,</if>
|
||||
<if test="appName != null and appName != ''">app_name,</if>
|
||||
<if test="appDesc != null and appDesc != ''">app_desc,</if>
|
||||
<if test="picture != null">picture,</if>
|
||||
<if test="orderNum != null">order_num,</if>
|
||||
<if test="isDelete != null">is_delete,</if>
|
||||
<if test="created != null">created,</if>
|
||||
<if test="modified != null">modified,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="appCode != null and appCode != ''">#{appCode},</if>
|
||||
<if test="appName != null and appName != ''">#{appName},</if>
|
||||
<if test="appDesc != null and appDesc != ''">#{appDesc},</if>
|
||||
<if test="picture != null">#{picture},</if>
|
||||
<if test="orderNum != null">#{orderNum},</if>
|
||||
<if test="isDelete != null">#{isDelete},</if>
|
||||
<if test="created != null">#{created},</if>
|
||||
<if test="modified != null">#{modified},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateApplyListInfo" parameterType="ApplyListInfo">
|
||||
update APPLY_LIST_INFO
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="appCode != null and appCode != ''">app_code = #{appCode},</if>
|
||||
<if test="appName != null and appName != ''">app_name = #{appName},</if>
|
||||
<if test="appDesc != null and appDesc != ''">app_desc = #{appDesc},</if>
|
||||
<if test="picture != null">picture = #{picture},</if>
|
||||
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
<if test="created != null">created = #{created},</if>
|
||||
<if test="modified != null">modified = #{modified},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteApplyListInfoById" parameterType="Long">
|
||||
delete from APPLY_LIST_INFO where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteApplyListInfoByIds" parameterType="String">
|
||||
delete from APPLY_LIST_INFO where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.sf.order.mapper.OrderInfoMapper">
|
||||
<mapper namespace="com.sf.service.order.mapper.OrderInfoMapper">
|
||||
|
||||
<resultMap type="OrderInfo" id="OrderInfoResult">
|
||||
<result property="id" column="id" />
|
Loading…
x
Reference in New Issue
Block a user