Commit 64ba4578 by 陶光胜

init

parents
# maven ignore
target/
*.jar
!.mvn/wrapper/*
*.war
*.zip
*.tar
*.tar.gz
.flattened-pom.xml
# eclipse ignore
.settings/
.project
.classpath
# idea ignore
.idea/
*.ipr
*.iml
*.iws
# temp ignore
*.log
*.cache
*.diff
*.patch
*.tmp
dubbo.cache*
# system ignore
.DS_Store
Thumbs.db
*.orig
<?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>gic-pom-base</artifactId>
<groupId>com.gic</groupId>
<version>4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>gic-data-cloud-api</artifactId>
<version>${libraryVersion}</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<libraryVersion>4.0-SNAPSHOT</libraryVersion>
</properties>
<dependencies>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-base-api</artifactId>
<version>${gic-base-api}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<!--参数验证-->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.0.16.Final</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.12</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.1.0</version>
<configuration>
<flattenMode>defaults</flattenMode>
</configuration>
<executions>
<!-- enable flattening -->
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<!-- ensure proper cleanup -->
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</project>
package com.gic.cloud.dto;
public class TestDTO {
}
package com.gic.cloud.service;
public interface TestApiService {
}
package com.gic;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
/**
* Unit test for simple App.
*/
public class AppTest
{
/**
* Rigorous Test :-)
*/
@Test
public void shouldAnswerWithTrue()
{
assertTrue( true );
}
}
<?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>
<groupId>com.gic</groupId>
<artifactId>gic-pom-base</artifactId>
<version>4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>gic-data-cloud-operation-web</artifactId>
<version>${libraryVersion}</version>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<url>http://www.demogic.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<libraryVersion>4.0-SNAPSHOT</libraryVersion>
<!-- api依赖,正式版会在 gic-pom-base 里生成 -->
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-commons</artifactId>
<version>${gic-commons}</version>
<exclusions>
<exclusion>
<artifactId>dubbo</artifactId>
<groupId>com.alibaba</groupId>
</exclusion>
<exclusion>
<artifactId>logback-core</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
<exclusion>
<artifactId>spring-data-redis</artifactId>
<groupId>org.springframework.data</groupId>
</exclusion>
<exclusion>
<artifactId>servlet-api</artifactId>
<groupId>javax.servlet</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.23.2-GA</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-platform-config</artifactId>
<version>${gic-platform-config}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-store-api</artifactId>
<version>${gic-store-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-enterprise-common</artifactId>
<version>${gic-enterprise-common}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-enterprise-base-api</artifactId>
<version>${gic-enterprise-base-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-platform-auth-api</artifactId>
<version>${gic-platform-auth-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-platform-enterprise-api</artifactId>
<version>${gic-platform-enterprise-api}</version>
</dependency>
<!--<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.1.5.RELEASE</version>
<exclusions>
<exclusion>
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
-->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.9</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.23</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.11</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.11</version>
</dependency>
<dependency>
<groupId>com.gic.authcenter </groupId>
<artifactId>gic-authcenter-security-core </artifactId>
<version>${gic-authcenter-security-core} </version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.gic </groupId>
<artifactId>gic-redis-data </artifactId>
<version>${gic-redis-data} </version>
</dependency>
<dependency>
<groupId>com.gic.authcenter</groupId>
<artifactId>gic-authcenter-api</artifactId>
<version>${gic-authcenter-api}</version>
</dependency>
<!--开放平台-->
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-open-platform-api</artifactId>
<version>${gic-open-platform-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-platform-finance-api</artifactId>
<version>${gic-platform-finance-api}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.0.16.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-marketing-api</artifactId>
<version>${gic-marketing-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-marketing-process-api</artifactId>
<version>${gic-marketing-process-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-mall-share-api</artifactId>
<version>${gic-mall-share-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>rule-manage-api</artifactId>
<version>${rule-manage-api}</version>
</dependency>
<dependency>
<groupId>com.gic.authcenter</groupId>
<artifactId>gic-authcenter-api</artifactId>
<version>${gic-authcenter-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-member-config-api</artifactId>
<version>${gic-member-config-api}</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.gic.authcenter</groupId>
<artifactId>gic-authcenter</artifactId>
<version>4.0.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.5.RELEASE</version>
<configuration>
<mainClass>com.gic.cloud.operation.web.Main</mainClass>
<excludeGroupIds>ch.qos.logback</excludeGroupIds>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
package com.gic.operation.web;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ImportResource;
import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import com.gic.authcenter.security.core.anno.EnableGicOAuth2Sso;
import com.gic.authcenter.security.core.boot.GicSsoSecurityConfigAdapter;
import com.gic.dubbo.util.DubboContextUtil;
/**
* Spring Boot Web 启动类
*
* @author zhurz
*/
@SpringBootApplication(
scanBasePackages = "com.gic.operation.web.*",
exclude = {
QuartzAutoConfiguration.class
}
)
@ImportResource(value = {
"classpath*:applicationContext-init.xml",
"classpath*:dubbo-setting.xml",
"classpath*:dubbo-gic-platform-operation-web.xml",
"classpath*:spring-interceptor.xml",
"classpath*:redis-init.xml"
})
@EnableApolloConfig({ "application", "BUZ.oauth.4.0" })
@EnableGicOAuth2Sso
public class Main extends GicSsoSecurityConfigAdapter {
public static void main(String[] args){
ConfigurableApplicationContext context = SpringApplication.run(Main.class, args);
DubboContextUtil.setApplicationContext(context);
}
}
\ No newline at end of file
package com.gic.operation.web.exception;
import java.io.ByteArrayOutputStream;
import java.io.PrintWriter;
import java.util.List;
import java.util.Set;
import javax.servlet.http.HttpServletResponse;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.validation.BindException;
import org.springframework.validation.FieldError;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.exception.CommonException;
/**
* 全局异常处理类
*
* @author hua
*/
//@ControllerAdvice
public class GlobalExceptionHandler {
private static Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class);
@ResponseBody
@ExceptionHandler(Exception.class)
public RestResponse controllerException(HttpServletResponse response, Exception ex) {
logger.error("err", ex);
RestResponse failureResponse = getRestResponse(ErrorCode.SYSTEM_ERROR.getCode(), ErrorCode.SYSTEM_ERROR.getMsg());
StringBuilder sb = new StringBuilder();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try (PrintWriter printWriter = new PrintWriter(baos)) {
ex.printStackTrace(printWriter);
}
try {
sb.append(baos.toString());
} catch (Exception ignored) {
}
if (sb.length() == 0) {
sb.append(ex.getMessage());
}
// 输出详细错误信息,便于调试
failureResponse.setDetailError(sb.toString());
return failureResponse;
}
/**
* 参数校验异常统一处理
* @param e
* @return
*/
@ResponseBody
@ExceptionHandler(BindException.class)
public RestResponse customException(BindException e) {
List<FieldError> fieldErrors = e.getFieldErrors();
StringBuilder errorMessage = new StringBuilder();
fieldErrors.forEach(fieldError -> {
errorMessage
.append(fieldError.getDefaultMessage())
.append(",");
});
return getRestResponse(ErrorCode.PARAMETER_ERROR.getCode(), errorMessage.toString());
}
@ResponseBody
@ExceptionHandler(ConstraintViolationException.class)
public RestResponse constraintViolationException(ConstraintViolationException e) {
Set<ConstraintViolation<?>> constraintViolations = e.getConstraintViolations();
String paramName = constraintViolations.iterator().next().getPropertyPath().toString();
String paramError = constraintViolations.iterator().next().getMessage();
return getRestResponse(ErrorCode.PARAMETER_ERROR.getCode(), getFailFastMsg(paramName, paramError));
}
@ResponseBody
@ExceptionHandler(CommonException.class)
public RestResponse customException(CommonException e) {
return getRestResponse(e.getErrorCode(), e.getMessage());
}
private RestResponse getRestResponse(String errorCode, String message) {
return RestResponse.failure(errorCode, message);
}
private static String getFailFastMsg(String paramName, String paramError) {
return String.format("%s:%s", paramName, paramError);
}
}
app.id=gic-data-cloud-operation-web
app.project-code=data-cloud
logging.level.org.springframework.security=DEBUG
server.port=8400
server.servlet.context-path=/data-cloud-operation-web
server.servlet.session.cookie.name=GICOPERATIONWEBSESSIONID
server.servlet.session.timeout=3600
spring.session.store-type=REDIS
spring.session.redis.namespace=data_cloud_operation_web
spring.session.timeout=3600
spring.redis.host=123.207.187.158
spring.redis.port=27019
spring.redis.password=crs-6vmo0g9s:gic*0571
spring.redis.database=11
spring.redis.timeout=5000
security.oauth2.client.clientId=dataCloud
security.oauth2.client.clientSecret=clientSecret
security.oauth2.client.user-authorization-uri=http://localhost:8900/gic-authcenter/oauth/authorize
security.oauth2.client.access-token-uri=http://localhost:8900/gic-authcenter/oauth/token
security.oauth2.resource.user-info-uri=http://localhost:8900/gic-authcenter/resource/userDetails
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
<context:component-scan base-package="com.gic.cloud.operation"/>
<!-- 应用名称 -->
<dubbo:application name="data-cloud-operation-web"/>
<dubbo:reference interface="com.gic.store.service.StoreRegionApiService" id="storeRegionApiService" timeout="6000" retries="0"/>
<dubbo:reference interface="com.gic.store.service.StoreBrandApiService" id="storeBrandApiService" timeout="60000" retries="0"/>
<dubbo:reference interface="com.gic.store.service.StoreDictApiService" id="storeDictApiService" timeout="6000" retries="0"/>
<!--分组服务-->
<dubbo:reference interface="com.gic.store.service.StoreGroupApiService" id="storeGroupApiService" timeout="60000" retries="0"/>
<!--自定义域字段-->
<dubbo:reference interface="com.gic.store.service.StoreFieldApiService" id="storeFieldApiService" timeout="60000" retries="0"/>
<dubbo:reference interface="com.gic.store.service.StoreFieldSelectApiService" id="storeFieldSelectApiService" timeout="60000" retries="0"/>
<!--门店-->
<dubbo:reference interface="com.gic.store.service.StoreApiService" id="storeApiService" timeout="60000" retries="0"/>
<!--分组策略-->
<dubbo:reference interface="com.gic.store.service.StoreStrategyApiService" id="storeStrategyApiService" timeout="60000" retries="0"/>
<!--门店导入-->
<dubbo:reference interface="com.gic.store.service.StoreImportApiService" id="storeImportApiService" timeout="60000" />
<dubbo:reference interface="com.gic.store.service.ProvincesApiService" id="provincesApiService" timeout="60000" />
<dubbo:reference interface="com.gic.store.service.StoreStatusSettingApiService" id="storeStatusSettingApiService" timeout="60000" />
<dubbo:reference interface="com.gic.log.api.service.LogApiService" id="logApiService" timeout="60000" />
<!--用户-->
<dubbo:reference interface="com.gic.auth.service.UserApiService" id="userApiService" timeout="60000" />
<!--商户-->
<dubbo:reference interface="com.gic.enterprise.service.EnterpriseApiService" id="enterpriseApiService" timeout="60000" />
<dubbo:reference interface="com.gic.enterprise.service.EnterpriseInitApiService" id="enterpriseInitApiService" timeout="60000" />
<!-- 平台品牌库 -->
<dubbo:reference interface="com.gic.enterprise.service.PlatformBrandApiService" id="platformBrandApiService" timeout="60000" />
<!--字典 -->
<dubbo:reference interface="com.gic.enterprise.service.DictApiService" id="dictApiService" timeout="60000" />
<dubbo:reference id="gicLogService" interface="com.gic.authcenter.api.service.GicLogService"/>
<dubbo:reference id="gicAppService" interface="com.gic.authcenter.api.service.GicAppService"/>
<dubbo:reference id="gicUserService" interface="com.gic.authcenter.api.service.GicUserService"/>
<!--受审项目-->
<dubbo:reference id="projectApiService" interface="com.gic.enterprise.service.ProjectApiService" timeout="60000"/>
<dubbo:reference id="projectItemApiService" interface="com.gic.enterprise.service.ProjectItemApiService" timeout="60000"/>
<dubbo:reference interface="com.gic.auth.service.MenuApiService" id="menuApiService" timeout="6000" />
<dubbo:reference interface="com.gic.auth.service.MenuItemApiService" id="menuItemApiService" timeout="6000" />
<!--运营管理员-->
<dubbo:reference interface="com.gic.auth.service.OperationUserApiService" id="operationUserApiService" timeout="6000" />
<!--开放给平台订单详情-->
<dubbo:reference interface="com.gic.open.api.service.OrderApiService" id="orderApiService" timeout="60000" />
<dubbo:reference interface="com.gic.open.api.service.CouponApiService" id="couponApiService" timeout="60000" />
<dubbo:reference interface="com.gic.open.api.service.ServeApiService" id="serveApiService" timeout="60000" />
<dubbo:reference interface="com.gic.open.api.service.AppTokenApiService" id="appTokenApiService" timeout="6000" />
<dubbo:reference interface="com.gic.finance.service.TransferAccountsApprovalApiService" id="transferAccountsApprovalApiService" timeout="60000" />
<!--短信初始化-->
<dubbo:reference interface="com.gic.marketing.api.service.sms.SmsOuterApiService" id="smsOuterApiService" timeout="60000" />
<!--短信发送-->
<dubbo:reference interface="com.gic.marketing.process.api.service.sms.SmsSendApiService" id="smsSendApiService" timeout="60000" />
<dubbo:reference interface="com.gic.enterprise.service.HelpCenterApiService" id="helpCenterApiService" timeout="6000" />
<!--首页配置-->
<dubbo:reference interface="com.gic.enterprise.service.IndexModuleApiService" id="indexModuleApiService" timeout="6000" />
<dubbo:reference interface="com.gic.open.api.service.market.MarketUserApiService" id="marketUserApiService" timeout="6000" />
<dubbo:reference interface="com.gic.enterprise.service.PushMessageApiService" id="pushMessageApiService" timeout="6000" />
<!--应用列表-->
<dubbo:reference interface="com.gic.open.api.service.market.MarketAppCategoryApiService" id="marketAppCategoryApiService" timeout="6000" />
<!--链接小工具-->
<dubbo:reference interface="com.gic.enterprise.service.LinkApiService" id="linkApiService" timeout="6000" />
<!--平台规则配置-->
<dubbo:reference interface="com.gic.enterprise.service.ConfigRuleApiService" id="configRuleApiService" timeout="6000" />
<dubbo:reference interface="com.gic.enterprise.service.ConfigRuleEnterpriseApiService" id="configRuleEnterpriseApiService" timeout="6000" />
<dubbo:reference interface="com.gic.rule.manage.api.service.DealOperationApiService" id="dealOperationApiService" timeout="6000" />
<dubbo:reference interface="com.gic.auth.service.BusinessFrontResApiService" id="businessFrontResApiService" timeout="6000" />
<!-- 消息路由 -->
<dubbo:reference interface="com.gic.mq.sdk.service.MQConfigService" id="mQConfigService" timeout="6000"/>
<dubbo:reference interface="com.gic.mq.sdk.service.MQStatusService" id="mQStatusService" timeout="6000"/>
<dubbo:reference interface="com.gic.mall.share.api.service.PayConfigApiService" id="payConfigApiService" timeout="6000"/>
<dubbo:reference interface="com.gic.authcenter.api.service.GicDepartmentService" id="gicDepartmentService" timeout="6000" />
<dubbo:reference interface="com.gic.member.config.api.service.MemberCardApiService" id="memberCardApiService" timeout="6000" />
</beans>
\ No newline at end of file
dubbo.registry.file=data-cloud-operation-web
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:interceptors>
<bean class="com.gic.enterprise.interceptor.RequestInteceptor"></bean>
<bean class="com.gic.commons.interceptor.HeaderTagInterceptor"/>
</mvc:interceptors>
</beans>
\ No newline at end of file
<?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>
<groupId>com.gic</groupId>
<artifactId>gic-pom-base</artifactId>
<version>4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>gic-data-cloud-service</artifactId>
<version>${libraryVersion}</version>
<name>${project.artifactId}</name>
<url>http://www.demogic.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<libraryVersion>4.0-SNAPSHOT</libraryVersion>
<gic-sharding-sdk>3.1-SNAPSHOT</gic-sharding-sdk>
<!-- api依赖,正式版会在 gic-pom-base 里生成 -->
</properties>
<dependencies>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-commons</artifactId>
<version>${gic-commons}</version>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<artifactId>dubbo</artifactId>
<groupId>com.alibaba</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-platform-config</artifactId>
<version>${gic-platform-config}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-sharding-sdk</artifactId>
<version>${gic-sharding-sdk}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.5.1</version>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>5.1.9</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-store-api</artifactId>
<version>${gic-store-api}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>5.1.7.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.gic </groupId>
<artifactId>gic-redis-data </artifactId>
<version>${gic-redis-data} </version>
</dependency>
<dependency>
<groupId>com.gic.bizdict</groupId>
<artifactId>gic-bizdict-api</artifactId>
<version>${gic-bizdict-api}</version>
</dependency>
<dependency>
<groupId>com.gic.bizdict</groupId>
<artifactId>gic-bizdict-sdk</artifactId>
<version>${gic-bizdict-sdk}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-enterprise-base-api</artifactId>
<version>${gic-enterprise-base-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-platform-enterprise-api</artifactId>
<version>${gic-platform-enterprise-api}</version>
</dependency>
<dependency>
<groupId>com.gic </groupId>
<artifactId>gic-job-sdk</artifactId>
<version>${gic-job-sdk}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-thirdparty-api</artifactId>
<version>${gic-thirdparty-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-platform-finance-api</artifactId>
<version>${gic-platform-finance-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-platform-auth-api</artifactId>
<version>${gic-platform-auth-api}</version>
</dependency>
<!--服务订购-->
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-open-platform-api</artifactId>
<version>${gic-open-platform-api}</version>
</dependency>
<dependency>
<groupId>com.gic.authcenter</groupId>
<artifactId>gic-authcenter-api</artifactId>
<version>${gic-authcenter-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-member-api</artifactId>
<version>${gic-member-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-member-config-api</artifactId>
<version>${gic-member-config-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-mall-share-api</artifactId>
<version>${gic-mall-share-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-wechat-business-api</artifactId>
<version>${gic-wechat-business-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-marketing-process-api</artifactId>
<version>${gic-marketing-process-api}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-log-api</artifactId>
<version>${gic-log-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-thirdparty-sdk</artifactId>
<version>${gic-thirdparty-sdk}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-weimob-api</artifactId>
<version>${gic-weimob-api}</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<classesDirectory>target/classes/</classesDirectory>
<archive>
<manifest>
<mainClass>com.gic.commons.DubboMain</mainClass>
<!-- 打包时 MANIFEST.MF文件不记录的时间戳版本 -->
<useUniqueVersions>false</useUniqueVersions>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
<manifestEntries>
<Class-Path>.</Class-Path>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<type>jar</type>
<includeTypes>jar</includeTypes>
<outputDirectory>
${project.build.directory}/lib
</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
package com.gic.cloud.dao.mapper;
public class TestMapper {
}
package com.gic.cloud.entity;
public class TestEntity {
}
package com.gic.cloud.service;
public class TestService {
}
package com.gic.cloud.service.impl;
public class TestServiceImpl {
}
package com.gic.cloud.service.outer.impl;
public class TestApiServiceImpl {
}
custom=com.gic.store.utils.custom.CustomValidation
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<import resource="classpath:applicationContext-init.xml"/>
<import resource="classpath:dubbo-gic-data-cloud-service.xml"/>
<import resource="classpath*:dubbo-setting.xml"/>
<import resource="classpath:jdbc-gic-data-cloud-service.xml"/>
<import resource="classpath*:redis-init.xml" />
</beans>
\ No newline at end of file
dubbo.registry.file=gic-data-cloud-service
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:apollo="http://www.ctrip.com/schema/apollo"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
http://www.ctrip.com/schema/apollo
http://www.ctrip.com/schema/apollo.xsd">
<context:annotation-config/>
<!--<apollo:config namespaces="COMMON.sharding,COMMON.4.0-jdbc"/>-->
<!--<bean id="dataSource" class="com.gic.sharding.sdk.ShardingDatasource" init-method="init">-->
<!--<property name="shardingId" value="${sharding.shardingId}"/>-->
<!--<property name="maxSize" value="${jdbc.maxsize}"/>-->
<!--<property name="urlType" value="${sharding.urlType:inner}"/>-->
<!--</bean>-->
<import resource="classpath:applicationContext-db-only.xml"/>
<bean class="org.mybatis.spring.SqlSessionFactoryBean" id="sqlSessionFactory">
<property name="dataSource" ref="dataSource"/>
<property name="typeAliasesPackage" value="com.gic.enterprise.**.entity"/>
<property name="mapperLocations" value="classpath*:mapper/*.xml"/>
<property name="plugins">
<array>
<!-- 自动生成id -->
<bean class="com.gic.commons.plugin.mybatis.AutoIdInterceptor"/>
<!-- 分页插件 -->
<bean class="com.github.pagehelper.PageInterceptor">
<property name="properties">
<value>
helperDialect=mysql
</value>
</property>
</bean>
</array>
</property>
</bean>
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.gic.cloud.**.dao.mapper"/>
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
</bean>
<bean class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>
<!-- 事务管理器 -->
<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>
<tx:annotation-driven transaction-manager="txManager"/>
</beans>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="error" packages="com.gic.commons.log">
<appenders>
<!--这个输出控制台的配置-->
<Console name="Console" target="SYSTEM_OUT">
<!--控制台只输出level及以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
<ThresholdFilter level="trace" onMatch="ACCEPT" onMismatch="DENY" />
<!--这个都知道是输出日志的格式-->
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c:%L] [%traceId] %m%n" />
</Console>
</appenders>
<loggers>
<!--建立一个默认的root的logger-->
<Logger name="com.gic" level="DEBUG"/>
<Logger name="org.springframework" level="INFO"/>
<logger name="Sharding-JDBC-SQL" level="INFO"/>
<logger name="org.hibernate.SQL" level="DEBUG"/>
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="DEBUG"/>
<Root level="WARN">
<!--<Root level="DEBUG">-->
<AppenderRef ref="Console" />
</Root>
</loggers>
</configuration>
<?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.gic.enterprise.dao.mapper.TabAccountStandardMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabAccountStandard">
<id column="standard_id" jdbcType="INTEGER" property="standardId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="account_type" jdbcType="INTEGER" property="accountType" />
<result column="unit_fee" jdbcType="INTEGER" property="unitFee" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="status" jdbcType="INTEGER" property="status" />
</resultMap>
<sql id="Base_Column_List">
standard_id, enterprise_id, account_type, unit_fee, create_time, update_time, status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_account_standard
where standard_id = #{standardId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_account_standard
where standard_id = #{standardId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabAccountStandard">
insert into tab_account_standard (standard_id, enterprise_id, account_type,
unit_fee, create_time, update_time,
status)
values (#{standardId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{accountType,jdbcType=INTEGER},
#{unitFee,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{status,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabAccountStandard">
insert into tab_account_standard
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="standardId != null">
standard_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="accountType != null">
account_type,
</if>
<if test="unitFee != null">
unit_fee,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="status != null">
status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="standardId != null">
#{standardId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="accountType != null">
#{accountType,jdbcType=INTEGER},
</if>
<if test="unitFee != null">
#{unitFee,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabAccountStandard">
update tab_account_standard
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="accountType != null">
account_type = #{accountType,jdbcType=INTEGER},
</if>
<if test="unitFee != null">
unit_fee = #{unitFee,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
</set>
where standard_id = #{standardId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabAccountStandard">
update tab_account_standard
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
account_type = #{accountType,jdbcType=INTEGER},
unit_fee = #{unitFee,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER}
where standard_id = #{standardId,jdbcType=INTEGER}
</update>
<select id="queryUnitFee" resultType="int">
select
unit_fee unitFee
from tab_account_standard
where enterprise_id = #{enterpriseId}
and account_type = #{accountType}
and status = 1
</select>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabAppletAppMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabAppletApp">
<id column="applet_app_id" jdbcType="INTEGER" property="appletAppId" />
<result column="app_name" jdbcType="VARCHAR" property="appName" />
<result column="app_id" jdbcType="VARCHAR" property="appId" />
<result column="app_status" jdbcType="INTEGER" property="appStatus" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
applet_app_id, app_name, app_id, app_status, enterprise_id, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_applet_app
where applet_app_id = #{appletAppId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_applet_app
where applet_app_id = #{appletAppId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabAppletApp" useGeneratedKeys="true" keyProperty="appletAppId">
insert into tab_applet_app (applet_app_id, app_name, app_id,
app_status, enterprise_id, create_time,
update_time)
values (#{appletAppId,jdbcType=INTEGER}, #{appName,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR},
#{appStatus,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabAppletApp">
insert into tab_applet_app
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="appletAppId != null">
applet_app_id,
</if>
<if test="appName != null">
app_name,
</if>
<if test="appId != null">
app_id,
</if>
<if test="appStatus != null">
app_status,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="appletAppId != null">
#{appletAppId,jdbcType=INTEGER},
</if>
<if test="appName != null">
#{appName,jdbcType=VARCHAR},
</if>
<if test="appId != null">
#{appId,jdbcType=VARCHAR},
</if>
<if test="appStatus != null">
#{appStatus,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabAppletApp">
update tab_applet_app
<set>
<if test="appName != null">
app_name = #{appName,jdbcType=VARCHAR},
</if>
<if test="appId != null">
app_id = #{appId,jdbcType=VARCHAR},
</if>
<if test="appStatus != null">
app_status = #{appStatus,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where applet_app_id = #{appletAppId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabAppletApp">
update tab_applet_app
set app_name = #{appName,jdbcType=VARCHAR},
app_id = #{appId,jdbcType=VARCHAR},
app_status = #{appStatus,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where applet_app_id = #{appletAppId,jdbcType=INTEGER}
</update>
<select id="countByAppName" resultType="int">
select count(1) from tab_applet_app
where app_status != 0
and enterprise_id = #{enterpriseId}
and app_name = #{name}
<if test="appletAppId != null">
and applet_app_id &lt;&gt; #{appletAppId}
</if>
</select>
<select id="countByAppId" resultType="int">
select count(1) from tab_applet_app
where app_status != 0
and enterprise_id = #{enterpriseId}
and app_id = #{appId}
<if test="appletAppId != null">
and applet_app_id &lt;&gt; #{appletAppId}
</if>
</select>
<select id="countByEnterpriseId" resultType="int">
select count(1) from tab_applet_app
where app_status = 1
and enterprise_id = #{enterpriseId}
</select>
<select id="listByParams" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
from tab_applet_app
where app_status != 0
and enterprise_id = #{enterpriseId}
<if test="search != null and search != '' ">
and (app_name like concat('%', #{search}, '%') or app_id like concat('%', #{search}, '%'))
</if>
<if test="appStatus != null ">
and app_status = #{appStatus}
</if>
<if test="orderCode == 1 ">
order by create_time
</if>
<if test="orderCode == 2 ">
order by create_time desc
</if>
</select>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabAppletDecorationConfigMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabAppletDecorationConfig">
<id column="config_id" jdbcType="INTEGER" property="configId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="member_card_area" jdbcType="VARCHAR" property="memberCardArea" />
<result column="data_asset_area" jdbcType="VARCHAR" property="dataAssetArea" />
<result column="open_card_auth" jdbcType="VARCHAR" property="openCardAuth" />
<result column="gps_decision_card" jdbcType="INTEGER" property="gpsDecisionCard" />
<result column="app_id" jdbcType="VARCHAR" property="appId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
config_id, enterprise_id, member_card_area, data_asset_area, open_card_auth, gps_decision_card,
app_id, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_applet_decoration_config
where config_id = #{configId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_applet_decoration_config
where config_id = #{configId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabAppletDecorationConfig" useGeneratedKeys="true" keyProperty="configId">
insert into tab_applet_decoration_config (config_id, enterprise_id, member_card_area,
data_asset_area, open_card_auth, gps_decision_card,
app_id, create_time, update_time
)
values (#{configId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{memberCardArea,jdbcType=VARCHAR},
#{dataAssetArea,jdbcType=VARCHAR}, #{openCardAuth,jdbcType=VARCHAR}, #{gpsDecisionCard,jdbcType=INTEGER},
#{appId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabAppletDecorationConfig">
insert into tab_applet_decoration_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="configId != null">
config_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="memberCardArea != null">
member_card_area,
</if>
<if test="dataAssetArea != null">
data_asset_area,
</if>
<if test="openCardAuth != null">
open_card_auth,
</if>
<if test="gpsDecisionCard != null">
gps_decision_card,
</if>
<if test="appId != null">
app_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="configId != null">
#{configId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="memberCardArea != null">
#{memberCardArea,jdbcType=VARCHAR},
</if>
<if test="dataAssetArea != null">
#{dataAssetArea,jdbcType=VARCHAR},
</if>
<if test="openCardAuth != null">
#{openCardAuth,jdbcType=VARCHAR},
</if>
<if test="gpsDecisionCard != null">
#{gpsDecisionCard,jdbcType=INTEGER},
</if>
<if test="appId != null">
#{appId,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabAppletDecorationConfig">
update tab_applet_decoration_config
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="memberCardArea != null">
member_card_area = #{memberCardArea,jdbcType=VARCHAR},
</if>
<if test="dataAssetArea != null">
data_asset_area = #{dataAssetArea,jdbcType=VARCHAR},
</if>
<if test="openCardAuth != null">
open_card_auth = #{openCardAuth,jdbcType=VARCHAR},
</if>
<if test="gpsDecisionCard != null">
gps_decision_card = #{gpsDecisionCard,jdbcType=INTEGER},
</if>
<if test="appId != null">
app_id = #{appId,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where config_id = #{configId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabAppletDecorationConfig">
update tab_applet_decoration_config
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
member_card_area = #{memberCardArea,jdbcType=VARCHAR},
data_asset_area = #{dataAssetArea,jdbcType=VARCHAR},
open_card_auth = #{openCardAuth,jdbcType=VARCHAR},
gps_decision_card = #{gpsDecisionCard,jdbcType=INTEGER},
app_id = #{appId,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where config_id = #{configId,jdbcType=INTEGER}
</update>
<select id="getByAppId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from tab_applet_decoration_config
where enterprise_id = #{enterpriseId}
and app_id = #{appId}
</select>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabAppletPageComponentMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabAppletPageComponent">
<id column="component_id" jdbcType="INTEGER" property="componentId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="page_id" jdbcType="INTEGER" property="pageId" />
<result column="component_type" jdbcType="VARCHAR" property="componentType" />
<result column="component_index" jdbcType="INTEGER" property="componentIndex" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.gic.enterprise.entity.TabAppletPageComponent">
<result column="setting" jdbcType="LONGVARCHAR" property="setting" />
</resultMap>
<sql id="Base_Column_List">
component_id, enterprise_id, page_id, component_type, component_index, status, create_time,
update_time
</sql>
<sql id="Blob_Column_List">
setting
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tab_applet_page_component
where component_id = #{componentId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_applet_page_component
where component_id = #{componentId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabAppletPageComponent">
insert into tab_applet_page_component (component_id, enterprise_id, page_id,
component_type, component_index, status,
create_time, update_time, setting
)
values (#{componentId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{pageId,jdbcType=INTEGER},
#{componentType,jdbcType=VARCHAR}, #{componentIndex,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{setting,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabAppletPageComponent">
insert into tab_applet_page_component
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="componentId != null">
component_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="pageId != null">
page_id,
</if>
<if test="componentType != null">
component_type,
</if>
<if test="componentIndex != null">
component_index,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="setting != null">
setting,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="componentId != null">
#{componentId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="pageId != null">
#{pageId,jdbcType=INTEGER},
</if>
<if test="componentType != null">
#{componentType,jdbcType=VARCHAR},
</if>
<if test="componentIndex != null">
#{componentIndex,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="setting != null">
#{setting,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabAppletPageComponent">
update tab_applet_page_component
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="pageId != null">
page_id = #{pageId,jdbcType=INTEGER},
</if>
<if test="componentType != null">
component_type = #{componentType,jdbcType=VARCHAR},
</if>
<if test="componentIndex != null">
component_index = #{componentIndex,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="setting != null">
setting = #{setting,jdbcType=LONGVARCHAR},
</if>
</set>
where component_id = #{componentId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.gic.enterprise.entity.TabAppletPageComponent">
update tab_applet_page_component
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
page_id = #{pageId,jdbcType=INTEGER},
component_type = #{componentType,jdbcType=VARCHAR},
component_index = #{componentIndex,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
setting = #{setting,jdbcType=LONGVARCHAR}
where component_id = #{componentId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabAppletPageComponent">
update tab_applet_page_component
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
page_id = #{pageId,jdbcType=INTEGER},
component_type = #{componentType,jdbcType=VARCHAR},
component_index = #{componentIndex,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where component_id = #{componentId,jdbcType=INTEGER}
</update>
<update id="deleteByPageId">
update tab_applet_page_component set status = 0
where status = 1
and page_id = #{pageId}
</update>
<insert id="insertFetch" parameterType="java.util.List">
insert into tab_applet_page_component (component_id, enterprise_id, page_id,
component_type, component_index, status,
create_time, update_time, setting
)
VALUES
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.componentId},
#{item.enterpriseId},
#{item.pageId},
#{item.componentType},
#{item.componentIndex},
#{item.status},
#{item.createTime},
#{item.updateTime},
#{item.setting}
)
</foreach>
</insert>
<select id="listByPageId" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>, <include refid="Blob_Column_List"></include>
from tab_applet_page_component
where status = 1
and page_id = #{pageId}
order by component_index
</select>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabAppletQrcodeMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabAppletQrcode">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="path" jdbcType="VARCHAR" property="path" />
<result column="params" jdbcType="VARCHAR" property="params" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="appid" jdbcType="VARCHAR" property="appid" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<sql id="Base_Column_List">
id, path, params, enterprise_id, appid, create_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_applet_qrcode
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_applet_qrcode
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.gic.enterprise.entity.TabAppletQrcode">
insert into tab_applet_qrcode (id, path, params,
enterprise_id, appid, create_time
)
values (#{id,jdbcType=INTEGER}, #{path,jdbcType=VARCHAR}, #{params,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=INTEGER}, #{appid,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.gic.enterprise.entity.TabAppletQrcode">
insert into tab_applet_qrcode
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="path != null">
path,
</if>
<if test="params != null">
params,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="appid != null">
appid,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="path != null">
#{path,jdbcType=VARCHAR},
</if>
<if test="params != null">
#{params,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="appid != null">
#{appid,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabAppletQrcode">
update tab_applet_qrcode
<set>
<if test="path != null">
path = #{path,jdbcType=VARCHAR},
</if>
<if test="params != null">
params = #{params,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="appid != null">
appid = #{appid,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabAppletQrcode">
update tab_applet_qrcode
set path = #{path,jdbcType=VARCHAR},
params = #{params,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
appid = #{appid,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabAppletServiceConfigMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabAppletServiceConfig">
<id column="applet_service_id" jdbcType="INTEGER" property="appletServiceId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="app_id" jdbcType="VARCHAR" property="appId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="config_id" jdbcType="BIGINT" property="configId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="status" jdbcType="INTEGER" property="status" />
</resultMap>
<sql id="Base_Column_List">
applet_service_id, enterprise_id, app_id, name, type, config_id, create_time, update_time,
status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_applet_service_config
where applet_service_id = #{appletServiceId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_applet_service_config
where applet_service_id = #{appletServiceId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabAppletServiceConfig">
insert into tab_applet_service_config (applet_service_id, enterprise_id, app_id,
name, type, config_id,
create_time, update_time, status
)
values (#{appletServiceId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{appId,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{configId,jdbcType=BIGINT},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabAppletServiceConfig">
insert into tab_applet_service_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="appletServiceId != null">
applet_service_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="appId != null">
app_id,
</if>
<if test="name != null">
name,
</if>
<if test="type != null">
type,
</if>
<if test="configId != null">
config_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="status != null">
status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="appletServiceId != null">
#{appletServiceId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="appId != null">
#{appId,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="configId != null">
#{configId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabAppletServiceConfig">
update tab_applet_service_config
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="appId != null">
app_id = #{appId,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="configId != null">
config_id = #{configId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
</set>
where applet_service_id = #{appletServiceId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabAppletServiceConfig">
update tab_applet_service_config
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
app_id = #{appId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
type = #{type,jdbcType=INTEGER},
config_id = #{configId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER}
where applet_service_id = #{appletServiceId,jdbcType=INTEGER}
</update>
<insert id="insertList">
insert into tab_applet_service_config (applet_service_id, enterprise_id, app_id,
name, type, create_time,
update_time, status, config_id)
values
<foreach collection="list" index="index" item="item" separator=",">
(
#{item.appletServiceId,jdbcType=INTEGER},
#{item.enterpriseId,jdbcType=INTEGER},
#{item.appId,jdbcType=VARCHAR},
#{item.name,jdbcType=VARCHAR},
#{item.type,jdbcType=INTEGER},
#{item.createTime,jdbcType=TIMESTAMP},
#{item.updateTime,jdbcType=TIMESTAMP},
1,
#{item.configId,jdbcType=BIGINT}
)
</foreach>
-- ON DUPLICATE KEY UPDATE name = VALUES(name)
</insert>
<select id="list" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_applet_service_config
where enterprise_id = #{enterpriseId}
<if test="type != null ">
and type = #{type}
</if>
and status = 1
<if test="search != null and search != '' ">
and name like concat('%', #{search}, '%')
</if>
<if test="null != appIdList and appIdList.size &gt; 0">
and config_id in
<foreach close=")" collection="appIdList" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
</select>
<select id="getAppByAppId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_applet_service_config
where app_id = #{appId}
and enterprise_id = #{enterpriseId}
and status = 1
</select>
<update id="delByAppIdList">
update tab_applet_service_config set status = 0
where enterprise_id = #{enterpriseId}
<if test="type != null ">
and type = #{type}
</if>
<if test="null != ids and ids.size &gt; 0">
and app_id not in
<foreach close=")" collection="appIdList" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
</update>
<update id="updateTime">
update tab_applet_service_config set update_time = #{updateTime} where app_id = #{appId} and type = #{type}
</update>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabAppletWechatMenuMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabAppletWechatMenu">
<id column="menu_id" jdbcType="INTEGER" property="menuId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="menu_name" jdbcType="VARCHAR" property="menuName" />
<result column="menu_type" jdbcType="INTEGER" property="menuType" />
<result column="menu_code" jdbcType="VARCHAR" property="menuCode" />
<result column="menu_url" jdbcType="VARCHAR" property="menuUrl" />
<result column="menu_url_para" jdbcType="VARCHAR" property="menuUrlPara" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="app_key" jdbcType="VARCHAR" property="appKey" />
<result column="parent_menu_id" jdbcType="CHAR" property="parentMenuId" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
menu_id, enterprise_id, menu_name, menu_type, menu_code, menu_url, menu_url_para,
content, app_key, parent_menu_id, sort, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_applet_wechat_menu
where menu_id = #{menuId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_applet_wechat_menu
where menu_id = #{menuId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabAppletWechatMenu" useGeneratedKeys="true" keyProperty="menuId">
insert into tab_applet_wechat_menu (menu_id, enterprise_id, menu_name,
menu_type, menu_code, menu_url,
menu_url_para, content, app_key,
parent_menu_id, sort, status,
create_time, update_time)
values (#{menuId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{menuName,jdbcType=VARCHAR},
#{menuType,jdbcType=INTEGER}, #{menuCode,jdbcType=VARCHAR}, #{menuUrl,jdbcType=VARCHAR},
#{menuUrlPara,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR},
#{parentMenuId,jdbcType=CHAR}, #{sort,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabAppletWechatMenu">
insert into tab_applet_wechat_menu
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="menuId != null">
menu_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="menuName != null">
menu_name,
</if>
<if test="menuType != null">
menu_type,
</if>
<if test="menuCode != null">
menu_code,
</if>
<if test="menuUrl != null">
menu_url,
</if>
<if test="menuUrlPara != null">
menu_url_para,
</if>
<if test="content != null">
content,
</if>
<if test="appKey != null">
app_key,
</if>
<if test="parentMenuId != null">
parent_menu_id,
</if>
<if test="sort != null">
sort,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="menuId != null">
#{menuId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="menuName != null">
#{menuName,jdbcType=VARCHAR},
</if>
<if test="menuType != null">
#{menuType,jdbcType=INTEGER},
</if>
<if test="menuCode != null">
#{menuCode,jdbcType=VARCHAR},
</if>
<if test="menuUrl != null">
#{menuUrl,jdbcType=VARCHAR},
</if>
<if test="menuUrlPara != null">
#{menuUrlPara,jdbcType=VARCHAR},
</if>
<if test="content != null">
#{content,jdbcType=VARCHAR},
</if>
<if test="appKey != null">
#{appKey,jdbcType=VARCHAR},
</if>
<if test="parentMenuId != null">
#{parentMenuId,jdbcType=CHAR},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabAppletWechatMenu">
update tab_applet_wechat_menu
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="menuName != null">
menu_name = #{menuName,jdbcType=VARCHAR},
</if>
<if test="menuType != null">
menu_type = #{menuType,jdbcType=INTEGER},
</if>
<if test="menuCode != null">
menu_code = #{menuCode,jdbcType=VARCHAR},
</if>
<if test="menuUrl != null">
menu_url = #{menuUrl,jdbcType=VARCHAR},
</if>
<if test="menuUrlPara != null">
menu_url_para = #{menuUrlPara,jdbcType=VARCHAR},
</if>
<if test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
<if test="appKey != null">
app_key = #{appKey,jdbcType=VARCHAR},
</if>
<if test="parentMenuId != null">
parent_menu_id = #{parentMenuId,jdbcType=CHAR},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where menu_id = #{menuId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabAppletWechatMenu">
update tab_applet_wechat_menu
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
menu_name = #{menuName,jdbcType=VARCHAR},
menu_type = #{menuType,jdbcType=INTEGER},
menu_code = #{menuCode,jdbcType=VARCHAR},
menu_url = #{menuUrl,jdbcType=VARCHAR},
menu_url_para = #{menuUrlPara,jdbcType=VARCHAR},
content = #{content,jdbcType=VARCHAR},
app_key = #{appKey,jdbcType=VARCHAR},
parent_menu_id = #{parentMenuId,jdbcType=CHAR},
sort = #{sort,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where menu_id = #{menuId,jdbcType=INTEGER}
</update>
<select id="listByParentId" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_applet_wechat_menu
where status = 1
and enterprise_id = #{enterpriseId}
and app_key = #{appKey}
and parent_menu_id = #{parentId}
order by sort
</select>
<select id="countByMenuName" resultType="int">
select count(1)
from tab_applet_wechat_menu
where status = 1
and enterprise_id = #{enterpriseId}
and app_key = #{appKey}
and menu_name = #{menuName}
<if test="menuId != null ">
and menu_id &lt;&gt; #{menuId}
</if>
</select>
<select id="listAll" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
from tab_applet_wechat_menu
where status = 1
and enterprise_id = #{enterpriseId}
and app_key = #{appKey}
order by sort
</select>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabAuditProcessMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabAuditProcess">
<id column="audit_process_id" jdbcType="INTEGER" property="auditProcessId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="audit_log_id" jdbcType="INTEGER" property="auditLogId" />
<result column="project_item_id" jdbcType="INTEGER" property="projectItemId" />
<result column="is_platform" jdbcType="INTEGER" property="isPlatform" />
<result column="auditor_id" jdbcType="INTEGER" property="auditorId" />
<result column="audit_result" jdbcType="INTEGER" property="auditResult" />
<result column="auditor_type" jdbcType="INTEGER" property="auditorType" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
audit_process_id, enterprise_id, audit_log_id, project_item_id, is_platform, auditor_id,
audit_result, auditor_type, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_audit_process
where audit_process_id = #{auditProcessId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_audit_process
where audit_process_id = #{auditProcessId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabAuditProcess">
insert into tab_audit_process (audit_process_id, enterprise_id, audit_log_id,
project_item_id, is_platform, auditor_id,
audit_result, auditor_type, status,
create_time, update_time)
values (#{auditProcessId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{auditLogId,jdbcType=INTEGER},
#{projectItemId,jdbcType=INTEGER}, #{isPlatform,jdbcType=INTEGER}, #{auditorId,jdbcType=INTEGER},
#{auditResult,jdbcType=INTEGER}, #{auditorType,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabAuditProcess">
insert into tab_audit_process
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="auditProcessId != null">
audit_process_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="auditLogId != null">
audit_log_id,
</if>
<if test="projectItemId != null">
project_item_id,
</if>
<if test="isPlatform != null">
is_platform,
</if>
<if test="auditorId != null">
auditor_id,
</if>
<if test="auditResult != null">
audit_result,
</if>
<if test="auditorType != null">
auditor_type,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="auditProcessId != null">
#{auditProcessId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="auditLogId != null">
#{auditLogId,jdbcType=INTEGER},
</if>
<if test="projectItemId != null">
#{projectItemId,jdbcType=INTEGER},
</if>
<if test="isPlatform != null">
#{isPlatform,jdbcType=INTEGER},
</if>
<if test="auditorId != null">
#{auditorId,jdbcType=INTEGER},
</if>
<if test="auditResult != null">
#{auditResult,jdbcType=INTEGER},
</if>
<if test="auditorType != null">
#{auditorType,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabAuditProcess">
update tab_audit_process
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="auditLogId != null">
audit_log_id = #{auditLogId,jdbcType=INTEGER},
</if>
<if test="projectItemId != null">
project_item_id = #{projectItemId,jdbcType=INTEGER},
</if>
<if test="isPlatform != null">
is_platform = #{isPlatform,jdbcType=INTEGER},
</if>
<if test="auditorId != null">
auditor_id = #{auditorId,jdbcType=INTEGER},
</if>
<if test="auditResult != null">
audit_result = #{auditResult,jdbcType=INTEGER},
</if>
<if test="auditorType != null">
auditor_type = #{auditorType,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where audit_process_id = #{auditProcessId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabAuditProcess">
update tab_audit_process
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
audit_log_id = #{auditLogId,jdbcType=INTEGER},
project_item_id = #{projectItemId,jdbcType=INTEGER},
is_platform = #{isPlatform,jdbcType=INTEGER},
auditor_id = #{auditorId,jdbcType=INTEGER},
audit_result = #{auditResult,jdbcType=INTEGER},
auditor_type = #{auditorType,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where audit_process_id = #{auditProcessId,jdbcType=INTEGER}
</update>
<select id="getOtherTypeProcess" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_audit_process
where enterprise_id = #{enterpriseId}
and audit_log_id = #{auditLogId}
and status = 1
and auditor_type &lt;&gt; #{auditorType}
</select>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabBillingAccountMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingAccount">
<id column="account_id" jdbcType="INTEGER" property="accountId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="account_balance" jdbcType="DOUBLE" property="accountBalance" />
<result column="credit_line" jdbcType="INTEGER" property="creditLine" />
<result column="auto_recharge" jdbcType="INTEGER" property="autoRecharge" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
account_id, enterprise_id, account_balance, credit_line, auto_recharge, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_account
where account_id = #{accountId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_billing_account
where account_id = #{accountId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingAccount">
insert into tab_billing_account (account_id, enterprise_id, account_balance,
credit_line, auto_recharge, create_time, update_time)
values (#{accountId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{accountBalance,jdbcType=DOUBLE},
#{creditLine,jdbcType=INTEGER}, #{autoRecharge,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingAccount">
insert into tab_billing_account
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="accountId != null">
account_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="accountBalance != null">
account_balance,
</if>
<if test="creditLine != null">
credit_line,
</if>
<if test="autoRecharge != null">
auto_recharge,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="accountId != null">
#{accountId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="accountBalance != null">
#{accountBalance,jdbcType=DOUBLE},
</if>
<if test="creditLine != null">
#{creditLine,jdbcType=INTEGER},
</if>
<if test="autoRecharge != null">
#{autoRecharge,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingAccount">
update tab_billing_account
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="accountBalance != null">
account_balance = #{accountBalance,jdbcType=DOUBLE},
</if>
<if test="creditLine != null">
credit_line = #{creditLine,jdbcType=INTEGER},
</if>
<if test="autoRecharge != null">
auto_recharge = #{autoRecharge,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where account_id = #{accountId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingAccount">
update tab_billing_account
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
account_balance = #{accountBalance,jdbcType=DOUBLE},
credit_line = #{creditLine,jdbcType=INTEGER},
auto_recharge = #{autoRecharge,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where account_id = #{accountId,jdbcType=INTEGER}
</update>
<select id="selectByEnterpriseId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_account
where enterprise_id = #{enterpriseId}
</select>
<update id="updateAccountAfterRechargeOrRefund">
update tab_billing_account set account_balance = account_balance + #{totalFee} where enterprise_id = #{enterpriseId}
</update>
<update id="deductAccount">
update tab_billing_account set account_balance = account_balance - #{totalFee} where enterprise_id = #{enterpriseId}
</update>
<update id="updateByEnterpriseIdSelective" parameterType="com.gic.enterprise.entity.TabBillingAccount">
update tab_billing_account
<set>
<if test="accountBalance != null">
account_balance = #{accountBalance,jdbcType=DOUBLE},
</if>
<if test="creditLine != null">
credit_line = #{creditLine,jdbcType=INTEGER},
</if>
<if test="autoRecharge != null">
auto_recharge = #{autoRecharge,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</update>
<select id="listBillingAccount" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_billing_account
<if test="enterpriseIdList != null and enterpriseIdList.size() &gt; 0">
where enterprise_id in
<foreach close=")" collection="enterpriseIdList" index="index" item="enterpriseId" open="(" separator=",">
#{enterpriseId}
</foreach>
</if>
</select>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabBillingAuditResultMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingAuditResult">
<id column="audit_result_id" jdbcType="INTEGER" property="auditResultId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="serial_number" jdbcType="VARCHAR" property="serialNumber" />
<result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="audit_time" jdbcType="TIMESTAMP" property="auditTime" />
<result column="audit_user_id" jdbcType="INTEGER" property="auditUserId" />
<result column="audit_user_name" jdbcType="VARCHAR" property="auditUserName" />
<result column="audit_user_phone" jdbcType="VARCHAR" property="auditUserPhone" />
<result column="fee_plan" jdbcType="DOUBLE" property="feePlan" />
<result column="fee_paid" jdbcType="DOUBLE" property="feePaid" />
<result column="refuse_reason" jdbcType="VARCHAR" property="refuseReason" />
</resultMap>
<sql id="Base_Column_List">
audit_result_id, enterprise_id, serial_number, audit_status, status, create_time,
update_time, audit_time, audit_user_id, audit_user_name, audit_user_phone, fee_plan,
fee_paid, refuse_reason
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_audit_result
where audit_result_id = #{auditResultId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_billing_audit_result
where audit_result_id = #{auditResultId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingAuditResult">
insert into tab_billing_audit_result (audit_result_id, enterprise_id, serial_number,
audit_status, status, create_time,
update_time, audit_time, audit_user_id,
audit_user_name, audit_user_phone, fee_plan,
fee_paid, refuse_reason)
values (#{auditResultId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{serialNumber,jdbcType=VARCHAR},
#{auditStatus,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{auditTime,jdbcType=TIMESTAMP}, #{auditUserId,jdbcType=INTEGER},
#{auditUserName,jdbcType=VARCHAR}, #{auditUserPhone,jdbcType=VARCHAR}, #{feePlan,jdbcType=DOUBLE},
#{feePaid,jdbcType=DOUBLE}, #{refuseReason,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingAuditResult">
insert into tab_billing_audit_result
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="auditResultId != null">
audit_result_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="serialNumber != null">
serial_number,
</if>
<if test="auditStatus != null">
audit_status,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="auditTime != null">
audit_time,
</if>
<if test="auditUserId != null">
audit_user_id,
</if>
<if test="auditUserName != null">
audit_user_name,
</if>
<if test="auditUserPhone != null">
audit_user_phone,
</if>
<if test="feePlan != null">
fee_plan,
</if>
<if test="feePaid != null">
fee_paid,
</if>
<if test="refuseReason != null">
refuse_reason,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="auditResultId != null">
#{auditResultId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="serialNumber != null">
#{serialNumber,jdbcType=VARCHAR},
</if>
<if test="auditStatus != null">
#{auditStatus,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="auditTime != null">
#{auditTime,jdbcType=TIMESTAMP},
</if>
<if test="auditUserId != null">
#{auditUserId,jdbcType=INTEGER},
</if>
<if test="auditUserName != null">
#{auditUserName,jdbcType=VARCHAR},
</if>
<if test="auditUserPhone != null">
#{auditUserPhone,jdbcType=VARCHAR},
</if>
<if test="feePlan != null">
#{feePlan,jdbcType=DOUBLE},
</if>
<if test="feePaid != null">
#{feePaid,jdbcType=DOUBLE},
</if>
<if test="refuseReason != null">
#{refuseReason,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingAuditResult">
update tab_billing_audit_result
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="serialNumber != null">
serial_number = #{serialNumber,jdbcType=VARCHAR},
</if>
<if test="auditStatus != null">
audit_status = #{auditStatus,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="auditTime != null">
audit_time = #{auditTime,jdbcType=TIMESTAMP},
</if>
<if test="auditUserId != null">
audit_user_id = #{auditUserId,jdbcType=INTEGER},
</if>
<if test="auditUserName != null">
audit_user_name = #{auditUserName,jdbcType=VARCHAR},
</if>
<if test="auditUserPhone != null">
audit_user_phone = #{auditUserPhone,jdbcType=VARCHAR},
</if>
<if test="feePlan != null">
fee_plan = #{feePlan,jdbcType=DOUBLE},
</if>
<if test="feePaid != null">
fee_paid = #{feePaid,jdbcType=DOUBLE},
</if>
<if test="refuseReason != null">
refuse_reason = #{refuseReason,jdbcType=VARCHAR},
</if>
</set>
where audit_result_id = #{auditResultId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingAuditResult">
update tab_billing_audit_result
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
serial_number = #{serialNumber,jdbcType=VARCHAR},
audit_status = #{auditStatus,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
audit_time = #{auditTime,jdbcType=TIMESTAMP},
audit_user_id = #{auditUserId,jdbcType=INTEGER},
audit_user_name = #{auditUserName,jdbcType=VARCHAR},
audit_user_phone = #{auditUserPhone,jdbcType=VARCHAR},
fee_plan = #{feePlan,jdbcType=DOUBLE},
fee_paid = #{feePaid,jdbcType=DOUBLE},
refuse_reason = #{refuseReason,jdbcType=VARCHAR}
where audit_result_id = #{auditResultId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabBillingCouponCardMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingCouponCard">
<id column="coupon_card_id" jdbcType="INTEGER" property="couponCardId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="coupon_card_name" jdbcType="VARCHAR" property="couponCardName" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="effective_start_date" jdbcType="TIMESTAMP" property="effectiveStartDate" />
<result column="effective_end_date" jdbcType="TIMESTAMP" property="effectiveEndDate" />
<result column="content" jdbcType="DOUBLE" property="content" />
<result column="applicable_product_code" jdbcType="VARCHAR" property="applicableProductCode" />
<result column="applicable_product_name" jdbcType="VARCHAR" property="applicableProductName" />
</resultMap>
<sql id="Base_Column_List">
coupon_card_id, enterprise_id, status, create_time, update_time, coupon_card_name,
type, effective_start_date, effective_end_date, content, applicable_product_code,
applicable_product_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_coupon_card
where coupon_card_id = #{couponCardId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_billing_coupon_card
where coupon_card_id = #{couponCardId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingCouponCard">
insert into tab_billing_coupon_card (coupon_card_id, enterprise_id, status,
create_time, update_time, coupon_card_name,
type, effective_start_date, effective_end_date,
content, applicable_product_code, applicable_product_name
)
values (#{couponCardId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{couponCardName,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER}, #{effectiveStartDate,jdbcType=TIMESTAMP}, #{effectiveEndDate,jdbcType=TIMESTAMP},
#{content,jdbcType=DOUBLE}, #{applicableProductCode,jdbcType=VARCHAR}, #{applicableProductName,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingCouponCard">
insert into tab_billing_coupon_card
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="couponCardId != null">
coupon_card_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="couponCardName != null">
coupon_card_name,
</if>
<if test="type != null">
type,
</if>
<if test="effectiveStartDate != null">
effective_start_date,
</if>
<if test="effectiveEndDate != null">
effective_end_date,
</if>
<if test="content != null">
content,
</if>
<if test="applicableProductCode != null">
applicable_product_code,
</if>
<if test="applicableProductName != null">
applicable_product_name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="couponCardId != null">
#{couponCardId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="couponCardName != null">
#{couponCardName,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="effectiveStartDate != null">
#{effectiveStartDate,jdbcType=TIMESTAMP},
</if>
<if test="effectiveEndDate != null">
#{effectiveEndDate,jdbcType=TIMESTAMP},
</if>
<if test="content != null">
#{content,jdbcType=DOUBLE},
</if>
<if test="applicableProductCode != null">
#{applicableProductCode,jdbcType=VARCHAR},
</if>
<if test="applicableProductName != null">
#{applicableProductName,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingCouponCard">
update tab_billing_coupon_card
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="couponCardName != null">
coupon_card_name = #{couponCardName,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="effectiveStartDate != null">
effective_start_date = #{effectiveStartDate,jdbcType=TIMESTAMP},
</if>
<if test="effectiveEndDate != null">
effective_end_date = #{effectiveEndDate,jdbcType=TIMESTAMP},
</if>
<if test="content != null">
content = #{content,jdbcType=DOUBLE},
</if>
<if test="applicableProductCode != null">
applicable_product_code = #{applicableProductCode,jdbcType=VARCHAR},
</if>
<if test="applicableProductName != null">
applicable_product_name = #{applicableProductName,jdbcType=VARCHAR},
</if>
</set>
where coupon_card_id = #{couponCardId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingCouponCard">
update tab_billing_coupon_card
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
coupon_card_name = #{couponCardName,jdbcType=VARCHAR},
type = #{type,jdbcType=INTEGER},
effective_start_date = #{effectiveStartDate,jdbcType=TIMESTAMP},
effective_end_date = #{effectiveEndDate,jdbcType=TIMESTAMP},
content = #{content,jdbcType=DOUBLE},
applicable_product_code = #{applicableProductCode,jdbcType=VARCHAR},
applicable_product_name = #{applicableProductName,jdbcType=VARCHAR}
where coupon_card_id = #{couponCardId,jdbcType=INTEGER}
</update>
<select id="listBillingCouponCard" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_coupon_card
where status != 0
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null ">
and effective_end_date &gt;= #{startTime}
</if>
<if test="endTime != null ">
and effective_end_date &lt;= #{endTime}
</if>
</select>
<select id="countCoupon" resultType="integer">
select count(1) from
tab_billing_coupon_card
where status = 1
and effective_end_date >= now()
and enterprise_id = #{enterpriseId}
</select>
<select id="listCoupCardEnabled" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_coupon_card
where status = 1
and effective_end_date &gt;= now()
and effective_start_date &lt;= now()
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="code != null ">
and applicable_product_code like concat('%_',#{code},'_%')
</if>
</select>
<update id="expireCoupCard">
update tab_billing_coupon_card
set status = 3
where status=1 and effective_end_date &lt;= now()
</update>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabBillingRefundMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingRefund">
<id column="refund_id" jdbcType="INTEGER" property="refundId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="refund_pay_number" jdbcType="VARCHAR" property="refundPayNumber" />
<result column="refund_serial_number" jdbcType="VARCHAR" property="refundSerialNumber" />
<result column="order_serial_number" jdbcType="VARCHAR" property="orderSerialNumber" />
<result column="order_fee" jdbcType="DOUBLE" property="orderFee" />
<result column="refund_fee" jdbcType="DOUBLE" property="refundFee" />
<result column="refund_status" jdbcType="INTEGER" property="refundStatus" />
<result column="request_code" jdbcType="VARCHAR" property="requestCode" />
<result column="refund_channel" jdbcType="INTEGER" property="refundChannel" />
<result column="time_end" jdbcType="TIMESTAMP" property="timeEnd" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="refund_reason" jdbcType="VARCHAR" property="refundReason" />
</resultMap>
<sql id="Base_Column_List">
refund_id, enterprise_id, refund_pay_number, refund_serial_number, order_serial_number,
order_fee, refund_fee, refund_status, request_code, refund_channel, time_end, status,
create_time, update_time, refund_reason
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_refund
where refund_id = #{refundId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_billing_refund
where refund_id = #{refundId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingRefund">
insert into tab_billing_refund (refund_id, enterprise_id, refund_pay_number,
refund_serial_number, order_serial_number,
order_fee, refund_fee, refund_status,
request_code, refund_channel, time_end,
status, create_time, update_time,
refund_reason)
values (#{refundId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{refundPayNumber,jdbcType=VARCHAR},
#{refundSerialNumber,jdbcType=VARCHAR}, #{orderSerialNumber,jdbcType=VARCHAR},
#{orderFee,jdbcType=DOUBLE}, #{refundFee,jdbcType=DOUBLE}, #{refundStatus,jdbcType=INTEGER},
#{requestCode,jdbcType=VARCHAR}, #{refundChannel,jdbcType=INTEGER}, #{timeEnd,jdbcType=TIMESTAMP},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{refundReason,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingRefund">
insert into tab_billing_refund
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="refundId != null">
refund_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="refundPayNumber != null">
refund_pay_number,
</if>
<if test="refundSerialNumber != null">
refund_serial_number,
</if>
<if test="orderSerialNumber != null">
order_serial_number,
</if>
<if test="orderFee != null">
order_fee,
</if>
<if test="refundFee != null">
refund_fee,
</if>
<if test="refundStatus != null">
refund_status,
</if>
<if test="requestCode != null">
request_code,
</if>
<if test="refundChannel != null">
refund_channel,
</if>
<if test="timeEnd != null">
time_end,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="refundReason != null">
refund_reason,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="refundId != null">
#{refundId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="refundPayNumber != null">
#{refundPayNumber,jdbcType=VARCHAR},
</if>
<if test="refundSerialNumber != null">
#{refundSerialNumber,jdbcType=VARCHAR},
</if>
<if test="orderSerialNumber != null">
#{orderSerialNumber,jdbcType=VARCHAR},
</if>
<if test="orderFee != null">
#{orderFee,jdbcType=DOUBLE},
</if>
<if test="refundFee != null">
#{refundFee,jdbcType=DOUBLE},
</if>
<if test="refundStatus != null">
#{refundStatus,jdbcType=INTEGER},
</if>
<if test="requestCode != null">
#{requestCode,jdbcType=VARCHAR},
</if>
<if test="refundChannel != null">
#{refundChannel,jdbcType=INTEGER},
</if>
<if test="timeEnd != null">
#{timeEnd,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="refundReason != null">
#{refundReason,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingRefund">
update tab_billing_refund
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="refundPayNumber != null">
refund_pay_number = #{refundPayNumber,jdbcType=VARCHAR},
</if>
<if test="refundSerialNumber != null">
refund_serial_number = #{refundSerialNumber,jdbcType=VARCHAR},
</if>
<if test="orderSerialNumber != null">
order_serial_number = #{orderSerialNumber,jdbcType=VARCHAR},
</if>
<if test="orderFee != null">
order_fee = #{orderFee,jdbcType=DOUBLE},
</if>
<if test="refundFee != null">
refund_fee = #{refundFee,jdbcType=DOUBLE},
</if>
<if test="refundStatus != null">
refund_status = #{refundStatus,jdbcType=INTEGER},
</if>
<if test="requestCode != null">
request_code = #{requestCode,jdbcType=VARCHAR},
</if>
<if test="refundChannel != null">
refund_channel = #{refundChannel,jdbcType=INTEGER},
</if>
<if test="timeEnd != null">
time_end = #{timeEnd,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="refundReason != null">
refund_reason = #{refundReason,jdbcType=VARCHAR},
</if>
</set>
where refund_id = #{refundId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingRefund">
update tab_billing_refund
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
refund_pay_number = #{refundPayNumber,jdbcType=VARCHAR},
refund_serial_number = #{refundSerialNumber,jdbcType=VARCHAR},
order_serial_number = #{orderSerialNumber,jdbcType=VARCHAR},
order_fee = #{orderFee,jdbcType=DOUBLE},
refund_fee = #{refundFee,jdbcType=DOUBLE},
refund_status = #{refundStatus,jdbcType=INTEGER},
request_code = #{requestCode,jdbcType=VARCHAR},
refund_channel = #{refundChannel,jdbcType=INTEGER},
time_end = #{timeEnd,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
refund_reason = #{refundReason,jdbcType=VARCHAR}
where refund_id = #{refundId,jdbcType=INTEGER}
</update>
<select id="getRefund" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_refund
where status = 1
and enterprise_id = #{enterpriseId}
and refund_serial_number = #{refundSerialNumber}
and request_code = #{requestCode}
</select>
<select id="getTotalRefundFee" resultType="java.lang.Double">
select
sum(refund_fee)
from tab_billing_refund
where enterprise_id = #{enterpriseId}
and order_serial_number = #{orderSerialNumber}
and request_code = #{requestCode}
and status = 1
</select>
<select id="listRefund" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_refund
where enterprise_id = #{enterpriseId}
<if test="search != null and search != '' ">
and refund_seial_number like concat('%', #{search}, '%')
</if>
<if test="startTime != null ">
and time_end &gt; #{startTime}
</if>
<if test="endTime != null ">
and time_end &lt; #{endTime}
</if>
and status = 1
</select>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabConfigRuleEnterpriseMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabConfigRuleEnterprise">
<id column="enterprise_rule_id" jdbcType="INTEGER" property="enterpriseRuleId" />
<result column="rule_name" jdbcType="VARCHAR" property="ruleName" />
<result column="enterprise_type" jdbcType="INTEGER" property="enterpriseType" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
enterprise_rule_id, rule_name, enterprise_type, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_config_rule_enterprise
where enterprise_rule_id = #{enterpriseRuleId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_config_rule_enterprise
where enterprise_rule_id = #{enterpriseRuleId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabConfigRuleEnterprise" useGeneratedKeys="true" keyProperty="enterpriseRuleId">
insert into tab_config_rule_enterprise (enterprise_rule_id, rule_name, enterprise_type,
status, create_time, update_time
)
values (#{enterpriseRuleId,jdbcType=INTEGER}, #{ruleName,jdbcType=VARCHAR}, #{enterpriseType,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabConfigRuleEnterprise">
insert into tab_config_rule_enterprise
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseRuleId != null">
enterprise_rule_id,
</if>
<if test="ruleName != null">
rule_name,
</if>
<if test="enterpriseType != null">
enterprise_type,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseRuleId != null">
#{enterpriseRuleId,jdbcType=INTEGER},
</if>
<if test="ruleName != null">
#{ruleName,jdbcType=VARCHAR},
</if>
<if test="enterpriseType != null">
#{enterpriseType,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabConfigRuleEnterprise">
update tab_config_rule_enterprise
<set>
<if test="ruleName != null">
rule_name = #{ruleName,jdbcType=VARCHAR},
</if>
<if test="enterpriseType != null">
enterprise_type = #{enterpriseType,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where enterprise_rule_id = #{enterpriseRuleId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabConfigRuleEnterprise">
update tab_config_rule_enterprise
set rule_name = #{ruleName,jdbcType=VARCHAR},
enterprise_type = #{enterpriseType,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where enterprise_rule_id = #{enterpriseRuleId,jdbcType=INTEGER}
</update>
<select id="countRepeatName" resultType="int">
select count(1) from tab_config_rule_enterprise
where status = 1
and rule_name = #{ruleName}
<if test="enterpriseRuleId != null">
and enterprise_rule_id &lt;&gt; #{enterpriseRuleId}
</if>
</select>
<select id="listRule" resultType="com.gic.enterprise.dto.rule.RuleEnterpriseDTO">
select t1.enterprise_rule_id enterpriseRuleId, t1.rule_name ruleName, count(DISTINCT t2.enterprise_id) countEnterpriseId
from tab_config_rule_enterprise t1
left join tab_config_rule_enterprise_rel t2 on t1.enterprise_rule_id = t2.enterprise_rule_id
and t2.status = 1
<if test="search == null or search == '' ">
and t2.enterprise_id != -1
</if>
<if test="search != null and search != '' ">
left join tab_enterprise t3 on t2.enterprise_id = t3.enterprise_id
</if>
where t1.status = 1
<if test="search != null and search != '' ">
and ( t1.rule_name like concat('%', #{search}, '%')
or t3.enterprise_name like concat('%', #{search}, '%')
or t3.company_name like concat('%', #{search}, '%') )
</if>
GROUP BY t1.enterprise_rule_id
order by t1.create_time desc
</select>
<select id="listEnterpriseRule" resultType="com.gic.enterprise.dto.rule.RuleEnterpriseDTO">
select t2.enterprise_name enterpriseName, t2.company_name companyName, t2.logo logo, t2.enterprise_id enterpriseId
from tab_config_rule_enterprise_rel t1
left join tab_enterprise t2 on t1.enterprise_id = t2.enterprise_id
where t1.status = 1
and t2.status = 1
and t1.enterprise_id != -1
and t1.enterprise_rule_id = #{enterpriseRuleId}
<if test="search != null and search != '' ">
and ( t2.enterprise_name like concat('%', #{search}, '%')
or t2.company_name like concat('%', #{search}, '%') )
</if>
order by t1.create_time desc
</select>
<select id="listEnterpriseRuleAll" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_config_rule_enterprise
where status = 1
</select>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabConfigRuleEnterpriseRelMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabConfigRuleEnterpriseRel">
<id column="enterprise_rel_id" jdbcType="INTEGER" property="enterpriseRelId" />
<result column="enterprise_rule_id" jdbcType="INTEGER" property="enterpriseRuleId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
enterprise_rel_id, enterprise_rule_id, enterprise_id, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_config_rule_enterprise_rel
where enterprise_rel_id = #{enterpriseRelId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_config_rule_enterprise_rel
where enterprise_rel_id = #{enterpriseRelId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabConfigRuleEnterpriseRel">
insert into tab_config_rule_enterprise_rel (enterprise_rel_id, enterprise_rule_id,
enterprise_id, status, create_time,
update_time)
values (#{enterpriseRelId,jdbcType=INTEGER}, #{enterpriseRuleId,jdbcType=INTEGER},
#{enterpriseId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabConfigRuleEnterpriseRel">
insert into tab_config_rule_enterprise_rel
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseRelId != null">
enterprise_rel_id,
</if>
<if test="enterpriseRuleId != null">
enterprise_rule_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseRelId != null">
#{enterpriseRelId,jdbcType=INTEGER},
</if>
<if test="enterpriseRuleId != null">
#{enterpriseRuleId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabConfigRuleEnterpriseRel">
update tab_config_rule_enterprise_rel
<set>
<if test="enterpriseRuleId != null">
enterprise_rule_id = #{enterpriseRuleId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where enterprise_rel_id = #{enterpriseRelId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabConfigRuleEnterpriseRel">
update tab_config_rule_enterprise_rel
set enterprise_rule_id = #{enterpriseRuleId,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where enterprise_rel_id = #{enterpriseRelId,jdbcType=INTEGER}
</update>
<insert id="insertBatch" parameterType="java.util.List">
insert into tab_config_rule_enterprise_rel (enterprise_rel_id, enterprise_rule_id,
enterprise_id, status, create_time,
update_time)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.enterpriseRelId},
#{item.enterpriseRuleId},
#{item.enterpriseId},
#{item.status},
#{item.createTime},
#{item.updateTime}
)
</foreach>
</insert>
<update id="deleteByEnterpriseRuleId">
update tab_config_rule_enterprise_rel set status = 0
where status = 1
and enterprise_rule_id = #{enterpriseRuleId}
</update>
<update id="deleteByEnterpriseIdList">
update tab_config_rule_enterprise_rel set status = 0
where status = 1
<if test="list != null and list.size() > 0">
and enterprise_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</update>
<select id="listEnterprise" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_config_rule_enterprise_rel
where status = 1
group by enterprise_id
</select>
<select id="getByEnterpriseId" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_config_rule_enterprise_rel
where status = 1
and enterprise_id = #{enterpriseId}
limit 1
</select>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabConfigRuleRelMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabConfigRuleRel">
<id column="rule_rel_id" jdbcType="INTEGER" property="ruleRelId" />
<result column="enterprise_rule_id" jdbcType="INTEGER" property="enterpriseRuleId" />
<result column="rule_id" jdbcType="INTEGER" property="ruleId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
rule_rel_id, enterprise_rule_id, rule_id, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_config_rule_rel
where rule_rel_id = #{ruleRelId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_config_rule_rel
where rule_rel_id = #{ruleRelId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabConfigRuleRel">
insert into tab_config_rule_rel (rule_rel_id, enterprise_rule_id, rule_id,
status, create_time, update_time
)
values (#{ruleRelId,jdbcType=INTEGER}, #{enterpriseRuleId,jdbcType=INTEGER}, #{ruleId,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabConfigRuleRel">
insert into tab_config_rule_rel
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ruleRelId != null">
rule_rel_id,
</if>
<if test="enterpriseRuleId != null">
enterprise_rule_id,
</if>
<if test="ruleId != null">
rule_id,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ruleRelId != null">
#{ruleRelId,jdbcType=INTEGER},
</if>
<if test="enterpriseRuleId != null">
#{enterpriseRuleId,jdbcType=INTEGER},
</if>
<if test="ruleId != null">
#{ruleId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabConfigRuleRel">
update tab_config_rule_rel
<set>
<if test="enterpriseRuleId != null">
enterprise_rule_id = #{enterpriseRuleId,jdbcType=INTEGER},
</if>
<if test="ruleId != null">
rule_id = #{ruleId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where rule_rel_id = #{ruleRelId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabConfigRuleRel">
update tab_config_rule_rel
set enterprise_rule_id = #{enterpriseRuleId,jdbcType=INTEGER},
rule_id = #{ruleId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where rule_rel_id = #{ruleRelId,jdbcType=INTEGER}
</update>
<insert id="insertBatch" parameterType="java.util.List">
insert into tab_config_rule_rel (rule_rel_id, enterprise_rule_id,
rule_id, status, create_time,
update_time)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.ruleRelId},
#{item.enterpriseRuleId},
#{item.ruleId},
#{item.status},
#{item.createTime},
#{item.updateTime}
)
</foreach>
</insert>
<update id="deleteByEnterpriseRuleId">
update tab_config_rule_rel set status = 0
where status = 1
and enterprise_rule_id = #{enterpriseRuleId}
</update>
<select id="listRuleRel" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_config_rule_rel
where status = 1
and enterprise_rule_id = #{enterpriseRuleId}
</select>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabCustomGuideMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabCustomGuide">
<id column="guide_id" jdbcType="INTEGER" property="guideId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="icon" jdbcType="VARCHAR" property="icon" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="entry_condition" jdbcType="INTEGER" property="entryCondition" />
<result column="link" jdbcType="VARCHAR" property="link" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="version" jdbcType="INTEGER" property="version" />
<result column="icon_path" jdbcType="VARCHAR" property="iconPath" />
<result column="selected_icon_path" jdbcType="VARCHAR" property="selectedIconPath" />
<result column="custom_link_type" jdbcType="INTEGER" property="customLinkType" />
<result column="custom_page" jdbcType="VARCHAR" property="customPage" />
<result column="appid" jdbcType="VARCHAR" property="appid" />
</resultMap>
<sql id="Base_Column_List">
guide_id, enterprise_id, icon, title, entry_condition, link, status, sort, create_time,
update_time, version, icon_path, selected_icon_path, custom_link_type, custom_page,
appid
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_custom_guide
where guide_id = #{guideId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_custom_guide
where guide_id = #{guideId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabCustomGuide">
insert into tab_custom_guide (guide_id, enterprise_id, icon,
title, entry_condition, link,
status, sort, create_time,
update_time, version, icon_path,
selected_icon_path, custom_link_type, custom_page,
appid)
values (#{guideId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{icon,jdbcType=VARCHAR},
#{title,jdbcType=VARCHAR}, #{entryCondition,jdbcType=INTEGER}, #{link,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{version,jdbcType=INTEGER}, #{iconPath,jdbcType=VARCHAR},
#{selectedIconPath,jdbcType=VARCHAR}, #{customLinkType,jdbcType=INTEGER}, #{customPage,jdbcType=VARCHAR},
#{appid,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabCustomGuide">
insert into tab_custom_guide
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="guideId != null">
guide_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="icon != null">
icon,
</if>
<if test="title != null">
title,
</if>
<if test="entryCondition != null">
entry_condition,
</if>
<if test="link != null">
link,
</if>
<if test="status != null">
status,
</if>
<if test="sort != null">
sort,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="version != null">
version,
</if>
<if test="iconPath != null">
icon_path,
</if>
<if test="selectedIconPath != null">
selected_icon_path,
</if>
<if test="customLinkType != null">
custom_link_type,
</if>
<if test="customPage != null">
custom_page,
</if>
<if test="appid != null">
appid,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="guideId != null">
#{guideId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="icon != null">
#{icon,jdbcType=VARCHAR},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="entryCondition != null">
#{entryCondition,jdbcType=INTEGER},
</if>
<if test="link != null">
#{link,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="version != null">
#{version,jdbcType=INTEGER},
</if>
<if test="iconPath != null">
#{iconPath,jdbcType=VARCHAR},
</if>
<if test="selectedIconPath != null">
#{selectedIconPath,jdbcType=VARCHAR},
</if>
<if test="customLinkType != null">
#{customLinkType,jdbcType=INTEGER},
</if>
<if test="customPage != null">
#{customPage,jdbcType=VARCHAR},
</if>
<if test="appid != null">
#{appid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabCustomGuide">
update tab_custom_guide
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="icon != null">
icon = #{icon,jdbcType=VARCHAR},
</if>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="entryCondition != null">
entry_condition = #{entryCondition,jdbcType=INTEGER},
</if>
<if test="link != null">
link = #{link,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="version != null">
version = #{version,jdbcType=INTEGER},
</if>
<if test="iconPath != null">
icon_path = #{iconPath,jdbcType=VARCHAR},
</if>
<if test="selectedIconPath != null">
selected_icon_path = #{selectedIconPath,jdbcType=VARCHAR},
</if>
<if test="customLinkType != null">
custom_link_type = #{customLinkType,jdbcType=INTEGER},
</if>
<if test="customPage != null">
custom_page = #{customPage,jdbcType=VARCHAR},
</if>
<if test="appid != null">
appid = #{appid,jdbcType=VARCHAR},
</if>
</set>
where guide_id = #{guideId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabCustomGuide">
update tab_custom_guide
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
icon = #{icon,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
entry_condition = #{entryCondition,jdbcType=INTEGER},
link = #{link,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
version = #{version,jdbcType=INTEGER},
icon_path = #{iconPath,jdbcType=VARCHAR},
selected_icon_path = #{selectedIconPath,jdbcType=VARCHAR},
custom_link_type = #{customLinkType,jdbcType=INTEGER},
custom_page = #{customPage,jdbcType=VARCHAR},
appid = #{appid,jdbcType=VARCHAR}
where guide_id = #{guideId,jdbcType=INTEGER}
</update>
<select id="getVersion" resultType="integer">
select
version
from tab_custom_guide
where 1=1
<if test="enterpriseId != null">
and enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</if>
and appid=#{appid}
order by version desc
</select>
<select id="listGuide" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_custom_guide
where 1=1
<if test="enterpriseId != null">
and enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</if>
<if test="version != null">
and version = #{version}
</if>
and (status = 1 or status = 2)
<if test="appid != null and appid != ''">
and appid = #{appid}
</if>
order by sort
</select>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabCustomStoreMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabCustomStore">
<id column="custom_store_id" jdbcType="INTEGER" property="customStoreId" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="appid" jdbcType="VARCHAR" property="appid" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="store_widget_id" jdbcType="INTEGER" property="storeWidgetId" />
<result column="app_type" jdbcType="INTEGER" property="appType" />
</resultMap>
<sql id="Base_Column_List">
custom_store_id, title, enterprise_id, appid, status, create_time, update_time, store_widget_id,
app_type
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_custom_store
where custom_store_id = #{customStoreId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_custom_store
where custom_store_id = #{customStoreId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabCustomStore">
insert into tab_custom_store (custom_store_id, title, enterprise_id,
appid, status, create_time,
update_time, store_widget_id, app_type
)
values (#{customStoreId,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER},
#{appid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{storeWidgetId,jdbcType=INTEGER}, #{appType,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabCustomStore">
insert into tab_custom_store
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="customStoreId != null">
custom_store_id,
</if>
<if test="title != null">
title,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="appid != null">
appid,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="storeWidgetId != null">
store_widget_id,
</if>
<if test="appType != null">
app_type,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="customStoreId != null">
#{customStoreId,jdbcType=INTEGER},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="appid != null">
#{appid,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="storeWidgetId != null">
#{storeWidgetId,jdbcType=INTEGER},
</if>
<if test="appType != null">
#{appType,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabCustomStore">
update tab_custom_store
<set>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="appid != null">
appid = #{appid,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="storeWidgetId != null">
store_widget_id = #{storeWidgetId,jdbcType=INTEGER},
</if>
<if test="appType != null">
app_type = #{appType,jdbcType=INTEGER},
</if>
</set>
where custom_store_id = #{customStoreId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabCustomStore">
update tab_custom_store
set title = #{title,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
appid = #{appid,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
store_widget_id = #{storeWidgetId,jdbcType=INTEGER},
app_type = #{appType,jdbcType=INTEGER}
where custom_store_id = #{customStoreId,jdbcType=INTEGER}
</update>
<select id="pageCustomStore" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_custom_store
where enterprise_id = #{enterpriseId,jdbcType=INTEGER} and (status=1 or status=2)
<if test="appid != null and appid != ''">
and appid= #{appid}
</if>
<if test="search != null and search != ''">
and title like concat('%', #{search}, '%')
</if>
</select>
<update id="closeCustomStore" >
update tab_custom_store
set status = 2
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
and appid = #{appid,jdbcType=VARCHAR} and status=1
</update>
<select id="getCustomStore" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_custom_store
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
and appid= #{appid}
and status=1
</select>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabCustomThemeMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabCustomTheme">
<id column="theme_id" jdbcType="INTEGER" property="themeId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="theme" jdbcType="INTEGER" property="theme" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="app_type" jdbcType="INTEGER" property="appType" />
<result column="appid" jdbcType="VARCHAR" property="appid" />
</resultMap>
<sql id="Base_Column_List">
theme_id, enterprise_id, theme, create_time, update_time, app_type, appid
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_custom_theme
where theme_id = #{themeId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_custom_theme
where theme_id = #{themeId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabCustomTheme">
insert into tab_custom_theme (theme_id, enterprise_id, theme,
create_time, update_time, app_type,
appid)
values (#{themeId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{theme,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{appType,jdbcType=INTEGER},
#{appid,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabCustomTheme">
insert into tab_custom_theme
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="themeId != null">
theme_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="theme != null">
theme,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="appType != null">
app_type,
</if>
<if test="appid != null">
appid,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="themeId != null">
#{themeId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="theme != null">
#{theme,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="appType != null">
#{appType,jdbcType=INTEGER},
</if>
<if test="appid != null">
#{appid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabCustomTheme">
update tab_custom_theme
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="theme != null">
theme = #{theme,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="appType != null">
app_type = #{appType,jdbcType=INTEGER},
</if>
<if test="appid != null">
appid = #{appid,jdbcType=VARCHAR},
</if>
</set>
where theme_id = #{themeId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabCustomTheme">
update tab_custom_theme
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
theme = #{theme,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
app_type = #{appType,jdbcType=INTEGER},
appid = #{appid,jdbcType=VARCHAR}
where theme_id = #{themeId,jdbcType=INTEGER}
</update>
<select id="listTheme" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_custom_theme
where 1=1
<if test="enterpriseId != null">
and enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</if>
and appid= #{appid}
</select>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabCustomUdeskFieldMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabCustomUdeskField">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="udesk_field_id" jdbcType="VARCHAR" property="udeskFieldId" />
<result column="gic_field_id" jdbcType="VARCHAR" property="gicFieldId" />
<result column="gic_field_name" jdbcType="VARCHAR" property="gicFieldName" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
id, udesk_field_id, gic_field_id, gic_field_name, status, enterprise_id, create_time,
update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_custom_udesk_field
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_custom_udesk_field
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabCustomUdeskField">
insert into tab_custom_udesk_field (id, udesk_field_id, gic_field_id,
gic_field_name, status, enterprise_id,
create_time, update_time)
values (#{id,jdbcType=INTEGER}, #{udeskFieldId,jdbcType=VARCHAR}, #{gicFieldId,jdbcType=VARCHAR},
#{gicFieldName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabCustomUdeskField">
insert into tab_custom_udesk_field
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="udeskFieldId != null">
udesk_field_id,
</if>
<if test="gicFieldId != null">
gic_field_id,
</if>
<if test="gicFieldName != null">
gic_field_name,
</if>
<if test="status != null">
status,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="udeskFieldId != null">
#{udeskFieldId,jdbcType=VARCHAR},
</if>
<if test="gicFieldId != null">
#{gicFieldId,jdbcType=VARCHAR},
</if>
<if test="gicFieldName != null">
#{gicFieldName,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabCustomUdeskField">
update tab_custom_udesk_field
<set>
<if test="udeskFieldId != null">
udesk_field_id = #{udeskFieldId,jdbcType=VARCHAR},
</if>
<if test="gicFieldId != null">
gic_field_id = #{gicFieldId,jdbcType=VARCHAR},
</if>
<if test="gicFieldName != null">
gic_field_name = #{gicFieldName,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabCustomUdeskField">
update tab_custom_udesk_field
set udesk_field_id = #{udeskFieldId,jdbcType=VARCHAR},
gic_field_id = #{gicFieldId,jdbcType=VARCHAR},
gic_field_name = #{gicFieldName,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="listEnterpriseField" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_custom_udesk_field
where enterprise_id = #{enterpriseId,jdbcType=INTEGER} and (status=1 or status=2)
</select>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabDataActuallyPaidConfigMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabDataActuallyPaidConfig">
<id column="actually_paid_config_id" jdbcType="INTEGER" property="actuallyPaidConfigId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="classify" jdbcType="INTEGER" property="classify" />
<result column="config_status" jdbcType="INTEGER" property="configStatus" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
actually_paid_config_id, enterprise_id, classify, config_status, status, create_time,
update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_data_actually_paid_config
where actually_paid_config_id = #{actuallyPaidConfigId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_data_actually_paid_config
where actually_paid_config_id = #{actuallyPaidConfigId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabDataActuallyPaidConfig" useGeneratedKeys="true" keyProperty="actuallyPaidConfigId">
insert into tab_data_actually_paid_config (actually_paid_config_id, enterprise_id,
classify, config_status, status,
create_time, update_time)
values (#{actuallyPaidConfigId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{classify,jdbcType=INTEGER}, #{configStatus,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabDataActuallyPaidConfig">
insert into tab_data_actually_paid_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="actuallyPaidConfigId != null">
actually_paid_config_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="classify != null">
classify,
</if>
<if test="configStatus != null">
config_status,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="actuallyPaidConfigId != null">
#{actuallyPaidConfigId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="classify != null">
#{classify,jdbcType=INTEGER},
</if>
<if test="configStatus != null">
#{configStatus,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabDataActuallyPaidConfig">
update tab_data_actually_paid_config
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="classify != null">
classify = #{classify,jdbcType=INTEGER},
</if>
<if test="configStatus != null">
config_status = #{configStatus,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where actually_paid_config_id = #{actuallyPaidConfigId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabDataActuallyPaidConfig">
update tab_data_actually_paid_config
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
classify = #{classify,jdbcType=INTEGER},
config_status = #{configStatus,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where actually_paid_config_id = #{actuallyPaidConfigId,jdbcType=INTEGER}
</update>
<select id="listByEnterpriseId" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_data_actually_paid_config
where enterprise_id = #{enterpriseId}
and status = 1
order by classify
</select>
<update id="delete">
update tab_data_actually_paid_config set status = 0
where enterprise_id = #{enterpriseId}
and classify = #{classify}
and status = 1
</update>
</mapper>
\ No newline at end of file
<?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.gic.enterprise.dao.mapper.TabDataGenerationConfigMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabDataGenerationConfig">
<id column="generation_config_id" jdbcType="INTEGER" property="generationConfigId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="age_level" jdbcType="INTEGER" property="ageLevel" />
<result column="first_sign" jdbcType="INTEGER" property="firstSign" />
<result column="age_first_value" jdbcType="INTEGER" property="ageFirstValue" />
<result column="second_sign" jdbcType="INTEGER" property="secondSign" />
<result column="age_second_value" jdbcType="INTEGER" property="ageSecondValue" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
generation_config_id, enterprise_id, age_level, first_sign, age_first_value, second_sign,
age_second_value, description, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_data_generation_config
where generation_config_id = #{generationConfigId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_data_generation_config
where generation_config_id = #{generationConfigId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabDataGenerationConfig">
insert into tab_data_generation_config (generation_config_id, enterprise_id,
age_level, first_sign, age_first_value,
second_sign, age_second_value, description,
status, create_time, update_time
)
values (#{generationConfigId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{ageLevel,jdbcType=INTEGER}, #{firstSign,jdbcType=INTEGER}, #{ageFirstValue,jdbcType=INTEGER},
#{secondSign,jdbcType=INTEGER}, #{ageSecondValue,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabDataGenerationConfig">
insert into tab_data_generation_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="generationConfigId != null">
generation_config_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="ageLevel != null">
age_level,
</if>
<if test="firstSign != null">
first_sign,
</if>
<if test="ageFirstValue != null">
age_first_value,
</if>
<if test="secondSign != null">
second_sign,
</if>
<if test="ageSecondValue != null">
age_second_value,
</if>
<if test="description != null">
description,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="generationConfigId != null">
#{generationConfigId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="ageLevel != null">
#{ageLevel,jdbcType=INTEGER},
</if>
<if test="firstSign != null">
#{firstSign,jdbcType=INTEGER},
</if>
<if test="ageFirstValue != null">
#{ageFirstValue,jdbcType=INTEGER},
</if>
<if test="secondSign != null">
#{secondSign,jdbcType=INTEGER},
</if>
<if test="ageSecondValue != null">
#{ageSecondValue,jdbcType=INTEGER},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabDataGenerationConfig">
update tab_data_generation_config
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="ageLevel != null">
age_level = #{ageLevel,jdbcType=INTEGER},
</if>
<if test="firstSign != null">
first_sign = #{firstSign,jdbcType=INTEGER},
</if>
<if test="ageFirstValue != null">
age_first_value = #{ageFirstValue,jdbcType=INTEGER},
</if>
<if test="secondSign != null">
second_sign = #{secondSign,jdbcType=INTEGER},
</if>
<if test="ageSecondValue != null">
age_second_value = #{ageSecondValue,jdbcType=INTEGER},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where generation_config_id = #{generationConfigId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabDataGenerationConfig">
update tab_data_generation_config
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
age_level = #{ageLevel,jdbcType=INTEGER},
first_sign = #{firstSign,jdbcType=INTEGER},
age_first_value = #{ageFirstValue,jdbcType=INTEGER},
second_sign = #{secondSign,jdbcType=INTEGER},
age_second_value = #{ageSecondValue,jdbcType=INTEGER},
description = #{description,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where generation_config_id = #{generationConfigId,jdbcType=INTEGER}
</update>
<update id="deleteGenerationConfig">
update tab_data_generation_config set status = 0
where enterprise_id = #{enterpriseId}
and status = 1
</update>
<select id="listGenerationByEnterpriseId" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_data_generation_config
where enterprise_id = #{enterpriseId}
and status = 1
order by age_level
</select>
</mapper>
\ No newline at end of file
This diff is collapsed. Click to expand it.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment